CN114265492A - Starting method and device and electronic equipment - Google Patents

Starting method and device and electronic equipment Download PDF

Info

Publication number
CN114265492A
CN114265492A CN202210194738.0A CN202210194738A CN114265492A CN 114265492 A CN114265492 A CN 114265492A CN 202210194738 A CN202210194738 A CN 202210194738A CN 114265492 A CN114265492 A CN 114265492A
Authority
CN
China
Prior art keywords
battery
cpu
temperature
terminal
preset
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.)
Granted
Application number
CN202210194738.0A
Other languages
Chinese (zh)
Other versions
CN114265492B (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.)
Xi'an 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 CN202210194738.0A priority Critical patent/CN114265492B/en
Publication of CN114265492A publication Critical patent/CN114265492A/en
Application granted granted Critical
Publication of CN114265492B publication Critical patent/CN114265492B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the application provides a starting method, a starting device and electronic equipment, wherein a terminal comprises a battery and a Central Processing Unit (CPU), and the method comprises the following steps: responding to a received starting instruction, and detecting a first temperature of a battery when the terminal is not connected with a power adapter; in response to the first temperature being less than a first preset temperature, reducing the CPU frequency to a preset frequency; and adjusting the parameters of the CPU according to the attribute information of the battery, and starting the computer by using the adjusted parameters of the CPU. The starting method provided by the embodiment of the application can improve the starting efficiency and reduce the starting time.

Description

Starting method and device and electronic equipment
Technical Field
The embodiment of the application relates to the field of terminals, in particular to a starting method, a starting device and electronic equipment.
Background
The battery arranged in the terminal can provide electric energy for the terminal so as to realize the starting and the operation of the terminal. The temperature greatly affects the performance of the battery, for example, the discharge power of the battery is reduced due to the influence of low temperature, and the terminal cannot be started at low temperature.
At present, when the terminal is started at a low temperature, the frequency of a Central Processing Unit (CPU) in the terminal can be reduced, so as to ensure that the terminal can be started and operated smoothly. However, the way of reducing the CPU frequency causes the performance of the terminal to be reduced, for example, the terminal has a long boot time and a low boot efficiency.
Disclosure of Invention
The embodiment of the application provides a starting method, a starting device and electronic equipment, which can reduce the starting time and improve the starting efficiency.
In a first aspect, an embodiment of the present application provides a boot method, where an execution main body for executing the boot method may be a terminal or a chip in the terminal, and the following embodiment takes the terminal as an example for description. In the method, the terminal comprises a battery and a CPU, wherein the terminal responds to a received starting instruction, is not connected with a power adapter, and can detect a first temperature of the battery. If the first temperature of the battery is lower than the first preset temperature, the terminal can reduce the CPU frequency to the preset frequency so as to reduce the power consumption of the CPU and ensure the smooth start-up of the terminal. In the process of starting the terminal, the terminal can acquire the attribute information of the battery, further adaptively adjust the parameters of the CPU according to the attribute information of the battery, and start the terminal according to the adjusted parameters of the CPU.
That is to say, in the embodiment of the present application, when the terminal is powered on, and when the first temperature of the battery is less than the first preset temperature, the terminal may first reduce the CPU frequency to the preset frequency, and then adaptively adjust the parameters of the CPU according to the attribute information of the battery, so as to improve the performance of the CPU, further improve the power-on efficiency, and reduce the power-on duration. When the terminal is started, the CPU is not kept at the preset frequency all the time, but parameters of the CPU are adjusted based on the attribute information of the battery, because the preset frequency is the lower frequency which is adjusted by the CPU when the terminal is started smoothly, and the temperature of the battery is increased in the using process of the battery, the CPU frequency in the adjusted parameters of the CPU is higher than the preset frequency, namely the performance of the CPU is improved, the starting efficiency can be improved, and the starting time length is reduced.
In an embodiment, after the frequency of the CPU is reduced to a preset frequency, the terminal may periodically acquire the attribute information of the battery, and then periodically acquire the maximum allowed power consumption that the battery can provide to the CPU according to the periodically acquired attribute information of the battery, and further periodically adjust the parameter of the CPU according to the periodically acquired maximum allowed power consumption. That is, the terminal can continuously adjust the parameters of the CPU based on the attribute information of the battery, so that the performance of the terminal can be improved as much as possible while ensuring smooth startup of the terminal.
In an embodiment, in response to receiving the boot instruction, the terminal may execute the boot operation according to the normal-temperature policy when the terminal is connected to the power adapter, where the normal-temperature policy may refer to the related description in the detailed description. Or, in an embodiment, when the terminal responds to receive the boot instruction, the terminal is not connected to the power adapter, and the first temperature of the battery is greater than or equal to the preset temperature, the terminal may also execute the boot operation according to the normal-temperature policy.
In an embodiment, the attribute information includes a third temperature, and when the third temperature is higher than the first preset temperature, the terminal may run a program of the BIOS, so as to ensure that the terminal can be successfully booted and run.
The following describes a process in which the terminal adjusts the parameters of the CPU according to the attribute information of the battery:
in an embodiment, the terminal may obtain the maximum allowed power consumption that the battery can provide to the CPU according to the attribute information of the battery, and further adjust the parameter of the CPU according to the maximum allowed power consumption. The terminal can obtain the current discharge power of the battery according to the attribute information of the battery, and further obtain the maximum allowed power consumption according to the current discharge power of the battery.
In an embodiment, the terminal may obtain the consumed discharge power of the battery according to the attribute information of the battery, and further use a difference value between a preset discharge power of the battery and the consumed discharge power of the battery as the current discharge power of the battery. Wherein the preset discharging power is a discharging power at a second preset temperature when the capacity of the battery is a maximum capacity, and the discharging power consumed by the battery includes: the temperature-lost discharge power and/or the capacity-lost discharge power, and the second preset temperature is greater than the first preset temperature.
In this embodiment, the terminal may obtain the discharge power consumed by the battery according to the temperature of the battery and/or the capacity consumed by the battery.
In one possible implementation, the attribute information of the battery includes: a second temperature of the battery, the second temperature being a temperature of the battery when the CPU frequency is reduced to the preset frequency. The terminal can obtain the discharge power of the temperature loss according to the difference value between the second temperature and the second preset temperature and the temperature loss coefficient corresponding to the second temperature. In one embodiment, the temperature loss coefficient corresponding to the second temperature may be a constant value, or the temperature loss coefficient corresponding to the second temperature may be different according to the second temperature.
In one possible implementation, the attribute information of the battery includes: a remaining capacity, a maximum capacity, and a nominal capacity of the battery. The terminal may obtain the discharge power of the capacity loss according to a quotient of the maximum capacity and the nominal capacity, the remaining capacity, and a capacity loss coefficient corresponding to the remaining capacity.
In one possible implementation manner, the terminal may use a difference between a current discharge power of the battery and a power of other components in the terminal, which are components in the terminal except for the CPU, as the maximum allowable power consumption. In one embodiment, the power of the other components in the terminal may be a fixed value, or the power of the other components in the terminal may be related to the second temperature, and the remaining capacity, the maximum capacity, and the nominal capacity of the battery.
The following explains the boot process in the embodiment of the present application in combination with a specific structure of the terminal:
in one embodiment, the terminal further includes: and the embedded controller EC is respectively connected with the battery and the CPU. Wherein the EC detects whether the terminal is connected with the power adapter in response to the EC being powered on; the EC detects a first temperature of the battery in response to the terminal not being connected to the power adapter.
In a possible implementation manner, the terminal further includes: the charging chip is connected with the EC, when the power adapter is connected with the terminal, the power adapter is connected with the charging chip, when the charging chip is connected with the power adapter, the charging chip pulls up the level of a first GPIO port connected with the charging chip and the EC, and when the charging chip is disconnected with the power adapter, the charging chip pulls down the level of the first GPIO port.
In this possible implementation manner, the EC detects whether the terminal is connected to the power adapter according to the level of the first GPIO port. Illustratively, if the EC detects that the level of the first GPIO port is pulled high, it may be determined that the terminal is connected to the power adapter. If the EC detects that the level of the first GPIO port is pulled low, the disconnection (disconnection) of the terminal and the power adapter can be determined.
In one possible implementation manner, in response to that the first temperature is lower than the first preset temperature, the EC pulls down a level of a second GPIO port to which the EC and the CPU are connected to a first preset level; and the CPU responds to the power-on of the CPU, detects that the level of the second GPIO port is the first preset level, and reduces the frequency of the CPU to the preset frequency.
Correspondingly, the EC responds to the power-on of the CPU and communicates with the CPU so as to enable the CPU to adjust the parameters of the CPU; the CPU responds to the successful communication with the EC and sends a communication success confirmation message to the EC; the EC acquires attribute information of the battery in response to receiving the communication success confirmation message from the CPU, and the EC may acquire the maximum allowable power consumption according to the attribute information of the battery.
In a possible implementation manner, the EC writes the maximum allowed power consumption in a preset position of the CPU through the second GPIO port. And the CPU reads the maximum allowable power consumption at the preset position, and then the CPU adjusts the parameters of the CPU according to the maximum allowable power consumption.
In a possible implementation manner, after the EC writes the maximum allowed power consumption in a preset position of the CPU through the second GPIO port, the EC raises the level of the second GPIO port to a second preset level in response to successful writing of the maximum allowed power consumption. Correspondingly, the CPU responds to the fact that the level of the second GPIO port is the second preset level, and reads the maximum allowed power consumption at the preset position.
In a second aspect, an embodiment of the present application provides a boot device, which may be the terminal or the chip in the terminal according to the first aspect. The boot device may include:
the terminal comprises a detection module, a power adapter and a control module, wherein the detection module is used for responding to a received starting instruction, detecting a first temperature of a battery in the terminal when the terminal is not connected with the power adapter;
and the processing module is used for responding to the condition that the first temperature is lower than a first preset temperature, reducing the frequency of a Central Processing Unit (CPU) in the terminal to a preset frequency, and adjusting the parameters of the CPU according to the attribute information of the battery so as to start the terminal by the adjusted parameters of the CPU.
In a possible implementation manner, the processing module is specifically configured to obtain, according to the attribute information of the battery, a maximum allowed power consumption that can be provided by the battery to the CPU; and adjusting the parameters of the CPU according to the maximum allowable power consumption.
In a possible implementation manner, the processing module is specifically configured to obtain a current discharge power of the battery according to the attribute information of the battery; and acquiring the maximum allowable power consumption according to the current discharge power of the battery.
In a possible implementation manner, the processing module is specifically configured to obtain a consumed discharge power of the battery according to the attribute information of the battery; and taking the difference value between the preset discharge power of the battery and the discharge power consumed by the battery as the current discharge power of the battery.
In one possible implementation manner, the preset discharge power is a discharge power at which the capacity of the battery is the maximum capacity at a second preset temperature, and the discharge power consumed by the battery includes: the temperature-lost discharge power and/or the capacity-lost discharge power, and the second preset temperature is greater than the first preset temperature.
In one possible implementation, the attribute information of the battery includes: a second temperature of the battery, the second temperature being a temperature of the battery when the CPU frequency is reduced to the preset frequency.
And the processing module is specifically used for acquiring the discharge power of the temperature loss according to the difference value between the second temperature and a second preset temperature and the temperature loss coefficient corresponding to the second temperature.
In one possible implementation, the attribute information of the battery includes: a remaining capacity, a maximum capacity, and a nominal capacity of the battery. And the processing module is specifically configured to obtain the discharge power of the capacity loss according to the quotient of the maximum capacity and the nominal capacity, the remaining capacity, and a capacity loss coefficient corresponding to the remaining capacity.
In a possible implementation manner, the processing module is specifically configured to use, as the maximum allowable power consumption, a difference between a current discharge power of the battery and a power of another component in the terminal, where the other component is a component in the terminal other than the CPU.
In a possible implementation manner, the processing module is specifically configured to periodically acquire attribute information of the battery; periodically acquiring the maximum allowed power consumption which can be provided for the CPU by the battery according to the periodically acquired attribute information of the battery; and periodically adjusting the parameters of the CPU according to the periodically acquired maximum allowable power consumption.
In a possible implementation manner, the attribute information includes a third temperature, where the third temperature is greater than the first preset temperature, and the processing module is further configured to run a program of the BIOS.
In a third aspect, an embodiment of the present application provides an electronic device, which may include: a processor, a memory. The memory is for storing computer executable program code, the program code comprising instructions; the instructions, when executed by the processor, cause the electronic device to perform the method as in the first aspect.
In a fourth aspect, an embodiment of the present application provides an electronic device, which may be the boot device of the second aspect. The electronic device may comprise means, modules or circuits for performing the methods provided in the first aspect above.
In a fifth aspect, embodiments of the present application provide a computer program product containing instructions, which when run on a computer, cause the computer to perform the method of the first aspect.
In a sixth aspect, embodiments of the present application provide a computer-readable storage medium, which stores instructions that, when executed on a computer, cause the computer to perform the method in the first aspect.
For each possible implementation manner of the second aspect to the sixth aspect, the beneficial effects of the second aspect may refer to the beneficial effects brought by the first aspect, and details are not repeated herein.
The embodiment of the application provides a starting method, a starting device and electronic equipment, wherein a terminal comprises a battery and a Central Processing Unit (CPU), and the method comprises the following steps: responding to a received starting instruction, and detecting a first temperature of a battery when the terminal is not connected with a power adapter; in response to the first temperature being less than a first preset temperature, reducing the CPU frequency to a preset frequency; and adjusting the parameters of the CPU according to the attribute information of the battery, and starting the computer by using the adjusted parameters of the CPU.
Drawings
Fig. 1 is a schematic structural diagram of a terminal according to an embodiment of the present application;
fig. 2 is a schematic flow chart of terminal startup in the prior art;
fig. 3 is a schematic flowchart of an embodiment of a boot method according to the present application;
FIG. 4 is a schematic view of a terminal connection adapter;
fig. 5 is a schematic flowchart of another embodiment of a boot method according to an embodiment of the present application;
fig. 6 is a schematic flowchart of another embodiment of a boot method according to an embodiment of the present application;
fig. 7 is a schematic flowchart illustrating another embodiment of a booting method according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a boot device according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The terminal in this embodiment of the application is a terminal provided with a battery, for example, the terminal may be a mobile phone, a tablet computer (PAD), a notebook computer, a Personal Digital Assistant (PDA), a handheld device with a wireless communication function, a computing device, or a wearable device, a Virtual Reality (VR) terminal, an Augmented Reality (AR) terminal, a terminal in a smart home (smart home), and the like, and the form of the terminal in this embodiment of the application is not specifically limited. In one embodiment, the terminal in the embodiment of the present application may be connected to an adapter to charge the terminal. In one embodiment, the adapter may be referred to as a power adapter, and in the following embodiments, it is simply referred to as an adapter for explanation.
Fig. 1 is a schematic structural diagram of a terminal according to an embodiment of the present application. Referring to fig. 1, the terminal 10 may include: a battery 11, an Embedded Controller (EC) 12, a Central Processing Unit (CPU) 13, and a charging chip 14. The charging chip 14 is connected to the EC 12, and the EC 12 is connected to the CPU 13 and the battery 11, respectively. In an embodiment, the charging chip 14 and the EC 12 may be connected through a General-purpose input/output (GPIO) port, the EC 12 and the battery 11 may be connected through a System Management Bus (SMBUS), and the EC 12 is connected to the CPU 13 through the GPIO port and the CPU 13 through a Platform Environment Control Interface (PECI).
In one embodiment, charging chip 14 may also be referred to as a charge chip or charge IC. In one embodiment, the EC 12 may be replaced with other types of controllers, such as a Micro Controller Unit (MCU), or an integrated IC module of an MCU chip and the EC.
In one embodiment, referring to fig. 1, a first sensor and a second sensor may also be included in the terminal 10. The first sensor is connected to the EC 12 and the second sensor is connected to the CPU 13. Wherein, the first sensor may include but is not limited to: a temperature sensor 15. The second sensor includes, but is not limited to: pressure sensor, gyroscope sensor, acceleration sensor etc. this application embodiment does not do the second sensor and redundantly describes. It should be understood that the second sensor is not shown in fig. 1, and the first sensor is characterized in fig. 1 by temperature sensor 15.
In one embodiment, the terminal 10 may also include a first memory 16 and a second memory 17. The first memory 16 is connected to the EC 12, and the second memory 17 is connected to the CPU 13.
In one embodiment, the first memory 16 may include: flash memory flash. In one embodiment, the first memory 16 may be disposed separately from the EC 12 and connected to the EC 12, and in one embodiment, the first memory 16 is disposed in the EC 12, and the manner of disposing the first memory 16 is not limited in the embodiment of the present application, and fig. 1 illustrates an example in which the first memory 16 is disposed separately from the EC 12.
Wherein the second memory 17 may be used to store one or more computer programs comprising instructions. The second memory 17 may include a program storage area and a data storage area. Wherein, the storage program area can store an operating system; the storage area may also store one or more application programs (e.g., gallery, contacts, etc.), etc. The storage data area may store data created during use of the electronic device, and the like. Further, the second memory 17 may include a high-speed random access memory, and may also include a nonvolatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (UFS), and the like. In one embodiment, the second memory 17 may be a hard disk.
It is to be understood that the structure shown in fig. 1 does not constitute a specific limitation of the terminal. In other embodiments of the present application, the terminal may include more or fewer components than shown, or some components may be combined, some components may be split, or a different arrangement of components may be used. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
First, a terminal booting process in the prior art is described with reference to the structure of the terminal shown in fig. 1, fig. 2 is a schematic flow chart of terminal booting in the prior art, and referring to fig. 2, the terminal booting process in the prior art may include:
s201, responding to the terminal startup, and detecting the temperature of the battery by the EC under the condition that the terminal is not connected with the adapter.
And when the terminal is started, the EC is electrified. When the terminal is not connected with the adapter, the EC is powered by the battery, and when the terminal is connected with the adapter, the EC is powered by the external power supply connected with the adapter. It should be understood that the adapter in the embodiment of the present application refers to a device that can be connected to an external power supply to charge the terminal.
In the case where the terminal is not connected to the adapter, i.e., the terminal is not connected to the external power source, the EC may detect the temperature of the battery to determine whether the battery is at a low temperature. In one embodiment, the EC may detect the temperature of the battery via a temperature sensor. It should be understood that "low temperature" in the embodiments of the present application means that the temperature of the battery is less than a preset temperature, and the preset temperature (i.e., the temperature value for determining whether the battery is at the low temperature) corresponding to the battery may be different for different types of terminals.
S202, responding to the fact that the temperature of the battery is smaller than the preset temperature, and the EC controls the terminal to be started by adopting a first strategy.
And when the EC detects that the temperature of the battery is less than the preset temperature, the EC determines that the battery is at a low temperature, and the EC can adopt a first strategy to control the terminal to be started. It should be understood that the first strategy may be understood as a strategy when the battery is at a low temperature.
In the prior art, in an embodiment, the EC may interact with the CPU to reduce the frequency of the CPU, so as to reduce the power consumption of the terminal when the terminal is turned on, so that at a low temperature (the temperature is lower than a preset temperature), the battery can provide the power required by the CPU when the terminal is turned on, and the terminal is ensured to be turned on smoothly. Wherein the first policy is: the CPU frequency is reduced.
In the embodiment, the CPU frequency of the terminal is reduced, so that the terminal has poor performance in the whole starting process, and the problems of long starting time, starting blockage, blockage after starting and the like are caused. In an embodiment, the CPU frequency of the terminal is reduced, which may also affect the experience of the user using the terminal after the terminal is powered on, and the user experience is poor.
In the prior art, in an embodiment, the EC may interact with the CPU, so that the CPU sets parameters of the CPU based on fixed power consumption, and because the parameters of the CPU are fixed, the terminal response flexibility is low, and the user experience may also be affected. In such an embodiment, the first policy is: the CPU sets fixed parameters of the CPU.
S203, responding to the fact that the temperature of the battery is larger than or equal to the preset temperature, and the EC controls the terminal to be started by adopting a second strategy.
The temperature of the battery is greater than or equal to a preset temperature, namely the battery is at a non-low temperature, and the EC responds that the temperature of the battery is greater than or equal to the preset temperature and can adopt a second strategy to control the terminal to be started. It is to be understood that the second strategy may be understood as a strategy when the battery is at a non-low temperature (normal temperature).
In one embodiment, the second policy may also be understood as: the CPU can adopt the CPU frequency at normal temperature without reducing the CPU frequency so as to realize the startup of the terminal. It should be understood that the CPU frequency when the terminal is at a non-low temperature (i.e., the CPU frequency at a normal temperature) according to the embodiment of the present application may be changed according to the terminal.
For example, the CPU frequency may reach 4.4G when the desktop computer is not at low temperature, and the CPU frequency may reach 1.6G when the terminal such as the notebook computer is not at low temperature. When the temperature of the battery is lower than the preset temperature, the CPU frequency may be reduced to, for example, 400MHZ to 800MHZ (first policy).
As in the prior art, in order to ensure smooth booting of the terminal under low temperature, the frequency of the CPU needs to be reduced, and the CPU remains low frequency during the whole booting process of the terminal (even after the terminal is booted), which may result in long time for the whole booting process, a booting jam, and a jam after booting, and thus the user experience is low.
In the embodiment of the application, when the terminal is started at a low temperature, the EC and the CPU can interact in real time, the starting strategy is adjusted in real time based on the temperature of the battery, the parameters of the CPU are adaptively adjusted, the starting time length can be reduced on the basis of ensuring the smooth starting of the terminal, and the starting time delay can be reduced, so that the user experience can be improved.
On the basis of the structure of the terminal shown in fig. 1, the following describes a booting method provided in the embodiment of the present application with reference to a specific embodiment. The following several embodiments may be combined with each other and may not be described in detail in some embodiments for the same or similar concepts or processes. Fig. 3 is a flowchart illustrating an embodiment of a boot method according to the present application.
Referring to fig. 3, the boot method provided in the embodiment of the present application may include:
s301, the EC responds to the terminal startup and detects whether the terminal is connected with the adapter. If not, go to step S302, and if so, go to step S312.
When the terminal is started, the EC is powered on, and the EC can detect whether the terminal is connected with the adapter or not.
As shown in fig. 4, when the terminal is connected to the adapter, the adapter may be connected to the charging chip in the terminal, and when the terminal is not connected to the adapter, the charging chip is not connected to the adapter. When the adapter is connected with or disconnected from the charging chip, the charging chip can detect the change of the voltage, and the charging chip can inform the EC of the connection state of the adapter through the GPIO port (the GPIO port between the charging chip and the EC) in response to the detected change of the voltage, so that the aim of detecting whether the terminal of the EC is connected with the adapter is fulfilled.
For example, if the charging chip detects that the voltage of the charging chip increases to the output voltage (e.g. 5V) of the adapter, it may be determined that the charging chip is connected to the adapter, and at this time, the external power supply supplies power to the terminal, and the charging chip may pull up (or pull down) the level of the GPIO port to notify that the EC adapter is in the connection state. Accordingly, the charging chip can determine that the adapter is in a connection state based on the level pull-up of the GPIO port, namely the terminal is connected with the adapter.
If the charging chip detects that the voltage of the charging chip is reduced to a preset voltage (for example, less than 5V), it may be determined that the charging chip is disconnected from the adapter, at this time, the battery supplies power to the terminal, and the charging chip may pull down (or pull up) the level of the GPIO port to notify that the EC adapter is in an unconnected state. Correspondingly, the charging chip can detect that the adapter is in a disconnected state according to the level reduction of the GPIO port, namely the terminal is not connected with the adapter.
In one embodiment, because the charging chip adaptively pulls the level of the GPIO port up or down when the adapter is connected to the charging chip or disconnected from the charging chip, the EC may determine whether the terminal is connected to the adapter based on the specific value of the level of the GPIO port. For example, if the level of the GPIO port is a pulled-up level (e.g., a first level value), the EC determines that the terminal is connected to the adapter, and if the level of the GPIO port is a pulled-down level (e.g., a second level value), the EC determines that the terminal is not connected to the adapter. Wherein the first level value is greater than the second level value. In one embodiment, the GPIO port to which the charging chip and EC are connected may be referred to as a first GPIO port.
S302, the EC detects a first temperature of the battery.
The EC may detect a first temperature of the battery via a temperature sensor. In one embodiment, the EC may read the first temperature of the battery detected by the temperature sensor through the SMBUS connection. It should be understood that the terms first temperature, second temperature, third temperature, etc. in the embodiments of the present application are used to characterize the temperature of the battery detected by the EC at different times, and the terms "first", "second", etc. are used for descriptive purposes only and are not to be construed as indicating or implying relative importance, nor as indicating or implying order.
And S303, in response to the first temperature of the battery being lower than a first preset temperature, the EC pulls down the level of the GPIO port connected between the EC and the CPU to a first preset level.
The first preset temperature may be preset, and the first preset temperatures corresponding to different types of terminals are different. In one embodiment, the first predetermined temperature may be, for example, 14 ℃. The first predetermined level is used to instruct the CPU to down-convert to a predetermined frequency, such as 400MHZ to 800MHZ for example.
In this embodiment of the application, in response to that the first temperature of the battery is lower than a first preset temperature, the EC may pull down the level of the GPIO port to which the EC and the CPU are connected, to the first preset level. In one embodiment, the EC may pull down the Prochot # signal carried by the GPIO port to instruct the CPU to down-convert to a preset frequency in response to the first temperature of the battery being less than a first preset temperature. It should be understood that Prochot is pulled out through one pin of the CPU and connected to the EC, and the EC can interact with the CPU by changing the signal of the pin corresponding to the Prochot.
In one embodiment, the GPIO port to which the CPU and EC are connected may be referred to as a second GPIO port.
S304, the CPU responds to the CPU power-on, detects that the level of the GPIO port connected with the EC and the CPU is a first preset level, and reduces the CPU frequency to a preset frequency.
In the process of starting the terminal, the EC is firstly electrified, and the CPU is then electrified. After the CPU is powered on, the level of the GPIO port connected between the EC and the CPU can be detected in real time, so that the CPU can reduce the frequency of the CPU to a preset frequency in response to the fact that the detected level of the GPIO port connected between the EC and the CPU is a first preset level.
S305, the CPU feeds back a response message to the EC through the PECI.
When the CPU is powered on, an Acknowledge (ACK) message may be fed back to the EC through the PECI, and the ACK message indicates that the CPU is powered on. It should be understood that the PECI is a private communication interface of the intel, and for a terminal provided with the PECI, the intel defines a communication flow through the PECI, in an embodiment, the EC and the CPU may communicate through the PECI, and after the communication is successful, the CPU may feed back a response message to the EC through the PECI, and a process of the EC and the CPU communicating through the PECI may refer to a description of the intel on the communication flow of the PECI. In one embodiment, the response message may be referred to as a communication success confirmation message.
In one embodiment, it is understood that if the EC and the CPU are not successfully communicating, the CPU feeds back a negative message (NACK) to the EC through the PECI to instruct the EC to re-communicate with the CPU. In one embodiment, the NACK may be referred to as a communication failure message.
S306, the EC responds to the received response message and detects the attribute information of the battery according to a preset rule.
In one embodiment, the preset rule may be: the EC periodically detects the attribute information of the battery, such as detecting the attribute information of the battery every 2 minutes. In an embodiment, the EC may detect the attribute information of the battery at regular time, for example, the attribute information of the battery is detected every 1 minute, 5 minutes, and the like after the EC is powered on.
The attribute information may include: a second temperature of the battery, a remaining capacity of the battery, a maximum capacity of the battery, a design capacity of the battery, and the like. It should be understood that the design capacity of the battery is the nominal capacity of the battery at the time of factory shipment, such as 60 Wh. The maximum capacity of a battery (i.e., the full charge capacity or actual capacity) is a variable value, and generally, the maximum capacity of a new battery is generally higher than the design capacity, but as the number of times the battery is charged and discharged increases, the battery ages and decays, and the maximum capacity gradually decreases. In addition, in a low-temperature environment, the battery activity is insufficient, and the maximum capacity is also reduced.
Wherein the EC may detect the second temperature of the battery through the temperature sensor. The EC can read parameters such as the remaining capacity of the battery, the maximum capacity of the battery, and the design capacity from the battery fuel gauge through the SMBUS.
And S307, the EC acquires the current discharging capacity of the battery according to the attribute information of the battery.
In the embodiment of the present application, the EC may obtain the consumed discharge capacity of the battery according to the temperature of the battery and/or the consumed capacity of the battery. And the EC acquires the current discharge capacity of the battery based on the discharge capacity when the battery is not consumed and the discharge capacity when the battery is consumed. In one embodiment, the discharge capability is used to characterize the discharge power of the battery.
The following describes the discharge capacity of the low temperature loss cell, and the discharge capacity of the capacity loss cell in order:
wherein the EC may obtain the discharge capacity of the low temperature-depleted battery according to the second temperature. In one embodiment, the EC may obtain the discharging capability of the low temperature-depleted battery based on a temperature difference between the second preset temperature and the second temperature and the low temperature loss coefficient. In one embodiment, the second predetermined temperature is indicative of normal temperature, such as 25 ℃. In one embodiment, the low temperature loss factor may also be referred to as a temperature loss factor.
In one embodiment, the EC may obtain the discharge capacity of the low temperature depleted battery using the following equation one:
FHT=(TP2-T2)·CHformula one
Wherein, FHTCharacterisation of the discharge Capacity of a Low temperature depleted Battery, TP2Characterizing a second predetermined temperature, T2Characterizing the second temperature, CHAnd (5) characterizing the low-temperature loss coefficient.
In one embodiment, the low temperature loss coefficient may be a certain value. In one embodiment, the low temperature loss factor is related to a temperature difference between the second predetermined temperature and the second temperature, such that the higher the temperature difference between the second predetermined temperature and the second temperature, the higher the low temperature loss factor.
The EC may obtain the discharge capacity of the battery with capacity loss according to the remaining capacity of the battery and the maximum capacity of the battery. In one embodiment, the EC may obtain the discharge capacity of the capacity-depleted battery based on a quotient of the maximum capacity and the design capacity of the battery, the remaining capacity of the battery, and the capacity depletion factor.
In one embodiment, the EC may obtain the discharge capacity of the capacity-depleted battery using the following equation two:
FHC=PNOW·CP·PMAX/PPformula two
Wherein, FHCDischarge capacity, P, of a battery characterizing a capacity lossNOWCharacterizing the residual capacity, P, of the batteryMAXCharacterizing the maximum capacity, P, of the cellPCharacterizing the design capacity of the cell, CPAnd characterizing the capacity loss coefficient.
In one embodiment, the capacity loss factor may be a certain value. In one embodiment, the capacity loss factor is related to a remaining capacity of the battery, and/or a quotient of a maximum capacity of the battery and a design capacity. Illustratively, when the capacity loss factor is related to the remaining capacity of the battery, the smaller the remaining capacity of the battery, the larger the capacity loss factor.
In one embodiment, the discharge capacity as battery depletion includes "discharge capacity of low temperature depleted battery FHTAnd capacity loss of the batteryHC"to illustrate, EC is obtaining the discharge capability F of the low temperature loss batteryHTAnd capacity-depleted discharge capability F of the batteryHCThen, the discharge capacity F of the battery can be reduced according to the preset discharge capacity of the battery and the low-temperature lossHTCapacity loss, discharge capacity F of the batteryHCAnd determining the current discharge capacity of the battery. The preset discharge capacity of the battery is the discharge capacity of the battery when the battery is at the second preset temperature (normal temperature) and the capacity of the battery is the maximum capacity. In one embodiment, the preset discharge capability may be referred to as a preset discharge power.
For example, the EC may use the preset discharge capacity minus the discharge capacity of the battery with low temperature loss and the discharge capacity of the battery with capacity loss as the current discharge capacity of the battery, and the current discharge capacity of the battery may be obtained based on the following formula three:
FNOW=FC-FHT-FHCformula three
Wherein, FNOWCharacterizing the current discharge capacity of the cell, FCAnd characterizing the preset discharge capacity.
S308, the EC acquires the maximum allowable power consumption of the CPU according to the current discharging capacity of the battery.
Maximum allowed power consumption characterization of the CPU: the terminal can provide power consumption corresponding to the maximum power of the CPU.
After the EC obtains the current discharging capability of the battery, the EC can subtract the power provided by the battery to other components in the terminal, and the rest is the power provided by the battery to the CPU. In one embodiment, the power provided by the battery to other components in the terminal may be preset in the EC. In one embodiment, the power provided by the battery to other components in the terminal by the battery used in the embodiments of the present application may be understood as "the maximum power required by other components".
In an embodiment other components in the terminal like a display, a hard disk, etc.
In one embodiment, the power that the battery can provide to the CPU can be obtained using the following equation four:
FFORCPU =FNOW-Fotherformula four
Wherein, FFORCPUCharacterizing the power that the battery can supply to the CPU, FotherThe power supplied by the battery to other components in the terminal is characterized. It is understood that FotherMay be a certain value, different "other parts" in different types of terminals, corresponding to FotherThe value of (c) is different.
After the EC obtains the power that the current battery can provide to the CPU, the EC may obtain the maximum allowed power consumption of the CPU based on the power that the current battery can provide to the CPU and the discharging efficiency of the battery.
In one embodiment, the maximum allowed power consumption of the CPU may be obtained using the following formula five:
ECPU=FFORCPUc formula five
Wherein E isCPUCharacterizing maximum allowed work of a CPUAnd c represents the discharge efficiency of the battery. Illustratively, the discharge efficiency of the cell is, for example, 90%.
S309, the EC writes the maximum allowed power consumption of the CPU into a preset position of the CPU through the PECI.
After the EC obtains the maximum allowed power consumption of the CPU, the EC may write the maximum allowed power consumption of the CPU into a preset position of the CPU through the PECI.
In one embodiment, the EC may send a write instruction to the CPU, including the maximum allowed power consumption of the CPU. And the writing instruction is used for instructing the CPU to write the maximum allowable power consumption of the CPU into a preset position of the CPU.
Accordingly, the CPU may write the maximum allowable power consumption of the CPU into a preset position of the CPU in response to the write instruction. It should be understood that the CPU successfully writes the maximum allowed power consumption of the CPU into the preset position of the CPU, and a message that the writing is successful may be fed back to the EC. If the CPU fails to write the maximum allowed power consumption of the CPU, a write failure message may be fed back to the EC, where the EC may continue to interact with the CPU in response to receiving the write failure message, and repeatedly try to write the maximum allowed power consumption of the CPU until the write is successful.
And S310, in response to the successful write-in of the maximum allowed power consumption of the CPU, the EC pulls up the level of the GPIO port connected with the EC and the CPU to a second preset level.
When the maximum allowable power consumption of the CPU is successfully written, the EC pulls up the level of the GPIO port connected with the EC and the CPU to a second preset level, and the second preset level is used for indicating the CPU to adaptively adjust the parameters of the CPU according to the maximum allowable power consumption of the CPU so as to avoid the condition that the CPU frequency is always in the preset frequency to influence the performance of the terminal and further influence the user experience. The second preset level is greater than the first preset level.
In one embodiment, the EC may pull up the Prochot # signal carried by the GPIO port to instruct the CPU to adjust the parameters of the CPU.
S311, the CPU responds to the fact that the detected level of the GPIO port connected with the EC and the CPU is a second preset level, the parameters of the CPU are adjusted according to the maximum allowable power consumption of the CPU at a preset position, and the CPU is started up according to the adjusted parameters.
The CPU can determine that parameters of the CPU need to be adjusted adaptively in response to detecting that the level of the GPIO port connected with the EC and the CPU is a second preset level. The CPU can read the maximum allowable power consumption of the CPU from a preset position, and then parameters of the CPU are adjusted according to the maximum allowable power consumption of the CPU so as to start the computer. That is, in the process of executing the boot operation by the CPU, the parameters of the CPU may be adaptively adjusted, and the boot operation is executed by the adjusted parameters of the CPU, so as to boot the terminal.
It should be understood that the PECI in the embodiment of the present application is a private communication interface of intel, and for a terminal provided with the PECI, the intel sets a protocol and a command of a CPU parameter in the PECI, which may refer to the related description of the existing PECI. The CPU may adjust parameters of the CPU based on intel's DTT (dynamic tuning technology) technology in response to reading the CPU's maximum allowed power consumption from a preset location. In one embodiment, the PECI bus provides a general interface for the EC of the intel to control the CPU power, and the EC can adjust the parameters of the CPU according to the rule agreed by the intel by a PECI write command and setting performance parameters such as PL1/PL2/PL 4.
In one embodiment, the parameters of the CPU may include, but are not limited to: power limit 1 (power limit 1, PL 1), PL2, PL3 and PL 4. In one embodiment, PL1 is a threshold for average power, typically set to be less than or equal to Thermal Design Power (TDP) power. PL2 is a threshold and if the PL2 power of the CPU exceeds this threshold, the PL2 fast power limit algorithm will attempt to limit the peak above PL 2. PL3 is a threshold and if the PL3 power of the CPU exceeds this threshold, the PL3 fast power limit algorithm will attempt to limit the duty cycle above the spike of PL3 by reactively limiting the frequency. PL4 is a limit that cannot be exceeded and the PL4 power limit algorithm will preferentially limit the frequency to prevent spikes above PL 4. It should be understood that, in general, PL1 is equal to TDP, PL2 is the power wall of the processor in the turbo state, and the PL2 power of the CPU cannot exceed it. There are also PL3 and PL4, both of which are instantaneous power consumption of the processor, both of which are generally preset and cannot be manually adjusted by the user.
In one embodiment, it can be understood that: the maximum allowable power consumption of the CPU and the parameter of the CPU are defined by the DTT technology of intel, and the CPU may adjust the parameter of the CPU based on the maximum allowable power consumption of the CPU and the mapping relationship.
In one embodiment, because the terminal may detect the attribute information of the battery according to a preset rule (e.g., periodically or periodically), the terminal may continuously perform S307 to S309 accordingly. It should be noted that after the EC writes the maximum allowed power consumption of the CPU into the preset position of the CPU through the PECI for the first time, and in response to the successful writing of the maximum allowed power consumption of the CPU, the level of the GPIO port to which the EC and the CPU are connected may be pulled up to the second preset level, and after the subsequent EC performs S307-S309 to obtain the maximum allowed power consumption of the CPU, the EC may write the maximum allowed power consumption of the CPU into the preset position of the CPU through the PECI without performing "pull up the level of the GPIO port to which the EC and the CPU are connected to the second preset level in response to the successful writing of the maximum allowed power consumption of the CPU". At this time, the level of the GPIO port connected between the EC and the CPU is always the second preset level, so that the CPU can be triggered to detect the preset position in real time to read the latest maximum allowable power consumption of the CPU, and the CPU can be adaptively adjusted in parameters. In the embodiment, after the EC raises the level of the GPIO port connected between the EC and the CPU to the second preset level, the maximum allowed power consumption of the CPU is obtained subsequently, the maximum allowed power consumption of the CPU can be written into the preset position of the CPU through the PECI, and the operation of raising the level of the GPIO port connected between the EC and the CPU to the second preset level is not executed, so that the signaling interaction can be reduced, and the resources are saved.
And S312, the EC controls the terminal to be started by adopting a second strategy.
S312 may refer to the description related to S203.
In an embodiment, from the perspective of executing the booting method provided in the embodiment of the present application by using the terminal as an execution main body, the above S301 to S311 may be simplified as shown in fig. 5.
In an embodiment, it is noted that after the EC obtains the first temperature in S302, if the EC detects that the first temperature of the battery is greater than or equal to the first preset temperature, the CPU parameters may be controlled according to a normal temperature control strategy, and reference may be made to the relevant description in S203. In one embodiment, the ambient temperature control strategy may be understood as a second strategy.
In the embodiment of the application, when the terminal is started at a low temperature, the CPU frequency is reduced, the power consumption of the CPU can be prevented from being too high when the CPU is powered on, the system is powered off due to the fact that the power consumption exceeds the discharging capacity of a battery instantly, the terminal can be started smoothly, the EC can detect the attribute information of the battery according to the preset rule, and then the EC can adaptively control the CPU to adjust the CPU parameters based on the attribute information of the battery.
In an embodiment, in a scenario where the terminal is turned on at a low temperature, the EC may detect attribute information of the battery according to a preset rule, and when the EC detects that the temperature of the battery is greater than or equal to a preset temperature, that is, when the EC determines that the terminal is not at the low temperature, the EC may write a normal temperature control policy (or write the maximum allowable power consumption of the CPU corresponding to the normal temperature scenario) in a preset position of the CPU through the PECI, so that the CPU may control parameters of the CPU based on the normal temperature control policy.
Referring to fig. 6, after S311, S313-S314 may be further included:
s313, the EC writes, by the PECI, the maximum allowable power consumption of the CPU at the third temperature at the preset position of the CPU in response to detecting that the third temperature of the battery is greater than or equal to the preset temperature.
It should be understood that, for the method for obtaining the maximum allowed power consumption of the CPU at the third temperature, reference may be made to the description about obtaining the maximum allowed power consumption of the CPU at the second temperature in S307-S308, which is not described herein again.
And S314, the CPU adjusts the parameters of the CPU to operate according to the maximum allowable power consumption of the CPU at the third temperature.
It should be appreciated that the CPU may adjust parameters of the CPU to operate based on a maximum allowed power consumption of the CPU at the third temperature. In an embodiment, when the third temperature of the battery is greater than or equal to the preset temperature in the process of the CPU executing the boot operation, the CPU may adjust parameters of the CPU according to the maximum allowable power consumption of the CPU at the third temperature, so as to operate according to the adjusted parameters of the CPU to perform the boot operation.
In an embodiment, after the terminal is powered on, if the third temperature of the battery is greater than or equal to the preset temperature, the CPU may adjust parameters of the CPU according to the maximum allowed power consumption of the CPU at the third temperature, so as to operate according to the adjusted parameters of the CPU, so that the terminal operates normally. In this embodiment, the terminal is not always at the preset frequency after being powered on, but runs based on the attribute information of the battery or according to the parameters of the CPU corresponding to the maximum allowed power consumption of the CPU at the third temperature, so that the performance of the terminal after being powered on can be improved, and the problem of stuttering after being powered on is avoided.
In an embodiment, the CPU detects that the maximum allowed power consumption of the CPU is the maximum allowed power consumption of the CPU at normal temperature, and the CPU may execute a program of a Basic Input Output System (BIOS) to adaptively adjust parameters of the CPU, which may specifically refer to the above-mentioned description about the second policy and the related description about the program operation using the BIOS in the prior art at normal temperature.
In the embodiment of the application, in the process of starting the terminal or after the terminal is started, the EC may further detect attribute information of the battery according to a preset rule, and when the third temperature of the battery is greater than or equal to the preset temperature, that is, the battery is at a non-low temperature condition, the EC may interact with the CPU, so that the CPU controls parameters of the CPU to operate according to a normal-temperature control strategy.
In an embodiment, in terms of executing the boot method provided in the embodiment of the present application by a terminal, referring to fig. 7, the boot method provided in the embodiment of the present application may include:
s701, responding to the received starting-up instruction, detecting a first temperature of the battery when the terminal is not connected with the power adapter.
In one embodiment, a battery, a CPU, and a temperature sensor may be included in the terminal. The temperature sensor is used for detecting the temperature of the battery.
In the embodiment of the application, the terminal responds to the received starting-up instruction and detects that the terminal is not connected with the power adapter, so that the temperature of the battery can be detected. In one embodiment, the temperature of the battery may be referred to as a first temperature in order to distinguish the temperatures of the battery at different times.
In an embodiment, the power-on instruction may be that the terminal detects that a user operates a power-on button on the terminal, or the user speaks a voice for instructing the terminal to power on, and the like. In one embodiment, the terminal may include an EC, and the terminal receives the power-on command and the EC may power on. In one embodiment, the EC power-on characterization terminal receives a power-on instruction.
The terminal may detect whether the terminal is connected to an adapter (power adapter) in response to receiving the power-on instruction.
In one embodiment, the terminal may detect whether an external voltage input is provided to detect whether the terminal is connected to the adapter, wherein the terminal determines that the terminal is not connected to the adapter in response to the absence of the external voltage input terminal, and determines that the terminal is connected to the adapter in response to the presence of the external voltage input terminal.
In one embodiment, the EC and the charging chip are included in the terminal, and the charging chip and the EC may interact to determine whether the terminal is connected to the adapter, which may be referred to as the description in S301.
S702, in response to the first temperature being less than a first preset temperature, the CPU frequency is reduced to a preset frequency.
And the terminal detects that if the first temperature of the battery is lower than the first preset temperature, the CPU frequency is reduced to the preset frequency, so that the power consumption required by the CPU is reduced, and the smooth start-up is ensured.
And S703, adjusting the parameters of the CPU according to the attribute information of the battery, and starting the computer by using the adjusted parameters of the CPU.
The attribute information of the battery may include, but is not limited to: temperature of the battery, remaining capacity of the battery, maximum capacity, and nominal capacity, etc. In one embodiment, the attribute information of the battery and the parameters of the CPU have a mapping relationship, so that the terminal can detect the attribute of the battery, determine the parameters of the CPU according to the attribute of the battery and the mapping relationship, further adjust the parameters of the CPU, and start the computer by using the adjusted parameters of the CPU.
In an embodiment, the terminal may obtain the maximum allowed power consumption that the battery can provide to the CPU according to the attribute information of the battery, and further adjust the parameter of the CPU according to the maximum allowed power consumption. In one embodiment, the terminal may periodically acquire the attribute information of the battery, and then periodically acquire the maximum allowed power consumption that the battery can provide to the CPU according to the periodically acquired attribute information of the battery, so as to periodically adjust the parameters of the CPU according to the periodically acquired maximum allowed power consumption. Therefore, the terminal can adaptively adjust the parameters of the CPU according to the real-time battery attribute information, and further improve the performance of the terminal.
In an embodiment, the attribute information of the battery has a mapping relationship with the maximum allowed power consumption of the CPU, so that in the embodiment of the present application, the terminal may obtain the maximum allowed power consumption of the CPU according to the attribute information of the battery and the mapping relationship, and further adjust the parameter of the CPU according to the maximum allowed power consumption. In an embodiment, the maximum allowed power consumption of the CPU and the parameters of the CPU have a mapping relationship, and the terminal may obtain the parameters of the CPU according to the calculated maximum allowed power consumption of the CPU and the mapping relationship, and further adjust the parameters of the CPU mapped from the current parameters of the CPU to the maximum allowed power consumption of the CPU.
In one embodiment, the terminal may obtain the current discharge power of the battery according to the attribute information of the battery, and further obtain the maximum allowed power consumption according to the current discharge power of the battery. In one embodiment, the attribute information of the battery and the current discharge power of the battery have a mapping relationship, so that the terminal can obtain the current discharge power of the battery according to the attribute information of the battery and the mapping relationship.
In an embodiment, the terminal may obtain the consumed discharge power of the battery according to the attribute information of the battery, and further use a difference value between the preset discharge power of the battery and the consumed discharge power of the battery as the current discharge power of the battery, which may refer to the relevant description in S307. Wherein, predetermine the discharge power and be the discharge power when the capacity of battery is maximum capacity under the second preset temperature, the discharge power that the battery has lost includes: the temperature-lost discharge power, and/or the capacity-lost discharge power, the second predetermined temperature being greater than the first predetermined temperature.
The manner of calculating the discharge power of the temperature loss and the discharge power of the capacity loss may refer to the related description in S307.
In the embodiment of the application, when the terminal is started, the CPU is not kept at the preset frequency all the time, but the parameters of the CPU are adjusted based on the attribute information of the battery, so that the starting efficiency can be improved, and the starting time length can be reduced. In one embodiment, the preset frequency is a lower frequency that is adjusted by the CPU when the computer is started successfully, and because the temperature of the battery rises during the use of the battery, the CPU frequency in the adjusted parameters of the CPU is higher than the preset frequency, so that the startup efficiency can be improved, and the startup duration can be reduced.
Fig. 8 is a schematic structural diagram of a boot device according to an embodiment of the present disclosure. The starting device according to this embodiment may be the terminal described above, or may be a chip applied to the terminal. The starting device can be used for executing the actions of the terminal in the method embodiment. As shown in fig. 8, the boot device may include a detection module 801 and a processing module 802.
The detection module 801 is used for responding to a received starting-up instruction, detecting a first temperature of a battery in the terminal when the terminal is not connected with a power adapter;
the processing module 802 is configured to reduce a frequency of a central processing unit CPU in the terminal to a preset frequency in response to that the first temperature is lower than a first preset temperature, and adjust a parameter of the CPU according to the attribute information of the battery, so as to start up the terminal with the adjusted parameter of the CPU.
In a possible implementation manner, the processing module 802 is specifically configured to obtain, according to the attribute information of the battery, a maximum allowed power consumption that can be provided by the battery to the CPU; and adjusting the parameters of the CPU according to the maximum allowable power consumption.
In a possible implementation manner, the processing module 802 is specifically configured to obtain a current discharge power of the battery according to the attribute information of the battery; and acquiring the maximum allowable power consumption according to the current discharge power of the battery.
In a possible implementation manner, the processing module 802 is specifically configured to obtain a consumed discharge power of the battery according to the attribute information of the battery; and taking the difference value between the preset discharge power of the battery and the discharge power consumed by the battery as the current discharge power of the battery.
In one possible implementation manner, the preset discharge power is a discharge power at which the capacity of the battery is the maximum capacity at a second preset temperature, and the discharge power consumed by the battery includes: the temperature-lost discharge power and/or the capacity-lost discharge power, and the second preset temperature is greater than the first preset temperature.
In one possible implementation, the attribute information of the battery includes: a second temperature of the battery, the second temperature being a temperature of the battery when the CPU frequency is reduced to the preset frequency.
The processing module 802 is specifically configured to obtain the discharge power of the temperature loss according to a difference between the second temperature and a second preset temperature and a temperature loss coefficient corresponding to the second temperature.
In one possible implementation, the attribute information of the battery includes: a remaining capacity, a maximum capacity, and a nominal capacity of the battery. The processing module 802 is specifically configured to obtain the discharge power of the capacity loss according to the quotient of the maximum capacity and the nominal capacity, the remaining capacity, and a capacity loss coefficient corresponding to the remaining capacity.
In a possible implementation manner, the processing module 802 is specifically configured to use, as the maximum allowed power consumption, a difference between a current discharge power of the battery and a power of other components in the terminal, where the other components are components in the terminal other than the CPU.
In a possible implementation manner, the processing module 802 is specifically configured to periodically acquire attribute information of the battery; periodically acquiring the maximum allowed power consumption which can be provided for the CPU by the battery according to the periodically acquired attribute information of the battery; and periodically adjusting the parameters of the CPU according to the periodically acquired maximum allowable power consumption.
In a possible implementation manner, the terminal further includes: the embedded controller EC is respectively connected with the battery and the CPU, responds to the electrification of the EC, and detects whether the terminal is connected with the power adapter; the EC detects a first temperature of the battery in response to the terminal not being connected to the power adapter.
In a possible implementation manner, the terminal further includes: the charging chip is connected with the EC, when the power adapter is connected with the terminal, the power adapter is connected with the charging chip, when the charging chip is connected with the power adapter, the charging chip pulls up the level of a first GPIO port connected with the charging chip and the EC, and when the charging chip is disconnected with the power adapter, the charging chip pulls down the level of the first GPIO port.
And the EC detects whether the terminal is connected with the power adapter or not according to the level of the first GPIO port.
In one possible implementation manner, in response to the first temperature being lower than the first preset temperature, the EC pulls down a level of a second GPIO port to which the EC and the CPU are connected to a first preset level; and the CPU responds to the power-on of the CPU, detects that the level of the second GPIO port is the first preset level, and reduces the frequency of the CPU to the preset frequency.
In one possible implementation, the EC communicates with the CPU in response to the CPU being powered on, so that the CPU adjusts parameters of the CPU; the CPU responds to the successful communication with the EC and sends a communication success confirmation message to the EC; the EC acquires the attribute information of the battery in response to receiving the communication success confirmation message from the CPU, and acquires the maximum allowable power consumption according to the attribute information of the battery.
In one possible implementation, the EC writes the maximum allowed power consumption in a preset position of the CPU through the second GPIO port; the CPU reads the maximum allowed power consumption at the preset position; and the CPU adjusts the parameters of the CPU according to the maximum allowable power consumption.
In one possible implementation manner, in response to the maximum allowed power consumption write success, the EC raises the level of the second GPIO port to a second preset level; and the CPU responds to the level of the second GPIO port as the second preset level, and reads the maximum allowed power consumption at the preset position.
In a possible implementation manner, the attribute information includes a third temperature, where the third temperature is greater than the first preset temperature, and the processing module 802 is further configured to run a program of the input/output system BIOS.
In an embodiment, an embodiment of the present application further provides an electronic device, where the electronic device may be the terminal described in the foregoing embodiment, and as shown in fig. 9, the electronic device may include: a processor 901 (e.g., CPU), memory 902. The memory 902 may include a random-access memory (RAM) and a non-volatile memory (NVM), such as at least one disk memory, and the memory 902 may store various instructions for performing various processing functions and implementing the method steps of the present application.
Optionally, the electronic device related to the present application may further include: a power supply 903, a communication bus 904, and a communication port 905. The communication port 905 is used for realizing connection and communication between the electronic device and other peripherals. In an embodiment of the present application, the memory 902 is used for storing computer executable program code, the program code comprising instructions; when the processor 901 executes the instructions, the instructions cause the processor 901 of the electronic device to execute the actions in the above method embodiments, which implement similar principles and technical effects, and are not described herein again.
It should be noted that the modules or components described in the above embodiments may be one or more integrated circuits configured to implement the above methods, for example: one or more Application Specific Integrated Circuits (ASICs), or one or more microprocessors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs), etc. For another example, when one of the above modules is implemented in the form of a processing element scheduler code, the processing element may be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor that can call program code, such as a controller. As another example, these modules may be integrated together, implemented in the form of a system-on-a-chip (SOC).
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The procedures or functions according to the embodiments of the present application are all or partially generated when the computer program instructions are loaded and executed on a computer. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wirelessly (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
The term "plurality" herein means two or more. The term "and/or" herein is merely an association describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship; in the formula, the character "/" indicates that the preceding and following related objects are in a relationship of "division". In addition, it is to be understood that the terms first, second, etc. in the description of the present application are used for distinguishing between the descriptions and not necessarily for describing a sequential or chronological order.
It is to be understood that the various numerical references referred to in the embodiments of the present application are merely for descriptive convenience and are not intended to limit the scope of the embodiments of the present application.
It should be understood that, in the embodiment of the present application, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiment of the present application.

Claims (19)

1. A starting method is characterized in that a terminal comprises a battery and a Central Processing Unit (CPU), and the method comprises the following steps:
responding to a received starting instruction, and detecting a first temperature of the battery when the terminal is not connected with a power adapter;
responding to the first temperature being smaller than a first preset temperature, and reducing the CPU frequency to a preset frequency;
and adjusting the parameters of the CPU according to the attribute information of the battery, and starting up the computer by using the adjusted parameters of the CPU.
2. The method of claim 1, wherein the adjusting the parameters of the CPU according to the attribute information of the battery comprises:
acquiring the maximum allowed power consumption which can be provided for the CPU by the battery according to the attribute information of the battery;
and adjusting the parameters of the CPU according to the maximum allowable power consumption.
3. The method according to claim 2, wherein the obtaining of the maximum allowed power consumption that can be provided to the CPU by the battery according to the attribute information of the battery comprises:
acquiring the current discharge power of the battery according to the attribute information of the battery;
and acquiring the maximum allowable power consumption according to the current discharge power of the battery.
4. The method according to claim 3, wherein the obtaining of the current discharge power of the battery according to the attribute information of the battery comprises:
acquiring the consumed discharge power of the battery according to the attribute information of the battery;
and taking the difference value between the preset discharge power of the battery and the discharge power consumed by the battery as the current discharge power of the battery.
5. The method of claim 4, wherein the preset discharge power is a discharge power at which the capacity of the battery is a maximum capacity at a second preset temperature, and the discharge power consumed by the battery comprises: the temperature-lost discharge power and/or the capacity-lost discharge power, and the second preset temperature is greater than the first preset temperature.
6. The method of claim 5, wherein the attribute information of the battery comprises: a second temperature of the battery, the second temperature being a temperature of the battery when the CPU frequency is reduced to the preset frequency;
the obtaining of the consumed discharge power of the battery according to the attribute information of the battery includes:
and acquiring the discharge power of the temperature loss according to the difference value between the second temperature and a second preset temperature and the temperature loss coefficient corresponding to the second temperature.
7. The method of claim 5, wherein the attribute information of the battery comprises: a remaining capacity, a maximum capacity, and a nominal capacity of the battery;
the obtaining of the consumed discharge power of the battery according to the attribute information of the battery includes:
and acquiring the discharge power of the capacity loss according to the quotient of the maximum capacity and the nominal capacity, the residual capacity and a capacity loss coefficient corresponding to the residual capacity.
8. The method according to any one of claims 3-7, wherein the obtaining the maximum allowed power consumption according to the current discharge power of the battery comprises:
and taking the difference value of the current discharge power of the battery and the power of other components in the terminal, wherein the other components are components in the terminal except the CPU, as the maximum allowable power consumption.
9. The method according to any one of claims 2 to 7, wherein before acquiring the maximum allowed power consumption that the battery can provide to the CPU according to the attribute information of the battery, the method further comprises:
periodically acquiring attribute information of the battery;
the obtaining of the maximum allowed power consumption that can be provided by the battery to the CPU according to the attribute information of the battery includes:
periodically acquiring the maximum allowed power consumption which can be provided for the CPU by the battery according to the periodically acquired attribute information of the battery;
the adjusting the parameters of the CPU according to the maximum allowed power consumption comprises:
and periodically adjusting the parameters of the CPU according to the periodically acquired maximum allowable power consumption.
10. The method according to any of claims 2-7, wherein the terminal further comprises: the embedded controller EC is respectively connected with the battery and the CPU, responds to the received starting instruction, is not connected with the adapter, detects the first temperature of the battery, and comprises the following steps:
the EC responds to the electrification of the EC and detects whether the terminal is connected with the power adapter or not;
the EC detects a first temperature of the battery in response to the terminal not being connected to the power adapter.
11. The method of claim 10, wherein the terminal further comprises: the charging chip is connected with the EC, when the power adapter is connected with the terminal, the power adapter is connected with the charging chip, when the charging chip is connected with the power adapter, the charging chip pulls up the level of a first GPIO port connected with the charging chip and the EC, and when the charging chip is disconnected with the power adapter, the charging chip pulls down the level of the first GPIO port;
the detecting whether the terminal is connected with the power adapter comprises:
and the EC detects whether the terminal is connected with the power adapter or not according to the level of the first GPIO port.
12. The method of claim 11, wherein said reducing the CPU frequency to a preset frequency in response to the first temperature being less than a first preset temperature comprises:
the EC responds to the first temperature being lower than the first preset temperature, and pulls down the level of a second GPIO port connected with the EC and the CPU to a first preset level;
and the CPU responds to the power-on of the CPU, detects that the level of the second GPIO port is the first preset level, and reduces the frequency of the CPU to the preset frequency.
13. The method of claim 12, further comprising:
the EC responds to the power-on of the CPU and communicates with the CPU so as to enable the CPU to adjust the parameters of the CPU;
the CPU responds to the successful communication with the EC and sends a communication success confirmation message to the EC;
the EC acquires attribute information of the battery in response to receiving the communication success confirmation message from the CPU;
the obtaining of the maximum allowed power consumption that can be provided by the battery to the CPU according to the attribute information of the battery includes:
and the EC acquires the maximum allowed power consumption according to the attribute information of the battery.
14. The method of claim 13, wherein adjusting the parameters of the CPU based on the maximum allowed power consumption comprises:
the EC writes the maximum allowed power consumption into a preset position of the CPU through the second GPIO port;
the CPU reads the maximum allowed power consumption at the preset position;
and the CPU adjusts the parameters of the CPU according to the maximum allowable power consumption.
15. The method of claim 14, wherein after the EC writes the maximum allowed power consumption in a preset location of the CPU through the second GPIO port, further comprising:
the EC responds to the successful writing of the maximum allowed power consumption, and pulls up the level of the second GPIO port to a second preset level;
the CPU reads the maximum allowed power consumption at the preset position, and the method comprises the following steps:
and the CPU responds to the level of the second GPIO port as the second preset level, and reads the maximum allowed power consumption at the preset position.
16. The method according to any one of claims 1-7, wherein a third temperature is included in the attribute information, the third temperature being greater than the first preset temperature, the method further comprising:
and running the program of the input and output system BIOS.
17. A boot device, comprising:
the terminal comprises a detection module, a power adapter and a control module, wherein the detection module is used for responding to a received starting instruction, detecting a first temperature of a battery in the terminal when the terminal is not connected with the power adapter;
and the processing module is used for responding to the condition that the first temperature is lower than a first preset temperature, reducing the frequency of a Central Processing Unit (CPU) in the terminal to a preset frequency, adjusting the parameters of the CPU according to the attribute information of the battery, and starting the terminal by using the adjusted parameters of the CPU.
18. An electronic device, comprising: a processor and a memory;
the memory stores computer-executable instructions;
the processor executes computer-executable instructions stored by the memory, causing the processor to perform the method of any of claims 1-16.
19. A computer-readable storage medium, in which a computer program or instructions are stored which, when executed, implement the method of any one of claims 1-16.
CN202210194738.0A 2022-03-02 2022-03-02 Starting method and device and electronic equipment Active CN114265492B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210194738.0A CN114265492B (en) 2022-03-02 2022-03-02 Starting method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210194738.0A CN114265492B (en) 2022-03-02 2022-03-02 Starting method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN114265492A true CN114265492A (en) 2022-04-01
CN114265492B CN114265492B (en) 2022-08-23

Family

ID=80833865

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210194738.0A Active CN114265492B (en) 2022-03-02 2022-03-02 Starting method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN114265492B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109992085A (en) * 2019-04-02 2019-07-09 山东超越数控电子股份有限公司 A kind of computer electric power management system, method and terminating machine
CN111008108A (en) * 2019-11-28 2020-04-14 联想(北京)有限公司 Electronic device working method, electronic device and readable storage medium
CN112789651A (en) * 2019-03-27 2021-05-11 华为技术有限公司 Frequency adjusting method and device applied to terminal and electronic equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112789651A (en) * 2019-03-27 2021-05-11 华为技术有限公司 Frequency adjusting method and device applied to terminal and electronic equipment
CN109992085A (en) * 2019-04-02 2019-07-09 山东超越数控电子股份有限公司 A kind of computer electric power management system, method and terminating machine
CN111008108A (en) * 2019-11-28 2020-04-14 联想(北京)有限公司 Electronic device working method, electronic device and readable storage medium

Also Published As

Publication number Publication date
CN114265492B (en) 2022-08-23

Similar Documents

Publication Publication Date Title
KR100957903B1 (en) Improved charging of mobile devices
US9846472B2 (en) Firmware update method and power system thereof
US10007507B2 (en) Method for updating firmware of a battery included in a rechargeable battery module, portable electronic device, and rechargeable battery module
US9104396B2 (en) Electronic apparatus, charging control device, and charging control method
US20130154551A1 (en) Charging port
WO2021043222A1 (en) Terminal device charging method and apparatus, and storage medium
US11056903B2 (en) Electronic device including battery and method of controlling charging thereof
US9991729B2 (en) Electronic device having a charging voltage regulation circuit
CN112540304A (en) Battery power management method, electronic device and computer storage medium
US20150089260A1 (en) Electronic Apparatus, Method, and Storage Medium
US20240152192A1 (en) Charging Control Method, Electronic Device, and Charging Control System
CN112310756A (en) Electronic device for preventing USB device from being damaged and operation method thereof
US9252618B2 (en) Terminals, terminal systems and charging/discharging methods thereof
EP2784901B1 (en) Universal serial bus chargers and charging management methods
US20120030487A1 (en) Information processing apparatus and power control method
US9570922B2 (en) Charging method and electronic device
US20220173605A1 (en) Controlling charging of computing device through ports connected to external devices
CN114265492B (en) Starting method and device and electronic equipment
US20200249735A1 (en) Charge control apparatus and charge control system
WO2020042715A1 (en) Electronic device power supply method and apparatus, electronic device, and storage medium
US10459503B2 (en) Electronic system, terminal device, and function expansion device
CN110148992B (en) Charging control method, terminal device and storage medium
TWI488032B (en) Electronic device and power supplying control method thereof
JP2014233177A (en) Electronic apparatus and charge control method
US9507400B2 (en) Information handling system battery charge management to support quick start

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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20240109

Address after: No. 9, Xingyao Road, Chang'an District, Xi'an, Shaanxi Province 710000

Patentee after: Xi'an Honor Device Co.,Ltd.

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

Patentee before: Honor Device Co.,Ltd.