CN114442792A - Method and device for adjusting operating frequency of processor and storage medium - Google Patents

Method and device for adjusting operating frequency of processor and storage medium Download PDF

Info

Publication number
CN114442792A
CN114442792A CN202210122895.0A CN202210122895A CN114442792A CN 114442792 A CN114442792 A CN 114442792A CN 202210122895 A CN202210122895 A CN 202210122895A CN 114442792 A CN114442792 A CN 114442792A
Authority
CN
China
Prior art keywords
processor
operating frequency
resource
refreshing
duration
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210122895.0A
Other languages
Chinese (zh)
Inventor
汪夏兵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 CN202210122895.0A priority Critical patent/CN114442792A/en
Publication of CN114442792A publication Critical patent/CN114442792A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • G06F1/3243Power saving in microcontroller unit
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • G06F1/324Power saving characterised by the action undertaken by lowering clock frequency
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/20Processor architectures; Processor configuration, e.g. pipelining
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2200/00Indexing scheme for image data processing or generation, in general
    • G06T2200/28Indexing scheme for image data processing or generation, in general involving image processing hardware

Abstract

The present disclosure relates to a method, an apparatus, and a storage medium for adjusting an operating frequency of a processor, wherein the method for adjusting the operating frequency includes: determining historical consumption resources of the processor, wherein the historical consumption resources are used for representing resources required by the processor for rendering a preset number of image frames; determining a reference refreshing resource of a display carrying a processor, wherein the reference refreshing resource is used for representing a resource required by the display for refreshing a frame of image; according to the historical consumed resources and the reference refreshing resources, the requirement of the next moment on the operating frequency of the processor can be predicted, and then the operating frequency of the processor is correspondingly adjusted, so that the problem that the power consumption is increased because the processor still works at a higher operating frequency when the higher operating frequency of the processor is not needed is solved on the premise of ensuring the performance of the display; in addition, the purpose of rapidly reducing the operating frequency of the processor can be realized under the condition that the operating frequency of the processor needs to be reduced, and the power consumption is further saved.

Description

Method and device for adjusting operating frequency of processor and storage medium
Technical Field
The present disclosure relates to the field of electronic information technologies, and in particular, to a method and an apparatus for adjusting an operating frequency of a processor, and a storage medium.
Background
With the popularization and rapid development of the internet, electronic devices such as servers and smart phones have higher and higher roles in life. In order to improve user experience, the processing capacity of the processor needs to be high, and the processor is further required to work at a high operation frequency, but because some scenes do not need the high processing capacity of the processor, if the processor still maintains the high operation frequency to work, a large power consumption burden is brought to the electronic equipment, and unnecessary power consumption is generated by the processor.
Disclosure of Invention
To overcome the problems in the related art, the present disclosure provides a method and an apparatus for adjusting an operating frequency of a processor, and a storage medium.
According to a first aspect of the embodiments of the present disclosure, there is provided a method for adjusting an operating frequency of a processor, including:
determining historical consumption resources of a processor, wherein the historical consumption resources are used for representing resources required by the processor for rendering a preset number of image frames;
determining a reference refreshing resource of a display carrying the processor, wherein the reference refreshing resource is used for representing a resource required by the display for refreshing a frame of image;
and adjusting the running frequency of the processor according to the historical consumption resources and the reference refreshing resources.
Optionally, the historical consumed resource is an actual duration for the processor to continuously render the preset number of image frames in the history, the reference refresh resource is a reference duration for the display to refresh one frame of image, and the adjusting the operating frequency of the processor according to the historical consumed resource and the reference refresh resource includes:
determining the refreshing time length for refreshing the preset number of image frames by the display according to the reference time length and the preset number of image frames;
and adjusting the running frequency of the processor according to the actual time length and the refreshing time length.
Optionally, the determining a reference refresh resource of a display hosting the processor includes:
acquiring a current refresh rate;
determining the reference duration according to the current refresh rate;
and determining the reference time length as a reference refreshing resource of a display carrying the processor.
Optionally, the adjusting the operating frequency of the processor according to the actual duration and the refresh duration includes:
maintaining the operating frequency of the processor if the actual duration is equal to the refresh duration;
under the condition that the actual duration is greater than the refreshing duration, improving the operating frequency of the processor;
and reducing the running frequency of the processor under the condition that the actual time length is less than the refreshing time length.
Optionally, the historical consumed resource is an actual duration for the processor to continuously render the preset number of image frames in the history, the reference refresh resource is a reference duration for the display to refresh one frame of image, and the adjusting the operating frequency of the processor according to the historical consumed resource and the reference refresh resource includes:
determining a target frame number according to the actual time length and the reference time length;
under the condition that the target frame number is greater than a first frame number and less than a second frame number, maintaining the running frequency of the processor, wherein the first frame number is less than the second frame number;
reducing the operating frequency of the processor under the condition that the target frame number is less than or equal to the first frame number;
and under the condition that the target frame number is greater than or equal to the second frame number, increasing the operating frequency of the processor.
According to a second aspect of the embodiments of the present disclosure, there is provided an operating frequency adjusting apparatus for a processor, including:
a first determination module configured to determine historical consumption resources of a processor, the historical consumption resources being used to characterize resources required by the processor to render a preset number of image frames;
a second determining module configured to determine a reference refresh resource of a display on which the processor is mounted, the reference refresh resource being used for representing a resource required by the display to refresh one frame of image;
an adjusting module configured to adjust the operating frequency of the processor according to the historical consumed resources and the reference refresh resources.
Optionally, the historical consumed resource is an actual duration for the processor to historically and continuously render the preset number of image frames, the reference refresh resource is a reference duration for the display to refresh one frame of image, and the adjusting module includes:
a first determining submodule configured to determine a refresh time period for refreshing the preset number of image frames by the display according to the reference time period and the preset number of image frames;
and the first adjusting submodule is configured to adjust the operating frequency of the processor according to the actual time length and the refreshing time length.
Optionally, the first adjusting submodule is specifically configured to maintain the operating frequency of the processor if the actual time length is equal to the refresh time length; under the condition that the actual duration is greater than the refreshing duration, improving the operating frequency of the processor; and reducing the running frequency of the processor under the condition that the actual time length is less than the refreshing time length.
Optionally, the historical consumed resource is an actual duration of the processor that continues the rendering of a preset number of image frames, the reference refresh resource is a reference duration of the display refreshing one frame of image, and the adjusting module includes:
the fourth determining submodule is configured to determine the number of target frames according to the actual time length and the reference time length;
a second adjustment submodule configured to maintain the operating frequency of the processor if the target frame number is greater than a first frame number and less than a second frame number, wherein the first frame number is less than the second frame number;
a third adjustment submodule configured to reduce the operating frequency of the processor if the target frame number is less than or equal to the first frame number;
a fourth adjusting submodule configured to increase the operating frequency of the processor if the target frame number is greater than or equal to the second frame number.
According to a third aspect of the embodiments of the present disclosure, there is provided an operating frequency adjusting apparatus for a processor, including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
determining historical consumption resources of a processor, wherein the historical consumption resources are used for representing resources required by the processor for rendering a preset number of image frames;
determining a reference refreshing resource of a display carrying the processor, wherein the reference refreshing resource is used for representing a resource required by the display for refreshing a frame of image;
and adjusting the running frequency of the processor according to the historical consumption resources and the reference refreshing resources.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium having stored thereon computer program instructions, which when executed by a processor, implement the steps of the operating frequency adjustment method provided by the first aspect of the present disclosure.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: determining historical consumption resources of the processor, wherein the historical consumption resources are used for representing resources required by the processor for rendering a preset number of image frames; determining a reference refreshing resource of a display carrying a processor, wherein the reference refreshing resource is used for representing a resource required by the display for refreshing a frame of image; according to the historical consumed resources and the reference refreshing resources, the requirement of the next moment on the operating frequency of the processor can be predicted, and then the operating frequency of the processor is correspondingly adjusted, so that the problem that the power consumption is increased because the processor still works at a higher operating frequency when the higher operating frequency of the processor is not needed is solved on the premise of ensuring the performance of the display; in addition, whether the operating frequency of the processor is adjusted or not is predicted based on the resources consumed by the processor for rendering the image frame, the purpose of rapidly reducing the operating frequency of the processor can be achieved under the condition that the operating frequency of the processor needs to be reduced, and power consumption is further saved.
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 flowchart illustrating a method of adjusting an operating frequency of a processor according to an example embodiment.
FIG. 2 is a diagram illustrating an adjustment of an operating frequency of a processor in accordance with an exemplary embodiment.
Fig. 3 is a block diagram illustrating an operating frequency adjustment apparatus of a processor according to an exemplary embodiment.
Fig. 4 is a block diagram illustrating an operating frequency adjustment apparatus of a processor 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.
First, it should be noted that the high and low operating frequencies of the processor represent the strength of the processing capability of the processor, and the higher the operating frequency of the processor is, the stronger the processing capability of the processor is. As the background art, because some scenes do not need higher processing capability of the processor, and if the processor continuously operates at a higher operation frequency, a larger power consumption burden is brought to the electronic device, and especially for mobile electronic devices such as smart phones sensitive to power consumption, the power consumption directly affects the electric quantity of the mobile electronic devices, so that how to reduce the power consumption of the mobile electronic devices is particularly important, and correspondingly, how to improve the operation frequency of the electronic devices to meet the requirement of the display refresh rate is also important in order to avoid the situation of picture blocking caused by frame dropping. In the related art, an EAS (Energy Aware Scheduling) scheduler implements adjustment of an operating frequency of a processor based on a load condition of a task, where the task is understood as a thread on the processor, a kernel calculates the task load according to an operating time of the task in the processor, and the task load is not associated with a frame time, so that the calculated task load may be higher and may already be in a light-load interaction scenario, and thus, the operating frequency of the processor may still be in a high-frequency situation under the already light-load interaction scenario, but the light-load interaction scenario does not require the processor to maintain high-frequency operation, and therefore, a method for adjusting the operating frequency of the processor based on the load condition of the task has poor real-time performance and a slow down-frequency reaction problem, which is obviously inapplicable to a mobile electronic device sensitive to power consumption.
In view of this, the embodiments of the present disclosure provide a method and an apparatus for adjusting an operating frequency of a processor, and a storage medium.
Fig. 1 is a flowchart illustrating an operating frequency adjustment method of a processor according to an exemplary embodiment, where as shown in fig. 1, the operating frequency adjustment method of the processor may be used in an electronic device of a mobile terminal such as a smartphone and a tablet computer, and includes the following steps.
In step S101, historical consumption resources of the processor are determined, the historical consumption resources being used to characterize resources required by the processor to render a preset number of image frames.
In some embodiments, the processor may be a central processing unit or an image processor, and this embodiment is not limited herein.
It should be noted that the method for adjusting the operating frequency of the processor may be applied to an interaction scene of the electronic device, for example, a heavy-load interaction scene that requires a higher operating frequency of the processor, such as a game interaction scene, a live broadcast scene, and the like; for example, a light-load interaction scene with low running frequency of the processor, such as a web browsing scene and a chat scene, is needed.
It should be noted that rendering is a process of processing the content of an image frame that needs to be displayed on a display. In some embodiments, the duration of rendering a frame by the processor may be understood as the resource consumed by the processor to render a frame, so the historical consumed resource may be a duration resource, and the historical consumed resource may be the actual duration of continuous rendering of the preset number of image frames by the processor, in which case the historical consumed resource of the processor may be determined by: acquiring the actual time length of a processor for continuously rendering a preset number of image frames historically; the actual time duration is determined as a historical consumption resource of the processor.
Illustratively, taking the preset number of image frames as 5 frames, the 5 frames being 5 frames continuously rendered by the processor, and the durations required by the processor to render each frame being duration 1, duration 2, duration 3, duration 4 and duration 5, respectively, in this case, the sum of duration 1, duration 2, duration 3, duration 4 and duration 5 is the actual duration, and the historical consumption resource is the sum of duration 1, duration 2, duration 3, duration 4 and duration 5.
In step S102, a reference refresh resource of the processor-mounted display is determined, where the reference refresh resource is used to represent a resource required by the display to refresh one frame of image.
In some embodiments, the time duration for the display to refresh display of a frame may be understood as the resource required by the display to refresh an image of a frame, and thus, the reference refresh resource may be a time duration resource, and the reference refresh resource may be a reference time duration for the display to refresh an image of a frame, in which case, the reference refresh resource of the processor-mounted display may be determined by: acquiring a current refresh rate; determining a reference time length according to the current refresh rate; the reference duration is determined as a reference refresh resource for a display on which the processor is mounted.
In some embodiments, the current refresh rate of the display is settable. The current refresh rate of the corresponding display may be determined according to the set value. For example, for a game interaction scenario where a higher refresh rate is needed to avoid game interface stuttering, the current refresh rate of the display may be 60 frames/second, which means that the display of the electronic device may refresh 60 new images within 1 second. Illustratively, the reference refresh duration is 1/60, taking as an example that the current refresh rate of the display is 60 frames/second.
In step S103, the operating frequency of the processor is adjusted according to the historical consumed resources and the reference refresh resources.
It should be noted that the processor and the display work together to realize the display of pictures on the screen of the electronic device. The processor renders the frame pictures, and the display is used for refreshing and displaying the frame pictures rendered by the processor on a screen. Generally, the number of frames that can be refreshed in 1 second of the display (i.e., the refresh rate) is related to the number of frames that can be rendered in 1 second by the processor, and the number of frames that can be rendered in 1 second by the processor is related to its own processing capability, and one of the factors that affect the processing capability of the processor may be the operating frequency of the processor. With a constant display resolution, the higher the refresh rate of the display, the higher the processing power requirements of the processor. For example, for a fixed display resolution, a display refresh rate of 30 frames/second requires a higher processing power of the processor, i.e., a higher frequency of operation of the processor, than a display refresh rate of 50 frames/second. In order to satisfy the UI performance of the electronic device and avoid unnecessary power consumption at the same time, it is necessary to match the operating frequency of the processor with the refresh rate of the display, in other words, if the current refresh rate of the display needs to be reached, it is a precondition that the processor is required to render the number of frames of images that match the refresh rate accordingly, for example, if the current refresh rate is 30 frames/second, the processor is required to render 30 frames of images within 1 second. Thus, the operating frequency of the processor may be adjusted according to the refresh rate and the operating frequency.
Based on the above premise, in some embodiments, the historical consumed resource is an actual duration of the processor for continuously rendering a preset number of image frames historically, and the reference refresh resource is a reference duration of the display refreshing one frame of image, in which case, step S103 may include: determining the refresh time for refreshing the preset number of image frames by the display according to the reference time and the preset number of image frames; and adjusting the running frequency of the processor according to the actual time length and the refreshing time length.
It should be noted that the reference time length is a time length required for the display to refresh one frame of image. According to the preset number of image frames and the reference time length, the time length required by the display to refresh the preset number of image frames can be determined.
Since the actual duration and the refresh duration are the durations required for the processor and the display to process the same number of frames, comparing the actual duration and the refresh duration can determine whether the current operating frequency of the processor matches the refresh frequency of the display. The specific comparison method may be: keeping the running frequency of the processor under the condition that the actual duration is equal to the refreshing duration; under the condition that the actual duration is longer than the refreshing duration, the operating frequency of the processor is improved; and reducing the running frequency of the processor under the condition that the actual time length is less than the refreshing time length. Under the condition that the actual duration is equal to the refreshing duration, the running frequency of the representation processor is matched with the refreshing rate of the display, and the running frequency does not need to be adjusted; under the condition that the actual duration is longer than the refreshing duration, the historical frame load borne by the processor is relatively high, and the running frequency of the processor needs to be improved so as to ensure the UI performance and avoid the conditions of frame dropping and the like; under the condition that the actual duration is less than the refreshing duration, the load of the historical frame borne by the processor is low, the running frequency of the processor can be reduced, and the power consumption of the processor is reduced to the maximum extent. It should be noted that the height of the historical frame load represents the size of the resource that needs to be consumed for rendering the preset number of image frames, and the higher the historical frame load is, the larger the resource that needs to be consumed for rendering the preset number of image frames is.
Through the mode, whether the running frequency of the processor is matched with the frame load born by the processor at present is predicted by comparing the actual time length with the refreshing time length, so that the power consumption generated by the processor is reduced while the UI performance is ensured; in addition, whether the operating frequency of the processor is adjusted or not is predicted based on the resources consumed by the processor for rendering the image frame, the purpose of rapidly reducing the operating frequency of the processor can be achieved under the condition that the operating frequency of the processor needs to be reduced, and power consumption is further saved.
In some embodiments, the historical consumed resource is an actual duration for the processor to continuously render a preset number of image frames, and the reference refresh resource is a reference duration for the display to refresh one frame of image, in which case step S103 may include: determining a target frame number according to the actual time length and the reference time length; under the condition that the target frame number is greater than a first frame number and less than a second frame number, maintaining the operating frequency of the processor, wherein the first frame number is less than the second frame number; reducing the operating frequency of the processor under the condition that the target frame number is less than or equal to the first frame number; and increasing the operating frequency of the processor under the condition that the target frame number is greater than or equal to the second frame number.
It should be noted that the target frame number is used to represent the number of frames in the actual duration that the display can refresh the displayed image frames at the current refresh rate. The target frame number may be calculated by:
sum.frame.history=x*frametime;
the frame is the actual time length, the frame is the reference time length, x is the target frame number, the frame is 1/target _ fps, and the target _ fps is the current refresh rate of the display.
Under the condition that the target frame number is greater than the first frame number and less than the second frame number, the historical frame load of the processor is considered not to be high, and the conditions of frame drop and the like do not occur according to the current refresh rate of the display and the operating frequency of the processor, so the operating frequency of the processor does not need to be adjusted; under the condition that the target frame number is less than or equal to the first frame number, the historical frame load of the processor is considered to be low at the moment, the running frequency of the processor can be reduced at the moment, the processor can meet the current refresh rate with the reduced running frequency, and the situations such as frame dropping and the like cannot occur; when the target frame number is greater than or equal to the second frame number, the historical frame load of the processor is considered to be higher, and the processor is required to have faster processing capacity to achieve the current refresh rate of the display without frame dropping, so that the operating frequency of the processor can be correspondingly improved.
In some embodiments, the first frame number and the second frame number may be set according to an actual situation, and this embodiment is not described herein again.
In some embodiments, the operating frequency of the processor may be set in different steps, and the operating frequency corresponding to each step is different, so that the operating frequency is reduced or increased according to the operating frequency of the different steps. Illustratively, the operating frequency of the processor is set to three levels, which are a1, a2 and A3, wherein the magnitude relation of the operating frequency corresponding to a1, a2 and A3 is: a1> A2> A3, and when the current operating frequency of the processor is the operating frequency corresponding to A2 and the operating frequency of the processor is determined to be reduced, the operating frequency of the processor can be reduced to the operating frequency corresponding to A1; in the case where the current operating frequency of the processor is the operating frequency corresponding to a2 and it is determined to increase the operating frequency of the processor, the operating frequency of the processor may be increased to the operating frequency corresponding to A3.
FIG. 2 is a diagram illustrating an adjustment of an operating frequency of a processor in accordance with an exemplary embodiment. Referring to FIG. 2, in FIG. 2, frame time is the reference duration, target _ fps is the current refresh rate of the display, 4.95 is the first frame number, and 5.31 is the second frame number. The historical frame sequence is that each historical frame rendered by the processor is respectively a serial number 3, a serial number 4, a serial number 7, a serial number 1 and a serial number 6, the historical preset number of image frames is 5 frames which are respectively a serial number 3, a serial number 4, a serial number 7, a serial number 1 and a serial number 6, wherein the serial number 6 can be understood as a frame currently being rendered by the processor, and when the processor processes the image frame of the serial number 6, the actual duration of the frames rendered by the processor including the serial number 6 and the total 5 frames of the serial number 3, the serial number 4, the serial number 7 and the serial number 1 is determined. According to fig. 2, in the case that the ratio of the actual duration to the reference duration is less than or equal to 4.95, the operating frequency of the processor is reduced; under the condition that the ratio of the actual duration to the reference duration is greater than or equal to 5.31, improving the operating frequency of the processor; and keeping the running frequency of the processor unchanged under the condition that the ratio of the actual time length to the reference time length is greater than 4.95 and less than 5.31.
By the method, compared with a comparison method of using the actual time and the refreshing time, the setting of the first frame number and the second frame number can be more refined, so that whether the operating frequency of the processor is adjusted or not can be accurately judged by calculating the target frame number and comparing the target frame number with the first frame number and the second frame number, and the power consumption of the device is saved on the premise of ensuring the UI performance to the maximum extent.
Fig. 3 is a block diagram illustrating an operating frequency adjustment apparatus of a processor according to an exemplary embodiment. Referring to fig. 3, the operating frequency adjusting apparatus includes a first determining module 301, a second determining module 302, and an adjusting module 303.
The first determination module 301 is configured to determine historical consumption resources of a processor, the historical consumption resources being used for characterizing resources required by the processor to render a preset number of image frames;
the second determining module 302 is configured to determine a reference refresh resource of a display on which the processor is mounted, the reference refresh resource being used for representing a resource required by the display to refresh a frame of image;
the adjusting module 303 is configured to adjust the operating frequency of the processor according to the historical consumed resources and the baseline refresh resources.
Optionally, the historical consumed resource is an actual duration for the processor to historically and continuously render the preset number of image frames, the reference refresh resource is a reference duration for the display to refresh one frame of image, and the adjusting module includes:
a first determining submodule configured to determine a refresh time period for refreshing the preset number of image frames by the display according to the reference time period and the preset number of image frames;
and the first adjusting submodule is configured to adjust the operating frequency of the processor according to the actual time length and the refreshing time length.
Optionally, the second determining module 302 includes:
a first obtaining submodule configured to obtain a current refresh rate;
a second determining submodule configured to determine the reference refresh duration according to the current refresh rate;
a third determination submodule configured to determine the reference refresh duration as a reference refresh resource of a display on which the processor is mounted.
Optionally, the first adjusting submodule is specifically configured to maintain the operating frequency of the processor if the actual time length is equal to the refresh time length; under the condition that the actual duration is greater than the refreshing duration, improving the operating frequency of the processor; and reducing the running frequency of the processor under the condition that the actual time length is less than the refreshing time length.
Optionally, the historical consumed resource is an actual duration of the processor that is historically and continuously rendering a preset number of image frames, the reference refresh resource is a reference duration of the display refreshing one frame of image, and the adjusting module includes:
the fourth determining submodule is configured to determine the number of target frames according to the actual time length and the reference time length;
a second adjustment submodule configured to maintain the operating frequency of the processor if the target frame number is greater than a first frame number and less than a second frame number, wherein the first frame number is less than the second frame number;
a third adjustment submodule configured to reduce the operating frequency of the processor if the target frame number is less than or equal to the first frame number;
a fourth adjusting submodule configured to increase the operating frequency of the processor if the target frame number is greater than or equal to the second frame number.
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.
The present disclosure also provides a computer readable storage medium having stored thereon computer program instructions, which when executed by a processor, implement the steps of the operating frequency adjustment method of the processor provided by the present disclosure.
Fig. 4 is a block diagram illustrating an operating frequency adjustment apparatus 400 of a processor according to an example embodiment. For example, the apparatus 400 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. 4, the apparatus 400 may include one or more of the following components: a processing component 402, a memory 404, a power component 406, a multimedia component 408, an audio component 410, an interface for input/output (I/O) 412, a sensor component 414, and a communication component 416.
The processing component 402 generally controls overall operation of the apparatus 400, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 402 may include one or more processors 420 to execute instructions to perform all or part of the steps of the operating frequency adjustment method of the processor described above. Further, the processing component 402 can include one or more modules that facilitate interaction between the processing component 402 and other components. For example, the processing component 402 may include a multimedia module to facilitate interaction between the multimedia component 408 and the processing component 402.
The memory 404 is configured to store various types of data to support operations at the apparatus 400. Examples of such data include instructions for any application or method operating on the device 400, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 404 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 components 406 provide power to the various components of device 400. Power components 406 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for apparatus 400.
The multimedia component 408 includes a screen that provides an output interface between the device 400 and the 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 408 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the apparatus 400 is in an operation mode, such as a photographing 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 410 is configured to output and/or input audio signals. For example, audio component 410 includes a Microphone (MIC) configured to receive external audio signals when apparatus 400 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 404 or transmitted via the communication component 416. In some embodiments, audio component 410 also includes a speaker for outputting audio signals.
The I/O interface 412 provides an interface between the processing component 402 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 component 414 includes one or more sensors for providing various aspects of state assessment for the apparatus 400. For example, the sensor assembly 414 may detect an open/closed state of the apparatus 400, the relative positioning of the components, such as a display and keypad of the apparatus 400, the sensor assembly 414 may also detect a change in the position of the apparatus 400 or a component of the apparatus 400, the presence or absence of user contact with the apparatus 400, orientation or acceleration/deceleration of the apparatus 400, and a change in the temperature of the apparatus 400. The sensor assembly 414 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 414 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 414 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 416 is configured to facilitate wired or wireless communication between the apparatus 400 and other devices. The apparatus 400 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 416 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 416 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 400 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 operating frequency adjustment method of the above-described processors.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 404 comprising instructions, executable by the processor 420 of the apparatus 400 to perform the processor's operating frequency adjustment 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.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure. 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 (11)

1. A method for adjusting operating frequency of a processor, comprising:
determining historical consumption resources of a processor, wherein the historical consumption resources are used for representing resources required by the processor for rendering a preset number of image frames;
determining a reference refreshing resource of a display carrying the processor, wherein the reference refreshing resource is used for representing a resource required by the display for refreshing a frame of image;
and adjusting the running frequency of the processor according to the historical consumed resources and the reference refreshing resources.
2. The method according to claim 1, wherein the historical resource consumption is an actual duration of time for which the processor has historically and continuously rendered the preset number of image frames, the reference refresh resource is a reference duration of time for which the display has refreshed one frame of image, and the adjusting the operating frequency of the processor according to the historical resource consumption and the reference refresh resource comprises:
determining the refreshing time length for refreshing the preset number of image frames by the display according to the reference time length and the preset number of image frames;
and adjusting the running frequency of the processor according to the actual time length and the refreshing time length.
3. The method of claim 2, wherein determining a baseline refresh resource for a display hosting the processor comprises:
acquiring a current refresh rate;
determining the reference duration according to the current refresh rate;
and determining the reference time length as a reference refreshing resource of a display carrying the processor.
4. The method according to claim 2, wherein the adjusting the operating frequency of the processor according to the actual duration and the refresh duration comprises:
maintaining the operating frequency of the processor if the actual duration is equal to the refresh duration;
under the condition that the actual duration is greater than the refreshing duration, improving the operating frequency of the processor;
and reducing the running frequency of the processor under the condition that the actual time length is less than the refreshing time length.
5. The method according to claim 1, wherein the historical resource consumption is an actual duration of the processor that is historically and continuously rendering a preset number of image frames, the reference refresh resource is a reference duration of the display refreshing one image frame, and the adjusting the operating frequency of the processor according to the historical resource consumption and the reference refresh resource comprises:
determining a target frame number according to the actual time length and the reference time length;
under the condition that the target frame number is greater than a first frame number and less than a second frame number, maintaining the running frequency of the processor, wherein the first frame number is less than the second frame number;
reducing the operating frequency of the processor under the condition that the target frame number is less than or equal to the first frame number;
and under the condition that the target frame number is greater than or equal to the second frame number, increasing the operating frequency of the processor.
6. An apparatus for adjusting an operating frequency of a processor, comprising:
a first determination module configured to determine historical consumption resources of a processor, the historical consumption resources being used to characterize resources required by the processor to render a preset number of image frames;
a second determining module configured to determine a reference refresh resource of a display on which the processor is mounted, wherein the reference refresh resource is used for representing a resource required by the display to refresh a frame of image;
an adjusting module configured to adjust the operating frequency of the processor according to the historical consumed resources and the reference refresh resources.
7. The operating frequency adjustment apparatus according to claim 6, wherein the historical consumption resource is an actual duration of time for which the processor has historically and continuously rendered the preset number of image frames, and the reference refresh resource is a reference duration of time for which the display has refreshed one frame of image, and the adjustment module comprises:
a first determining submodule configured to determine a refresh time period for refreshing the preset number of image frames by the display according to the reference time period and the preset number of image frames;
and the first adjusting submodule is configured to adjust the operating frequency of the processor according to the actual time length and the refreshing time length.
8. The operating frequency adjustment apparatus according to claim 7, wherein the first adjustment submodule is specifically configured to maintain the operating frequency of the processor in a case where the actual time length is equal to the refresh time length; under the condition that the actual duration is greater than the refreshing duration, improving the operating frequency of the processor; and reducing the running frequency of the processor under the condition that the actual time length is less than the refreshing time length.
9. The operating frequency adjustment apparatus according to claim 7, wherein the historical consumption resource is an actual duration of time for which the processor has historically rendered a preset number of image frames, and the reference refresh resource is a reference duration of time for which the display has refreshed one frame of image, and the adjustment module comprises:
the fourth determining submodule is configured to determine the number of target frames according to the actual time length and the reference time length;
a second adjustment submodule configured to maintain the operating frequency of the processor if the target frame number is greater than a first frame number and less than a second frame number, wherein the first frame number is less than the second frame number;
a third adjustment submodule configured to reduce the operating frequency of the processor if the target frame number is less than or equal to the first frame number;
a fourth adjusting submodule configured to increase the operating frequency of the processor if the target frame number is greater than or equal to the second frame number.
10. An apparatus for adjusting an operating frequency of a processor, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
determining historical consumption resources of a processor, wherein the historical consumption resources are used for representing resources required by the processor for rendering a preset number of image frames;
determining a reference refreshing resource of a display carrying the processor, wherein the reference refreshing resource is used for representing a resource required by the display for refreshing a frame of image;
and adjusting the running frequency of the processor according to the historical consumption resources and the reference refreshing resources.
11. A computer-readable storage medium, on which computer program instructions are stored, which program instructions, when executed by a processor, carry out the steps of the operating frequency adjustment method according to any one of claims 1 to 5.
CN202210122895.0A 2022-02-09 2022-02-09 Method and device for adjusting operating frequency of processor and storage medium Pending CN114442792A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210122895.0A CN114442792A (en) 2022-02-09 2022-02-09 Method and device for adjusting operating frequency of processor and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210122895.0A CN114442792A (en) 2022-02-09 2022-02-09 Method and device for adjusting operating frequency of processor and storage medium

Publications (1)

Publication Number Publication Date
CN114442792A true CN114442792A (en) 2022-05-06

Family

ID=81372275

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210122895.0A Pending CN114442792A (en) 2022-02-09 2022-02-09 Method and device for adjusting operating frequency of processor and storage medium

Country Status (1)

Country Link
CN (1) CN114442792A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116737357A (en) * 2022-09-28 2023-09-12 荣耀终端有限公司 Method and device for adjusting processor frequency

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080055318A1 (en) * 2006-08-31 2008-03-06 Glen David I J Dynamic frame rate adjustment
CN104424156A (en) * 2013-09-09 2015-03-18 中兴通讯股份有限公司 Core processing method and device of processor and terminal
CN104460934A (en) * 2013-09-13 2015-03-25 华为终端有限公司 Scheduling method and device for multi central processing units (CPU)
US20150189126A1 (en) * 2014-01-02 2015-07-02 Nvidia Corporation Controlling content frame rate based on refresh rate of a display
CN105094272A (en) * 2014-05-14 2015-11-25 中兴通讯股份有限公司 Regulating method and regulating device for hardware refresh rate of terminal
CN106020990A (en) * 2016-06-30 2016-10-12 宇龙计算机通信科技(深圳)有限公司 Control method for central processing unit and terminal equipment
CN106933327A (en) * 2017-03-10 2017-07-07 广东欧珀移动通信有限公司 A kind of control method of mobile terminal frame per second, device and mobile terminal
CN108509016A (en) * 2016-05-31 2018-09-07 广东欧珀移动通信有限公司 Control the method and device and related media production of CPU power consumption
CN108600668A (en) * 2018-03-27 2018-09-28 维沃移动通信有限公司 A kind of record screen frame per second method of adjustment and mobile terminal
CN109417564A (en) * 2016-07-22 2019-03-01 英特尔公司 Technology for load of being assigned the job based on the utilization of resources stage
CN109426456A (en) * 2017-08-30 2019-03-05 英特尔公司 For providing the technology of shared memory for accelerator plate
CN110681155A (en) * 2019-09-29 2020-01-14 Oppo广东移动通信有限公司 Game optimization method, game optimization device and mobile terminal
EP3786935A1 (en) * 2019-08-28 2021-03-03 Beijing Xiaomi Mobile Software Co., Ltd. Method for controlling frame refresh rate of screen, device and storage medium
CN112516590A (en) * 2019-09-19 2021-03-19 华为技术有限公司 Frame rate identification method and electronic equipment

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080055318A1 (en) * 2006-08-31 2008-03-06 Glen David I J Dynamic frame rate adjustment
CN104424156A (en) * 2013-09-09 2015-03-18 中兴通讯股份有限公司 Core processing method and device of processor and terminal
CN104460934A (en) * 2013-09-13 2015-03-25 华为终端有限公司 Scheduling method and device for multi central processing units (CPU)
US20150189126A1 (en) * 2014-01-02 2015-07-02 Nvidia Corporation Controlling content frame rate based on refresh rate of a display
CN105094272A (en) * 2014-05-14 2015-11-25 中兴通讯股份有限公司 Regulating method and regulating device for hardware refresh rate of terminal
CN108509016A (en) * 2016-05-31 2018-09-07 广东欧珀移动通信有限公司 Control the method and device and related media production of CPU power consumption
CN106020990A (en) * 2016-06-30 2016-10-12 宇龙计算机通信科技(深圳)有限公司 Control method for central processing unit and terminal equipment
CN109417564A (en) * 2016-07-22 2019-03-01 英特尔公司 Technology for load of being assigned the job based on the utilization of resources stage
CN106933327A (en) * 2017-03-10 2017-07-07 广东欧珀移动通信有限公司 A kind of control method of mobile terminal frame per second, device and mobile terminal
CN109426456A (en) * 2017-08-30 2019-03-05 英特尔公司 For providing the technology of shared memory for accelerator plate
CN108600668A (en) * 2018-03-27 2018-09-28 维沃移动通信有限公司 A kind of record screen frame per second method of adjustment and mobile terminal
EP3786935A1 (en) * 2019-08-28 2021-03-03 Beijing Xiaomi Mobile Software Co., Ltd. Method for controlling frame refresh rate of screen, device and storage medium
CN112445315A (en) * 2019-08-28 2021-03-05 北京小米移动软件有限公司 Control method and device for screen refresh frame rate and storage medium
CN112516590A (en) * 2019-09-19 2021-03-19 华为技术有限公司 Frame rate identification method and electronic equipment
CN110681155A (en) * 2019-09-29 2020-01-14 Oppo广东移动通信有限公司 Game optimization method, game optimization device and mobile terminal

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116737357A (en) * 2022-09-28 2023-09-12 荣耀终端有限公司 Method and device for adjusting processor frequency

Similar Documents

Publication Publication Date Title
EP3306441A1 (en) Temperature control method and apparatus
CN107040591B (en) Method and device for controlling client
CN108200279B (en) Backlight adjusting method, device and equipment
CN107480785B (en) Convolutional neural network training method and device
CN114442792A (en) Method and device for adjusting operating frequency of processor and storage medium
CN110637502B (en) Data processing method and device, electronic equipment and computer readable storage medium
US20170220401A1 (en) Method, device, and computer-readable storage medium for calling a process
CN111261081B (en) Screen display method and device
CN107203315B (en) Click event processing method and device and terminal
CN112331158B (en) Terminal display adjusting method, device, equipment and storage medium
CN112866612B (en) Frame insertion method, device, terminal and computer readable storage medium
CN108874482B (en) Image processing method and device
CN109417463B (en) Method and device for determining PUCCH needing transmission
CN107360315B (en) Information display method and device
CN112187326A (en) Antenna control method, device, equipment and storage medium
CN112019680A (en) Screen brightness adjusting method and device
CN111538447A (en) Information display method, device, equipment and storage medium
CN112449409B (en) Power control method of mobile terminal and power control device of mobile terminal
CN111261035B (en) Screen display method and device
CN111107624B (en) Negative one-screen synchronization method, negative one-screen synchronization device and electronic equipment
US11635468B2 (en) Method, apparatus and storage medium for determining charging time length of battery
CN112074005B (en) Power consumption control method and device
CN106910472B (en) Control method and device for adjusting backlight
CN107027110B (en) Flow control method and device
CN115934012A (en) Screen refresh rate adjusting method and device, mobile 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