CN-122019169-A - Operating frequency control method, operating frequency control device, electronic device, storage medium, and program product
Abstract
The application discloses a method and a device for controlling working frequency, electronic equipment, a storage medium and a program product, and belongs to the technical field of electronics. The method comprises the steps of lifting the working frequency of a CPU processing a frame drawing task under the condition that frame loss occurs in a first time window in the process of processing the frame drawing task through a CPU, determining a first value, reducing the first value by a first preset value under the condition that frame loss does not occur in a second time window to obtain a second value, and maintaining the working frequency of the CPU processing the frame drawing task under the condition that the second value is larger than the second preset value.
Inventors
- LIN CHAOYANG
Assignees
- 维沃移动通信有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260130
Claims (12)
- 1. A method of controlling an operating frequency, comprising: In the process of processing a frame drawing task through a CPU, under the condition that frame loss occurs in a first time window, the working frequency of the CPU for processing the frame drawing task is increased, and a first numerical value is determined; Under the condition that frame loss does not occur in the second time window, reducing the first value by a first preset value to obtain a second value; And maintaining the working frequency of the CPU for processing the frame drawing task under the condition that the second value is larger than a second preset value.
- 2. The method according to claim 1, wherein in the case of frame loss occurring in the first time window during the processing of the frame drawing task by the CPU, the step of raising the operating frequency of the CPU that processes the frame drawing task and determining the first value includes: In the process of processing the frame drawing task through the first CPU, under the condition that frame loss occurs in a first time window, processing the frame drawing task through the second CPU, and determining a first numerical value; wherein the working frequency of the second CPU is higher than the working frequency of the first CPU.
- 3. The method of claim 1, wherein the reducing the first value by a first preset value to obtain a second value in the case that no frame loss occurs in the second time window, the method further comprises: and reducing the working frequency of the CPU for processing the frame drawing task under the condition that the second numerical value is smaller than or equal to the second preset value.
- 4. A method according to claim 3, wherein after said reducing the operating frequency of the CPU processing the frame drawing task, the method further comprises: Under the condition that frame loss occurs in a fourth time window, the working frequency of the CPU for processing the frame drawing task is increased, and the second numerical value is increased to obtain a third numerical value; Wherein the third value is used to determine whether to maintain the operating frequency of the CPU that processes the frame drawing task.
- 5. The method of claim 4, wherein said incrementing said second value to obtain a third value comprises: when the number of time windows in which frame loss occurs between the second time window and the fourth time window is smaller than or equal to a third preset value, the second numerical value is regulated to obtain a third numerical value, and the difference value between the second numerical value and the third numerical value is a first difference value; When the number of time windows in which frame loss occurs between the second time window and the fourth time window is larger than a third preset value, the second numerical value is regulated to obtain a third numerical value, and the difference value between the second numerical value and the third numerical value is a second difference value; wherein the first difference is less than the second difference.
- 6. The operating frequency control device is characterized by comprising a processing module; The processing module is used for improving the working frequency of a CPU for processing the frame drawing task and determining a first numerical value under the condition that frame loss occurs in a first time window in the process of processing the frame drawing task through a CPU; the processing module is further configured to reduce the first value by a first preset value to obtain a second value when no frame loss occurs in the second time window; and the processing module is further used for maintaining the working frequency of the CPU for processing the frame drawing task under the condition that the second numerical value is larger than a second preset value.
- 7. The apparatus according to claim 6, wherein the processing module is specifically configured to process the frame drawing task by the second CPU and determine a first value in a case where a frame loss occurs within a first time window during the processing of the frame drawing task by the first CPU; wherein the working frequency of the second CPU is higher than the working frequency of the first CPU.
- 8. The apparatus of claim 6, wherein the processing module is further configured to reduce the first value by a first preset value if no frame loss occurs in a second time window, and to reduce the operating frequency of the CPU that processes the frame drawing task if the second value is less than or equal to the second preset value after the second value is obtained.
- 9. The apparatus of claim 8, wherein the processing module is further configured to increase the operating frequency of the CPU that processes the frame drawing task and increase the second value to obtain a third value if a frame loss occurs in a fourth time window after decreasing the operating frequency of the CPU that processes the frame drawing task; Wherein the third value is used to determine whether to maintain the operating frequency of the CPU that processes the frame drawing task.
- 10. The apparatus according to claim 9, wherein the processing module is specifically configured to: when the number of time windows in which frame loss occurs between the second time window and the fourth time window is smaller than or equal to a third preset value, the second numerical value is regulated to obtain a third numerical value, and the difference value between the second numerical value and the third numerical value is a first difference value; When the number of time windows in which frame loss occurs between the second time window and the fourth time window is larger than a third preset value, the second numerical value is regulated to obtain a third numerical value, and the difference value between the second numerical value and the third numerical value is a second difference value; wherein the first difference is less than the second difference.
- 11. An electronic device comprising a processor and a memory storing a program or instructions executable on the processor, which when executed by the processor, implement the steps of the operating frequency control method of any one of claims 1 to 5.
- 12. A readable storage medium, characterized in that the readable storage medium has stored thereon a program or instructions which, when executed by a processor, implement the steps of the operating frequency control method according to any one of claims 1 to 5.
Description
Operating frequency control method, operating frequency control device, electronic device, storage medium, and program product Technical Field The application belongs to the technical field of electronics, and particularly relates to a method and a device for controlling working frequency, electronic equipment, a storage medium and a program product. Background With the development of technology, the smoothness requirement of users on application pictures is increasingly improved, and the smoothness of application pictures is directly affected by the frame rate of applications, so that the frame loss of pictures becomes one of the core problems affecting the user experience. To solve this problem, in the prior art, after detecting a frame loss, the frequency of the central processing unit (Central Processing Unit, CPU) is raised to cope with the frame loss, and when no frame is lost in a time window, the operating frequency of the CPU is reduced to save power consumption. However, in the load fluctuation scenario, after the working frequency of the CPU is reduced because no frame is lost in a time window, frame loss may be caused again due to a new high load, so that the frame rate is unstable, the smoothness of the picture is reduced, and additional power consumption overhead is caused by frequent frequency-up and down operations. Therefore, how to avoid frequent frequency up-down operation is a urgent problem to be solved. Disclosure of Invention An object of an embodiment of the present application is to provide a method, an apparatus, an electronic device, a storage medium, and a program product for controlling a working frequency, which can avoid frequent frequency up-down operations. In a first aspect, an embodiment of the present application provides a method for controlling a working frequency, where in a process of processing a frame drawing task by a CPU, the method includes, in a case where a frame loss occurs in a first time window, lifting the working frequency of the CPU processing the frame drawing task, determining a first value, in a case where a frame loss does not occur in a second time window, reducing the first value by a first preset value to obtain a second value, and in a case where the second value is greater than the second preset value, maintaining the working frequency of the CPU processing the frame drawing task. In a second aspect, an embodiment of the present application provides an operating frequency control apparatus, where the operating frequency control apparatus includes a processing module. The processing module is used for improving the working frequency of the CPU for processing the frame drawing task and determining a first numerical value under the condition that frame loss occurs in a first time window in the process of processing the frame drawing task through the CPU. The processing module is further configured to reduce the first value by a first preset value to obtain a second value when no frame loss occurs in the second time window. The processing module is further configured to maintain a working frequency of the CPU that processes the frame drawing task if the second value is greater than a second preset value. In a third aspect, an embodiment of the present application provides an electronic device comprising a processor and a memory storing a program or instructions executable on the processor, which when executed by the processor, implement the steps of the method as described in the first aspect. In a fourth aspect, embodiments of the present application provide a readable storage medium having stored thereon a program or instructions which when executed by a processor perform the steps of the method according to the first aspect. In a fifth aspect, an embodiment of the present application provides a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and where the processor is configured to execute a program or instructions to implement a method according to the first aspect. In a sixth aspect, embodiments of the present application provide a computer program product stored in a storage medium, the program product being executable by at least one processor to implement the method according to the first aspect. In the embodiment of the application, the working frequency of the CPU for processing the frame drawing task can be increased under the condition that the frame loss occurs in the first time window during the process of processing the frame drawing task by the CPU, the first numerical value is determined, then the first numerical value is reduced by a first preset value under the condition that the frame loss does not occur in the second time window, a second numerical value is obtained, and the working frequency of the CPU for processing the frame drawing task is maintained under the condition that the second numerical value is larger than the second preset value