Working frequency adjustment method and device, electronic equipment and readable storage medium
By calculating the current frequency enhancement coefficient of the processor cluster and adjusting the working frequency, the problem of how to ensure performance without affecting the battery life of the electronic device in the frequency extraction scenario is solved, and the optimal balance between processor performance and energy efficiency is achieved.
Patent Information
- Application Number
- CN202510064506.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-15
- Publication Date
- 2025-05-23
AI Technical Summary
In the frequency extraction scenario, how to ensure the performance of the processor cluster without affecting the battery life of the electronic device?
By obtaining the current idle rate, current load parameter value, target idle rate and historical frequency enhancement coefficient of the processor cluster, calculate the current frequency enhancement coefficient, and adjust the operating frequency of the processor cluster based on the coefficient and load parameter value to achieve optimal performance and energy efficiency balance.
In the frequency extraction scenario, the performance and energy efficiency of the processor are optimized, and the performance deficiency caused by waste of power consumption caused by too high frequency or too low frequency is achieved. This not only ensures performance, but also does not affect the battery life of electronic devices.
Smart Images

Figure CN120029435A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of electronic equipment, and specifically relates to a method and device for adjusting an operating frequency, an electronic device, and a readable storage medium. Background Art
[0002] As smartphones continue to evolve, applications are increasingly demanding performance, leading to a surge in demand for processor cluster operating frequency increases to improve user experience. However, while this frequency increase behavior meets performance requirements, it also significantly affects the battery life of the phone.
[0003] Therefore, how to ensure performance while not affecting the battery life of electronic devices in the frequency increase scenario has become an urgent problem to be solved. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a method, device, electronic device and readable storage medium for adjusting the operating frequency, which can not only ensure the performance but also not affect the battery life of the electronic device in the frequency increase scenario.
[0005] In a first aspect, an embodiment of the present application provides a method for adjusting an operating frequency, the method comprising:
[0006] Get the current idle rate, current load parameter value, target idle rate and historical frequency boost factor of the processor cluster;
[0007] The historical frequency boost coefficient is a coefficient for performing a historical frequency boost operation on the processor cluster; the current frequency boost coefficient is determined according to the current idle rate, the target idle rate and the historical frequency boost coefficient;
[0008] Adjust the operating frequency of the processor cluster according to the current frequency boost factor and the current load parameter value.
[0009] In a second aspect, an embodiment of the present application provides a device for adjusting a working frequency, the device comprising:
[0010] An acquisition module is used to acquire the current idle rate, current load parameter value, target idle rate and historical frequency boost coefficient of the processor cluster; the historical frequency boost coefficient is a coefficient when the processor cluster performs a historical frequency boost operation;
[0011] A determination module, used to determine a current frequency boost coefficient according to a current idle rate, a target idle rate and a historical frequency boost coefficient;
[0012] The adjustment module is used to adjust the operating frequency of the processor cluster according to the current frequency boost coefficient and the current load parameter value.
[0013] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.
[0014] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0015] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.
[0016] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the first aspect.
[0017] In an embodiment of the present application, the current idle rate, current load parameter value, target idle rate and historical frequency boost coefficient of the processor cluster are obtained, and the current frequency boost coefficient is determined according to the current idle rate, target idle rate and historical frequency boost coefficient. The historical frequency boost coefficient is the coefficient when the processor cluster performs a historical frequency boost operation. In this way, according to the difference between the current idle rate and the target idle rate, combined with the historical frequency boost coefficient, the current frequency boost coefficient can be determined according to the actual load of the processor to achieve the best performance balance. The operating frequency of the processor cluster is adjusted according to the current frequency boost coefficient and the current load parameter value, and the performance and energy efficiency of the processor can be optimized according to the actual load requirements, avoiding power consumption waste caused by too high a frequency or insufficient performance caused by too low a frequency, which not only ensures performance, but also does not affect the battery life of the electronic device. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 is a flow chart of a working frequency adjustment method provided in an embodiment of the present application;
[0019] Figure 2 is a schematic diagram of a processor cluster provided in an embodiment of the present application;
[0020] Figure 3 is a schematic diagram of a processor frequency provided in an embodiment of the present application;
[0021] Figure 4 is a structural diagram of a working frequency adjustment device provided in an embodiment of the present application;
[0022] Figure 5It is one of the hardware structure diagrams of the electronic device according to the embodiment of the present application;
[0023] Figure 6 This is the second schematic diagram of the hardware structure of the electronic device according to the embodiment of the present application. DETAILED DESCRIPTION
[0024] The following will be combined with the drawings of the embodiments of the present application to clearly describe the technical solutions of the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present application belong to the scope of protection of this application.
[0025] The terms "first", "second", etc. in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0026] In response to the problems arising from related technologies, the embodiments of the present application provide a method, device, electronic device and readable storage medium for adjusting an operating frequency, which can not only ensure performance but also not affect the battery life of the electronic device in a frequency increase scenario.
[0027] The operating frequency adjustment method provided in the embodiment of the present application is described in detail below through specific embodiments and application scenarios in conjunction with the accompanying drawings.
[0028] The technical terms involved in the embodiments of the present application are explained below:
[0029] Boost frequency, that is, frequency increase, refers to a strategy in the CPU frequency regulation algorithm, that is, before detecting that performance demand is about to arrive, performance demand such as user operation, the CPU frequency is increased to a higher level in advance to ensure that the system can respond quickly and maintain smoothness, aiming to avoid freezes or delays at peak performance demand, thereby improving the user experience.
[0030] How Boost frequency works: By monitoring the current CPU load, user operations, etc., it predicts upcoming performance needs. Once a performance need is predicted, the system will immediately increase the CPU frequency to a preset higher value (Boost frequency), rather than waiting until the load increases and then gradually increasing the frequency. During performance needs, the CPU runs at a higher frequency to ensure that the system can respond quickly to user operations and avoid lags. Once the performance need ends, the system will restore the CPU frequency to normal levels to save power and extend battery life.
[0031] By increasing the frequency in advance, you can significantly reduce the delay and lag during user operations and improve fluency. Be prepared before high-load tasks arrive to ensure that the system can respond quickly.
[0032] However, higher CPU frequencies consume more power and may reduce battery life. High frequency operation increases CPU heat and may require a better cooling system to maintain stable operation.
[0033] Boost frequency will appear in the following application scenarios:
[0034] When launching a game or performing complex operations, the CPU frequency is increased in advance to ensure a smooth gaming experience. When switching applications or performing multitasking, the CPU frequency is increased in advance to ensure that the system can respond quickly.
[0035] Therefore, Boost frequency is a strategy to optimize performance and user experience by increasing the CPU frequency in advance, which is especially suitable for application scenarios that require fast response and high performance.
[0036] Cluster: refers to a cluster of CPUs. Multiple physical CPUs are combined to form a processor cluster, that is, the processor cluster includes multiple processors. The multiple processors included in the processor cluster share the same frequency and voltage, but each CPU in the processor cluster can enter the idle state and working state independently.
[0037] Idle rate: refers to the proportion of CPU being idle over a period of time.
[0038] Figure 1 A flowchart of a method for adjusting operating frequency provided in an embodiment of the present application.
[0039] like Figure 1 As shown, the working frequency adjustment method may include steps 110 to 130, and the method is applied to the working frequency adjustment device, as shown below:
[0040] Step 110, obtaining a current idle rate, a current load parameter value, a target idle rate, and a historical frequency boost coefficient of the processor cluster; the historical frequency boost coefficient is a coefficient when a historical frequency boost operation is performed on the processor cluster;
[0041] Current idle rate: The ratio of the time that the processor cluster is currently idle to the total time. The current idle rate is used to evaluate the utilization of the processor cluster and help determine whether the operating frequency needs to be adjusted to improve performance or reduce power consumption.
[0042] Current load parameter value: The current load of the processor cluster, usually expressed in parameters such as CPU usage and task queue length. The current load parameter value is used to evaluate the current workload of the processor cluster and help determine whether the operating frequency needs to be adjusted to match the load requirements.
[0043] Target idle rate: The target idle rate of the processor cluster, that is, the proportion of time that the processor cluster is expected to be idle under ideal conditions. It is used to set the performance and power consumption balance point of the processor cluster, helping to maintain optimal performance and energy efficiency under different load conditions.
[0044] Historical frequency boost coefficient: The coefficient used when the processor cluster performs historical frequency boost operations, reflecting the frequency boost of the processor cluster in the past period of time. The frequency boost operation refers to increasing the operating frequency of the processor cluster to a higher level to improve the performance of the processor.
[0045] The historical frequency boost factor is used to help the system determine the current frequency boost factor, thereby adjusting the operating frequency of the processor cluster.
[0046] The frequency boost factor is a numerical value that indicates the ratio by which the operating frequency of the processor cluster should be increased. It is a relative value that indicates the increase relative to the current operating frequency. The frequency boost factor indicates the operating frequency that the processor cluster should increase under the current load conditions.
[0047] The current frequency boost coefficient is calculated based on the current idle rate, the target idle rate and the historical frequency boost coefficient. The operating frequency of the processor cluster is adjusted based on the current frequency boost coefficient and the current load parameter value. After the frequency boost operation is completed, the historical frequency boost coefficient is updated for use in the next frequency boost operation.
[0048] By monitoring the operating status of the processor cluster, the current idle rate, current load parameter value, target idle rate and historical frequency increase coefficient are obtained. These data are used to evaluate the current status and historical adjustment strategy of the processor cluster, providing a basis for subsequent frequency adjustment.
[0049] By obtaining these parameters, we can fully understand the current status and historical adjustment of the processor cluster, and provide accurate data support for subsequent frequency adjustments.
[0050] Step 120, determining a current frequency boost coefficient according to the current idle rate, the target idle rate and the historical frequency boost coefficient;
[0051] Current frequency boost factor: A factor determined based on the current idle rate, target idle rate, and historical frequency boost factor. It is used to adjust the operating frequency of the processor cluster and is used to dynamically adjust the operating frequency of the processor cluster to adapt to current load requirements and performance targets.
[0052] The current frequency boost factor is calculated based on the difference between the current idle rate and the target idle rate, combined with the historical frequency boost factor. For example, if the current idle rate is lower than the target idle rate, it means that the processor cluster load is high and the operating frequency may need to be increased; conversely, if the current idle rate is higher than the target idle rate, it means that the processor cluster load is low and the operating frequency may need to be reduced.
[0053] By dynamically calculating the current frequency boost factor, the operating frequency can be flexibly adjusted according to the actual load of the processor cluster to achieve the best balance between performance and energy efficiency.
[0054] Step 130: Adjust the operating frequency of the processor cluster according to the current frequency boost coefficient and the current load parameter value.
[0055] According to the calculated current frequency boost coefficient and current load parameter value, the operating frequency of the processor cluster is adjusted. For example, if the current frequency boost coefficient is high and the current load parameter value is high, it means that the processor cluster needs higher performance, and the operating frequency of the processor cluster will be increased; conversely, if the current frequency boost coefficient is low and the current load parameter value is low, it means that the processor cluster load is low, and the operating frequency of the processor cluster will be reduced.
[0056] By dynamically adjusting the operating frequency of the processor cluster, the performance and energy efficiency of the processor cluster can be optimized according to actual load requirements, avoiding power consumption waste caused by too high frequency or insufficient performance caused by too low frequency.
[0057] As a result, the operating status of the processor cluster can be monitored in real time, the current frequency boost factor can be dynamically calculated based on the current idle rate, target idle rate and historical frequency boost factor, and the operating frequency of the processor cluster can be flexibly adjusted based on the current frequency boost factor and current load parameter value. This not only helps maintain optimal performance and energy efficiency under different load conditions, but also avoids performance waste or energy efficiency loss caused by improper frequency adjustment.
[0058] In a possible embodiment, obtaining the current idle rate of the processor cluster includes:
[0059] Within a preset time period, the idle rates of multiple processors associated with the processor cluster are obtained; the operating frequencies and operating voltages of the multiple processors associated with the processor cluster are the same;
[0060] The minimum idle rate among the idle rates of the plurality of processors is determined as the current idle rate of the processor cluster.
[0061] Preset time period: A fixed time interval or cycle set when obtaining the idle rate of the processor cluster. It is used to ensure that the idle rate data obtained is representative and can reflect the average state of the processor cluster over a period of time.
[0062] Processor: Definition: In a multi-core or processor cluster, each independent processing unit is called a processor. It is used to process tasks in parallel to improve computing power and efficiency.
[0063] Idle rate: The proportion of the processor's idle time to the total time. It is used to evaluate the processor utilization and help determine whether the operating frequency needs to be adjusted to improve performance or reduce power consumption.
[0064] During a preset time period, the idle rate of each processor is obtained by monitoring its operating status. The operating frequency and operating voltage of multiple processors associated with a processor cluster are the same, which means that they are in the same cluster and share the same frequency and voltage settings.
[0065] By obtaining the idle rates of multiple processors, we can fully understand the utilization of the entire Cluster and provide accurate data support for subsequent frequency adjustments.
[0066] The minimum idle rate is selected from the idle rates of multiple processors as the current idle rate of the entire processor cluster. The reason for selecting the minimum idle rate is that if the idle rate of a processor is low, it means that the load of the node is high, and the operating frequency of the entire cluster may need to be increased to meet performance requirements.
[0067] By selecting the minimum idle rate as the current idle rate, the actual load of the processor cluster can be more accurately reflected, avoiding insufficient overall performance due to the high load of a certain node.
[0068] The idle rate of each processor is periodically obtained through the system clock. For each processor, the idle rate of the processor in the most recent multiple cycles is selected, and the average or maximum value of the idle rate of the processor in the multiple cycles is used as the idle rate of the processor. The multiple cycles, for example, 3 cycles or 5 cycles, may have a cycle length of 4 milliseconds (ms).
[0069] In the same cluster, the smallest idle rate among the processor idle rates is selected as the CPU idle rate of this cluster, that is, the current idle rate of the processor cluster.
[0070] As a result, the idle rates of multiple processors associated with the processor cluster can be monitored within a preset time period, and the minimum idle rate among the idle rates of multiple processors can be determined as the current idle rate of the processor cluster. This not only helps to fully understand the actual load of the processor cluster, but also provides accurate data support for subsequent frequency adjustments, ensuring that the processor cluster maintains optimal performance and energy efficiency under different load conditions.
[0071] In a possible embodiment, step 120 may specifically include the following steps:
[0072] Determine a ratio of the current idle rate to the target idle rate;
[0073] A current frequency boost coefficient is determined according to the historical frequency boost coefficient and the proportional value.
[0074] Since the target idle rate is a set target idle rate of a processor cluster, that is, the time ratio of the processor cluster in an ideal idle state, for example, if the idle rate of the CPU is controlled at about 20%, the target idle rate is 20%.
[0075] For example, Figure 3 As shown, when the CPU idle rate is greater than 20%, it means that the CPU is relatively idle and the tasks on the CPU are relatively few or light. At this time, the CPU boost frequency should be reduced, as shown in cycle 3; when the CPU idle rate is less than 20%, it means that the CPU is relatively busy and the tasks on the CPU are relatively many or heavy. At this time, the CPU boost frequency should be increased, as shown in cycle 1.
[0076] Ratio value: The ratio between the current idle rate and the target idle rate. It is used to evaluate the gap between the current idle rate and the target idle rate, and to help determine whether the frequency increase factor needs to be adjusted.
[0077] Calculate the ratio between the current idle rate and the target idle rate. The ratio reflects the difference between the current idle rate and the target idle rate. The smaller the ratio, the lower the current idle rate and the higher the load, which may require a higher frequency boost factor.
[0078] By calculating the ratio value, the gap between the current idle rate and the target idle rate can be quantified, providing a basis for subsequent frequency boost factor adjustment.
[0079] The current frequency boost coefficient is determined based on the historical frequency boost coefficient and the calculated ratio value. The current frequency boost coefficient can be calculated using the following formula:
[0080] Current frequency boost coefficient = historical frequency boost coefficient × ratio value;
[0081] If the ratio value is small, it means that the current load is high, and the current frequency boost coefficient will increase accordingly to increase the operating frequency of the processor cluster; conversely, if the ratio value is large, it means that the current load is low, and the current frequency boost coefficient will decrease accordingly to reduce the operating frequency of the processor cluster.
[0082] Therefore, by combining the historical frequency boost coefficient and the proportional value, the current frequency boost coefficient can be dynamically adjusted to adapt to the current load demand and performance target, achieving the best balance between performance and energy efficiency.
[0083] In a possible embodiment, step 130 may specifically include the following steps:
[0084] Determining a target boost frequency according to the current load parameter value;
[0085] Determining a current boost frequency according to the current frequency boost coefficient and the target boost frequency;
[0086] The operating frequency of the processor cluster is adjusted according to the current boost frequency.
[0087] Target frequency boost: The target frequency boost value determined based on the current load parameter value is used to guide the adjustment of the operating frequency of the processor cluster. It is used to set the ideal operating frequency of the processor cluster under the current load condition, helping to maintain optimal performance and energy efficiency under different load conditions.
[0088] Current boost frequency: The actual frequency boost value determined based on the current frequency boost coefficient and the target boost frequency, used to adjust the operating frequency of the processor cluster. It is used to dynamically adjust the operating frequency of the processor cluster to adapt to the current load requirements and performance goals.
[0089] The target boost frequency is determined based on current load parameter values, such as CPU usage and task queue length, etc. The target boost frequency can be calculated using a preset load-frequency mapping table or algorithm.
[0090] For example, if the current load parameter value is high, it means that the processor cluster is heavily loaded, and the target boost frequency will be increased accordingly; conversely, if the current load parameter value is low, it means that the processor cluster is lightly loaded, and the target boost frequency will be decreased accordingly.
[0091] By determining the target boost frequency, the ideal operating frequency can be set according to the current load conditions, providing a basis for subsequent frequency adjustments.
[0092] The current boost frequency is calculated based on the current frequency boost coefficient and the target boost frequency. The current boost frequency can be calculated using the following formula:
[0093] Current boost frequency = target boost frequency × current frequency boost coefficient;
[0094] The current boost frequency reflects the actual frequency value that needs to be adjusted. Combined with the current frequency boost coefficient, the operating frequency of the processor cluster can be adjusted more accurately.
[0095] By combining the current frequency boost coefficient and the target boost frequency, the current boost frequency can be dynamically calculated to adapt to the current load demand and performance target to achieve the best balance between performance and energy efficiency.
[0096] The operating frequency of the processor cluster is adjusted according to the calculated current boost frequency. The adjustment method may be to directly set the frequency of the processor cluster or to adjust it through a dynamic voltage frequency adjustment technology.
[0097] For example, if the current boost frequency is high, the operating frequency of the processor cluster will be increased; conversely, if the current boost frequency is low, the operating frequency of the processor cluster will be reduced.
[0098] By dynamically adjusting the operating frequency of the processor cluster, the performance and energy efficiency of the processor cluster can be optimized according to actual load requirements, avoiding power consumption waste caused by too high frequency or insufficient performance caused by too low frequency.
[0099] Therefore, by being able to determine the target boost frequency according to the current load parameter value, calculate the current boost frequency in combination with the current frequency boost coefficient, and dynamically adjust the operating frequency of the processor cluster according to the current boost frequency, this not only helps maintain optimal performance and energy efficiency under different load conditions, but also avoids performance waste or energy efficiency loss caused by improper frequency adjustment.
[0100] The step of determining the target boost frequency according to the current load parameter value mentioned above includes:
[0101] Acquire a preset corresponding relationship, wherein the preset corresponding relationship includes a plurality of sets of corresponding preset load parameter values and preset boost frequencies;
[0102] According to the preset corresponding relationship, a target boost frequency corresponding to the current load parameter value is determined.
[0103] Preset correspondence: The correspondence between the preset load parameter value and the boost frequency, usually expressed in a table or algorithm form. It is used to guide the determination of the target boost frequency under different load conditions and help maintain the best performance and energy efficiency under different load conditions.
[0104] Preset load parameter value: In the preset correspondence, the pre-set load parameter value is used to compare with the actual load parameter value. It is used to determine the target boost frequency to help maintain the best performance and energy efficiency under different load conditions.
[0105] Preset boost frequency: In the preset correspondence, the preset boost frequency is used to compare with the boost frequency corresponding to the actual load parameter value. It is used to determine the target boost frequency to help maintain optimal performance and energy efficiency under different load conditions.
[0106] Obtain the correspondence between the preset load parameter value and the boost frequency. The preset correspondence is usually expressed in a table or algorithm form, including multiple sets of corresponding preset load parameter values and preset boost frequencies. For example, the preset correspondence can be a table, in which each row contains a load parameter value and a corresponding boost frequency.
[0107] By obtaining the preset corresponding relationship, the corresponding target boost frequency can be quickly found according to the current load parameter value, providing a basis for subsequent frequency adjustment.
[0108] Current load parameter value: You can use the WALT or PELT algorithm for calculation. The following uses the WALT algorithm as an example to explain how to calculate the CPU load. The WALT algorithm is a new algorithm that tracks the CPU utilization of the process in units of time windows and calculates the running time of the next window. The time window is a configurable value, and the default value is 20 milliseconds.
[0109] The WALT algorithm calculates the CPU running time within a statistical window, which is called WALT time, also known as WALT CPU running time. Assuming that in an ARM system-on-chip (System on Chip, ARM SoC) with a big-small core architecture, the maximum frequency of the small-core CPU is 1GHZ, the maximum frequency of the large-core CPU is 2GHZ, and the computing power (Instructions Per Cycle, IPC) of the large core is twice that of the small core, then the time to run a statistical window at the highest frequency on the large core is called 100% WALT CPU time, that is, 20ms.
[0110] If it runs at 1 GHZ for 10 ms on a small-core CPU, its WALT CPU time can be calculated using the above formula. That is, although it runs at 1 GHZ for 10 ms on a small-core CPU, it only runs for 2.5 ms using the WALT algorithm.
[0111] Load_avg=walt_time / windows*1024;
[0112] Load_avg represents the CPU load calculated using the WALT algorithm, that is, the current load parameter value;
[0113] Windows represents the time window for WALT algorithm calculation;
[0114] 1024 normalizes the calculation results to 1024 and unifies the calculation units.
[0115] According to the current load parameter value, the corresponding preset boost frequency is searched in the preset correspondence. If the current load parameter value exists in the preset correspondence, the corresponding preset boost frequency is directly used as the target boost frequency; if the current load parameter value does not exist in the preset correspondence, the upper value is taken, which means selecting the boost frequency corresponding to the closest load parameter value larger than the current load parameter value. That is, if the current load parameter value does not exist in the preset correspondence, the closest load parameter value larger than the current load parameter value is selected in the preset correspondence. The boost frequency corresponding to the selected load parameter value is used as the target boost frequency.
[0116] For example, the current load parameter value is 620. When searching for 620 in the preset correspondence, it is found that it does not exist. The closest load parameter value greater than 620 is selected, that is, 680. The boost frequency 1.8 GHz corresponding to 680 is used as the target boost frequency.
[0117] The preset corresponding relationship may be as shown in Table 1:
[0118] Table 1
[0119] CPU freq (CPU_target_freq) CPU util(load_avg) 3Ghz 1024 2.5Ghz 950 2Ghz 850 1.8Ghz 680 1.5Ghz 600 1.2Ghz 550 1Ghz 480 0.8Ghz 450
[0120] By searching or calculating the target boost frequency, the ideal operating frequency can be set according to the current load parameter value, providing a basis for subsequent frequency adjustment.
[0121] Therefore, by being able to obtain the correspondence between the preset load parameter value and the boost frequency, and searching or calculating the target boost frequency in the preset correspondence according to the current load parameter value, this not only helps to set the ideal operating frequency under different load conditions, but also provides accurate data support for subsequent frequency adjustments, ensuring that the processor cluster maintains optimal performance and energy efficiency under different load conditions.
[0122] In an embodiment of the present application, the current idle rate, current load parameter value, target idle rate and historical frequency boost coefficient of the processor cluster are obtained, and the current frequency boost coefficient is determined according to the current idle rate, target idle rate and historical frequency boost coefficient. The historical frequency boost coefficient is the coefficient when the processor cluster performs a historical frequency boost operation. In this way, according to the difference between the current idle rate and the target idle rate, combined with the historical frequency boost coefficient, the current frequency boost coefficient can be determined according to the actual load of the processor to achieve the best performance balance. The operating frequency of the processor cluster is adjusted according to the current frequency boost coefficient and the current load parameter value, and the performance and energy efficiency of the processor can be optimized according to the actual load requirements, avoiding power consumption waste caused by too high a frequency or insufficient performance caused by too low a frequency, which not only ensures performance, but also does not affect the battery life of the electronic device.
[0123] The operating frequency adjustment method provided in the embodiment of the present application can be executed by an operating frequency adjustment device. In the embodiment of the present application, the operating frequency adjustment method is executed by the operating frequency adjustment device as an example to illustrate the operating frequency adjustment device provided in the embodiment of the present application.
[0124] Figure 4 4 is a block diagram of a working frequency adjustment device provided in an embodiment of the present application, the device 400 includes:
[0125] An acquisition module 410 is used to acquire a current idle rate, a current load parameter value, a target idle rate, and a historical frequency boost coefficient of a processor cluster; the historical frequency boost coefficient is a coefficient when a historical frequency boost operation is performed on the processor cluster;
[0126] A determination module 420, configured to determine a current frequency boost coefficient according to the current idle rate, the target idle rate and the historical frequency boost coefficient;
[0127] The adjustment module 430 is used to adjust the operating frequency of the processor cluster according to the current frequency boost coefficient and the current load parameter value.
[0128] In a possible embodiment, the acquisition module 410 is specifically configured to:
[0129] Within a preset time period, the idle rates of multiple processors associated with the processor cluster are obtained; the operating frequencies and operating voltages of the multiple processors associated with the processor cluster are the same;
[0130] The minimum idle rate among the idle rates of the plurality of processors is determined as the current idle rate of the processor cluster.
[0131] In a possible embodiment, the determination module 420 is specifically configured to:
[0132] Determine a ratio of the current idle rate to the target idle rate;
[0133] A current frequency boost coefficient is determined according to the historical frequency boost coefficient and the proportional value.
[0134] In a possible embodiment, the adjustment module 430 is specifically configured to:
[0135] Determining a target boost frequency according to the current load parameter value;
[0136] Determining a current boost frequency according to the current frequency boost coefficient and the target boost frequency;
[0137] The operating frequency of the processor cluster is adjusted according to the current boost frequency.
[0138] In a possible embodiment, the adjustment module 430 is specifically configured to:
[0139] Acquire a preset corresponding relationship, wherein the preset corresponding relationship includes a plurality of sets of corresponding preset load parameter values and preset boost frequencies;
[0140] According to the preset corresponding relationship, a target boost frequency corresponding to the current load parameter value is determined.
[0141] In an embodiment of the present application, the current idle rate, current load parameter value, target idle rate and historical frequency boost coefficient of the processor cluster are obtained, and the current frequency boost coefficient is determined according to the current idle rate, target idle rate and historical frequency boost coefficient. The historical frequency boost coefficient is the coefficient when the processor cluster performs a historical frequency boost operation. In this way, according to the difference between the current idle rate and the target idle rate, combined with the historical frequency boost coefficient, the current frequency boost coefficient can be determined according to the actual load of the processor to achieve the best performance balance. The operating frequency of the processor cluster is adjusted according to the current frequency boost coefficient and the current load parameter value, and the performance and energy efficiency of the processor can be optimized according to the actual load requirements, avoiding power consumption waste caused by too high a frequency or insufficient performance caused by too low a frequency, which not only ensures performance, but also does not affect the battery life of the electronic device.
[0142] The operating frequency adjustment device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0143] The operating frequency adjustment device of the embodiment of the present application may be a device having an action system. The action system may be an Android action system, an iOS action system, or other possible action systems, which are not specifically limited in the embodiment of the present application.
[0144] The operating frequency adjustment device provided in the embodiment of the present application can implement each process implemented in the above method embodiment, and will not be described again here to avoid repetition.
[0145] Alternatively, if Figure 5 As shown, an embodiment of the present application also provides an electronic device 510, including a processor 511, a memory 512, and a program or instruction stored in the memory 512 and executable on the processor 511. When the program or instruction is executed by the processor 511, each step of any of the above-mentioned working frequency adjustment method embodiments is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0146] It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
[0147] Figure 6 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.
[0148] The electronic device 600 includes but is not limited to: a radio frequency unit 601, a network module 602, an audio output unit 603, an input unit 604, a sensor 605, a display unit 606, a user input unit 607, an interface unit 608, a memory 609, and a processor 610.
[0149] Those skilled in the art will appreciate that the electronic device 600 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 610 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Figure 6 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0150] The processor 610 is used to obtain the current idle rate, current load parameter value, target idle rate and historical frequency boost coefficient of the processor cluster; the historical frequency boost coefficient is a coefficient when the processor cluster performs a historical frequency boost operation;
[0151] The processor 610 is further configured to determine a current frequency boost coefficient according to the current idle rate, the target idle rate, and the historical frequency boost coefficient;
[0152] The processor 610 is further configured to adjust the operating frequency of the processor cluster according to the current frequency boost coefficient and the current load parameter value.
[0153] Optionally, the processor 610 is further configured to obtain the idle rates of multiple processors associated with the processor cluster within a preset time period; the operating frequencies and operating voltages of the multiple processors associated with the processor cluster are the same;
[0154] The processor 610 is further configured to determine the minimum idle rate among the idle rates of the plurality of processors as the current idle rate of the processor cluster.
[0155] Optionally, the processor 610 is further configured to determine a ratio of the current idle rate to the target idle rate;
[0156] The processor 610 is further configured to determine a current frequency boost coefficient according to the historical frequency boost coefficient and the proportional value.
[0157] Optionally, the processor 610 is further configured to determine a target boost frequency according to the current load parameter value;
[0158] The processor 610 is further configured to determine a current boost frequency according to the current frequency boost coefficient and the target boost frequency;
[0159] The processor 610 is further configured to adjust the operating frequency of the processor cluster according to the current boost frequency.
[0160] Optionally, the processor 610 is further configured to obtain a preset corresponding relationship, where the preset corresponding relationship includes a plurality of sets of corresponding preset load parameter values and preset boost frequencies;
[0161] The processor 610 is further configured to determine a target boost frequency corresponding to the current load parameter value according to the preset corresponding relationship.
[0162] In an embodiment of the present application, the current idle rate, current load parameter value, target idle rate and historical frequency boost coefficient of the processor cluster are obtained, and the current frequency boost coefficient is determined according to the current idle rate, target idle rate and historical frequency boost coefficient. The historical frequency boost coefficient is the coefficient when the processor cluster performs a historical frequency boost operation. In this way, according to the difference between the current idle rate and the target idle rate, combined with the historical frequency boost coefficient, the current frequency boost coefficient can be determined according to the actual load of the processor to achieve the best performance balance. The operating frequency of the processor cluster is adjusted according to the current frequency boost coefficient and the current load parameter value, and the performance and energy efficiency of the processor can be optimized according to the actual load requirements, avoiding power consumption waste caused by too high a frequency or insufficient performance caused by too low a frequency, which not only ensures performance, but also does not affect the battery life of the electronic device.
[0163] It should be understood that in the embodiment of the present application, the input unit 604 may include a graphics processor (Graphics Processing Unit, GPU) 6041 and a microphone 6042, and the graphics processor 6041 processes the image data of the static picture or video image obtained by the image capture device (such as a camera) in the video image capture mode or the image capture mode. The display unit 606 may include a display panel 6061, and the display panel 6061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 607 includes at least one of a touch panel 6071 and other input devices 6072. The touch panel 6071 is also called a touch screen. The touch panel 6071 may include two parts: a touch detection device and a touch controller. Other input devices 6072 may include, but are not limited to, a physical keyboard, a function key (such as a volume control button, a switch button, etc.), a trackball, a mouse, and an action rod, which will not be repeated here. The memory 609 can be used to store software programs and various data, including but not limited to applications and action systems. The processor 610 may integrate an application processor and a modem processor, wherein the application processor mainly processes the action system, user pages and application programs, and the modem processor mainly processes wireless communications. It is understandable that the modem processor may not be integrated into the processor 610.
[0164] The memory 609 can be used to store software programs and various data. The memory 609 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 609 may include a volatile memory or a non-volatile memory, or the memory x09 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 609 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0165] The processor 610 may include one or more processing units; optionally, the processor 610 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 610.
[0166] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned working frequency adjustment method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0167] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0168] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned working frequency adjustment method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0169] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0170] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned working frequency adjustment method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0171] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0172] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0173] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A method for adjusting a working frequency, characterized in that: The method comprises: Acquire a current idle rate, a current load parameter value, a target idle rate, and a historical frequency boost coefficient of a processor cluster; the historical frequency boost coefficient is a coefficient for performing a historical frequency boost operation on the processor cluster; Determine a current frequency boost coefficient according to the current idle rate, the target idle rate and the historical frequency boost coefficient; The operating frequency of the processor cluster is adjusted according to the current frequency boost coefficient and the current load parameter value.
2. The method according to claim 1, characterized in that The obtaining of the current idle rate of the processor cluster comprises: Within a preset time period, the idle rates of the multiple processors associated with the processor cluster are obtained; the operating frequencies and operating voltages of the multiple processors associated with the processor cluster are the same; The minimum idle rate among the idle rates of the plurality of processors is determined as the current idle rate of the processor cluster.
3. The method according to claim 1, characterized in that The determining the current frequency boost coefficient according to the current idle rate, the target idle rate and the historical frequency boost coefficient includes: Determine a ratio of the current idle rate to the target idle rate; A current frequency boost coefficient is determined according to the historical frequency boost coefficient and the proportional value.
4. The method according to claim 1, characterized in that: The adjusting the operating frequency of the processor cluster according to the current frequency boost coefficient and the current load parameter value includes: Determining a target boost frequency according to the current load parameter value; Determining a current boost frequency according to the current frequency boost coefficient and the target boost frequency; The operating frequency of the processor cluster is adjusted according to the current boost frequency.
5. The method according to claim 4, characterized in that The step of determining the target boost frequency according to the current load parameter value includes: Acquire a preset corresponding relationship, wherein the preset corresponding relationship includes a plurality of sets of corresponding preset load parameter values and preset boost frequencies; According to the preset corresponding relationship, a target boost frequency corresponding to the current load parameter value is determined.
6. A working frequency adjustment device, characterized in that: The device comprises: An acquisition module, used to acquire a current idle rate, a current load parameter value, a target idle rate, and a historical frequency boost coefficient of a processor cluster; the historical frequency boost coefficient is a coefficient when a historical frequency boost operation is performed on the processor cluster; A determination module, configured to determine a current frequency boost coefficient according to the current idle rate, the target idle rate and the historical frequency boost coefficient; The adjustment module is used to adjust the operating frequency of the processor cluster according to the current frequency boost coefficient and the current load parameter value.
7. The device according to claim 6, characterized in that The acquisition module is specifically used for: Within a preset time period, the idle rates of multiple processors associated with the processor cluster are obtained; the operating frequencies and operating voltages of the multiple processors associated with the processor cluster are the same; The minimum idle rate among the idle rates of the plurality of processors is determined as the current idle rate of the processor cluster.
8. The device according to claim 6, characterized in that The determination module is specifically used for: Determine a ratio of the current idle rate to the target idle rate; A current frequency boost coefficient is determined according to the historical frequency boost coefficient and the proportional value.
9. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.