CN111240835A - CPU working frequency adjusting method, CPU working frequency adjusting device and storage medium - Google Patents

CPU working frequency adjusting method, CPU working frequency adjusting device and storage medium Download PDF

Info

Publication number
CN111240835A
CN111240835A CN202010009810.9A CN202010009810A CN111240835A CN 111240835 A CN111240835 A CN 111240835A CN 202010009810 A CN202010009810 A CN 202010009810A CN 111240835 A CN111240835 A CN 111240835A
Authority
CN
China
Prior art keywords
cpu
frequency
terminal
load
load threshold
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010009810.9A
Other languages
Chinese (zh)
Other versions
CN111240835B (en
Inventor
张楠
董万强
谷超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN202010009810.9A priority Critical patent/CN111240835B/en
Publication of CN111240835A publication Critical patent/CN111240835A/en
Application granted granted Critical
Publication of CN111240835B publication Critical patent/CN111240835B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/505Allocation 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 the load
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3024Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a central processing unit [CPU]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Quality & Reliability (AREA)
  • Power Sources (AREA)

Abstract

The present disclosure relates to a CPU operating frequency adjusting method, a CPU operating frequency adjusting apparatus, and a storage medium. The CPU working frequency adjusting method is applied to a terminal, a frame drawing application is installed on the terminal, and the CPU working frequency adjusting method comprises the following steps: acquiring a frame drawing period of the application; periodically acquiring the system load of the terminal in each frame drawing period based on the frame drawing period of the application; and adjusting the CPU working frequency of the terminal based on the system load and the load threshold. By the method and the device, the load change in the frame drawing period can be captured in real time to adjust the frequency in real time, and the probability of visually blocking phenomenon is reduced.

Description

CPU working frequency adjusting method, CPU working frequency adjusting device and storage medium
Technical Field
The present disclosure relates to the field of terminal technologies, and in particular, to a method and an apparatus for adjusting a CPU operating frequency, and a storage medium.
Background
With the popularization of touch screen smart phones and the high-speed development of mobile phone hardware, applications supported by smart phones are increasing, and the demand for processing capability of hardware devices such as a Central Processing Unit (CPU) of a terminal is also continuously increasing.
Due to the constraints of heat dissipation and power consumption, hardware devices such as CPUs cannot continuously maintain high-performance operating frequency. In order to better balance the relationship between performance and power consumption, a dynamic frequency modulation technique has been developed. In the related art, the CPU watchdog module of the operating system periodically monitors the change of the system load and adjusts the operating frequency of the CPU. But for the case of running frame drawing class application on the terminal, frame loss or seizure still occurs when the load is high. For example, a mobile phone game is popular with youngsters for years as a daily entertainment mode for relaxing mood, reducing blood pressure and emission, but the game load is higher and higher, and the probability of blocking is higher visually when the load is higher.
Disclosure of Invention
To overcome the problems in the related art, the present disclosure provides a CPU operating frequency adjusting method, a CPU operating frequency adjusting apparatus, and a storage medium.
According to a first aspect of the embodiments of the present disclosure, there is provided a method for adjusting a CPU operating frequency, which is applied to a terminal, where a frame drawing application is installed on the terminal, the method for adjusting the CPU operating frequency includes: acquiring a frame drawing period of the application; periodically acquiring the system load of the terminal in each frame drawing period based on the applied frame drawing period; and adjusting the CPU working frequency of the terminal based on the comparison result of the system load and the load threshold.
In one embodiment, the load threshold comprises an up load threshold and a down load threshold;
the adjusting the CPU working frequency of the terminal based on the system load and the load threshold value comprises:
when the system load is greater than the frequency-increasing load threshold value, adjusting the CPU working frequency of the terminal to be a frequency higher than the current CPU working frequency in a plurality of preset working frequencies; and when the system load is smaller than the frequency reduction load threshold value, adjusting the CPU working frequency of the terminal to be the frequency lower than the current CPU working frequency in the preset multiple working frequencies.
In another embodiment, the method for adjusting the operating frequency of the CPU further includes: the load threshold is preset based on system performance of the terminal.
In yet another embodiment, the application has more than one scenario, and different scenarios correspond to different load thresholds.
The CPU working frequency adjusting method further comprises the following steps: determining a current scene of an application running on the terminal; and taking the load threshold value matched with the current scene as the load threshold value.
In another embodiment, the method for adjusting the operating frequency of the CPU further includes: and when the application is initially installed, acquiring and storing the load threshold corresponding to each scene of the application from the cloud.
In yet another embodiment, the application is a gaming application.
According to a second aspect of the embodiments of the present disclosure, there is provided a CPU operating frequency adjusting apparatus, which is applied to a terminal, where a frame drawing application is installed on the terminal, the CPU operating frequency adjusting apparatus including:
the acquisition unit is configured to acquire a frame drawing period of the application, and periodically acquire the system load of the terminal in each frame drawing period based on the frame drawing period of the application; a frequency adjusting unit configured to adjust a CPU operating frequency of the terminal based on a comparison result of the system load and a load threshold.
In one embodiment, the load threshold comprises an up load threshold and a down load threshold;
the frequency adjusting unit is configured to adjust the CPU operating frequency of the terminal based on the system load and the load threshold in the following manner, including: when the system load is greater than the frequency-increasing load threshold value, adjusting the CPU working frequency of the terminal to be a frequency higher than the current CPU working frequency in a plurality of preset working frequencies; and when the system load is smaller than the frequency reduction load threshold value, adjusting the CPU working frequency of the terminal to be the frequency lower than the current CPU working frequency in the preset multiple working frequencies.
In another embodiment, the CPU operating frequency adjusting apparatus further includes a load threshold determining unit configured to: the load threshold is preset based on system performance of the terminal.
In still another embodiment, the CPU operating frequency adjusting apparatus further includes a load threshold determining unit configured to:
when the application has more than one scenario, different load thresholds are determined for different scenarios.
The load threshold determination unit is further configured to: and determining a current scene of the application running on the terminal, and taking a load threshold value matched with the current scene as the load threshold value.
In a further embodiment, the load threshold determination unit is configured to determine different load thresholds for different scenarios in the following manner: and when the application is initially installed, acquiring and storing the load threshold corresponding to each scene of the application from the cloud.
In yet another embodiment, the application is a gaming application.
According to a third aspect of the embodiments of the present disclosure, there is provided a CPU operating frequency adjusting apparatus, including:
a processor; a memory for storing processor-executable instructions;
wherein the processor is configured to: executing the method for adjusting the operating frequency of the CPU described in the first aspect or any one of the embodiments of the first aspect.
According to a fourth aspect of the embodiments of the present disclosure, there is provided a non-transitory computer-readable storage medium, where instructions of the storage medium, when executed by a processor of a terminal, enable the terminal to perform the method for adjusting the operating frequency of a CPU described in the first aspect or any one of the implementation manners of the first aspect.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: load acquisition is carried out based on the frame drawing period of the application, so that real-time monitoring of the load in the frame drawing period can be realized, the load change in the frame drawing period is captured in real time, the CPU working frequency is adjusted in real time, and the probability of the visual stuck phenomenon is reduced.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a schematic diagram illustrating CPU operating frequency adjustment according to an exemplary embodiment.
Fig. 2 is a schematic diagram illustrating CPU operating frequency adjustment according to an exemplary embodiment.
Fig. 3 is a flowchart illustrating a CPU operating frequency adjustment method according to an example embodiment.
Fig. 4 is a diagram illustrating a frame-based rendering cycle modulation according to an exemplary embodiment.
Fig. 5 is a flowchart illustrating a CPU operating frequency adjustment method according to an example embodiment.
Fig. 6 is a diagram illustrating a frame-based rendering cycle modulation according to an exemplary embodiment.
Fig. 7A to 7B are block diagrams illustrating a CPU operating frequency adjusting apparatus according to an exemplary embodiment.
Fig. 8 is a block diagram illustrating a CPU operating frequency adjustment apparatus according to an exemplary embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
The CPU working frequency adjusting method provided by the embodiment of the disclosure is applied to a terminal installed with a frame drawing application. The frame drawing application has a frame drawing period in the running process. The frame drawing period may be understood as an adjacent two-frame image display interval.
In the embodiment of the present disclosure, the frame drawing application may be an APP application installed on the terminal, for example, the frame drawing application may be a game. The following description of the embodiments of the present disclosure will be given by taking a frame drawing application as an example, but the embodiments of the present disclosure are not limited to the frame drawing application as a game application, and may be other applications.
In the process of running the game on the terminal, the length of the frame drawing period of the game is not fixed and is positively correlated with the size of the game load and the CPU working frequency in the drawing period. The larger the game load in the frame drawing period, the longer the frame drawing period at the same CPU operating frequency. Or the lower the CPU operating frequency, the longer the frame drawing period, when the game load is the same. The extension of the frame drawing period will cause the display time of the next frame to be delayed, the higher the probability of visually causing the click phenomenon. In the related art, the CPU governor monitors the change of the system load based on the CPU operating frequency adjustment period, and adjusts the operating frequency according to the monitored load in the CPU operating frequency adjustment period when each frequency modulation period is finished. However, the CPU operating frequency adjustment period is asynchronous with the frame drawing period, and therefore, the load change in the frame drawing period cannot be captured in real time to make real-time adjustment of the CPU operating frequency.
Fig. 1 is a schematic diagram illustrating adjustment of the operating frequency of a CPU according to an exemplary embodiment of the present disclosure. In fig. 1, it is assumed that the CPU supports two frequency bin settings of 1.0GHZ and 2.0 GHZ. When the CPU governor monitors that the load in a certain frequency modulation period is greater than the frequency-increasing load threshold (assuming that the frequency-increasing load threshold is 75 in fig. 1), the frequency is increased to 2.0GHZ (if the current frequency is 2.0GHZ, the frequency is maintained unchanged). Similarly, when the operating frequency of the CPU is at 2.0GHZ, if the load is detected to be less than the down load threshold in the current frequency modulation cycle (it is assumed that the down load threshold is 45 in fig. 1), the frequency is reduced to 1.0 GHZ.
However, the CPU governor acquires the load based on the CPU operating frequency adjustment period. The game has its own frame drawing period, and the load of the game also fluctuates greatly in different frame drawing periods. Since the frame drawing period is not synchronized with the CPU tweetnor period. Therefore, based on the acquisition of the CPU governor frequency modulation period and the adjustment of the CPU operating frequency, the drastic load change in the frame drawing period cannot be reflected in time. For example, in fig. 2, the system load is increased in the second frame drawing period, and a higher CPU operating frequency is needed to adapt to the current load change, whereas cpugovenor is obtained based on the CPU operating frequency adjustment period, and the system load change can only be detected at the end of the third fm period, and a larger delay has occurred in performing the frequency adjustment. This in turn causes a situation where a highly loaded game is run at a lower frequency in the third frame drawing period. Accordingly, the frame drawing period is lengthened, and the display time of the next frame is delayed, thereby bringing about frame loss or stuck hidden danger.
In view of this, the present disclosure provides a method for adjusting a CPU operating frequency, in which a load is obtained based on a frame drawing period and the CPU operating frequency is adjusted, so as to capture a load change in the frame drawing period in real time to adjust the frequency in real time, thereby reducing a probability of visually causing a stuck phenomenon.
Fig. 3 is a flowchart illustrating a CPU operating frequency adjustment method according to an exemplary embodiment, where as shown in fig. 3, the CPU operating frequency adjustment method is used in a terminal, and a frame drawing class application is installed on the terminal, and the method includes the following steps.
In step S11, the frame drawing period of the application is acquired, and the system load of the terminal in each frame drawing period is periodically acquired based on the frame drawing period of the application.
In the embodiment of the present disclosure, the frame drawing period refers to a display interval between two adjacent frames, and may also be understood as acquisition of a system load in each frame. For example, the system load may be obtained at the end of each frame.
In step S12, the terminal CPU operating frequency is adjusted based on the comparison result of the acquired system load and the preset load threshold.
In the embodiment of the present disclosure, the system load is obtained in the frame drawing period, and the obtained system load is compared with a preset load threshold value, so as to adjust the operating frequency of the CPU of the terminal.
In the embodiment of the present disclosure, adjusting the operating frequency of the terminal CPU includes increasing the operating frequency of the terminal CPU, decreasing the operating frequency of the terminal CPU, and may also include maintaining the current operating frequency.
In the embodiment of the disclosure, the system load is acquired based on the frame drawing period, and the CPU operating frequency is adjusted, so that the load change in the frame drawing period is captured in real time to adjust the frequency in real time, and the probability of visually blocking is reduced.
The embodiment of the present disclosure will be described below with reference to practical applications.
In the embodiment of the present disclosure, the operating frequency supported by the terminal is preset, and generally, the operating frequency is two or more operating frequencies with different sizes. Further, in the embodiment of the present disclosure, a load threshold for adjusting the operating frequency of the CPU may be preset according to the system performance of the terminal. In which, the embodiments of the present disclosure may set an ascending load threshold and a descending load threshold, respectively. And the frequency-increasing load threshold value is used for judging whether the working frequency is increased or not according to the frequency-increasing load threshold value. For example, when the currently acquired system load is greater than the frequency-increasing load threshold, the terminal CPU operating frequency is increased to a frequency higher than the current CPU operating frequency among the preset multiple operating frequencies, for example, the terminal CPU operating frequency is increased to a frequency with the highest CPU operating frequency. In the embodiment of the disclosure, a down-conversion load threshold value can be set, and whether the working frequency is reduced or not is judged through the down-conversion load threshold value. For example, when the currently acquired system load is smaller than the down conversion load threshold, the terminal CPU operating frequency is reduced to a frequency lower than the current CPU operating frequency among the preset multiple operating frequencies, for example, the terminal CPU operating frequency is reduced to a frequency with the lowest CPU operating frequency.
In the embodiment of the present disclosure, when the CPU operating frequency is adjusted, the CPU operating frequency may also be adjusted based on the current operating frequency of the terminal and the load threshold.
In an aspect of the embodiment of the present disclosure, when the current operating frequency is not the highest operating frequency supported by the terminal, and the obtained system load is greater than the frequency-increasing load threshold, the operating frequency of the CPU of the terminal may be adjusted to be a higher operating frequency than the current operating frequency, for example, the operating frequency of the CPU of the terminal may be adjusted to be the highest frequency among a plurality of preset operating frequencies.
In another aspect of the embodiments of the present disclosure, when the obtained system load is greater than the down-loading threshold and less than the up-loading threshold, the CPU operating frequency of the terminal may be kept as the current operating frequency. Or when the current working frequency is the highest working frequency supported by the terminal and the obtained system load is greater than the frequency-increasing load threshold value, the working frequency of the CPU of the terminal can be kept to be the highest working frequency.
In another aspect of the embodiment of the present disclosure, when the current operating frequency is not the lowest operating frequency supported by the terminal and the obtained system load is less than the down-conversion load threshold, the operating frequency of the CPU of the terminal may be adjusted to be a lower operating frequency than the current operating frequency, for example, the operating frequency of the CPU of the terminal may be adjusted to be the lowest frequency among the preset operating frequencies.
In another aspect of the embodiments of the present disclosure, when the current operating frequency is the lowest operating frequency supported by the terminal and the obtained system load is less than the down-conversion load threshold, the CPU operating frequency of the terminal may be kept at the lowest operating frequency.
Fig. 4 is a schematic diagram illustrating adjustment of the operating frequency of a CPU according to an exemplary embodiment of the present disclosure. In fig. 4, it is assumed that the operating frequencies supported by the terminal are preset to be 1.0G and 2.0G. The up-loading threshold is 75 and the down-loading threshold is 45. In fig. 4, the system load in the first frame drawing period is 30+30 ═ 60, which is smaller than the frequency-increasing load threshold 75, and the current operating frequency 1.0G can be maintained. The system load in the second frame drawing period is 30+ 60-90, which is greater than the boost load threshold 75, and the operating frequency can be raised to 2.0G. The system load during the third frame rendering period is 90, which is greater than the ramp-up load threshold 75, and the current operating frequency can be maintained at the maximum operating frequency of 2.0G. And the system load in the third frame drawing period is 40, which is smaller than the frequency reduction load threshold value 45, and the reduced working frequency is 1.0G.
The up-loading threshold and the down-loading threshold referred to in the above embodiments of the present disclosure may be predetermined based on the terminal system performance. In one embodiment, the frequency-increasing load threshold is a frequency-increasing load threshold used when the CPU operating frequency is adjusted based on the CPU operating frequency adjustment period. The frequency reduction load threshold is used for adjusting the CPU working frequency based on the CPU working frequency adjustment period
It can be further understood that, in the embodiment of the present disclosure, when load acquisition is performed based on a frame drawing period and frequency adjustment is performed, a process of acquiring and frequency adjustment by using a CPU governor based on a CPU operating frequency adjustment period by a terminal may be temporarily cancelled.
In another embodiment of the present disclosure, when the load threshold is preset based on the system performance of the terminal, different load thresholds may be preset for different scenarios in response to a situation where the application has multiple scenarios. Wherein, different applied scenes can be identified by adopting an Artificial Intelligence (AI) technology. For example, when the application is a game, the scene may include hall waiting, resource loading, grass running, wild, driving, running, and the like. In the embodiment of the disclosure, the load threshold of each scene can be preset through big data analysis and sorting of the load change of the game in different scenes. Different scenarios correspond to different load thresholds.
In one embodiment, in the present disclosure, load thresholds corresponding to different scenarios may be stored in the cloud. When the application is initially installed at the terminal, the load threshold values of all scenes corresponding to the initially installed application are obtained from the cloud and are stored in the local terminal. When the terminal runs the application, determining a current scene of the application running on the terminal, taking a load threshold matched with the current scene as a preset load threshold, and judging whether the frequency is adjusted or not based on the load threshold.
Fig. 5 is a flowchart illustrating a CPU operating frequency adjustment method according to an exemplary embodiment, where as shown in fig. 5, the CPU operating frequency adjustment method is used in a terminal, and a frame drawing class application is installed on the terminal, and the method includes the following steps.
In step S21, a load threshold is preset.
In an embodiment of the present disclosure, on the one hand, a load threshold may be preset based on system performance of a terminal. On the other hand, the load threshold matched with different scenes can be preset based on different scenes in the operation of the terminal installation application.
Further, the preset load threshold includes an up-loading threshold and a down-loading threshold.
The embodiments of the present disclosure take the example of distinguishing scenes and determining a load threshold value of a matching scene.
The terminal can obtain and store the load threshold corresponding to each scene of the application from the cloud when the application is initially installed.
In step S22, a current scene of the application running on the terminal is determined, and a load threshold matching the current scene is used as a preset load threshold.
In step S23, based on the frame drawing period, the periodic terminal runs a load applied in the frame drawing period in the current scene.
In the embodiment of the present disclosure, the system load obtained in each frame of the drawing period is compared with a preset frequency-increasing load threshold and a preset frequency-decreasing load threshold.
In step S24, when the acquired system load is greater than the frequency-increasing load threshold, the terminal CPU operating frequency is increased.
For example, the frequency-increasing load threshold value set for a certain game scene is 80, and when the system load in a certain frame drawing period exceeds the frequency-increasing load threshold value 80, the frequency is increased in real time, for example, the working frequency is increased from 1.0G to 2.0G, so as to quickly respond to the rapid increase of the system load and reduce the performance loss caused by untimely frequency increase of the conventional frequency-increasing strategies such as the CPU goveror.
In the embodiment of the disclosure, after the operating frequency of the CPU of the terminal is increased, the system load is continuously acquired with the frame drawing period as a period.
In step S25a, if the acquired system load is still greater than the frequency-increasing load threshold, the operation is maintained at the increased operating frequency.
In step S25b, when the acquired system load is lower than the down load threshold, the terminal CPU operating frequency is lowered. For example, in the embodiment of the present disclosure, the operating frequency of the CPU of the terminal may be reduced to the operating frequency before the operating frequency is increased.
In the embodiment of the present disclosure, the down-conversion load threshold may also be understood as a load threshold of the recovered operating frequency, for example, the load threshold for the recovered operating frequency is 60, and when it is obtained that the system load in a certain frame drawing period is lower than the load threshold of the recovered operating frequency, the frequency is recovered to a frequency point before frequency increase, for example, 1.0G.
Fig. 6 is a schematic diagram illustrating the adjustment of the operating frequency of the CPU shown in fig. 5. In fig. 6, it is assumed that the operating frequencies supported by the terminal are preset to be 1.0G and 2.0G. The up-loading threshold is 80 and the down-loading threshold is 60. In fig. 6, the system load during the first frame drawing period is 30, which is less than the frequency-increasing load threshold 80, and the current operating frequency can be maintained at 1.0G. The system load in the second frame drawing period is 80+ 10-90, which is greater than the frequency-increasing load threshold 80, and the operating frequency can be increased to 2.0G. The system load in the third frame drawing period is 80+ 10-90, which is greater than the frequency-increasing load threshold 80, so that the current operating frequency can be kept at the highest operating frequency of 2.0G. And the system load in the third frame drawing period is 40, which is smaller than the frequency reduction load threshold value 60, and the recovery working frequency is 1.0G.
The scheme for acquiring the system load based on the frame drawing period and adjusting the CPU working frequency provided by the embodiment of the disclosure can be used for monitoring and capturing the load change in the frame drawing period in real time, thereby adjusting the working frequency in time. In addition, different load thresholds are preset for loads in different scenes by dividing application scenes, so that the change of the real load of each application scene is quickly responded, and the unification of performance and power consumption is realized.
Based on the same conception, the embodiment of the disclosure also provides a CPU working frequency adjusting device.
It is understood that, in order to implement the above functions, the CPU operating frequency adjusting apparatus provided in the embodiments of the present disclosure includes a hardware structure and/or a software module corresponding to the execution of each function. The disclosed embodiments can be implemented in hardware or a combination of hardware and computer software, in combination with the exemplary elements and algorithm steps disclosed in the disclosed embodiments. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
Fig. 7A to 7B are block diagrams illustrating a CPU operating frequency adjusting apparatus according to an exemplary embodiment. The CPU working frequency adjusting device is applied to a terminal, and a frame drawing application is installed on the terminal. Referring to fig. 7A, the CPU operating frequency adjustment apparatus 100 includes an acquisition unit 101 and a frequency adjustment unit 102.
An obtaining unit 101, configured to obtain a frame drawing period of the application, and periodically obtain, based on the frame drawing period of the application, a system load of the terminal in each frame drawing period. A frequency adjusting unit 102 configured to adjust a CPU operating frequency of the terminal based on a comparison result of the system load and a load threshold.
In one embodiment, the load thresholds include an up load threshold and a down load threshold.
The frequency adjusting unit 102 is configured to adjust the CPU operating frequency of the terminal based on the system load and the load threshold in the following manner, including:
when the system load is greater than the frequency-increasing load threshold value, adjusting the CPU working frequency of the terminal to be a frequency higher than the current CPU working frequency in a plurality of preset working frequencies; and when the system load is smaller than the frequency reduction load threshold value, adjusting the CPU working frequency of the terminal to be the frequency lower than the current CPU working frequency in the preset multiple working frequencies.
In another embodiment, the CPU operating frequency adjusting apparatus 100 further includes a load threshold determining unit 103, see fig. 7B. The load threshold determination unit 103 is configured to: the load threshold is preset based on the system performance of the terminal.
In another embodiment, the CPU operating frequency adjusting apparatus 100 further includes a load threshold determining unit 103, and the load threshold determining unit 103 is configured to: when an application has one or more scenarios, different load thresholds are determined for different scenarios. The load threshold determination unit 103 is further configured to: and determining a current scene of the application running on the terminal, and taking a load threshold value matched with the current scene as a load threshold value.
In a further embodiment, the load threshold determination unit 103 is configured to determine different load thresholds for different scenarios in the following manner: when the application is initially installed, the load threshold corresponding to each scene of the application is obtained and stored from the cloud.
In yet another embodiment, the application is a gaming application.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 8 is a block diagram illustrating an apparatus 800 for adjusting an operating frequency in accordance with an example embodiment. For example, the apparatus 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 8, the apparatus 800 may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, a sensor component 814, and a communication component 816.
The processing component 802 generally controls overall operation of the device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operation at the device 800. Examples of such data include instructions for any application or method operating on device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
Power component 806 provides power to the various components of device 800. The power components 806 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the device 800.
The multimedia component 808 includes a screen that provides an output interface between the device 800 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front-facing camera and/or the rear-facing camera may receive external multimedia data when the device 800 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the apparatus 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the device 800. For example, the sensor assembly 814 may detect the open/closed state of the device 800, the relative positioning of the components, such as a display and keypad of the apparatus 800, the sensor assembly 814 may also detect a change in position of the apparatus 800 or a component of the apparatus 800, the presence or absence of user contact with the apparatus 800, orientation or acceleration/deceleration of the apparatus 800, and a change in temperature of the apparatus 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate communications between the apparatus 800 and other devices in a wired or wireless manner. The device 800 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 804 comprising instructions, executable by the processor 820 of the device 800 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
It is further understood that the use of "a plurality" in this disclosure means two or more, as other terms are analogous. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. The singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It will be further understood that the terms "first," "second," and the like are used to describe various information and that such information should not be limited by these terms. These terms are only used to distinguish one type of information from another and do not denote a particular order or importance. Indeed, the terms "first," "second," and the like are fully interchangeable. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present disclosure.
It is further to be understood that while operations are depicted in the drawings in a particular order, this is not to be understood as requiring that such operations be performed in the particular order shown or in serial order, or that all illustrated operations be performed, to achieve desirable results. In certain environments, multitasking and parallel processing may be advantageous.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (14)

1. A CPU working frequency adjusting method is applied to a terminal, a frame drawing application is installed on the terminal, and the CPU working frequency adjusting method comprises the following steps:
acquiring a frame drawing period of the application;
periodically acquiring the system load of the terminal in each frame drawing period based on the frame drawing period of the application;
and adjusting the CPU working frequency of the terminal based on the comparison result of the system load and the load threshold.
2. The method according to claim 1, wherein the load threshold comprises an up-load threshold and a down-load threshold;
the adjusting the CPU working frequency of the terminal based on the system load and the load threshold value comprises:
when the system load is greater than the frequency-increasing load threshold value, adjusting the CPU working frequency of the terminal to be a frequency higher than the current CPU working frequency in a plurality of preset working frequencies;
and when the system load is smaller than the frequency reduction load threshold value, adjusting the CPU working frequency of the terminal to be the frequency lower than the current CPU working frequency in the preset multiple working frequencies.
3. The CPU operating frequency adjusting method according to claim 1 or 2, further comprising:
the load threshold is preset based on system performance of the terminal.
4. The method according to claim 1 or 2, wherein the application has more than one scene, and different scenes correspond to different load thresholds;
the CPU working frequency adjusting method further comprises the following steps:
determining a current scene of an application running on the terminal;
and taking the load threshold value matched with the current scene as the load threshold value.
5. The method for adjusting the operating frequency of a CPU of claim 4, further comprising:
and when the application is initially installed, acquiring and storing the load threshold corresponding to each scene of the application from the cloud.
6. The method according to claim 1, wherein the application is a game application.
7. The CPU working frequency adjusting device is applied to a terminal, a frame drawing application is installed on the terminal, and the CPU working frequency adjusting device comprises:
the acquisition unit is configured to acquire a frame drawing period of the application, and periodically acquire the system load of the terminal in each frame drawing period based on the frame drawing period of the application;
a frequency adjusting unit configured to adjust a CPU operating frequency of the terminal based on a comparison result of the system load and a load threshold.
8. The CPU operating frequency adjusting apparatus according to claim 7, wherein the load threshold comprises an up load threshold and a down load threshold;
the frequency adjusting unit is configured to adjust the CPU operating frequency of the terminal based on the system load and the load threshold in the following manner, including:
when the system load is greater than the frequency-increasing load threshold value, adjusting the CPU working frequency of the terminal to be a frequency higher than the current CPU working frequency in a plurality of preset working frequencies;
and when the system load is smaller than the frequency reduction load threshold value, adjusting the CPU working frequency of the terminal to be the frequency lower than the current CPU working frequency in the preset multiple working frequencies.
9. The CPU operating frequency adjusting apparatus according to claim 7 or 8, further comprising a load threshold determining unit configured to:
the load threshold is preset based on system performance of the terminal.
10. The CPU operating frequency adjusting apparatus according to claim 7 or 8, further comprising a load threshold determining unit configured to:
determining different load thresholds for different scenarios when the application has more than one scenario;
the load threshold determination unit is further configured to: and determining a current scene of the application running on the terminal, and taking a load threshold value matched with the current scene as the load threshold value.
11. The CPU operating frequency adjustment apparatus according to claim 10, wherein the load threshold determination unit is configured to determine different load thresholds for different scenarios in the following manner:
and when the application is initially installed, acquiring and storing the load threshold corresponding to each scene of the application from the cloud.
12. The CPU operating frequency adjustment apparatus according to claim 7, wherein the application is a game application.
13. An apparatus for adjusting a CPU operating frequency, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to: executing the CPU operating frequency adjustment method of any of claims 1 to 6.
14. A non-transitory computer-readable storage medium, wherein instructions of the storage medium, when executed by a processor of a terminal, enable the terminal to perform the CPU operating frequency adjustment method of any one of claims 1 to 6.
CN202010009810.9A 2020-01-06 2020-01-06 CPU operating frequency adjusting method, CPU operating frequency adjusting device and storage medium Active CN111240835B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010009810.9A CN111240835B (en) 2020-01-06 2020-01-06 CPU operating frequency adjusting method, CPU operating frequency adjusting device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010009810.9A CN111240835B (en) 2020-01-06 2020-01-06 CPU operating frequency adjusting method, CPU operating frequency adjusting device and storage medium

Publications (2)

Publication Number Publication Date
CN111240835A true CN111240835A (en) 2020-06-05
CN111240835B CN111240835B (en) 2024-04-16

Family

ID=70870744

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010009810.9A Active CN111240835B (en) 2020-01-06 2020-01-06 CPU operating frequency adjusting method, CPU operating frequency adjusting device and storage medium

Country Status (1)

Country Link
CN (1) CN111240835B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113722096A (en) * 2021-08-25 2021-11-30 中国电力科学研究院有限公司 CPU frequency adjusting method, system, equipment and storage medium of edge computing node
CN116048772A (en) * 2022-08-26 2023-05-02 荣耀终端有限公司 Method and device for adjusting frequency of central processing unit and terminal equipment
CN117149409A (en) * 2023-05-16 2023-12-01 荣耀终端有限公司 Method for adjusting CPU frequency and terminal equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150130821A1 (en) * 2013-11-13 2015-05-14 Qualcomm Incorporated System and method of dynamically throttling cpu frequency for gaming workloads
CN108604113A (en) * 2016-02-03 2018-09-28 高通股份有限公司 The clock rate adjustment based on frame for processing unit
CN109857559A (en) * 2019-01-25 2019-06-07 维沃移动通信有限公司 Terminal control method and terminal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150130821A1 (en) * 2013-11-13 2015-05-14 Qualcomm Incorporated System and method of dynamically throttling cpu frequency for gaming workloads
CN108604113A (en) * 2016-02-03 2018-09-28 高通股份有限公司 The clock rate adjustment based on frame for processing unit
CN109857559A (en) * 2019-01-25 2019-06-07 维沃移动通信有限公司 Terminal control method and terminal

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113722096A (en) * 2021-08-25 2021-11-30 中国电力科学研究院有限公司 CPU frequency adjusting method, system, equipment and storage medium of edge computing node
CN113722096B (en) * 2021-08-25 2023-09-12 中国电力科学研究院有限公司 CPU frequency adjusting method, system, equipment and storage medium of edge computing node
CN116048772A (en) * 2022-08-26 2023-05-02 荣耀终端有限公司 Method and device for adjusting frequency of central processing unit and terminal equipment
CN116048772B (en) * 2022-08-26 2023-10-31 荣耀终端有限公司 Method and device for adjusting frequency of central processing unit and terminal equipment
CN117149409A (en) * 2023-05-16 2023-12-01 荣耀终端有限公司 Method for adjusting CPU frequency and terminal equipment

Also Published As

Publication number Publication date
CN111240835B (en) 2024-04-16

Similar Documents

Publication Publication Date Title
JP7506165B2 (en) Refresh rate switching method and electronic device
US10674088B2 (en) Method and device for acquiring image, terminal and computer-readable storage medium
US20220076006A1 (en) Method and device for image processing, electronic device and storage medium
US20170055221A1 (en) Method and apparatus for starting energy saving mode
EP3893495B1 (en) Method for selecting images based on continuous shooting and electronic device
CN107193653B (en) Bandwidth resource allocation method, device and storage medium
CN107040591B (en) Method and device for controlling client
US9691332B2 (en) Method and device for adjusting backlight brightness
CN107241552B (en) Image acquisition method, device, storage medium and terminal
CN105404382A (en) Power saving mode setting method and apparatus
CN108200279B (en) Backlight adjusting method, device and equipment
CN114442970B (en) Screen projection method of application window and electronic equipment
CN112217990A (en) Task scheduling method, task scheduling device, and storage medium
CN111240835B (en) CPU operating frequency adjusting method, CPU operating frequency adjusting device and storage medium
US11737022B2 (en) Delay adjustment method and device, electronic device and storage medium
CN111601377B (en) Temperature control method, device and storage medium
US20170220401A1 (en) Method, device, and computer-readable storage medium for calling a process
US11812386B2 (en) Configuration adjustment methods, apparatuses, electronic device and computer readable storage medium
CN108597456B (en) Backlight brightness adjusting method and device
CN109922203B (en) Terminal, screen off method and device
CN112307229A (en) Data processing method and device, electronic equipment and computer readable storage medium
CN106775246B (en) Screen brightness adjusting method and device
US10531401B2 (en) Method, terminal device and system for controlling transmission
CN116089025A (en) Processor frequency control method, device and storage medium
CN112416580A (en) Method, device and medium for determining optimal resource allocation mode in application runtime

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant