[go: up one dir, main page]

CN117411148B - Charging method, electronic device and storage medium - Google Patents

Charging method, electronic device and storage medium Download PDF

Info

Publication number
CN117411148B
CN117411148B CN202311701770.4A CN202311701770A CN117411148B CN 117411148 B CN117411148 B CN 117411148B CN 202311701770 A CN202311701770 A CN 202311701770A CN 117411148 B CN117411148 B CN 117411148B
Authority
CN
China
Prior art keywords
current
battery
charging
state
power consumption
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
CN202311701770.4A
Other languages
Chinese (zh)
Other versions
CN117411148A (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.)
Honor Device Co Ltd
Original Assignee
Honor Device Co 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 Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202311701770.4A priority Critical patent/CN117411148B/en
Publication of CN117411148A publication Critical patent/CN117411148A/en
Application granted granted Critical
Publication of CN117411148B publication Critical patent/CN117411148B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H02J7/92
    • H02J7/94
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72454User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
    • 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
    • Y02EREDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
    • Y02E60/00Enabling technologies; Technologies with a potential or indirect contribution to GHG emissions mitigation
    • Y02E60/10Energy storage using batteries

Landscapes

  • Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Charge And Discharge Circuits For Batteries Or The Like (AREA)

Abstract

The application provides a charging method, electronic equipment and a storage medium, and relates to the technical field of electronic equipment. In the method, an electronic device detects the power consumption current of a system power supply; determining that the power consumption current is larger than or equal to a first limiting current, and detecting the state of the battery; the electronic equipment determines that the battery is in a discharging state, namely, the first charging current is raised to prevent the battery from being powered down, and then returns to the step of detecting the power consumption current of the system power supply until the detected power consumption current is smaller than the first limiting current, namely, the electronic equipment is in a low power consumption state; the electronic device determines that the battery is in a charged state, i.e., reduces the first charging current, avoids the first charging current from being too high to affect charging safety, and then returns to the step of detecting the power consumption current of the system power supply until it is determined that the detected power consumption current is less than the first limiting current. Thus, the problem of lower and lower electric quantity is avoided while the charging safety of the electronic equipment is ensured.

Description

Charging method, electronic equipment and storage medium
Technical Field
The present application relates to the field of electronic devices, and in particular, to a charging method, an electronic device, and a storage medium.
Background
Along with the continuous expansion of functions of electronic devices such as mobile phones and tablet computers, the use frequency of the electronic devices in daily life is also continuously increased. Taking a tablet computer as an example, after a user uses the tablet computer for a period of time, the situation of insufficient electric quantity may occur, namely, the charger matched with the tablet computer is required to be used for charging.
In the process of charging an electronic device, a user may also have a requirement of using the electronic device, so that it has become a common scenario that the electronic device is used by the user while being charged. In the process of charging the electronic device, if a user uses a game application, a video playing application, a short video playing application or other large-power-consumption applications at the same time, the temperature of the electronic device can be quickly increased. At present, in order to avoid the safety problem caused by the high temperature of the electronic equipment, a temperature control strategy is generally used during charging, and the continuous temperature rise of the electronic equipment is avoided by limiting the charging current of the electronic equipment connected from a charger. However, limiting the magnitude of the charging current that the electronic device accesses from the charger may cause a problem in that the electronic device is getting less and less charged during charging.
Disclosure of Invention
In order to solve the problems, the application provides a charging method, electronic equipment and a storage medium, and aims to avoid the problem that the electric quantity of the electronic equipment is smaller and smaller in the charging process while ensuring the charging safety of the electronic equipment, so that the use experience of a user is improved.
In a first aspect, the present application provides a charging method applied to an electronic device, where the electronic device may be an electronic device including a battery and a system power source, such as a mobile phone, a tablet pc, and the electronic device is connected to a charger, and the electronic device is charged with a first charging current from the connected charger. The charging method comprises the following steps: the electronic equipment detects the power consumption current of the system power supply, compares the power consumption current with the first limiting current determined based on the temperature control strategy, and determines whether the electronic equipment is in a high power consumption state or a low power consumption state. And if the electronic device determines that the power consumption current is greater than or equal to the first limiting current, detecting the state of the battery. The battery includes a charging state indicating that the first charging current of the electronic device from the charger is charging the battery, and a discharging state indicating that the first charging current of the electronic device from the charger is insufficient for the system power source to consume, and also requires the battery to supply power to the system power source.
Therefore, the electronic device determines that the power consumption current is greater than or equal to the first limiting current, and the battery is in a discharging state, the electronic device increases the first charging current which the electronic device accesses from the charger, and returns to the step of detecting the power consumption current of the system power supply, that is, the electronic device circularly executes the step of detecting the power consumption current of the system power supply, and continues to execute the subsequent steps until the electronic device determines that the detected power consumption current is less than the first limiting current, and the cycle can be ended without returning to the step of detecting the power consumption current of the system power supply.
The electronic equipment determines that the power consumption current is greater than or equal to the first limiting current, the battery is in a charging state, the electronic equipment reduces the first charging current which is accessed from the charger by the electronic equipment, and the electronic equipment also returns to the step of detecting the power consumption current of the system power supply until the detected power consumption current is determined to be smaller than the first limiting current.
In this way, the electronic device is in a high power consumption state, and based on the state of the battery, the electronic device adjusts the first charging current it accesses from the charger. The battery is in a discharged state, the electronic device may raise the first charging current to prevent the battery from powering down. The battery is in a charging state, so that the electronic equipment can reduce the first charging current, the influence of the overhigh first charging current on the charging safety is avoided, until the electronic equipment is changed from a high-power-consumption state to a low-power-consumption state, and the electronic equipment can not adjust the charging current accessed from the charger. The application can ensure the charging safety of the electronic equipment and avoid the electric quantity of the electronic equipment from being reduced in the charging process.
In one possible implementation, the electronic device determines that the battery is in a discharged state, and may first boost the first charging current to the second charging current. And then the electronic equipment detects the power consumption current of the system power supply again, determines that the detected power consumption current is greater than or equal to the first limiting current, detects the state of the battery again, determines whether the battery is in a discharging state, can continuously raise the second charging current to the third charging current, and returns to the step of detecting the power consumption current of the system power supply until the detected power consumption current is determined to be less than the first limiting current, and does not detect the power consumption current any more. Therefore, when the electronic equipment is continuously in high power consumption and the battery is continuously in a discharging state, the electronic equipment can increase the charging current accessed from the charger for a plurality of times, and power failure is further avoided.
In one possible implementation, the electronic device determines that the battery is in a discharged state, and first increases the first charging current to the fourth charging current. And then the electronic equipment detects the power consumption current of the system power supply again, determines that the detected power consumption current is greater than or equal to the first limiting current, detects the state of the battery again, determines that the battery is in a charging state at the moment, reduces the fourth charging current to the fifth charging current, and returns to the step of detecting the power consumption current of the system power supply until the detected power consumption current is determined to be smaller than the first limiting current. Therefore, when the electronic equipment is continuously in a high power consumption state, based on the state of the battery, the electronic equipment can firstly raise the charging current accessed from the charger, then lower the charging current accessed from the charger, and ensure the charging safety while avoiding power failure.
In one possible implementation, the electronic device determines that the battery is in a charged state, and first reduces the first charging current to the sixth charging current. And then the electronic equipment detects the power consumption current of the system power supply again, determines that the detected power consumption current is greater than or equal to the first limiting current, detects the state of the battery again, determines whether the battery is in a charging state, continuously reduces the sixth charging current to the seventh charging current, and returns to the step of detecting the power consumption current of the system power supply until the detected power consumption current is determined to be less than the first limiting current. Therefore, when the electronic equipment is continuously in high power consumption and the battery is continuously in a charging state, the electronic equipment can reduce the charging current accessed from the charger for multiple times, and charging safety is further ensured.
In one possible implementation, the electronic device determines that the battery is in a charged state, and first reduces the first charging current to the eighth charging current. And then the electronic equipment detects the power consumption current of the system power supply again, determines that the detected power consumption current is greater than or equal to the first limiting current, detects the state of the battery again, determines that the battery is in a discharging state at the moment, can raise the eighth charging current to the ninth charging current, and returns to the step of detecting the power consumption current of the system power supply until the detected power consumption current is determined to be smaller than the first limiting current. Therefore, when the electronic equipment is in a high power consumption state, based on the state of the battery, the electronic equipment can firstly reduce the charging current accessed from the charger and then raise the charging current accessed from the charger, so that the charging safety is ensured and meanwhile the power failure is avoided.
In one possible implementation, the electronic device first obtains a first model specification of a charger connected thereto. Based on the first model specification, the electronic device determines a first output current corresponding to the first model specification as a second limiting current according to the corresponding relation between the model specifications of the plurality of chargers and the charging currents of the plurality of chargers, namely, the first output current and the first model specification have a corresponding relation and are used for limiting the charging current of the electronic device accessed from the chargers. The electronic device determines that the battery is in a discharge state, and raises the first charging current, and makes the raised first charging current not exceed the second limiting current. The electronic device determines that the battery is in a charged state, reduces the first charging current, and enables the reduced first charging current not to exceed the second limiting current. Therefore, under high power consumption, the electronic equipment prevents the charging current accessed by the electronic equipment from being too high based on the second limiting current, maintains the safety of the charger during charging, and further ensures the charging safety.
In one possible implementation, the electronic device first obtains a second model specification of a charger connected thereto, and obtains a first temperature of the charger. And the electronic equipment determines a second output current corresponding to the second model specification and the first temperature as a third limiting current according to the corresponding relation among the model specifications of the plurality of chargers, the charging currents of the plurality of chargers and the temperatures of the plurality of chargers, namely the second model specification, the first temperature and the second output current. The electronic device determines that the battery is in a discharge state, and raises the first charging current, and makes the raised first charging current not exceed the third limiting current. The electronic device determines that the battery is in a charged state, reduces the first charging current, and enables the reduced first charging current not to exceed the third limiting current. Therefore, under the condition of high power consumption, the electronic equipment can avoid the problem of overhigh temperature of the charger caused by overhigh charging current accessed by the electronic equipment based on the third limiting current, and further ensure the charging safety.
In one possible implementation, the electronic device first obtains a second temperature of the battery and a first voltage of the battery. And determining a first input current corresponding to the second temperature and the first voltage according to the corresponding relation between the second temperature and the first voltage at the temperatures of the batteries, the voltages of the batteries and the input currents of the batteries. The charging current from the charger is input to the battery through the charge pump. The electronic device then obtains the ratio of the output current of the charge pump to its input current as the ratio of the charge pump. The electronic device then defines a charging current that the electronic device accesses from the charger using a ratio of the first input current of the battery and the ratio of the charge pump as a fourth defined current. The electronic device determines that the battery is in a discharge state, and raises the first charging current, and makes the raised first charging current not exceed the fourth limiting current. The electronic device determines that the battery is in a charged state, reduces the first charging current, and enables the reduced first charging current not to exceed the fourth limiting current. Therefore, under the condition of high power consumption, the electronic equipment can avoid the problem of overhigh battery temperature caused by overhigh charging current accessed by the electronic equipment based on fourth limiting current, and further ensure the charging safety.
In one possible implementation, the electronic device determines the state of the battery by detecting the current of the battery. The electronic equipment determines that the current of the battery is the output current of the output battery, namely the output current of the battery is consumed by a system power supply, and the absolute value of the current is larger than a first preset current, and the electronic equipment determines that the battery is in a discharging state and increases a first charging current connected from a charger. The electronic equipment determines that the current of the battery is the input current of the input battery, namely the charging current of the charger is input into the battery, and the absolute value of the current is larger than the second preset current, and then the electronic equipment determines that the battery is in a charging state, so that the first charging current connected from the charger is reduced. Thus, the more accurate state of the battery is determined in consideration of the influence of the fluctuation of the power consumption current on the current fluctuation of the battery.
In one possible implementation, the electronic device determines the state of the battery by detecting a first average current of the battery over a first preset period of time. The electronic device determines that the first average current of the battery is an output current of the output battery, that is, the current output by the battery in a first preset time period exceeds the input current, and the absolute value of the current is larger than a third preset current, and then the electronic device determines that the battery is in a discharging state, and increases the first charging current accessed from the charger. The electronic device determines that the first average current of the battery is an input current of the input battery, that is, the current input by the battery in a first preset time period exceeds the output current, and the absolute value of the current is larger than a fourth preset current, and then the electronic device determines that the battery is in a charging state, and reduces the first charging current connected from the charger. Therefore, the state of the battery in the first preset time period is determined more accurately by further considering the influence of the real-time fluctuation of the power consumption current on the current fluctuation of the battery, and the charging current is prevented from being adjusted too frequently.
In one possible implementation, the electronic device may obtain a difference between a maximum current and a minimum current of the battery within a current fluctuation range as a difference of the current fluctuation range of the battery, and the difference of the current fluctuation range is obtained by subtracting the minimum current from the maximum current, for example. The electronic device may use one half of the difference in the current fluctuation range as the first preset current or may use it as the second preset current. Therefore, the fluctuation of the battery caused by the fluctuation of the power consumption of the electronic equipment in the charging process of the electronic equipment is considered, so that the more accurate state of the battery can be determined.
In one possible implementation, the electronic device also obtains a difference in the current fluctuation range of the battery. And the electronic equipment takes one sixth of the difference value of the current fluctuation range as a third preset current and a fourth preset current. Thus, the accurate state of the battery is further determined in consideration of the influence of power consumption fluctuation of the electronic device on the battery.
In one possible implementation manner, in a process of running the first application program in a state that the electronic device is not connected to the charger, a power consumption current of a system power supply of the electronic device is larger than a fifth preset current, which indicates that the electronic device is in high power consumption. And the electronic equipment acquires the maximum value of the current consumed and output by the power supply of the battery supply system and the minimum value of the current consumed and output by the power supply of the battery supply system in the process of running the first application program, and takes the difference value between the maximum value of the current and the minimum value of the current as the difference value of the current fluctuation range of the battery. Therefore, the current fluctuation condition of the battery is obtained when the electronic equipment is in high power consumption, the calculated difference value of the current fluctuation range is more referential, and the more accurate state of the battery can be determined.
In one possible implementation, the electronic device first configures the charging current that is accessed from the charger not to exceed the first defined current, i.e., charges the electronic device based on the temperature control strategy. The electronic equipment detects the state of the battery again, determines that the battery is in a discharging state, indicates that the electric quantity of the electronic equipment is decreasing, and releases the configuration that the charging current accessed from the charger does not exceed the first limiting current, namely, the temperature control strategy is not adopted to charge the electronic equipment. In the process of charging the electronic equipment without adopting the temperature control strategy, if the electronic equipment determines that the power consumption current of the system power supply is greater than or equal to the first limiting current, the charging current is continuously adjusted based on the state of the battery until the electronic equipment determines that the detected power consumption current is smaller than the first limiting current, namely, the electronic equipment is in a low power consumption state, and the step of configuring the charging current not to exceed the first limiting current can be returned. Therefore, when the electronic equipment is in high power consumption, the battery can be prevented from being powered down while the charging safety is ensured, and when the electronic equipment is in low power consumption, the battery can be normally charged while the charging safety is ensured, so that the charging process can be safely and efficiently carried out.
In one possible implementation, the electronic device includes a display screen, and the electronic device may detect the state of the display screen first. The electronic device determines that the battery is in a discharging state and the screen is in a bright screen state, further indicates that the electronic device is in a high power consumption mode, and can release the limitation of the charging current configuration not exceeding the first limiting current. Thus, the power consumption condition of the electronic equipment is determined more accurately based on the state of the display screen.
In one possible implementation manner, the electronic device includes a display screen, and the electronic device may detect a state of the display screen first, determine that the power consumption current is greater than or equal to the first limiting current, and the state of the display screen is a bright screen state, and then detect a state of the battery. When the electronic device determines that the power consumption current is greater than or equal to the first limiting current, continuously adjusting the charging current accessed from the charger based on the state of the battery until the electronic device determines that the detected power consumption current is less than the first limiting current and the detected state of the display screen is the screen-off state, the charging current accessed from the charger can be not adjusted any more. Thus, the power consumption condition of the electronic equipment can be determined more accurately based on the state of the display screen.
In a second aspect, the present application provides an electronic device comprising a memory and a processor; the memory stores computer program code, the computer program code comprising computer instructions; the one or more processors invoke computer instructions to cause the electronic device to perform the method of the first aspect described above.
In a third aspect, the present application provides a computer readable storage medium having a computer program stored therein, which when executed by a processor, implements the method of the first aspect described above.
According to the technical scheme, the application has the following beneficial effects:
the application compares the power consumption current of the system power supply with the first limiting current, and when the power consumption current is detected to be larger than or equal to the first limiting current, the electronic equipment is in a high power consumption state at the moment, and the state of the battery is further detected: when the battery is in a discharging state, the first charging current can be raised to prevent the battery from being powered down, and the step of detecting the power consumption current of the system power supply is returned until the detected power consumption current is determined to be smaller than the first limiting current, which indicates that the electronic equipment is in a low power consumption state at this time, and the charging current of the electronic equipment connected from the charger can not be adjusted.
When the battery is in a charging state, the first charging current can be reduced, the influence of the first charging current on the charging safety caused by overhigh charging current is avoided, and the step of detecting the power consumption current of the system power supply is returned until the detected power consumption current is determined to be smaller than the first limiting current, which indicates that the electronic equipment is in a low-power consumption state at the moment, and the charging current of the electronic equipment connected from the charger can be not regulated.
Therefore, in the application, a solution which can not only meet the charging safety as much as possible, but also meet the power consumption requirement of the power supply of the charging complementary system as much as possible is provided, namely, the problem that the electric quantity of the electronic equipment is smaller and smaller in the charging process is avoided while the charging safety of the electronic equipment is ensured, and the charging process can be safely and stably carried out.
Drawings
Fig. 1 is a diagram of a mobile phone charging architecture according to an embodiment of the present application;
fig. 2 is a schematic diagram of another mobile phone charging architecture according to an embodiment of the present application;
fig. 3 is a schematic diagram of mobile phone charging according to an embodiment of the present application;
fig. 4 is a schematic diagram of another mobile phone charging according to an embodiment of the present application;
fig. 5 is a flowchart of a charging method according to an embodiment of the present application;
fig. 6 is a diagram illustrating a composition example of an electronic device according to an embodiment of the present application.
Detailed Description
For clarity and conciseness in the description of the embodiments below, the words involved in the embodiments of the present application will be first described. It should be understood that the description is for the purpose of clearly understanding the embodiments of the present application and is not necessarily to be construed as limiting the embodiments of the present application.
And (3) a system power supply: the power supply for supplying power when the electronic equipment generates power consumption, namely the electric quantity consumed by the operation of the electronic equipment is provided by the system power supply. When the electronic equipment is not charged, the battery of the electronic equipment can supply power to the system power supply; when the electronic equipment is charged, the charging current which is accessed by the electronic equipment from the charger can supply power to the system power supply, and when the charging current is insufficient for the consumption of the system power supply, the battery can also supply power to the system power supply.
Charge pump charging chip: the charge pump is a switched capacitor voltage converter, and the charge pump charging chip charges the electronic device by using an adjustable voltage, so that the electronic device can be charged quickly. The charge pump may be used to generate an output voltage that is less than the input voltage, i.e., to generate an output current that is greater than the input current. In the embodiment of the application, the charge pump can receive the charging current of the charger and generate the output current which is larger than the charging current of the charger, and the output current of the charge pump can charge the battery or can be consumed by a system power supply. Hereinafter, the embodiment will be simply referred to as a charge pump.
BUCK chip that charges: the BUCK converter is used for charging the electronic equipment by using stable voltage, and the BUCK charging chip can realize slow charging of the electronic equipment. Hereinafter, the example will be simply referred to as BUCK. In some embodiments, the output current of the charge pump is input to the BUCK charging chip, which then inputs the output current to the system power supply for consumption.
Charge pump ratio: refers to the ratio between the output current of the charge pump and the input current of the charge pump. In some embodiments, the charge pump may be generating a multiple increase in current, e.g., 2,3, or 4, etc., with a corresponding charge pump ratio of 2,3, or 4. Illustratively, the charge pump ratio is 3, then the charge pump may produce an output current that is 3 times the input current.
Temperature control strategy: the method is a strategy for controlling charging current of the electronic equipment from a charger in order to avoid overhigh temperature of the electronic equipment in the charging process. Illustratively, the temperature control strategy limits the charging current of the electronic device from the charger to a maximum of 4.5A (which may be referred to as limiting current) when the temperature of the electronic device reaches 37 ℃, and the first limiting current of the temperature control strategy is 2A when the temperature of the electronic device reaches 45 ℃.
The technical advantages of the charging method, the electronic device and the storage medium provided by the application are contrasted and described below with reference to the related art. For ease of understanding, the description is provided by way of an example scenario. In this example scenario, the electronic device is a cell phone.
In the related art, in the process of charging the mobile phone, it is assumed that the user does not continue to use or uses the browser to browse news and the like, the power consumption of the mobile phone is low (i.e., the mobile phone is in a low power consumption state), and at this time, the charging current of the charger can charge the battery of the mobile phone and also can be used for the system power consumption of the mobile phone.
As shown in fig. 1, the charging current of the charge pump input to the charger interface of the mobile phone is I bus, the output current of the charge pump is I out, the input current of the battery is I bat, and the input current of the charge pump through the BUCK input system power supply is I sys. And when the power consumption of the mobile phone is low, I out=Ibat+Isys is adopted. That is, when the power consumption of the mobile phone is low, the power consumption required by the system power supply of the mobile phone is low, and the output current of the charge pump can be input into the system power supply for consumption of the system power supply or can be input into the battery for charging.
But the user may still have a need for use during the charging of the handset. It is assumed that during the charging process of the mobile phone, the user uses the mobile phone to watch live broadcast, play games, etc., and at this time, the power consumption of the mobile phone is high (i.e. the mobile phone is in a high power consumption state), which can cause the temperature of the mobile phone to rise rapidly. At present, in order to avoid the safety problem caused by the high temperature of the mobile phone, a temperature control strategy is generally used during charging, and the continuous temperature rise of the mobile phone is avoided by limiting the charging current of the mobile phone from the charger. However, the situation that the charging current of the charger cannot be used for the system power supply of the mobile phone possibly occurs, and the battery of the mobile phone is required to discharge to supply power to the system power supply at the moment, so that the situation that the electric quantity of the mobile phone is still reduced in the charging process of the mobile phone can occur.
As shown in fig. 2, when the power consumption of the mobile phone is high, I out+Ibat=Isys. That is, when the power consumption of the mobile phone is high, the input current required by the system power supply of the mobile phone is also increased, the output current of the charge pump is insufficient for the system power supply consumption, and the output current of the battery is also required for the system power supply consumption.
As shown in fig. 3, when the mobile phone is connected to the charger to charge, the user watches live broadcast on the mobile phone, and after 20 minutes, the electric quantity may be reduced from 30% to 28%, which easily affects the use experience of the user.
Accordingly, in order to solve the above-described problems, embodiments of the present application provide a charging method, an electronic device, and a storage medium. In the charging method, in the process of charging the electronic equipment, the power consumption current of a system power supply is detected, and when the power consumption current is determined to be greater than or equal to the limiting current determined based on a temperature control strategy, namely the electronic equipment is in a high power consumption state, if the fact that the battery is discharged for the consumption of the system power supply is detected, the charging current of the electronic equipment which is accessed from a charger is raised, so that the battery is prevented from being powered off; when the electronic equipment is in a high power consumption state, the charging current of the charger is detected to be received by the battery for charging, so that the charging current is reduced, and the influence of the overhigh charging current on the charging safety is avoided. That is, the electronic device is in high power consumption, so that the charging current of the electronic device connected from the charger is only consumed by the system power supply as much as possible. Thus, the situation that the electric quantity of the electronic equipment is reduced in the charging process is avoided; but also can ensure the charging safety of the electronic equipment.
In order to make the technical personnel in the technical field more clearly understand the scheme of the application, the application scenario of the technical scheme of the application is first described below.
The charging method provided by the embodiment of the application can be implemented in a scene that a user uses the electronic equipment in the process of charging the electronic equipment.
Referring to fig. 4, a charging method provided by an embodiment of the present application will be exemplarily described below using an electronic device as a mobile phone 400. In this scenario, the power of the mobile phone is 30%, the mobile phone 400 is connected to the charging cord 401 through the charging interface, the charging cord 401 is connected to the charger 402, and the charger 402 is connected to the patch board 403, so that the mobile phone 400 can be charged by charging current from the charger 402 through the charging cord 401.
In some embodiments, it is assumed that during charging of the handset 400, the user views live broadcast using a short video application of the handset 400. As shown in fig. 4, the mobile phone 400 displays a main interface 410, and the power of the power icon 411 of the main interface 410 is displayed as 30%. The main interface 410 includes application icons of a plurality of application programs, such as application icons 412 of a video playback application. The user may trigger an application icon 412 of the video playing application, and the mobile phone 400 starts the video playing application in response to the triggering operation of the user. The cell phone 400 displays the pick-up recommendation interface 420 of the video playing application, and the user can select the thumbnail of live a triggering the pick-up recommendation interface 420, and the cell phone 400 displays the live interface 430 of live a for viewing by the user.
It should be noted that, during the triggering operation of the mobile phone 400 by the user and the live broadcast a watching process by the user, the mobile phone 400 is always in the charging process.
In some embodiments, the mobile phone 400 initially defines the magnitude of the charging current based on the temperature control policy, and the mobile phone 400 detects that the screen (may also be referred to as a display screen) is in a bright screen state, and detects that the battery is in a discharging state, that is, the charging current that the mobile phone 400 accesses from the charger 402 cannot be consumed by the system power supply of the mobile phone 400, and the battery of the mobile phone 400 is required to be discharged for the system power supply. The handset 400 may enter a power-down prevention mode at this point, i.e., the temperature control strategy is no longer used to limit the amount of charging current that the handset 400 is connected to from the charger 402.
After entering the anti-power-down mode, if the mobile phone 400 detects that the current consumed by the system power supply is greater than or equal to the first limiting current of the temperature control strategy and the battery is in a discharging state, the charging current of the mobile phone 400 connected from the charger 402 is not enough to be consumed by the system power supply, and in order to avoid the electric quantity of the mobile phone 400 from being reduced due to the fact that the battery supplies power to the system power supply and influences the subsequent use of a user, the mobile phone 400 can raise the charging current connected from the charger 402; if the mobile phone 400 detects that the current consumed by the system power supply is greater than or equal to the first limiting current of the temperature control strategy, and the battery is in a charging state, it indicates that the charging current of the mobile phone 400 from the charger 402 is sufficient to consume the system power supply, in order to avoid the potential safety hazard caused by charging and heating, the mobile phone 400 can reduce the charging current from the charger 402. That is, the mobile phone 400 controls its battery to be in a state of neither charging nor discharging as much as possible. As shown in fig. 1 and fig. 2, when the power consumption of the mobile phone 400 is high, I out≈Isys,Ibat is approximately equal to 0 as much as possible.
If the mobile phone 400 detects that the power consumption current consumed by the system power supply is smaller than the first limiting current of the temperature control strategy, the mobile phone 400 is in a low power consumption state, the power failure prevention mode can be exited, and the mobile phone 400 can continue to limit the charging current accessed from the charger by adopting the temperature control strategy.
As shown in fig. 4, after the user views live broadcast a for 20 minutes, the power displayed by the power icon 411 of the mobile phone 400 is still 30%, and no power reduction or even power exhaustion is turned off. Therefore, the mobile phone 400 can adjust the charging current accessed from the charger in real time, and under the premise of ensuring the charging safety of the mobile phone 400, the situation that the electric quantity is reduced in the process that a user uses the mobile phone 400 being charged is avoided, and the use experience is improved.
It should be noted that, the above-mentioned condition that the mobile phone 400 enters the power-down preventing mode of the mobile phone and the condition that the mobile phone 400 exits the power-down preventing mode are only examples. The condition that the mobile phone 400 enters the mobile phone power-down prevention mode may be just that the battery is detected to be in a discharging state, or that the current consumed by the system power supply is larger than the first limiting current of the temperature control strategy, or the like. The condition that the mobile phone 400 exits the power-down prevention mode may be that the screen of the mobile phone 400 is detected to be in a screen-off state, etc. The application is not limited in this regard.
Next, still taking the electronic device as a mobile phone, the mobile phone is taken as an example in the charging process, and the charging method provided by the embodiment of the application is described in detail with reference to fig. 5.
As shown in fig. 5, the charging method provided by the embodiment of the application mainly includes the following steps:
S501: the mobile phone determines whether the current of the battery is less than 0, if yes, S502 is executed, otherwise S501 is executed again.
In the embodiment of the present application, the current of the input battery is set as a positive direction, that is, the input current of the input battery is greater than 0, and the current of the output battery is set as a negative direction, that is, the output current of the output battery is less than 0.
During charging of the handset, the battery state may include a charged state, a discharged state, and a rest state. In the charged state, the charger is indicated to charge the battery of the mobile phone, and the current of the battery is larger than 0. As shown in fig. 1, the current direction of I bat is directed toward the battery, indicating that the charger is charging the battery.
In a discharge state, the battery is used for supplying power to a system power supply of the mobile phone, and the current of the battery is smaller than 0. As shown in fig. 2, the current direction of I bat points to the system power supply, which indicates that the battery is supplying power to the system power supply of the mobile phone, and the situation that the electric quantity of the mobile phone is gradually reduced in the charging process may occur.
In a static state, the current input by the charger is indicated to be just consumed by a system power supply of the mobile phone through the charge pump, and the battery is in a state of not being charged or discharged.
In some embodiments, the mobile phone initially charges based on a temperature control strategy, that is, a charging current accessed by the electronic device from the charger is limited based on a first limiting current determined by the temperature control strategy. The mobile phone can detect the current of the battery, when the mobile phone detects that the current of the battery is less than 0, the battery is determined to be in a discharging state, namely, the current output by the charge pump cannot maintain the normal consumption of the system power supply of the mobile phone, and the battery also needs to supply power to the system power supply of the mobile phone.
The first defined current of the temperature control strategy is a current determined based on battery temperature safety considerations of the handset. When the battery power of the mobile phone is reduced in the charging process, the mobile phone indicates that the temperature of the mobile phone exceeds a temperature threshold value, and the mobile phone limits the charging current accessed from the charger based on the first limiting current of the temperature control strategy, so that the battery power is possibly reduced.
In addition, in some embodiments, it may also be that the current direction of the battery is determined, when it is determined that the current of the battery is the output current of the output battery, and the absolute value of the output current is greater than 0, S502 is executed, otherwise S501 is executed again.
The comparison of the current of the battery and the magnitude of 0 is merely an example, and the present application is not limited to the value of the current used for comparing the battery, and it is sufficient to determine that the battery is in a discharge state.
The hardware structure of the mobile phone comprises a power management module, and the power management module is connected with a battery. The method can detect battery state data such as battery voltage, battery current and the like of the battery in real time. Therefore, the mobile phone can directly acquire the current of the battery through the power management module.
In some embodiments, taking an Android system running on a mobile phone and taking a layered architecture as an example, a software structure of the mobile phone includes a kernel layer, where the kernel layer includes a power management driver, and the power management driver is used to provide a power management interface for the mobile phone to obtain battery state data such as battery voltage and battery current.
It should be appreciated that the power consumption of the system power supply is unstable when the user uses the handset. For example, if the user plays the game a of team competition by using the mobile phone, the power consumption of the power supply of the mobile phone system is relatively large when the user operates the game character to play, and the power consumption of the power supply of the mobile phone system is also reduced when the game character operated by the user is off line and waits for reactivation.
Therefore, during the process of using the mobile phone by the user, the power consumption current of the system power supply can fluctuate. It may happen that when the mobile phone is in a charging process, the current output by the charge pump may be consumed by the system power supply at one time, and the current cannot be consumed by the system power supply at one time, which may cause the current of the battery to be greater than 0 and in a charging state and less than 0 and in a discharging state, that is, the current of the battery is unstable due to the fluctuation of the power consumption of the system power supply.
Therefore, in some embodiments, the mobile phone may detect the current of the battery in the second preset time period, calculate the second average current of the battery in the second preset time period, and then compare the second average current with 0 to determine whether the second average current of the battery in the second preset time period is less than 0, that is, determine whether the battery is more likely to be in a discharge state in the second preset time period. Illustratively, the second preset time period may be 5s,10s, 15s, or the like, which is not limited by the present application.
In addition, in some embodiments, it may also be that the current direction of the second average current of the battery is determined, when it is determined that the second average current of the battery is the output current of the output battery, and the absolute value of the second average current is greater than the sixth preset current, S502 is executed, otherwise S501 is executed again. Illustratively, the sixth predetermined current may be 0, as the application is not limited in this regard.
In some embodiments, the second preset time period may be preset according to models, charging modes, and the like of different electronic devices, which is not limited in the present application.
Thus, based on the second average current of the battery in the second preset time period, the determined battery state is more stable and accurate.
S502: the mobile phone judges whether the screen is in the off-screen state, if so, S501 is executed again, and if not, S503 is executed.
The screen (also referred to as a display) of a mobile phone is divided into two states, including a bright screen state and a dark screen state. The bright screen state indicates that the screen of the mobile phone is on, and the off screen state indicates that the screen of the mobile phone is off.
When the screen of the mobile phone is in a bright screen state, it may be that the user is using, and when the screen of the mobile phone is in a dead screen state, the screen of the mobile phone indicates that the user is not using. Therefore, the mobile phone can detect the screen state to judge whether the user uses the mobile phone in the charging process, namely whether the mobile phone possibly has high power consumption, so that the battery is in a discharging state.
In some embodiments, when the screen of the mobile phone is changed between the on-screen state and the off-screen state, broadcast events are sent, and the mobile phone monitors the broadcast events to determine the screen state.
In some embodiments, the handset may determine the screen status by detecting whether there is a trigger operation on the screen. When the mobile phone detects that the display screen has triggering operation, the screen is judged to be in a bright screen state.
Therefore, in the process of charging the mobile phone, when the mobile phone determines that the screen is in a bright screen state and the current of the battery is less than 0, the current output by the charger through the charge pump is insufficient for the system power consumption of the mobile phone, in order to avoid the situation that the current of the battery supplies power to the system power, the mobile phone is reduced in the charging electric quantity, and then the mobile phone can enter an anti-power-down mode. That is, the first defined current of the temperature control strategy is no longer used by the handset to limit the charging current drawn from the charger.
It should be noted that the application is not limited to the execution sequence of S501 and S502, and the mobile phone may first determine whether the screen is in the off-screen state, or else, execute the step of determining whether the current of the battery is less than 0. The application is not limited in this regard.
The above S501-S502 may be used as a condition for determining that the mobile phone enters the power-down preventing mode.
It should be noted that, S502 is an optional execution step, and the judging condition for the mobile phone to enter the anti-power-down mode may be S501 only, that is, whether the mobile phone needs to enter the anti-power-down mode is determined according to the judging result of whether the current of the battery is less than 0.
In some embodiments, the condition that the mobile phone enters the power-down prevention mode may also be that the mobile phone detects that the current of the system power supply is smaller than the first limiting current of the temperature control strategy. The application is not limited in this regard.
S503: the mobile phone judges whether the power consumption current of the system power supply is smaller than the first limiting current, if yes, the step S501 is executed, otherwise, the step S504 is executed.
The first limiting current is determined based on a temperature control strategy.
S503 and S504 may be used as a condition for determining that the mobile phone exits the power-down prevention mode.
After entering the power-down prevention mode, the mobile phone is not charged by adopting a temperature control strategy.
When the power consumption current of the system power supply is smaller than the first limiting current of the temperature control strategy, the fact that the mobile phone is charged by the temperature control strategy is indicated that the charging current accessed from the charger can be used for the system power supply to consume and can also charge the battery, so that the power failure prevention mode can be exited at the moment, and the temperature control strategy is continuously used for charging. And continues to S501 again.
When the power consumption current of the system power supply is greater than or equal to the first limiting current of the temperature control strategy, the mobile phone is indicated to be charged by the temperature control strategy, the charging current accessed from the charger cannot be consumed by the system power supply, the battery is required to be discharged for the system power supply consumption, and the temperature control strategy can be not used, so that S504 can be continuously executed.
S504: the mobile phone judges whether the screen is in the off-screen state, if yes, S501 is executed, otherwise S505 is executed.
In some embodiments, the mobile phone may determine whether the screen is in a screen-off state, and if the screen is in the screen-off state, it indicates that the user does not use the mobile phone, and may exit the power-down prevention mode. After exiting the power down prevention mode, S501 may continue to be performed. If the screen is in the bright state, indicating that it is likely that the user is using the mobile phone, the execution of S505 may be continued.
It should be noted that, S504 is an optional execution step, and the condition for exiting the anti-power-down mode of the mobile phone may be S503 only, that is, whether the mobile phone needs to exit the anti-power-down mode is determined according to a determination result that whether the power consumption current of the system power supply is less than the first limiting current of the temperature control strategy.
S505: the mobile phone obtains the long-term charging current of the charger as a second limiting current.
The charging current of the charger (which may also be referred to as the output current of the charger) refers to the current that the charger is able to deliver to the mobile phone during charging. The charging current of the chargers with different powers in the charging process is different, and the charger with large charging current can fully charge the battery of the mobile phone in a short time; otherwise, the charger with small charging current can take a long time to fully charge the battery of the mobile phone. However, if the charging current of the charger is too large, the charging heat is caused when the charging current exceeds the long-term charging current, namely, the charger and the mobile phone generate heat in the charging process to generate potential safety hazards.
The long-term charging current of the charger refers to the current output by the charger in a long-term stable operating state.
If the user continuously uses the high-power-consumption application in the process of charging the mobile phone, the mobile phone is in a high-power-consumption working condition for a long time. As described in the above embodiment, when the mobile phone enters the power-down prevention mode, the temperature control strategy is not used to limit the charging current connected from the charger, which may cause the charger to output excessive current for a long time, so as to cause charging and heating, and exceed the bearing capacity of the charger, thereby causing a safety problem.
Therefore, in order to avoid the potential safety hazard caused by the excessively high charging current connected from the charger, in some embodiments, the mobile phone may store in advance the correspondence between the model specifications of the plurality of chargers and the output currents (i.e. the long-term charging currents) of the plurality of chargers. When the mobile phone is connected with the charger to charge, the mobile phone can detect the model specification (also called as a first model specification) of the charger, and then determine the corresponding long-term charging current (also called as a first output current) as a second limiting current based on the corresponding relation between the stored model specifications of the plurality of chargers and the output currents of the plurality of chargers.
Illustratively, a 22.5W model charger corresponds to a first output current of 2A and a maximum output current of 2.25A. If the mobile phone detects that the model specification of the connected charger is 22.5W, 2A can be used as a second limiting current.
It will be appreciated that the output current of the charger can be maintained at this long-term charging current for a long period of time when the temperature of the charger is normal. However, if the temperature of the charger is too high, if the output current is kept at the long-term charging current for a long period of time, the safety of the charger may be a problem.
Accordingly, in some embodiments, the correspondence relationship of the model specifications of the plurality of chargers, the output currents of the plurality of chargers, and the temperatures of the plurality of chargers may be preset. When the mobile phone is connected with the charger to charge, the temperature (also called as a first temperature) of the charger and the model specification (also called as a second model specification) of the charger can be detected, and then based on the temperature range to which the temperature belongs, the long-term charging current (also called as a second output current) corresponding to the temperature range and the model specification is determined as a third limiting current limit.
See table 1, which illustrates exemplary temperature range of the charger versus long-term charging current. The model specification of the charger in table 1 is 22.5W.
TABLE 1
As shown in table 1, when the mobile phone detects that the temperature of the charger is 85 ℃ or lower, 2A can be used as the third limiting current. If the mobile phone detects that the temperature of the charger is greater than or equal to 85 ℃ and less than 100 ℃, 1.5A can be used as a third limiting current. If the mobile phone detects that the temperature of the charger is greater than or equal to 100 ℃ and less than 110 ℃, 1A can be used as a third limiting current.
In some embodiments, one temperature range includes a plurality of temperatures, and thus the correspondence between the temperature range of the charger and the long-term charging current may also be referred to as the correspondence between the temperatures of the plurality of chargers and the plurality of long-term charging currents.
The above is merely an example, and the present application is not limited to the interval value of the temperature range, the number of the temperature ranges, and the long-term charging current corresponding to the temperature range.
Therefore, the mobile phone can avoid bringing potential safety hazards and further improve charging safety based on the detected temperature of the charger and the model specification of the charger, and the determined long-term charging current of the charger is used as the third limiting current.
S506: the mobile phone obtains the constant charging current of the battery, and calculates the ratio of the constant charging current to the charge pump ratio as a fourth limiting current.
The Constant charging Current of the battery refers to the Constant Current of the mobile phone in a Constant Current charging mode (CC). The constant current charging mode is that the current is constant and the voltage is gradually increased when the mobile phone is charged, and the mobile phone enters a quick charging stage. In some embodiments, a constant charging current may balance charging time and charging safety. Illustratively, the constant current may be 4A.
The charge pump ratio refers to the multiple of the increase in charge current from the charger through the charge pump output. For example, the charge pump ratio may be 2, and if the charging current from the charger is 2A, the current output from the charge pump is 4A.
As described above, the power consumption of the mobile phone will fluctuate, and if the mobile phone suddenly enters a sleep state in a high power consumption scenario, the current originally consumed by the system power supply of the mobile phone will enter the battery to charge the battery. When the mobile phone enters the power-down prevention mode, the first limiting current of the temperature control strategy is not adopted any more, and the current entering the battery can be caused to exceed the safety range, so that potential safety hazards are brought.
The constant charging current of the battery is a current balancing the charging time and the charging safety of the mobile phone, that is, the maximum current determined on the premise of ensuring the charging safety of the mobile phone, and if the current entering the battery exceeds the constant charging current, the safety problem may be caused.
Therefore, in some embodiments, the constant charging current of the battery may be obtained, the ratio of the constant charging current to the charge pump ratio may be calculated, the magnitude of the charging current accessed from the charger corresponding to the constant charging current of the input battery may be determined, and the ratio may be used as the fourth limiting current to limit the charging current accessed from the charger by the mobile phone, so as to ensure the charging safety of the mobile phone.
Illustratively, the constant charge current of the battery is 4A and the charge pump ratio is 2, then the ratio of the constant charge current to the charge pump ratio of 2A may be taken as the fourth limiting current.
In some embodiments, the constant charging current of the battery is closely related to the battery temperature and the battery voltage. That is, both the temperature change of the battery and the voltage change of the battery affect the magnitude of the constant charging current.
In one implementation, the mobile phone may store in advance a correspondence relationship between a plurality of constant charging currents (which may also be input currents of the batteries) and temperatures and voltages of the plurality of batteries. The mobile phone can acquire the voltage of the battery and the temperature of the battery in real time based on the power management module, and then determine the constant charging current of the mobile phone based on the corresponding relation between the stored constant charging current and the temperature of the battery and the voltage of the battery.
See table 2, which illustrates exemplary correlations of constant charge current of a battery with temperature of the battery and voltage of the battery. As shown in table 2, in some embodiments, the mobile phone may obtain the temperature (may also be referred to as the second temperature) of the battery and the voltage (may also be referred to as the first voltage) of the battery through the power management module, determine the battery temperature range to which the battery temperature belongs, and the battery voltage range to which the battery voltage belongs, and further determine the constant charging current (may also be referred to as the first input current) of the battery.
For example, if the charge pump ratio of the mobile phone is 2, the mobile phone obtains that the battery temperature is 33 ℃, and the battery voltage is 4.28V, the constant charging current of the battery can be determined to be 6.38A, and the ratio of the constant charging current 6.38A to the charge pump ratio 2 is 3.19A as the fourth limiting current.
TABLE 2
S507: the maximum output current of the mobile phone configuration charger does not exceed the second limiting current and does not exceed the fourth limiting current.
In addition, in some embodiments, the maximum output current of the charger may be configured by the mobile phone not to exceed the third limiting current and not to exceed the fourth limiting current.
The handset configures the maximum output current of the charger, that is, defines the maximum charging current that the handset will access from the charger.
In some embodiments, based on the above embodiments, the second limiting current is a long-term charging current of the charger, and the fourth limiting current is a ratio of a constant charging current of the battery to a charge pump ratio, all taking into account charging safety issues of the mobile phone.
For example, if the specification of the adapted charger model of the mobile phone is 22.5W and the charger temperature is 50 ℃, the long-term charging current thereof can be determined to be 2A based on table 1 in the above embodiment, and 2A is taken as the second limiting current. If the battery temperature of the mobile phone is 18 ℃ and the battery voltage is 4.05V, it may be determined that the constant charge current of the battery is 6.4A based on table 2 in the above embodiment, and the charge pump ratio is 2, and the ratio of the constant charge current 6.4A to the charge pump ratio 2 is 3.2A may be used as the fourth limiting current. The maximum output current of the cell phone configuration charger does not exceed 2A.
The second limiting current and the fourth limiting current are different and are only examples, and the second limiting current and the fourth limiting current may be the same, and the maximum output current of the mobile phone configuration charger may not exceed the minimum limiting current of the two limiting currents.
Further, in some embodiments, S505-507 are optional execution steps. Illustratively, one step may be optionally performed at S505 and 506, and accordingly, only S505 is performed, S507 configures the maximum output current of the charger not to exceed the second limiting current; or only S506 is performed, S507 configures the maximum output current of the charger not to exceed the fourth limiting current. The application is not limited in this regard.
S508: the mobile phone judges whether the current of the battery is greater than a second preset current, if yes, S509 is executed, otherwise S510 is executed.
When the maximum output current of the charger is configured by the mobile phone, the state of the battery may change, so that it is necessary to determine whether the state is in a charged state or a discharged state again.
In some embodiments, it may be determined first whether the battery of the handset is in a charged state. The second preset current is used to determine whether the battery is in a charged state, and if the battery is in a charged state, in order to avoid the charging current from the charger being too high, S509 may be performed to reduce the voltage of the charger, thereby reducing the charging current from the charger. If not, S510 may be further performed to determine whether the battery is in a discharged state.
Illustratively, the second preset current may be 0, as the application is not limited in this regard. In this case, the second preset current is required to be a value greater than or equal to 0.
It should be noted that, whether the battery of the mobile phone is in a discharging state may be determined first, that is, S510 is executed first, and if not, S508 is executed, which is not limited by the present application.
Further, as described above, fluctuations in power consumption of the system power supply may cause the current of the battery to be unstable. Thus, in some embodiments, the mobile phone may also determine whether the first average current of the battery in the first preset time period is greater than the fourth preset current. Illustratively, the first preset time period may be 10s,15s, etc., and the fourth preset current may be 0, which is not limited by the present application. In this case, the fourth preset current is required to be a value greater than or equal to 0.
The charging method provided by the application is to adjust the charging current accessed from the charger in real time, so that the system power consumption of the mobile phone can be enough. That is, the battery is kept in a stationary state, i.e., in a state of neither charging nor discharging, without reducing the electric quantity of the mobile phone as much as possible. However, as described above, when the user uses the mobile phone, the power consumption of the system power supply is unstable, and the current connected to the charger after adjustment may be approximately equal to the current consumed by the system power supply, so that the current of the battery may also fluctuate above and below 0.
Thus, in some embodiments, the second preset current may be set to 100mA or 150mA, or the like. The fourth preset current may be set to 50mA or 60mA or the like, which is not limited by the present application.
In other embodiments, the difference in fluctuation range in which the current value of one battery fluctuates up and down at 0 may be preset. The difference in the fluctuation range refers to the difference between the maximum current value and the minimum current value of the current of the battery in the fluctuation range. And setting the maximum current value of the current of the battery in the fluctuation range as a second preset current, namely, when the mobile phone detects that the current of the battery exceeds the second preset current, determining that the battery is in a charging state.
In one implementation, the second preset current is a maximum current value within the fluctuation range, and a fourth preset current for comparing the first average current of the battery may be determined based on the second preset current. For example, one half or one third of the second preset current may be determined as the fourth preset current, which the present application is not limited to. In this case, the fourth preset current is required to be a value greater than or equal to 0.
For example, if the fluctuation range difference in which the current value of the battery fluctuates up and down at 0 is determined to be 200mA, it is indicated that the current value of the battery fluctuates within (-100 mA,100 mA), and thus the second preset current may be determined to be 100mA, and when the mobile phone detects that the current of the battery is greater than 100mA, it is determined to be in a discharge state.
Illustratively, based on the above example, one half of 100mA, i.e., 50mA, may be determined as the fourth preset current, and the first preset period of time is determined as 10s, and when the mobile phone detects that the first average current of the battery is greater than 50mA within 10s, it is determined to be in a discharge state.
In addition, in some embodiments, it may also be determined that the current direction of the battery, if it is determined that the current of the battery is the input current of the input battery, it may be determined whether the absolute value of the current is greater than the second preset current, if yes, S509 is executed, and if not S510 is executed. In this case, the second preset current is required to be a value greater than or equal to 0.
In still other embodiments, the mobile phone may obtain the maximum output current and the minimum output current of the battery in a scenario where the mobile phone has high power consumption and is not being charged, and obtain the difference value of the current fluctuation range of the battery based on the maximum output current and the minimum output current.
For example, when the mobile phone is not charged and the user uses the mobile phone to play the game a of team sports, the mobile phone may record the output current of the battery within 30 minutes of the game a, and determine that the maximum output current of the battery within the period of time is 6A and the minimum output current is 5.7A, and further determine that the current fluctuation range difference of the battery is 300mA.
Note that, the calculation time of the output current of the battery may be 20 minutes, or the game a may be another first application program with high power consumption, which is not limited in the present application.
In some embodiments, when the mobile phone runs the first application program, the output current of the system power supply is greater than the fifth preset current. Illustratively, the fifth preset current may be 2.5A, etc., which the present application is not limited to.
Based on the above example, if the battery current fluctuation range difference is determined to be 300mA in the scenario where the mobile phone is high in power consumption and is not being charged. Under the condition that the mobile phone is high in power consumption and is charged, the current value of the battery of the mobile phone can be determined to fluctuate within (-150 mA,150 mA), so that one half of 300mA can be used as a second preset current, namely 150mA, and when the mobile phone detects that the current of the battery is larger than 150mA, the mobile phone is determined to be in a discharging state.
Based on the above example, it is also possible to determine 150mA, i.e., one-third of 300mA, i.e., 50mA as the fourth preset current and the first preset period of time as 10s, and determine that the mobile phone is in a discharge state when it detects that the first average current of the battery is greater than 50mA within 10 s.
In addition, in some embodiments, it may also be that the direction of the first average current of the battery is determined, when it is determined that the first average current of the battery is the input current of the input battery, it may be determined whether the absolute value of the first average current is greater than the fourth preset current, if yes, S509 is executed, and if not S510 is executed. In this case, the fourth preset current is required to be a value greater than or equal to 0.
S509: the mobile phone lowers the output voltage of the charger and again performs S503.
When the mobile phone judges that the current of the battery is larger than the second preset current, and the battery is in a charging state, the charging method provided by the application does not adopt a temperature control strategy, so that the charging current accessed from the charger can be reduced in order to avoid the overhigh charging current accessed from the charger by the mobile phone.
In some embodiments, the output voltage of the charger may be reduced, thereby reducing the charging current of the charger.
For example, the voltage to which the charger is connected may be reduced by a second preset value. For example, the second preset value may be 20mV, 40mV, etc., which is not limited in the present application.
However, the output voltage of the charger is reduced, the reduced value of the charging current for the charger cannot be determined, and the output voltage for the charger is reduced too much, which may cause instability in charging the mobile phone.
Thus, in some embodiments, the minimum voltage value that can be varied may be determined according to the model specification of the charger. Taking a 22.5W charger as an example, the minimum voltage value that can be changed is 20mV, the output voltage of the charger can be reduced by 20mV, and accordingly, the charging current of the charger can be reduced by 20mA or 24mA.
Therefore, when the voltage of the charger is adjusted, only the corresponding adjustable minimum voltage value is adjusted at a time, so that the charging stability of the mobile phone can be improved.
In some embodiments, S503 may be executed again after the voltage of the charger is reduced, that is, after the charging current of the mobile phone accessed from the charger is adjusted, it may be determined whether the mobile phone needs to exit the anti-power-down mode at this time, and if the mobile phone needs to be continuously in the anti-power-down mode, the charging current accessed from the charger is continuously adjusted.
In some embodiments, the mobile phone drops the first charging current to a sixth charging current by reducing the voltage of the charger, and returns to S503, and if the mobile phone determines that the power consumption current is greater than or equal to the first limiting current, is in the on-screen state, and the current of the battery is greater than the second preset current, the mobile phone drops the sixth charging current to a seventh charging current by reducing the voltage of the charger again, and returns to S503.
In some embodiments, the mobile phone reduces the first charging current to the eighth charging current by reducing the voltage of the charger, and returns to S503, and if the mobile phone determines that the power consumption current is greater than or equal to the first limiting current, is in the on-screen state, and the current of the battery is less than the first preset current, the eighth charging current is increased to the ninth charging current by increasing the voltage of the charger, and returns to S503.
In some embodiments, based on the above example, after the output voltage of the charger is reduced, the charging current of the charger after the reduction does not exceed the maximum output current configured in S507.
S510: the mobile phone determines whether the current of the battery is less than a first preset current, if yes, S511 is executed, and if not, S503 is executed.
If the mobile phone judges that the current of the battery is smaller than the second preset current, the battery is not in a charging state, so that whether the battery is in a discharging state or not needs to be determined.
The first preset current is used for determining whether the battery is in a discharging state, and if the battery is in a discharging state, in order to avoid a decrease in the electric quantity of the battery when the user uses the mobile phone, S511 may be executed to raise the voltage of the charger, thereby raising the charging current connected from the charger. If not, S503 may be further performed to determine whether to exit the power down prevention mode.
Illustratively, the first predetermined current may be 0, as the application is not limited in this regard.
In addition, the current of the battery may be unstable due to fluctuation in power consumption of the system power supply. In some embodiments, the mobile phone may also determine whether the first average current of the battery in the first preset time period is less than the third preset current. Illustratively, the first preset time period may be 10s,15s, etc., and the third preset current may be 0, which is not limited by the present application.
Based on the above embodiments, it is considered that the current of the battery may also fluctuate up and down 0 due to fluctuation in power consumption of the system power supply.
In some embodiments, the first preset current may be set to-100 mA or-150 mA, or the like. The third preset current may be set to-50 mA or-60 mA, etc., which the present application is not limited to. At this time, the first preset current and the third preset current need to be values less than or equal to 0.
In addition, in some embodiments, it may also be determined that the current direction of the battery, when it is determined that the current of the battery is the output current of the output battery, it may be determined whether the absolute value of the current is greater than the first preset current, if yes, S511 is performed, and if not, S503 is performed again. In this case, the first preset current is required to be a value greater than or equal to 0. The first preset current may be, for example, 100mA or 150mA or the like.
In addition, in some embodiments, it may also be that the direction of the first average current of the battery is determined, when it is determined that the first average current of the battery is the output current of the output battery, whether the absolute value of the first average current is greater than the third preset current may be compared, if yes, S511 is executed, and if not, S503 is executed again. In this case, the third preset current is required to be a value greater than or equal to 0. The third preset current may be, for example, 50mA or 60mA or the like.
In other embodiments, the difference in fluctuation range in which the current value of one battery fluctuates up and down at 0 may be preset. The minimum current value of the current of the battery in the fluctuation range is set as a first preset current.
In one implementation, the first preset current is a minimum current value within the fluctuation range, and a third preset current for comparing the first average current of the battery may be determined based on the first preset current. For example, half or third of the first preset current may be determined as the third preset current, which is not limited by the present application, and the third preset current needs to be a value less than or equal to 0.
For example, if the fluctuation range difference in which the current value of the battery fluctuates up and down at 0 is determined to be 200mA, it is indicated that the current value of the battery fluctuates within (-100 mA,100 mA), and thus the first preset current may be determined to be-100 mA.
Based on the above example, it is also possible to determine-100 mA as a half, i.e., -50mA, as the first preset current.
In still other embodiments, the mobile phone may obtain the maximum output current and the minimum output current of the battery in a scenario where the mobile phone has high power consumption and is not being charged, and obtain the difference value of the current fluctuation range of the battery based on the maximum output current and the minimum output current.
Based on the above example, if it is determined that the current value of the battery of the mobile phone fluctuates within (-150 mA,150 mA) in the case where the mobile phone is high-powered and charged, the first preset current may be determined to be-150 mA.
Based on the above example, it is also possible to determine a third of-150 mA, i.e. a sixth of the difference of 300mA in fluctuation range, i.e. -50mA, as the third preset current and the first preset period of time as 10s.
It should be noted that, the absolute value of the first preset current and the absolute value of the second preset current may be the same or different; the absolute value of the third preset current and the absolute value of the fourth preset current can be the same or different; the application is not limited in this regard.
S511: the cell phone raises the voltage of the charger and again performs S503.
When the mobile phone judges that the current of the battery is smaller than the first preset current and the battery is in a discharging state, in order to avoid the electric quantity of the battery from being reduced in the charging process of the mobile phone, the charging current accessed from the charger can be increased.
In some embodiments, the output voltage of the charger may be raised, thereby raising the charging current of the charger.
For example, the voltage at which the charger is connected may be raised by a first preset value. For example, the first preset value may be 20mV, 40mV, etc., which is not limited in the present application.
However, similarly, the output voltage of the charger is increased, the increasing value of the charging current of the charger cannot be determined, and the output voltage of the charger is excessively increased, which may cause instability of charging the mobile phone.
Thus, in some embodiments, the minimum voltage value that can be varied may also be determined according to the model specification of the charger. By way of example, taking a 22.5W model charger as an example, the minimum voltage that can be varied is 20mV, the charging current of the charger can be increased by 20mV, and the charging current of the charger can be increased by 20mA or 22mA.
In some embodiments, S503 may be executed again after the voltage of the charger is raised, that is, after the charging current of the mobile phone accessed from the charger is adjusted, it may be determined whether the mobile phone needs to exit the anti-power-down mode or needs to be continuously in the anti-power-down mode at this time, and the adjustment of the charging current accessed from the charger is continued.
In some embodiments, the mobile phone increases the first charging current to the second charging current by increasing the voltage of the charger and returns to S503, and if the mobile phone determines that the power consumption current is greater than or equal to the first limiting current, is in the on-screen state, and the current of the battery is less than the first preset current, the mobile phone increases the second charging current to the third charging current by increasing the voltage of the charger again and returns to S503.
In some embodiments, the mobile phone increases the first charging current to the fourth charging current by increasing the voltage of the charger, and returns to S503, and the mobile phone determines that the power consumption current is greater than or equal to the first limiting current, is in the on-screen state, and the current of the battery is greater than the second preset current, decreases the fourth charging current to the fifth charging current by decreasing the voltage of the charger, and returns to S503.
In some embodiments, based on the above example, after the output voltage of the charger is raised by the mobile phone, the charging current of the raised charger does not exceed the maximum output current configured in S507.
In some embodiments, an Android system is operated by a mobile phone, and the Android system adopts a layered architecture as an example, and a software structure of the mobile phone includes a kernel layer, where the kernel layer includes a charging management driver, and the charging management driver is configured to manage charging current of an electronic device connected to a charger based on a charging method provided by an embodiment of the present application, that is, raise the charging current connected to the charger, and also reduce the charging current connected to the charger, so that the charging current connected to the charger does not exceed a configured maximum output current.
It should be noted that, in the above embodiments, the electronic device is a mobile phone only as an example. In some embodiments, the electronic device may be a tablet computer, a wearable device, an in-vehicle device, an Augmented Reality (AR)/Virtual Reality (VR) device, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a Personal Digital Assistant (PDA), or other terminal device.
Next, the composition of the electronic device and its software structure will be described.
By way of example, fig. 6 shows a schematic structural diagram of an electronic device 600.
The electronic device 600 may include a processor 610, an internal memory 620, a usb interface 630, a charge management module 640, a power management module 650, a battery 660, and the like.
The processor 610 may include one or more processing units, such as: the processor 610 may include an application processor (application processor, AP), a modem processor, a controller, etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The processor 610 may also be provided with a memory for storing instructions and data.
Internal memory 620 may be used to store computer-executable program code that includes instructions. The processor 610 executes various functional applications of the electronic device and data processing by executing instructions stored in the internal memory 620.
In some embodiments, internal memory 620 stores instructions for performing the charging method. The processor 610 may implement the charging method provided by the embodiment of the present application by executing the instructions stored in the internal memory 620.
The charge management module 640 is used to draw current from the charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charge management module 640 may receive a charging input of a wired charger through the USB interface 630. In some wireless charging embodiments, the charge management module 640 may receive wireless charging input through a wireless charging coil of the electronic device 600. The charge management module 640 may also provide power to the electronic device through the power management module 650 while charging the battery 660.
In some embodiments, the charge management module 640 includes a charge pump, and when the current output by the charge pump is not consumed by the system power of the electronic device during charging, the electronic device may receive a current input from the battery 660 through the power management module 650.
In some embodiments, the electronic device may adjust the voltage of the charger through the charging management module 640, so as to adjust the charging current accessed from the charger, thereby avoiding the situation that the electric quantity of the electronic device is reduced in the charging process.
The power management module 650 is used to connect the battery 660, the charge management module 640 and the processor 610. The power management module 650 receives input from the battery 660 and/or the charge management module 640 to power the processor 610, etc. The power management module 650 may also be used to monitor battery capacity, battery cycle times, battery health (leakage, impedance) and other parameters. In other embodiments, the power management module 650 may also be disposed in the processor 610. In other embodiments, the power management module 650 and the charge management module 640 may also be disposed in the same device.
In some embodiments, the power management module 650 may monitor the battery state data such as the battery voltage, the battery current, and the battery temperature of the battery 660 in real time, so that the electronic device obtains the battery state data in real time, and further determines the state of the battery.
It is to be understood that the configuration illustrated in this embodiment does not constitute a specific limitation on the electronic apparatus. In other embodiments, the electronic device may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
In addition, the electronic device also runs an operating system on the components. Such as the iOS operating system developed by apple corporation, the Android open source operating system developed by google corporation, the Windows operating system developed by microsoft corporation, etc. An operating application may be installed on the operating system.
Embodiments of the present application also provide a computer-readable storage medium storing a computer program that, when executed by a computer, is capable of implementing one or more steps of any one of the charging methods described above.
The computer readable storage medium may be a non-transitory computer readable storage medium, for example, a ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
Another embodiment of the application also provides a computer program product containing instructions. The computer program product is capable of implementing one or more steps of any of the charging methods described above when executed by a computer.
The electronic device, the computer readable storage medium and the computer program product provided in this embodiment are used to execute the corresponding charging method provided above, so the benefits achieved by the electronic device, the computer readable storage medium and the computer program product can refer to the benefits in the corresponding charging method provided above, and are not described herein.
The terms first, second, third and the like in the description and in the claims and in the drawings are used for distinguishing between different objects and not for limiting the specified order.
In embodiments of the application, words such as "exemplary" or "such as" are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "e.g." in an embodiment should not be taken as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion.
The above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims (18)

1. A charging method, characterized by being applied to an electronic device, the electronic device being connected to a charger, the electronic device being connected to a first charging current from the charger, the electronic device comprising a battery and a system power supply, the method comprising:
Detecting the power consumption current of the system power supply;
determining that the power consumption current is greater than or equal to a first limiting current, and detecting the state of the battery; the first defined current is determined based on a temperature control strategy;
Determining that the battery is in a discharging state, raising the first charging current, and returning to the step of detecting the power consumption current of the system power supply until it is determined that the detected power consumption current is smaller than the first limiting current;
And determining that the battery is in a charging state, reducing the first charging current, and returning to the step of detecting the power consumption current of the system power supply until the detected power consumption current is less than the first limiting current.
2. The method of claim 1, wherein the steps of determining that the battery is in a discharged state, boosting the first charge current, and returning to the step of detecting the power consumption current of the system power supply until it is determined that the detected power consumption current is less than the first defined current comprise:
determining that the battery is in a discharging state, increasing the first charging current to a second charging current, and returning to the step of detecting the power consumption current of the system power supply;
determining that the detected power consumption current is greater than or equal to the first limiting current, and the battery is in a discharging state, raising the second charging current to a third charging current, and returning to the step of detecting the power consumption current of the system power supply until it is determined that the detected power consumption current is less than the first limiting current.
3. The method of claim 1, wherein the steps of determining that the battery is in a discharged state, boosting the first charge current, and returning to the step of detecting the power consumption current of the system power supply until it is determined that the detected power consumption current is less than the first defined current comprise:
determining that the battery is in a discharging state, increasing the first charging current to the fourth charging current, and returning to the step of detecting the power consumption current of the system power supply;
determining that the detected power consumption current is greater than or equal to the first limiting current, and the battery is in a charging state, reducing the fourth charging current to a fifth charging current, and returning to the step of detecting the power consumption current of the system power supply until the detected power consumption current is determined to be less than the first limiting current.
4. The method of claim 1, wherein the determining that the battery is in a state of charge, reducing the first charging current, and returning to the step of detecting the power consumption current of the system power supply until it is determined that the detected power consumption current is less than the first defined current comprises:
determining that the battery is in a charging state, reducing the first to sixth charging currents, and returning to the step of detecting the power consumption current of the system power supply;
determining that the detected power consumption current is greater than or equal to the first limiting current, and the battery is in a charging state, reducing the sixth charging current to a seventh charging current, and returning to the step of detecting the power consumption current of the system power supply until it is determined that the detected power consumption current is less than the first limiting current.
5. The method of claim 1, wherein the determining that the battery is in a state of charge, reducing the first charging current, and returning to the step of detecting the power consumption current of the system power supply until it is determined that the detected power consumption current is less than the first defined current comprises:
Determining that the battery is in a charging state, reducing the first to eighth charging currents, and returning to the step of detecting the power consumption current of the system power supply;
Determining that the detected power consumption current is greater than or equal to the first limiting current, and the battery is in a discharging state, raising the eighth charging current to a ninth charging current, and returning to the step of detecting the power consumption current of the system power supply until it is determined that the detected power consumption current is less than the first limiting current.
6. The method according to any one of claims 1-5, further comprising:
acquiring a first model specification of the charger;
Determining a first output current corresponding to the first model specification as a second limiting current according to the corresponding relation between the model specifications of the plurality of chargers and the output currents of the plurality of chargers based on the first model specification;
the determining that the battery is in a discharged state, increasing the first charging current, includes:
Determining that the battery is in a discharge state, and increasing the first charging current; the first charging current after rising does not exceed the second limiting current;
The determining that the battery is in a state of charge, reducing the first charging current, includes:
determining that the battery is in a charged state, and reducing the first charging current; the reduced first charging current does not exceed the second limiting current.
7. The method according to any one of claims 1-5, further comprising:
Acquiring a second model specification of the charger and a first temperature of the charger;
Determining a second output current corresponding to the second model specification and the first temperature as a third limiting current according to the corresponding relation among the model specifications of the plurality of chargers, the output currents of the plurality of chargers and the temperatures of the plurality of chargers based on the second model specification and the first temperature;
the determining that the battery is in a discharged state, increasing the first charging current, includes:
Determining that the battery is in a discharge state, and increasing the first charging current; the first charging current after rising does not exceed the third limiting current;
The determining that the battery is in a state of charge, reducing the first charging current, includes:
Determining that the battery is in a charged state, and reducing the first charging current; the reduced first charging current does not exceed the third limiting current.
8. The method of any of claims 1-5, wherein the electronic device comprises a charge pump, the method further comprising:
acquiring a second temperature of the battery and a first voltage of the battery;
Determining a first input current corresponding to the second temperature and the first voltage according to the corresponding relation among the temperatures of the batteries, the voltages of the batteries and the input currents of the batteries based on the second temperature and the first voltage;
Obtaining a ratio of the charge pump; the ratio of the charge pump is the ratio of the output current of the charge pump to the input current of the charge pump;
Taking the ratio of the first input current to the ratio of the charge pump as a fourth limiting current;
the determining that the battery is in a discharged state, increasing the first charging current, includes:
Determining that the battery is in a discharge state, and increasing the first charging current; the first charging current after rising does not exceed the fourth limiting current;
The determining that the battery is in a state of charge, reducing the first charging current, includes:
Determining that the battery is in a charged state, and reducing the first charging current; the reduced first charging current does not exceed the fourth limiting current.
9. The method of any one of claims 1-5, wherein the detecting the state of the battery comprises:
detecting a current of the battery;
the determining that the battery is in a discharged state, increasing the first charging current, includes:
Determining that the current of the battery is the output current of the battery, and the absolute value of the current of the battery is larger than a first preset current, determining that the battery is in a discharging state, and increasing the first charging current;
The determining that the battery is in a state of charge, reducing the first charging current, includes:
And determining that the current of the battery is the input current of the battery, and the absolute value of the current of the battery is larger than a second preset current, determining that the battery is in a charging state, and reducing the first charging current.
10. The method of any one of claims 1-5, wherein the detecting the state of the battery comprises:
Detecting a first average current of the battery in a first preset time period;
the determining that the battery is in a discharged state, increasing the first charging current, includes:
Determining that the first average current of the battery is output current of the battery, and determining that the battery is in a discharging state when the absolute value of the first average current of the battery is larger than a third preset current, and increasing the first charging current;
The determining that the battery is in a state of charge, reducing the first charging current, includes:
and determining that the battery is in a charging state, and reducing the first charging current.
11. The method of claim 9, wherein the obtaining of the first preset current and the second preset current comprises:
Obtaining a difference value of a current fluctuation range of the battery; the difference value of the current fluctuation range is the difference value of the maximum current and the minimum current of the current fluctuation range of the battery;
And taking one half of the difference value of the current fluctuation range as the first preset current and the second preset current.
12. The method according to claim 10, wherein the obtaining of the third preset current and the fourth preset current comprises:
Obtaining a difference value of a current fluctuation range of the battery; the difference value of the current fluctuation range is the difference value of the maximum current and the minimum current of the current fluctuation range of the battery;
And taking one sixth of the difference value of the current fluctuation range as the third preset current and the fourth preset current.
13. The method according to claim 11 or 12, wherein the difference in the current fluctuation range is a difference between a maximum value of the current of the battery determined when the electronic device runs a first application and a minimum value of the current of the battery determined when the electronic device is not connected to the charger; the first application program is an application program with the power consumption current of the system power supply larger than a fifth preset current during operation.
14. The method of any of claims 1-5, wherein prior to said detecting a power consumption current of the system power supply, the method further comprises:
Configuring a charging current drawn from the charger to not exceed the first defined current;
detecting a state of the battery;
determining that the battery is in a discharging state, and releasing the configuration that the charging current accessed from the charger does not exceed the first limiting current;
The step of determining that the battery is in a discharging state, raising the first charging current, and returning to the step of detecting the power consumption current of the system power supply until it is determined that the detected power consumption current is less than the first limiting current includes:
Determining that the battery is in a discharging state, raising the first charging current, returning to the step of detecting the power consumption current of the system power supply until the detected power consumption current is less than the first limiting current, and returning to the step of configuring that the charging current accessed from the charger does not exceed the first limiting current;
the step of determining that the battery is in a charging state, reducing the first charging current, and returning to the step of detecting the power consumption current of the system power supply until it is determined that the detected power consumption current is less than the first limiting current includes:
And determining that the battery is in a charging state, reducing the first charging current, returning to the step of detecting the power consumption current of the system power supply until the detected power consumption current is less than the first limiting current, and returning to the step of configuring that the charging current accessed from the charger does not exceed the first limiting current.
15. The method of claim 14, wherein the electronic device comprises a display screen, and wherein prior to the detecting the power consumption current of the system power supply, the method further comprises:
Detecting the state of the display screen;
the determining that the battery is in a discharge state, releasing the configuration that the charging current accessed from the charger does not exceed the first limiting current, includes:
and determining that the battery is in a discharging state, and the state of the display screen is a bright screen state, and releasing the configuration that the charging current accessed from the charger does not exceed the first limiting current.
16. The method of any of claims 1-5, wherein the electronic device comprises a display screen, the method further comprising:
Detecting the state of the display screen;
The determining that the power consumption current is greater than or equal to a first limiting current, detecting a state of the battery, includes:
determining that the power consumption current is larger than or equal to a first limiting current, the state of the display screen is a bright screen state, and detecting the state of the battery;
The step of determining that the battery is in a discharging state, raising the first charging current, and returning to the step of detecting the power consumption current of the system power supply until it is determined that the detected power consumption current is less than the first limiting current includes:
Determining that the battery is in a discharging state, increasing the first charging current, and returning to the step of detecting the power consumption current of the system power supply until the detected power consumption current is smaller than the first limiting current and the detected state of the display screen is a screen-off state;
the step of determining that the battery is in a charging state, reducing the first charging current, and returning to the step of detecting the power consumption current of the system power supply until it is determined that the detected power consumption current is less than the first limiting current includes:
And determining that the battery is in a charging state, reducing the first charging current, and returning to the step of detecting the power consumption current of the system power supply until the detected power consumption current is smaller than the first limiting current and the detected state of the display screen is a screen-off state.
17. An electronic device comprising a memory and a processor;
The memory is coupled to the processor, the memory for storing computer program code comprising computer instructions that one or more of the processors invokes to cause the electronic device to perform the charging method of any one of claims 1-16.
18. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements the charging method according to any of claims 1-16.
CN202311701770.4A 2023-12-12 2023-12-12 Charging method, electronic device and storage medium Active CN117411148B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311701770.4A CN117411148B (en) 2023-12-12 2023-12-12 Charging method, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311701770.4A CN117411148B (en) 2023-12-12 2023-12-12 Charging method, electronic device and storage medium

Publications (2)

Publication Number Publication Date
CN117411148A CN117411148A (en) 2024-01-16
CN117411148B true CN117411148B (en) 2024-05-03

Family

ID=89500182

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311701770.4A Active CN117411148B (en) 2023-12-12 2023-12-12 Charging method, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN117411148B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2645514A1 (en) * 2012-03-30 2013-10-02 EH Europe GmbH Method and apparatus for controlling battery chargers
CN107340846A (en) * 2017-08-31 2017-11-10 广东虹勤通讯技术有限公司 The logic circuit and notebook computer of a kind of power down preventing
JP2019037097A (en) * 2017-08-21 2019-03-07 株式会社メルコホールディングス Charging system, charger, and program
CN110768319A (en) * 2018-07-27 2020-02-07 炬芯(珠海)科技有限公司 Method and device for charging by adopting constant current
CN114614549A (en) * 2022-04-28 2022-06-10 荣耀终端有限公司 Charging method and related electronic equipment
CN115940310A (en) * 2021-09-22 2023-04-07 北京小米移动软件有限公司 Charging method, charging device, and storage medium
CN116094083A (en) * 2022-06-29 2023-05-09 荣耀终端有限公司 Charging method, device and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2645514A1 (en) * 2012-03-30 2013-10-02 EH Europe GmbH Method and apparatus for controlling battery chargers
JP2019037097A (en) * 2017-08-21 2019-03-07 株式会社メルコホールディングス Charging system, charger, and program
CN107340846A (en) * 2017-08-31 2017-11-10 广东虹勤通讯技术有限公司 The logic circuit and notebook computer of a kind of power down preventing
CN110768319A (en) * 2018-07-27 2020-02-07 炬芯(珠海)科技有限公司 Method and device for charging by adopting constant current
CN115940310A (en) * 2021-09-22 2023-04-07 北京小米移动软件有限公司 Charging method, charging device, and storage medium
CN114614549A (en) * 2022-04-28 2022-06-10 荣耀终端有限公司 Charging method and related electronic equipment
CN116094083A (en) * 2022-06-29 2023-05-09 荣耀终端有限公司 Charging method, device and storage medium

Also Published As

Publication number Publication date
CN117411148A (en) 2024-01-16

Similar Documents

Publication Publication Date Title
CN105262155B (en) A charging method and device
US9967824B2 (en) Mobile terminal managing method and system, mobile terminal
EP2881838B1 (en) Adjustment method and boot method for power-off threshold voltage and electronic device thereof
US20210218263A1 (en) Charging method and device, electronic device and storage medium
US9232594B2 (en) Backlight circuit control method, backlight circuit and booster circuit
US20210336464A1 (en) Inference based fast charging
EP3193179A1 (en) Electric quantity detection method and apparatus, terminal and storage medium
US20220407334A1 (en) Information processing device, program, and method
CN112713629A (en) Charging method and device and electronic equipment
US11294447B2 (en) Dynamic battery power management based on battery internal impedance
WO2017128619A1 (en) Device, apparatus, and method supporting multi-battery quick-charging
US20170222453A1 (en) Device, apparatus and method for supporting multi-battery quick charge
CN117411148B (en) Charging method, electronic device and storage medium
CN109088456B (en) Mobile terminal charging protection system
US9685808B2 (en) USB energy harvesting
CN106371481A (en) Terminal energy-saving management method and apparatus, and terminal
CN103904716A (en) System and method for regulating charging current of electronic device
CN104423278B (en) Mobile power supply terminal and its method of supplying power to
CN114895768B (en) Information processing method, device and electronic equipment
CN118074248A (en) Low power shutdown control method, device, terminal equipment and medium
CN112448429A (en) Control method, terminal and computer storage medium
US12210472B2 (en) Electrical signal transmission method, electrical signal transmission control chip, and electrical signal transmission system
TWI837786B (en) Power management method and electronic device using the same
CN119675228A (en) Control method and control circuit
CN111415627B (en) Method for automatically adjusting brightness of display to battery charge-discharge balance point

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
CP03 Change of name, title or address

Address after: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040

Patentee after: Honor Terminal Co.,Ltd.

Country or region after: China

Address before: 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong

Patentee before: Honor Device Co.,Ltd.

Country or region before: China

CP03 Change of name, title or address