CN111240835B - CPU operating frequency adjusting method, CPU operating frequency adjusting device and storage medium - Google Patents

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

Info

Publication number
CN111240835B
CN111240835B CN202010009810.9A CN202010009810A CN111240835B CN 111240835 B CN111240835 B CN 111240835B CN 202010009810 A CN202010009810 A CN 202010009810A CN 111240835 B CN111240835 B CN 111240835B
Authority
CN
China
Prior art keywords
terminal
load
load threshold
cpu
frequency
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010009810.9A
Other languages
Chinese (zh)
Other versions
CN111240835A (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

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 adjustment method, a CPU operating frequency adjustment device and a storage medium. The CPU working frequency adjusting method is applied to a terminal, wherein 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. The method and the device can capture the load change in the frame drawing period in real time to carry out real-time frequency adjustment, and reduce the probability of occurrence of the visual stuck phenomenon.

Description

CPU operating frequency adjusting method, CPU operating frequency adjusting device and storage medium
Technical Field
The disclosure relates to the technical field of terminals, and in particular relates to a method for adjusting a CPU operating frequency, a device for adjusting the CPU operating frequency and a storage medium.
Background
Along with the popularization of touch screen smartphones and the high-speed development of mobile phone hardware, the application supported by smartphones is more and more, and further, the processing capacity requirements on hardware devices such as a central processing unit (central processing unit, CPU) of a terminal are continuously improved.
The hardware devices such as the CPU cannot continuously maintain to work at the high-performance working frequency due to the restriction of heat dissipation and power consumption. Dynamic frequency modulation techniques have evolved for better balancing performance versus power consumption. In the related art, a CPU gate module of an operating system periodically monitors a change in system load and adjusts the operating frequency of the CPU. However, for the case of running a frame drawing application on a terminal, the phenomenon of frame loss or jamming still occurs when the load is high. For example, mobile games are popular with more and more young people as daily entertainment modes of relaxing moods, reducing blood pressure and reducing emission, but the load of the games is higher, and when the load is higher, the probability of visually appearing stuck is higher.
Disclosure of Invention
In order to overcome the problems in the related art, the present disclosure provides a CPU operating frequency adjustment method, a CPU operating frequency adjustment device, and a storage medium.
According to a first aspect of an embodiment of the present disclosure, there is provided a CPU operating frequency adjustment method applied to a terminal, on which a frame drawing class application is installed, the CPU operating frequency adjustment method including: acquiring a frame drawing period of the application; based on the applied frame drawing period, periodically acquiring a system load of the terminal in each 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 includes an up-conversion load threshold and a down-conversion load threshold;
the adjusting the CPU operating frequency of the terminal based on the system load and the load threshold includes:
when the system load is larger than the frequency-increasing load threshold, 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-reducing load threshold, adjusting the CPU working frequency of the terminal to be the frequency lower than the current CPU working frequency in a plurality of preset working frequencies.
In another embodiment, the method for adjusting the operating frequency of the CPU further includes: the load threshold is preset based on the system performance of the terminal.
In yet another embodiment, the application has more than one scenario, different scenarios corresponding 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 a load threshold matched with the current scene as the load threshold.
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 value 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 adjustment apparatus applied to a terminal on which a frame drawing class application is installed, the CPU operating frequency adjustment apparatus including:
an acquisition unit configured to acquire a frame drawing period of the application, periodically acquire a system load of the terminal in each frame drawing period based on the frame drawing period of the application; and the frequency adjusting unit is configured to adjust the CPU working frequency of the terminal based on the comparison result of the system load and the load threshold value.
In one embodiment, the load threshold includes an up-conversion load threshold and a down-conversion load threshold;
the frequency adjustment unit is configured to adjust the CPU working frequency of the terminal based on the system load and the load threshold in the following manner, and comprises the following steps: when the system load is larger than the frequency-increasing load threshold, 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-reducing load threshold, adjusting the CPU working frequency of the terminal to be the frequency lower than the current CPU working frequency in a plurality of preset working frequencies.
In another embodiment, the CPU operating frequency adjustment device further includes a load threshold determination unit configured to: the load threshold is preset based on the system performance of the terminal.
In still another embodiment, the CPU operating frequency adjustment device further includes a load threshold determination 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 running application on the terminal, and taking a load threshold matched with the current scene as the load threshold.
In yet another 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 value 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 adjustment apparatus including:
a processor; a memory for storing processor-executable instructions;
wherein the processor is configured to: the CPU operating frequency adjustment method described in the first aspect or any implementation manner of the first aspect is executed.
According to a fourth aspect of the disclosed embodiments, there is provided a non-transitory computer readable storage medium, which when executed by a processor of a terminal, enables the terminal to perform the CPU operating frequency adjustment method of the first aspect or any one of the embodiments of the first aspect.
The technical scheme provided by the embodiment of the disclosure can comprise the following beneficial effects: the load acquisition based on the applied frame drawing period can realize real-time monitoring of the load in the frame drawing period, further captures the load change in the frame drawing period in real time to carry out real-time adjustment of the CPU working frequency, and reduces the probability of occurrence of the visual clamping phenomenon.
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 disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a schematic diagram illustrating a CPU operating frequency adjustment according to an exemplary embodiment.
Fig. 2 is a schematic diagram illustrating a CPU operating frequency adjustment according to an example embodiment.
Fig. 3 is a flowchart illustrating a method of CPU operating frequency adjustment, according to an exemplary embodiment.
Fig. 4 is a diagram illustrating a frame-based rendering cycle frequency modulation according to an exemplary embodiment.
Fig. 5 is a flowchart illustrating a method of CPU operating frequency adjustment, according to an exemplary embodiment.
Fig. 6 is a diagram illustrating a frame-based rendering cycle frequency modulation according to an exemplary embodiment.
Fig. 7A to 7B are block diagrams showing a CPU operating frequency adjustment 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 exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
The CPU working frequency adjusting method provided by the embodiment of the disclosure is applied to the terminal provided with the frame drawing application. The frame drawing class application has a frame drawing period during operation. The frame drawing period can be understood as the display interval of two adjacent frames of images.
In the embodiment of the disclosure, the frame drawing class application may be an APP class application installed on the terminal, for example, the frame drawing class application may be a game. The embodiments of the present disclosure will be described below by taking a frame drawing application as an example of a game, and of course, the embodiments of the present disclosure are not limited to the frame drawing application as a game application, but may be other applications.
The length of the frame drawing period of the game is not constant during the running of the game on the terminal, and is positively correlated with the magnitude of the game load and the magnitude of the CPU operating frequency during 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 when the game load is the same, the lower the CPU operating frequency, the longer the frame drawing period. The longer the frame drawing period will result in a delay in the display time of the next frame, the higher the probability of visually appearing a stuck phenomenon. In the related art, the CPU gate 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 completed. However, the CPU operating frequency adjustment period is not synchronized with the frame drawing period, and thus, 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 CPU operating frequency adjustment according to an exemplary embodiment of the present disclosure. In fig. 1, it is assumed that the CPU supports two frequency point settings of 1.0GHZ and 2.0 GHZ. When the CPU gate monitors that the load in a certain frequency modulation period is greater than the boost load threshold (assuming the boost load threshold is 75 in fig. 1), the boost frequency is 2.0GHZ (if the current frequency is 2.0GHZ, then it remains unchanged). Similarly, when the CPU operating frequency is at 2.0GHZ, if the load is monitored to be less than the down-conversion load threshold (assuming the down-conversion load threshold is 45 in FIG. 1) during the current frequency modulation period, the frequency is reduced to 1.0GHZ.
However, the CPU gate 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 gate frequency modulation period. Therefore, based on the acquisition of the CPU gate frequency modulation period and the CPU operating frequency adjustment, the drastic load change in the frame drawing period cannot be reflected in time. For example, in fig. 2, the system load is increased during the second frame drawing period, and a higher CPU operating frequency is required to adapt to the current load change, however, the CPU synthesizer acquires based on the CPU operating frequency adjustment period, and only detects the system load change at the end of the third frequency adjustment period, and then a larger delay has occurred in performing the frequency adjustment. Resulting in a third frame drawing period, when a high load game is run at a lower frequency. Correspondingly, the frame drawing period is prolonged, the display time of the next frame is delayed, and the hidden danger of frame loss or blocking is brought.
In view of this, the present disclosure provides a method for adjusting a CPU operating frequency, in which load acquisition is performed based on a frame drawing period and CPU operating frequency adjustment is performed, so as to achieve real-time capturing of a load change in the frame drawing period for real-time adjustment of frequency, and reduce the probability of occurrence of a visual stuck phenomenon.
Fig. 3 is a flowchart illustrating a method for adjusting a CPU operating frequency according to an exemplary embodiment, which is used in a terminal on which a frame drawing class application is installed, as shown in fig. 3, comprising 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 disclosure, the frame drawing period refers to the display interval of two adjacent frames, and can be understood as the acquisition of the system load in each frame. For example, the acquisition of the system load may be performed at the end of each frame.
In step S12, the terminal CPU operating frequency is adjusted based on the comparison result of the obtained system load and the preset load threshold.
In the embodiment of the disclosure, system load acquisition is performed in a frame drawing period, and the acquired system load is compared with a preset load threshold value to adjust the working frequency of a terminal CPU.
In the embodiment of the disclosure, adjusting the terminal CPU operating frequency includes raising the terminal CPU operating frequency, lowering the terminal CPU operating frequency, 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 working frequency is adjusted, so that the real-time frequency adjustment of the load change in the frame drawing period is captured in real time, and the probability of occurrence of a visual stuck phenomenon is reduced.
The CPU operating frequency adjustment method according to the above embodiment will be described below in connection with practical applications.
In the embodiment of the disclosure, the working frequency supported by the terminal is preset, and is generally two or more working frequencies with different sizes. Further, in the embodiment of the present disclosure, a load threshold for adjusting the CPU operating frequency may be preset according to the system performance of the terminal. The embodiment of the disclosure can respectively set an up-conversion load threshold and a down-conversion load threshold. The frequency-raising load threshold is used for judging whether the working frequency is raised or not through the frequency-raising load threshold. For example, when the currently acquired system load is greater than the ascending load threshold, the terminal CPU operating frequency is raised to a frequency higher than the current CPU operating frequency among a plurality of preset operating frequencies, for example, the terminal CPU operating frequency is raised to a frequency with the highest CPU operating frequency. In the embodiment of the disclosure, a frequency-reducing load threshold may be set, and whether to reduce the working frequency is determined by the frequency-reducing load threshold. 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 a plurality of preset 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 disclosure, when the CPU operating frequency is adjusted, the adjustment may also be performed based on the current operating frequency of the terminal and the load threshold.
In an aspect of the embodiments 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 ascending load threshold, the operating frequency of the terminal CPU may be adjusted to be higher than the operating frequency of the current operating frequency, for example, the operating frequency of the terminal CPU 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-conversion load threshold and less than the up-conversion load threshold, the terminal CPU operating frequency 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 acquired system load is greater than the ascending load threshold, the working frequency of the CPU of the terminal can be kept to be the highest working frequency.
In still another aspect of the embodiments 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 frequency-reducing load threshold, the operating frequency of the terminal CPU may be adjusted to be a lower operating frequency than the current operating frequency, for example, the operating frequency of the terminal CPU may be adjusted to be the lowest frequency among a plurality of preset operating frequencies.
In still 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 smaller than the frequency-reducing load threshold, the CPU operating frequency of the terminal may be kept to be the lowest operating frequency.
Fig. 4 is a schematic diagram illustrating a CPU operating frequency adjustment according to an exemplary embodiment of the present disclosure. The preset terminal is assumed to support operating frequencies of 1.0G and 2.0G in fig. 4. The boost load threshold is 75 and the down load threshold is 45. In fig. 4, the system load in the first frame drawing period is 30+30=60, which is smaller than the up-conversion load threshold 75, so that the current operating frequency 1.0G can be maintained. The system load in the second frame drawing period is 30+60=90, and is greater than the boost load threshold 75, the operating frequency can be raised to 2.0G. The system load during the third frame drawing period is 90, which is greater than the boost load threshold 75, to maintain the current operating frequency at the highest operating frequency of 2.0G. The system load in the third frame drawing period is 40, which is less than the down-conversion load threshold 45, and the operating frequency is reduced to 1.0G.
The boost load threshold and the buck load threshold referred to in the above embodiments of the present disclosure may be predetermined based on the terminal system performance. In one embodiment, the up-conversion load threshold is an up-conversion load threshold used when the CPU operating frequency is adjusted based on the CPU operating frequency adjustment period. The down-conversion load threshold is used when the CPU working frequency is adjusted based on the CPU working frequency adjustment period
It can be further understood that, in the embodiment of the present disclosure, when the load acquisition based on the frame drawing period is adopted and the frequency adjustment is performed, the process that the terminal acquires and performs the frequency adjustment based on the CPU operating frequency adjustment period by using the CPU gate may be temporarily canceled.
In another embodiment of the present disclosure, when a load threshold is preset based on the system performance of the terminal, different load thresholds may be preset for different scenarios for the case where the application has multiple scenarios. Among other things, different scenarios of an application may be identified using artificial intelligence (Artificial Intelligence, AI) techniques. For example, where the application is a game, the scene may include lobby waiting, resource loading, grassland running, wild, driving, etc. According to the embodiment of the disclosure, the load threshold value of each scene can be preset by analyzing and sorting the load change of the game under different scenes through big data. Different scenarios correspond to different load thresholds.
In one embodiment, the load thresholds corresponding to different scenarios may be stored in the cloud. When the terminal initially installs the application, the load threshold value of all scenes corresponding to the initially installed application is obtained from the cloud end and stored in the terminal local. 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 method for adjusting a CPU operating frequency according to an exemplary embodiment, which is used in a terminal on which a frame drawing class application is installed, as shown in fig. 5, comprising the following steps.
In step S21, a load threshold is preset.
In one aspect, in the embodiments of the present disclosure, a load threshold may be preset based on a system performance of a terminal. On the other hand, the embodiment of the disclosure can also preset load thresholds matched with different scenes based on different scenes when the terminal installs the application to run.
Further, the preset load threshold includes an up-conversion load threshold and a down-conversion load threshold.
The embodiments of the present disclosure will be described with respect to distinguishing load thresholds of scene determination matching scenes.
The terminal can acquire and store load thresholds corresponding to various scenes of the application from the cloud when the application is initially installed.
In step S22, a current scenario of the application running on the terminal is determined, and a load threshold value matched with the current scenario is used as a preset load threshold value.
In step S23, the periodic terminal runs the load applied in the frame drawing period in the current scene based on the frame drawing period.
In the embodiment of the disclosure, the system load obtained in each frame drawing period is compared with a preset frequency-up load threshold and frequency-down load threshold.
In step S24, when the obtained system load is greater than the boost load threshold, the terminal CPU operating frequency is increased.
For example, the frequency-raising load threshold value set for a certain game scene is 80, when the system load in a certain frame drawing period is obtained to exceed the frequency-raising load threshold value 80, frequency raising is performed in real time, for example, the working frequency is raised from 1.0G to 2.0G, so that the rapid response of the rapid increase of the system load is realized, and the performance loss caused by the fact that the frequency raising is not performed in time by a conventional frequency raising strategy such as a CPU (Central processing Unit) gate or the like is reduced.
In the embodiment of the disclosure, after the working frequency of the terminal CPU is increased, system load acquisition is continuously performed by taking the frame drawing period as a period.
In step S25a, when the acquired system load is still greater than the boost load threshold, operation at the increased operating frequency is maintained.
In step S25b, when the acquired system load is lower than the down-conversion load threshold, the terminal CPU operating frequency is reduced. For example, in the embodiment of the disclosure, the operating frequency of the terminal CPU may be reduced to an operating frequency before the operating frequency is increased.
In the embodiment of the disclosure, the above-mentioned frequency-reducing load threshold may also be understood as a load threshold for recovering the operating frequency, for example, the load threshold for recovering the operating frequency is 60, and when the system load in a certain frame drawing period is obtained to be lower than the load threshold for recovering the operating frequency, the frequency is recovered to the frequency point before frequency raising, for example, 1.0G.
Fig. 6 is a schematic diagram showing the adjustment of the CPU operating frequency shown in fig. 5. In fig. 6, it is assumed that the preset terminal supports the operating frequencies of 1.0G and 2.0G. The boost load threshold is 80 and the down load threshold is 60. In fig. 6, if the system load in the first frame drawing period is 30 and is less than the up-conversion load threshold 80, the current operating frequency can be maintained at 1.0G. The system load in the second frame drawing period is 80+10=90, and is greater than the boost load threshold 80, the operating frequency can be raised to 2.0G. The system load in the third frame drawing period is 80+10=90, and is greater than the up-conversion load threshold 80, so that the current operating frequency can be kept to be the highest operating frequency of 2.0G. The system load in the third frame drawing period is 40, which is less than the down-conversion load threshold 60, and the recovery operating frequency is 1.0G.
The scheme for acquiring the system load based on the frame drawing period and adjusting the CPU working frequency can be used for monitoring and capturing the load change in the frame drawing period in real time, so that the working frequency can be adjusted in time. And by dividing application scenes, different load thresholds are preset for loads in different scenes, so that the change of the actual load of each application scene is responded quickly, and the unification of performance and power consumption is achieved.
Based on the same conception, the embodiment of the disclosure also provides a CPU working frequency adjusting device.
It can be understood that, in order to implement the above-mentioned functions, the CPU operating frequency adjusting device provided in the embodiments of the present disclosure includes a hardware structure and/or a software module that perform each function. The disclosed embodiments may be implemented in hardware or a combination of hardware and computer software, in combination with the various example elements and algorithm steps disclosed in the embodiments of the disclosure. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Those skilled in the art may implement the described functionality using different approaches for each particular application, but such implementation is not to be considered as beyond the scope of the embodiments of the present disclosure.
Fig. 7A to 7B are block diagrams of a CPU operating frequency adjustment device 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 device 100 includes an acquisition unit 101 and a frequency adjustment unit 102.
An acquisition unit 101 configured to acquire a frame drawing period of the application, and based on the frame drawing period of the application, periodically acquire a system load of the terminal in each frame drawing period. And a frequency adjustment unit 102 configured to adjust the 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 includes an up-conversion load threshold and a down-conversion load threshold.
The frequency adjustment 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 larger than the frequency-increasing load threshold, 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-reducing load threshold, adjusting the CPU working frequency of the terminal to be the frequency lower than the current CPU working frequency in a plurality of preset working frequencies.
In another embodiment, the CPU operating frequency adjustment device 100 further includes a load threshold determination unit 103, referring to fig. 7B. The load threshold determining unit 103 is configured to: the load threshold is preset based on the system performance of the terminal.
In still another embodiment, the CPU operating frequency adjustment device 100 further includes a load threshold determining unit 103, the load threshold determining unit 103 being configured to: when an application has one or more scenarios, different load thresholds are determined for different scenarios. The load threshold determining unit 103 is further configured to: and determining the current scene of the running application on the terminal, and taking the load threshold matched with the current scene as the load threshold.
In yet another embodiment, the load threshold determination unit 103 is configured to determine different load thresholds for different scenarios in the following manner: and when the application is initially installed, acquiring and storing load thresholds corresponding to various scenes of the application from the cloud.
In yet another embodiment, the application is a gaming application.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
Fig. 8 is a block diagram illustrating an apparatus 800 for adjusting an operating frequency according to an exemplary embodiment. For example, apparatus 800 may be a mobile phone, computer, digital broadcast terminal, messaging device, game console, tablet device, medical device, exercise device, personal digital assistant, or the like.
Referring to fig. 8, 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 apparatus 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interactions 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 operations at the device 800. Examples of such data include instructions for any application or method operating on the device 800, contact data, phonebook data, messages, pictures, videos, and the like. The memory 804 may be implemented by any type or combination of volatile or nonvolatile 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 disk.
The power component 806 provides power to the various components of the 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 between the device 800 and the user that provides an output interface. 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 input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or slide action, but also the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and/or a rear camera. The front camera and/or the rear camera may receive external multimedia data when the device 800 is in an operational 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 focal length and optical zoom capabilities.
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 device 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may be further stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 further 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 a keyboard, click wheel, buttons, etc. These buttons may include, but are not limited to: homepage button, volume button, start button, and lock button.
The sensor assembly 814 includes one or more sensors for providing status assessment of various aspects of the apparatus 800. For example, the sensor assembly 814 may detect an on/off state of the device 800, a 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 one component of the apparatus 800, the presence or absence of user contact with the apparatus 800, an orientation or acceleration/deceleration of the apparatus 800, and a change in temperature of the apparatus 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects 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 gyroscopic sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate communication between the apparatus 800 and other devices, either 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 one exemplary embodiment, the communication component 816 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In one 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, microcontrollers, microprocessors, or other electronic elements for executing the methods described above.
In an exemplary embodiment, a non-transitory computer readable storage medium is also provided, such as memory 804 including instructions executable by processor 820 of apparatus 800 to perform the above-described method. For example, the non-transitory computer readable storage medium may be ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
It is further understood that the term "plurality" in this disclosure means two or more, and other adjectives are similar thereto. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is 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 is further understood that the terms "first," "second," and the like are used to describe various information, but such information should not be limited to 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 expressions "first", "second", etc. may be used entirely interchangeably. 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 will be further understood that although operations are depicted in the drawings in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed, to achieve desirable results. In certain circumstances, 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 adaptations, 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 is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (8)

1. The CPU working frequency adjusting method is characterized by being applied to a terminal, wherein 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 at the end of each frame based on the frame drawing period of the application;
based on the comparison result of the system load and the load threshold, adjusting the CPU working frequency of the terminal;
the load threshold comprises an up-conversion load threshold and a down-conversion load threshold; the adjusting the CPU operating frequency of the terminal based on the system load and the load threshold includes: when the system load is larger than the frequency-increasing load threshold, 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; when the system load is smaller than a frequency-reducing load threshold, adjusting the CPU working frequency of the terminal to be a frequency lower than the current CPU working frequency in a plurality of preset working frequencies;
the load threshold is preset based on the system performance of the terminal, the application has more than one scene, and different scenes correspond to different load thresholds;
the load threshold is a load threshold matched with the current scene of the application running on the terminal.
2. The CPU operating frequency adjustment method according to claim 1, characterized in that the CPU operating frequency adjustment method further comprises:
and when the application is initially installed, acquiring and storing the load threshold value corresponding to each scene of the application from the cloud.
3. The CPU operating frequency adjustment method according to claim 1, wherein the application is a game application.
4. A CPU operating frequency adjustment device, applied to a terminal, on which a frame drawing class application is installed, comprising:
an acquisition unit configured to acquire a frame drawing period of the application, periodically acquire a system load of the terminal in each frame drawing period at the end of each frame based on the frame drawing period of the application, and periodically acquire the system load of the terminal in each frame drawing period;
a frequency adjustment unit configured to adjust a CPU operating frequency of the terminal based on a comparison result of the system load and a load threshold;
the load threshold comprises an up-conversion load threshold and a down-conversion load threshold; the adjusting the CPU operating frequency of the terminal based on the system load and the load threshold includes: when the system load is larger than the frequency-increasing load threshold, 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; when the system load is smaller than a frequency-reducing load threshold, adjusting the CPU working frequency of the terminal to be a frequency lower than the current CPU working frequency in a plurality of preset working frequencies;
a load threshold determining unit configured to preset the load threshold based on the system performance of the terminal, where the application has more than one scene, and different scenes correspond to different load thresholds;
the load threshold is a load threshold matched with the current scene of the application running on the terminal.
5. The CPU operating frequency adjustment device according to claim 4, 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 value corresponding to each scene of the application from the cloud.
6. The CPU operating frequency adjustment device according to claim 4, wherein the application is a game application.
7. A CPU operating frequency adjustment apparatus, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to: a CPU operating frequency adjustment method according to any one of claims 1 to 3.
8. A non-transitory computer readable storage medium, which when executed by a processor of a terminal, causes the terminal to perform the CPU operating frequency adjustment method of any one of claims 1 to 3.
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 CN111240835A (en) 2020-06-05
CN111240835B true 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)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113722096B (en) * 2021-08-25 2023-09-12 中国电力科学研究院有限公司 CPU frequency adjusting method, system, equipment and storage medium of edge computing node
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

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9760967B2 (en) * 2013-11-13 2017-09-12 Qualcomm Incorporated System and method of dynamically throttling CPU frequency for gaming workloads

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Also Published As

Publication number Publication date
CN111240835A (en) 2020-06-05

Similar Documents

Publication Publication Date Title
US10674088B2 (en) Method and device for acquiring image, terminal and computer-readable storage medium
EP4030276A1 (en) Content continuation method and electronic device
CN111240835B (en) CPU operating frequency adjusting method, CPU operating frequency adjusting device and storage medium
US20220076006A1 (en) Method and device for image processing, electronic device and storage medium
JP6355735B2 (en) Method and apparatus for initiating an energy saving mode
US9691332B2 (en) Method and device for adjusting backlight brightness
CN107040591B (en) Method and device for controlling client
EP3893495B1 (en) Method for selecting images based on continuous shooting and electronic device
CN106357934B (en) Screen locking control method and device
CN108200279B (en) Backlight adjusting method, device and equipment
US11062640B2 (en) Screen display method and screen display device
CN113055966B (en) Frequency band switching method, frequency band switching device and storage medium
US11800401B2 (en) User equipment protection method, device, user equipment and base station
CN112217990A (en) Task scheduling method, task scheduling device, and storage medium
CN106535147B (en) Communication signal processing method and device
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
CN109922203B (en) Terminal, screen off method and device
CN108597456B (en) Backlight brightness adjusting method and device
CN106775246B (en) Screen brightness adjusting method and device
CN114442792A (en) Method and device for adjusting operating frequency of processor and storage medium
US10531401B2 (en) Method, terminal device and system for controlling transmission
CN107979695B (en) Network message receiving method and device and storage medium
CN110784721A (en) Picture data compression method and device, electronic equipment and storage medium
CN112565521B (en) Information processing method, device, terminal and storage medium

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