Method for adjusting operating parameter and electronic device

By dynamically adjusting operating parameters through gear combinations, the method optimizes resource utilization in electronic devices, addressing the challenge of balancing load-task requirements and reducing waste.

WO2025200775A1PCT designated stage Publication Date: 2025-10-02SMARTER SILICON (SHANGHAI) TECH CO LTD

Patent Information

Application Number
PCT/CN2025/075398
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-03-29
Filing Date
2025-01-27
Publication Date
2025-10-02

AI Technical Summary

Technical Problem

Existing electronic devices face challenges in balancing load-task requirements with resource utilization, leading to resource wastage and performance reduction due to fixed and limited operating parameters.

Method used

A method that dynamically adjusts operating parameters by combining preset operating parameters of multiple gears to match the target workload, allowing for high-frequency switching between these gears to simulate equivalent operating parameters, thereby optimizing resource allocation.

Benefits of technology

This approach ensures efficient task execution while minimizing resource waste and improving performance by accurately matching operating parameters to workload demands.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025075398_02102025_PF_FP_ABST
    Figure CN2025075398_02102025_PF_FP_ABST
Patent Text Reader

Abstract

A method for adjusting operating parameter includes obtaining a target workload of a to-be-executed target task, and respective preset operating parameters of a plurality of preset gears configured by an electronic device for the target task; determining a plurality of expected operating parameters matching the target workload at least based on the target workload, the expected operating parameters being obtained by combining the preset operating parameters of at least two target gears, the target gear referring to any of the preset gears; and executing the target task based on a combination of the preset operating parameters of the at least two target gears.
Need to check novelty before this filing date? Find Prior Art

Description

METHOD FOR ADJUSTING OPERATING PARAMETER AND ELECTRONIC DEVICECROSS-REFERENCES TO RELATED APPLICATION

[0001] This application claims priority to Chinese Patent Application No. 202410382328.8 filed on March 29, 2024, the entire content of which is incorporated herein by reference. FIELD OF TECHNOLOGY

[0002] The present disclosure relates to the field of data processing technology and, more specifically, to a method for adjusting operating parameters and an electronic device.BACKGROUND

[0003] During the operation of an electronic device, the operating parameters of the electronic device can be adaptively adjusted based on the load-task requirements in order to meet the load-task requirement. However, since the operating parameters that can be provided by the inherent resources of the electronic device are limited and fixed, it is difficult to achieve a balance between meeting the load-task requirements and saving resources. In some cases, resources are wasted while the load-task requirements are met, which reduces the performance of the electronic device.SUMMARY

[0004] One aspect of this disclosure provides a method for adjusting operating parameters. The method includes obtaining a target workload of a to-be-executed target task, and respective preset operating parameters of a plurality of preset gears configured by an electronic device for the target task; determining a plurality of expected operating parameters matching the target workload at least based on the target workload; and executing the target task based on a combination of the preset operating parameters of the at least two target gears. The expected operating parameters are obtained by combining the preset operating parameters of at least two target gears, and the target gear refers to any of the preset gears.

[0005] Another aspect of this disclosure provides an electronic device. The electronic device includes a controller and a processor. The controller is configured to obtain a target workload of a to-be-executed target task, and respective preset operating parameters of a plurality of preset gears configured by the electronic device for the target task; determine a plurality of expected operating parameters matching the target workload based at least one the target workload. The processor is configured to execute the target task based on a combination of preset operating parameters of the at least two target gears. The expected operating parameters are obtained by combining the preset operating parameters of at least two target gears, and the target gear refers to any of the preset gears.

[0006] Another aspect of this disclosure provides a computer readable storage medium. The computer readable storage medium stores one or more computer instructions. When executed by one or more processors, the computer instructions implement a processing method including obtaining a target workload of a to-be-executed target task, and respective preset operating parameters of a plurality of preset gears configured by the electronic device for the target task; and determining a plurality of expected operating parameters matching the target workload based at least one the target workload. The processor is configured to execute the target task based on a combination of preset operating parameters of the at least two target gears. The expected operating parameters is obtained by combining the preset operating parameters of at least two target gears, and the target gear refers to any of the preset gears.BRIEF DESCRIPTION OF THE DRAWINGS

[0007] To clearly illustrate the embodiments of the present disclosure, the accompanying drawings that need to be used in the description of the embodiments are described briefly below. The following drawings are merely examples for illustrative purposes according to various disclosed embodiments and are not intended to limit the scope of the present disclosure. For those ordinary skilled in the art, other drawings can also be obtained from the provided drawings without any creative effort.

[0008] FIG. 1 is a flowchart of an exemplary method for adjusting operating parameter according to some embodiments of the present disclosure.

[0009] FIG. 2 is a schematic diagram of the process of changing the execution capabilities of different tasks simulated by high-frequency switching between at least two preset gears in the method for adjusting operating parameter according to some embodiments of the present disclosure.

[0010] FIG. 3 is a flowchart of another exemplary method for adjusting operating parameters according to some embodiments of the present disclosure.

[0011] FIG. 4 is a schematic diagram of a switching control method for fixed gear 1 and gear 2 in the method for adjusting operating parameter according to some embodiments of the present disclosure.

[0012] FIG. 5 is a flowchart of another exemplary method for adjusting operating parameters according to some embodiments of the present disclosure.

[0013] FIG. 6 is a schematic diagram of counting the historical workload of an electronic device executing the target tasks in the method for adjusting operating parameter according to some embodiments of the present disclosure.

[0014] FIG. 7 is a schematic diagram of the decoding capability change process of high-frequency switching gears in the method for adjusting operating parameter according to some embodiments of the present disclosure.

[0015] FIG. 8 is a schematic diagram of simulating the change in the amount of video decoding data under different decoding capabilities in the method for adjusting operating parameter according to some embodiments of the present disclosure.

[0016] FIG. 9 is a schematic structural diagram of an exemplary electronic device applicable to the method for adjusting operating parameter according to some embodiments of the present disclosure.

[0017] FIG. 10 is a control logic diagram of the electronic device executing the method for adjusting operating parameter according to some embodiments of the present disclosure.

[0018] FIG. 11 is a schematic structural diagram of another exemplary electronic device applicable to the method for adjusting operating parameter according to some embodiments of the present disclosure.

[0019] FIG. 12 is a schematic structural diagram of another exemplary electronic device applicable to the method for adjusting operating parameter according to some embodiments of the present disclosure.

[0020] FIG. 13 is another control logic diagram of the electronic device executing the method for adjusting operating parameter according to some embodiments of the present disclosure.DETAILED DESCRIPTION

[0021] Regarding the content described in the background section of the present disclosure, the following description takes the task scenario of implementing video image encoding and decoding processing based on dynamic voltage frequency scaling (DVFS) technology of electronic devices as an example for illustration. In order to dynamically adjust the operating parameters of the video processing unit (VPU) of the electronic device to meet the task requirements while saving energy consumption, the task load of the VPU processor can be monitored in real time. If the VPU is lightly loaded, the VPU driver can reduce the frequency division factor of the clock divider at the front end of the VPU, such as adjusting the clock switching circuit to a low gear (which corresponds to low operating parameters) to reduce the operating parameters of the VPU processor and reduce power consumption. On the contrary, if the VPU is overloaded and high performance is required, the frequency division factor can be increased, such as adjusting the clock switching circuit to a high gear (which corresponds to high operating parameters) to increase the operating parameters of the VPU processor to meet the requirements of heavy load tasks.

[0022] However, the operating parameters of the VPU are limited by the clock switching circuit at the front end, which can only provide switching between a limited and fixed number of operating parameters, and is limited by device performance and cannot add more operating parameters. In actual applications, the DVFS of the VPU processor can switch between a limited and fixed number of gears based on the total number of decoding tasks issued by the system framework layer (such as the number of video frames to be encoded and decoded) . For example, when the total number of the decoding task reaches a threshold of a certain gear, the DVFS can be switched to a corresponding preset gear, but this switching cycle is often relatively long.

[0023] On the one hand, if the total number of the decoding task is between the thresholds of two adjacent gears, selecting the lower gear cannot meet the task requirements, which may cause task failure or inaccurate task results, such as video frame loss; on the other hand, selecting the higher gear can reliably complete the task, but at this time the resources allocated to the higher gear are not fully utilized, and the corresponding high decoding capability is not fully utilized, resulting in power consumption waste. Similarly, for other tasks other than video encoding and decoding, such as audio processing tasks, text processing tasks, or data processing tasks of other types of data streams, the implementation process is similar and there will be technical problems that makes it difficult to meet energy saving and task requirements at the same time.

[0024] Embodiments of the present disclosure provide a new method for adjusting operating parameters, which can determine the expected operating parameters matching the number of target tasks of the to-be-executed tasks. The expected operating parameters need to be obtained by combining the preset operating parameters of at least two target gears in a plurality of preset gears configured by the current electronic device for the target task. Accordingly, the target task can be performed based on the combination of the preset operating parameters of the at least two target gears. That is, by switching between at least two target gears, the target task is performed under the expected operating parameters. Compared with directly switching to a fixed gear and executing the target task under the corresponding preset operating parameters, which causes resource waste de to the mismatch between the preset operating parameters and the target task, in the present disclosure, the target task is completed under the expected operating parameters. Accordingly, while the task requirements are met, waste of resources is avoided and the performance of the electronic device is improved.

[0025] Hereinafter, embodiments and features consistent with the disclosure will be described with reference to drawings Various modifications may be made to the embodiments of the present disclosure Thus, the described embodiments should not be regarded as limiting, but are merely examples Those skilled in the art will envision other modifications within the scope and spirit of the present disclosure.

[0026] FIG. 1 is a flowchart of an exemplary method for adjusting operating parameter according to some embodiments of the present disclosure. The method for adjusting operating parameter can be applied to electronic devices, which may include, but are not limited to smart phones, various types of computers, smart transportation devices, virtual reality (VR) devices, augmented reality (AR) devices, intelligent robots, flight devices, or remote devices with task processing capabilities. The type of electronic devices can be determined based on the task processing requirements. The method will be described in detail below.

[0027] 11, obtaining a target workload of a to-be-executed target task, and preset operating parameters of a plurality of preset gears configured by the electronic device for the target task.

[0028] In some embodiments, the execution devices for different tasks may be different, and the operating parameters of the electronic devices used by the execution devices to execute the tasks may also be different, which can be determined based on the task execution principle. The present disclosure does not limit the task type and the structure of the corresponding execution device. Based on this, after determining the to-be-executed target task in the current scenario, the execution device in the electronic device for executing the target task can be determined, and the execution device can be the electronic device or a part of the electronic device included in the electronic device. This embodiment is described by taking the scenario of an electronic device executing the target task as an example.

[0029] Combined with the above description of the technical solution of the present disclosure, during the actual execution of the target task, the target workload that needs to be executed by the electronic device may change dynamically as the execution time changes. The larger the target workload, the greater the load on the electronic device to perform the target task, and the larger the required operating parameters (such as the working voltage and frequency mentioned above, which can be determined based on the type of the target task) . That is, more resources are needed to complete the target task with a larger target workload. On the contrary, if the target workload is reduced, the load on the electronic device is reduced, and large operating parameters are not required to complete the target task. Therefore, the operating parameters need to be reduced to avoid wasting resources.

[0030] Therefore, in order to reliably and efficiently execute the target task and avoid wasting resources caused by excessive allocation of resources, thereby affecting the performance of the electronic device, in the present disclosure, the resources allocated by the electronic device to the target task is dynamically adjusted. With a sufficient number of gears and each gear corresponding to different operating parameters, there will be corresponding task execution capabilities to complete the target tasks of the corresponding level of workload. However, as analyzed above, due to the hardware structure and performance of the electronic device, the number of operating parameters that can be provided to execute the target task is fixed and limited, and it is difficult to provide operating parameters corresponding to the task execution capabilities that match the workload at different levels. Therefore, in the embodiments of the present disclosure, other gears, that is, equivalent gears and their corresponding equivalent operating parameters, can be simulated by high-frequency switching to execute the operating parameters corresponding to the fixed gears to provide more task execution capabilities and meet the processing needs of more levels of tasks to minimize resource waste. In the embodiments of the present disclosure, fixed gears configured for the target task of the electronic device can be recorded as preset gears, and the corresponding operating parameters can be recorded as preset operating parameters. The number of preset gears and the corresponding preset operating parameters are not limited in the present disclosure, and can be determined based on the actual hard disk configuration of the electronic device to perform the target task.

[0031] The operating parameters may refer to the parameters of the hardware executing the target task when performing the target task, and may be parameters that measure the task processing capability of the hardware. The operating parameters may also refer to the performance indicator parameters of the hardware, such as the processor’s main frequency (CPU clock frequency) , operating voltage, number of cores, cache capacity, bit width, etc. In some embodiments, the size of the operating parameters can be provided by other hardware to change the actual operating state of the processor, thereby affecting the power consumption, task execution speed and performance generated by its execution of the target task. In the scenario described above where the video decoding task is implemented by the DFVS technology, the operating parameters of the VPU processor for performing the video decoding task may include the main frequency and the working voltage. The clock switching circuit at the front end can dynamically adjust the operating parameters, but the operating parameters that can be adjusted are limited and fixed. In the embodiments of the present disclosure, a set of numerical operating parameters obtained by each adjustment can be represented as a preset operating parameter corresponding to a preset gear. It should be noted that the present disclosure does not limit the type of operating parameters, which can be determined based on the working principle of the hardware that performs the target task.

[0032] The target workload for the to-be-executed target task can be the workload that the electronic device is expected to complete within a preset period of time. This value can be determined based on the source of the target task and can represent the task execution capability that the electronic device is expected to provide when executing the target task. Within a fixed preset period of time, the larger the target workload, the greater the task execution capability required of the electronic device. The task execution capability that the electronic device can provide is determined by the operating parameters actually performed by the electronic device. Therefore, the operating parameters executed by the electronic device are related to the target workload. The larger the target task is, the larger the operating parameters of the electronic device needs to be under to execute the target task in order to complete the target workload. In addition, since the range of various operating parameters that the electronic device can provide is limited, the maximum task execution capability it can provide is limited, which affects the number of tasks it can complete within the preset period of time. Therefore, when determining the target workload, the maximum workload that the electronic device can complete with the preset period of time can also be considered. In order to avoid wasting resources, the minimum workload that can be completed within the preset period of time can also be considered. The present disclosure does not limit the method for obtaining the target workload.

[0033] In some embodiments, if the target task is a processing task performed on at least one data stream, combined with the above analysis, the target workload may be determined based on the data output rate of each data stream source, such as by counting the total data output of each data stream source within a preset period of time, or by combining the data processing capability of the electronic device (i.e., the task execution capability to realize the target task) to determine the data processing volume of the data stream within a preset period of time. The determined target workload is generally less than or equal to the total data output within the corresponding period of time, thereby avoiding data loss due to untimely data processing.

[0034] Continue with the example of the VPU processor performing video decoding tasks. The target workload can be represented by the number of to-be-decoded video frames. If a fewer number of video frames that need to be decoded by the VPU processor within the preset period of time is received, the target workload obtained at this time will be small. If a greater number of to-be-decoded video frames within the preset period of time suddenly increase due to factors such as another video stream being added that continues to increase for a certain period of time, a larger target workload can be obtained. In this case, the VPU processor is adjusted to work under larger operating parameters to complete the target task within the preset period of time to avoid the loss of some video frames due to untimely decoding, which affects the video quality. Subsequently, if the number of to-be-decoded video frames within the preset period of time suddenly decreases, the VPU processor will have larger operating parameters. The speed at which the to-be-decoded video frames are input into the VPU processor is lower than the decoding speed, resulting in the VPU processor’s current decoding capacity not being fully utilized, causing a waste of resources.

[0035] 12, at least based on the target workload, determining the expected operating parameters that match the target workload, the expected operating parameters being obtained by combining the preset operating parameters of at least two target gears, the target gear being any preset gear.

[0036] Based on the above analysis, since the preset operating parameters corresponding to the preset gears configured by the electronic device are fixed, the task execution capabilities that can be achieved by each preset gear are fixed. That is, the maximum number of tasks that can be performed by the target task using the preset operating parameters of a preset gear is fixed. For example, the larger the preset operating parameters corresponding to the preset gear (i.e., the higher the preset gear is) , the greater the maximum number of tasks that can be performed. During the actual execution of the target task, the to-be-executed target workload may not be fixed, and may not match the maximum workload corresponding to each preset gear. In some cases, there may even be a large gap, which may cause a large waste of resources when selecting a preset gear for execution.

[0037] For the fixed and limited number of preset gears configured for the target tasks by the electronic device, in the embodiments of the present disclosure, the switching frequency of these preset gears can be increased to achieve new task execution capabilities within a certain period of time. This is equivalent to simulating an equivalent gear between the two preset gears being switched, and its corresponding equivalent operating parameters are between the preset operating parameters corresponding to the two preset gears, and the maximum number of tasks that can be performed is also between the maximum number of tasks that can be performed by each of the two preset gears. Accordingly, more candidates gears are provided for the to-be-executed target task to meet the execution requirements of the target task that is less than and close to the maximum workload corresponding to the simulated equivalent gear, without causing waste of resources, thereby improving the response speed and performance of the electronic device to the target task.

[0038] Consistent with the present disclosure, through the preset operating parameters corresponding to each preset gear configured by the electronic device for the target task, the maximum workload that each preset gear can perform for the target task, that is, the task execution capability, and the resource consumption of the electronic device, that is, the energy consumption, can be determined. By combining the preset operating parameters corresponding to different preset gears, at least one equivalent gear (which is different from the preset gears) and the corresponding operating parameters (which are different from each preset operating parameters) can be simulated. For different combinations of preset operating parameters corresponding to at least two preset gears, the equivalent gears and their corresponding equivalent operating parameters that can be simulated may be different.

[0039] Accordingly, in the implementation of the process at 12, based on the to-be-performed target workload, at least two preset gears (which can be noted as the target gears for ease of description) that can be used to perform the target task can be selected from a plurality of preset gears configured by the electronic device for the target task. That is, by switching control of at least two target gears, that is, by reasonably combining at least two corresponding preset operating parameters, the workload that can be performed by the equivalent operating parameters that can be simulated can be greater than (the difference in the workload is less than the threshold, such as a value close to 0) or equal to the target workload, and the operating parameters can be determined as the expected operating parameters that match the target workload.

[0040] It should be noted that the present disclosure does not limit the method of selecting the target gear. In some embodiments, the preset operating parameters corresponding to different preset gears can be determined in advance and combined in different ways to determine the operating parameters corresponding to each simulated equivalent gear, and then matched with the target workload to obtain the expected operating parameters matching the target workload. In some embodiments, the maximum workload that can be performed by each preset operating parameters can be determined, thereby obtaining the corresponding relationship between different operating parameters and different workloads, and thereby obtaining the expected operating parameters that match the target workload. In some embodiments, the expected operating parameters that match the target workload can be directly calculated based on the target workload. The present disclosure does not limit the implementation method of the process at 12.

[0041] 13, performing the target task based on a combination of preset operating parameters of at least two target gears.

[0042] In some embodiments, when the determined expected operating parameters are different from the preset operating parameters, and the difference between the expected operating parameters and the preset operating parameters is greater than the threshold, it may indicate that the target workload of the current to-be-executed target task is between the maximum workload corresponding to the two adjacent preset gears. That is, if the preset operating parameters correspond to the lower preset gear of the two preset gears, the execution requirements of the target task cannot be met, and the task execution capability cannot support the completion of the target workload. At the same time, if the preset operating parameters correspond to the higher preset gear of the two preset gears, although the target workload can be completed, a large amount of surplus resources will be generated, which cannot meet the energy-saving requirements, thereby affecting the performance of the electronic device.

[0043] In the target task execution scenario described above, since the electronic device can only perform tasks under the preset operating parameters corresponding to one preset gear at any time, a corresponding fixed task execution capability is provided at this time. Therefore, in the embodiments of the present disclosure, the switching between at least two target gears that can simulate the expected operating parameters can be controlled to shorten the switching cycle between different preset gears to achieve the corresponding combination of preset operating parameters, simulate the expected operating parameters or operating parameters close to them, and perform the target task. Accordingly, the target workload can be reliably completed, there is no resource waste, energy is saved, and the response speed and system performance of the electronic device is improved.

[0044] As described above, the switching control method between different preset gears can be determined based on the working principle of the electronic device performing the target task. The present disclosure does not limit the implementation of the switching control method between different target gears based on the combination method after determining the combination method of the preset operating parameters corresponding to at least two target gears.

[0045] Take the video decoding task described above as an example. The electronic device may use the clock switching circuit to divide clock signals based on different frequency division coefficients to realize switching control between different preset frequency levels. Assume that DVFS can provide two preset gears, and the corresponding preset operating parameters include the main frequency, voltage and corresponding decoding capability of the VPU processor when performing video decoding tasks. The preset operating parameters corresponding to gear 1 are 800MHz (frequency unit: megahertz) for the main frequency and 0.75V (voltage unit: volt) for the voltage, the VPU processor can provide 4Kp120 decoding capability (memory: 4K and image resolution: 120 frames) for video encoding and decoding under these preset operating parameters. The preset operating parameters corresponding to gear 2 are 400MHz for the main frequency and 0.65V for the voltage. The decoding capability that the VPU processor can provide under these operating parameters is 4Kp45. Accordingly, the target workload of the video encoding and decoding task is limited within the range of 4Kp45-4Kp120, including the boundary value.

[0046] In the electronic device configuration described above, if the total amount number of tasks to be decoded is 4Kp60, the VPU processor cannot meet the task decoding requirements using the preset operating parameters corresponding to gear 2. In order to avoid frame loss, the gear can be switched from fear 2 to gear 1. Under gear 1, the decoding capacity is much greater than the total workload, and it can reliably complete the video decoding task. However, switching to gear 1 consumes more resources and generates higher power consumption. At this time, the total amount of the task can be completed, but the decoding capability provided by gear 1 cannot be fully utilized, which will cause power consumption waste. Based on the method for adjusting operating parameter provided in the present disclosure, the expected operating parameters matching the total amount of the task can be determined based on the method for adjusting operating parameter provided in the present disclosure. That is, the operating parameters that achieve 4Kp60 decoding capability are a set of operating parameters between the preset operating parameters corresponding to gear 1 and gear 2. Combined with the schematic diagram of the gear switching scenario shown in FIG. 2, compared with the direct selection of a fixed gear for execution described above, in the present disclosure, equivalent operating parameters different from the preset operating parameters corresponding to gear 1 and gear 2 can be simulated by controlling the switch between gear 1 and gear 2 at a high frequency, such as simulating an equivalent gear of approximately 600MHz main frequency to realize 4Kp70 decoding capability to complete the video decoding task of 4Kp60 of total workload. Accordingly, the DVFS control granularity is improved, both performance and power consumption are taken into account, and the business requirements is achieved at the cost of minimal power consumption. During the execution of other types of target tasks, the method for adjusting the operating parameters of the electronic device is similar, which will not be described in detail in the present disclosure.

[0047] Consistent with the present disclosure, by frequently switching between at least two preset gears, the task execution capability of the electronic device in different periods of time corresponding to the target task executed under different preset gears and corresponding preset operating parameters can change. In the total duration of different periods of time, the task execution capabilities corresponding to different periods of time can be integrated and averaged. The equivalent task execution capability within the total duration, that is, the average task execution capability, matches the target workload, thereby meeting the task processing requirements while achieving energy saving effects.

[0048] FIG. 3 is a flowchart of another exemplary method for adjusting operating parameters according to some embodiments of the present disclosure. In the process of executing the target task based on the method for adjusting operating parameter described in the foregoing embodiments, the operating parameter adjustment described in this embodiment can continue to execute the target task to further improve the performance of the electronic device system and reduce resource consumption. The method will be described in detail below.

[0049] 31, obtaining the expected workload to be performed within a preset duration.

[0050] In the embodiments of the present disclosure, the preset duration may be determined based on the target task type and the task execution capability of the electronic device. In order to improve the adjustment precision of the preset operating parameters (i.e., the preset gear) , the preset duration can be a shorter duration, such as the average duration of the electronic device performing the preset task, or a directly configured unit duration, such as 1 second. The present disclosure does not limit the length of the preset duration.

[0051] In some embodiments, after completing the expected workload determined this time based on the subsequent processes, in the present disclosure, the expected workload for the next preset duration can be obtained to continue to execute the target task by referring to the method for obtaining the target workload described above. Accordingly, the preset operating parameters of each of the plurality of preset gears configured by the electronic device for the target task only need to be obtained when the target task is started, that is, when the expected workload within the preset duration is determined for the first time. Subsequently, the preset operating parameters can be directly used to obtain the expected workload within the preset duration, and the subsequent processes can be directly executed to continue executing the target task.

[0052] The expected workload of the target task within the preset duration obtained each time in the present disclosure can be the same or different, and can be determined based on factors such as the actual task execution requirements, the source of the target task, or the total amount of the target task to be executed. The present disclosure does not limit the value of the expected workload within each consecutive preset duration. In some embodiments, the expected number of tasks outside the preset duration obtained each time in the present disclosure can be the same. The method for adjusting operating parameter provided in the present disclosure can ensure the stability of the electronic device in executing the target task.

[0053] In some embodiments, if the target task includes at least one data stream for encoding and decoding, the total amount of data expected to be encoded and decoded in the at least one data stream within the preset duration may be determined as the target workload, such as the expected amount of decoded data within a unit time length. In some embodiments, the expected amount of decoded data within the currently determined unit time length may be input into the data decoding system of the electronic device, and the encoding and decoding of the data stream of the expected amount of decoded data may be realized based on the method for adjusting operating parameter provided in the present disclosure.

[0054] In some embodiments, when the target task includes multiple data streams of different formats, if the difference in bitstream formats is ignored, the product of the resolution and number processed frames of multiple data streams per unit time (i.e., the preset duration) may be accumulated and counted to obtain the expected decoded data volume of multiple data streams per unit time. The statical method is expressed by the following formula.

[0055]

[0056] In formula (1) , X represents the total decoded data flow per unit time of multiple data streams, that is, the expected workload within the preset duration, Ri represents the resolution of the ith data stream, that is, the amount of data to be processed, Ni represents the number of frames to be processed per unit time of the Nth data stream, and n represents the total number of data streams.

[0057] If the target task includes multiple data streams with large differences, that is, the decoding capabilities required for decoding data streams of different formats are very different, the decoding capabilities of these multiple data streams in different formats may be converted to the decoding capabilities of data streams in the same format, and then the total decoded data stream within the unit time, that is, the expected workload of multiple data streams within a preset duration, can be calculated. Therefore, in the implementation of the process at 31, the expected decoding data volume, i.e., the expected workload, of converting multiple data streams of the same preset duration (e.g., unit time) into a data stream of a target format (which can be any data format in the multiple data streams, or other data formats, etc. ) can be obtained. The specific implementation process will not be described in the present disclosure.

[0058] Regarding the implementation process of obtaining the preset operating parameters of each of the multiple preset gears configured by the electronic device for the target task when or before the target task is started, reference can be made to the description of the corresponding part of the foregoing embodiments, which will not be described in detail here.

[0059] 32, in the process of executing the target task, obtaining the historical workload actually executed by the electronic device within the preset duration.

[0060] 33, based on the expected workload and historical workload, determining the expected operating parameters that match the expected workload, the expected operating parameters being obtained by combining the preset operating parameters of at least two target gears, the target gear being any preset gear configured by the electronic device for the target task.

[0061] During the actual execution of the target task, due to the switching consumption and noise between different target gears and the limitation of hardware on the preset gears, there may be a certain error between the actual simulated operating parameters and the determined expected operating parameters when the electronic device switches control between the at least two target gears. That is, open-loop control of the target gear based only on the target workload may result in steady-state errors. If the error exceeds the safety margin, abnormal behaviors such as untimely task execution and loss task data may affect the upper-level target tasks.

[0062] Based on this, in order to improve the adjustment precision and accuracy of the preset operating parameters (i.e., the preset gear) and eliminate the error between the expected operating parameters and the actual simulated operating parameters, in the present disclosure, a close-loop control method can be used to determine the adjustment strategy of the preset operating parameters. Accordingly, the adjustment method is more suitable for the execution scenarios of different target tasks and the system robustness of the electronic device is improved. Therefore, in the process of executing the target task based on the method for adjusting operating parameter described in the foregoing embodiments, the actual execution state of the current electronic device on the target task can be monitored to obtain the historical workload actually executed by the electronic device within the preset duration, that is, the actual workload executed within the preset duration, and feed it back to the task processing system as feedback. Accordingly, based on the difference between the expected workload within the preset duration and the actual workload, the expected operating parameters matching the expected workload can be calibrated, and the target task can continue to be executed accordingly.

[0063] Accordingly, during the execution of the entire target task, the expected operating parameters can be calibrated once in each execution cycle based on the method described above, which reduces system errors, improves the system’s anti-interference ability, and minimizes resource consumption while reliably executing the target task. It should be noted that the present disclosure does not limit the implementation method of the process at 32. In some embodiments, an observer for the execution state of the target task may be configured to monitor the hardware behavior of the electronic device in executing the target task, obtain the actual workload executed within the preset duration, that is, the actual historical workload executed, and feed it back to the controller of the electronic device to execute the process at 33. For the method of determining the expected operating parameters in the process at 33, reference can be made to the description in the foregoing embodiments, such as the description of the corresponding part of the process at 12, and details will not be described here.

[0064] In some embodiments, in the first execution cycle of the target task, if the historical workload of the preset duration has not yet been generated, the expected operating parameters matching the expected workload may be determined directly based on the expected workload based on the corresponding method described in the foregoing embodiments, and details will not be described here. In the next execution cycle, the expected operating parameters can still be determined based on this method. Optionally, the expected operating parameters can be determined based on the closed-loop control method described in this embodiment.

[0065] 34, switching and controlling the at least two target gears, and executing the target task based on the preset operating parameters of the switched target gear.

[0066] In some embodiments, compared with the implementation method of directly determining the expected operating parameters matching the expected workload based on the expected workload, the expected operating parameters determined by the process at 33 have a task execution capability that is more consistent with the actual workload of the target task within the preset duration (i.e., the difference is smaller) . Based on the preset operating parameters combination corresponding to at least two target gears that can simulate the determined expected operating parameters, the implementation method of executing the target task is similar to the implementation method of the process at 13 above, including but not limited to the implementation method described in the process at 34.

[0067] In the implementation process at 34, the execution time after switching to each target gear and the switching order between different target gears in the switching control process of different target gears can be determined based on the combination of at least two preset operating parameters (corresponding to the target gears) that can simulate the expected operating parameters, but the present disclosure is not limited thereto.

[0068] In some embodiments, since the electronic device has different preset operating parameters, the number of tasks that can be completed within the same period of time (i.e., the task execution capability achieved) is different. For example, the electronic device may be controlled to be in target gear 1 to execute the target task based on the corresponding preset operating parameters to complete part of the target task, such as executing for 1s or completing a unit task, and then switching to target gear 2. Under target gear 2, the target task will continue to be executed based on its preset operating parameters to complete part of the task, and then switching to target gear 1 or target gear 3 to continue executing the target task until the target task is completed. Accordingly, by switching the duty cycle of each target gear, different task execution capabilities can be simulated to complete the target workload of the target task more accurately and reduce resource waste.

[0069] Take the video encoding and decoding task scenario as the target task as an example. The electronic device is configured with two fixed preset gears, such as gear 1 and gear 2 described above. Based on the method for adjusting operating parameter in this embodiment, these two gears are used as target gears, and the expected operating parameters matching the expected workload are simulated through a combination of their corresponding preset operating parameters. Refer to FIG. 4, which is a schematic diagram of a switching control method for fixed gear 1 and gear 2 in the method for adjusting operating parameter according to some embodiments of the present disclosure. As shown in FIG. 4, before 8s, the electronic device enters gear 1 and performs video encoding and decoding based on the preset operating parameters of gear 1. At time t=8s, the electronic device is switched from gear 1 to gear 2 and performs video encoding and decoding based on the preset operating parameters of gear 2. After 2s, that is, at t=10s, the electronic device is switched from gear 2 to gear 1, and continues to perform video encoding and decoding based on the preset operating parameters of gear 1, continues to execute in gear 1 for 8s, and then switches to gear 1 to continue with the video encoding and decoding, thereby simulating a new decoding capability that better matches the expected workload. This is equivalent to simulating a gear with the new decoding capability, but is not limited to the duty cycle of each target gear shown in FIG. 4.

[0070] It should be noted that the execution time of the electronic device switching to the same target gear may be fixed (as shown in the switching control process in FIG. 4) or different. That is, each time the electronic device switches to the target gear, the execution time of the target task based on its preset operating parameters may be different, and may be determined based on the expected operating parameters expected to be simulated and the preset operating parameters corresponding to each target gear.

[0071] Consistent with the present disclosure, during the execution of the target task, by controlling the switch of at least two target gears, the actual operating parameters simulated based on the corresponding preset operating parameters generally differ from the predetermined expected operating parameters, such that the workload actually executed by the electronic device within the preset duration is different from the expected workload within the preset duration. To improve the accuracy of operating parameter adjustment, this embodiment adopts a closed-loop control method. Accordingly, based on the historical workload and the expected workload obtained in the preset duration, the expected operating parameters that match the expected workload can be determined more accurately. Based on this, the corresponding at least two target gears can be switched and controlled, and the target task executed based on the preset operating parameters of the target each time switched to. Accordingly, the actual workload executed within the preset duration is closer to the expected workload, the system control error is eliminated, and the gear that is more in line with the expected workload is simulated to execute the target task, which improves the energy saving effect and the robustness of the system.

[0072] FIG. 5 is a flowchart of another exemplary method for adjusting operating parameters according to some embodiments of the present disclosure. This embodiment describes an optional detailed implementation of the method for adjusting operating parameter provided in the foregoing embodiments, but is not limited to the detailed method described in this embodiment. The method will be described in detail below.

[0073] 51, obtaining the expected workload to be executed within a preset duration.

[0074] In some embodiments, at different execution times of the target task, the expected workload obtained within the preset duration may be the same or different. In some embodiments, since the execution speed of the electronic device for the target task may change dynamically, the time it takes to execute the expected workload may be different, resulting in different time intervals between two consecutive acquisitions of the expected workload. The present disclosure does not limit the time interval, and the timing of executing the process at 51 may be determined based on the execution state of the target task by the electronic device. Of course, if the expected workload within the preset duration is fixed, after the expected workload is obtained for the first time, the subsequent steps may be executed in a loop until the target task is completed.

[0075] 52, determining a detection window with a preset duration.

[0076] 53, using the detection window to count the task execution state of the electronic device to obtain the historical workload actually executed within the preset duration.

[0077] In the embodiments of the present disclosure, a closed-loop control method can be used to determine the expected operating parameters. In the process of obtaining the feedback, a sliding window may be used to count the execution state of the electronic device executing the target task within a given preset duration, such as in the video decoding task. Refer to the workload counting method shown in FIG. 6. When the current moment starts to slide forward for a preset duration, the current moment is regarded as the end moment of the detection window, and the counting starts from the start moment to the detection window. That is, starting from the start moment, at the end of each frame of video decoding, the actual amount of data decoded for the frame is accumulated and summed until the current moment, and the accumulated total amount of decoded data is determined as the historical workload actually executed in the detection window. However, the historical workload counting method is not limited thereto.

[0078] 54, combining the preset operating parameters of at least two preset gears configured by the electronic device for the target task to obtain a plurality of candidate operating parameters.

[0079] Combined with the above description of the implementation method of the gears of the simulated task execution capability, in the present disclosure, the preset operating parameters corresponding to the plurality of preset gears of the electronic device, which equivalent gears and their corresponding equivalent operating parameters (which can be noted as the candidate operating parameters) can be simulated, and the corresponding task execution capabilities and other combination may be first determined. Accordingly, when determining the expected operating parameters that match the expected workload obtained each time, the expected operating parameters can be directly selected from the candidate operating parameters obtained in advance to improve the precision of the operating parameter adjustment.

[0080] In some embodiments, the time consumption of the electronic device currently executing a unit task (such as a frame of video under a video decoding task) , the task execution capability that needs to be simulated, the number of gear switches allowed in each adjustment cycle, the size of the cache workload, etc. may be combined to determine the adjustment period of the operating parameters during the execution of the target task by the electronic device, which can be denoted as T. The method for determining T and its value are not limited in the present disclosure.

[0081] In some embodiments, the shorter the time it takes for an electronic device to execute a unit task, the more times the gears can switch and the smaller the T. The number of gear switching times and the amount of cache workload are contradictory to a certain extent. When the average task execution capability within an adjustment period T is equal to the target task execution capability, frequent gear switching can ensure that the fluctuation of task execution capability in a short period of time is small. If the speed of obtaining the workload of the to-be-executed target task from the cache each time is constant, the cache workload can be reduced, that is, the occupation of the cache space can be reduced. However, frequent gear switching will increase the switching cost and reduce system performance. Therefore, in the present disclosure, the various influencing factors to determine T, such as determining the most suitable T after multiple tests are comprehensively considered. The specific implantation process will not be described here.

[0082] Based on the above analysis, the present disclosure will continue to take the scenario described above of switching between gear 1 and gear 2 to realize the video decoding task as an example. Assume that the adjustment period T takes the time for decoding 10 frames of video. When the gear switching consumption is ignored, the preset operating parameter combinations corresponding to the fixed gear 1 and gear 2 can be simulated to obtain 10 gears (two of the gears are recorded as preset gear 1 and preset gear 2, and the other 8 gears are simulated equivalent gears) and their corresponding candidate operating parameters and decoding capabilities are as follow: Table 1

[0083] In Table 1 above, gear A is gear 2, gear K is gear 1, which are fixed gears. The decoding capability of each gear can be converted into 1KpXX. For example, the decoding capability of gear A is 1Kp180, the decoding capability of gear B is 1Kp192, etc. As shown in FIG. 1, the equivalent gears with different decoding capabilities can be simulated by switching the duty cycle of gear K or gear A, that is, the ratio of the execution time of switching to gear K in an adjustment period T to the adjustment period T. For example, if an adjustment cycle T=10 frames of data, based on the combination of executing 2 frames of data in gear K and 8 frames of data in gear A, the corresponding preset operating parameters can be executed to simulate the gear C with the decoding capability of 1Kp205.71; based on the combination of executing 6 frames of data in gear K and 4 frames of data in gear A, the corresponding preset operating parameters can be executed to simulate gear G with the decoding capability of 1Kp288. The method of switching the duty cycle of different gears described in this embodiment is not limited to simulating gears of new decoding capabilities. It can be understood that the more preset gears configured for the target task in the electronic device, the more gears can be fitted by combining and switching at least two preset gears based on, but not limited to, the combination method described above.

[0084] For each gear simulated above, the larger the corresponding candidate operating parameter is, the higher the task execution capability, and accordingly, the higher the power consumption for executing the target task is, and the higher the task execution performance.

[0085] 55, obtaining the workload error between the expected workload and the historical workload.

[0086] 56, based on the workload error, determining the expected operating parameters matching the expected workload from a plurality of candidate operating parameters.

[0087] 57, based on a combination of at least two preset operating parameters corresponding to the expected operating parameters, executing the target task.

[0088] In the process of determining the expected operating parameters by the closed-loop control method provided in the embodiments of the present disclosure, the proportional integral PI controller may be used to select the expected operating parameters matching the expected workload, that is, the gear that needs to be simulated, from the plurality of candidate operating parameters based on the workload error between the expected workload and the historical workload. In this implementation, the PI controller may output a control signal for determining the expected operating parameters (i.e., selecting the simulated gear) based on the following formula:

[0089]

[0090] In formula (2) , u (k) represents the control signal output by the PI controller, KP represents the proportional coefficient of the proportional term (used to eliminate the workload error) , and KI represents the integral coefficient of the integral term (used to eliminate the steady-state error) . The value of these two coefficients can be adjusted and determined based on the actual target task scenario. e [k] represents the error between the expected workload and the historical workload, and n represents the number of data streams included in the target task. If the target task includes one data stream, only the difference between the expected decoded data volume and the historical decoded data volume within the preset duration of this data stream needs to be counted, and to perform a product operation with KI.

[0091] In some embodiments, based on the method described above, the currently required operating parameters can be selected from a plurality of candidate operating parameters, such as the expected operating parameters corresponding to gear E in Table 1. Then, based on the corresponding switching control method of at least two preset gears, the at least two preset gears can be switched and controlled, and the target task can be executed based on the corresponding preset operating parameters. For example, based on the switching control method where the proportion of gear K (as described above, this indicates the proportion of the gear in an adjustment period T, which will not be explained later) is 4 and the proportion of gear A is 6, the switching control between gear K and gear A can be realized to simulate gear E and execute the target task. However, there are differences between the actual operating parameters and the candidate operating parameters corresponding to gear E, that is, the currently determined expected operating parameters. The gear can be dynamically adjusted based on the PI control method described above to eliminate errors and improve the robustness of the system.

[0092] In other embodiments, for the multiple simulated gears, the order of their respective task execution capabilities, that is, the order to the corresponding candidate operating parameters, may be used to determine whether to switch to the gear. Assume that the adjustment period T is the time taken for 10 frames of data. Since the decoding of each frame of video is independent and has no task dependency on the context, DVFS switching can be performed in the working interval of any two frames. That is, each time a frame of video is decoded, whether it is necessary to switch to other simulated gears can be determined based on the closed-loop control method provided in the embodiments of the present disclosure. The switching control of the simulated gear can be realized by switching control of at least two preset gears. The implementation process can be determined in combination with the corresponding relationship between the duty cycle switching control between different simulated gears and preset gears shown in Table 1, but is not limited thereto.

[0093] For example, the switching time of each simulated gear may be expressed as t1-tn (n represents the total number of simulated gears, such as 10 as shown in Table 1) , and the total time consumed by the gear switching may be expressed as te, which can be calculated based on the hardware of the electronic device executing the target task. If the adjustment period T is the time taken for 10 frames of data, and te is less than 1ms, it may indicate that the error is relatively large, and the actual operating parameters fitted by the switching control of the preset gear are not the expected operating parameters. That is, the target task is not performed based on the expected gear, and the operating parameters need to be adjusted based on the closed-loop control method described in this embodiment. In addition, the present disclosure may also reserve a safety margin time tm, such as 10%of the adjustment period.

[0094] Accordingly, if Ai represents the simulated task execution capability corresponding to the ith gear, and A represents the total task execution capability of the electronic device to execute the target task, then the relationship between the simulated task execution capabilities of different gears may be expressed as: A = A1 *t1  / T + A2 *t2  / T+ …An *tn  / T, where t1 + t2 +…+ tn + te + tm=T, and t1, t2, …tn are respectively integer multiples of the time consumed to execute a unit task amount under the simulated task execution capability of the corresponding gear, such as the integer multiples of the time consumed to execute a single frame of video in a video decoding task.

[0095] Continue with the video decoding task scenario as an example. If the video stream decoding workload suddenly changes from 4Kp30 to 4Kp60, based on the method for adjusting operating parameter provided in the embodiments of the present disclosure, the switching control process between gear 1 and gear 2 can be adjusted, that is, a simulated can be re-selected. In the implementation process, if the KP of the PI controller is 6, KI is 0.1, and the preset duration is 1s, the corresponding expected decoding data volume remains unchanged. Based on the implementation process of the simulated gear switching determination method described above, the decoding state and change amount of the electronic device in each adjustment cycle can be monitored, and the preset gear switching process shown in FIG. 7a can be obtained. In the present disclosure, by performing high-frequency switching control between at least two preset gears, different task execution capability change processes can be simulated, which is equivalent to the high-frequency switching process between multiple simulated gears. This is equivalent to using a fixed preset gear and executing the target task through a corresponding task execution capability. The task execution capability actually used in the process of executing the target task of the present disclosure is more in line with the workload required by the target task, which provides better energy-saving effect and reduces power consumption waste.

[0096] In some embodiments, in the above PI control process, if the proportional integral coefficient is changed, for example, KP is increase and KI is reduced, such as KP=8 and KI=0.05. Based on the above method to count the gear switching process, as shown in FIG. 7b, the actual switching control of the preset gear will change. That is, the actual switching process of the simulated equivalent gear is different, the matching between the task execution capability (such as the decoding capability) and the expected workload 240 becomes smaller, and the stability of executing the target task (such as the video decoding task) is not high. Therefore, in the present disclosure, KI and KP can be reasonably selected to improve energy saving while meeting the target task execution requirements, and switch between two or more preset gears can be close to the task execution capability that matches the expected workload. Accordingly, the task execution capability provided by the simulated equivalent operating parameters is less different from the expected workload, which reduced the fluctuation of task execution capability caused by each gear switch, making the target task execution process more stable. For example, in online video decoding scenarios, video decoding capability can be stabilized to stabilize the video encoding and decoding speed, and ensure clear and smooth video playback. The present disclosure does not limit the coefficient values in PI control. In some embodiments, if the target task includes a single task scenario of one data stream, such as decoding a video stream, the resolution of the video stream is fixed. Under the same gear, the time it takes for the electronic device to decode a signal frame of video is substantially fixed, which can be denoted as T1. Then, in each adjustment period T, the simulate gear can be switched T / T1 times to adjust the operating parameters actually used to execute the target task. That is, there are at most T / T1 non-zero values in the above t1, t2, …tn. In some embodiments, the simulated gear to switch to each time and the switching time interval may be determined based on the actual implementation of the method for adjusting operating parameter described above.

[0097] Refer to FIG. 8, which is a schematic diagram of simulating the change in the amount of video decoding data under different decoding capabilities in the method for adjusting operating parameter according to some embodiments of the present disclosure. In the single task scenario, if the electronic device performs the task execution capabilities of the simulated different gears (such as the change rates A1, A2, A3 in FIG. 8) , that is, by switching the at least two preset gears correspondingly, and performs the target task based on the actual operating parameters, the ratio between the power consumption and the task execution capability will be inconsistent. In the present disclosure, the actual performance cost of executing each gear, that is, the power consumption generated by executing the target task, may also be considered to more reasonably determine the expected operating parameters.

[0098] Therefore, when the process at 54 is completed, the power consumption of the electronic device when executing the target task based on each candidate operating parameters may also be obtained. That is, the candidate operating parameters corresponding to each gear simulated by the electronic device can be obtained. The power consumption generated by executing the target task can be determined through tests, or calculated using a performance calculation function combined with various influencing factors. The present disclosure does not limit the method of obtaining the power consumption. Accordingly, the process at 56 may be specifically to determine the expected operating parameters matching the expected workload from a plurality of candidate operating parameters based on the workload error and power consumption. That is, the preset operating parameters corresponding to at least two preset gears with the minimum performance cost can be selected for combination.

[0099] Consistent with the present disclosure, by performing high-frequency switching control on at least two preset gears in a plurality of preset gears configured by the electronic device for the target task slice, that is, combining the preset operating parameters corresponding to the at least two preset gears, more gears can be simulated. Accordingly, in addition to the task execution capabilities corresponding to each preset gear, the electronic device can have more task execution capabilities, that is, the task execution capabilities corresponding to the simulated new gear (i.e., the gear between two adjacent preset gears) . During the execution of the target task, the actual execution of the target task by the electronic device (e.g., the historical workload executed within a preset duration) can be monitored, and the error between the historical workload and the expected workload within the preset duration can be calculated. Accordingly, the expected operating parameters that fit the actual execution of the target task can be determined more accurately. That is, a more suitable simulated gear can be selected to continue to execute the target task, which eliminates system errors, balances performance and function, performs the target task at the lowest power consumption cost, improves the energy saving effects, and reduces resource consumption.

[0100] In the embodiments of the present disclosure, flowcharts are used to illustrate the operations performed by an electronic device based on the method embodiment in the present disclosure. It is to be expressly understood, the operations before or after may or may not be implemented in order. Conversely, the operations may be performed in inverted order, or simultaneously. Besides, one or more other operations may be added to the flowcharts, or one or more operations may be omitted from the flowchart.

[0101] FIG. 9 is a schematic structural diagram of an exemplary electronic device applicable to the method for adjusting operating parameter according to some embodiments of the present disclosure. The electronic device includes a controller 91 and a processor 92.

[0102] In some embodiments, the controller 91 may be configured to obtain the target workload of the to-be-executed target task and the preset operating parameters of each of a plurality of preset gears configured by the electronic device for the target task; determine the expected operating parameters that match the target workload based at least on the target workload. In some embodiments, the expected operating parameters may be obtained by combining the preset operating parameters of at least two target gears, target gear being any preset gear. For the detailed process of the controller 91 implementation of these functions, reference can be made to the corresponding part of the above method embodiment, which will not be described in detail here.

[0103] In some embodiments, the processor 92 may be configured to execute the target task based on the preset operating parameters combination of at least two target gears. For example, in a video encoding and decoding task scenario, the processor 92 may be an encoding and decoding processor. In other task scenarios, the processor 92 may be different, such as an application processor (AP) , a modem processor, a graphics processing unit (GPU) , an image signal processor (ISP) , a controller, a digital signal processor (DSP) , a VPU, a central processing unit (CPU) , an application-specific integrated circuit (ASIC) , an off-the-shelf field-programmable gate array (FPGA) , or other programmable logic devices. The present disclosure does not limit the type of the processor 92 and its working principle for executing the target task.

[0104] It should be understood that, in the process of the electronic device implementing the method for adjusting operating parameter provided in the present disclosure, the hardware described above (e.g., the controller 91 and the processor 92) can be directly executed, or the hardware and software can be combined to execute the method. The software module may be located in a storage medium such as a random-access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The information in the storage medium can be read by the corresponding hardware, and the corresponding steps of the foregoing method for adjusting operating parameter are completed in combination with the hardware. To avoid repetition, this embodiment will not be described in detail here.

[0105] In some embodiments, in combination with the description of the above method embodiment, in the process of the controller 91 determining the expected operating parameters, the control logic diagram shown in FIG. 10 can directly calculate the expected operating parameters matching the target workload based on the target workload. For the implementation process, reference can be made to the description of the corresponding part of the foregoing method embodiment.

[0106] In some embodiments, to increase the robustness of the system, while meeting the target task execution requirements, improving energy saving effects and reducing resource consumption, the controller 91 may use a closed-loop control method to determine the expected operating parameters. FIG. 11 is a schematic structural diagram of another exemplary electronic device applicable to the method for adjusting operating parameter according to some embodiments of the present disclosure. As shown in FIG. 11, the electronic device further includes a monitor 93. The monitor 93 may be configured to obtain the historical workload actually executed by the processor 92 within the preset duration and send it to the controller 91. Based on this, when the controller 91 obtains the expected workload of the target task to be executed within the preset duration, the controller 91 can determine the expected operating parameters matching the expected workload based on the expected workload and the historical workload. For the implementation process, reference can be made to the description of the corresponding part of the method embodiment above, which will not be repeated here.

[0107] FIG. 12 is a schematic structural diagram of another exemplary electronic device applicable to the method for adjusting operating parameter according to some embodiments of the present disclosure. In some embodiments, if the target task includes at least one data stream for encoding and decoding, the processor 92 may include an operating parameter actuator 921 and a codec 922.

[0108] In some embodiments, the operating parameter actuator 921 may be configured to execute the preset operating parameter combination of at least two target gears. For the implementation process of this function, reference can be made to the description of the corresponding part of the method embodiment above. As described above, the operating parameter actuator 921 can perform high-frequency switching control on at least two target gears to simulate the task execution capabilities of other gears. The codec 922 may be configured to encode and decode the data stream to be decoded based on the operating parameters output by the operating parameter actuator 921. The implementation process is not detailed in the present disclosure.

[0109] In some embodiments, since the operating parameters output by the operating parameter actuator 921 may be different from the expected operating parameters determined by the operating parameter actuator 921, the amount of data actually decoded by the codec 922 in the same duration may be different from the expected amount of data decoded, that is, an error in the amount of decoded data. This may cause the safety margin to be exceeded, resulting in delayed decoding, frame loss, etc., or the task is completed as expected but the power consumption is too high, affecting the energy saving effect. In this case, the monitor 93 (i.e., an observer) can be used to monitor the codec hardware behavior in real time, and send the counted feedback to the controller 91 to update the expected operating parameters that match the expected decoded data volume for the next transmission to the operating parameter actuator 921. Accordingly, the system error is corrected and the anti-interference capability is improved.

[0110] Continue with the video decoding task scenario described above as an example. Refer to the control logic diagram shown in FIG. 13. After determining the preset operating parameters corresponding to each preset gear supported by the VPU processor 922, the operating parameter actuator 921 can combine the preset operating parameters corresponding to at least two preset gears to obtain a plurality of candidate operating parameters. This is equivalent to simulating multiple gears, such as X1, X2, …, Xn as shown in FIG. 13, where n represents the total number of simulated gears, such as n=10 in Table 1. Accordingly, during the video decoding process of the VPU processor, the historical decoded data volume within the preset duration, that is, the feedback volume, can be counted by the sliding window method, and the difference between it and the expected decoded data volume within the preset duration, that is, the error in the decoded data volume e [k] , can be calculated. The error in the decoded data volume can be sent to the PI controller to determine which simulated gear to select. The control signal indicating the content can be output such that the operating parameter actuator can simulate the gear accordingly, that is, determine the combination of preset operating parameters corresponding to the at least two target gears, and send the actual operating parameters obtained thereby to the VPU processor for video decoding. Subsequently, in accordance with the closed-loop control method, at least two target gears can be switched at a high frequency to realize dynamic adjustment of operating parameters, thereby reliably decoding the video stream, improving energy conversation and reducing power consumption.

[0111] It should be understood that the structure of the electronic devices shown in FIG. 9, FIG. 11 and FIG. 13 do not constitute limitations on the electronic devices in the embodiments of the present disclosure. In some embodiments, the electronic device may include more or fewer components than shown in the drawings, or combine certain components such as at least one input component such as a touch sensing unit for sensing touch events on a touch display panel, a keyboard, a mouse, a camera, a microphone, etc.; at least one output component such as a display, a speaker, a vibration mechanism, a lamp, etc.; an antenna, a sensor module, a power module, etc., which can be determined in combination with the task processing requirements.

[0112] The present disclosure also provides a computer-readable storage medium on which a computer program can be stored, and the computer program can be loaded and executed by a processor to implement the method for adjusting operating parameter described in the foregoing embodiments. For a specific implementation process, reference can be made to the description of corresponding embodiments, which is not repeated here.

[0113] The present disclosure further provides a computer program product including computer instructions. The processor or other hardware of the electronic device can execute the computer instructions to perform the method for adjusting operating parameter described in the foregoing embodiments. For a specific implementation process, reference can be made to the description of corresponding embodiments, which is not repeated here.

[0114] It should be noted that, in the above-mentioned embodiments, unless the context clearly indicates an exception, the words "a, " "an, " "and / or, " or "the" do not specifically refer to the singular, and may also include the plural. Generally speaking, the terms "comprising or "including" only imply that the clearly identified steps and elements are included, and these steps and elements do not constitute an exclusive list, and the method or apparatus may also include other steps or elements. The inclusion of an element by the phrase "comprising a... " does not preclude the presence of additional identical elements in the process, method, article of manufacture or apparatus that includes the element.

[0115] In the description of the embodiments of the present disclosure, unless otherwise specified, means or. For example, "A / B" may mean A or B. "and / or" is only a description of an association relationship of objects, and may indicate that there may be three kinds of relationships. For example, "A and / or B, " may indicate that A exists alone, A and B exist at the same time, or B exists alone. In addition, in the description of the embodiments of the present disclosure, "plurality" may mean to two or more.

[0116] In addition, the various embodiments in the present disclosure are described in a progressive or juxtaposed manner, and each embodiment focuses on the differences from other embodiments, and the same and similar parts between the various embodiments may be referred to each other. For the electronic devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and reference may be made to the descriptions of the methods for relevant parts.

[0117] The above description of the disclosed embodiments enables those skilled in the art to make or use the present disclosure Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1.A method for adjusting operating parameter comprising:obtaining a target workload of a to-be-executed target task, and respective preset operating parameters of a plurality of preset gears configured by an electronic device for the target task;determining a plurality of expected operating parameters matching the target workload at least based on the target workload, the expected operating parameters being obtained by combining the preset operating parameters of at least two target gears, the target gear referring to any of the preset gears; andexecuting the target task based on a combination of the preset operating parameters of the at least two target gears.2.The method of claim 1, wherein executing the target task based on the combination of the preset operating parameters of the at least two target gears include:switching and controlling the at least two target gears, and executing the target task based on the preset operating parameters of the target gear switched to.3.The method of claim 1, if the target workload is an expected workload within a preset duration, executing the target task further includes:obtaining a historical workload executed by the electronic device within the preset duration; anddetermining the expected operating parameters matching the target workload based at least on the target workload includes:determining the expected operating parameters matching the expected workload based on the expected workload and the historical workload.4.The method of claim 3, wherein obtaining the historical workload executed by the electronic device within the preset duration includes:determining a detection window having the preset duration; andusing the detection window to count a task execution state of the electronic device to obtain the historical workload executed within the preset duration.5.The method of claim 3, wherein determining the expected operating parameters matching the expected workload based on the expected workload and the historical workload includes:combining the preset operating parameters of at least two preset gears to obtain a plurality of candidate operating parameters;obtaining a workload error between the expected workload and the historical workload; anddetermining the expected operating parameters matching the expected workload from the plurality of candidate operating parameters based on the workload error.6.The method of claim 5 further comprising:obtaining a power consumption of the electronic device when executing the target task based on each of the candidate operating parameters; anddetermining the expected operating parameters matching the expected workload from the plurality of candidate operating parameters based on the workload error includes:determining the expected operating parameters matching the expected workload from the plurality of candidate operating parameters based on the workload error and the power consumption.7.The method of claim 1, wherein:the target task includes at least one data stream for encoding and decoding, andobtaining the target workload of the to-be-executed target task includes:determining total amount of data expected to be encoded and decoded in at least one data stream within the preset duration as the target workload.8.An electronic device comprising:a controller, the controller being configured to obtain a target workload of a to-be-executed target task, and respective preset operating parameters of a plurality of preset gears configured by the electronic device for the target task; determine a plurality of expected operating parameters matching the target workload based at least one the target workload, the expected operating parameters being obtained by combining the preset operating parameters of at least two target gears, the target gear referring to any of the preset gears; anda processor, the processor being configured to execute the target task based on a combination of preset operating parameters of the at least two target gears.9.The electronic device of claim 8, if the target workload is an expected workload within a preset duration, the electronic device further includes:a monitor, the monitor being configured to obtain a historical workload executed by the processor within the preset duration, wherein the processor is configured to determine the expected operating parameters matching the expected workload based on the expected workload and the historical workload.10.The electronic device of claim 8, wherein if the target task includes at least one data stream for encoding and decoding, the processor further includes:an operating parameter actuator, the operating parameter actuator being configured to execute the preset operating parameter combination of the at least two target gears; anda codec, the codec being configured to encode and decode the data stream based on the operating parameters output by the operating parameter actuator.11.A computer storage medium for storing one or more computer instructions, when executed by one or more processors, the computer instructions implement a method for adjusting operating parameter comprising:obtaining a target workload of a to-be-executed target task, and respective preset operating parameters of a plurality of preset gears configured by an electronic device for the target task;determining a plurality of expected operating parameters matching the target workload at least based on the target workload, the expected operating parameters being obtained by combining the preset operating parameters of at least two target gears, the target gear referring to any of the preset gears; andexecuting the target task based on a combination of the preset operating parameters of the at least two target gears.12.The computer storage medium of claim 11, wherein executing the target task based on the combination of the preset operating parameters of the at least two target gears include:switching and controlling the at least two target gears, and executing the target task based on the preset operating parameters of the target gear switched to.13.The computer storage medium of claim 11, if the target workload is an expected workload within a preset duration, executing the target task further includes:obtaining a historical workload executed by the electronic device within the preset duration; anddetermining the expected operating parameters matching the target workload based at least on the target workload includes:determining the expected operating parameters matching the expected workload based on the expected workload and the historical workload.14.The computer storage medium of claim 13, wherein obtaining the historical workload executed by the electronic device within the preset duration includes:determining a detection window having the preset duration; andusing the detection window to count a task execution state of the electronic device to obtain the historical workload executed within the preset duration.15.The computer storage medium of claim 13, wherein determining the expected operating parameters matching the expected workload based on the expected workload and the historical workload includes:combining the preset operating parameters of at least two preset gears to obtain a plurality of candidate operating parameters;obtaining a workload error between the expected workload and the historical workload; anddetermining the expected operating parameters matching the expected workload from the plurality of candidate operating parameters based on the workload error.16.The computer storage medium of claim 15 further comprising:obtaining a power consumption of the electronic device when executing the target task based on each of the candidate operating parameters; anddetermining the expected operating parameters matching the expected workload from the plurality of candidate operating parameters based on the workload error includes:determining the expected operating parameters matching the expected workload from the plurality of candidate operating parameters based on the workload error and the power consumption.17.The computer storage medium of claim 11, wherein:the target task includes at least one data stream for encoding and decoding, andobtaining the target workload of the to-be-executed target task includes:determining total amount of data expected to be encoded and decoded in at least one data stream within the preset duration as the target workload.

Citation Information

Patent Citations

  • Power consumption adjustment method and apparatus

    EP4328712A1

  • Fine grain performance resource management of computer systems

    WO2011120019A2

Cited By

  • Voltage stabilization control method and system for server power switching process

    CN121785421A