CN110429696B - Battery charging method, electronic device and computer readable storage medium - Google Patents

Battery charging method, electronic device and computer readable storage medium Download PDF

Info

Publication number
CN110429696B
CN110429696B CN201910841129.8A CN201910841129A CN110429696B CN 110429696 B CN110429696 B CN 110429696B CN 201910841129 A CN201910841129 A CN 201910841129A CN 110429696 B CN110429696 B CN 110429696B
Authority
CN
China
Prior art keywords
battery
charging
electric quantity
historical
electronic device
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
CN201910841129.8A
Other languages
Chinese (zh)
Other versions
CN110429696A (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 CN201910841129.8A priority Critical patent/CN110429696B/en
Publication of CN110429696A publication Critical patent/CN110429696A/en
Application granted granted Critical
Publication of CN110429696B publication Critical patent/CN110429696B/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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02BCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO BUILDINGS, e.g. HOUSING, HOUSE APPLIANCES OR RELATED END-USER APPLICATIONS
    • Y02B40/00Technologies aiming at improving the efficiency of home appliances, e.g. induction cooking or efficient technologies for refrigerators, freezers or dish washers

Landscapes

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

Abstract

The embodiment of the invention discloses a battery charging method, which is applied to the technical field of communication and comprises the following steps: when the electric quantity of the first battery is larger than or equal to the preset electric quantity, determining the next charging time point of charging through the external power supply according to the historical charging information; acquiring historical power consumption information from the current time to the next charging time point; determining the reserved electric quantity of the first battery according to the historical power consumption information and the reserved electric quantity rule; and controlling the first battery to charge the second battery until the first battery stops charging the second battery when the residual capacity of the first battery is detected to be less than or equal to the reserved capacity. The embodiment of the invention also discloses an electronic device and a computer readable storage medium, which can improve the charging efficiency and save the charging time.

Description

Battery charging method, electronic device and computer readable storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a battery charging method, an electronic device, and a computer-readable storage medium.
Background
With the development of mobile electronic device technology, in order to better supply power to the mobile electronic device, a dual-battery technology is adopted, that is, two batteries are arranged in the mobile electronic device, a dual-battery charging strategy is also adopted when the two batteries are charged, and charging time, charging opportunity and the like are allocated to the two batteries.
The existing double-battery charging strategy is generally based on the characteristics of the two lithium batteries such as temperature, voltage value and the like, and the charging strategy of the two batteries is determined, but the charging strategy made according to the battery with the higher charging speed in the two batteries is not available. In addition, in the current double-battery charging process, the time for charging the common lithium battery is long, and the user experience is poor.
Disclosure of Invention
The invention provides a battery charging method, an electronic device and a computer readable storage medium, and aims to solve the problem of slow charging in a dual-battery charging strategy.
A first aspect of an embodiment of the present invention provides a battery charging method, including:
when the electric quantity of the first battery is larger than or equal to a preset electric quantity, determining the next charging time point for charging the electronic device through an external power supply according to historical charging information;
acquiring historical power consumption information from the current time to the next charging time point;
determining the reserved electric quantity of the first battery according to the historical power consumption information and a preset reserved electric quantity rule;
and controlling the first battery to charge the second battery, and controlling the first battery to stop charging the second battery when detecting that the residual electric quantity of the first battery is less than or equal to the reserved electric quantity.
A second aspect of an embodiment of the present invention provides an electronic apparatus, including:
the first determining module is used for determining the next charging time point for charging the electronic device through the external power supply according to historical charging information when the electric quantity of the first battery is larger than or equal to the preset electric quantity;
the acquisition module is used for acquiring historical power consumption information from the current time to the next charging time point;
the second determining module is used for determining the reserved electric quantity of the first battery according to the historical power consumption information and a preset reserved electric quantity rule;
and the charging control module is used for controlling the first battery to charge the second battery, and controlling the first battery to stop charging the second battery when detecting that the residual electric quantity of the first battery is less than or equal to the reserved electric quantity.
A third aspect of embodiments of the present invention provides an electronic apparatus, including:
a memory and a processor;
the memory stores executable program code;
the processor coupled to the memory calls the executable program code stored in the memory to perform the battery charging method according to the first aspect of the embodiments of the present invention.
A fourth aspect of embodiments of the present invention provides a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, performs the battery charging method as provided in the first aspect of embodiments of the present invention.
It can be known from the above embodiments of the present invention that, when the power of the first battery is higher than the preset power, the next charging time point for charging the electronic device by the external power is determined according to the historical charging information, the historical power consumption information corresponding to the next charging time point from the current time is obtained, the reserved power of the first battery is determined according to the historical power consumption information and the reserved power rule, the first battery is controlled to charge the second battery, when the remaining power of the first battery is detected to be less than or equal to the reserved power, the first battery is stopped from charging the second battery, the second battery is charged by the first battery while the power consumption of the electronic device is ensured, the charging of the second battery is completed in a non-inductive state without affecting the use of the user, and when the electronic device is charged by the external power, the charging time of the first battery is short due to the power added by the second battery, therefore, compared with the situation that the electric quantity of the second battery is not increased, the time for charging the second battery which is longer than the charging time of the first battery is shorter through the external power supply, so that the total charging time of the two batteries is reduced, the charging efficiency is improved, and the user experience is also improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention.
Fig. 1 is a schematic diagram of an internal battery connection of an electronic device according to a battery charging method provided in an embodiment of the invention;
fig. 2 is a schematic flow chart illustrating an implementation of a battery charging method according to an embodiment of the present invention;
fig. 3 is a schematic flow chart illustrating an implementation of a battery charging method according to another embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the invention;
FIG. 5 is a schematic diagram of an electronic device according to another embodiment of the invention;
fig. 6 shows a hardware configuration diagram of an electronic apparatus.
Detailed Description
In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a schematic diagram illustrating connection of an internal battery of an electronic device according to a battery charging method provided in an embodiment of the present invention. The electronic device 100 has 2 rechargeable batteries, wherein 1 rechargeable battery is a first battery 200 and can be charged quickly, such as a graphene battery, and the other 1 rechargeable battery is a second battery 300, and under the same charging conditions, the charging speed is slower than that of the first battery 200, such as a lithium battery. Note that the first battery 200 is not limited to 1, and the second battery 300 is not limited to 1; the invention can also be applied to a scenario that 2 groups of rechargeable battery packs are built in the electronic device, wherein 1 group is a first battery pack, and the other 1 group is a second battery pack, wherein the charging speed of the first battery pack is faster than that of the second battery pack. For convenience of description, 1 first battery 200 and 1 second battery 300 are taken as examples in this embodiment. The first battery 200 is electrically connected to the second battery 300, and the first battery 200 can be used to charge the second battery 300, and conversely, the second battery 300 can also be used to charge the first battery 200, controlled by the charging switch. The first battery 200 is charged to the second battery 30 by default. The electronic device preferentially selects the first battery 200 as the power source, and the second battery 300 is enabled as the power source only when the first battery 200 has a small amount of remaining power.
The electronic apparatus 100 includes an electronic data processing device that can be used in mobile, such as a smartphone, a tablet computer, and a notebook computer.
Referring to fig. 2, fig. 2 is a schematic diagram illustrating an implementation flow of a battery charging method according to an embodiment of the present invention, where the method is applicable to an electronic device. The method comprises the following steps:
101. when the electric quantity of the first battery is larger than or equal to the preset electric quantity, determining the next charging time point for charging the electronic device through the external power supply according to the historical charging information;
because the first battery is charged quickly, in order to make the electronic device obtain sufficient electric quantity as soon as possible, the first battery is charged by the external power supply. The external power source includes a power source from outside the electronic device, such as an indoor power source or a charger.
When the electric quantity of the first battery is greater than or equal to the preset electric quantity, for example, 90% or more of the electric quantity, it can be considered that the second battery is charged by the first battery when a certain electric quantity of the first battery is maintained, thus not only ensuring that the first battery can maintain the power consumption requirement of the electronic device, but also charging the second battery, because the redundant electric quantity of the first battery is used for charging the second battery, when the first battery is charged by using an external power supply later, the charging time required for fully charging the first battery is shorter than that of the second battery, so that the time for charging the two batteries in the electronic device by using the external power supply later is reduced.
The next charging time point for charging the electronic device by the external power supply is determined based on historical charging information, which may be information within a certain period of time in the past, for example, 30 days, or more 100 days, or less 3 days, etc. The historical charging information may include: historical charging time points, charging time periods, charged amounts and the like.
102. Acquiring historical power consumption information from the current time to the next charging time point;
the historical power consumption information may be historical power consumption information of a specified time period, or historical power consumption information of a latest time period, that is, the historical power consumption information is information of a time point from the current time to the next charging time point charged by the external power supply every day on the collection date, and for example, the current time is 17: 00, the next charging time point is 19: 00, the collection date is 10 days in the past, and the historical power consumption information is 17: 00-19: 00.
the historical power consumption information includes: information related to power consumption, such as historical usage information of the electronic terminal and power consumption amount corresponding to the historical usage information. Further, the historical usage information may include names, durations, and the like of used APPs, where the APPs may be system APPs including network connections, or third party APPs such as games and videos.
103. Determining the reserved electric quantity of the first battery according to the historical power consumption information and a preset reserved electric quantity rule;
the reserved electric quantity is the lowest remaining electric quantity reserved by the first battery after the second battery is charged. That is, the current capacity of the first battery is a minimum value excluding the capacity charged to the second battery and the capacity remaining after excluding the capacity consumed in the process of charging the second battery.
The reserved electric quantity rule may specifically be a corresponding relationship between the estimated electric power consumption and the reserved electric quantity, specifically a positive relationship. The estimated power consumption is the power consumption consumed by the first battery in the process of charging the second battery, and is related to using the electronic device, if the APP running in the electronic device is more or the running time is long, the estimated power consumption is large, and if the APP running in the electronic device is long, the corresponding reserved power is large, and vice versa. Specifically, the reserved electric quantity corresponding to the estimated electric power consumption can be obtained by inquiring the corresponding relation between the estimated electric power consumption and the reserved electric quantity in the reserved electric quantity rule. In order to prevent the second battery from being charged too much if the actual power consumption exceeds the estimated power consumption, the reserved power of the first battery cannot maintain the basic power consumption of the electronic device.
For example, if the current electric quantity of the first battery is 100%, the estimated electric consumption is 30%, and the reserved electric quantity is 20%, the electric quantity charged to the second battery is 50%; the current electric quantity of the first battery is 90%, the estimated electric consumption is 40%, the reserved electric quantity is 25%, and the electric quantity charged to the second battery is 25%
Further, the reserved power rule may also be a fixed reserved power, and the reserved power is 30% no matter what the estimated power consumption is. The reserved electric quantity rule is preset in the system.
104. And controlling the first battery to charge the second battery, and controlling the first battery to stop charging the second battery when detecting that the residual electric quantity of the first battery is less than or equal to the reserved electric quantity.
In the embodiment of the invention, when the electric quantity of the first battery is higher than the preset electric quantity, the next charging time point for charging the electronic device by an external power supply is determined according to the historical charging information, the historical power consumption information corresponding to the next charging time point from the current time is obtained, the reserved electric quantity of the first battery is determined according to the historical power consumption information and the reserved electric quantity rule, the first battery is controlled to charge the second battery, when the residual electric quantity of the first battery is detected to be less than or equal to the reserved electric quantity, the first battery stops charging the second battery, the electronic device is charged by the first battery while the power consumption of the electronic device is ensured, the second battery is charged under the non-inductive state without influencing the use of a user, and when the electronic device is charged by the external power supply, the electric quantity of the second battery is increased, and the charging time of the first battery is short, therefore, compared with the situation that the electric quantity of the second battery is not increased, the time for charging the second battery which is longer than the charging time of the first battery is shorter through the external power supply, so that the total charging time of the two batteries is reduced, the charging efficiency is improved, and the user experience is also improved.
Referring to fig. 3, fig. 3 is a schematic view illustrating an implementation flow of a battery charging method in another embodiment provided in the embodiment of the present invention, where the method is applicable to an electronic device, and a first battery and a second battery are built in the electronic device, and the first battery is electrically connected to the second battery, and the first battery can charge the second battery. The method mainly comprises the following steps:
201. when detecting that the electric quantity of the second battery is smaller than the preset electric quantity to be charged, detecting whether the electric quantity of the first battery is larger than or equal to the preset electric quantity;
the charge amount is a preset charge amount value of the second battery.
It should be noted that, when the first battery needs to be charged, the system may switch to the second battery to supply power to the electronic device, at this time, if the user enters the room, the first battery with a relatively fast charging speed is charged by the external power supply, and at this time, the electric quantity of the second battery may be smaller than the electric quantity that needs to be charged.
When the electric quantity of the second battery is smaller than the preset electric quantity to be charged, the first battery is required to charge the second battery, whether the electric quantity of the first battery reaches the preset electric quantity is detected, namely whether the electric quantity is larger than or equal to the preset electric quantity is detected, if the electric quantity reaches the preset electric quantity, the step 202 is executed, if the electric quantity does not reach the preset electric quantity, the external power supply is firstly used for charging the first battery, and after the electric quantity of the first battery reaches or is higher than the preset electric quantity, the step 202 is executed.
Specifically, the preset electric quantity to be charged can obtain historical charging information by the electronic device, and find information such as the time point and the time length of charging the first battery to the second battery in the historical period and the electric quantity after charging in the historical period, and calculate the corresponding electric quantity to be charged when the electric quantity after charging is optimal to be used as the preset electric quantity to be charged.
For example, it can be confirmed that the optimal charging amount is 90%, which neither requires the first battery to fully charge the second battery, which may cause the first battery to allocate more electric power to the second battery, thereby failing to satisfy the power consumption requirement of the electronic terminal in the charging period, nor causes the charging time of the external power supply to be prolonged due to insufficient electric power from the first battery to the second battery when the user arrives indoors and starts to charge the second battery through the external power supply. The amount of electricity to be charged corresponding to 90% of the optimum value of the amount of electricity to be charged is 50% of the amount of electricity, so that the preset amount of electricity to be charged is determined to be 50%.
202. When the electric quantity of the first battery is larger than or equal to the preset electric quantity, determining the next charging time point for charging the electronic device through the external power supply according to the historical charging information;
specifically, the present charging record is obtained, the historical charging record with the highest coincidence degree with the present charging record is obtained, the charging time point corresponding to the current time in the historical charging record is searched, and the charging time point closest to the current time is used as the next charging time point for charging the electronic device through the external power supply. The accuracy of confirming the time point can be improved.
Finding the historical charging record with the highest coincidence degree of the charging time point and the charging duration in the charging record and the present day, and searching the closest charging time point which is not reached yet in the historical charging record as the next charging time point, for example, now 17: 00, the charging time points of the historical charging records by the external power supply are 10: 00. 16: 00. 20: 00. 24: 00, etc., then 20: 00 is the next charging time point.
Or obtaining historical daily power consumption information with the highest coincidence degree with the current daily power consumption information, obtaining historical daily charging records corresponding to the historical daily power consumption information, searching for charging time corresponding to the current time in the historical daily charging records, and taking the charging time closest to the current time as the next charging time point
The power consumption information comprises used APP, use duration and the like, the closer the power consumption information is to the power consumption, and the accuracy of confirming the next charging time point can be further improved by confirming the next charging time point according to the historical charging record corresponding to the historical power consumption information with the highest coincidence degree.
203. Acquiring historical power consumption information from the current time to the next charging time point;
204. determining the reserved electric quantity of the first battery according to the historical power consumption information and a preset reserved electric quantity rule;
specifically, historical usage information of the electronic device from the current time to the next charging time point and the power consumption amount corresponding to the historical usage information are acquired. The historical use information refers to the use condition of the electronic device in a past period, and comprises the name, the time point, the time length and the like of the APP used by the electronic device. The past period of time may be system set or user specified.
The power consumption amount from the current time to the next charging time point is estimated in comparison with the usage history information and the power consumption amount corresponding to the history usage information. The user may plan a time point and a duration of using the APP by the electronic device, for example, browsing a web page on the road, listening to music, watching short videos for 1 hour, etc., from a current time to a next charging time point of charging the electronic device through the external power supply. And confirming the power consumption corresponding to the historical use information with the highest coincidence degree of the time point and the time length of the APP planned to be used as the power consumption from the current time to the next charging time point according to the time point and the time length of the APP used in the use historical information.
Further, can set up the APP that power consumption is close into same type APP and compare, improve degree of accuracy and flexibility. For example, class a APPs include A, B, C, D four APPs that are close in power consumption, and when the "a" APP is used in the query plan, B, C, D three APPs are also included in the comparison process as query results.
And determining the reserved electric quantity corresponding to the estimated electric consumption in the reserved electric quantity rule as the reserved electric quantity of the first battery. Specifically, the reserved electric quantity corresponding to the estimated electric power consumption is inquired in the reserved electric quantity rule, and the inquired reserved electric quantity is determined as the reserved electric quantity of the first battery. For example, if the estimated power consumption is 30% and the corresponding reserved power amount is 20%, the reserved power amount of the first battery is 20%, and the power amount charged to the second battery is the surplus power amount obtained by subtracting the sum of the estimated power consumption and the reserved power amount from the current power amount.
205. Detecting the current electric quantity of the first battery, comparing whether the difference between the current electric quantity and the estimated electric consumption is larger than or equal to a preset threshold value, and determining whether the second battery is charged according to the comparison result;
in order to reduce the risk that the first battery charges the second battery to supply power to the second battery, whether the current residual capacity of the first battery is enough is detected.
Specifically, if the difference between the current remaining power and the estimated power consumption is greater than or equal to a preset threshold, the first battery is controlled to charge the second battery.
If the difference between the current residual capacity and the estimated power consumption is smaller than a preset threshold, the first battery is not controlled to charge the second battery, or the power shared to the second battery is reduced, and the difference between the current residual capacity and the estimated power consumption is kept larger than or equal to the preset threshold.
206. And controlling the first battery to charge the second battery, and controlling the first battery to stop charging the second battery when detecting that the residual electric quantity of the first battery is less than or equal to the reserved electric quantity.
Further, in the process that the first battery charges the second battery, the battery temperatures of the first battery and the second battery are detected in real time, and if the battery temperature of any one of the first battery and the second battery is greater than a preset temperature value, the first battery is stopped charging the second battery.
Or detecting whether a preset high-power-consumption application runs in real time or not, or detecting whether the running application number is larger than the preset number or not, and if the preset high-power-consumption application runs or the running application number is larger than the preset number, stopping the first battery from charging the second battery. The high power applications can be automatically classified by the system or set by the user, and usually the high power applications comprise some game class and video class applications.
The above detection of the battery temperature and the application in the electronic device can control the possibility that the battery continues to be internally charged even if the battery is overheated, thereby increasing the safety.
This embodiment is not described in detail with reference to the previous description of the embodiment shown in fig. 2.
In the embodiment of the invention, when the electric quantity of the second battery is detected to be smaller than the preset electric quantity to be charged, whether the electric quantity of the first battery reaches the preset electric quantity is detected, if not, the external power supply is used for charging the first battery, the electric quantity of the first battery is prevented from being insufficient, so that the electric quantity of the electronic device is maintained while the second battery is charged, when the electric quantity of the first battery reaches the preset electric quantity, the next charging time point for charging the electronic device by the external power supply is determined according to the historical charging information, the accuracy of determining the next charging time point is improved, furthermore, the historical power consumption information corresponding to the next charging time point from the current time to the next charging time point is obtained, the reserved electric quantity of the first battery is determined according to the historical power consumption information and the reserved electric quantity rule, the first battery is controlled to be charged to the second battery, when the residual electric quantity of the first battery is detected to be smaller than or equal, stop first battery to second battery charging, when guaranteeing that electron device is power consumptive, charge for the second battery through first battery, accomplish the charging to the second battery under the noninductive state that does not influence the user to use, and, when rethread external power source charges for electron device, because the second battery has increased the electric quantity, and first battery is the charge time again short, consequently compare under the circumstances that the second battery does not increase the electric quantity, charge for the second battery that is longer than first battery charge time through external power source, the time spent is shorter, thereby reduced these two blocks of battery total time of charging, charging efficiency is improved, user experience has also been improved.
Referring to fig. 4, fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the invention, and for convenience of description, only the parts related to the embodiment of the invention are shown. The electronic device illustrated in fig. 4 may be an execution subject of the battery charging method provided in the foregoing embodiments illustrated in fig. 2 to 3. The electronic device is internally provided with a first battery and a second battery, and the charging speed of the first battery is faster than that of the second battery under the same charging condition, and the electronic device comprises:
a first determining module 301, configured to determine, according to historical charging information, a next charging time point for charging the electronic device by an external power supply when an electric quantity of the first battery is greater than or equal to a preset electric quantity;
an obtaining module 302, configured to obtain historical power consumption information from a current time to the next charging time point;
a second determining module 303, configured to determine a reserved electric quantity of the first battery according to the historical power consumption information and a preset reserved electric quantity rule;
and the charging control module 304 is configured to control the first battery to charge the second battery, and when it is detected that the remaining power of the first battery is less than or equal to the reserved power, control the first battery to stop charging the second battery.
Referring to fig. 5, fig. 5 is a schematic structural diagram of an electronic device according to another embodiment of the present invention, which is different from the electronic device illustrated in fig. 4 in that the electronic device illustrated in fig. 5 includes:
the detecting module 401 is configured to detect whether the electric quantity of the first battery reaches a preset electric quantity when it is detected that the electric quantity of the second battery is smaller than the preset electric quantity to be charged;
if yes, the charging control module 304 is triggered to determine a next charging time point for charging the electronic device through the external power source according to the historical charging information when the electric quantity of the first battery is greater than or equal to the preset electric quantity.
If not, the first battery is charged through an external power supply, and the electric quantity of the first battery is charged to be larger than or equal to the preset electric quantity.
The second determination module 303 includes:
an obtaining submodule 3031, configured to obtain historical usage information of the electronic device from a current time to the next charging time point and power consumption amount corresponding to the historical usage information;
an estimation submodule 3032, configured to estimate, according to the usage history information and the power consumption amount corresponding to the history usage information, the power consumption amount from the current time to the next charging time point;
a determining submodule 3033, configured to determine, as the reserved electric quantity of the first battery, the reserved electric quantity corresponding to the estimated electric quantity in the reserved electric quantity rule.
Further, the detecting module 401 is further configured to detect a current electric quantity of the first battery, if a difference between the current electric quantity and the estimated electric power consumption is greater than or equal to a preset threshold, trigger the charging control module 401 to control the first battery to charge the second battery, and when it is detected that a remaining electric quantity of the first battery is less than or equal to a reserved electric quantity, trigger the charging control module 401 to control the first battery to stop charging the second battery.
Further, the first determining module 301 is further configured to obtain a today's charging record, and obtain a historical day charging record with the highest coincidence degree with the today's charging record;
and searching the charging time corresponding to the current time in the historical daily charging record, and taking the charging time closest to the current time as the next charging time point.
Further, the first determining module 301 is further configured to obtain historical daily power consumption information with the highest coincidence degree with the current power consumption information, and obtain a historical daily charging record corresponding to the historical daily power consumption information;
and searching the charging time corresponding to the current time in the historical daily charging record, and taking the charging time closest to the current time as the next charging time point.
Further, the electronic device further includes a temperature detection module 402 for detecting the battery temperatures of the first battery and the second battery in real time;
and if the battery temperature of the first battery or the second battery is greater than a preset temperature value, stopping charging the second battery from the first battery.
Further, the detection module 401 is further configured to detect whether a preset high power consumption application runs in real time, or whether the number of running applications is greater than a preset number;
and if the running of the preset high-power-consumption application is detected, or the running application number is greater than the preset number, stopping the first battery from charging the second battery.
For details that are not described in the present embodiment, please refer to the description of the embodiment shown in fig. 2 to fig. 4, which will not be described herein again.
In the embodiment of the invention, when the electric quantity of the first battery is higher than the preset electric quantity, the next charging time point charged by an external power supply is determined according to the historical charging information, the historical power consumption information corresponding to the next charging time point from the current time is obtained, the reserved electric quantity of the first battery is determined according to the historical power consumption information and the reserved electric quantity rule, the first battery is controlled to charge the second battery, when the residual electric quantity of the first battery is detected to be less than or equal to the reserved electric quantity, the first battery is controlled to stop charging the second battery, the second battery is charged by the first battery while the power consumption of the electronic device is ensured, the charging of the second battery is finished under the non-inductive state without influencing the use of a user, and when the electronic device is charged by the external power supply, the electric quantity of the second battery is increased, and the charging time of the first battery is short, therefore, the total charging time of the two batteries is reduced, the charging efficiency is improved, and the user experience is also improved.
An embodiment of the present invention further provides an electronic device, including: the battery charging system comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein when the processor executes the computer program, the battery charging method as described in the previous figures 2-3 is realized.
Referring to fig. 6, fig. 6 is a hardware structure diagram of an electronic device according to an embodiment of the invention.
For example, the electronic device may be any of various types of computer system apparatuses that are mobile or portable and perform wireless communication. In particular, the electronic apparatus may be a mobile phone or a smart phone (e.g., iPhone (TM) -based phone), a Portable game device (e.g., Nintendo DS (TM), PlayStation Portable (TM), Gameboy Advance (TM), iPhone (TM)), a laptop, a PDA, a Portable internet appliance, a music player and a data storage device, other handheld devices and a head-mounted device (HMD) such as a watch, a headset, a pendant, a headset, etc., and other wearable devices (e.g., electronic glasses, electronic clothes, an electronic bracelet, an electronic necklace, an electronic tattoo, an electronic device, or a smart watch).
The electronic apparatus may also be any of a number of electronic devices including, but not limited to, cellular phones, smart phones, other wireless communication devices, personal digital assistants, audio players, other media players, music recorders, video recorders, cameras, other media recorders, radios, medical devices, vehicle transportation equipment, calculators, programmable remote controllers, pagers, laptop computers, desktop computers, printers, netbook computers, Personal Digital Assistants (PDAs), Portable Multimedia Players (PMPs), moving picture experts group (MPEG-1 or MPEG-2) audio layer 3(MP3) players, portable medical devices, and digital cameras and combinations thereof.
In some cases, the electronic device may perform a variety of functions (e.g., playing music, displaying video, storing pictures, and receiving and sending telephone calls). If desired, the electronic apparatus may be a portable device such as a cellular telephone, media player, other handheld device, wristwatch device, pendant device, earpiece device, or other compact portable device.
As shown in fig. 6, the electronic device 10 may include control circuitry, which may include storage and processing circuitry 30. The storage and processing circuitry 30 may include memory, such as hard drive memory, non-volatile memory (e.g., flash memory or other electronically programmable erase limit memory used to form solid state drives, etc.), volatile memory (e.g., static or dynamic random access memory, etc.), and so forth, although the embodiments of the present application are not limited thereto. Processing circuitry in the storage and processing circuitry 30 may be used to control the operation of the electronic device 10. The processing circuitry may be implemented based on one or more microprocessors, microcontrollers, digital signal processors, baseband processors, power management units, audio codec chips, application specific integrated circuits, display driver integrated circuits, and the like.
The storage and processing circuitry 30 may be used to run software within the electronic device 10 such as, for example, an Internet browsing application, a Voice Over Internet Protocol (VOIP) telephone call application, an email application, a media playing application, operating system functions, etc. Such software may be used to perform control operations such as, for example, camera-based image capture, ambient light measurement based on an ambient light sensor, proximity sensor measurement based on a proximity sensor, information display functionality based on status indicators such as status indicator lights of light emitting diodes, touch event detection based on a touch sensor, functionality associated with displaying information on multiple (e.g., layered) displays, operations associated with performing wireless communication functions, operations associated with collecting and generating audio signals, control operations associated with collecting and processing button press event data, and other functions in the electronic device 10, and the like, without limitation of the embodiments of the present application.
The electronic device 10 may also include input-output circuitry 42. The input-output circuitry 42 may be used to enable the electronic device 10 to enable input and output of data, i.e., to allow the electronic device 10 to receive data from external devices and also to allow the electronic device 10 to output data from the electronic apparatus 100 to external devices. The input-output circuitry 42 may further include the sensor 32. The sensors 32 may include ambient light sensors, optical and capacitive based proximity sensors, touch sensors (e.g., optical based touch sensors and/or capacitive touch sensors, where the touch sensors may be part of a touch display screen or may be used independently as a touch sensor structure), acceleration sensors, and other sensors, among others.
Input-output circuitry 42 may also include one or more displays, such as display 14. The display 14 may include one or a combination of liquid crystal displays, organic light emitting diode displays, electronic ink displays, plasma displays, displays using other display technologies. The display 14 may include an array of touch sensors (i.e., the display 14 may be a touch display screen). The touch sensor may be a capacitive touch sensor formed by a transparent touch sensor electrode (e.g., an Indium Tin Oxide (ITO) electrode) array, or may be a touch sensor formed using other touch technologies, such as acoustic wave touch, pressure sensitive touch, resistive touch, optical touch, and the like, and the embodiments of the present application are not limited thereto.
The electronic device 10 may also include an audio component 36. The audio component 36 may be used to provide audio input and output functionality for the electronic device 10. Audio components 36 in electronic device 10 may include speakers, microphones, buzzers, tone generators, and other components for generating and detecting sound.
The communication circuitry 38 may be used to provide the electronic device 10 with the ability to communicate with external devices. The communication circuit 38 may include analog and digital input-output interface circuits, and wireless communication circuits based on radio frequency signals and/or optical signals. The wireless communication circuitry in communication circuitry 38 may include radio-frequency transceiver circuitry, power amplifier circuitry, low noise amplifiers, switches, filters, and antennas. For example, the wireless Communication circuitry in Communication circuitry 38 may include circuitry to support Near Field Communication (NFC) by transmitting and receiving Near Field coupled electromagnetic signals. For example, the communication circuitry 38 may include a near field communication antenna and a near field communication transceiver. The communications circuitry 38 may also include a cellular telephone transceiver and antenna, a wireless local area network transceiver circuit and antenna, and the like.
The electronic device 10 may further include a battery, power management circuitry, and other input-output units 40. The input-output unit 40 may include buttons, joysticks, click wheels, scroll wheels, touch pads, keypads, keyboards, cameras, light emitting diodes and other status indicators, etc.
A user may enter commands through input-output circuitry 42 to control the operation of electronic device 10, and may use output data of input-output circuitry 42 to enable receipt of status information and other outputs from electronic device 10.
Further, an embodiment of the present invention further provides a computer-readable storage medium, which may be disposed in the electronic device in the foregoing embodiments, and the computer-readable storage medium may be a memory in the storage and processing circuit 30 in the foregoing embodiment shown in fig. 6. The computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements the battery charging method described in the foregoing embodiment shown in fig. 3. Further, the computer-readable storage medium may be various media that can store program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a RAM, a magnetic disk, or an optical disk.
It should be noted that, for the sake of simplicity, the above-mentioned method embodiments are described as a series of acts or combinations, but those skilled in the art should understand that the present invention is not limited by the described order of acts, as some steps may be performed in other orders or simultaneously according to the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no acts or modules are necessarily required of the invention.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In view of the above description of the battery charging method, the electronic device and the computer-readable storage medium provided by the present invention, those skilled in the art will recognize that the concepts of the embodiments of the present invention can be modified in the specific implementation manners and applications, and therefore the present disclosure should not be construed as limiting the scope of the present invention.

Claims (10)

1. A battery charging method is applied to an electronic device, and is characterized in that a first battery and a second battery are arranged in the electronic device, the charging speed of the first battery is greater than that of the second battery, and the method comprises the following steps:
when the electric quantity of the first battery is larger than or equal to a preset electric quantity, determining the next charging time point for charging the electronic device through an external power supply according to historical charging information;
acquiring historical power consumption information from the current time to the next charging time point;
determining the reserved electric quantity of the first battery according to the historical power consumption information and a preset reserved electric quantity rule;
controlling the first battery to charge the second battery, and controlling the first battery to stop charging the second battery when detecting that the residual electric quantity of the first battery is less than or equal to the reserved electric quantity;
wherein, when the electric quantity of the first battery is greater than or equal to a preset electric quantity, determining that a next charging time point for charging the electronic device through an external power supply is before according to historical charging information comprises:
when detecting that the electric quantity of the second battery is smaller than the preset electric quantity to be charged, detecting whether the electric quantity of the first battery is larger than or equal to the preset electric quantity;
if so, determining the next charging time point of charging through the external power supply according to historical charging information when the electric quantity of the first battery is greater than or equal to the preset electric quantity;
and if not, charging the electric quantity of the first battery to be more than or equal to the preset electric quantity through charging of an external power supply.
2. The method of claim 1, wherein the determining the reserved electric quantity of the first battery according to the historical power consumption information and a preset reserved electric quantity rule comprises:
acquiring historical use information of the electronic device from the current time to the next charging time point and power consumption corresponding to the historical use information;
estimating the power consumption from the current time to the next charging time point according to the historical use information and the power consumption corresponding to the historical use information;
and determining the reserved electric quantity corresponding to the estimated electric consumption in the reserved electric quantity rule as the reserved electric quantity of the first battery.
3. The method according to claim 2, wherein the controlling the first battery to charge the second battery comprises, before controlling the first battery to stop charging the second battery when the remaining capacity of the first battery is detected to be less than or equal to the reserved capacity:
detecting the current electric quantity of the first battery, if the difference between the current electric quantity and the estimated electric consumption is larger than or equal to a preset threshold value, executing the control of the first battery to charge the second battery, and controlling the first battery to stop charging the second battery when detecting that the residual electric quantity of the first battery is smaller than or equal to the reserved electric quantity.
4. The method of claim 3, wherein determining a next charging time point for charging the electronic device from the external power source according to the historical charging information comprises:
acquiring a today charging record, and acquiring a historical day charging record with the highest coincidence degree with the today charging record;
and searching the charging time corresponding to the current time in the historical daily charging record, and taking the charging time closest to the current time as the next charging time point.
5. The method of claim 3, wherein determining a next charging time point for charging the electronic device from the external power source according to the historical charging information comprises:
acquiring historical daily power consumption information with the highest coincidence degree with the current power consumption information, and acquiring a historical daily charging record corresponding to the historical daily power consumption information;
and searching the charging time corresponding to the current time in the historical daily charging record, and taking the charging time closest to the current time as the next charging time point.
6. The method of claim 1, further comprising:
detecting the battery temperature of the first battery and the second battery in real time;
and if the battery temperature of the first battery or the second battery is greater than a preset temperature value, stopping charging the second battery by the first battery.
7. The method of claim 1, further comprising:
detecting whether preset high-power-consumption applications run or not in real time, or whether the number of the running applications is larger than the preset number or not;
and if the running of the preset high-power-consumption application is detected, or the running application number is greater than the preset number, stopping the first battery from charging the second battery.
8. An electronic device, comprising:
the first determining module is used for determining the next charging time point for charging the electronic device through the external power supply according to the historical charging information when the electric quantity of the first battery is larger than or equal to the preset electric quantity;
the acquisition module is used for acquiring historical power consumption information from the current time to the next charging time point;
the second determining module is used for determining the reserved electric quantity of the first battery according to the historical power consumption information and a preset reserved electric quantity rule;
the charging control module is used for controlling the first battery to charge the second battery, and controlling the first battery to stop charging the second battery when detecting that the residual electric quantity of the first battery is less than or equal to the reserved electric quantity;
the electronic device further includes: the detection module is used for detecting whether the electric quantity of the first battery is larger than or equal to a preset electric quantity or not when the electric quantity of the second battery is smaller than the preset electric quantity to be charged;
if so, determining the next charging time point of charging through the external power supply according to historical charging information when the electric quantity of the first battery is greater than or equal to the preset electric quantity;
and if not, charging the electric quantity of the first battery to be more than or equal to the preset electric quantity through charging of an external power supply.
9. An electronic device, comprising:
a memory and a processor;
the memory stores executable program code;
the processor, coupled to the memory, invokes the executable program code stored in the memory to perform the battery charging method of any of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out a battery charging method according to any one of claims 1 to 7.
CN201910841129.8A 2019-09-06 2019-09-06 Battery charging method, electronic device and computer readable storage medium Active CN110429696B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910841129.8A CN110429696B (en) 2019-09-06 2019-09-06 Battery charging method, electronic device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910841129.8A CN110429696B (en) 2019-09-06 2019-09-06 Battery charging method, electronic device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN110429696A CN110429696A (en) 2019-11-08
CN110429696B true CN110429696B (en) 2021-03-23

Family

ID=68418773

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910841129.8A Active CN110429696B (en) 2019-09-06 2019-09-06 Battery charging method, electronic device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN110429696B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113733981B (en) * 2020-05-29 2023-04-28 蜂巢能源科技股份有限公司 Charging control method and device of power battery, medium and electronic equipment
CN112398212B (en) * 2020-11-30 2023-01-31 南京四象新能源科技有限公司 Standby power supply control method and device, energy storage system and storage medium
CN113866651B (en) * 2021-09-18 2022-08-02 珠海格力电器股份有限公司 Low-power detection method and device for remote controller and remote controller

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103633671A (en) * 2012-08-21 2014-03-12 宏碁股份有限公司 Charging device for charging multiple batteries and bidirectional charging method
US9686747B1 (en) * 2014-08-08 2017-06-20 Noble Systems Corporation Regulate current battery usage of a mobile device
CN108712575A (en) * 2018-05-31 2018-10-26 平安科技(深圳)有限公司 Charging reminding method, device, computer equipment and storage medium
CN108988421A (en) * 2018-07-13 2018-12-11 维沃移动通信有限公司 A kind of charging method of battery, charging circuit and terminal
CN109149669A (en) * 2017-06-16 2019-01-04 北京小米移动软件有限公司 Battery modules and its control method, charging adapter and its control method
CN109361818A (en) * 2018-10-26 2019-02-19 深圳壹账通智能科技有限公司 Charging reminding method, device, storage medium and terminal
CN109656349A (en) * 2017-10-09 2019-04-19 Tcl集团股份有限公司 Electricity saving method, terminal and the computer readable storage medium of terminal
CN110022403A (en) * 2019-03-06 2019-07-16 华为技术有限公司 Terminal charge based reminding method, device, equipment and storage medium

Family Cites Families (1)

* 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

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103633671A (en) * 2012-08-21 2014-03-12 宏碁股份有限公司 Charging device for charging multiple batteries and bidirectional charging method
US9686747B1 (en) * 2014-08-08 2017-06-20 Noble Systems Corporation Regulate current battery usage of a mobile device
CN109149669A (en) * 2017-06-16 2019-01-04 北京小米移动软件有限公司 Battery modules and its control method, charging adapter and its control method
CN109656349A (en) * 2017-10-09 2019-04-19 Tcl集团股份有限公司 Electricity saving method, terminal and the computer readable storage medium of terminal
CN108712575A (en) * 2018-05-31 2018-10-26 平安科技(深圳)有限公司 Charging reminding method, device, computer equipment and storage medium
CN108988421A (en) * 2018-07-13 2018-12-11 维沃移动通信有限公司 A kind of charging method of battery, charging circuit and terminal
CN109361818A (en) * 2018-10-26 2019-02-19 深圳壹账通智能科技有限公司 Charging reminding method, device, storage medium and terminal
CN110022403A (en) * 2019-03-06 2019-07-16 华为技术有限公司 Terminal charge based reminding method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN110429696A (en) 2019-11-08

Similar Documents

Publication Publication Date Title
KR102336856B1 (en) Method for Controlling of Charging/Discharging Battery and Electronic Device Using the same
CN110429696B (en) Battery charging method, electronic device and computer readable storage medium
CN106786962B (en) Charging control method and device and terminal
CN109947496B (en) Application program preloading method and device, storage medium and mobile terminal
CN110168483B (en) Shortcut menu for displaying different applications on different screens
CN110109759B (en) Catton optimization method, server, electronic device and computer-readable storage medium
ES2753802T3 (en) Charging procedure, charging device and terminal
CN109495871B (en) Bluetooth connection control method, electronic device and computer readable storage medium
CN108983211B (en) Proximity sensor, method of controlling the same, electronic device, and computer-readable storage medium
WO2021077611A1 (en) Battery charging method, battery charging apparatus and storage medium
CN110225167B (en) Terminal and processing method
CN103606718A (en) Battery, battery protection method, apparatus and system
US11050282B2 (en) Power supply control method and device, storage medium and electronic device
CN111464690B (en) Application preloading method, electronic equipment, chip system and readable storage medium
CN112311029B (en) Charging method, electronic device and storage medium
CN113839438B (en) Battery recharging protection method and electronic equipment
CN109684011B (en) Interface display control method, electronic device and computer readable storage medium
CN104348949A (en) Method and apparatus for switching operation state of electronic device
CN110970959A (en) Charging management method, graphical user interface and related device
EP2553478B1 (en) Apparatus, methods, computer readable storage mediums and computer programs
CN111478378B (en) Protection circuit, charging control device and method, and electronic device
CN110505344B (en) Battery power supply method, electronic device and computer readable storage medium
CN103731552A (en) Shooting switching method and device of mobile terminal and electronic equipment
CN109726003B (en) Application unfreezing processing method, electronic device and computer readable storage medium
CN110471622B (en) SD card data writing method and device, storage medium and terminal

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