CN115617500A - Working frequency adjusting method and device, electronic equipment and storage medium - Google Patents

Working frequency adjusting method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115617500A
CN115617500A CN202110796878.0A CN202110796878A CN115617500A CN 115617500 A CN115617500 A CN 115617500A CN 202110796878 A CN202110796878 A CN 202110796878A CN 115617500 A CN115617500 A CN 115617500A
Authority
CN
China
Prior art keywords
processor
current
power supply
frequency
temperature value
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.)
Pending
Application number
CN202110796878.0A
Other languages
Chinese (zh)
Inventor
史岩松
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202110796878.0A priority Critical patent/CN115617500A/en
Priority to PCT/CN2022/097603 priority patent/WO2023284448A1/en
Publication of CN115617500A publication Critical patent/CN115617500A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5044Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering hardware capabilities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/16Constructional details or arrangements
    • G06F1/20Cooling means
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/266Arrangements to supply power to external peripherals either directly from the computer or under computer control, e.g. supply of power through the communication port, computer controlled power-strips
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3058Monitoring arrangements for monitoring environmental properties or parameters of the computing system or of the computing system component, e.g. monitoring of power, currents, temperature, humidity, position, vibrations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • 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 discloses a working frequency adjusting method and device, electronic equipment and electronic equipment. The electronic equipment comprises a power supply module and a processor; the power supply module is used for supplying power to the processor; the processor is used for determining the predicted time length for the processor to rise from the first temperature value to the second temperature value according to the working current or the power supply provided by the power supply module to the processor, the current first temperature value of the processor and the current first working frequency, and is used for switching from the first working frequency to the second working frequency according to the predicted time length, wherein the first working frequency is larger than the second working frequency. The working frequency adjusting method, the working frequency adjusting device, the electronic equipment and the storage medium can avoid the situation of overhigh temperature of the processor and ensure the safety and the stability of the processor.

Description

Working frequency adjusting method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of power supply technologies, and in particular, to a method and an apparatus for adjusting a working frequency, an electronic device, and a storage medium.
Background
With the rapid development of electronic technology, various electronic devices have more and more improved functions, and a processor, such as a Central Processing Unit (CPU), is usually installed inside the electronic device, and the processor can be used to perform various tasks to implement the functions of the electronic device. The processor usually has a plurality of different operating frequencies, and the higher the operating frequency is, the faster the operating speed of the processor is, the stronger the processing performance of the processor is. At present, in order to ensure the processing performance of a processor, the processor is usually operated at a higher operating frequency, and the temperature of the processor is too high, which affects the safety and stability of the processor.
Disclosure of Invention
The embodiment of the application discloses a working frequency adjusting method and device, electronic equipment and a storage medium, which can avoid the situation of overhigh temperature of a processor and ensure the safety and stability of the processor.
The embodiment of the application discloses electronic equipment, which comprises a power supply module and a processor;
the power supply module is used for supplying power to the processor;
the processor is used for determining the predicted time length for the processor to rise from the first temperature value to the second temperature value according to the working current or the power supply provided by the power supply module to the processor, the current first temperature value of the processor and the current first working frequency, and is used for switching from the first working frequency to the second working frequency according to the predicted time length; wherein the first operating frequency is greater than the second operating frequency.
The embodiment of the application discloses a working frequency adjusting method, which is applied to electronic equipment, wherein the electronic equipment comprises a processor and a power supply module, and the method comprises the following steps:
the processor determines the predicted time length for the processor to rise from the first temperature value to a second temperature value according to the working current or the power supply power provided by the power supply module to the processor, the current first temperature value and the current first working frequency;
and the processor switches from the first working frequency to a second working frequency according to the predicted duration, wherein the first working frequency is greater than the second working frequency.
The embodiment of the application discloses operating frequency adjusting device is applied to electronic equipment, electronic equipment includes treater and power module, the device includes:
the prediction module is used for determining the prediction duration of the processor from the first temperature value to the second temperature value according to the working current or the power supply power provided by the power supply module to the processor, the current first temperature value and the current first working frequency;
and the frequency reduction module is used for switching from the first working frequency to a second working frequency according to the predicted duration, wherein the first working frequency is greater than the second working frequency.
The embodiment of the application discloses an electronic device, which comprises a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor is enabled to realize the method.
An embodiment of the application discloses a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the method as described above.
According to the working frequency adjusting method, the working frequency adjusting device, the electronic equipment and the storage medium, the processor can determine the predicted time length for the processor to rise from the first temperature value to the second temperature value according to the working current or the power supply power, the current first temperature value and the current first working frequency provided by the power supply module to the processor, and switch from the first working frequency to the second working frequency according to the predicted time length, wherein the first working frequency is larger than the second working frequency, the processor can avoid the situation that the temperature of the processor is too high in advance before the temperature rises to the second temperature value, the time for the temperature of the processor to reach the second temperature value is prolonged, and the safety and the stability of the processor are enhanced.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
FIG. 1 is a block diagram of an electronic device in one embodiment;
FIG. 2 is a block diagram of an electronic device in another embodiment;
FIG. 3 is a circuit diagram of a transform unit in one embodiment;
FIG. 4 is a diagram illustrating a correspondence between power supply power and temperature in one embodiment;
FIG. 5 is a flow chart of a method for operating frequency adjustment in one embodiment;
FIG. 6 is a flow chart of a method for adjusting operating frequency in another embodiment;
FIG. 7 is a schematic diagram illustrating the processor determining the predicted time duration according to the current value or the power supply power of the operating current, the current first temperature value, and the first operating frequency, and performing frequency reduction according to an embodiment;
FIG. 8 is a block diagram of an operating frequency adjustment apparatus in one embodiment;
fig. 9 is a block diagram showing a structure of an electronic device in another embodiment.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "comprising" and "having," and any variations thereof, in the examples and figures herein are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements but may alternatively include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It will be understood that, as used herein, the terms "first," "second," and the like may be used herein to describe various elements, but these elements should not be limited by these terms. These terms are only used to distinguish one element from another. For example, the first temperature value may be referred to as a second temperature value, and similarly, the second temperature value may be referred to as a first temperature value, without departing from the scope of the present application. The first temperature value and the second temperature value are both temperature values, but are not the same temperature. The term "plurality" as used herein refers to two or more.
Fig. 1 is a block diagram of an electronic device in one embodiment. In the embodiment of the present application, the electronic device may include, but is not limited to, a mobile phone, a smart wearable device, a vehicle-mounted terminal, a tablet computer, a notebook computer, and the like. As shown in fig. 1, the electronic device 100 may include a power supply module 110 and a processor 120, the power supply module 110 may be connected with the processor 120, and optionally, the connection between the power supply module 110 and the processor 120 may include an electrical connection through a power bus connection and a communication connection through a communication bus connection.
The power supply module 110 is used for supplying power to the processor 120.
In one embodiment, the Power module 110 may include, but is not limited to, a PMIC (Power Management IC) chip or the like. The power supply module 110 may provide the processor 120 with an operating voltage and an operating current required by the processor 120 according to the power provided by the power supply, so that the processor 120 can operate and work correctly. The processor 120 needs to be driven by different operating voltages to operate at different operating frequencies, where the operating frequency of the processor 120 may refer to a main frequency at which a core in the processor 120 operates. Each operating frequency of the processor 120 may correspond to different operating voltages, the operating frequency and the operating voltage may have a positive correlation, and the higher the operating frequency of the processor 120 is, the larger the required operating voltage may be.
For example, the processor 120 may operate at 2.34GHz (megahertz), 2.30GHz, 2.26GHz \8230 \ 8230, etc., wherein the operating voltage corresponding to the operating frequency of 2.34GHz may be 1.12V (volts), the operating voltage corresponding to the operating frequency of 2.30GHz may be 1.09V, the operating voltage corresponding to the operating frequency of 2.26GHz may be 1.06V, etc., but is not limited thereto.
In some embodiments, during the operation of the processor 120, the power supply module 110 may obtain a current value or a power supply power of an operating current provided to the processor 120, and the current value or the power supply power of the operating current may be used to reflect a power consumption condition of the processor 120, and the power supply power may be regarded as a consumed power of the processor 120. In one embodiment, the power supply module 110 may detect a current value of the operating current provided to the processor 120 and send the current value to the processor 120, and the processor 120 may calculate the power supply according to the current value, the current operating voltage, and the like. As another embodiment, after detecting a current value of the working current provided to the processor 120, the power supply module 110 may also calculate the power supply of the processor 120 according to the current working voltage provided to the processor 120 and the current value, and then send the power supply to the processor 120.
Further, the power supply module 110 may transmit the current value of the operating current or the power supply to the processor 120 through the communication bus. It should be noted that, a functional module for obtaining the current value or the power supply power of the operating current provided by the power supply module 110 to the processor 120 may also be separately provided, and a communication connection between the functional module and the processor 120 is established, and the function of obtaining the current value or the power supply power is not necessarily integrated in the power supply module 110.
Optionally, the power supply module 110 may obtain the current value or the power supply power of the operating current in real time, and may also obtain the current value or the power supply power of the operating current according to a preset sampling period, where the sampling period may be set according to an actual requirement, for example, 1 second, 2 seconds, 500 milliseconds, and the like, but is not limited thereto.
The processor 120 is configured to determine a predicted time period for increasing from the first temperature value to the second temperature value according to the operating current or the power supply provided by the power supply module 110 to the processor 120, the current first temperature value of the processor, and the current first operating frequency, and is configured to switch from the first operating frequency to the second operating frequency according to the predicted time period.
The processor 120 is one of the core components inside the electronic device 100, and is capable of executing computer instructions and processing data in software programs to implement various functions of the electronic device 100, and the processor 120 is also capable of controlling and allocating various resources (such as memory, i/o units, etc.) of the electronic device 100. In order to meet the requirements of executing different tasks in the electronic device 100, the processor 120 can generally provide a plurality of different operating frequencies, and the higher the operating frequency is, the faster the operating speed of the processor 120 is, the more powerful the processing performance of the processor 120 is.
The Processor 120 may include, but is not limited to, a chip such as a CPU, an MCU (micro controller Unit), a GPU (Graphics Processing Unit), an AP (Application Processor), and other electronic devices having a data Processing function. In one embodiment, a temperature detection module (not shown) may be included in the electronic device 100, and the temperature detection module may be configured to detect a temperature value of the processor 120 and send the detected temperature value to the processor 120. After receiving the current value or the power supply power sent by the power supply module 120, the processor 120 may predict a temperature change condition of the processor 120 according to the current value or the power supply power, a current first temperature value of the processor, and a current first operating frequency. The temperature variation of the processor 120 may be related to the power consumption of the processor 120, and the power consumption of the processor 120 may be determined according to the current value of the operating current or the power supply power, as described above, in the case that the operating frequency of the processor 120 is larger, and the current value of the operating current or the power supply power is larger, the larger the power consumption of the processor 120 is, the more heat is generated, and therefore, the faster the temperature of the processor 120 rises.
The processor 120 may estimate the predicted time period to reach the second temperature value according to a current operating state, which may include a current operating current or power supply of the processor 120, a current first temperature value, a current operating frequency, a first operating frequency, and the like. The processor 120 can be switched from the first operating frequency to the second operating frequency according to the predicted duration, the first operating frequency is greater than the second operating frequency, and the operating frequency of the processor 120 is reduced from the first operating frequency to the second operating frequency, so that the situation that the temperature of the processor is too high can be avoided, and the frequency of the processor 120 is reduced before the temperature reaches the second temperature value, so that the time that the temperature of the processor reaches the second temperature value can be prolonged, and the safety and the stability of the processor are enhanced.
In the related art, the mechanism for the processor 120 to tune the frequency may include: 1. the processor 120 determines the working frequency by judging the task to be processed, and adaptively adjusts the working frequency so that the running performance of the processor is adaptive to the working task to be executed; 2. in order to ensure that the processor 120 can stably and safely operate, the processor 120 detects its own temperature during operation and performs down-conversion when the temperature is too high. If the processor 120 operates at a higher operating frequency for a longer time, the temperature of the processor 120 is too high, and at present, the processor 120 performs a large-scale down-conversion when detecting that the temperature of the processor is too high, so as to achieve the purpose of cooling, and this frequency modulation manner will cause the performance of the processor 120 to be obviously reduced, thereby causing an obvious stuck phenomenon to occur in the electronic device.
In some embodiments, the second temperature value may be a previous down-conversion temperature value of the processor 120, and the second temperature value may be a temperature that triggers the processor 120 to reduce the operating frequency to a third operating frequency to achieve the temperature reduction. In the related art, the processor 120 triggers the frequency reduction only when detecting that the temperature of the processor 120 reaches the second temperature value, for example, the current operating frequency of the processor 120 is 2.34GHz, and when detecting that the temperature of the processor reaches the second temperature value, the operating frequency is directly reduced to 1.31GHz, and the operating frequency of the processor 120 is greatly reduced, which affects the operation performance of the processor 120 and may cause the electronic device to be stuck.
In the embodiment of the present application, after the processor 120 estimates the predicted time period for increasing from the current first temperature value to the second temperature value, the processor 120 may switch from the first operating frequency to the second operating frequency in advance according to the predicted time period, and perform frequency reduction in advance, where the reduced second operating frequency is greater than the third operating frequency, for example, the processor 120 reduces the current operating frequency from 2.34GHz to 2.30GHz, or reduces the current operating frequency to 2.22GHz, and the like. Because the operating frequency of the processor 120 is reduced, the corresponding operating voltage is also reduced, and the power consumption of the processor 120 is reduced, thereby reducing the heat generated by the processor 120, delaying the time for the temperature of the processor 120 to reach the second temperature value, avoiding the occurrence of substantial frequency reduction of the processor 120, and ensuring the operating performance of the processor 120.
In some embodiments, the processor 120 may determine whether the predicted time period for the temperature value to rise from the first temperature value to the second temperature value is greater than a target time period, which may be a fixed value set in advance or a value dynamically changed according to the actually executed task of the processor 120. If the predicted time duration is not greater than the target time duration, it can be said that the temperature of the processor 120 will rise to the second temperature value in a short time, and needs to be lowered in frequency in advance, and then the first operating frequency can be switched to the second operating frequency. If the predicted duration is longer than the target duration, it may be indicated that the temperature of the processor 120 does not rise to the second temperature value within a short time, and the frequency reduction is not required in advance, the processor 120 may continue to obtain the current value or the power supply power sent by the power supply module 120, and continue to estimate the predicted duration when the temperature of the processor 120 reaches the second temperature value, and perform the frequency reduction when the estimated predicted duration is not longer than the target duration, so as to ensure the operation performance of the processor 120 to the maximum extent.
In some embodiments, the processor 120 may be provided with a plurality of frequency steps, and the plurality of frequency steps may correspond to different operating frequencies respectively, and the frequency steps may have a negative correlation with the operating frequencies, and the larger the frequency step is, the smaller the corresponding operating frequency is. As an embodiment, the second operating frequency may be an operating frequency corresponding to a next frequency step of the first operating frequency, for example, if the current first operating frequency is 2.34GHz, and the corresponding frequency step is 1 step, the operating frequency of 2 steps, 2.30GHz, may be used as the second operating frequency. As another embodiment, the second operating frequency may be an operating frequency lower than the first operating frequency by a preset gear, for example, if the current first operating frequency is 2.34GHz, the corresponding frequency gear is 1 gear, and the reduced preset gear is 2, then the operating frequency of 3 gears, 2.26GHz, may be used as the second operating frequency.
In some embodiments, processor 120 may determine the second operating frequency based on a predicted duration, which may be positively correlated to the second operating frequency, and the greater the predicted duration, the greater the second operating frequency may be selected. As a specific embodiment, a plurality of time length ranges may be preset, where each time length range may correspond to a different downshift, for example, the time length range is 15 minutes to 20 minutes, and the corresponding downshift is 1; the duration range is 10-15 minutes, and the corresponding reduction gear is 2; the duration ranges from 5 to 10 minutes, and the corresponding reduction gear is 3, etc., but is not limited thereto. After determining the predicted duration, the processor 120 may determine a corresponding downshift according to the duration range to which the predicted duration belongs, and determine the second operating frequency according to the downshift. For example, if the current first operating frequency is 2.34GHz, the corresponding frequency step is 1 st, the predicted duration determined by the processor 120 is 11 minutes, and the corresponding reduction step is 2 nd, then the operating frequency of 2.26GHz in 3 rd step may be used as the second operating frequency. The second operating frequency is selected according to the predicted duration, and the temperature and performance of the processor 120 are considered, so that the safety and the operating performance of the processor 120 are guaranteed.
In some embodiments, after the operating frequency of the processor 120 is decreased from the first operating frequency to the second operating frequency, the processor operates at the second operating frequency, which may be used as a new first operating frequency, and continues to determine the predicted time duration for increasing to the second temperature value according to the scheme described in the above embodiments, and then determines whether to perform the down-conversion again until the processor 120 does not need to perform the down-conversion.
In some embodiments, the processor 120 may continue to obtain its own temperature after down-conversion. The processor 120 is further configured to switch the second operating frequency back to the first operating frequency if it is detected that the temperature of the processor 120 decreases to the third temperature value. After the frequency of the processor 120 is reduced, the generated power supply power is reduced, that is, the power consumption is reduced, and the temperature is reduced, so that when the temperature of the processor 120 is reduced to the third temperature value, the processor 120 can be restored to the high frequency to operate, the operating frequency is increased from the second operating frequency to the first operating frequency, and according to the mode of adjusting the operating frequency, the performance and the safety of the processor 120 can be better considered, and the operating performance of the processor 120 is improved.
In this embodiment, the processor 120 can switch from the first operating frequency to the second operating frequency in advance according to the actual operating state before the temperature reaches the second temperature value for triggering the down conversion, where the first operating frequency is greater than the second operating frequency, so as to avoid the situation of the processor with an excessively high temperature in advance, prolong the time for the temperature of the processor to reach the second temperature value, and enhance the safety and stability of the processor.
In addition, the second operating frequency is greater than the third operating frequency, so that the situation that the performance of the processor is greatly reduced when the temperature reaches the second temperature value and then is reduced to the third operating frequency can be avoided, the time for the temperature of the processor 120 to reach the second temperature value is prolonged, the running performance of the processor 120 is ensured, and the stuck phenomenon of the electronic equipment caused by the frequency reduction of the processor 120 is improved.
As shown in fig. 2, in an embodiment, the power supply module 110 includes a transformation unit 202, a current detection unit 204 and a control unit 206, wherein the transformation unit 202 is connected to the control unit 206 and the processor 120, the current detection unit 204 is connected to the control unit 206 and the transformation unit 202, and the control unit 206 is further connected to the processor 120. The transformation unit 202 may be electrically connected to the processor 120, and the control unit 206 and the processor 120 may be communicatively connected via a communication bus.
The transforming unit 202 is configured to provide an operating voltage and an operating current to the processor 210 according to the power provided by the power supply.
The transforming unit 202 may also be electrically connected to a power module, such as a battery in an electronic device, or an access interface of a charging device. The transforming unit 202 may transform the power voltage provided by the power module to obtain an operating voltage required by the processor 120, and provide the operating voltage to the processor 120, and the transforming unit 202 may also provide an operating current to the processor 210 according to the power provided by the power module. Further, the transforming unit 202 may provide an operating voltage to the processor 120 according to the power supply voltage provided by the power supply module under the driving of the control unit 206.
A current detection unit 204 for detecting the current value of the working current and sending the current value to the control unit.
The current detecting unit 204 may detect a current value of the operating current provided by the converting unit 202 to the processor 120, and optionally, the current detecting unit 204 may detect the current value of the operating current of the processor 120 by using a plurality of different current detecting manners, for example, a mirror current detecting manner, an inductor average current detecting manner, a series resistance current detecting manner, and the like may be used, where the mirror current detecting manner may refer to that a mirror circuit is disposed in the current detecting unit 204, and the operating current provided by the converting unit 202 may be obtained by the mirror circuit; the inductor average current detection mode may refer to detecting the voltage of the inductor of the conversion unit 202, and calculating the working current provided by the conversion unit 202 according to the resistance of the inductor; the resistor may be connected in series in the transforming unit 202, and the working current provided by the transforming unit 202 is calculated according to the detected voltage of the resistor and the resistance value of the resistor. It is to be understood that other current detection methods are also possible, and the embodiment of the present application is not limited thereto.
In some embodiments, the processor 120 may control the power supply module 110 to provide an operating voltage corresponding to the current operating frequency to the processor 120 according to the current operating frequency to meet the requirement of the processor 120 to operate at the operating frequency. When the processor 120 operates at the first operating frequency, the control unit 206 of the power supply module 110 is further configured to send a first pulse signal corresponding to the first operating frequency to the transformation unit 202. The converting unit 202 is further configured to perform voltage reduction conversion on the power supply voltage according to the first pulse signal to obtain a first operating voltage adapted to the first operating frequency, and provide the processor 120 with the first operating voltage.
When the processor 120 operates at the first operating frequency, the processor 120 may send a communication signal carrying a first voltage value corresponding to the first operating frequency to the control unit 206, and the control unit 206 may generate a corresponding first pulse signal according to the first voltage value, where the first pulse signal may be used to drive the conversion unit 202 to perform voltage-reducing conversion on the power supply voltage, so as to obtain a first operating voltage having the first voltage value. When the processor 120 operates at different operating frequencies and the required operating voltages are different, the control unit 206 may generate different pulse signals according to the required operating voltages of the processor 120, for example, may generate pulse signals with different duty ratios, different frequencies, or different wave peak values.
As shown in fig. 3, in one embodiment, the transforming unit 202 includes a first switch Q1, a second switch Q2, a first inductor L1 and a first capacitor C1, the first switch Q1 and the second switch Q2 may be connected in series, a first end of the first inductor L1 is connected to a first end of the first switch Q1 and a second end of the second switch Q1, respectively, and a second end of the first inductor L1 is connected to the first capacitor C1. The first switch Q1, the second switch Q2, the first inductor L1 and the first capacitor C1 may constitute a buck conversion circuit for performing buck conversion on the power voltage.
The first switch Q1 and the second switch Q2 may also be connected to the control unit 206, and the control unit 206 may send pulse signals to the first switch Q1 and the second switch Q2 to control the first switch Q1 and the second switch Q1 to be turned on and off. As a specific embodiment, the first switch Q1 and the second switch Q2 may be both N-type MOS (Metal-Oxide-Semiconductor Field-Effect Transistor), the gate (G pole) of the first switch Q1 and the G pole of the second switch Q2 are both connected to the control unit 206, the source (S pole) of the first switch Q1 may be respectively connected to the drain (D pole) of the second switch Q2 and the first end of the first inductor L1, and the D pole of the first switch Q1 may be connected to the power module.
As a specific embodiment, when the processor 120 operates at the first operating frequency, the control unit 206 may send a first pulse signal to the first switch Q1, and send a pulse signal opposite to the first pulse signal to the second switch Q2, where the first switch Q1 is in a conducting state when the first pulse signal is at a high level, and the opposite pulse signal input to the second switch Q2 is at a low level and the second switch Q2 is in a blocking state; the first switch Q1 is turned off when the first pulse signal is at a low level, and the inverted pulse signal input to the second switch Q2 is at a high level and the second switch Q2 is turned on. Therefore, the first pulse signal may control the first switch Q1 and the second switch Q2 to switch between an on state and an off state, perform chopping modulation on the power supply Voltage (VIN), and the chopped voltage passes through an LC filter formed by the first voltage L1 and the first capacitor C1, so as to implement voltage reduction and conversion on the power supply voltage, and obtain the first working voltage required by the processor 120.
The current detection unit 204 may be connected to the first end and the second end of the first inductor L1, respectively, and the current detection unit 204 may detect a current value of the operating current provided by the transformation unit 202 to the processor 120.
A control unit 206 for sending the current value to the processor 120.
The current detection unit 204 may transmit the detected current value to the control unit 206. In some embodiments, the control unit 206 is further configured to send the current value to the processor 120 via a communication bus. The processor 120 is further configured to calculate a power supply power according to the first working voltage and the current value corresponding to the first working frequency, and determine a predicted time duration for increasing from the first temperature value to the second temperature value according to the power supply power, the first temperature value, and the first working frequency.
The power supply may be a sampling power of the processor 120 at a certain time, a total power supply of the processor 120 in a certain time period, or an average power supply of the processor 120 in a certain time period.
As an embodiment, the processor 120 may calculate the power supply power for the first time period according to a plurality of current values sent by the control unit 206 in the first time period and the first operating voltage corresponding to the first operating frequency.
The supply power of the first period of time may be the total supply power of the first period of time. Optionally, the multiple current values received in the first time period may be multiplied by the first working voltage to obtain power supplies corresponding to the multiple current values, and the obtained multiple power supplies are accumulated to obtain the power supply in the first time period. Optionally, the plurality of current values received in the first time period and the first operating voltage may be multiplied, and the first time period is integrated to obtain the power supply power of the first time period.
The supply power of the first period may also be an average supply power of the first period. Alternatively, an average current value of the plurality of current values received in the first time period may be calculated, and the average current value is multiplied by the first operating voltage to obtain the power supply power in the first time period. It should be noted that the power supply in the first time period may also be calculated in other manners, and is not limited herein. The first time period may be set according to actual requirements, such as 1 minute, 30 seconds, 50 seconds, 2 minutes, and the like, but is not limited thereto.
In another embodiment, the processor 120 is further configured to obtain a current value sent by the control unit 206 according to a time period, calculate power supply according to the current value and a first operating voltage corresponding to the first operating frequency, and determine a predicted time period for the processor 120 to increase from the first temperature value to the second temperature value according to the power supply, the first temperature value, and the first operating frequency.
The processor 120 may sample the current value sent by the controller 206 according to a time period, which may be set according to actual requirements, such as, but not limited to, 40 seconds, 1 minute, 2 minutes, and the like. The sampled current value can be multiplied by the first working voltage to obtain the power supply power corresponding to the sampled current value.
After the processor 120 calculates the power supply power according to the current value sent by the power supply module 110 and the first operating voltage corresponding to the current first operating frequency, the predicted time period for the processor 120 to increase from the first temperature value to the second temperature value may be determined according to the power supply power, the current first temperature value, and the first operating frequency. The processor 120 may switch from the first operating frequency to the second operating frequency according to the predicted duration, and send a voltage regulation signal to the control unit 206 according to the second operating frequency, where the voltage regulation signal may carry a second voltage value of the second operating voltage corresponding to the second operating frequency.
The control unit 206 is further configured to generate a second pulse signal corresponding to the second operating frequency according to the voltage regulating signal, and send the second pulse signal to the converting unit 202. The second pulse signal may be used to drive the converting unit 202 to perform voltage-down conversion on the power supply voltage to obtain a second operating voltage. The converting unit 202 is further configured to perform voltage reduction conversion on the power supply voltage according to the second pulse signal to obtain a second operating voltage adapted to the second operating frequency, and provide the second operating voltage to the processor 120, so that the processor 120 can operate at the second operating frequency.
In this embodiment, the power supply module 110 may send a current value to the processor 120, where the current value is a current value of an operating current provided by the power supply module 110 to the processor 120, and the processor 120 may obtain the power supply power according to the current value and a first operating voltage corresponding to a current first operating frequency, and the processor 120 implements monitoring of power consumed by itself, and lowers the operating frequency from the first operating frequency to a second operating frequency in advance before the temperature reaches a second temperature value, so as to avoid a situation that performance of the processor 120 is greatly lowered when the temperature reaches the second temperature value and then falls down to a third operating frequency, prolong a time when the temperature of the processor 120 reaches the second temperature value, ensure an operating performance of the processor 23, and improve a pause phenomenon of the electronic device 100 caused by frequency drop of the processor 120.
In an embodiment, the processor 120 is further configured to determine a temperature difference between the first temperature value and the second temperature value, and determine a predicted time duration corresponding to the rising temperature difference according to a first relationship corresponding to the first operating frequency and the above operating current or power supply, where the first relationship is used to describe a corresponding relationship between the operating current or power supply and the temperature of the processor 120 at the first operating frequency.
The correspondence between the operating current or the power supply and the temperature of the processor 120 at each operating frequency may be calibrated in advance, and the correspondence may be used to describe the change of the temperature of the processor 120 with the change of the operating current or the power supply. The corresponding relationship may be calibrated through experiments before the processor 120 leaves a factory, or calibrated according to a working current or a power supply power provided by the power supply module 110 to the processor 120 and a temperature change condition in an actual use process of the electronic device. The operating current or the power supply power of the processor 120 may be the same or different from the temperature at different operating frequencies, that is, the power supply module 110 provides the same operating current to the processor 120 at different operating frequencies, or the processor 120 has the same power supply power, and the temperature variation caused by the same or different power supply power may be the same or different.
Alternatively, since the corresponding operating voltage is fixed at the same operating frequency, the magnitude of the operating current provided by the power supply module 110 to the processor 120 may directly reflect the magnitude of the power supply, and the corresponding relationship between the operating current and the temperature may be directly established. In another embodiment, a correspondence between supply power and temperature may also be established.
The correspondence relationship can be represented by a curve. Fig. 4 is a diagram illustrating a correspondence relationship between power supply power and temperature in one embodiment. As shown in fig. 4, a curve 410 is a corresponding relationship between the power supply and the temperature in the operating frequency a, and a curve 420 is a corresponding relationship between the power supply and the temperature in the operating frequency B, wherein the operating frequency a may be greater than the operating frequency B, that is, when the processor 120 operates at a smaller operating frequency, the temperature rise may become slow. It should be noted that fig. 4 is only used to illustrate the corresponding relationship between the power supply and the temperature in the embodiment of the present application, and is not used to limit the corresponding relationship, and the actual corresponding relationship between the power supply and the temperature of the processor 120 may be determined based on actual measurement data, and is related to the model, the heat dissipation capability, the power consumption, and the like of the processor 120.
As a specific embodiment, after obtaining the current value or the power supply power of the operating current, the processor 120 may compare the current value or the power supply power with a first relationship corresponding to the first operating frequency to obtain a target temperature corresponding to the current value or the power supply power, and determine a temperature change speed corresponding to the target temperature, further, the temperature change speed may be determined according to a slope of the target temperature in the first relationship, where the greater the slope corresponding to the target temperature, the faster the temperature change speed is, the smaller the slope corresponding to the target temperature is, and the smaller the temperature change speed is.
The processor 120 may determine whether the first temperature value is less than the target temperature, and if the first temperature value is less than the target temperature, which indicates that the temperature of the processor 120 may rise under the operating current or the power supply, the predicted time duration corresponding to the temperature difference between the rising first temperature value and the second temperature value may be determined based on the corresponding temperature change speed, and further, the temperature difference may be divided by the temperature change speed to obtain the predicted time duration. If the first temperature value is not less than the target temperature, it indicates that the temperature of the processor 120 does not rise temporarily under the operating current or the power supply, and the frequency reduction is not required.
In this embodiment, the processor 120 may determine the predicted time duration between the current first temperature value and the second temperature value by using a first relationship corresponding to the current first operating frequency, where the first relationship may be used to describe a corresponding relationship between the operating current or the power supply and the temperature of the processor 120 at the first operating frequency, so that the predicted time duration may be accurately obtained, and the accuracy of adjusting the operating frequency of the processor 120 is improved.
In one embodiment, the processor 120 is further configured to obtain task data of a current operation, and predict power consumption change data in a second time period in the future according to the task data and the working current or the power supply power; and the prediction duration for increasing from the first temperature value to the second temperature value is determined according to the power consumption change data, the current first temperature value and the current first working frequency.
The task data may include, but is not limited to, one or more of a task load, a number of tasks, a running time of each task, and a corresponding application, wherein the task load may refer to a number of processes occupying processor time, a number of processes waiting for processor time, and the like. The task data may reflect the current task processing pressure of the processor 120, with the greater the task processing pressure, the higher the operating performance requirements of the processor 120, and the greater the power consumption generated by the processor 120.
The processor 120 may predict the power consumption change data in the second time period in the future according to the currently running task data, where if the currently running task data reflects that the processing pressure of the current task of the processor is higher, the power consumption in the second time period in the future may be increased, and if the currently running task data reflects that the processing pressure of the current task of the processor is lower, the power consumption in the second time period in the future may be decreased or may be kept unchanged. The power consumption variation data may include a variation trend and a variation speed of the power consumption, for example, a variation trend and a variation speed of the power supply.
In some embodiments, the processor 120 may also predict the power consumption change data in the second period of time in the future in combination with usage habits of the user using the electronic device. After the processor acquires the currently running task data, the task data can include application programs corresponding to all tasks, historical use data of the application programs corresponding to all the tasks can be acquired, and the historical use data is analyzed to obtain use habit data corresponding to all the application programs.
The historical usage data of the application program may include, but is not limited to, historical usage duration of the application program during each operation, historical power consumption data corresponding to the processor 120, and the like, and further, the historical power consumption data corresponding to the processor 120 may be power supply data of the processor 120 when the electronic device only operates the application program, and the accuracy of the usage habit data may be improved. The usage habit data may include a habit usage duration and a habit power consumption.
Alternatively, the processor 120 may perform an average calculation on the historical usage data according to the historical usage data of the application program, so as to obtain the usage habit data. For example, the average calculation may be performed on the historical usage duration of the application to obtain the average usage duration, or the average calculation may be performed on the historical power consumption data of the processor 120 to obtain the average power consumption data, and the average usage duration may be used as the habit usage duration, and the average power consumption data may be used as the habit power consumption to obtain the usage habit data of the application.
Alternatively, the processor 120 may also count the historical usage data of the application program, and obtain the historical usage data with the largest occurrence number as the usage habit data. For example, the historical usage duration of the application may be counted, and the historical usage duration with the largest occurrence number may be obtained (the counted number may be counted in a specific duration manner, or may be counted in a time range, for example, the counted number of times that the historical usage duration is greater than 20 minutes, the counted number of times that the historical usage duration is between 10 and 20 minutes, and the like), or the historical power consumption data of the processor 120 may be counted, and the historical power consumption data with the largest occurrence number may be obtained, and the historical usage duration with the largest occurrence number may be used as the habitual usage duration, and the historical power consumption data with the largest occurrence number may be used as the habitual power consumption, so as to obtain the usage habit data of the application.
The processor 120 may predict the power consumption change data in the second time period in the future according to the usage habit data of the application program corresponding to each task. Alternatively, the second time period may be a preset fixed time period, such as 5 minutes, 7 minutes, 10 minutes, and the like, but is not limited thereto.
As an optional implementation manner, the processor 120 may obtain the habitual use duration of the application program corresponding to each currently running task, and determine the second time period according to the habitual use duration, where optionally, the second time period may be an average duration of the habitual use durations of the application programs corresponding to each task, may also be a maximum duration of the habitual use durations of the application programs corresponding to each task, and may also be a minimum duration of the habitual use durations of the application programs corresponding to each task, and the like, which is not limited herein.
The processor 120 may also predict power consumption change data in a second time period in the future according to the habitual power consumption of the application program corresponding to each currently running task, and further, may determine a change trend of the power supply power according to the habitual power consumption. Specifically, corresponding weight coefficients may be allocated to application programs corresponding to each currently running task, and the habitual power consumption of each application program is weighted and calculated according to the weight coefficients of each application program, so as to obtain target power consumption data. Whether the current power consumption data of the processor 120 is smaller than the target power consumption data or not can be judged, if so, the change trend of the power consumption data can be determined to be increased, and if not, the change trend of the power consumption data can be determined to be reduced or unchanged.
In the case that the change trend of the power consumption data is increasing, the processor 120 may further predict the change speed of the power consumption according to the habitual power consumption of the application program corresponding to each task currently running. Specifically, the prediction may be performed according to a difference between the current power consumption data and the target power consumption data of the processor 120, where the larger the difference is, the faster the corresponding change speed may be, and the smaller the difference is, the smaller the corresponding change speed is. For example, the target power consumption data may include a target power, and the processor 120 may calculate the target power according to the habitual power consumption of the application program corresponding to each currently running task, calculate the current power supply according to the current value of the operating current sent by the power supply module 110, and predict the change trend and the change speed of the power supply in the second time period in the future according to the current power supply and the target power.
It should be noted that, the processor 120 in the embodiment of the present application may also use other manners to predict the power consumption change data in the second time period in the future, for example, a manner of a neural network may be used, a prediction model may be pre-established, and the task data and the corresponding power consumption data of the processor 120 in the actual operation process are collected to train the prediction model, so that the prediction model has the capability of predicting the power consumption change data according to the task data, after the processor 120 obtains the current working current or power supply, the current working current or power supply and the current operating task data may be input into the prediction model, and the power consumption change data in the second time period in the future and the like may be predicted through the prediction model. The embodiment of the present application does not limit the manner in which the processor 120 predicts the power consumption change data in the future second time period.
The processor 120 may determine a predicted time period for increasing from the first temperature value to the second temperature value according to the predicted power consumption change data, the current first temperature value, and the current first operating frequency. Alternatively, the processor 120 may convert the power consumption change data into the temperature change data, the conversion relationship between the power consumption change data and the temperature change data may be determined in advance according to a large number of experiments, and the conversion relationship between the power consumption change data and the temperature change data may change with the operating frequency of the processor 120, so that the processor 120 may convert the power consumption change data into the temperature change data according to the conversion relationship corresponding to the current first operating frequency. The temperature variation data may include a temperature variation trend and a temperature variation speed. If the temperature change trend is a temperature rising trend, the temperature difference value between the second temperature value and the first temperature value can be divided by the temperature change speed to obtain the predicted time length.
In some embodiments, the processor 120 is further configured to determine a second operating frequency from the mission data and switch from the first operating frequency to the second operating frequency if the predicted duration is greater than the target duration. The second working frequency may be determined according to task data currently running by the processor 120, so as to ensure that the reduced second working frequency can support the processor 120 to continue running the corresponding task without affecting the task.
As a specific embodiment, the task data may include a task load, and the processor 120 is further configured to determine a target frequency range capable of supporting the task load, and if there are multiple target frequency ranges, determine an operating frequency of a next target frequency range from the first operating frequency as the second operating frequency, or determine an operating frequency of a largest target frequency range as the second operating frequency.
The processor 120 may be provided with a plurality of frequency steps, the frequency steps may correspond to different operating frequencies, respectively, and the processor 120 may determine a target frequency step capable of supporting the task load from among the frequency steps according to the current task load. The greater the task load, the higher the performance requirements on the processor 120, and the greater the operating frequency required by the processor 120. For example, if the processor 120 determines that the target frequency range capable of supporting the task load is 1 st gear to 4 th gear according to the current task load, the second operating frequency may be selected from 1 st gear to 4 th gear.
As an embodiment, if there are a plurality of target frequency steps capable of supporting the task load, the processor 120 may determine the operating frequency of the next target frequency step at the first operating frequency as the second operating frequency, for example, if the frequency step corresponding to the first operating frequency is 2 steps, and the target frequency steps capable of supporting the task load are 1 to 4 steps, the operating frequency of 3 steps may be determined as the second operating frequency. In this manner, the operating performance of the processor 120 may be maximally guaranteed.
As another alternative, if there are multiple target frequency bins capable of supporting the task load, the processor 120 may also determine the operating frequency of the largest target frequency bin as the second operating frequency, that is, select the smallest operating frequency capable of supporting the task load as the second operating frequency. For example, if the target frequency range capable of supporting the task load is 1 st gear to 5 th gear, the operating frequency of 5 th gear may be directly determined as the second operating frequency. In this way, under the condition that the processor 120 is guaranteed to normally run the tasks, the power consumption generated by the processor 120 can be quickly reduced, and the temperature of the processor 120 can be reduced.
In this embodiment, the processor 120 may predict the power consumption change data in the second time period in the future according to the currently running task data, so as to determine a predicted time period for increasing from the first temperature value to the second temperature value, and may predict a temperature increase condition according to an actual task processing condition of the processor 120, so that a prediction result is more accurate, and the processor 120 may reduce the operating frequency from the first operating frequency to the second operating frequency according to an actual running state in advance before the temperature reaches the second temperature value triggering frequency reduction, so as to prolong a time for the temperature of the processor to reach the second temperature value while ensuring that the current task can be supported, ensure the running performance of the processor, and improve a stuck phenomenon of the electronic device caused by processor frequency reduction.
As shown in fig. 5, in an embodiment, an operating frequency adjusting method is provided, which can be applied to the electronic device described above, and the method can include the following steps:
step 510, the processor determines a predicted time duration for the processor to rise from the first temperature value to the second temperature value according to the working current or the power supply provided by the power supply module to the processor, the current first temperature value and the current first working frequency.
In step 520, the processor switches from the first operating frequency to a second operating frequency according to the predicted duration, wherein the first operating frequency is greater than the second operating frequency.
In one embodiment, the second temperature value is a temperature that triggers the processor to switch the operating frequency to a third operating frequency to achieve the cooling, and the second operating frequency is greater than the third operating frequency.
In one embodiment, after switching from the first operating frequency to the second operating frequency according to the predicted duration, the method further comprises: and if the processor detects that the temperature of the processor is reduced to a third temperature value, switching from the second working frequency back to the first working frequency.
In the embodiment of the application, before the temperature reaches the second temperature value for triggering frequency reduction, the processor can switch the working frequency from the first working frequency to the second working frequency in advance according to the actual running state, wherein the first working frequency is greater than the second working frequency, so that the condition of overhigh temperature of the processor is avoided in advance, the time for the temperature of the processor to reach the second temperature value is prolonged, and the safety and the stability of the processor are enhanced.
In addition, the second working frequency is greater than the third working frequency, so that the situation that the performance of the processor is greatly reduced when the temperature reaches the second temperature value and then is reduced to the third working frequency can be avoided, the time for the temperature of the processor to reach the second temperature value is prolonged, the running performance of the processor is ensured, and the stuck phenomenon of the electronic equipment caused by frequency reduction of the processor is improved.
In another embodiment, as shown in fig. 6, an operating frequency adjusting method is provided, which can be applied to the electronic device, and the method can include the following steps:
in step 610, the processor receives a current value or power supply power sent by the power supply module, where the current value is a current value of a working current provided by the power supply module to the processor.
Step 620, the processor determines a predicted time period for the processor to increase from the first temperature value to the second temperature value according to the current value or the power supply, the current first temperature value and the current first operating frequency.
In some embodiments, step 610 comprises: the processor receives the current value sent by the power supply module through the communication bus.
Step 620, comprising: the processor calculates power supply according to a first working voltage and a current value corresponding to the first working frequency, and determines a predicted time length for rising from the first temperature value to the second temperature value according to the power supply, the first temperature value and the first working frequency.
In one embodiment, the step of calculating the power supply according to the first operating voltage and the first operating current corresponding to the first operating frequency includes: calculating power supply power of a first time period according to a plurality of current values sent by a power supply module in the first time period and a first working voltage corresponding to a first working frequency; or acquiring a current value sent by the power supply module according to a time period, and calculating the power supply power according to the current value and a first working voltage corresponding to the first working frequency.
In one embodiment, step 620 includes: the processor determines a temperature difference value between the first temperature value and the second temperature value, and determines a predicted time length corresponding to the rising temperature difference value according to the working current or the power supply power and a first relation corresponding to the first working frequency, wherein the first relation is used for describing a corresponding relation between the working current or the power supply power and the temperature of the processor at the first working frequency.
At step 630, the processor switches from a first operating frequency to a second operating frequency according to the predicted duration, wherein the first operating frequency is greater than the second operating frequency.
As shown in FIG. 7, in one embodiment, step 620 may include steps 702-706, and step 630 may include step 708:
in step 702, the processor obtains task data currently running.
And step 704, predicting power consumption change data in a second future time period according to the working current or the power supply power and the task data.
Step 706, determining a predicted time length for increasing from the first temperature value to the second temperature value according to the power consumption change data, the current first temperature value and the current first operating frequency.
Step 708, if the predicted duration is greater than the target duration, determining a second working frequency according to the task data, and switching from the first working frequency to the second working frequency.
In one embodiment, the task data includes task load. The step of determining a second operating frequency from the task data comprises: determining a target frequency gear at which the processor can support the task load; and if a plurality of target frequency steps exist, determining the working frequency of the next target frequency step of the first working frequency as the second working frequency, or determining the working frequency of the largest target frequency step as the second working frequency, wherein the working frequency of the processor and the frequency steps are in a negative correlation relationship.
It should be noted that, for the description of the operating frequency adjustment method provided in the embodiments of the present application, reference may be made to the related description of the electronic device provided in the foregoing embodiments, and details are not repeated herein.
In the embodiment of the application, the processor can predict the power consumption change data in the second time period in the future according to the currently running task data, so that the prediction time length for increasing the temperature from the first temperature value to the second temperature value is determined, the temperature increase condition can be predicted according to the actual task processing condition of the processor, the prediction result is more accurate, the processor can reduce the working frequency from the first working frequency to the second working frequency in advance according to the actual running state before the temperature reaches the second temperature value for triggering frequency reduction, the current task can be supported, meanwhile, the time for the temperature of the processor to reach the second temperature value is prolonged, the running performance of the processor is ensured, and the blocking phenomenon of the electronic equipment caused by frequency reduction of the processor is improved.
As shown in fig. 8, in an embodiment, an operating frequency adjusting apparatus 800 is provided, which can be applied in an electronic device, and the operating frequency adjusting apparatus 800 includes a prediction module 810 and a frequency reduction module 820.
The prediction module 810 is configured to determine, by the processor, a predicted time duration for the processor to rise from the first temperature value to the second temperature value according to the operating current or the power supply provided by the power supply module to the processor, the current first temperature value, and the current first operating frequency.
And a frequency reduction module 820, configured to switch from a first operating frequency to a second operating frequency according to the predicted duration, where the first operating frequency is greater than the second operating frequency.
In one embodiment, the second temperature value is a temperature that triggers the processor to decrease the operating frequency to a third operating frequency to achieve the temperature decrease, the second operating frequency being greater than the third operating frequency.
In one embodiment, the operating frequency adjusting apparatus 800 further includes an up-conversion module for switching from the second operating frequency to the first operating frequency if the temperature of the processor is detected to be reduced to the third temperature value.
In the embodiment of the application, before the temperature reaches the second temperature value for triggering the frequency reduction, the processor can switch the operating frequency from the first operating frequency to the second operating frequency in advance according to the actual operating state, wherein the first operating frequency is higher than the second operating frequency, so that the condition of overhigh temperature of the processor is avoided in advance, the time for the temperature of the processor to reach the second temperature value is prolonged, and the safety and the stability of the processor are enhanced.
In addition, the second working frequency is greater than the third working frequency, so that the situation that the performance of the processor is greatly reduced when the temperature reaches the second temperature value and then is reduced to the third working frequency can be avoided, the time for the temperature of the processor to reach the second temperature value is prolonged, the running performance of the processor is ensured, and the stuck phenomenon of the electronic equipment caused by frequency reduction of the processor is improved.
In one embodiment, the operating frequency adjusting apparatus 800 includes a receiving module in addition to the predicting module 810 and the down-converting module 820.
And the receiving module is used for receiving the current value or the power supply power sent by the power supply module through the processor, wherein the current value is the current value of the working current provided by the power supply module to the processor.
In one embodiment, the receiving module 810 is further configured to receive, by the processor, the current value sent by the power supply module through the communication bus.
The prediction module 810 is further configured to calculate, by the processor, a power supply power according to the first operating voltage and the current value corresponding to the first operating frequency, and determine a predicted time duration for increasing from the first temperature value to the second temperature value according to the power supply power, the first temperature value, and the first operating frequency.
In one embodiment, the predicting module 810 is further configured to calculate, by the processor, a power supply power for a first time period according to a plurality of current values sent by the power supply module in the first time period and a first operating voltage corresponding to the first operating frequency; or the processor is used for acquiring a current value sent by the power supply module according to a time period and calculating the power supply power according to the current value and a first working voltage corresponding to the first working frequency.
In the embodiment of the application, the power supply module can send the current value of the working current to the processor, the processor can obtain the power supply power according to the current value and the first working voltage corresponding to the current first working frequency, the processor realizes monitoring of the power consumed by the processor, and reduces the working frequency from the first working frequency to the second working frequency in advance before the temperature reaches the second temperature value, so that the situation that the performance of the processor is greatly reduced when the temperature reaches the second temperature value and then is reduced to the third working frequency can be avoided, the time for the temperature of the processor to reach the second temperature value is prolonged, the running performance of the processor is ensured, and the stuck phenomenon of the electronic device caused by the frequency reduction of the processor is improved.
In an embodiment, the predicting module 810 is further configured to determine, by the processor, a temperature difference between the first temperature value and the second temperature value, and determine a predicted duration corresponding to the rising temperature difference according to the operating current or the power supply power and a first relationship corresponding to the first operating frequency, where the first relationship is used to describe a corresponding relationship between the operating current or the power supply power and the temperature of the processor at the first operating frequency.
In the embodiment of the application, the processor may determine the predicted time length from the current first temperature value to the second temperature value by using a first relationship corresponding to the current first operating frequency, where the first relationship may be used to describe a corresponding relationship between the operating current or the power supply and the temperature of the processor at the first operating frequency, so that the predicted time length may be accurately obtained, and the accuracy of adjusting the operating frequency of the processor is improved.
In one embodiment, the prediction module 810 includes a task obtaining unit, a change prediction unit, and a duration determination unit.
And the task acquisition unit is used for acquiring the currently running task data through the processor.
And the change prediction unit is used for predicting power consumption change data in a second future time period according to the working current or the power supply power and the task data.
And the duration determining unit is used for determining the predicted duration for increasing from the first temperature value to the second temperature value according to the power consumption change data, the current first temperature value and the current first working frequency.
In one embodiment, the down-conversion module 820 is further configured to determine a second operating frequency according to the task data and switch from the first operating frequency to the second operating frequency if the predicted duration is greater than the target duration.
In one embodiment, the task data includes task load. A down-conversion module 820, further configured to determine a target frequency bin at which the processor can support the task load; and if a plurality of target frequency gears exist, determining the working frequency of the next target frequency gear of the first working frequency as a second working frequency, or determining the working frequency of the largest target frequency gear as the second working frequency, wherein the working frequency of the processor and the frequency gears are in a negative correlation relationship.
In the embodiment of the application, the processor can predict the power consumption change data in the second time period in the future according to the currently running task data, so that the prediction time length for increasing the temperature from the first temperature value to the second temperature value is determined, the temperature increase condition can be predicted according to the actual task processing condition of the processor, the prediction result is more accurate, the processor can reduce the working frequency from the first working frequency to the second working frequency in advance according to the actual running state before the temperature reaches the second temperature value for triggering frequency reduction, the current task can be supported, meanwhile, the time for the temperature of the processor to reach the second temperature value is prolonged, the running performance of the processor is ensured, and the blocking phenomenon of the electronic equipment caused by frequency reduction of the processor is improved.
Fig. 9 is a block diagram showing a structure of an electronic device in another embodiment. As shown in fig. 9, electronic device 900 may include one or more of the following components: a processor 910, a memory 920 coupled to the processor 910, wherein the memory 920 may store one or more computer programs, and the one or more computer programs may be configured to implement the methods described in the embodiments as described above when executed by the one or more processors 910.
Processor 910 may include one or more processing cores. The processor 910 interfaces with various components throughout the electronic device 900 using various interfaces and circuitry to perform various functions of the electronic device 900 and process data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 920 and invoking data stored in the memory 920. Alternatively, the processor 910 may be implemented in hardware using at least one of Digital Signal Processing (DSP), field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 910 may integrate one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. The CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing display content; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 910, but may be implemented by a communication chip.
The Memory 920 may include a Random Access Memory (RAM) or a Read-Only Memory (ROM). The memory 920 may be used to store an instruction, a program, code, a set of codes, or a set of instructions. The memory 920 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the above-described method embodiments, and the like. The stored data area may also store data created during use of the electronic device 900, and the like.
It is understood that the electronic device 900 may include more or less structural elements than those shown in the above structural block diagrams, for example, a power module, a physical button, a WiFi (Wireless Fidelity) module, a speaker, a bluetooth module, a sensor, etc., and is not limited thereto.
The embodiment of the application discloses a computer readable storage medium, which stores a computer program, wherein the computer program realizes the method described in the above embodiment when being executed by a processor.
Embodiments of the present application disclose a computer program product comprising a non-transitory computer readable storage medium storing a computer program, and the computer program, when executed by a processor, implements the method as described in the embodiments above.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above may be implemented by a computer program, which may be stored in a non-volatile computer readable storage medium, and when executed, may include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a ROM, etc.
Any reference to memory, storage, database, or other medium as used herein may include non-volatile and/or volatile memory. Suitable non-volatile memory can include ROM, programmable ROM (PROM), erasable PROM (EPROM), electrically Erasable PROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM), which acts as external cache memory. By way of illustration and not limitation, RAM can take many forms, such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), rambus Direct RAM (RDRAM), and Direct Rambus DRAM (DRDRAM).
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present application. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. Those skilled in the art should also appreciate that the embodiments described in this specification are all alternative embodiments and that the acts and modules involved are not necessarily required for this application.
In various embodiments of the present application, it should be understood that the size of the serial number of each process described above does not mean that the execution sequence is necessarily sequential, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The method, the apparatus, the electronic device, and the storage medium for adjusting the operating frequency disclosed in the embodiments of the present application are described in detail above, and specific examples are applied herein to illustrate the principles and implementations of the present application, and the descriptions of the above embodiments are only used to help understand the method and the core ideas of the present application. Meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (21)

1. An electronic device is characterized by comprising a power supply module and a processor;
the power supply module is used for supplying power to the processor;
the processor is used for determining the predicted time length for the processor to rise from the first temperature value to the second temperature value according to the working current or the power supply provided by the power supply module to the processor, the current first temperature value and the current first working frequency of the processor, and switching from the first working frequency to the second working frequency according to the predicted time length;
wherein the first operating frequency is greater than the second operating frequency.
2. The electronic device of claim 1, wherein the second temperature value is a temperature that triggers the processor to switch an operating frequency to a third operating frequency to achieve cooling, and wherein the second operating frequency is greater than the third operating frequency.
3. The electronic device according to claim 1 or 2, wherein the power supply module is further configured to obtain a current value or a power supply power of an operating current supplied to the processor, and send the current value or the power supply power of the operating current to the processor.
4. The electronic device of claim 3, wherein the power supply module comprises a conversion unit, a current detection unit and a control unit, and the current detection unit is respectively connected with the conversion unit, the processor and the control unit;
the conversion unit is used for providing working voltage and working current for the processor according to the electric energy provided by the power supply;
the current detection unit is used for detecting the current value of the working current and sending the current value to the control unit;
the control unit is used for sending the current value to the processor.
5. The electronic device of claim 4, wherein the control unit is connected to the processor via a communication bus;
the control unit is further used for sending the current value of the working current to the processor through the communication bus;
the processor is further configured to calculate power supply according to a first operating voltage and the current value corresponding to the first operating frequency, and determine a predicted time length for increasing from the first temperature value to a second temperature value according to the power supply, the first temperature value, and the first operating frequency.
6. The electronic device according to claim 5, wherein the processor is further configured to calculate a power supply for a first time period according to a plurality of current values sent by the control unit in the first time period and a first operating voltage corresponding to the first operating frequency, and determine a predicted time period for increasing from the first temperature value to a second temperature value according to the power supply for the first time period, the first temperature value, and the first operating frequency; or
The processor is further configured to obtain a current value sent by the control unit according to a time period, calculate power supply power according to the current value and a first working voltage corresponding to the first working frequency, and determine a predicted time length for increasing from the first temperature value to a second temperature value according to the power supply power, the first temperature value, and the first working frequency.
7. The electronic device according to any one of claims 4 to 6, wherein the control unit is further configured to send a first pulse signal corresponding to the first operating frequency to the conversion unit;
the conversion unit is further configured to perform voltage reduction conversion on a power supply voltage according to the first pulse signal to obtain a first working voltage adaptive to the first working frequency, and provide the first working voltage to the processor;
the processor is further configured to send a voltage regulation signal to the control unit according to a second working frequency after switching from the first working frequency to the second working frequency;
the control unit is further configured to generate a second pulse signal corresponding to the second operating frequency according to the voltage regulating signal, and send the second pulse signal to the conversion unit;
the conversion unit is further configured to perform voltage reduction conversion on the power supply voltage according to the second pulse signal, obtain a second working voltage adaptive to the second working frequency, and provide the second working voltage to the processor.
8. The electronic device according to claim 7, wherein the transforming unit comprises a first switch, a second switch, a first inductor and a first capacitor, the first switch and the second switch are connected in series, a first end of the first inductor is connected to a first end of the first switch and a second end of the second switch, respectively, and a second end of the first inductor is connected to the first capacitor; the first switch, the second switch, the first inductor and the first capacitor form a voltage reduction conversion circuit;
the current detection unit is respectively connected with the first end and the second end of the first inductor.
9. An operating frequency adjustment method is applied to an electronic device, wherein the electronic device comprises a processor and a power supply module, and the method comprises the following steps:
the processor determines the predicted time length for the processor to rise from the first temperature value to a second temperature value according to the working current or the power supply power provided by the power supply module to the processor, the current first temperature value and the current first working frequency;
and the processor switches from the first working frequency to a second working frequency according to the predicted duration, wherein the first working frequency is greater than the second working frequency.
10. The method of claim 9, wherein the second temperature value is a temperature that triggers the processor to switch an operating frequency to a third operating frequency to achieve a temperature reduction, the second operating frequency being greater than the third operating frequency.
11. The method according to claim 9 or 10, wherein before the processor determines the predicted time period for the processor to rise from the first temperature value to the second temperature value according to the operating current or power supplied to the processor by the power supply module, the current first temperature value and the current first operating frequency, the method comprises:
the processor receives a current value or power supply power sent by the power supply module, wherein the current value is a current value of working current provided by the power supply module to the processor.
12. The method of claim 11, wherein the processor receives the current value or the power supply sent by the power supply module, and comprises:
the processor receives a current value sent by the power supply module through a communication bus;
the determining a predicted time length for rising from the first temperature value to a second temperature value according to the working current or the power supply provided by the power supply module to the processor, the current first temperature value and the current first working frequency includes:
calculating power supply according to a first working voltage and the current value corresponding to the first working frequency, and determining the predicted time length for increasing from the first temperature value to a second temperature value according to the power supply, the first temperature value and the first working frequency.
13. The method according to claim 12, wherein the calculating the power supply according to the first operating voltage and the current value corresponding to the first operating frequency comprises:
calculating power supply power of a first time period according to a plurality of current values sent by the power supply module in the first time period and a first working voltage corresponding to the first working frequency; or
And acquiring a current value sent by the power supply module according to a time period, and calculating power supply according to the current value and a first working voltage corresponding to the first working frequency.
14. The method according to any one of claims 9 to 10 and 12 to 13, wherein the determining the predicted time period for the temperature value to rise from the first temperature value to the second temperature value according to the operating current or the power supplied to the processor by the power supply module, the current first temperature value and the current first operating frequency comprises:
and determining a temperature difference value between the first temperature value and the second temperature value, and determining a predicted time length corresponding to the temperature difference value according to the working current or the power supply power and a first relation corresponding to the first working frequency, wherein the first relation is used for describing a corresponding relation between the working current or the power supply power and the temperature of the processor at the first working frequency.
15. The method according to any one of claims 9 to 10 and 12 to 13, wherein the determining the predicted time period for the temperature value to rise from the first temperature value to the second temperature value according to the operating current or the power supplied by the power supply module to the processor, the current first temperature value and the current first operating frequency comprises:
the processor acquires currently running task data;
predicting power consumption change data in a second future time period according to the working current or the power supply power and the task data;
and determining the predicted time length for increasing from the first temperature value to the second temperature value according to the power consumption change data, the current first temperature value and the current first working frequency.
16. The method of claim 15, wherein switching from the first operating frequency to a second operating frequency according to the predicted duration comprises:
and if the predicted time length is greater than the target time length, determining a second working frequency according to the task data, and switching from the first working frequency to the second working frequency.
17. The method of claim 16, wherein the task data comprises a task load; the determining a second operating frequency according to the task data comprises:
determining a target frequency bin at which the processor is capable of supporting the mission load;
and if a plurality of target frequency gears exist, determining the working frequency of the next target frequency gear of the first working frequency as a second working frequency, or determining the working frequency of the largest target frequency gear as the second working frequency, wherein the working frequency of the processor and the frequency gears are in a negative correlation relationship.
18. The method of claim 9 or 10, wherein after said switching from said first operating frequency to a second operating frequency according to said predicted duration, said method further comprises:
and if the processor detects that the temperature of the processor is reduced to a third temperature value, switching from the second working frequency back to the first working frequency.
19. An operating frequency adjusting apparatus, applied to an electronic device, the electronic device including a processor and a power supply module, the apparatus comprising:
the prediction module is used for determining the prediction duration of the processor from the first temperature value to the second temperature value according to the working current or the power supply provided by the power supply module to the processor, the current first temperature value and the current first working frequency;
and the frequency reduction module is used for switching from the first working frequency to a second working frequency according to the predicted duration, wherein the first working frequency is greater than the second working frequency.
20. An electronic device comprising a memory and a processor, the memory having stored thereon a computer program that, when executed by the processor, causes the processor to carry out the method of any one of claims 9 to 18.
21. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 9 to 18.
CN202110796878.0A 2021-07-14 2021-07-14 Working frequency adjusting method and device, electronic equipment and storage medium Pending CN115617500A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110796878.0A CN115617500A (en) 2021-07-14 2021-07-14 Working frequency adjusting method and device, electronic equipment and storage medium
PCT/CN2022/097603 WO2023284448A1 (en) 2021-07-14 2022-06-08 Method and apparatus for adjusting operation frequency, and electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110796878.0A CN115617500A (en) 2021-07-14 2021-07-14 Working frequency adjusting method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115617500A true CN115617500A (en) 2023-01-17

Family

ID=84855246

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110796878.0A Pending CN115617500A (en) 2021-07-14 2021-07-14 Working frequency adjusting method and device, electronic equipment and storage medium

Country Status (2)

Country Link
CN (1) CN115617500A (en)
WO (1) WO2023284448A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115963916A (en) * 2023-03-08 2023-04-14 摩尔线程智能科技(北京)有限责任公司 Power consumption control method and device for GPU, electronic equipment and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
IT1267411B1 (en) * 1994-03-15 1997-02-05 Olivetti & Co Spa DEVICE FOR THE THERMAL CONTROL OF A CENTRAL PROCESSING UNIT
CN104122962A (en) * 2013-04-27 2014-10-29 宏碁股份有限公司 Temperature regulation device and method
CN106557135B (en) * 2015-09-29 2019-12-17 北京壹人壹本信息科技有限公司 processor temperature regulation and control method and device
CN105867586A (en) * 2016-03-24 2016-08-17 联想(北京)有限公司 A control method and an electronic apparatus

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115963916A (en) * 2023-03-08 2023-04-14 摩尔线程智能科技(北京)有限责任公司 Power consumption control method and device for GPU, electronic equipment and storage medium

Also Published As

Publication number Publication date
WO2023284448A1 (en) 2023-01-19

Similar Documents

Publication Publication Date Title
EP2226699B1 (en) Apparatus and method for supplying power to electronic device
CN104424031B (en) Method and device for controlling working frequency of processor
US10637291B2 (en) Methods and apparatus to increase efficiency for wireless power transfer
US9602088B1 (en) Ultra-low power comparator with sampling control loop adjusting frequency and/or sample aperture window
KR20070046198A (en) Dynamic clock frequency adjustment based on processor load
US9472967B2 (en) Power management system and method for a portable device
TWI441009B (en) Method for clock frequency admustment for a processing unit of a computer system and ralated device
CN110622387A (en) Master-slave charging circuit with slave charger input current sensing and adaptive battery current limiting
CN115617500A (en) Working frequency adjusting method and device, electronic equipment and storage medium
US20240046380A1 (en) Method and apparatus for optimizing self-power consumption of an electronic device
US10007286B2 (en) Switching regulator overload detector
CN112117892A (en) Electric power converter
US9124131B2 (en) Dynamic control of the power sourcing capability of a power source
CN103546029B (en) A kind of suitching type adjuster and control method thereof
US8773083B2 (en) Detection of insufficient current sourcing capability of supplied power
CN115509338A (en) Method and device for controlling power-down maintenance time of server
JP6919417B2 (en) A power conditioner that has a function to measure the IV curve of a solar cell
CN111158454A (en) Low-power consumption method and device for real-time embedded operating system
CN109901692A (en) Execution method, apparatus, terminal and the storage medium of target application
US20080091853A1 (en) Controlling Circuit Throughput
WO2014018013A1 (en) Dynamic control of the power sourcing capability of a power source
CN112187041B (en) Standby voltage regulation method of charge pump circuit
CN117040511B (en) Switching circuit and method and DCDC
CN116414206A (en) Processing device and method and electronic equipment
CN114244109A (en) Control circuit and method for DC-DC converter and DC-DC converter

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