WO2022151783A1 - Processor parameter adjustment method, apparatus, electronic device, and storage medium - Google Patents

Processor parameter adjustment method, apparatus, electronic device, and storage medium Download PDF

Info

Publication number
WO2022151783A1
WO2022151783A1 PCT/CN2021/125170 CN2021125170W WO2022151783A1 WO 2022151783 A1 WO2022151783 A1 WO 2022151783A1 CN 2021125170 W CN2021125170 W CN 2021125170W WO 2022151783 A1 WO2022151783 A1 WO 2022151783A1
Authority
WO
WIPO (PCT)
Prior art keywords
processor
parameter
preset
parameters
operating state
Prior art date
Application number
PCT/CN2021/125170
Other languages
French (fr)
Chinese (zh)
Inventor
林剑森
Original Assignee
成都国科微电子有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 成都国科微电子有限公司 filed Critical 成都国科微电子有限公司
Publication of WO2022151783A1 publication Critical patent/WO2022151783A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]

Definitions

  • the present application relates to the technical field of processors, and in particular, to a processor parameter adjustment method, a processor parameter adjustment device, an electronic device, and a computer-readable storage medium.
  • CPU ie, processor
  • the CPU will not work at the optimal performance parameters all the time, because this will increase the power consumption of the CPU and generate more heat.
  • the CPU will not work under the energy-saving performance parameters throughout the whole process.
  • the CPU needs to exert strong performance to meet the operation of a certain function or a certain scenario, so as to prevent slow response speed and slow interface refresh speed. and other problems that lead to poor user experience.
  • the related art dynamically adjusts the parameters of the CPU according to the current load state of the CPU. That is, during the adjustment process, the load state of the current CPU is collected multiple times, and the CPU parameters are adjusted according to the load state.
  • the purpose of the present application is to provide a processor parameter adjustment method, a processor parameter adjustment device, an electronic device and a computer-readable storage medium, which do not need to monitor the processor load, and solve the problem that the processor parameters cannot be adjusted in time. It takes up more resources of the CPU, which makes the problem of power consumption larger.
  • a processor parameter adjustment method including:
  • the target operating state exists, acquiring the target preset processor parameter corresponding to the target operating state from the parameter configuration information;
  • the processor parameter adjustment operation is performed according to the target preset processor parameter.
  • the method before the determining the operating state of the device, the method further includes:
  • the initial processor parameters are trained to obtain preset processor parameters that satisfy each of the preset effect parameters;
  • the parameter configuration information is generated using the preset processor parameters, the basic processor parameters, and the preset operating state.
  • performing training on initial processor parameters to obtain preset processor parameters satisfying each of the preset effect parameters including:
  • a parameter adjustment process based on a preset unit length is performed on the initial processor parameter to obtain a plurality of candidate processor parameters that satisfy the preset effect parameter;
  • the parameter adjustment process includes: The up-frequency point lag processing and/or the up-frequency value reduction processing, the initial processor parameter is the maximum performance parameter of the processor;
  • the processor power consumption corresponding to each of the candidate processor parameters is detected, and the candidate processor parameter corresponding to the minimum processor power consumption is determined as the preset processor parameter.
  • the determining a plurality of preset operating states includes:
  • a scenario selection instruction is acquired, and the preset operating state is selected from a plurality of candidate operating states according to the scenario selection instruction.
  • the method before the determining the operating state of the device, the method further includes:
  • the standard parameter configuration information is obtained based on standard equipment training, and is used to record the corresponding relationship between the preset operating state and the preset processor parameters .
  • the acquiring the target preset processor parameter corresponding to the target operating state from the parameter configuration information includes:
  • the target operating state includes:
  • the processor parameter adjustment operation is performed according to the dynamic adjustment strategy.
  • the application also provides a processor parameter adjustment device, including:
  • a state judging module used for determining the operating state of the equipment, and judging whether there is a target operating state matching the operating state of the equipment in the parameter configuration information
  • a parameter obtaining module configured to obtain the target preset processor parameter corresponding to the target operating state from the parameter configuration information if the target operating state exists;
  • a parameter adjustment module configured to perform a processor parameter adjustment operation according to the target preset processor parameter.
  • the application also provides an electronic device, including a memory and a processor, wherein:
  • the memory for storing computer programs
  • the processor is configured to execute the computer program to implement the above-mentioned method for adjusting the parameters of the processor.
  • the present application also provides a computer-readable storage medium for storing a computer program, wherein when the computer program is executed by a processor, the above-mentioned method for adjusting a processor parameter is implemented.
  • the processor parameter adjustment method provided by the present application determines the operating state of the device, and judges whether there is a target operating state matching the operating state of the device in the parameter configuration information; if there is a target operating state, the corresponding target operating state is obtained from the parameter configuration information
  • the target preset processor parameters; the processor parameter adjustment operation is performed according to the target preset processor parameters.
  • the method uses the parameter configuration information to record each preset operating state and the corresponding preset processor parameters.
  • the processor parameter adjustment needs to be performed, after determining the equipment operating state, it is compared with the preset operating state recorded in the parameter configuration information. The state is matched to determine whether there is a target operating state that matches the operating state of the equipment. If it matches, it means that the parameter adjustment process of the processor in the current scene has been set. Therefore, the target preset processor parameters corresponding to the target operating state can be obtained from the parameter configuration information, and processed according to the target preset processor parameters. controller parameter adjustment operation.
  • the method does not need to monitor the processor load when adjusting the processor parameters, but directly operates according to the preset target preset processor parameters, so it can avoid the failure caused by the low frequency of collecting the load state.
  • the present application also provides a processor parameter adjustment device, an electronic device and a computer-readable storage medium, which also have the above beneficial effects.
  • FIG. 1 is a flowchart of a method for adjusting a processor parameter provided by an embodiment of the present application
  • Fig. 2 is a kind of CPU parameter adjustment effect curve diagram that the embodiment of this application provides;
  • FIG. 3 is a schematic structural diagram of an apparatus for adjusting a processor parameter provided by an embodiment of the present application
  • FIG. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • FIG. 1 is a flowchart of a method for adjusting a processor parameter provided by an embodiment of the present application.
  • the method includes:
  • the device operating state can be acquired and determined.
  • the specific content of the device running status is not limited, for example, it may include software running status and hardware running status, where the software running status may include the current number of processes, the number of processes corresponding to different types, specific process names, process numbers, etc.; hardware
  • the running state may include the current number of processor cores, the voltage value of each processor, the temperature value of each processor, and the like.
  • the specific manner of determining the running state of the device is not limited, for example, the running state of the device may be determined in real time when the processor parameter adjustment instruction is detected.
  • the device operating state may be determined according to a preset cycle, and after the device operating state is acquired, the device operating state may be stored locally, and the stored content may be read when the device operating state needs to be determined.
  • This embodiment does not limit the specific time when the running state of the device is determined, that is, does not limit the specific time when the processor parameter adjustment is started. The time when the process content changes; or the time when the temperature of the processor changes; or the time when the processor load is greater than a certain threshold or less than a certain threshold.
  • S102 Determine whether there is a target operating state matching the device operating state in the parameter configuration information.
  • the parameter configuration information may be stored in a local storage component of the device, such as FLASH (flash memory).
  • FLASH flash memory
  • This embodiment does not limit the specific content of each preset operating state in the parameter configuration information, but may limit each data item of the device operating state, which may specifically be a value or an interval. For example, there may be one processor working, three processes are running, namely A process, B process and C process, and the temperature of the processor is 40 degrees. Alternatively, only some data items of the running state of the device may be limited, for example, it may be that two processors are working, and there are 5 to 7 processes running in total, including the D process. If a target operating state matching the device operating state is detected, it means that the processor parameter adjustment process corresponding to the current device operating state has been preset, and step S103 can be executed. If there is no target operating state corresponding to the device operating state, step S105 may be performed.
  • the parameter configuration information records the preset operating state and the corresponding preset processor parameters. After it is determined that the target operating state exists, the corresponding target preset processor parameters are obtained from the parameter configuration information.
  • the specific content of the target preset processor parameter is not limited, for example, it may include the number of processor cores, or may also include processor frequency, or may also include other information, such as maintenance duration, that is, the working duration in this state. It should be noted that each preset processor parameter may include only one set of processor sub-parameters, and the corresponding processor parameter adjustment process is adjusted only once, and the processor parameters are adjusted to the processor sub-parameters.
  • the preset processor parameters may include multiple groups of processor sub-parameters, and each group of processor sub-parameters respectively corresponds to multiple different moments in succession.
  • the parameter adjustment process is carried out in multiple stages, and each stage adjusts the processor to a corresponding processor sub-parameter.
  • the preset processor parameters may include three sets of processor sub-parameters, which are 700 MHz, 800 MHz, and 1100 MHz, respectively, corresponding to three moments of 0, 10 ms, and 30 ms, respectively.
  • the processor frequency is adjusted to 700MHz immediately after the target preset processor parameter is obtained, and the processor frequency is adjusted to 800MHz after 10ms , and then adjust the processor frequency to 1100MHz after 20ms.
  • the device operating state may match multiple preset operating states.
  • a corresponding priority may be set for each preset operating state, and the highest priority may be set.
  • the preset running state is determined as the target running state, and then the preset processor parameters of the target are obtained.
  • S104 Perform the processor parameter adjustment operation according to the target preset processor parameter.
  • the processor parameter adjustment operation is performed according to them, so as to adjust parameters such as the processor frequency and the number of processor cores.
  • This embodiment does not limit the specific process of parameter adjustment, and reference may be made to the related art, which will not be repeated here.
  • the preset operation can be performed.
  • the specific content of the preset operation is not limited, for example, it can be no operation, that is, no operation is performed, or the processor parameter adjustment strategy can be carried out according to the dynamic adjustment strategy.
  • the dynamic adjustment strategy is the strategy of adjusting the processor parameters in real time according to factors such as the processor load and the desired effect parameters.
  • the specific content is not limited. Please refer to FIG. 2 .
  • FIG. 2 may be a graph of a CPU parameter adjustment effect provided by FIG. 2 in this embodiment of the present application.
  • the CPU frequency can be gradually increased, and each time the CPU frequency is increased to determine whether the current refresh rate is Reach the target refresh rate. If the current refresh rate does not reach the target refresh rate, increase the CPU frequency again until the target refresh rate is reached. It can be seen from Figure 2 that by increasing the CPU frequency from 700MHz to 1200MHz, the UI refresh rate has reached 60Hz. At the same time, it can be seen that due to the low CPU frequency at the beginning, in order to increase the UI refresh rate, the CPU occupancy rate has reached more than 90%, or even 100%. With the increase of the CPU frequency, the CPU computing power is gradually released. The CPU usage gradually decreased until it dropped to 73%.
  • the processor parameter adjustment method provided in the embodiment of the present application is applied, and the parameter configuration information is used to record each preset operating state and the corresponding preset processor parameter.
  • the preset operating states recorded in the parameter configuration information are matched to determine whether there is a target operating state that matches the operating state of the equipment. If it matches, it means that the parameter adjustment process of the processor in the current scene has been set. Therefore, the target preset processor parameters corresponding to the target operating state can be obtained from the parameter configuration information, and processed according to the target preset processor parameters. controller parameter adjustment operation.
  • the method does not need to monitor the processor load when adjusting the processor parameters, but directly operates according to the preset target preset processor parameters, so it can avoid the failure caused by the low frequency of collecting the load state.
  • this embodiment will specifically describe several steps in the foregoing embodiments. It can be understood that, before using the parameter configuration information to adjust the processor parameters, the parameter configuration information needs to be obtained first. Therefore, in an implementation manner, before determining the operating state of the device, it may further include:
  • Step 11 Obtain standard parameter configuration information, and determine the standard parameter configuration information as parameter configuration information; the standard parameter configuration information is obtained based on standard equipment training, and is used to record the corresponding relationship between the preset operating state and the preset processor parameters.
  • multiple devices use the same parameter configuration information, that is, standard parameter configuration information.
  • the standard parameter configuration information is obtained based on standard equipment training, and the standard equipment is of the same type and model as the electronic equipment that executes the processor parameter adjustment method. Since the two are of the same type and model, their working states are basically the same, and the standard parameter configuration information can be used as parameter configuration information to adjust the processor parameters of the device.
  • processor parameters may further include: :
  • Step 21 Determine multiple preset operating states, and acquire multiple basic processor parameters and preset effect parameters corresponding to each preset operating state.
  • the number of preset operating states is multiple, and each preset operating state corresponds to a preset effect parameter.
  • the specific content of the preset effect parameter is not limited, for example, it may be UI interface refresh rate, input response rate (eg, remote control input response rate, keyboard input response rate), data throughput rate, and the like.
  • the basic processor parameter is used to define the processor parameter at the beginning of the processor parameter adjustment, and the processor parameter at the beginning of the processor parameter adjustment may specifically be the device running state, or may be other content. Specifically, it can be a value, or can be an interval. Since different adjustment methods can be used to adjust the processor under different operating states of the device, the same preset effect parameters can be finally achieved, so different preset processor parameters can be set for different basic processor parameters.
  • a preset operating state may be selected from a plurality of candidate operating states as required.
  • the step of determining multiple preset operating states may include:
  • Step 211 Acquire a scenario selection instruction, and select a preset operating state from a plurality of candidate operating states according to the scenario selection instruction.
  • the scene selection instruction may be input by the user, or may be sent by other electronic devices.
  • the candidate operating state is advanced to the device, and its specific content is not limited. For example, when there are multiple models of electronic equipment, different models have some different preset operating states, and also have some same preset operating states. In order to improve the generation efficiency of the parameter configuration information, all preset operating states of various models may be determined as candidate operating states, and the preset operating states may be selected from among them according to the scene selection instruction when the parameter configuration information is generated.
  • Step 22 Perform training on the initial processor parameters based on the respective basic processor parameters to obtain preset processor parameters that satisfy the preset effect parameters.
  • the initial processor parameter is the basis of the preset processor parameter, and its specific content is not limited, for example, it may be the lowest power consumption processor parameter, or may be the maximum performance processor parameter, that is, the highest power consumption processor parameter.
  • the initial processor parameters are trained and adjusted by satisfying the preset effect parameters as the standard, and finally the preset processor parameters corresponding to the respective basic processor parameters in the respective preset operating states are obtained. It can be understood that according to the specific content of the initial processor parameters, the corresponding training methods are also different.
  • the training content includes:
  • the corresponding training method can be adjusted for the up-frequency point (or down-frequency point) training and/or up-frequency value (or down-frequency value) Adjust training. That is, multiple up-frequency points (or down-frequency points) are set on the basis of the initial processor parameters, and each up-frequency point has a corresponding up-frequency value (or down-frequency value).
  • the magnitude of the corresponding upscaling value is adjusted to obtain preset processor parameters that satisfy the preset effect parameters.
  • the test program corresponding to the preset running state can be obtained, the initial processor parameters are trained during the running process of the test program, and whether the preset effect parameters are satisfied is judged according to the running result.
  • the effect parameter is to make the UI refresh rate reach 60Hz within 50ms
  • the preset effect parameter corresponding to B is to make the data throughput rate reach 100Mb/s within 1s.
  • the first preset processor parameters corresponding to 2 to 4 processes in case A the second preset processor parameters corresponding to 4 to 6 processes in case A, and 2 to 4 in case B can be obtained.
  • the third preset processor parameter corresponding to one process, and the fourth preset processor parameter corresponding to 4 to 6 processes in case B there are four preset processor parameters in total.
  • the initial processor parameters are trained, and the steps of obtaining preset processor parameters satisfying each preset effect parameter may include:
  • Step 221 For any preset effect parameter, perform parameter adjustment processing based on the preset unit length on the initial processor parameter, and obtain a plurality of candidate processor parameters that satisfy the preset effect parameter: .
  • the parameter adjustment processing in this embodiment includes up-frequency point lag processing and/or up-frequency value reduction processing, and in addition to this, may also include sampling rate adjustment, up-down frequency step size adjustment, and CPU core count adjustment several of the multiple processes, or may also include other adjustment processes.
  • the initial processor parameter is the maximum performance parameter of the processor.
  • the maximum performance parameter of the processor is to immediately adjust the processor to the maximum performance. Since the preset effect parameters must be satisfied when the processor exerts the maximum performance, the maximum performance parameter of the processor that can satisfy the effect can be determined as the initial processor. parameters, and by adjusting them, candidate processor parameters can be obtained.
  • the candidate processor parameter has multiple processor sub-parameters. By setting the time corresponding to each processor sub-parameter, that is, the up-frequency point, or setting the size of each processor sub-parameter, that is, the up-frequency value , a plurality of candidate processor parameters that satisfy the preset effect parameters can be obtained.
  • Step 222 Detect the processor power consumption corresponding to each candidate processor parameter, and determine the candidate processor parameter corresponding to the minimum processor power consumption as the preset processor parameter.
  • the candidate processor parameters are obtained, the corresponding processor power consumption is detected, and the candidate processor parameter with the smallest power consumption is determined as the preset processor parameter, so that the processor adjusted according to it can adopt the minimum power consumption Meet the preset effect parameters.
  • Step 23 Generate parameter configuration information using preset processor parameters, basic processor parameters, and preset operating states.
  • the parameter configuration information is generated by using them together with the preset operating state and the basic processor parameters.
  • the step of obtaining the target preset processor parameters corresponding to the target operating state from the parameter configuration information may include:
  • Step 31 Screen the parameter configuration information by using the target operating state to obtain a plurality of preset processor parameters corresponding to the target operating state;
  • each preset processor parameter corresponds to a different basic processor parameter.
  • Step 32 Screen each basic processor parameter by using the current processor parameter to obtain the target basic processor parameter, and determine the preset processor parameter corresponding to the target basic processor parameter as the target preset processor parameter.
  • the current processor parameters are used to screen the basic processor parameters, and after the target basic processor parameters are determined, the corresponding preset parameters are determined as the target preset processor parameters. For example, when the current processor parameter is 700MHz, the basic processor parameter corresponding to [600MHz, 800MHz] is the target basic processor parameter.
  • the following describes the processor parameter adjustment device provided by the embodiment of the present application.
  • the processor parameter adjustment device described below and the processor parameter adjustment method described above may refer to each other correspondingly.
  • FIG. 3 is a schematic structural diagram of a processor parameter adjustment device provided by an embodiment of the present application, including:
  • the state judgment module 110 is used for determining the operating state of the equipment, and judging whether there is a target operating state matching the operating state of the equipment in the parameter configuration information;
  • the parameter obtaining module 120 is configured to obtain target preset processor parameters corresponding to the target operating state from the parameter configuration information if there is a target operating state;
  • the parameter adjustment module 130 is configured to perform a processor parameter adjustment operation according to target preset processor parameters.
  • an acquisition module for determining multiple preset operating states, and acquiring multiple basic processor parameters and preset effect parameters corresponding to each preset operating state
  • the training module is used to train the initial processor parameters based on the respective basic processor parameters, so as to obtain preset processor parameters that satisfy the preset effect parameters;
  • the generating module is used for generating parameter configuration information by using preset processor parameters, basic processor parameters and preset operating states.
  • a training module including:
  • a parameter adjustment unit configured to perform a parameter adjustment process based on a preset unit length on the initial processor parameter for any preset effect parameter, to obtain a plurality of candidate processor parameters that satisfy the preset effect parameter;
  • the parameter adjustment process includes upscaling Dot lag processing and/or upscaling value reduction processing, the initial processor parameters are the maximum performance parameters of the processor;
  • the power consumption screening unit is configured to detect the processor power consumption corresponding to each candidate processor parameter, and determine the candidate processor parameter corresponding to the minimum processor power consumption as the preset processor parameter.
  • get modules including:
  • the preset operating state selection unit is used to obtain a scenario selection instruction, and select a preset operating state from a plurality of candidate operating states according to the scenario selection instruction.
  • the standard information acquisition module is used to acquire standard parameter configuration information, and determine the standard parameter configuration information as parameter configuration information; the standard parameter configuration information is obtained based on standard equipment training, and is used to record the correspondence between the preset operating state and the preset processor parameters relation.
  • the parameter obtaining module 120 includes:
  • a first screening unit configured to screen the parameter configuration information by using the target operating state to obtain a plurality of preset processor parameters corresponding to the target operating state; the preset processor parameters correspond to different basic processor parameters;
  • the second screening unit is configured to screen each basic processor parameter by using the current processor parameter to obtain the target basic processor parameter, and determine the preset processor parameter corresponding to the target basic processor parameter as the target preset processor parameter .
  • the dynamic adjustment unit is used to adjust the processor parameters according to the dynamic adjustment strategy.
  • the electronic device 100 may include a processor 101 and a memory 102 , and may further include one or more of a multimedia component 103 , an information input/information output (I/O) interface 104 and a communication component 105 .
  • a multimedia component 103 may be included in the electronic device 100 .
  • I/O information input/information output
  • the processor 101 is used to control the overall operation of the electronic device 100 to complete all or part of the steps in the above-mentioned processor parameter adjustment method;
  • the memory 102 is used to store various types of data to support the operation of the electronic device 100, These data may include, for example, instructions for any application or method operating on the electronic device 100, as well as application-related data.
  • the memory 102 may be implemented by any type of volatile or non-volatile memory device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (Electrically Erasable Programmable Read-Only Memory) Erasable Programmable Read-Only Memory, EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (Read- One or more of Only Memory, ROM), magnetic memory, flash memory, magnetic disk or optical disk.
  • SRAM Static Random Access Memory
  • EEPROM Electrically Erasable Programmable Read-Only Memory
  • EPROM Erasable Programmable Read-Only Memory
  • PROM Programmable Read-Only Memory
  • Read- One or more of Only Memory ROM
  • magnetic memory flash memory
  • flash memory magnetic disk or optical disk.
  • Multimedia components 103 may include screen and audio components.
  • the screen can be, for example, a touch screen, and the audio component is used for outputting and/or inputting audio signals.
  • the audio component may include a microphone for receiving external audio signals.
  • the received audio signal may be further stored in the memory 102 or transmitted through the communication component 105 .
  • the audio assembly also includes at least one speaker for outputting audio signals.
  • the I/O interface 104 provides an interface between the processor 101 and other interface modules, and the above-mentioned other interface modules may be a keyboard, a mouse, a button, and the like. These buttons can be virtual buttons or physical buttons.
  • the communication component 105 is used for wired or wireless communication between the electronic device 100 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC for short), 2G, 3G or 4G, or one or a combination of them, so the corresponding communication component 105 may include: Wi-Fi parts, Bluetooth parts, NFC parts.
  • the electronic device 100 may be composed of one or more Application Specific Integrated Circuit (ASIC for short), Digital Signal Processor (DSP for short), Digital Signal Processing Device (DSPD for short), Programmable logic device (Programmable Logic Device, PLD for short), Field Programmable Gate Array (Field Programmable Gate Array, FPGA for short), controller, microcontroller, microprocessor or other electronic components are implemented for implementing the above embodiments The given processor parameter adjustment method.
  • ASIC Application Specific Integrated Circuit
  • DSP Digital Signal Processor
  • DSPD Digital Signal Processing Device
  • PLD Programmable logic device
  • Field Programmable Gate Array Field Programmable Gate Array
  • controller microcontroller, microprocessor or other electronic components are implemented for implementing the above embodiments The given processor parameter adjustment method.
  • the computer-readable storage medium provided by the embodiments of the present application is introduced below.
  • the computer-readable storage medium described below and the processor parameter adjustment method described above may refer to each other correspondingly.
  • the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the above-mentioned processor parameter adjustment method are implemented.
  • the computer-readable storage medium may include: a USB flash drive, a removable hard disk, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, etc. that can store program codes medium.
  • a software module can be placed in random access memory (RAM), internal memory, read only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other in the technical field. in any other known form of storage medium.
  • RAM random access memory
  • ROM read only memory
  • electrically programmable ROM electrically erasable programmable ROM
  • registers hard disk, removable disk, CD-ROM, or any other in the technical field. in any other known form of storage medium.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Power Sources (AREA)
  • Stored Programmes (AREA)

Abstract

A processor parameter adjustment method, an apparatus, an electronic device, and a computer-readable storage medium. The method comprises: determining an operating state of a device, and determining whether a target operating state matching the operating state of the device exists within parameter configuration information; if a target operating state exists, obtaining a target preset processor parameter corresponding to the target operating state from within the parameter configuration information; and performing a processor parameter adjustment operation according to the target preset processor parameter. There is no need to monitor a processor load when performing processor parameter adjustment in the present method, instead, an operation is performed directly according to a target preset processor parameter, and thereby the problem of being unable to adjust a processor parameter in a timely manner due to a load state being captured at a relatively low frequency can be prevented; also, the problem of greater power consumption caused by more resources of a CPU being used due to the load state being captured at a relatively high frequency is prevented.

Description

一种处理器参数调节方法、装置、电子设备及存储介质A processor parameter adjustment method, device, electronic device and storage medium
本申请要求于2021年01月18日提交中国专利局、申请号为202110063759.4、发明名称为“一种处理器参数调节方法、装置、电子设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed on January 18, 2021, with the application number of 202110063759.4 and the invention titled "A processor parameter adjustment method, device, electronic device and storage medium", all of which are The contents are incorporated herein by reference.
技术领域technical field
本申请涉及处理器技术领域,特别涉及一种处理器参数调节方法、处理器参数调节装置、电子设备及计算机可读存储介质。The present application relates to the technical field of processors, and in particular, to a processor parameter adjustment method, a processor parameter adjustment device, an electronic device, and a computer-readable storage medium.
背景技术Background technique
CPU(即处理器)作为通用的数据处理单元,被广泛应用在多种设备中。在实际运用中,CPU并不会全程工作在最佳性能参数上,因为这样会增加CPU的功耗,产生更多热量。同时,CPU也不会全程在节能性能参数下工作,在某些场景下,需要CPU发挥出较强的性能来满足某个功能或某个场景的运行,防止出现响应速度慢,界面刷新速度慢等导致用户体验差的问题。为了解决上述问题,相关技术根据当前CPU的负载状态,动态地调节CPU的参数。即在调整过程中,多次采集当前CPU的负载状态,并根据负载状态调节CPU参数。然而,若采集负载状态的频率较低,则会导致出现无法及时调节CPU参数的情况,造成响应速度慢等无法及时调节参数的问题;若采集负载状态的频率较高,则会占用CPU的较多资源,使得功耗增大。因此相关技术在调节处理器参数时存在无法及时调节或功耗较大的问题。As a general-purpose data processing unit, CPU (ie, processor) is widely used in various devices. In actual use, the CPU will not work at the optimal performance parameters all the time, because this will increase the power consumption of the CPU and generate more heat. At the same time, the CPU will not work under the energy-saving performance parameters throughout the whole process. In some scenarios, the CPU needs to exert strong performance to meet the operation of a certain function or a certain scenario, so as to prevent slow response speed and slow interface refresh speed. and other problems that lead to poor user experience. In order to solve the above problem, the related art dynamically adjusts the parameters of the CPU according to the current load state of the CPU. That is, during the adjustment process, the load state of the current CPU is collected multiple times, and the CPU parameters are adjusted according to the load state. However, if the frequency of collecting the load state is low, it will lead to the situation that the CPU parameters cannot be adjusted in time, resulting in slow response speed and other problems that the parameters cannot be adjusted in time; if the frequency of collecting the load state is high, it will take up more CPU time. Multiple resources increase power consumption. Therefore, in the related art, when adjusting the processor parameters, there is a problem that the adjustment cannot be made in time or the power consumption is relatively large.
因此,相关技术存在的无法及时调节处理器参数或调节过程功耗较大的问题,是本领域技术人员需要解决的技术问题。Therefore, the problems in the related art that the processor parameters cannot be adjusted in time or the power consumption of the adjustment process is relatively large are technical problems to be solved by those skilled in the art.
发明内容SUMMARY OF THE INVENTION
有鉴于此,本申请的目的在于提供一种处理器参数调节方法、处理器参数调节装置、电子设备及计算机可读存储介质,不需要对处理器负载进 行监控,解决了无法及时调节处理器参数的问题和占用CPU的较多资源,使得功耗较大的问题。In view of this, the purpose of the present application is to provide a processor parameter adjustment method, a processor parameter adjustment device, an electronic device and a computer-readable storage medium, which do not need to monitor the processor load, and solve the problem that the processor parameters cannot be adjusted in time. It takes up more resources of the CPU, which makes the problem of power consumption larger.
为解决上述技术问题,本申请提供了一种处理器参数调节方法,包括:In order to solve the above-mentioned technical problems, the present application provides a processor parameter adjustment method, including:
确定设备运行状态,并判断参数配置信息中是否存在与所述设备运行状态匹配的目标运行状态;Determine the operating state of the device, and determine whether there is a target operating state matching the operating state of the device in the parameter configuration information;
若存在所述目标运行状态,则从参数配置信息中获取所述目标运行状态对应的目标预设处理器参数;If the target operating state exists, acquiring the target preset processor parameter corresponding to the target operating state from the parameter configuration information;
按照所述目标预设处理器参数进行处理器参数调节操作。The processor parameter adjustment operation is performed according to the target preset processor parameter.
可选地,在所述确定设备运行状态之前,还包括:Optionally, before the determining the operating state of the device, the method further includes:
确定多个预设运行状态,并获取多个基础处理器参数和各个所述预设运行状态分别对应的预设效果参数;determining multiple preset operating states, and acquiring multiple basic processor parameters and preset effect parameters corresponding to each of the preset operating states;
分别基于各个所述基础处理器参数,对初始处理器参数进行训练,得到满足各个所述预设效果参数的预设处理器参数;Based on each of the basic processor parameters, the initial processor parameters are trained to obtain preset processor parameters that satisfy each of the preset effect parameters;
利用所述预设处理器参数、所述基础处理器参数和所述预设运行状态生成所述参数配置信息。The parameter configuration information is generated using the preset processor parameters, the basic processor parameters, and the preset operating state.
可选地,所述对初始处理器参数进行训练,得到满足各个所述预设效果参数的预设处理器参数,包括:Optionally, performing training on initial processor parameters to obtain preset processor parameters satisfying each of the preset effect parameters, including:
针对任一所述预设效果参数,对所述初始处理器参数进行基于预设单位长度的参数调节处理,得到多个满足所述预设效果参数的候选处理器参数;所述参数调节处理包括升频点滞后处理和/或升频值降低处理,所述初始处理器参数为处理器最大性能参数;For any of the preset effect parameters, a parameter adjustment process based on a preset unit length is performed on the initial processor parameter to obtain a plurality of candidate processor parameters that satisfy the preset effect parameter; the parameter adjustment process includes: The up-frequency point lag processing and/or the up-frequency value reduction processing, the initial processor parameter is the maximum performance parameter of the processor;
检测各个所述候选处理器参数对应的处理器功耗,并将最小处理器功耗对应的所述候选处理器参数确定为所述预设处理器参数。The processor power consumption corresponding to each of the candidate processor parameters is detected, and the candidate processor parameter corresponding to the minimum processor power consumption is determined as the preset processor parameter.
可选地,所述确定多个预设运行状态,包括:Optionally, the determining a plurality of preset operating states includes:
获取场景选择指令,并根据所述场景选择指令在多个候选运行状态中选择所述预设运行状态。A scenario selection instruction is acquired, and the preset operating state is selected from a plurality of candidate operating states according to the scenario selection instruction.
可选地,在所述确定设备运行状态之前,还包括:Optionally, before the determining the operating state of the device, the method further includes:
获取标准参数配置信息,并将所述标准参数配置信息确定为所述参数配置信息;所述标准参数配置信息基于标准设备训练得到,用于记录预设 运行状态与预设处理器参数的对应关系。Obtain standard parameter configuration information, and determine the standard parameter configuration information as the parameter configuration information; the standard parameter configuration information is obtained based on standard equipment training, and is used to record the corresponding relationship between the preset operating state and the preset processor parameters .
可选地,所述从参数配置信息中获取所述目标运行状态对应的目标预设处理器参数,包括:Optionally, the acquiring the target preset processor parameter corresponding to the target operating state from the parameter configuration information includes:
利用所述目标运行状态对所述参数配置信息进行筛选,得到所述目标运行状态对应的多个预设处理器参数;所述预设处理器参数对应于不同的基础处理器参数;Screening the parameter configuration information by using the target operating state to obtain a plurality of preset processor parameters corresponding to the target operating state; the preset processor parameters corresponding to different basic processor parameters;
利用当前处理器参数对各个所述基础处理器参数进行筛选,得到目标基础处理器参数,并将所述目标基础处理器参数对应的所述预设处理器参数确定为所述目标预设处理器参数。Screen each of the basic processor parameters by using the current processor parameters to obtain target basic processor parameters, and determine the preset processor parameter corresponding to the target basic processor parameter as the target preset processor parameter.
可选地,若不存在所述目标运行状态,包括:Optionally, if the target operating state does not exist, it includes:
根据动态调节策略进行处理器参数调节操作。The processor parameter adjustment operation is performed according to the dynamic adjustment strategy.
本申请还提供了一种处理器参数调节装置,包括:The application also provides a processor parameter adjustment device, including:
状态判断模块,用于确定设备运行状态,并判断参数配置信息中是否存在与所述设备运行状态匹配的目标运行状态;a state judging module, used for determining the operating state of the equipment, and judging whether there is a target operating state matching the operating state of the equipment in the parameter configuration information;
参数获取模块,用于若存在所述目标运行状态,则从参数配置信息中获取所述目标运行状态对应的目标预设处理器参数;a parameter obtaining module, configured to obtain the target preset processor parameter corresponding to the target operating state from the parameter configuration information if the target operating state exists;
参数调节模块,用于按照所述目标预设处理器参数进行处理器参数调节操作。A parameter adjustment module, configured to perform a processor parameter adjustment operation according to the target preset processor parameter.
本申请还提供了一种电子设备,包括存储器和处理器,其中:The application also provides an electronic device, including a memory and a processor, wherein:
所述存储器,用于保存计算机程序;the memory for storing computer programs;
所述处理器,用于执行所述计算机程序,以实现上述的处理器参数调节方法。The processor is configured to execute the computer program to implement the above-mentioned method for adjusting the parameters of the processor.
本申请还提供了一种计算机可读存储介质,用于保存计算机程序,其中,所述计算机程序被处理器执行时实现上述的处理器参数调节方法。The present application also provides a computer-readable storage medium for storing a computer program, wherein when the computer program is executed by a processor, the above-mentioned method for adjusting a processor parameter is implemented.
本申请提供的处理器参数调节方法,确定设备运行状态,并判断参数配置信息中是否存在与设备运行状态匹配的目标运行状态;若存在目标运行状态,则从参数配置信息中获取目标运行状态对应的目标预设处理器参数;按照目标预设处理器参数进行处理器参数调节操作。The processor parameter adjustment method provided by the present application determines the operating state of the device, and judges whether there is a target operating state matching the operating state of the device in the parameter configuration information; if there is a target operating state, the corresponding target operating state is obtained from the parameter configuration information The target preset processor parameters; the processor parameter adjustment operation is performed according to the target preset processor parameters.
可见,该方法利用参数配置信息记录各个预设运行状态与对应的预设处理器参数,在需要进行处理器参数调节时,确定设备运行状态后,将其与参数配置信息中记录的预设运行状态进行匹配,判断是否存在与设备运行状态相匹配的目标运行状态。若匹配,则说明当前场景下处理器的参数调节过程已被设定好,因此可以从参数配置信息中获取目标运行状态对应的目标预设处理器参数,并按照目标预设处理器参数进行处理器参数调节操作。该方法在进行处理器参数调节时不需要对处理器负载进行监控,而是直接按照预设好的目标预设处理器参数进行操作,因此可以避免因采集负载状态的频率较低,造成的无法及时调节处理器参数的问题;同时避免了采集负载状态的频率较高,则会占用CPU的较多资源,使得功耗较大的问题,解决了相关技术存在的无法及时调节处理器参数或调节过程功耗较大的问题。It can be seen that the method uses the parameter configuration information to record each preset operating state and the corresponding preset processor parameters. When the processor parameter adjustment needs to be performed, after determining the equipment operating state, it is compared with the preset operating state recorded in the parameter configuration information. The state is matched to determine whether there is a target operating state that matches the operating state of the equipment. If it matches, it means that the parameter adjustment process of the processor in the current scene has been set. Therefore, the target preset processor parameters corresponding to the target operating state can be obtained from the parameter configuration information, and processed according to the target preset processor parameters. controller parameter adjustment operation. The method does not need to monitor the processor load when adjusting the processor parameters, but directly operates according to the preset target preset processor parameters, so it can avoid the failure caused by the low frequency of collecting the load state. The problem of adjusting processor parameters in time; at the same time, it avoids the high frequency of collecting the load state, which will occupy more resources of the CPU and make the power consumption larger. The problem of large process power consumption.
此外,本申请还提供了一种处理器参数调节装置、电子设备及计算机可读存储介质,同样具有上述有益效果。In addition, the present application also provides a processor parameter adjustment device, an electronic device and a computer-readable storage medium, which also have the above beneficial effects.
附图说明Description of drawings
为了更清楚地说明本申请实施例或相关技术中的技术方案,下面将对实施例或相关技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。In order to illustrate the technical solutions in the embodiments of the present application or related technologies more clearly, the following briefly introduces the accompanying drawings that are used in the description of the embodiments or related technologies. Obviously, the drawings in the following description are only the For the embodiments of the application, for those of ordinary skill in the art, other drawings can also be obtained according to the provided drawings without any creative effort.
图1为本申请实施例提供的一种处理器参数调节方法流程图;1 is a flowchart of a method for adjusting a processor parameter provided by an embodiment of the present application;
图2为本申请实施例提供的一种CPU参数调节效果曲线图;Fig. 2 is a kind of CPU parameter adjustment effect curve diagram that the embodiment of this application provides;
图3为本申请实施例提供的一种处理器参数调节装置的结构示意图;FIG. 3 is a schematic structural diagram of an apparatus for adjusting a processor parameter provided by an embodiment of the present application;
图4为本申请实施例提供的一种电子设备的结构示意图。FIG. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
具体实施方式Detailed ways
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描 述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments It is only a part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
请参考图1,图1为本申请实施例提供的一种处理器参数调节方法流程图。该方法包括:Please refer to FIG. 1 , which is a flowchart of a method for adjusting a processor parameter provided by an embodiment of the present application. The method includes:
S101:确定设备运行状态。S101: Determine the running state of the device.
由于设备中可能存在多个处理器,各个处理器共同支撑设备的运行,因此在判断是否需要进行处理器参数调节时,可以获取并确定设备运行状态。设备运行状态的具体内容不做限定,例如可以包括软件运行状态和硬件运行状态,其中,软件运行状态可以包括当前进程数量、不同种类分别对应的进程数、具体的进程名称、进程编号等;硬件运行状态可以包括当前处理器核数、各个处理器的电压值、各个处理器的温度值等。确定设备运行状态的具体方式不做限定,例如可以在检测到处理器参数调节指令时,实时确定设备运行状态。或者可以按照预设周期确定设备运行状态,并在获取设备运行状态后在本地存储,在需要确定设备运行状态时,读取存储的内容即可。本实施例并不限定确定设备运行状态的具体时刻,即并不限定开始进行处理器参数调节的具体时刻,例如可以为处理器运行的进程变化的时刻,例如进程数量变化的时刻,或者为具体进程内容变化的时刻;或者为处理器温度变化的时刻;或者为处理器负载大于某一阈值或小于某一阈值的时刻。Since there may be multiple processors in the device, and each processor jointly supports the operation of the device, when judging whether the processor parameter adjustment needs to be performed, the device operating state can be acquired and determined. The specific content of the device running status is not limited, for example, it may include software running status and hardware running status, where the software running status may include the current number of processes, the number of processes corresponding to different types, specific process names, process numbers, etc.; hardware The running state may include the current number of processor cores, the voltage value of each processor, the temperature value of each processor, and the like. The specific manner of determining the running state of the device is not limited, for example, the running state of the device may be determined in real time when the processor parameter adjustment instruction is detected. Alternatively, the device operating state may be determined according to a preset cycle, and after the device operating state is acquired, the device operating state may be stored locally, and the stored content may be read when the device operating state needs to be determined. This embodiment does not limit the specific time when the running state of the device is determined, that is, does not limit the specific time when the processor parameter adjustment is started. The time when the process content changes; or the time when the temperature of the processor changes; or the time when the processor load is greater than a certain threshold or less than a certain threshold.
S102:判断参数配置信息中是否存在与设备运行状态匹配的目标运行状态。S102: Determine whether there is a target operating state matching the device operating state in the parameter configuration information.
在确定设备运行状态后,判断其与参数配置信息中记录的多个预设运行状态中是否存在与设备运行状态匹配的目标运行状态。参数配置信息可以被存储于设备的本地存储部件中,例如FLASH(闪存)中。可以理解的是,大部分电子设备,例如机顶盒、路由器、GPS手表等,其均工作在若干个相对固定的运行场景下,每个运行场景下具有相对固定的运行状态。因此为了省略在处理器参数调节过程中对处理器负载进行监控的步骤,可以提前对多种场景下的处理器参数进行预设,并在需要调节处理器参数时 判断参数配置信息中是否存在与当前情况匹配的预设参数,即判断是否存在与设备运行状态匹配的目标运行状态。本实施例并不限定参数配置信息中预设运行状态的具体数量,具体可以为一个或多个。After the equipment operating state is determined, it is determined whether there is a target operating state matching the equipment operating state among the multiple preset operating states recorded in the parameter configuration information. The parameter configuration information may be stored in a local storage component of the device, such as FLASH (flash memory). It can be understood that most electronic devices, such as set-top boxes, routers, GPS watches, etc., work in several relatively fixed operating scenarios, and each operating scenario has a relatively fixed operating state. Therefore, in order to omit the step of monitoring the processor load in the process of adjusting the processor parameters, the processor parameters in various scenarios can be preset in advance, and when the processor parameters need to be adjusted, it is determined whether there is any difference in the parameter configuration information. The preset parameters that match the current situation, that is, determine whether there is a target operating state that matches the operating state of the equipment. This embodiment does not limit the specific number of preset operating states in the parameter configuration information, which may specifically be one or more.
本实施例并不限定参数配置信息中各个预设运行状态的具体内容,其可以对设备运行状态的各个数据项进行限定,具体可以为一个值或一个区间。例如可以为有1个处理器正在工作,其运行有3个进程,分别为A进程、B进程和C进程,且该处理器的温度为40度。或者可以仅对设备运行状态的部分数据项进行限定,例如可以为由2个处理器正在工作,共运行有5~7个进程,其中包括有D进程。若检测到与设备运行状态相匹配的目标运行状态,则说明当前设备的运行状态对应的处理器参数调节过程已经被预设好,可以执行S103步骤。若不存在与设备运行状态对应的目标运行状态,则可以执行S105步骤。This embodiment does not limit the specific content of each preset operating state in the parameter configuration information, but may limit each data item of the device operating state, which may specifically be a value or an interval. For example, there may be one processor working, three processes are running, namely A process, B process and C process, and the temperature of the processor is 40 degrees. Alternatively, only some data items of the running state of the device may be limited, for example, it may be that two processors are working, and there are 5 to 7 processes running in total, including the D process. If a target operating state matching the device operating state is detected, it means that the processor parameter adjustment process corresponding to the current device operating state has been preset, and step S103 can be executed. If there is no target operating state corresponding to the device operating state, step S105 may be performed.
S103:从参数配置信息中获取目标运行状态对应的目标预设处理器参数。S103: Acquire the target preset processor parameter corresponding to the target operating state from the parameter configuration information.
参数配置信息记录了预设运行状态与对应的预设处理器参数,在确定存在目标运行状态后,从参数配置信息中获取与其对应的目标预设处理器参数。目标预设处理器参数的具体内容不做限定,例如可以包括处理器核数,或者还可以包括处理器频率,或者还可以包括其他信息,例如维持时长,即在该状态下的工作时长。需要说明的是,每个预设处理器参数可以仅包括一组处理器子参数,则其对应的处理器参数调节过程仅有一次调节,将处理器的参数调节为处理器子参数。在另一种可行的实施方式中,预设处理器参数中可以包括多组处理器子参数,每组处理器子参数分别对应于先后多个不同的时刻,在这种情况下,对处理器参数的调节过程分为多个阶段进行,每个阶段将处理器调节为对应的处理器子参数。具体的,预设处理器参数可以包括三组处理器子参数,分别为700MHz、800MHz和1100MHz,分别对应于0、10ms和30ms三个时刻。在这种情况下,若该处理器参数为目标预设处理器参数,则在获取到目标预设处理器参数后立即将处理器频率调节为700MHz,并在10ms后将处理器频率调节为800MHz,再经过20ms后将处理器频率调节为1100MHz。The parameter configuration information records the preset operating state and the corresponding preset processor parameters. After it is determined that the target operating state exists, the corresponding target preset processor parameters are obtained from the parameter configuration information. The specific content of the target preset processor parameter is not limited, for example, it may include the number of processor cores, or may also include processor frequency, or may also include other information, such as maintenance duration, that is, the working duration in this state. It should be noted that each preset processor parameter may include only one set of processor sub-parameters, and the corresponding processor parameter adjustment process is adjusted only once, and the processor parameters are adjusted to the processor sub-parameters. In another feasible implementation manner, the preset processor parameters may include multiple groups of processor sub-parameters, and each group of processor sub-parameters respectively corresponds to multiple different moments in succession. The parameter adjustment process is carried out in multiple stages, and each stage adjusts the processor to a corresponding processor sub-parameter. Specifically, the preset processor parameters may include three sets of processor sub-parameters, which are 700 MHz, 800 MHz, and 1100 MHz, respectively, corresponding to three moments of 0, 10 ms, and 30 ms, respectively. In this case, if the processor parameter is the target preset processor parameter, the processor frequency is adjusted to 700MHz immediately after the target preset processor parameter is obtained, and the processor frequency is adjusted to 800MHz after 10ms , and then adjust the processor frequency to 1100MHz after 20ms.
进一步的,在一种可行的实施方式中,设备运行状态可能与多个预设运行状态相匹配,在这种情况下,可以为各个预设运行状态设置相应的优先级,并将优先级最高的预设运行状态确定为目标运行状态,进而获取目标预设处理器参数。Further, in a feasible implementation manner, the device operating state may match multiple preset operating states. In this case, a corresponding priority may be set for each preset operating state, and the highest priority may be set. The preset running state is determined as the target running state, and then the preset processor parameters of the target are obtained.
S104:按照目标预设处理器参数进行处理器参数调节操作。S104: Perform the processor parameter adjustment operation according to the target preset processor parameter.
在获取目标预设处理器参数后,依据其进行处理器参数调节操作,以便调节处理器频率、处理器核数等参数。本实施例并不限定参数调节的具体过程,可以参考相关技术,在此不再赘述。After acquiring the target preset processor parameters, the processor parameter adjustment operation is performed according to them, so as to adjust parameters such as the processor frequency and the number of processor cores. This embodiment does not limit the specific process of parameter adjustment, and reference may be made to the related art, which will not be repeated here.
S105:预设操作。S105: Preset operation.
若参数配置信息中不存在对应的目标运行状态,则说明当前运行情况并没有被提前设置,在这种情况下,可以执行预设操作,预设操作的具体内容不做限定,例如可以为无操作,即不执行任何操作,或者可以为根据动态调节策略进行处理器参数调节策略,动态调节策略即为根据处理器负载、想要达到的效果参数等因素进行实时调节处理器参数的策略,其具体内容不做限定。请参考图2,图2可以为图2为本申请实施例提供的一种CPU参数调节效果曲线图。在不存在目标运行状态的情况下,当检测到UI界面的刷新率为30Hz,而目标刷新率为60Hz时,可以逐渐提高CPU主频,并在每次提高CPU主频后判断当前刷新率是否达到目标刷新率。若当前刷新率没有达到目标刷新率,则再次提高CPU主频,直至达到目标刷新率。可以从图2看出,通过将CPU主频从700MHz提升到1200MHz,使得UI刷新率达到了60Hz。同时可以看出,由于开始CPU主频较低,为了升高UI刷新率,使得CPU占用率达到了90%以上,甚至达到100%,随着CPU主频的提升,CPU计算能力逐渐被释放,CPU占用率逐渐下降,直至下降到73%。If there is no corresponding target operating state in the parameter configuration information, it means that the current operating state has not been set in advance. In this case, the preset operation can be performed. The specific content of the preset operation is not limited, for example, it can be no operation, that is, no operation is performed, or the processor parameter adjustment strategy can be carried out according to the dynamic adjustment strategy. The dynamic adjustment strategy is the strategy of adjusting the processor parameters in real time according to factors such as the processor load and the desired effect parameters. The specific content is not limited. Please refer to FIG. 2 . FIG. 2 may be a graph of a CPU parameter adjustment effect provided by FIG. 2 in this embodiment of the present application. In the absence of the target running state, when it is detected that the refresh rate of the UI interface is 30Hz and the target refresh rate is 60Hz, the CPU frequency can be gradually increased, and each time the CPU frequency is increased to determine whether the current refresh rate is Reach the target refresh rate. If the current refresh rate does not reach the target refresh rate, increase the CPU frequency again until the target refresh rate is reached. It can be seen from Figure 2 that by increasing the CPU frequency from 700MHz to 1200MHz, the UI refresh rate has reached 60Hz. At the same time, it can be seen that due to the low CPU frequency at the beginning, in order to increase the UI refresh rate, the CPU occupancy rate has reached more than 90%, or even 100%. With the increase of the CPU frequency, the CPU computing power is gradually released. The CPU usage gradually decreased until it dropped to 73%.
应用本申请实施例提供的处理器参数调节方法,利用参数配置信息记录各个预设运行状态与对应的预设处理器参数,在需要进行处理器参数调节时,确定设备运行状态后,将其与参数配置信息中记录的预设运行状态进行匹配,判断是否存在与设备运行状态相匹配的目标运行状态。若匹配,则说明当前场景下处理器的参数调节过程已被设定好,因此可以从参数配置信息中获取目标运行状态对应的目标预设处理器参数,并按照目标预设 处理器参数进行处理器参数调节操作。该方法在进行处理器参数调节时不需要对处理器负载进行监控,而是直接按照预设好的目标预设处理器参数进行操作,因此可以避免因采集负载状态的频率较低,造成的无法及时调节处理器参数的问题;同时避免了采集负载状态的频率较高,则会占用CPU的较多资源,使得功耗较大的问题,解决了相关技术存在的无法及时调节处理器参数或调节过程功耗较大的问题。The processor parameter adjustment method provided in the embodiment of the present application is applied, and the parameter configuration information is used to record each preset operating state and the corresponding preset processor parameter. The preset operating states recorded in the parameter configuration information are matched to determine whether there is a target operating state that matches the operating state of the equipment. If it matches, it means that the parameter adjustment process of the processor in the current scene has been set. Therefore, the target preset processor parameters corresponding to the target operating state can be obtained from the parameter configuration information, and processed according to the target preset processor parameters. controller parameter adjustment operation. The method does not need to monitor the processor load when adjusting the processor parameters, but directly operates according to the preset target preset processor parameters, so it can avoid the failure caused by the low frequency of collecting the load state. The problem of adjusting processor parameters in time; at the same time, it avoids the high frequency of collecting the load state, which will occupy more resources of the CPU and make the power consumption larger. The problem of large process power consumption.
基于上述实施例,本实施例将对上述实施例中的若干步骤进行具体的阐述。可以理解的是,在利用参数配置信息进行处理器参数调节之前,需要先获取参数配置信息。因此在一种实施方式中,在确定设备运行状态之前,还可以包括:Based on the foregoing embodiments, this embodiment will specifically describe several steps in the foregoing embodiments. It can be understood that, before using the parameter configuration information to adjust the processor parameters, the parameter configuration information needs to be obtained first. Therefore, in an implementation manner, before determining the operating state of the device, it may further include:
步骤11:获取标准参数配置信息,并将标准参数配置信息确定为参数配置信息;标准参数配置信息基于标准设备训练得到,用于记录预设运行状态与预设处理器参数的对应关系。Step 11: Obtain standard parameter configuration information, and determine the standard parameter configuration information as parameter configuration information; the standard parameter configuration information is obtained based on standard equipment training, and is used to record the corresponding relationship between the preset operating state and the preset processor parameters.
在本实施方式中,多个设备采用相同的参数配置信息,即标准参数配置信息。标准参数配置信息基于标准设备训练得到,标准设备与执行处理器参数调节方法的电子设备的种类、型号等相同。由于二者种类型号相同,因此其工作状态基本相同,可以将标准参数配置信息作为参数配置信息,利用其进行本设备的处理器参数调节操作。In this embodiment, multiple devices use the same parameter configuration information, that is, standard parameter configuration information. The standard parameter configuration information is obtained based on standard equipment training, and the standard equipment is of the same type and model as the electronic equipment that executes the processor parameter adjustment method. Since the two are of the same type and model, their working states are basically the same, and the standard parameter configuration information can be used as parameter configuration information to adjust the processor parameters of the device.
在另一种实施方式中,即便各个电子的设备的种类型号都相同,不同的个体还是具有一定的差异,为了针对各个设备的情况进行处理器参数调节,在确定设备运行状态之前,还可以包括:In another implementation manner, even if the types and models of each electronic device are the same, different individuals still have certain differences. In order to adjust the processor parameters according to the conditions of each device, before determining the operating state of the device, it may further include: :
步骤21:确定多个预设运行状态,并获取多个基础处理器参数和各个预设运行状态分别对应的预设效果参数。Step 21: Determine multiple preset operating states, and acquire multiple basic processor parameters and preset effect parameters corresponding to each preset operating state.
在本实施例中,预设运行状态的数量为多个,每个预设运行状态对应于一个预设效果参数。预设效果参数的具体内容不做限定,例如可以为UI界面刷新率、输入响应率(例如遥控输入响应率、键盘输入响应率)、数据吞吐率等。同时,在每个预设运行状态下,还存在多个基础处理器参数。基础处理器参数用于限定处理器参数调节开始时的处理器参数,处理器参 数调节开始时的处理器参数具体可以为设备运行状态,或者可以为其他内容。其具体可以为一个值,或者可以为一个区间。由于在不同的设备运行状态下,可以采用不同的调节方式对处理器进行调节,最终实现相同的预设效果参数,因此可以为不用的基础处理器参数设置不同的预设处理器参数。In this embodiment, the number of preset operating states is multiple, and each preset operating state corresponds to a preset effect parameter. The specific content of the preset effect parameter is not limited, for example, it may be UI interface refresh rate, input response rate (eg, remote control input response rate, keyboard input response rate), data throughput rate, and the like. Meanwhile, in each preset operating state, there are also multiple basic processor parameters. The basic processor parameter is used to define the processor parameter at the beginning of the processor parameter adjustment, and the processor parameter at the beginning of the processor parameter adjustment may specifically be the device running state, or may be other content. Specifically, it can be a value, or can be an interval. Since different adjustment methods can be used to adjust the processor under different operating states of the device, the same preset effect parameters can be finally achieved, so different preset processor parameters can be set for different basic processor parameters.
进一步,在一种实施方式中,可以根据需要在多个候选运行状态中选择预设运行状态。具体的,确定多个预设运行状态的步骤可以包括:Further, in one embodiment, a preset operating state may be selected from a plurality of candidate operating states as required. Specifically, the step of determining multiple preset operating states may include:
步骤211:获取场景选择指令,并根据场景选择指令在多个候选运行状态中选择预设运行状态。Step 211 : Acquire a scenario selection instruction, and select a preset operating state from a plurality of candidate operating states according to the scenario selection instruction.
场景选择指令可以由用户输入,或者可以由其他电子设备发送。候选运行状态被提前设备,其具体内容不做限定。例如当电子设备存在多个型号,不同型号之间具有一些不同的预设运行状态,也具有一些相同的预设运行状态。为了提高参数配置信息的生成效率,可以将各种型号所有的预设运行状态确定为候选运行状态,并在生成参数配置信息时根据场景选择指令从中选择预设运行状态。The scene selection instruction may be input by the user, or may be sent by other electronic devices. The candidate operating state is advanced to the device, and its specific content is not limited. For example, when there are multiple models of electronic equipment, different models have some different preset operating states, and also have some same preset operating states. In order to improve the generation efficiency of the parameter configuration information, all preset operating states of various models may be determined as candidate operating states, and the preset operating states may be selected from among them according to the scene selection instruction when the parameter configuration information is generated.
步骤22:分别基于各个基础处理器参数,对初始处理器参数进行训练,得到满足各个预设效果参数的预设处理器参数。Step 22: Perform training on the initial processor parameters based on the respective basic processor parameters to obtain preset processor parameters that satisfy the preset effect parameters.
初始处理器参数为预设处理器参数的基础,其具体内容不做限定,例如可以为最低功耗处理器参数,或者可以为最大性能处理器参数,即最高功耗处理器参数。通过以满足预设效果参数为标准,对初始处理器参数进行训练和调整,最终得到在各个预设运行状态下,各个基础处理器参数对应的预设处理器参数。可以理解的是,根据初始处理器参数具体内容的不同,其对应的训练方式也不同,例如当初始处理器参数为最低功耗处理器参数,且具体内容为处理器频率时,训练的内容包括升频点(或降频点)和升频值(或降频值)时,对应的训练方式可以为升频点(或降频点)调整训练和/或升频值(或降频值)调整训练。即在初始处理器参数的基础上设置多个升频点(或降频点),每个升频点具有对应的升频值(或降频值),通过对每个升频点的时机和对应的升频值的大小进行调节,得到满足预设效果参数的预设处理器参数。训练时,可以获取与预设运行状态对应的测 试程序,在测试程序运行过程中对初始处理器参数进行训练,并根据运行结果判断是否满足了预设效果参数。The initial processor parameter is the basis of the preset processor parameter, and its specific content is not limited, for example, it may be the lowest power consumption processor parameter, or may be the maximum performance processor parameter, that is, the highest power consumption processor parameter. The initial processor parameters are trained and adjusted by satisfying the preset effect parameters as the standard, and finally the preset processor parameters corresponding to the respective basic processor parameters in the respective preset operating states are obtained. It can be understood that according to the specific content of the initial processor parameters, the corresponding training methods are also different. For example, when the initial processor parameters are the lowest power consumption processor parameters, and the specific content is the processor frequency, the training content includes: When the up-frequency point (or down-frequency point) and up-frequency value (or down-frequency value), the corresponding training method can be adjusted for the up-frequency point (or down-frequency point) training and/or up-frequency value (or down-frequency value) Adjust training. That is, multiple up-frequency points (or down-frequency points) are set on the basis of the initial processor parameters, and each up-frequency point has a corresponding up-frequency value (or down-frequency value). The magnitude of the corresponding upscaling value is adjusted to obtain preset processor parameters that satisfy the preset effect parameters. During training, the test program corresponding to the preset running state can be obtained, the initial processor parameters are trained during the running process of the test program, and whether the preset effect parameters are satisfied is judged according to the running result.
例如当共有A、B两个预设运行状态时,共有3个基础处理器参数,分别对应于2~4个进程,以及4~6个进程这两种基础处理器参数,A对应的预设效果参数为在50ms内使得UI刷新率达到60Hz,B对应的预设效果参数为1s内使得数据吞吐率达到100Mb/s。在这种情况下,可以得到A情况下2~4个进程对应的第一预设处理器参数、A情况下4~6个进程对应的第二预设处理器参数、B情况下2~4个进程对应的第三预设处理器参数、B情况下4~6个进程对应的第四预设处理器参数,共四个预设处理器参数。For example, when there are two preset operating states, A and B, there are 3 basic processor parameters, corresponding to 2 to 4 processes and 4 to 6 processes. The effect parameter is to make the UI refresh rate reach 60Hz within 50ms, and the preset effect parameter corresponding to B is to make the data throughput rate reach 100Mb/s within 1s. In this case, the first preset processor parameters corresponding to 2 to 4 processes in case A, the second preset processor parameters corresponding to 4 to 6 processes in case A, and 2 to 4 in case B can be obtained. The third preset processor parameter corresponding to one process, and the fourth preset processor parameter corresponding to 4 to 6 processes in case B, there are four preset processor parameters in total.
在一种具体的实施方式中,为了使得处理器参数调整后的功耗较小,对初始处理器参数进行训练,得到满足各个预设效果参数的预设处理器参数的步骤可以包括:In a specific embodiment, in order to make the power consumption after the adjustment of the processor parameters smaller, the initial processor parameters are trained, and the steps of obtaining preset processor parameters satisfying each preset effect parameter may include:
步骤221:针对任一预设效果参数,对初始处理器参数进行基于预设单位长度的参数调节处理,得到多个满足预设效果参数的候选处理器参数:。Step 221: For any preset effect parameter, perform parameter adjustment processing based on the preset unit length on the initial processor parameter, and obtain a plurality of candidate processor parameters that satisfy the preset effect parameter: .
需要说明的是,本实施例中的参数调节处理包括升频点滞后处理和/或升频值降低处理,除此之外,还可以包括采样率调整、升降频步长调整,CPU核数调整等多项处理中的若干项,或者还可以包括其他调节处理。初始处理器参数为处理器最大性能参数。处理器最大性能参数即为立即将处理器调节为最大性能,由于在处理器发挥出最大性能时预设效果参数必然可以满足,因此可以将确定可以满足效果的处理器最大性能参数作为初始处理器参数,通过对其进行调节,可以得到候选处理器参数。在满足预设效果参数的前提下,通过降低处理器的升频值,即不将处理器设置为最大频率,或者推迟升频点,即不在第一时间将处理器进行升频,可以降低处理器的功耗。例如在一种实施方式中,候选处理器参数具有多个处理器子参数,通过设置各个处理器子参数对应的时刻,即升频点,或者设置各个处理器子参数的大小,即升频值,可以得到多个满足预设效果参数的候选处理器参数。It should be noted that the parameter adjustment processing in this embodiment includes up-frequency point lag processing and/or up-frequency value reduction processing, and in addition to this, may also include sampling rate adjustment, up-down frequency step size adjustment, and CPU core count adjustment several of the multiple processes, or may also include other adjustment processes. The initial processor parameter is the maximum performance parameter of the processor. The maximum performance parameter of the processor is to immediately adjust the processor to the maximum performance. Since the preset effect parameters must be satisfied when the processor exerts the maximum performance, the maximum performance parameter of the processor that can satisfy the effect can be determined as the initial processor. parameters, and by adjusting them, candidate processor parameters can be obtained. On the premise of satisfying the preset effect parameters, by reducing the up-frequency value of the processor, that is, not setting the processor to the maximum frequency, or delaying the up-frequency point, that is, not up-converting the processor at the first time, the processing can be reduced. power consumption of the device. For example, in one embodiment, the candidate processor parameter has multiple processor sub-parameters. By setting the time corresponding to each processor sub-parameter, that is, the up-frequency point, or setting the size of each processor sub-parameter, that is, the up-frequency value , a plurality of candidate processor parameters that satisfy the preset effect parameters can be obtained.
步骤222:检测各个候选处理器参数对应的处理器功耗,并将最小处理器功耗对应的候选处理器参数确定为预设处理器参数。Step 222: Detect the processor power consumption corresponding to each candidate processor parameter, and determine the candidate processor parameter corresponding to the minimum processor power consumption as the preset processor parameter.
在得到候选处理器参数后,检测其分别对应的处理器功耗,并将功耗最小的候选处理器参数确定为预设处理器参数,使得根据其调节后的处理器能够采用最小的功耗满足预设效果参数。After the candidate processor parameters are obtained, the corresponding processor power consumption is detected, and the candidate processor parameter with the smallest power consumption is determined as the preset processor parameter, so that the processor adjusted according to it can adopt the minimum power consumption Meet the preset effect parameters.
步骤23:利用预设处理器参数、基础处理器参数和预设运行状态生成参数配置信息。Step 23: Generate parameter configuration information using preset processor parameters, basic processor parameters, and preset operating states.
在得到预设处理器参数后,利用其与预设运行状态和基础处理器参数共同生成参数配置信息。After the preset processor parameters are obtained, the parameter configuration information is generated by using them together with the preset operating state and the basic processor parameters.
相应的,从参数配置信息中获取目标运行状态对应的目标预设处理器参数的步骤可以包括:Correspondingly, the step of obtaining the target preset processor parameters corresponding to the target operating state from the parameter configuration information may include:
步骤31:利用目标运行状态对参数配置信息进行筛选,得到目标运行状态对应的多个预设处理器参数;Step 31: Screen the parameter configuration information by using the target operating state to obtain a plurality of preset processor parameters corresponding to the target operating state;
在获取目标运行状态后,利用其对参数配置进行筛选,得到对应的多个预设处理器参数,可以理解的是,每个预设处理器参数对应于不同基础处理器参数。After acquiring the target operating state, use it to filter the parameter configuration to obtain a plurality of corresponding preset processor parameters. It can be understood that each preset processor parameter corresponds to a different basic processor parameter.
步骤32:利用当前处理器参数对各个基础处理器参数进行筛选,得到目标基础处理器参数,并将目标基础处理器参数对应的预设处理器参数确定为目标预设处理器参数。Step 32: Screen each basic processor parameter by using the current processor parameter to obtain the target basic processor parameter, and determine the preset processor parameter corresponding to the target basic processor parameter as the target preset processor parameter.
在确定预设处理器参数后,利用当前处理器参数,对基础处理器参数进行筛选,确定目标基础处理器参数后,将其对应的预设参数确定为目标预设处理器参数。例如当当前处理器参数为700MHz时,则[600MHz,800MHz]对应的基础处理器参数为目标基础处理器参数。After the preset processor parameters are determined, the current processor parameters are used to screen the basic processor parameters, and after the target basic processor parameters are determined, the corresponding preset parameters are determined as the target preset processor parameters. For example, when the current processor parameter is 700MHz, the basic processor parameter corresponding to [600MHz, 800MHz] is the target basic processor parameter.
下面对本申请实施例提供的处理器参数调节装置进行介绍,下文描述的处理器参数调节装置与上文描述的处理器参数调节方法可相互对应参照。The following describes the processor parameter adjustment device provided by the embodiment of the present application. The processor parameter adjustment device described below and the processor parameter adjustment method described above may refer to each other correspondingly.
请参考图3,图3为本申请实施例提供的一种处理器参数调节装置的结构示意图,包括:Please refer to FIG. 3. FIG. 3 is a schematic structural diagram of a processor parameter adjustment device provided by an embodiment of the present application, including:
状态判断模块110,用于确定设备运行状态,并判断参数配置信息中是否存在与设备运行状态匹配的目标运行状态;The state judgment module 110 is used for determining the operating state of the equipment, and judging whether there is a target operating state matching the operating state of the equipment in the parameter configuration information;
参数获取模块120,用于若存在目标运行状态,则从参数配置信息中获取目标运行状态对应的目标预设处理器参数;The parameter obtaining module 120 is configured to obtain target preset processor parameters corresponding to the target operating state from the parameter configuration information if there is a target operating state;
参数调节模块130,用于按照目标预设处理器参数进行处理器参数调节操作。The parameter adjustment module 130 is configured to perform a processor parameter adjustment operation according to target preset processor parameters.
可选地,还包括:Optionally, also include:
获取模块,用于确定多个预设运行状态,并获取多个基础处理器参数和各个预设运行状态分别对应的预设效果参数;an acquisition module for determining multiple preset operating states, and acquiring multiple basic processor parameters and preset effect parameters corresponding to each preset operating state;
训练模块,用于分别基于各个基础处理器参数,对初始处理器参数进行训练,得到满足各个预设效果参数的预设处理器参数;The training module is used to train the initial processor parameters based on the respective basic processor parameters, so as to obtain preset processor parameters that satisfy the preset effect parameters;
生成模块,用于利用预设处理器参数、基础处理器参数和预设运行状态生成参数配置信息。The generating module is used for generating parameter configuration information by using preset processor parameters, basic processor parameters and preset operating states.
可选地,训练模块,包括:Optionally, a training module including:
参数调节单元,用于针对任一预设效果参数,对初始处理器参数进行基于预设单位长度的参数调节处理,得到多个满足预设效果参数的候选处理器参数;参数调节处理包括升频点滞后处理和/或升频值降低处理,初始处理器参数为处理器最大性能参数;A parameter adjustment unit, configured to perform a parameter adjustment process based on a preset unit length on the initial processor parameter for any preset effect parameter, to obtain a plurality of candidate processor parameters that satisfy the preset effect parameter; the parameter adjustment process includes upscaling Dot lag processing and/or upscaling value reduction processing, the initial processor parameters are the maximum performance parameters of the processor;
功耗筛选单元,用于检测各个候选处理器参数对应的处理器功耗,并将最小处理器功耗对应的候选处理器参数确定为预设处理器参数。The power consumption screening unit is configured to detect the processor power consumption corresponding to each candidate processor parameter, and determine the candidate processor parameter corresponding to the minimum processor power consumption as the preset processor parameter.
可选地,获取模块,包括:Optionally, get modules, including:
预设运行状态选择单元,用于获取场景选择指令,并根据场景选择指令在多个候选运行状态中选择预设运行状态。The preset operating state selection unit is used to obtain a scenario selection instruction, and select a preset operating state from a plurality of candidate operating states according to the scenario selection instruction.
可选地,还包括:Optionally, also include:
标准信息获取模块,用于获取标准参数配置信息,并将标准参数配置信息确定为参数配置信息;标准参数配置信息基于标准设备训练得到,用于记录预设运行状态与预设处理器参数的对应关系。The standard information acquisition module is used to acquire standard parameter configuration information, and determine the standard parameter configuration information as parameter configuration information; the standard parameter configuration information is obtained based on standard equipment training, and is used to record the correspondence between the preset operating state and the preset processor parameters relation.
可选地,参数获取模块120,包括:Optionally, the parameter obtaining module 120 includes:
第一筛选单元,用于利用目标运行状态对参数配置信息进行筛选,得到目标运行状态对应的多个预设处理器参数;预设处理器参数对应于不同的基础处理器参数;a first screening unit, configured to screen the parameter configuration information by using the target operating state to obtain a plurality of preset processor parameters corresponding to the target operating state; the preset processor parameters correspond to different basic processor parameters;
第二筛选单元,用于利用当前处理器参数对各个基础处理器参数进行筛选,得到目标基础处理器参数,并将目标基础处理器参数对应的预设处理器参数确定为目标预设处理器参数。The second screening unit is configured to screen each basic processor parameter by using the current processor parameter to obtain the target basic processor parameter, and determine the preset processor parameter corresponding to the target basic processor parameter as the target preset processor parameter .
可选地,包括:Optionally, include:
动态调节单元,用于根据动态调节策略进行处理器参数调节操作。The dynamic adjustment unit is used to adjust the processor parameters according to the dynamic adjustment strategy.
下面对本申请实施例提供的电子设备进行介绍,下文描述的电子设备与上文描述的处理器参数调节方法可相互对应参照。The electronic device provided by the embodiments of the present application will be introduced below, and the electronic device described below and the processor parameter adjustment method described above may refer to each other correspondingly.
请参考图4,图4为本申请实施例提供的一种电子设备的结构示意图。其中电子设备100可以包括处理器101和存储器102,还可以进一步包括多媒体组件103、信息输入/信息输出(I/O)接口104以及通信组件105中的一种或多种。Please refer to FIG. 4 , which is a schematic structural diagram of an electronic device according to an embodiment of the present application. The electronic device 100 may include a processor 101 and a memory 102 , and may further include one or more of a multimedia component 103 , an information input/information output (I/O) interface 104 and a communication component 105 .
其中,处理器101用于控制电子设备100的整体操作,以完成上述的处理器参数调节方法中的全部或部分步骤;存储器102用于存储各种类型的数据以支持在电子设备100的操作,这些数据例如可以包括用于在该电子设备100上操作的任何应用程序或方法的指令,以及应用程序相关的数据。该存储器102可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,例如静态随机存取存储器(Static Random Access Memory,SRAM)、电可擦除可编程只读存储器(Electrically Erasable Programmable Read-Only Memory,EEPROM)、可擦除可编程只读存储器(Erasable Programmable Read-Only Memory,EPROM)、可编程只读存储器(Programmable Read-Only Memory,PROM)、只读存储器(Read-Only Memory,ROM)、磁存储器、快闪存储器、磁盘或光盘中的一种或多种。Wherein, the processor 101 is used to control the overall operation of the electronic device 100 to complete all or part of the steps in the above-mentioned processor parameter adjustment method; the memory 102 is used to store various types of data to support the operation of the electronic device 100, These data may include, for example, instructions for any application or method operating on the electronic device 100, as well as application-related data. The memory 102 may be implemented by any type of volatile or non-volatile memory device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (Electrically Erasable Programmable Read-Only Memory) Erasable Programmable Read-Only Memory, EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (Read- One or more of Only Memory, ROM), magnetic memory, flash memory, magnetic disk or optical disk.
多媒体组件103可以包括屏幕和音频组件。其中屏幕例如可以是触摸屏,音频组件用于输出和/或输入音频信号。例如,音频组件可以包括一个麦克风,麦克风用于接收外部音频信号。所接收的音频信号可以被进一步存储在存储器102或通过通信组件105发送。音频组件还包括至少一个扬声器,用于输出音频信号。I/O接口104为处理器101和其他接口模块之间提供接口,上述其他接口模块可以是键盘,鼠标,按钮等。这些按钮可以是虚 拟按钮或者实体按钮。通信组件105用于电子设备100与其他设备之间进行有线或无线通信。无线通信,例如Wi-Fi,蓝牙,近场通信(Near Field Communication,简称NFC),2G、3G或4G,或它们中的一种或几种的组合,因此相应的该通信组件105可以包括:Wi-Fi部件,蓝牙部件,NFC部件。 Multimedia components 103 may include screen and audio components. Wherein the screen can be, for example, a touch screen, and the audio component is used for outputting and/or inputting audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may be further stored in the memory 102 or transmitted through the communication component 105 . The audio assembly also includes at least one speaker for outputting audio signals. The I/O interface 104 provides an interface between the processor 101 and other interface modules, and the above-mentioned other interface modules may be a keyboard, a mouse, a button, and the like. These buttons can be virtual buttons or physical buttons. The communication component 105 is used for wired or wireless communication between the electronic device 100 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC for short), 2G, 3G or 4G, or one or a combination of them, so the corresponding communication component 105 may include: Wi-Fi parts, Bluetooth parts, NFC parts.
电子设备100可以被一个或多个应用专用集成电路(Application Specific Integrated Circuit,简称ASIC)、数字信号处理器(Digital Signal Processor,简称DSP)、数字信号处理设备(Digital Signal Processing Device,简称DSPD)、可编程逻辑器件(Programmable Logic Device,简称PLD)、现场可编程门阵列(Field Programmable Gate Array,简称FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述实施例给出的处理器参数调节方法。The electronic device 100 may be composed of one or more Application Specific Integrated Circuit (ASIC for short), Digital Signal Processor (DSP for short), Digital Signal Processing Device (DSPD for short), Programmable logic device (Programmable Logic Device, PLD for short), Field Programmable Gate Array (Field Programmable Gate Array, FPGA for short), controller, microcontroller, microprocessor or other electronic components are implemented for implementing the above embodiments The given processor parameter adjustment method.
下面对本申请实施例提供的计算机可读存储介质进行介绍,下文描述的计算机可读存储介质与上文描述的处理器参数调节方法可相互对应参照。The computer-readable storage medium provided by the embodiments of the present application is introduced below. The computer-readable storage medium described below and the processor parameter adjustment method described above may refer to each other correspondingly.
本申请还提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,计算机程序被处理器执行时实现上述的处理器参数调节方法的步骤。The present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the above-mentioned processor parameter adjustment method are implemented.
该计算机可读存储介质可以包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The computer-readable storage medium may include: a USB flash drive, a removable hard disk, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, etc. that can store program codes medium.
本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其它实施例的不同之处,各个实施例之间相同或相似部分互相参见即可。对于实施例公开的装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments may be referred to each other. As for the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant part can be referred to the description of the method.
本领域技术人员还可以进一步意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经 按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件的方式来执行,取决于技术方案的特定应用和设计约束条件。本领域技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应该认为超出本申请的范围。Those skilled in the art may further realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two, in order to clearly illustrate the hardware and software In the above description, the components and steps of each example have been generally described according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may use different approaches to implement the described functionality for each particular application, but such implementations should not be considered beyond the scope of this application.
结合本文中所公开的实施例描述的方法或算法的步骤可以直接用硬件、处理器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质中。The steps of a method or algorithm described in conjunction with the embodiments disclosed herein may be directly implemented in hardware, a software module executed by a processor, or a combination of the two. A software module can be placed in random access memory (RAM), internal memory, read only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other in the technical field. in any other known form of storage medium.
最后,还需要说明的是,在本文中,诸如第一和第二等之类的关系属于仅仅用来将一个实体或者操作与另一个实体或者操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语包括、包含或者其他任何变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。Finally, it should also be noted that, in this context, relationships such as first and second, etc., are used only to distinguish one entity or operation from another, and do not necessarily require or imply these entities or that there is any such actual relationship or sequence between operations. Furthermore, the terms including, comprising, or any other variation are intended to cover non-exclusive inclusion such that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or Yes also includes elements inherent to such a process, method, article or apparatus.
本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。The principles and implementations of the present application are described herein by using specific examples. The descriptions of the above embodiments are only used to help understand the methods and core ideas of the present application. There will be changes in the specific implementation and application scope. To sum up, the content of this specification should not be construed as a limitation to the application.

Claims (10)

  1. 一种处理器参数调节方法,其特征在于,包括:A method for adjusting processor parameters, comprising:
    确定设备运行状态,并判断参数配置信息中是否存在与所述设备运行状态匹配的目标运行状态;Determine the operating state of the device, and determine whether there is a target operating state matching the operating state of the device in the parameter configuration information;
    若存在所述目标运行状态,则从参数配置信息中获取所述目标运行状态对应的目标预设处理器参数;If the target operating state exists, acquiring the target preset processor parameter corresponding to the target operating state from the parameter configuration information;
    按照所述目标预设处理器参数进行处理器参数调节操作。The processor parameter adjustment operation is performed according to the target preset processor parameter.
  2. 根据权利要求1所述的处理器参数调节方法,其特征在于,在所述确定设备运行状态之前,还包括:The processor parameter adjustment method according to claim 1, characterized in that before said determining the operating state of the device, further comprising:
    确定多个预设运行状态,并获取多个基础处理器参数和各个所述预设运行状态分别对应的预设效果参数;determining multiple preset operating states, and acquiring multiple basic processor parameters and preset effect parameters corresponding to each of the preset operating states;
    分别基于各个所述基础处理器参数,对初始处理器参数进行训练,得到满足各个所述预设效果参数的预设处理器参数;Based on each of the basic processor parameters, the initial processor parameters are trained to obtain preset processor parameters that satisfy each of the preset effect parameters;
    利用所述预设处理器参数、所述基础处理器参数和所述预设运行状态生成所述参数配置信息。The parameter configuration information is generated using the preset processor parameters, the basic processor parameters, and the preset operating state.
  3. 根据权利要求2所述的处理器参数调节方法,其特征在于,所述对初始处理器参数进行训练,得到满足各个所述预设效果参数的预设处理器参数,包括:The method for adjusting processor parameters according to claim 2, wherein the training on initial processor parameters to obtain preset processor parameters satisfying each of the preset effect parameters comprises:
    针对任一所述预设效果参数,对所述初始处理器参数进行基于预设单位长度的参数调节处理,得到多个满足所述预设效果参数的候选处理器参数;所述参数调节处理包括升频点滞后处理和/或升频值降低处理,所述初始处理器参数为处理器最大性能参数;For any of the preset effect parameters, a parameter adjustment process based on a preset unit length is performed on the initial processor parameter to obtain a plurality of candidate processor parameters that satisfy the preset effect parameter; the parameter adjustment process includes: The up-frequency point lag processing and/or the up-frequency value reduction processing, the initial processor parameter is the maximum performance parameter of the processor;
    检测各个所述候选处理器参数对应的处理器功耗,并将最小处理器功耗对应的所述候选处理器参数确定为所述预设处理器参数。The processor power consumption corresponding to each of the candidate processor parameters is detected, and the candidate processor parameter corresponding to the minimum processor power consumption is determined as the preset processor parameter.
  4. 根据权利要求2所述的处理器参数调节方法,其特征在于,所述确定多个预设运行状态,包括:The processor parameter adjustment method according to claim 2, wherein the determining a plurality of preset operating states comprises:
    获取场景选择指令,并根据所述场景选择指令在多个候选运行状态中选择所述预设运行状态。A scenario selection instruction is acquired, and the preset operating state is selected from a plurality of candidate operating states according to the scenario selection instruction.
  5. 根据权利要求1所述的处理器参数调节方法,其特征在于,在所述 确定设备运行状态之前,还包括:The processor parameter adjustment method according to claim 1, is characterized in that, before described determining equipment operating state, also comprises:
    获取标准参数配置信息,并将所述标准参数配置信息确定为所述参数配置信息;所述标准参数配置信息基于标准设备训练得到,用于记录预设运行状态与预设处理器参数的对应关系。Obtain standard parameter configuration information, and determine the standard parameter configuration information as the parameter configuration information; the standard parameter configuration information is obtained based on standard equipment training, and is used to record the corresponding relationship between the preset operating state and the preset processor parameters .
  6. 根据权利要求1所述的处理器参数调节方法,其特征在于,所述从参数配置信息中获取所述目标运行状态对应的目标预设处理器参数,包括:The processor parameter adjustment method according to claim 1, wherein the acquiring the target preset processor parameter corresponding to the target operating state from parameter configuration information comprises:
    利用所述目标运行状态对所述参数配置信息进行筛选,得到所述目标运行状态对应的多个预设处理器参数;所述预设处理器参数对应于不同的基础处理器参数;Screening the parameter configuration information by using the target operating state to obtain a plurality of preset processor parameters corresponding to the target operating state; the preset processor parameters corresponding to different basic processor parameters;
    利用当前处理器参数对各个所述基础处理器参数进行筛选,得到目标基础处理器参数,并将所述目标基础处理器参数对应的所述预设处理器参数确定为所述目标预设处理器参数。Screen each of the basic processor parameters by using the current processor parameters to obtain target basic processor parameters, and determine the preset processor parameter corresponding to the target basic processor parameter as the target preset processor parameter.
  7. 根据权利要求1所述的处理器参数调节方法,其特征在于,若不存在所述目标运行状态,包括:The processor parameter adjustment method according to claim 1, wherein if the target operating state does not exist, the method comprises:
    根据动态调节策略进行处理器参数调节操作。The processor parameter adjustment operation is performed according to the dynamic adjustment strategy.
  8. 一种处理器参数调节装置,其特征在于,包括:A processor parameter adjustment device, characterized in that it includes:
    状态判断模块,用于确定设备运行状态,并判断参数配置信息中是否存在与所述设备运行状态匹配的目标运行状态;a state judging module, used for determining the operating state of the equipment, and judging whether there is a target operating state matching the operating state of the equipment in the parameter configuration information;
    参数获取模块,用于若存在所述目标运行状态,则从参数配置信息中获取所述目标运行状态对应的目标预设处理器参数;a parameter obtaining module, configured to obtain the target preset processor parameter corresponding to the target operating state from the parameter configuration information if the target operating state exists;
    参数调节模块,用于按照所述目标预设处理器参数进行处理器参数调节操作。A parameter adjustment module, configured to perform a processor parameter adjustment operation according to the target preset processor parameter.
  9. 一种电子设备,其特征在于,包括存储器和处理器,其中:An electronic device, comprising a memory and a processor, wherein:
    所述存储器,用于保存计算机程序;the memory for storing computer programs;
    所述处理器,用于执行所述计算机程序,以实现如权利要求1至7任一项所述的处理器参数调节方法。The processor is configured to execute the computer program to implement the processor parameter adjustment method according to any one of claims 1 to 7.
  10. 一种计算机可读存储介质,其特征在于,用于保存计算机程序,其中,所述计算机程序被处理器执行时实现如权利要求1至7任一项所述的处理器参数调节方法。A computer-readable storage medium, characterized in that it is used for storing a computer program, wherein when the computer program is executed by a processor, the processor parameter adjustment method according to any one of claims 1 to 7 is implemented.
PCT/CN2021/125170 2021-01-18 2021-10-21 Processor parameter adjustment method, apparatus, electronic device, and storage medium WO2022151783A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110063759.4A CN112667407B (en) 2021-01-18 2021-01-18 Processor parameter adjusting method and device, electronic equipment and storage medium
CN202110063759.4 2021-01-18

Publications (1)

Publication Number Publication Date
WO2022151783A1 true WO2022151783A1 (en) 2022-07-21

Family

ID=75415520

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/125170 WO2022151783A1 (en) 2021-01-18 2021-10-21 Processor parameter adjustment method, apparatus, electronic device, and storage medium

Country Status (2)

Country Link
CN (1) CN112667407B (en)
WO (1) WO2022151783A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115168059A (en) * 2022-09-07 2022-10-11 平安银行股份有限公司 System kernel monitoring method and device, terminal equipment and storage medium
CN115374164A (en) * 2022-10-20 2022-11-22 深圳比特微电子科技有限公司 Frequency searching and adjusting speed method and device and data processing equipment
CN115657570A (en) * 2022-12-23 2023-01-31 深圳曦华科技有限公司 Intelligent control method and device for chip in low power consumption mode and storage medium
CN115766453A (en) * 2022-12-07 2023-03-07 中国工商银行股份有限公司 Alarm system configuration method, device, equipment, medium and product

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112667407B (en) * 2021-01-18 2023-09-19 成都国科微电子有限公司 Processor parameter adjusting method and device, electronic equipment and storage medium
CN114413437B (en) * 2021-12-31 2024-04-02 北京小米移动软件有限公司 Air conditioner compressor parameter adjusting method, device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2224703A1 (en) * 2009-02-26 2010-09-01 Research In Motion Limited Mobile wireless communications device with novelty voice alteration and related methods
CN104346226A (en) * 2013-08-09 2015-02-11 联想(北京)有限公司 Processor frequency control method and electronic equipment
CN109491494A (en) * 2018-11-26 2019-03-19 北京地平线机器人技术研发有限公司 Method of adjustment, device and the intensified learning model training method of power parameter
CN111708642A (en) * 2020-08-20 2020-09-25 北京爱奇艺智能科技有限公司 Processor performance optimization method and device in VR system and VR equipment
CN112667407A (en) * 2021-01-18 2021-04-16 成都国科微电子有限公司 Processor parameter adjusting method and device, electronic equipment and storage medium

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104317612B (en) * 2014-10-14 2017-09-19 中国航天科工集团第二研究院七〇六所 The method of Loongson processor Memory Controller Hub parameter interactive mode debugging
CN106292990A (en) * 2015-06-01 2017-01-04 中兴通讯股份有限公司 The method of adjustment of CPU operational factor and terminal
CN106229003B (en) * 2016-08-31 2018-09-18 浙江大华技术股份有限公司 The method and device of radiating fan rotation speed in a kind of adjustment storage device
CN107621982B (en) * 2017-09-08 2020-09-25 维沃移动通信有限公司 Method for adjusting performance parameters of processor and mobile terminal
CN108803860A (en) * 2018-06-26 2018-11-13 联想(北京)有限公司 A kind of regulating power consumption method and electronic equipment
CN112703714B (en) * 2018-11-05 2023-05-05 深圳市欢太科技有限公司 Application processing method and device, computer equipment and computer readable storage medium
CN110134215B (en) * 2019-05-24 2021-08-13 广东中兴新支点技术有限公司 Data processing method and device, electronic equipment and readable storage medium
CN111722931A (en) * 2020-06-24 2020-09-29 龙芯中科技术有限公司 Control method, device and equipment of processor and storage medium
CN111831443A (en) * 2020-07-01 2020-10-27 Oppo广东移动通信有限公司 Processor state adjusting method and device, storage medium and electronic equipment
CN112130940B (en) * 2020-08-25 2023-11-17 北京小米移动软件有限公司 Terminal control method and device, storage medium and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2224703A1 (en) * 2009-02-26 2010-09-01 Research In Motion Limited Mobile wireless communications device with novelty voice alteration and related methods
CN104346226A (en) * 2013-08-09 2015-02-11 联想(北京)有限公司 Processor frequency control method and electronic equipment
CN109491494A (en) * 2018-11-26 2019-03-19 北京地平线机器人技术研发有限公司 Method of adjustment, device and the intensified learning model training method of power parameter
CN111708642A (en) * 2020-08-20 2020-09-25 北京爱奇艺智能科技有限公司 Processor performance optimization method and device in VR system and VR equipment
CN112667407A (en) * 2021-01-18 2021-04-16 成都国科微电子有限公司 Processor parameter adjusting method and device, electronic equipment and storage medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115168059A (en) * 2022-09-07 2022-10-11 平安银行股份有限公司 System kernel monitoring method and device, terminal equipment and storage medium
CN115168059B (en) * 2022-09-07 2022-12-16 平安银行股份有限公司 System kernel monitoring method and device, terminal equipment and storage medium
CN115374164A (en) * 2022-10-20 2022-11-22 深圳比特微电子科技有限公司 Frequency searching and adjusting speed method and device and data processing equipment
CN115374164B (en) * 2022-10-20 2023-04-28 深圳比特微电子科技有限公司 Frequency searching and speed regulating method and device and data processing equipment
CN115766453A (en) * 2022-12-07 2023-03-07 中国工商银行股份有限公司 Alarm system configuration method, device, equipment, medium and product
CN115657570A (en) * 2022-12-23 2023-01-31 深圳曦华科技有限公司 Intelligent control method and device for chip in low power consumption mode and storage medium

Also Published As

Publication number Publication date
CN112667407A (en) 2021-04-16
CN112667407B (en) 2023-09-19

Similar Documents

Publication Publication Date Title
WO2022151783A1 (en) Processor parameter adjustment method, apparatus, electronic device, and storage medium
CN102831894B (en) Command processing method, command processing device and command processing system
CN105955876B (en) Data monitoring processing method and device
WO2015188581A1 (en) Method and device for audio control of motor vibration
WO2021052098A1 (en) Blockchain transaction method, apparatus and device, and computer readable storage medium
WO2020078206A1 (en) Task scheduling method and device, terminal, and storage medium
CN108564948A (en) A kind of audio recognition method and electronic equipment
CN103713876B (en) Data processing method and electronic equipment
CN105677593A (en) Self-adaption adjustment method and device for write operation timing path of chip storage
CN104485909B (en) Gain control method and device
JP2008234638A (en) Controller for processing apparatus
WO2016058414A1 (en) Method and device for processing terminal application
CN107016996B (en) Audio data processing method and device
US20190159111A1 (en) Method for Wireless Fidelity Network Scanning and Terminal Device
EP3282680B1 (en) Blowing action-based method for operating mobile terminal and mobile terminal
CN106453940B (en) A kind of method and device adjusting volume
CN105549744B (en) A kind of screen luminance of terminal adjusting method and device
WO2017198112A1 (en) Frequency switching method and apparatus, and computer readable storage medium
US20100146322A1 (en) Method for overclocking central processing unit of computer motherboard
CN105740073A (en) Method and apparatus for dynamically controlling quantity of operation system processes
CN115728382A (en) Fruit maturity detection method, device, equipment and storage medium
CN108595142B (en) Volume adjusting method and device
WO2016054902A1 (en) Central processing unit clock management method, apparatus and storage medium
WO2021077263A1 (en) Power consumption log processing method and apparatus, electronic device, and storage medium
CN105786443A (en) Frequency response correction method, processing chip and terminal equipment

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21918974

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 11202305462U

Country of ref document: SG

122 Ep: pct application non-entry in european phase

Ref document number: 21918974

Country of ref document: EP

Kind code of ref document: A1