[go: up one dir, main page]

CN110365084B - Charging control method, device, terminal and storage medium - Google Patents

Charging control method, device, terminal and storage medium Download PDF

Info

Publication number
CN110365084B
CN110365084B CN201910724711.6A CN201910724711A CN110365084B CN 110365084 B CN110365084 B CN 110365084B CN 201910724711 A CN201910724711 A CN 201910724711A CN 110365084 B CN110365084 B CN 110365084B
Authority
CN
China
Prior art keywords
battery
charging
target
application program
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910724711.6A
Other languages
Chinese (zh)
Other versions
CN110365084A (en
Inventor
张海平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201910724711.6A priority Critical patent/CN110365084B/en
Publication of CN110365084A publication Critical patent/CN110365084A/en
Application granted granted Critical
Publication of CN110365084B publication Critical patent/CN110365084B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/0013Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries acting upon several batteries simultaneously or sequentially
    • H02J7/0086
    • H02J7/0091

Landscapes

  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Charge And Discharge Circuits For Batteries Or The Like (AREA)

Abstract

The embodiment of the application provides a charging control method, a charging control device, a terminal and a storage medium. The method is applied to a terminal, and the terminal comprises a first battery and a second battery; the method comprises the following steps: detecting whether an application program in a running state exists or not; if the application program in the running state exists, detecting a target battery for supplying power to the application program, wherein the target battery comprises a first battery or a second battery; and if the battery residual capacity corresponding to the target battery is smaller than the battery residual capacity corresponding to the other battery, stopping supplying power to the application program through the target battery, charging the target battery, and supplying power to the application program through the other battery. The technical scheme that this application embodiment provided has prolonged battery life to a certain extent, and helps promoting the charging safety.

Description

Charging control method, device, terminal and storage medium
Technical Field
The embodiment of the application relates to the technical field of terminals, in particular to a charging control method, a charging control device, a terminal and a storage medium.
Background
With the development of terminal technology, people have higher and higher requirements on the cruising ability of mobile terminals.
In the related art, the endurance of the mobile phone is improved by arranging two batteries in the mobile phone. However, charging both batteries simultaneously may result in excessive battery temperature and a loss of battery life.
Disclosure of Invention
The embodiment of the application provides a charging control method, a charging control device, a terminal and a storage medium. The technical scheme is as follows:
in one aspect, an embodiment of the present application provides a charging control method, which is applied to a terminal, where the terminal includes a first battery and a second battery; the method comprises the following steps:
detecting whether an application program in a running state exists or not;
if the application program in the running state exists, detecting a target battery for supplying power to the application program, wherein the target battery comprises the first battery or the second battery;
and if the residual battery capacity corresponding to the target battery is smaller than the residual battery capacity corresponding to another battery, stopping supplying power to the application program through the target battery, charging the target battery, and supplying power to the application program through the other battery.
In another aspect, an embodiment of the present application provides a charge control device, which is applied to a terminal, where the terminal includes a first battery and a second battery; the device comprises:
the application detection module is used for detecting whether an application program in a running state exists or not;
the battery detection module is used for detecting a target battery for supplying power to an application program if the application program in a running state exists, wherein the target battery comprises the first battery or the second battery;
and the battery charging module is used for stopping supplying power to the application program through the target battery, charging the target battery and supplying power to the application program through the other battery if the battery residual capacity corresponding to the target battery is smaller than the battery residual capacity corresponding to the other battery.
In still another aspect, an embodiment of the present application provides a terminal, where the terminal includes a processor and a memory, where the memory stores a computer program, and the computer program is loaded and executed by the processor to implement the charging control method according to the above aspect.
In still another aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored, and the computer program is loaded and executed by a processor to implement the charging control method according to the above aspect.
The technical scheme provided by the embodiment of the application can bring the following beneficial effects:
when the terminal includes first battery and second battery, through confirming the target battery to the application power supply that is in the running state, when the battery residual capacity that the target battery corresponds is less than the battery residual capacity that another battery corresponds, charge the target battery, and supply power to the application through another battery, realized rationally charging the battery, effectively avoided because charging all batteries simultaneously, and the battery temperature that causes is higher, harm battery life's problem, the technical scheme that this application embodiment provided has prolonged battery life to a certain extent, and help promoting the charging safety.
Drawings
FIG. 1 is a schematic diagram of a battery provided by one embodiment of the present application;
fig. 2 is a flowchart of a charging control method according to an embodiment of the present application;
fig. 3 is a flowchart of a charging control method according to another embodiment of the present application;
FIG. 4 is a schematic diagram of a charging circuit provided by one embodiment of the present application;
fig. 5 is a block diagram of a charge control device according to an embodiment of the present application;
fig. 6 is a block diagram of a charge control device according to another embodiment of the present application;
fig. 7 is a block diagram of a terminal according to an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
In the method provided by the embodiment of the application, the execution main body of each step may be a terminal. The terminal may be an electronic device such as a mobile phone, a tablet computer, an e-book reader, a multimedia playing device, a wearable device, a laptop portable computer, and the like.
As shown in fig. 1, the terminal 10 includes a first battery 11 and a second battery 12. The first battery 11 may include at least one battery, and the second battery 12 may include at least one battery. The type of the battery can include a normal battery in a normal charging mode, and also can include a quick charging battery in a quick charging mode (the charging current or the charging voltage in the quick charging mode is larger). Illustratively, the general battery may be a lithium battery, and the fast charge battery may be a graphene battery. The lithium battery is a kind of battery using manganese dioxide as positive electrode material, metal lithium or its alloy metal as negative electrode material, and using non-aqueous electrolyte solution. Graphene is a honeycomb-shaped planar thin film formed by carbon atoms in an sp2 hybridization manner, is a quasi-two-dimensional material with the thickness of only one atomic layer, and is also called monoatomic layer graphite. The graphene battery is a new energy battery developed by utilizing the characteristic that lithium ions rapidly shuttle and move in a large quantity between the surface of graphene and an electrode. The graphene battery has the characteristics of high conductivity, high strength, ultra-light weight and the like. The types of the first battery 11 and the second battery 12 may be identical or may not be identical. For example, the first battery 11 or the second battery 12 may be both normal batteries or fast-charging batteries; the first battery 11 may be a normal battery, and the second battery 12 may be a quick charge battery; alternatively, the first battery 11 may be a fast charging battery, and the second battery 12 may be a normal battery. The present embodiment does not limit the types of the first battery 11 and the second battery 12 described above.
It should be noted that the terminal 10 may include not only the first battery 11 and the second battery 12, but also other batteries. The number of batteries included in the terminal is not limited in the embodiments of the present application.
Hereinafter, an embodiment of the present application will be described with only the terminal 10 including the first battery 11 and the second battery 12.
Referring to fig. 2, a flowchart of a charging control method according to an embodiment of the present application is shown. In the present embodiment, the method is mainly exemplified as being applied to a terminal including a first battery and a second battery. The method may include the following steps.
Step 201, detecting whether an application program in a running state exists.
The application may refer to any one of applications installed in the terminal. The application may be a system application or a third party application. In the embodiment of the present application, the type of the application is not limited, and for example, the application may be a social application, a video application, a photo application, a game application, an instant messaging application, or the like. Illustratively, the terminal detects whether there is an application in a foreground running state.
Step 202, if there is an application program in a running state, detecting a target battery for supplying power to the application program, where the target battery includes a first battery or a second battery.
For example, the target battery may be determined by the user in advance, for example, the user may set a correspondence between the application and the battery in a battery option menu of the terminal in advance. For example, assuming that the terminal is installed with the application 1, the application 2, the application 3 and the application 4, the user may set a first battery to supply power to the application 1 and the application 4 and a second battery to supply power to the application 2 and the application 3 in a battery option menu of the terminal. When the application 1 is running, the terminal may determine that the target battery is the first battery.
In the embodiment of the present application, a battery that supplies power to a certain application refers to a battery that supplies power to a terminal when the application is in an operating state.
In step 203, if the remaining battery capacity corresponding to the target battery is less than the remaining battery capacity corresponding to the other battery, the power supply to the application program through the target battery is stopped, the target battery is charged, and the power supply to the application program through the other battery is stopped.
The other battery is a battery different from the target battery, and when the target battery is the first battery, the other battery is the second battery; when the target battery is the second battery, the other battery is the first battery.
Still taking the above example as an example, assume that the target battery is the first battery and the other battery is the second battery. And if the residual battery capacity corresponding to the first battery is less than the residual battery capacity corresponding to the second battery, stopping supplying power to the application 1 through the first battery, charging the first battery, and supplying power to the application 1 through the second battery. When the residual capacity corresponding to the target battery is smaller than the residual capacity corresponding to the other battery, the target battery is charged, and the application program is powered by the other battery, so that the service life of the target battery is prolonged under the condition of ensuring the power supply time.
To sum up, in the technical scheme provided by the embodiment of the application, when the terminal includes the first battery and the second battery, through determining the target battery for supplying power to the application in the running state, when the battery residual capacity corresponding to the target battery is less than the battery residual capacity corresponding to another battery, the target battery is charged, and the application is supplied with power through another battery, thereby reasonably charging the battery, effectively avoiding the problems that the battery temperature is higher and the battery life is damaged because all batteries are charged at the same time, and prolonging the service life of the battery to a certain extent by the technical scheme provided by the embodiment of the application, and being beneficial to improving the charging safety.
In addition, if the battery is simultaneously supplying power while charging, the battery may be damaged to some extent. In the technical scheme provided by the embodiment of the application, the rechargeable battery and the power supply battery are not the same battery, so that the problem that the battery is damaged due to simultaneous charging and power supply is effectively avoided.
In addition, when the residual battery capacity corresponding to the target battery is smaller than the residual battery capacity corresponding to the other battery, the target battery is charged, and the application program is powered by the other battery, so that the power supply time is ensured, and the service life of the target battery is prolonged.
Please refer to fig. 3, which shows a flowchart of a charging control method according to another embodiment of the present application. In the present embodiment, the method is mainly exemplified as being applied to a terminal including a first battery and a second battery. The method may include the following steps.
Step 301, detecting whether an application program in a running state exists; if the application program in the running state exists, the execution is started from step 302; if there is no application program in the running state, the execution is started from step 307.
Step 302, a target battery for supplying power to an application program is detected, wherein the target battery comprises a first battery or a second battery.
Step 303, detecting whether the battery residual capacity corresponding to the target battery is smaller than the battery residual capacity corresponding to another battery; if the remaining battery capacity corresponding to the target battery is less than the remaining battery capacity corresponding to another battery, go to step 304; if the remaining battery capacity of the target battery is greater than that of another battery, the process starts from step 305.
At step 304, power to the application program is stopped from being supplied through the target battery, the target battery is charged, and power is supplied to the application program through another battery.
Step 305, another battery is charged.
When the remaining battery capacity corresponding to the target battery is greater than the remaining battery capacity corresponding to the other battery, the power supply duration of the target battery is greater than the power supply duration of the other battery, at this time, the application program can be continuously supplied through the target battery, and the other battery is charged.
And step 306, stopping charging the other battery, charging the target battery and supplying power to the application program through the other battery when the remaining battery capacity corresponding to the other battery meets the preset condition.
The preset condition may be that when the remaining battery power corresponding to the other battery is greater than the preset power or the remaining battery power corresponding to the other battery is the total power corresponding to the other battery, the other battery is stopped to be charged, the target battery is charged, and the application program is supplied with power through the other battery. By switching the power supply mode of the battery, the defect that the service life of the battery is shortened by charging and discharging is avoided.
Step 307, determining respective charging currents of the first battery and the second battery.
In one example, according to the electric quantity to be charged corresponding to the first battery and the target charging time length, determining the charging current corresponding to the first battery; and determining the charging current corresponding to the second battery according to the electric quantity to be charged corresponding to the second battery and the target charging time length.
For example, the amount of power to be charged is the total power corresponding to the battery — the remaining power corresponding to the battery. For example, the total power corresponding to the first battery is 3000mAh, the remaining power corresponding to the first battery is 2000mAh, and the to-be-charged power corresponding to the first battery is 1000 mAh.
And the charging current corresponding to the battery is equal to the electric quantity to be charged corresponding to the battery/the target charging time length. For example, the amount of electricity to be charged corresponding to the first battery is 1000mAh, the target charging time is 1h, and the charging current corresponding to the first battery is 1000 mA.
The target charging time period may be set by a user, or may be a default charging time period. The charging time corresponding to the first battery is consistent with the charging time corresponding to the second battery, so that the first battery and the second battery can be fully charged at the same time, and the charging time is saved.
In another example, the charging current corresponding to each of the first battery and the second battery is determined according to the charging association information corresponding to each of the first battery and the second battery.
In the embodiment of the present application, the charging-related information refers to information that affects charging of the battery. The charging correlation information may include at least one of: battery remaining capacity, battery charging speed, battery discharging speed, and battery temperature. The remaining amount of the battery may be determined according to an electricity meter within the battery, which is used to measure the remaining amount of the battery. The charging speed of the battery is related to the charging current of the battery, the charging speed of the battery is higher when the charging current of the battery is higher, or the charging speed of the battery can be determined according to the type of the battery, and when the battery is a common battery, the charging speed is lower; when the battery is a quick-charging battery, the charging speed is higher. The discharge rate of the battery is related to the discharge voltage of the battery, and the faster the discharge voltage of the battery changes, the faster the discharge rate of the battery. The battery temperature may be collected by a temperature sensor.
For example, the terminal may determine the charging currents corresponding to the first battery and the second battery according to a ratio of charging related information corresponding to the first battery to charging related information corresponding to the second battery; or, the terminal may detect whether the charging correlation information corresponding to each of the first battery and the second battery meets a target condition, and if the target condition is met, increase the charging current corresponding to the first battery and decrease the charging current corresponding to the second battery.
Optionally, the terminal determines the charging currents corresponding to the first battery and the second battery according to a ratio of the charging related information corresponding to the first battery to the charging related information corresponding to the second battery.
Illustratively, the charging-related information includes a battery remaining capacity, and the terminal determines that a ratio of a charging current corresponding to the first battery to a charging current corresponding to the second battery matches the ratio of the battery remaining capacity corresponding to the first battery to the battery remaining capacity corresponding to the second battery. The ratio of the charging current corresponding to the first battery to the charging current corresponding to the second battery is matched with the ratio of the remaining battery capacity corresponding to the first battery to the remaining battery capacity corresponding to the second battery, and the method comprises the following steps: the ratio of the charging current corresponding to the first battery to the charging current corresponding to the second battery is consistent with the ratio of the remaining battery capacity corresponding to the first battery to the remaining battery capacity corresponding to the second battery (at this time, the total charging current corresponding to the first battery and the second battery can be exactly distributed to the respective charging currents corresponding to the first battery and the second battery according to the above ratio), or the ratio of the charging current corresponding to the first battery to the charging current corresponding to the second battery is close to the ratio of the remaining battery capacity corresponding to the first battery to the remaining battery capacity corresponding to the second battery. Assuming that the remaining battery capacity of the first battery is 50, the remaining battery capacity of the second battery is 70, and the ratio of the remaining battery capacity of the first battery to the remaining battery capacity of the second battery is 5/7. Assuming that the total charging current corresponding to the first battery and the second battery is 12, and the ratio of the charging current corresponding to the first battery to the charging current corresponding to the second battery can be 5/7, the charging current corresponding to the first battery is 5, and the charging current corresponding to the second battery is 7. Assuming that the total charging current corresponding to the first battery and the second battery is 13, at this time, the charging current corresponding to the first battery and the charging current corresponding to the second battery may be 5.5/7.5, and the charging current corresponding to the first battery is 5.5 and the charging current corresponding to the second battery is 7.5.
Illustratively, the charging-related information includes a battery charging speed, and the terminal determines that a ratio of a charging current corresponding to the first battery to a charging current corresponding to the second battery matches the ratio of the battery charging speed corresponding to the first battery to the battery charging speed corresponding to the second battery. The ratio of the charging current corresponding to the first battery to the charging current corresponding to the second battery is matched with the ratio of the charging speed of the battery corresponding to the first battery to the charging speed of the battery corresponding to the second battery, and the method comprises the following steps: the ratio of the charging current corresponding to the first battery to the charging current corresponding to the second battery is consistent with the ratio of the charging speed of the battery corresponding to the first battery to the charging speed of the battery corresponding to the second battery (at this time, the total charging current corresponding to the first battery and the second battery can be distributed to the charging current corresponding to the first battery and the second battery according to the ratio), or the ratio of the charging current corresponding to the first battery to the charging current corresponding to the second battery is close to the ratio of the charging speed of the battery corresponding to the first battery to the charging speed of the battery corresponding to the second battery.
Illustratively, the charging-related information includes a battery discharging speed, and the terminal determines that a ratio of a charging current corresponding to the first battery to a charging current corresponding to the second battery matches a ratio of a battery discharging speed corresponding to the first battery to a battery discharging speed corresponding to the second battery. The ratio of the charging current corresponding to the first battery to the charging current corresponding to the second battery is matched with the ratio of the discharging speed of the battery corresponding to the first battery to the discharging speed of the battery corresponding to the second battery, and the method comprises the following steps: the ratio of the charging current corresponding to the first battery to the charging current corresponding to the second battery is consistent with the ratio of the battery discharging speed corresponding to the first battery to the battery discharging speed corresponding to the second battery (at this time, the total charging current corresponding to the first battery and the second battery can be distributed to the charging current corresponding to the first battery and the second battery according to the ratio), or the ratio of the charging current corresponding to the first battery to the charging current corresponding to the second battery is close to the ratio of the battery discharging speed corresponding to the first battery to the battery discharging speed corresponding to the second battery.
Illustratively, the charging-related information includes a battery temperature, and the terminal determines that a ratio of a charging current corresponding to the first battery to a charging current corresponding to the second battery matches an inverse of a ratio of a battery temperature corresponding to the first battery to a battery temperature corresponding to the second battery. The inverse match of the ratio of the charging current corresponding to the first battery to the charging current corresponding to the second battery to the ratio of the battery temperature corresponding to the first battery to the battery temperature corresponding to the second battery comprises: the ratio of the charging current corresponding to the first battery to the charging current corresponding to the second battery is consistent with the reciprocal of the ratio of the battery temperature corresponding to the first battery to the battery temperature corresponding to the second battery (at this time, the total charging current corresponding to the first battery and the second battery can be distributed to the charging current corresponding to the first battery and the second battery according to the ratio), or the ratio of the charging current corresponding to the first battery to the charging current corresponding to the second battery is close to the reciprocal of the ratio of the battery temperature corresponding to the first battery to the battery temperature corresponding to the second battery.
It should be noted that the charging correlation information may include multiple items, and the terminal may determine the charging currents corresponding to the first battery and the second battery, respectively, according to a ratio of the multiple items of charging correlation information. Illustratively, the different charging-related information corresponds to respective weights, such as a remaining battery capacity corresponding to a first weight, a charging rate of the battery corresponding to a second weight, a discharging rate of the battery corresponding to a third weight, and a temperature of the battery corresponding to a fourth weight. The first weight, the second weight, the third weight and the fourth weight may be the same or different. Assuming that the charging correlation information includes the remaining battery capacity and the charging speed of the battery, the terminal may multiply the ratio of the remaining battery capacity corresponding to the first battery to the remaining battery capacity corresponding to the second battery by the first weight to obtain a first ratio; multiplying the ratio of the battery charging speed corresponding to the first battery to the battery charging speed corresponding to the second battery by a second weight to obtain a second ratio; and adding the first ratio and the second ratio to obtain a target ratio. The terminal may determine a ratio of the charging current corresponding to the first battery to the charging current corresponding to the second battery, matching the target ratio.
Optionally, the terminal detects whether the charging associated information corresponding to the first battery and the second battery respectively meets a target condition; if the target condition is met, the charging current corresponding to the first battery is increased, and the charging current corresponding to the second battery is reduced; wherein the target conditions include at least one of: the battery residual capacity corresponding to the first battery is larger than the battery residual capacity corresponding to the second battery, the charging speed corresponding to the first battery is larger than the battery charging speed corresponding to the second battery, the battery discharging speed corresponding to the first battery is larger than the battery discharging speed corresponding to the second battery, and the battery temperature corresponding to the first battery is lower than the battery temperature corresponding to the second battery.
For example, the charging correlation information may include a plurality of items, and the terminal may determine the charging current corresponding to each of the first battery and the second battery according to the plurality of items of charging correlation information. For example, if the charging-related information includes a remaining battery capacity and a charging speed of the battery, the target condition includes that the remaining battery capacity corresponding to the first battery is greater than the remaining battery capacity corresponding to the second battery, and the charging speed corresponding to the first battery is greater than the charging speed corresponding to the second battery.
And 308, determining charging circuits corresponding to the first battery and the second battery according to the charging currents corresponding to the first battery and the second battery.
Illustratively, the charging circuit includes at least one charging sub-circuit therein. Optionally, the number of charging sub-circuits corresponding to the first battery is determined, and the number of charging sub-circuits corresponding to the second battery is determined according to the charging currents corresponding to the first battery and the second battery respectively. Each charging sub-circuit may or may not be identical.
Step 309, charging the first battery and the second battery through the charging circuits corresponding to the first battery and the second battery respectively.
As shown in fig. 4, the terminal 10 includes a first battery 11 and a second battery 12. Each charging sub-circuit corresponds to a switch, and after the charging circuit corresponding to each of the first battery 11 and the second battery 12 is determined, the switch corresponding to the charging sub-circuit included in the charging circuit corresponding to the first battery 11 is closed, and the switch corresponding to the charging sub-circuit included in the charging circuit corresponding to the second battery 12 is closed. The first battery 11 and the second battery 12 are charged by their respective charging circuits.
To sum up, in the technical scheme provided by the embodiment of the application, when the application program in the running state does not exist in the terminal, the charging time is saved and the charging efficiency is improved by simultaneously charging the first battery and the second battery.
In addition, according to the charging associated information corresponding to the first battery and the second battery, the charging current corresponding to the first battery and the second battery is determined, so that the charging circuit corresponding to the first battery and the charging circuit corresponding to the second battery are determined, the first battery and the second battery are charged reasonably, and the charging efficiency of the first battery and the charging efficiency of the second battery are guaranteed.
In addition, the charging time corresponding to the first battery and the charging time corresponding to the second battery are the same, so that the first battery and the second battery can be fully charged at the same time, and the charging time is saved.
In addition, the charging current corresponding to each of the first battery and the second battery is determined according to the ratio of the charging related information corresponding to the first battery to the charging related information corresponding to the second battery, so that the determination of the charging current is more accurate.
In addition, whether the charging relevance corresponding to the first battery and the charging relevance corresponding to the second battery meet the target condition or not is detected, if the target condition is met, the charging current corresponding to the first battery is increased, and the charging current corresponding to the second battery is reduced.
In an exemplary embodiment, a charging control method provided in an embodiment of the present application may include the following steps:
1. detecting whether an application program in a running state exists or not;
2. if the application program in the running state exists, detecting a target battery for supplying power to the application program, wherein the target battery comprises a first battery or a second battery;
3. acquiring the power consumption of the application program;
the power consumption of the application may be tested for each application and stored in the terminal when the application is on the market. For example, the terminal may store an identifier of the application program corresponding to the power consumption amount of the application program, the identifier of the application program being used to uniquely indicate the application program, and different application programs having different identifiers. For example, the identification of the application may be a package name of the application (simply "application package name") or other unique identifier.
Alternatively, when the power consumption amount of the application is greater than a preset power consumption amount (e.g., 100mA), the following steps are performed.
4. Determining the power supply time of the target battery according to the power consumption of the application program and the battery residual capacity corresponding to the target battery;
optionally, the power supply time of the target battery is equal to the remaining battery capacity/the power consumption of the application program corresponding to the target battery. Assuming that the remaining battery capacity of the target battery is 2000mAh, and the power consumption of the application program is 500mA, the power supply time of the target battery is 4 h.
5. If the power supply time of the target battery is longer than the charging time of the other battery, charging the other battery;
assuming that the target battery is the first battery, the other battery is the second battery. And if the power supply time of the first battery is 4h and the charging time of the second battery is 2h, charging the second battery and supplying power to the application program through the first battery.
6. And if the power supply time of the target battery is shorter than the charging time of the other battery, stopping supplying power to the application program through the target battery, and charging the target battery.
Assuming that the target battery is the first battery, the other battery is the second battery. And if the power supply time of the first battery is 2h and the charging time of the second battery is 3h, charging the first battery and supplying power to the application program through the second battery.
Schematically, it is assumed that the first battery is a fast charge battery and the second battery is a normal battery. When the first battery is charged, the background application program can also consume the electric quantity of the second battery, so that the electric quantity of the second battery is not excessively consumed, the electric consumption of the background application program is low, and the background application program can be supplied with power through the first battery.
To sum up, in the technical scheme provided by the embodiment of the application, the application program is powered by selecting the battery with long power supply time, so that the normal operation of the application program is ensured.
The following are embodiments of the apparatus of the present application that may be used to perform embodiments of the method of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method of the present application.
Referring to fig. 5, a block diagram of a charging control apparatus according to an embodiment of the present application is shown. The device has the functions of realizing the method examples, and the functions can be realized by hardware or by hardware executing corresponding software. The apparatus 500 may be applied in a terminal including a first battery and a second battery; the apparatus 500 comprises: an application detection module 510, a battery detection module 520, and a battery charging module 530.
The application detection module 510 is configured to detect whether an application program in a running state exists.
The battery detection module 520 is configured to detect a target battery that supplies power to an application program if the application program in a running state exists, where the target battery includes the first battery or the second battery.
The battery charging module 530 is configured to stop supplying power to the application program through the target battery, charge the target battery, and supply power to the application program through the other battery if the remaining battery power corresponding to the target battery is less than the remaining battery power corresponding to the other battery.
To sum up, in the technical scheme provided by the embodiment of the application, when the terminal includes the first battery and the second battery, through determining the target battery for supplying power to the application in the running state, when the battery residual capacity corresponding to the target battery is less than the battery residual capacity corresponding to another battery, the target battery is charged, and the application is supplied with power through another battery, thereby reasonably charging the battery, effectively avoiding the problems that the battery temperature is higher and the battery life is damaged because all batteries are charged at the same time, and prolonging the service life of the battery to a certain extent by the technical scheme provided by the embodiment of the application, and being beneficial to improving the charging safety.
Optionally, the battery charging module 530 is further configured to charge the other battery if the remaining battery capacity corresponding to the target battery is greater than the remaining battery capacity corresponding to the other battery.
Optionally, the battery charging module 530 is further configured to stop charging the other battery, charge the target battery, and supply power to the application program through the other battery when the remaining battery capacity corresponding to the other battery meets a preset condition.
Optionally, as shown in fig. 6, the apparatus 500 further includes: a power consumption amount acquisition module 540 and a duration determination module 550.
The power consumption obtaining module 540 is configured to obtain power consumption of the application.
The duration determining module 550 is configured to determine the power supply duration of the target battery according to the power consumption of the application program and the battery remaining capacity corresponding to the target battery.
The battery charging module 530 is further configured to charge the other battery if the power supply time of the target battery is longer than the charging time of the other battery.
The battery charging module 530 is further configured to stop supplying power to the application program through the target battery and charge the target battery if the power supply duration of the target battery is less than the charging duration of the other battery.
Optionally, the apparatus 500 further includes: a current determination module 560 and a circuit determination module 570.
The current determining module 560 is configured to determine charging currents corresponding to the first battery and the second battery, if there is no application program in a running state.
The circuit determining module 570 is configured to determine the charging circuits corresponding to the first battery and the second battery according to the charging currents corresponding to the first battery and the second battery, respectively.
The battery charging module 530 is further configured to charge the first battery and the second battery through respective charging circuits corresponding to the first battery and the second battery.
Optionally, the current determining module 560 is configured to:
determining a charging current corresponding to the first battery according to the electric quantity to be charged and the target charging time length corresponding to the first battery;
and determining the charging current corresponding to the second battery according to the electric quantity to be charged corresponding to the second battery and the target charging time length.
Optionally, the current determining module 560 is configured to:
and determining the charging current corresponding to each of the first battery and the second battery according to the charging associated information corresponding to each of the first battery and the second battery, wherein the charging associated information is information influencing battery charging.
Optionally, the current determining module 560 is configured to:
and determining the charging current corresponding to the first battery and the charging current corresponding to the second battery according to the ratio of the charging related information corresponding to the first battery to the charging related information corresponding to the second battery.
Optionally, the current determining module 560 is configured to:
detecting whether charging associated information corresponding to the first battery and the second battery respectively meets a target condition;
if the target condition is met, increasing the charging current corresponding to the first battery, and decreasing the charging current corresponding to the second battery; wherein the target condition comprises at least one of: the battery residual capacity corresponding to the first battery is larger than the battery residual capacity corresponding to the second battery, the charging speed corresponding to the first battery is larger than the battery charging speed corresponding to the second battery, the battery discharging speed corresponding to the first battery is larger than the battery discharging speed corresponding to the second battery, and the battery temperature corresponding to the first battery is lower than the battery temperature corresponding to the second battery.
It should be noted that, when the apparatus provided in the foregoing embodiment implements the functions thereof, only the division of the functional modules is illustrated, and in practical applications, the functions may be distributed by different functional modules according to needs, that is, the internal structure of the apparatus may be divided into different functional modules to implement all or part of the functions described above. In addition, the apparatus and method embodiments provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments for details, which are not described herein again.
Referring to fig. 7, a block diagram of a terminal according to an embodiment of the present application is shown. The terminal may be a mobile phone, a tablet computer, an electronic book reading device, a multimedia playing device, a wearable device, or other portable electronic devices.
The terminal in the embodiment of the present application may include one or more of the following components: a processor 710 and a memory 720.
Processor 710 may include one or more processing cores. The processor 710 connects various parts within the overall terminal using various interfaces and lines, performs various functions of the terminal and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 720 and calling data stored in the memory 720. Alternatively, the processor 710 may be implemented in hardware using at least one of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 710 may integrate one or more of a Central Processing Unit (CPU), a modem, and the like. Wherein, the CPU mainly processes an operating system, an application program and the like; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 710, but may be implemented by a single chip.
Optionally, the processor 710, when executing the program instructions in the memory 720, implements the charging control method provided by the various method embodiments described above.
The Memory 720 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). Optionally, the memory 720 includes a non-transitory computer-readable medium. The memory 720 may be used to store instructions, programs, code sets, or instruction sets. The memory 720 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function, instructions for implementing the various method embodiments described above, and the like; the storage data area may store data created according to the use of the terminal, and the like.
The structure of the terminal described above is only illustrative, and in actual implementation, the terminal may include more or less components, such as: a display screen or a bluetooth module, etc., which is not limited in this embodiment.
Those skilled in the art will appreciate that the configuration shown in fig. 7 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components may be used.
In an exemplary embodiment, there is also provided a computer-readable storage medium having stored therein a computer program, which is loaded and executed by a processor to implement the above-described charge control method.
In an exemplary embodiment, there is also provided a computer program product for implementing the above-described charge control method when the computer program product is executed.
The above description is only exemplary of the present application and should not be taken as limiting the present application, and any modifications, equivalents, improvements and the like that are made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (11)

1. The charging control method is applied to a terminal, wherein the terminal comprises a first battery and a second battery; the method comprises the following steps:
detecting whether an application program in a running state exists or not;
if the application program in the running state exists, detecting a target battery for supplying power to the application program, wherein the target battery comprises the first battery or the second battery;
if the battery residual capacity corresponding to the target battery is smaller than the battery residual capacity corresponding to another battery, stopping supplying power to the application program through the target battery, charging the target battery, and supplying power to the application program through the other battery;
if the application program in the running state does not exist, determining charging currents corresponding to the first battery and the second battery respectively;
determining charging circuits corresponding to the first battery and the second battery according to the charging currents corresponding to the first battery and the second battery respectively;
and charging the first battery and the second battery through the charging circuits corresponding to the first battery and the second battery respectively.
2. The method of claim 1, wherein after detecting the target battery powering the application, further comprising:
and if the residual battery capacity corresponding to the target battery is larger than the residual battery capacity corresponding to the other battery, charging the other battery.
3. The method of claim 2, wherein after charging the another battery, further comprising:
and when the residual battery capacity corresponding to the other battery meets a preset condition, stopping charging the other battery, charging the target battery, and supplying power to the application program through the other battery.
4. The method of claim 1, wherein after detecting the target battery powering the application, further comprising:
acquiring the power consumption of the application program;
determining the power supply time of the target battery according to the power consumption of the application program and the battery residual capacity corresponding to the target battery;
if the power supply time of the target battery is longer than the charging time of the other battery, charging the other battery;
and if the power supply time of the target battery is shorter than the charging time of the other battery, stopping supplying power to the application program through the target battery, and charging the target battery.
5. The method of claim 1, wherein determining the charging current for each of the first battery and the second battery comprises:
determining a charging current corresponding to the first battery according to the electric quantity to be charged and the target charging time length corresponding to the first battery;
and determining the charging current corresponding to the second battery according to the electric quantity to be charged corresponding to the second battery and the target charging time length.
6. The method of claim 1, wherein determining the charging current for each of the first battery and the second battery comprises:
and determining the charging current corresponding to each of the first battery and the second battery according to the charging associated information corresponding to each of the first battery and the second battery, wherein the charging associated information is information influencing battery charging.
7. The method of claim 6, wherein determining the charging current corresponding to each of the first battery and the second battery according to the charging correlation information corresponding to each of the first battery and the second battery comprises:
and determining the charging current corresponding to the first battery and the charging current corresponding to the second battery according to the ratio of the charging related information corresponding to the first battery to the charging related information corresponding to the second battery.
8. The method of claim 6, wherein determining the charging current corresponding to each of the first battery and the second battery according to the charging correlation information corresponding to each of the first battery and the second battery comprises:
detecting whether charging associated information corresponding to the first battery and the second battery respectively meets a target condition;
if the target condition is met, increasing the charging current corresponding to the first battery, and decreasing the charging current corresponding to the second battery; wherein the target condition comprises at least one of: the battery residual capacity corresponding to the first battery is larger than the battery residual capacity corresponding to the second battery, the charging speed corresponding to the first battery is larger than the battery charging speed corresponding to the second battery, the battery discharging speed corresponding to the first battery is larger than the battery discharging speed corresponding to the second battery, and the battery temperature corresponding to the first battery is lower than the battery temperature corresponding to the second battery.
9. The charging control device is characterized by being applied to a terminal, wherein the terminal comprises a first battery and a second battery; the device comprises:
the application detection module is used for detecting whether an application program in a running state exists or not;
the battery detection module is used for detecting a target battery for supplying power to an application program if the application program in a running state exists, wherein the target battery comprises the first battery or the second battery;
the battery charging module is used for stopping supplying power to the application program through the target battery, charging the target battery and supplying power to the application program through the other battery if the battery residual capacity corresponding to the target battery is smaller than the battery residual capacity corresponding to the other battery;
the current determining module is used for determining charging currents corresponding to the first battery and the second battery if no application program in a running state exists;
the circuit determination module is used for determining charging circuits corresponding to the first battery and the second battery according to the charging currents corresponding to the first battery and the second battery;
the battery charging module is further configured to charge the first battery and the second battery through respective charging circuits corresponding to the first battery and the second battery.
10. A terminal, characterized in that the terminal comprises a processor and a memory, the memory storing a computer program that is loaded and executed by the processor to implement the method according to any of claims 1 to 8.
11. A computer-readable storage medium, in which a computer program is stored which is loaded and executed by a processor to implement the method according to any one of claims 1 to 8.
CN201910724711.6A 2019-08-07 2019-08-07 Charging control method, device, terminal and storage medium Active CN110365084B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910724711.6A CN110365084B (en) 2019-08-07 2019-08-07 Charging control method, device, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910724711.6A CN110365084B (en) 2019-08-07 2019-08-07 Charging control method, device, terminal and storage medium

Publications (2)

Publication Number Publication Date
CN110365084A CN110365084A (en) 2019-10-22
CN110365084B true CN110365084B (en) 2021-03-09

Family

ID=68222098

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910724711.6A Active CN110365084B (en) 2019-08-07 2019-08-07 Charging control method, device, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN110365084B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113013934A (en) * 2019-12-19 2021-06-22 华为技术有限公司 Electronic equipment, electronic device and charging method
CN112688377A (en) * 2020-12-07 2021-04-20 珠海格力电器股份有限公司 Energy storage charging method and device, energy storage equipment and charging equipment
CN113937849B (en) * 2021-09-28 2024-11-19 青岛海信移动通信技术有限公司 A smart terminal, charging and discharging method, device and medium
CN113964914B (en) * 2021-11-08 2023-07-21 深圳市迪浦电子有限公司 Mobile phone battery power management system and method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103902010A (en) * 2012-12-26 2014-07-02 联想(北京)有限公司 Method for reducing power consumption and electronic equipment
CN109388220A (en) * 2018-10-09 2019-02-26 维沃移动通信有限公司 A kind of method for managing power supply and mobile terminal

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9531203B2 (en) * 2014-04-11 2016-12-27 Panasonic Corporation Secondary battery system
CN104218269B (en) * 2014-09-22 2017-02-15 宇龙计算机通信科技(深圳)有限公司 Charging method, charging system and charging terminal
CN104852439B (en) * 2015-06-10 2018-08-10 联想(北京)有限公司 Electronic equipment and double-battery charge electric discharge switching method
CN106786959B (en) * 2017-01-13 2019-10-25 Oppo广东移动通信有限公司 Charging control method and device and terminal
CN109450009B (en) * 2018-10-10 2021-05-25 Oppo广东移动通信有限公司 Charging control method and device and computer storage medium
CN109525720A (en) * 2018-10-31 2019-03-26 南昌努比亚技术有限公司 Battery of mobile terminal control method, mobile terminal and readable storage medium storing program for executing

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103902010A (en) * 2012-12-26 2014-07-02 联想(北京)有限公司 Method for reducing power consumption and electronic equipment
CN109388220A (en) * 2018-10-09 2019-02-26 维沃移动通信有限公司 A kind of method for managing power supply and mobile terminal

Also Published As

Publication number Publication date
CN110365084A (en) 2019-10-22

Similar Documents

Publication Publication Date Title
CN110365084B (en) Charging control method, device, terminal and storage medium
CN110869784B (en) Method and apparatus for estimating SOC-OCV curve
US7518338B2 (en) Parallel hybrid battery pack charging
CN110350626B (en) Charging control method and apparatus, electronic device, computer-readable storage medium
US10305301B2 (en) Battery and electronic device thereof
CN107978790B (en) Method and device for supplementing lithium to battery
JPH10136574A (en) Battery control device
CN113612295B (en) Emergency energy storage battery electric energy management method, device and medium
US9892691B1 (en) Adaptive battery management
KR102809962B1 (en) Electronic device and method for extending battery life
CN109596989B (en) Method and device for displaying electric quantity of electronic equipment and electronic equipment
CN110350619B (en) Charging control method, device, terminal and storage medium
US9372238B2 (en) Battery management system with over-discharge detection and warning, battery pack comprising the same, and method for protecting a battery from over-discharge
CN110308780B (en) Battery management method, system, terminal device and storage medium
CN106785144A (en) A kind of charging method and device
US20150050963A1 (en) Electronic device with power sharing capabilities and methods therefor
WO2016204734A1 (en) Battery charge voltage based on ambient temperature
US20230216319A1 (en) Battery distributing apparatus
CN110365081B (en) Charging control method, device, terminal and storage medium
CN116760156B (en) Electric quantity balancing method, device, computer equipment and storage medium
CN110311447B (en) Charging control method, device, terminal and storage medium
US9836114B1 (en) Event-based trigger for managing battery consumption
CN101739111A (en) Computer with lithium battery charging system
CN110493857B (en) Battery using method, device, terminal and storage medium
CN115315873A (en) Battery management device and method and battery management system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant