Disclosure of Invention
In view of this, the embodiment of the present invention provides a power supply management method and device, so as to solve the following problems in the prior art: when the CPU or the GPU works at high power, if the adapter can not support power supply, the battery can carry out turbo discharge, so that the battery power still falls down even the adapter is inserted, and the user experience is poor.
In one aspect, an embodiment of the present invention provides a power supply management method, including: acquiring the current system power of a terminal; detecting whether the current system power is larger than a preset system power; and under the condition that the input power is larger than the preset system power, adjusting the input power of the terminal from default power to peak power so as to improve the input current value.
In some embodiments, after adjusting the input power of the terminal from the default power to the peak power, the method further includes: detecting whether the current system power is greater than the peak power; if the time is larger than the peak power, detecting whether the time larger than the peak power exceeds a first preset time, wherein the first preset time is smaller than or equal to the sustainable time of the peak power; and in the case that the first preset time is exceeded, adjusting the input power from the peak power to an average power, and setting the average power for a second preset time.
In some embodiments, after detecting whether the time greater than the peak power exceeds a first predetermined time, further comprising: maintaining the input power at the peak power if the first predetermined time is not exceeded.
In some embodiments, the method further comprises: acquiring an input voltage of an adapter; detecting whether the input voltage is below a predetermined voltage threshold; and in the case of being lower than the preset voltage threshold, reducing the working frequency of the terminal from the default frequency to the preset frequency, and setting the preset frequency for a third preset time.
In some embodiments, the method further comprises: and sending a power adjusting signal to the adapter so that the adapter changes the current value input to the terminal according to the power adjusting signal.
On the other hand, an embodiment of the present invention provides a power supply management apparatus, including: the acquisition module is used for acquiring the current system power of the terminal; the detection module is used for detecting whether the current system power is larger than the preset system power; and the adjusting module is used for adjusting the input power of the terminal from default power to peak power under the condition that the input power is larger than the preset system power so as to improve the input current value.
In some embodiments, the detecting module is further configured to detect whether the current system power is greater than the peak power; if the time is larger than the peak power, detecting whether the time larger than the peak power exceeds a first preset time, wherein the first preset time is smaller than or equal to the sustainable time of the peak power; the adjusting module is further configured to adjust the input power from the peak power to an average power and set the average power for a second predetermined time when the first predetermined time is exceeded.
In some embodiments, the adjusting module is further configured to maintain the input power at the peak power if the first predetermined time is not exceeded.
In some embodiments, the obtaining module is further configured to obtain an input voltage of the adapter; the detection module is further used for detecting whether the input voltage is lower than a preset voltage threshold value; and the adjusting module is used for reducing the working frequency of the terminal from the default frequency to the preset frequency under the condition that the working frequency is lower than the preset voltage threshold, and setting the preset frequency for a third preset time.
In some embodiments, further comprising: and the transmitting module is used for transmitting the power adjusting signal to the adapter so that the adapter changes the current value input into the terminal according to the power adjusting signal.
According to the embodiment of the invention, when the current system power of the terminal is greater than the preset system power, the input power is adjusted from the default power to the peak power, and then the input current value is adjusted, so that the adaptor can provide more electric energy, the battery discharge is reduced or prevented, and the user experience is better.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the drawings of the embodiments of the present invention. It is to be understood that the embodiments described are only a few embodiments of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the described embodiments of the invention without any inventive step, are within the scope of protection of the invention.
Unless defined otherwise, technical or scientific terms used herein shall have the ordinary meaning as understood by one of ordinary skill in the art to which this invention belongs. The use of "first," "second," and similar terms in the present application do not denote any order, quantity, or importance, but rather the terms are used to distinguish one element from another. The word "comprising" or "comprises", and the like, means that the element or item listed before the word covers the element or item listed after the word and its equivalents, but does not exclude other elements or items. The terms "connected" or "coupled" and the like are not restricted to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "upper", "lower", "left", "right", and the like are used merely to indicate relative positional relationships, and when the absolute position of the object being described is changed, the relative positional relationships may also be changed accordingly.
To maintain the following description of the embodiments of the present invention clear and concise, a detailed description of known functions and known components of the invention have been omitted.
A first embodiment of the present invention provides a power supply management method, a flow of which is shown in fig. 1, including steps S101 to S103:
s101, acquiring the current system power of the terminal.
S102, detecting whether the current system power is larger than the preset system power.
And S103, under the condition that the input power is larger than the preset system power, adjusting the input power of the terminal from the default power to the peak power so as to improve the input current value.
The method can be applied to a terminal which is provided with an adapter and a battery at the same time, the structure of the terminal is schematically shown in FIG. 2, and the adapter supplies power to a system mainboard; the CPU is connected with a shutdown protector and an EC (embedded controller) respectively, the shutdown protector outputs a throttle signal to the CPU, and the EC controls the throttle signal to adjust the working frequency of the CPU; the EC is also connected to an adapter and a charging chip (Charge IC), and sets input power (also input current) to the charging chip and transmits an adjustment signal to the adapter.
The predetermined system power is generally less than or equal to the rated power of the adapter, for example, the rated power of the adapter is 125W, and the predetermined system power can be set to 120W. If the current system power is greater than 120W, it is likely that the adapter is plugged in to supply power, but the battery is also in a discharge state, so in order to reduce the discharge of the battery, the amount of power that can be input by the adapter, that is, the input power, and thus the input current, needs to be adjusted.
According to the embodiment of the invention, when the current system power of the terminal is greater than the preset system power, the input power is adjusted from the default power to the peak power, and then the input current value is adjusted, so that the adapter can provide more electric energy, the battery discharge is reduced or prevented, and the user experience is better.
If the current system power is always high, the adapter needs to input with the peak power all the time to meet the requirement of the adapter for more power supply, however, the mode of inputting with the peak power all the time is an injury to the adapter.
Based on the above considerations, after the input power of the terminal is adjusted from the default power to the peak power, on the basis of fig. 1, the flowchart may also be shown in fig. 3, and further includes the following steps:
and S104, detecting whether the current system power is larger than the peak power. If so, S105 is performed, otherwise, S107 is performed.
And S105, detecting whether the time greater than the peak power exceeds a first preset time or not under the condition of being greater than the peak power, wherein the first preset time is less than or equal to the sustainable time of the peak power. If so, S106 is executed, otherwise, S107 is executed.
And S106, under the condition that the first preset time is exceeded, adjusting the input power from the peak power to the average power, and setting the average power for a second preset time.
Through the scheme, the adapter can supply power by using a proper input current, and the condition that the battery supplies power to the terminal can be reduced or prevented to the greatest extent when the input current is used for supplying power. In a specific implementation, if the sustainable time is 0.5S, the first predetermined time may be set to 0.4S, and the first predetermined time being less than or equal to the sustainable time can ensure that the adapter is not always in the peak power for input, which is a protection measure for the adapter.
S107, the input power is maintained at the peak power.
If the time that the current system power is greater than the peak power does not exceed the first predetermined time, it indicates that the current system power is not so large that the current system power needs to be maintained at the peak power, therefore, even if the input power is set to the peak power, the adapter does not always perform power supply according to the peak power, but performs power supply according to the current system power, and the peak power is only a set threshold value, so that the input power can be maintained at the peak power.
In the implementation, in order to protect the adapter, the input voltage of the adapter can be acquired periodically or aperiodically; detecting whether the input voltage is lower than a predetermined voltage threshold; and in the case of being lower than the preset voltage threshold, reducing the working frequency of the terminal from the default frequency to the preset frequency, and setting the preset frequency for a third preset time, otherwise, maintaining the working frequency of the terminal at the default frequency.
When the terminal is always in high-power operation, the adapter always needs to be fully loaded to supply power to the terminal, and if the time is long, the adapter easily breaks down and directly shows that the voltage can be obviously reduced.
Regardless of how the input power is adjusted as described above, after the adjustment, a power adjustment signal is transmitted to the adapter so that the adapter changes the current value of the input terminal in accordance with the power adjustment signal.
This example takes full advantage of the PK Power of the adapter to reduce the frequency of Turbo discharge of the battery without increasing the size of the adapter, thereby optimizing the problem of battery Power degradation with the adapter inserted. The values of PK power and Continue power are given by the adapter manufacturer or are dynamically stored in the adapter registers according to the actual application of the adapter. For example, PK power is defined as 0.5S in the adapter, and EC detects PSYS (system power) 10ms each time, and the adapter setting at 135W is to adjust the battery stop and discharge point back when the system power consumption is greater than 120W, which is somewhat buffered with 125W (135W adapter normal battery stop). Since the hardware limit of the EC is only one detection in 10ms, the PK power below 10ms is still discharged when the discharge point is exceeded.
The actual values of the peak power and the average power can be 0.93 times of the peak power and the average power, and therefore the terminal protection function is achieved.
The core of the embodiment of the invention is to dynamically adjust the charging stop point and the discharging stop point of the battery by using the PK power and the Continue power (average power) of the adapter, thereby optimizing the problem of battery power reduction caused by PK value in the game process of the battery. For example, an adapter which originally needs to use 150W can only use 135W by the method, or the battery capacity can be reduced by 20% when 135W is continuously played for 2 hours, and the battery current can be reduced by only 5% after the scheme is optimized. The CPU entering the power-saving mode is a protection action for the adapter, and the system is prevented from being overloaded and stopping working.
A second embodiment of the present invention provides a power supply management apparatus, a structural schematic of which is shown in fig. 4, including:
an obtaining module 10, configured to obtain a current system power of a terminal; a detecting module 20, coupled to the obtaining module 10, for detecting whether the current system power is greater than a predetermined system power; and an adjusting module 30, coupled to the detecting module 20, for adjusting the input power of the terminal from the default power to the peak power to increase the input current value if the input power is greater than the predetermined system power.
If the current system power is always high, the adapter needs to input with the peak power all the time to meet the requirement of the adapter for more power supply, however, the mode of inputting with the peak power all the time is an injury to the adapter.
Based on the above considerations, the detection module is further configured to detect whether the current system power is greater than the peak power; if the time is larger than the peak power, detecting whether the time larger than the peak power exceeds a first preset time, wherein the first preset time is smaller than or equal to the sustainable time of the peak power; the adjusting module is further configured to adjust the input power from the peak power to the average power and set the average power for a second predetermined time if the first predetermined time is exceeded.
Through the scheme, the adapter can supply power by using a proper input current, and the condition that the battery supplies power to the terminal can be reduced or prevented to the greatest extent when the input current is used for supplying power. In a specific implementation, if the sustainable time is 0.5S, the first predetermined time may be set to 0.4S, and the first predetermined time being less than or equal to the sustainable time can ensure that the adapter is not always in the peak power for inputting, which is a protection measure for the adapter.
If the time that the current system power is larger than the peak power does not exceed the first predetermined time, it indicates that the current system power is not so large that the current system power needs to be maintained at the peak power, therefore, even if the input power is set to the peak power, the adapter does not always supply power according to the peak power, but supplies power according to the current system power, and the peak power is only a set threshold value, so the input power can be maintained at the peak power.
If the time that the current system power is larger than the peak power does not exceed the first predetermined time, it indicates that the current system power is not so large that the current system power needs to be maintained at the peak power, therefore, even if the input power is set to the peak power, the adapter does not always supply power according to the peak power, but supplies power according to the current system power, and the peak power is only a set threshold value. Therefore, the adjusting module is further configured to maintain the input power at the peak power if the first predetermined time is not exceeded.
In the implementation process, the acquisition module is used for protecting the adapter and also used for acquiring the input voltage of the adapter; the detection module is also used for detecting whether the input voltage is lower than a preset voltage threshold value; and the adjusting module is used for reducing the working frequency of the terminal from the default frequency to the preset frequency and setting the preset frequency for a third preset time under the condition of being lower than the preset voltage threshold.
The above apparatus may further include: and the transmitting module is used for transmitting the power adjusting signal to the adapter so that the adapter changes the current value of the input terminal according to the power adjusting signal.
The core of the embodiment of the invention is to dynamically adjust the charging stop point and the discharging stop point of the battery by using the PK power and the Continue power (average power) of the adapter, thereby optimizing the problem of battery power reduction caused by PK value in the game process of the battery. For example, an adapter which originally needs to use 150W can only use 135W by the method, or the battery capacity can be reduced by 20% when 135W is continuously played for 2 hours, and the battery current can be reduced by only 5% after the scheme is optimized. The CPU entering the power-saving mode is a protection action for the adapter, and the system is prevented from being overloaded and stopping working.
Moreover, although exemplary embodiments have been described herein, the scope thereof includes any and all embodiments based on the present invention with equivalent elements, modifications, omissions, combinations (e.g., of various embodiments across), adaptations or alterations. The elements of the claims are to be interpreted broadly based on the language employed in the claims and not limited to examples described in the present specification or during the prosecution of the application, which examples are to be construed as non-exclusive. It is intended, therefore, that the specification and examples be considered as exemplary only, with a true scope and spirit being indicated by the following claims and their full scope of equivalents.
The above description is intended to be illustrative and not restrictive. For example, the above-described examples (or one or more versions thereof) may be used in combination with each other. For example, other embodiments may be used by those of ordinary skill in the art upon reading the above description. In addition, in the above-described embodiments, various features may be grouped together to streamline the disclosure. This should not be interpreted as an intention that a disclosed feature not claimed is essential to any claim. Rather, inventive subject matter may lie in less than all features of a particular disclosed embodiment. Thus, the following claims are hereby incorporated into the detailed description as examples or embodiments, with each claim standing on its own as a separate embodiment, and it is contemplated that these embodiments may be combined with each other in various combinations or permutations. The scope of the invention should be determined with reference to the appended claims, along with the full scope of equivalents to which such claims are entitled.
While the embodiments of the present invention have been described in detail, the present invention is not limited to these specific embodiments, and those skilled in the art can make various modifications and modifications of the embodiments based on the concept of the present invention, which fall within the scope of the present invention as claimed.