CROSS-REFERENCE TO RELATED APPLICATION
TECHNICAL FIELD
[0002] The present invention relates to the field of communications, in particular to a
charge and discharge control method and apparatus for a terminal, a storage medium
and an electronic apparatus.
BACKGROUND
[0003] With the development of smart terminals represented by mobile phones, people have
greater expectations for the endurance of smart terminals. In a terminal, in addition
to a single battery, two batteries or more batteries may be used to increase the endurance
of the terminal, and using two batteries or more batteries gradually becomes a trend.
[0004] For a terminal with a single battery, because only the same one battery is used for
a long time, the battery may swell and then cause a safety accident. For a terminal
with multiple batteries, although the multiple batteries are used in turn, excessive
use may cause the batteries to swell and then cause a safety problem. Charging and
discharging (where charging refers to charging the batteries in the terminal and discharging
refers to supplying power using the batteries in the terminal) of a terminal with
two batteries will be described as an example.
[0005] Currently, main strategies for charging and discharging of the terminal with two
batteries are as follows:
- preferential charging or discharging is performed using a primary battery of primary
and secondary batteries, such that the primary battery may be used more frequently
than the secondary battery; and
- preferential charging or discharging is performed according to the power or voltage
of the primary and secondary batteries. Specifically, the battery with lower voltage
or power is charged preferentially and the battery with higher power or voltage is
discharged preferentially.
[0006] Each of the two batteries uses a separate charging chip, and the two batteries are
charged or discharged simultaneously.
[0007] However, it should be noted that in charging and discharging strategies of terminals
in the related technology, the safety of batteries is not considered emphatically.
[0008] In view of the above-mentioned problem existing in the related technology, no effective
schemes have been proposed at present.
SUMMARY
[0009] Embodiments of the present invention provide a charge and discharge control method
and apparatus for a terminal, a storage medium and an electronic apparatus, to at
least solve the problem existing in the related technology that when a battery in
a terminal is used for charging or discharging for a long time, the battery may swell
and cause a safety accident.
[0010] An embodiment of the present invention provides a charge and discharge control method
for a terminal, including: determining temperature parameters of one or more batteries
in the terminal, where the temperature parameters include at least one of a cumulative
time TS for which the temperature of the one or more batteries is greater than a first
preset value, and a continuous time TN for which the temperature of the one or more
batteries is greater than a second preset value; and performing charge and discharge
control on the one or more batteries in the terminal according to the temperature
parameters.
[0011] Another embodiment of the present invention provides a charge and discharge control
apparatus for a terminal, including: a determination module configured to determine
temperature parameters of one or more batteries in a terminal, where the temperature
parameters include at least one of a cumulative time TS for which the temperature
of the one or more batteries is greater than a first preset value, and a continuous
time TN for which the temperature of the one or more batteries is greater than a second
preset value; and a control module configured to perform charge and discharge control
on the one or more batteries in the terminal according to the temperature parameters.
[0012] Another embodiment of the present invention also provides a storage medium storing
a computer program, which, when executed, performs the steps in any of the method
embodiments described above.
[0013] Another embodiment of the present invention also provides an electronic apparatus
including a memory and a processor, where the memory stores a computer program which,
when executed by the processor, causes the processor to perform the steps in any of
the method embodiments described above.
BRIEF DESCRIPTION OF DRAWINGS
[0014] The accompanying drawings described herein are intended to provide a further understanding
of the invention and form part of the present application, and the illustrative embodiments
of the invention and the description thereof are intended to explain the invention
and do not constitute undue limitations on the invention. In the drawings:
Fig. 1 is a hardware structural block diagram of a mobile terminal to which a charge
and discharge control method for a terminal is applied according to an embodiment
of the present invention;
Fig. 2 is a flowchart of a charge and discharge control method for a terminal according
to an embodiment of the present invention;
Fig. 3 is a first preferred flowchart of a charge and discharge control method for
a terminal according to an embodiment of the present invention;
Fig. 4 is a second preferred flowchart of a charge and discharge control method for
a terminal according to an embodiment of the present invention;
Fig. 5 is a third preferred flowchart 3 of a charge and discharge control method for
a terminal according to an embodiment of the present invention;
Fig. 6 is a structural block diagram of a terminal with two batteries according to
an embodiment of the present invention;
Fig. 7 is a first basic block diagram showing charging of two batteries according
to an embodiment of the present invention;
Fig. 8 is second basic block diagram showing charging of two batteries according to
an embodiment of the present invention;
Fig. 9 is a flowchart showing power supply of a terminal with two batteries according
to an embodiment of the present invention;
Fig. 10 is a flowchart showing charging of a terminal with two batteries according
to an embodiment of the present invention;
Fig. 11 is a flowchart showing charging of a single battery according to an embodiment
of the present invention; and
Fig. 12 is a structural block diagram of a charge and discharge control apparatus
for a terminal according to an embodiment of the present invention.
DETAILED DESCRIPTION
[0015] The present invention will be described in detail with reference to the drawings
and in connection with the embodiments. It should be noted that the embodiments of
the present application and the features in the embodiments may be combined with each
other in case there is no conflict therebetween.
[0016] It should be noted that the terms "first", "second" and the like in the description
and claims of the present invention and the drawings are used to distinguish similar
objects without having to be used to describe a particular order or sequence.
[0017] First of all, it should be noted that when a battery in a terminal is frequently
used for charging or discharging at high temperature, a stored cumulative time of
high-temperature of the battery may increase continuously, and when the time reaches
a critical value specified for the battery, it is easy to cause the battery to swell
and then cause a safety accident. Therefore, the following issues need to be considered,
for example, how to control charging or discharging of a battery? How to ensure the
safe use of the battery? How to charge more efficiently?
[0018] Improvements in some cases are described below in connection with embodiments.
[0019] The methods provided in the embodiments of the present application may be performed
in a mobile terminal, a computing terminal, or a similar computing device. With respect
to a mobile terminal, FIG. 1 is a hardware block diagram of a mobile terminal to which
a terminal charging/discharging control method is applied according to an embodiment
of the present invention. As shown in FIG. 1, the mobile terminal may include one
or more processors 102 (only one is shown in FIG. 1) (the processor 102 may include,
but is not limited to, a processing device such as a microprocessor MCU or a programmable
logic device FPGA) and a memory 104 for storing data. Optionally, the mobile terminal
may also include a transmission device 106 for a communication function and an input/output
device 108. Those having ordinary skills in the art shall appreciate that the structure
shown in FIG. 1 is merely schematic and does not limit the structure of the mobile
terminal. For example, the mobile terminal 10 may also include more or fewer components
than those shown in FIG. 1, or have a different configuration than those shown in
FIG. 1.
[0020] The memory 104 may be configured to store a computer program, for example, a software
program and a module of application software, such as a computer program corresponding
to a charging and discharging control method of a terminal in the embodiment of the
present invention, and the processor 102 executes various functional applications
and data processing by executing the computer program stored in the memory 104, that
is, to implement the above-described method. Memory 104 may include high-speed random
access memory, and may also include non-volatile memory such as one or more magnetic
storage devices, flash memory, or other non-volatile solid-state memory. In some examples,
the memory 104 may also include memory remotely disposed relative to the processor
102, which may be connected to the mobile terminal 10 over a network. Examples of
the above networks include, but are not limited to, the Internet, an intranet, a local
area network, a mobile communication network, and combinations thereof.
[0021] The transmission device 106 is for receiving or transmitting data via a network.
The specific example of the network described above may include a wireless network
provided by a communication provider of the mobile terminal 10. In one example, the
transmission device 106 includes a network adapter (Network Interface Controller,
abbreviated as NIC) that can be connected to other network devices via a base station
to communicate with the Internet. In one example, the transmission device 106 may
be a radio frequency (RF) module for communicating with the Internet in a wireless
manner.
[0022] In this embodiment, a charge and discharge control method is provided. Fig. 2 is
a flowchart of a charge and discharge control method for a terminal according to an
embodiment of the present invention. As shown in Fig. 2, the flow includes following
steps S202 and S204.
[0023] At step S202, temperature parameters of one or more batteries in a terminal are determined,
where the temperature parameters include at least one of a cumulative time TS for
which the temperature of the battery is greater than a first preset value, and a continuous
time TN for which the temperature of the battery is greater than a second preset value.
[0024] At step S204, charge and discharge control is performed on the one or more batteries
in the terminal according to the temperature parameters.
[0025] The above steps may be executed by the above mobile terminal (or other terminals).
In the embodiment, TS refers to a cumulative total time for which the battery has
been in a high-temperature state from leaving the factory until now, and TN refers
to a continuous time for which the battery has been in a high-temperature state from
leaving the factory until now. In the embodiment, the values of the first preset value
and the second preset value may be the same or may be different.
[0026] In this embodiment, the charging or discharging of the terminal is controlled according
to the temperature parameters of the battery, that is to say, when using the terminal
to charge and discharge, the temperature parameters of the battery are considered
comprehensively, so that the battery is prevented from being frequently used for charging
or discharging at high temperature, thus solving a problem in the related technology
that when the battery in the terminal is used for charging and discharging for a long
time, the battery may swell and cause a safety accident. Therefore, the effects of
improving battery safety, reducing swelling phenomena, and ensuring the use safety
of the terminal are effectively achieved.
[0027] Fig. 3 is a first preferred flowchart of a charge and discharge control method for
a terminal according to an embodiment of the present invention. As shown in Fig. 3,
when the temperature parameters include TS, the step S204 includes at least one of
following steps S302 and S304:
At step S302, when it is determined that there is no battery in the terminal with
TS of the battery being less than or equal to a first cumulative time threshold, an
indication that the batteries in the terminal need to be replaced is performed.
[0028] At step S304, when it is determined that there is a battery in the terminal with
TS of the battery being less than or equal to the first cumulative time threshold,
the battery with TS less than or equal to the first cumulative time threshold is considered
as a battery of first type, and a charging or discharging operation is performed using
the battery of first type.
[0029] In this embodiment, the first cumulative time threshold may be a threshold for warning
against cumulative time of high temperature which may be represented by TSH (if the
threshold is exceeded, the battery is prone to swell. The value of the threshold may
be fixed, that is, may be set when the battery leaves the factory, for example, may
be set to 3 months, 4 months or the like, or may be adjustable, for example, may be
adjusted manually, or may be adjusted automatically according to a preset adjustment
condition).
[0030] When the battery in the terminal is used for charging or discharging, the charging
or discharging of the terminal may be controlled in consideration of the TS value
of the battery in the terminal only, that is to say, only according to the TS value
of the battery. Of course, in this embodiment, the charging or discharging of the
terminal may be controlled in consideration of the TN value of the battery in the
terminal only or in combined consideration of the TS value of the battery and other
temperature parameters.
[0031] The charging or discharging of the terminal controlled in combined consideration
of the TS value and TN value of the battery will be described below.
[0032] Fig. 4 is a second preferred flowchart of a charge and discharge control method for
a terminal according to an embodiment of the present invention. As shown in Fig. 4,
when the temperature parameters include TN in addition to TS, step S304 includes a
following step.
[0033] At step S402, when it is determined that the battery or batteries of first type include
a battery with TN of the battery being less than or equal to a continuous time threshold,
the battery with TN less than or equal to the continuous time threshold is considered
as a battery of second type, and a charging or discharging operation is performed
using the battery of second type.
[0034] In this embodiment, the above continuous time threshold may be a threshold for warning
against continuous time of high temperature which may be represented by TNH (the warning
value may be set flexibly, for example, may be set to 30 minutes, 15 minutes, 5 minutes,
etc.).
[0035] The charging or discharging of the terminal controlled in consideration of the TN
value only will be described below.
[0036] Fig. 5 is a third preferred flowchart of a charge and discharge control method for
a terminal according to an embodiment of the present invention. As shown in Fig. 5,
when the temperature parameters include TN, step S204 includes a following step.
[0037] At step S502, when it is determined that the one or more batteries in the terminal
include one or more batteries with TN less than or equal to the continuous time threshold,
the one or more batteries meeting this condition are considered as one or more batteries
of second type, and a charging or discharging operation is performed using the one
or more batteries of second type.
[0038] In an embodiment, performing a charging or discharging operation using the battery
or batteries of second type includes at least one of the following steps: when it
is determined that the battery or batteries of second type include a battery with
TS less than or equal to a second cumulative time threshold, the battery with TS less
than or equal to the second cumulative time threshold is considered as a battery of
third type, and a charging or discharging operation is performed using the battery
of third type, where the second cumulative time threshold is less than the first cumulative
time threshold; and when it is determined that the battery or batteries of second
type do not include a battery with TS less than or equal to the second cumulative
time threshold, a charging or discharging operation is performed according to a predetermined
charging and discharging strategy. In this embodiment, the second cumulative time
threshold may be a general threshold of cumulative time of high-temperature, that
is, a value less than the threshold for warning against cumulative time of high temperature,
which may be represented by TSL (exceeding the general threshold means that the cumulative
time of high-temperature of the battery has reached a certain proportion of the threshold
for warning. The value of the general threshold may be fixed or flexibly adjusted,
and may be taken in proportion to the threshold for warning against cumulative time
of high temperature, for example, may be 50% of the threshold for warning against
cumulative time of high temperature, or may be 30% of the threshold for warning against
cumulative time of high temperature).
[0039] In an embodiment, performing a charging or discharging operation using the battery
or batteries of third type includes: when the number of the batteries of third type
is at least two, a charging or discharging operation is performed using the batteries
of third type according to a predetermined charging and discharging strategy. In this
embodiment, the predetermined charging and discharging strategy may be a preset charging
and discharging strategy (also called a default charging and discharging strategy,
which may be an existing charging and discharging strategy. For example, for a terminal
with two batteries, the preset charging and discharging strategy may be that one battery
is fixedly charged or discharged first, and after the battery is fully charged or
its power is lower than a preset value, the other battery is charged or discharged.
Of course, the preset charging and discharging strategy may also be that the two batteries
are charged or discharged simultaneously.
[0040] In an embodiment, before performing a discharging operation using the battery or
batteries of third type, the method also includes: when it is determined that the
battery or batteries of second type further include a battery with TS greater than
the second cumulative time threshold, and the power of the battery with TS greater
than the second cumulative time threshold exceeds a power threshold, the battery with
TS greater than the second cumulative time threshold is discharged to a level equal
to the power threshold. This embodiment is mainly directed to a case where a discharging
operation is performed using a circuit in the terminal. In this embodiment, if there
is a battery of second type with high power (i.e., the power exceeds the power threshold,
for example, the power is full), the battery of second type with high power may be
preferentially discharged until the power thereof decreases to the aforementioned
power threshold.
[0041] In an embodiment, performing a discharging operation using the battery or batteries
of second type includes: when it is determined that the batteries of second type include
a battery with TS less than or equal to the second cumulative time threshold and a
battery with TS greater than the second cumulative time threshold, and the battery
with TS greater than the second cumulative time threshold is in a full power state,
a discharging operation is performed according to a predetermined discharging strategy,
where the second cumulative time threshold is less than the first cumulative time
threshold. In this embodiment, the predetermined charging and discharging strategy
is also a preset charging and discharging strategy, which is the same as that described
in the foregoing embodiment, and will not be repeated here.
[0042] In an embodiment, when it is determined that there is a battery with TS less than
or equal to the cumulative time threshold in the terminal, the method also includes:
when it is determined that the batteries of first type do not include a battery with
TN less than or equal to the continuous time threshold, an indication that the batteries
in the terminal are in a long-term overheating state is performed. This embodiment
is directed to the case where TN of each of the batteries of first type in the terminal
is greater than the continuous time threshold, in this case, a user is indicated that
the batteries of first type in the current terminal are in a long-term overheating
state, and then the user is reminded that the batteries need to be subjected to heat
reduction treatment. In this embodiment, there are various ways to indicate, for example,
by generating a specific indicative sound (for example, giving an alarm sound), by
voice, or by displaying text.
[0043] In an embodiment, after indicating that the batteries in the terminal are in a long-term
overheating state, the method also includes: performing charging or discharging restriction
on the batteries in the terminal; and when it is determined that the temperature of
the batteries after charging or discharging restriction is reduced below a preset
temperature, performing a charging or discharging operation using the batteries subjected
to charging or discharging restriction. In this embodiment, there are various ways
to perform charging or discharging restriction, for example, charging may be restricted
by reducing a charging current, while discharging of the terminal may be restricted
by starting a low power consumption mode (for example, reducing the brightness of
screen display).
[0044] The present invention will be explained in combination with embodiments below.
[0045] First, a terminal with two batteries is taken as an example. In this embodiment,
a structural block diagram of the terminal with two batteries is shown in Fig. 6.
Each module in Fig. 6 will be described below.
[0046] The two batteries of the terminal include a power supply battery 1 and a power supply
battery 2.
[0047] A TN control module is configured to execute a charge and discharge control strategy
according to a stored continuous time of high-temperature TN up to now, including
actively switching among batteries after TN exceeds a preset threshold.
[0048] A TS control module is configured to execute a charge and discharge control strategy
according to a stored cumulative time of high-temperature TS, including adjusting
a charging temperature threshold in several stages, adjusting a maximum charge power,
switching to another battery for power supply after full charge of a battery, and
the like.
[0049] A dual-battery charge and discharge control module is configured to control the charging
of two batteries, switch a power supply battery, and the like.
[0050] A scheme of charging of two batteries will be introduced below. Fig. 7 and Fig. 8
are basic block diagrams showing charging of two batteries.
[0051] Fig. 7 shows a scheme of charging two batteries simultaneously, each of batteries
1 and 2 having a special charging path, while Fig. 8 shows only one charging path,
so that only one battery can be charged at one time, and which battery is to be charged
is controlled by a charging control unit.
[0052] Charging and discharging processes are described below with reference to the accompanying
drawings.
[0053] Fig. 9 is a flowchart showing power supply of a terminal with two batteries according
to an embodiment of the present invention, including following steps.
[0054] At STEP 1, when a charging device is unplugged, a monitoring process is started regularly
(corresponding to 1-2 in Fig. 9).
[0055] At STEP 2, when a value of TS1 reaches TSH1, the battery 1 is prone to swell. At
this time, if a value of TS2 does not reach TSH2 and the battery 1 is in a high-temperature
state, the battery 1 is switched to the battery 2 for power supply. If the battery
2 is low in power, the battery 1 is used to supply power and a user is indicated that
the battery 1 needs to be replaced (corresponding to 3-5 in Fig. 9), and vice versa.
[0056] If both batteries reach the TSH1 and TSH2 values, the user is directly indicated
that the batteries need to be replaced (corresponding to 6 in Fig. 9).
[0057] If both batteries do not reach the TSH1 and TSH2 values, go to STEP 3.
[0058] At STEP 3, if a value of TN1 reaches a preset threshold TN1H and a value of TN2 does
not reach a preset threshold TN2H, the battery 1 is switched to the battery 2 for
power supply (corresponding to 9-11 in Fig. 9). If the battery 2 is low in power,
the battery 1 is used to supply power and the user is indicated that the battery is
overheated, and vice versa, so as to make the two batteries be used uniformly at high
temperature as much as possible.
[0059] If both batteries reach TN1H and TN2H, the user is indicated that the mobile phone
is overheated (corresponding to 12 in Fig. 9).
[0060] If both batteries do not reach TN1H and TN2H, the process proceeds to STEP 4.
[0061] At STEP 4, if the value of TS1 exceeds TSL1 and the value of TS2 does not exceed
TSL2, and at this time, if the battery 1 is in a full power state, the battery 1 is
discharged to a high power threshold (such as 70% of its capacity) (corresponding
to 15, 16, 18-19 in Fig. 9). If the battery 1 is low in power, the battery 2 is used
to supply power, and vice versa.
[0062] If both batteries reach TSL1 and TSL2, or both batteries do not reach TSL1 and TSL2,
a current power supply strategy is maintained (corresponding to 17 in Fig. 9).
[0063] Fig. 10 is a flowchart showing charging of a terminal with two batteries according
to an embodiment of the present invention, including following steps.
[0064] At STEP 1, when a charging device is connected to the terminal, a monitoring process
is started regularly (corresponding to 1-2 in Fig. 10).
[0065] At STEP 2, when the value of TS1 reaches TSH1, the battery 1 is prone to swell. At
this time, if the value of TS2 does not reach TSH2 and the battery 1 is in a high-temperature
state (higher than 45°C), the battery 2 is charged and charging of the battery 1 is
disabled (corresponding to 3-5 in Fig. 10), and vice versa.
[0066] If both batteries reach the TSH1 and TSH2, the user is directly indicated that the
batteries need to be replaced (corresponding to 6 in Fig. 10).
[0067] If both batteries do not reach the TSH1 and TSH2 values (corresponding to 3 and 7
in Fig. 10), the process proceeds to STEP 3.
[0068] At STEP 3, if the value of TN1 reaches a preset threshold TN1H and the value of TN2
does not reach a preset threshold TN2H, the battery 2 is switched to be charged (corresponding
to 9-11 in Fig. 10). If the battery 2 is fully charged, a battery maximum temperature
in a charging scenario of the battery 1 is limited, and vice versa, so as to make
the two batteries be used uniformly at high temperature as much as possible.
[0069] If both batteries reach TN1H and TN2H, the user is indicated that the mobile phone
is overheated (corresponding to 12 in Fig. 10).
[0070] If both batteries do not reach TN1H and TN2H (corresponding to 9 and 13 in Fig. 10),
the process proceeds to STEP 4; if the value of TN1 does not reach TN1H and the value
of TN2 reaches TN2H, the battery 1 is charged preferentially (corresponding to 14
in Fig. 10).
[0071] At STEP 4, if the value of TS1 exceeds TSL1 and the value of TS2 does not exceed
TSL2, the battery 2 is charged (corresponding to 15-16 and 18 in Fig. 10). If the
battery 2 is fully charged, the battery 1 is then charged, and vice versa (corresponding
to 15, 19-20 in Fig. 10).
[0072] If both batteries reach TSL1 and TSL2, or both batteries do not reach TSL1 and TSL2,
a current charging strategy is maintained (corresponding to 17 in Fig. 10).
[0073] It can be seen from the above charging and discharging scheme of a terminal with
two batteries that the charging and discharging process control of the two batteries
is performed according to the battery temperature and the stored cumulative time of
high-temperature in an embodiment of the present invention, so that the safety of
the batteries can be ensured while completing the charging and discharging operations
of the two batteries, and swelling can be avoided.
[0074] The foregoing embodiments are directed to the charging or discharging process of
a terminal with two batteries. A charging process of a single battery will be described
below.
[0075] Fig. 11 is a flowchart showing charging of a single battery according to an embodiment,
including following steps.
[0076] At STEP 1, when a charging device is connected to the terminal, a monitoring process
is started regularly (corresponding to 1-2 in Fig. 11).
[0077] At STEP 2, when the value of TS reaches TSH, the battery is prone to swell. An indication
that the battery needs to be replaced is performed, the maximum battery temperature
during charging is limited to a predetermined temperature (for example, 45°C) and
the maximum charging power is limited to a high power threshold (for example, 70%
of its capacity) (corresponding to 3-4 in Fig. 11). Otherwise, the process proceeds
to STEP 3.
[0078] At STEP 3, if the value of TN reaches a preset threshold TNH, the user is indicated
that the battery is overheated, and charging is stopped until the battery temperature
is lower than TNH by 3°C, and then charging is resumed (corresponding to 5-8 in Fig.
11).
[0079] With the description of the above embodiments, those having ordinary skills in the
art will clearly understand that the method according to the above embodiments may
be implemented by software and a necessary general hardware platform, and of course
may also be implemented by hardware alone, but in many cases the former is a better
implementation. Based on such an understanding, the technical schemes of the present
invention essentially or a portion thereof contributing to the existing technology
may be embodied in the form of a software product stored in a storage medium (e.g.,
ROM/RAM, magnetic disk, optical disk), including several instructions for causing
a terminal device (which may be a mobile phone, computer, server, or network device,
etc.) to perform the methods described in the various embodiments of the present invention.
[0080] In this embodiment, a charging and discharging control apparatus for a terminal is
also provided, and the apparatus is used to implement the foregoing embodiments and
implementations, and details of which are already described and are not repeated here.
As used below, the term "module" may be a combination of software and/or hardware
that implements a predetermined function. Although the apparatuses described in the
embodiments below are implemented in software, an implementation in hardware or a
combination of software and hardware is also possible and contemplated.
[0081] Fig. 12 is a block diagram showing a configuration of a charge and discharge control
apparatus for a terminal according to an embodiment of the present invention. As shown
in Fig. 12, the apparatus includes: a determination module 122 configured to determine
temperature parameters of one or more batteries in a terminal, where the temperature
parameters include at least one of a cumulative time TS for which the temperature
of the battery is greater than a first preset value, and a continuous time TN for
which the temperature of the battery is greater than a second preset value; and a
control module 124 configured to perform charge and discharge control on the one or
more batteries in the terminal according to the temperature parameters.
[0082] In an alternative embodiment, when the temperature parameters includes TS, the control
module 124 is configured to perform at least one of the following operations: when
it is determined that there is no battery with TS less than or equal to a first cumulative
time threshold in the terminal, indicating that the battery in the terminal needs
to be replaced; and in response to determining that there is a battery with TS less
than or equal to the first cumulative time threshold in the terminal, considering
the battery with TS less than or equal to the first cumulative time threshold as a
battery of first type, and performing a charging or discharging operation using the
battery of first type.
[0083] In an alternative embodiment, when the temperature parameters also includes TN, the
control module 124 is configured to perform charging and discharging operations using
the battery of first type by: when it is determined that the battery or batteries
of first type include a battery with TN less than or equal to a continuous time threshold,
considering the battery with TN less than or equal to the continuous time threshold
as a battery of second type, and performing a charging or discharging operation using
the battery of second type.
[0084] In an alternative embodiment, when the temperature parameters includes TN, the control
module 124 is configured to perform the following operations: when it is determined
that one or more batteries in the terminal include one or more batteries with TN less
than or equal to the continuous time threshold, the one or more batteries meeting
this condition are determined as one or more batteries of second type, and a charging
or discharging operation is performed using the one or more batteries of second type.
[0085] In an alternative embodiment, the control module 124 is configured to perform charging
and discharging operations using the battery or batteries of second type in at least
one of the following manners: when it is determined that the battery or batteries
of second type include a battery with TS less than or equal to a second cumulative
time threshold, the battery with TS less than or equal to the second cumulative time
threshold is considered to be a battery of third type, and a charging or discharging
operation is performed using the battery of third type, where the second cumulative
time threshold is less than the first cumulative time threshold; and when it is determined
that the battery or batteries of second type do not include a battery with TS less
than or equal to the second cumulative time threshold, a charging or discharging operation
is performed according to a predetermined charging and discharging strategy.
[0086] In an alternative embodiment, the control module 124 is configured to perform charging
and discharging operations using the battery or batteries of third type by: when the
number of the batteries of third type is at least two, performing a charging or discharging
operation using the batteries of third type according to a predetermined charging
and discharging strategy.
[0087] In an alternative embodiment, the control module 124 is configured to perform, before
performing charging and discharging operations using the battery or batteries of third
type: when it is determined that the battery or batteries of second type further include
a battery with TS greater than the second cumulative time threshold, and the power
of the battery with TS greater than the second cumulative time threshold exceeds a
power threshold, discharging the battery with TS greater than the second cumulative
time threshold to a level equal to the power threshold.
[0088] In an alternative embodiment, the control module 124 is configured to perform charging
and discharging operations using the battery or batteries of second type by: when
it is determined that the batteries of second type include a battery with TS less
than or equal to the second cumulative time threshold and a battery with TS greater
than the second cumulative time threshold, and the battery with TS greater than the
second cumulative time threshold is in a full power state, performing a discharging
operatio according to a predetermined discharging strategy, where the second cumulative
time threshold is less than the first cumulative time threshold.
[0089] In an alternative embodiment, when it is determined that there is a battery with
TS less than or equal to the cumulative time threshold in the terminal, the control
module 124 is also configured to, when it is determined that the battery or batteries
of first type do not include a battery with TN less than or equal to the continuous
time threshold, indicate that the batteries in the terminal are in a long-term overheating
state.
[0090] In an alternative embodiment, after indicating that the batteries in the terminal
are in a long-term overheating state, the control module 124 is also configured to
perform charging or discharging restriction on the batteries in the terminal; and
when it is determined that the temperature of the batteries after charging or discharging
restriction is reduced below a preset temperature, perform a charging or discharging
operation using the batteries subjected to charging or discharging restriction.
[0091] It should be noted that the above modules may be implemented by software or hardware,
and the latter may be implemented in the following manner, but is not limited thereto:
the above modules locate in a same processor; alternatively, the above modules are
respectively located in different processors, in any combination.
[0092] An embodiment of the present invention also provides a storage medium storing a computer
program, which, when executed, performs the steps in any of the method embodiments
described above.
[0093] In an alternative embodiment, the storage medium includes, but is not limited to,
a USB flash drive, a read-only memory (ROM), a random-access memory (RAM), a removable
hard disk, a magnetic disk, an optical disc, or any other medium capable of storing
a computer program.
[0094] An embodiment of the present invention also provides an electronic apparatus including
a memory and a processor, where the memory stores a computer program which, when executed
by the processor, causes the processor to perform the steps in any of the method embodiments
described above.
[0095] In an alternative embodiment, the electronic apparatus also includes a transmission
device connected to the processor and an input/output device connected to the processor.
[0096] Various implementations of this embodiment can be referred to the implementations
described above in the foregoing embodiments, which are not described herein again.
[0097] One or more embodiments of the present invention are provided to explain an effect
of improving battery safety, reducing failure due to selling, and extending battery
life.
[0098] According to one or more embodiments of the present invention, the charging or discharging
of the terminal is controlled according to the temperature parameters of the battery,
that is to say, when using the terminal to charge and discharge, the temperature parameters
of the battery are considered comprehensively, so that the battery is prevented from
being frequently used for charging or discharging at high temperature, thus solving
a problem in the related technology that when the battery in the terminal is used
for charging and discharging for a long time, the battery may swell and cause a safety
accident. Therefore, the effects of improving battery safety, reducing swelling phenomena,
and ensuring the use safety of the terminal are effectively achieved.
[0099] It will be apparent to those having ordinary skills in the art that the modules or
steps of the present invention described above may be implemented by a general-purpose
computing device, which may be centralized on a single computing device, or distributed
over a network of multiple computing devices, and optionally may be implemented by
program code executable by the computing device, so that they may be stored in a storage
device and executed by the computing device, and in some cases may be implemented
by performing the steps shown or described in a sequence different from that herein,
or may be separately fabricated into individual integrated circuit modules, or some
of them in part may be fabricated into individual integrated circuit modules. Thus,
the invention is not limited to any particular combination of hardware and software.
[0100] The foregoing description is merely a preferred embodiment of the present invention
and is not intended to limit the present invention. Various modifications and variations
may be made to the present invention by those having ordinary skills in the art. Any
modifications, equivalent substitutions, improvements, etc. made within the principles
of the invention shall be within the scope of protection of the invention.
1. A charge and discharge control method for a terminal, comprising:
determining temperature parameters of one or more batteries in the terminal, wherein
the temperature parameters comprise at least one of a cumulative time TS for which
the temperature of the one or more batteries is greater than a first preset value,
and a continuous time TN for which the temperature of the one or more batteries is
greater than a second preset value; and
performing charge and discharge control on the one or more batteries in the terminal
according to the temperature parameters.
2. The method of claim 1, wherein when the temperature parameters comprise TS, performing
charge and discharge control on the one or more batteries in the terminal according
to the temperature parameters comprises at least one of following:
in response to determining that there is no battery with TS less than or equal to
a first cumulative time threshold in the terminal, indicating that the one or more
batteries in the terminal need to be replaced;
in response to determining that there is a battery with TS less than or equal to the
first cumulative time threshold in the terminal, considering one or more batteries
meeting conditions as a battery of first type, and performing a charging or discharging
operation using the battery of first type.
3. The method of claim 2, wherein when the temperature parameters further comprise TN,
performing a charging or discharging operation using the battery of first type comprises:
in response to determining that the battery of first type comprises a battery with
TN less than or equal to a continuous time threshold, considering one or more batteries
meeting conditions as a battery of second type, and performing a charging or discharging
operation using the battery of second type.
4. The method of claim 1, wherein when the temperature parameters comprise TN, performing
charge and discharge control on the one or more batteries in the terminal according
to the temperature parameters comprises:
in response to determining that the one or more batteries comprise a battery with
TN less than or equal to the continuous time threshold, considering one or more batteries
meeting conditions as a battery of second type, and performing a charging or discharging
operation using the battery of second type.
5. The method of claim 3 or 4, wherein performing a charging or discharging operation
using the battery of second type comprises:
in response to determining that the battery of second type comprise a battery with
TS less than or equal to a second cumulative time threshold, considering one or more
batteries meeting conditions as a battery of third type, and performing a charging
or discharging operation using the battery of third type; and
in response to determining that the battery of second type do not comprise a battery
with TS less than or equal to the second cumulative time threshold, performing a charging
or discharging operation according to a predetermined charging and discharging strategy.
6. The method of claim 5, wherein performing a charging or discharging operation using
the battery of third type comprises:
when there are at least two batteries of third type, performing a charging or discharging
operation using the batteries of third type according to a predetermined charging
and discharging strategy.
7. The method of claim 5, wherein before performing a charging or discharging operation
using the battery of third type, the method further comprises:
in response to determining that the battery of second type further comprises a battery
with TS greater than the second cumulative time threshold, and the power of the battery
with TS greater than the second cumulative time threshold exceeds a power threshold,
discharging one or more batteries meeting conditions to the power threshold.
8. The method of claim 3 or 4, wherein performing a discharging operation using the battery
of second type comprises:
in response to determining that the battery of second type comprise a battery with
TS less than or equal to the second cumulative time threshold and a battery with TS
greater than the second cumulative time threshold, and the battery with TS greater
than the second cumulative time threshold is fully charged, performing a discharging
operation according to a predetermined discharging strategy.
9. The method of claim 2, wherein in response to determining that there is a battery
with TS less than or equal to the cumulative time threshold in the terminal, the method
further comprises:
in response to determining that the battery of first type do not comprise a battery
with TN less than or equal to the continuous time threshold, indicating that the batteries
in the terminal are in a long-term overheating state.
10. The method of claim 9, wherein after indicating that the batteries in the terminal
are in a long-term overheating state, the method further comprises:
performing charging or discharging restriction on the batteries in the terminal; and
in response to determining that the temperature of the batteries after charging or
discharging restriction is reduced below a predetermined temperature, performing a
charging or discharging operation using the batteries subjected to charging or discharging
restriction.
11. A charge and discharge control apparatus for a terminal, comprising:
a determination module configured to determine temperature parameters of one or more
batteries in a terminal, wherein the temperature parameters comprise at least one
of a cumulative time TS for which the temperature of the one or more batteries is
greater than a first preset value, and a continuous time TN for which the temperature
of the one or more batteries is greater than a second preset value; and
a control module configured to perform charge and discharge control on the one or
more batteries in the terminal according to the temperature parameters.
12. The apparatus of claim 11, wherein the control module is configured to perform at
least one of the following operations when the temperature parameters comprise TS:
in response to determining that there is no battery with TS less than or equal to
a first cumulative time threshold in the terminal, indicating that the one or more
batteries in the terminal need to be replaced; and
in response to determining that there is a battery with TS less than or equal to the
first cumulative time threshold in the terminal, considering one or more batteries
meeting conditions as a battery of first type, and performing a charging or discharging
operation using the battery of first type.
13. A storage medium storing a computer program which, when executed, performs the method
of any one of claims 1 to 10.
14. An electronic apparatus comprising a memory and a processor, wherein the memory stores
a computer program which, when executed by the processor, causes the processor to
perform the method of any one of claims 1 to 10.