WO2018018820A1 - 处理器工作频率和/或工作核数的调整方法、装置和终端 - Google Patents

处理器工作频率和/或工作核数的调整方法、装置和终端 Download PDF

Info

Publication number
WO2018018820A1
WO2018018820A1 PCT/CN2016/107949 CN2016107949W WO2018018820A1 WO 2018018820 A1 WO2018018820 A1 WO 2018018820A1 CN 2016107949 W CN2016107949 W CN 2016107949W WO 2018018820 A1 WO2018018820 A1 WO 2018018820A1
Authority
WO
WIPO (PCT)
Prior art keywords
working
application
operating frequency
frequency
processor
Prior art date
Application number
PCT/CN2016/107949
Other languages
English (en)
French (fr)
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 WO2018018820A1 publication Critical patent/WO2018018820A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • G06F1/3243Power saving in microcontroller unit
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • 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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • G06F9/4451User profiles; Roaming

Definitions

  • the present invention relates to the field of terminal technologies, and in particular, to a method for adjusting an operating frequency and/or a working core of a processor, an adjusting device for operating frequency and/or working core of a processor, and a terminal.
  • the standby frequency is extended by limiting the operating frequency of the CPU and/or the GPU and the number of working cores when the application is run.
  • some terminal manufacturers pre-write the package name of the application that needs to be limited and/or limited in the configuration file, the maximum frequency and maximum number of cores allowed by the CPU and/or GPU, thus saving the province.
  • the purpose of the electrical, but usually the third-party application installed by the user is not in the configuration file list. If the third-party application is to be limited and/or limited, it needs to be manually set by the user, which is complicated and affects the user. The experience of using.
  • the present invention is based on at least one of the above technical problems, and proposes a new adjustment scheme for detecting whether a configuration file has a configuration parameter of a specified application, so that when the configuration parameter is not detected, the runtime is specified according to the specified application.
  • the operating frequency and/or working core of the processor and the preset adjustment strategy generate configuration parameters, and write configuration parameters into the configuration file, thereby realizing restrictions on the operating frequency and/or the number of working cores when the specified application is running. It does not require manual setting by the user, which is convenient for the user's operation, prolongs the standby time of the terminal, and improves the user experience.
  • the present invention provides a method for adjusting the operating frequency and/or the number of working cores of the processor, including: detecting whether the configuration file has a configuration parameter of the specified application; and detecting that the configuration parameter is not available, determining Specify the operating frequency and/or the number of working cores of the application runtime processor; generate configuration parameters according to the preset adjustment strategy and the working frequency and/or the working core number, and write the configuration parameters into the configuration file, wherein the configuration parameters are used. Adjust the working frequency and/or the number of working cores when the specified application is running.
  • the adjustment policy by detecting whether the configuration file of the specified application is provided in the configuration file, when the configuration parameter is not detected, according to the operating frequency and/or the working core of the specified application runtime, and the preset
  • the adjustment policy generates configuration parameters and writes the configuration parameters into the configuration file, which implements the limitation on the working frequency and/or the number of working cores when the specified application is running. It does not require manual setting by the user, which facilitates the user's operation and prolongs the operation.
  • the standby time of the terminal improves the user experience.
  • the processor includes a CPU (Central Processing Unit) and a GPU (Graphics Processing Unit), and the operating frequency, that is, the clock frequency, determines the running speed of the terminal, and the operating frequency and consumption of the processor.
  • the power is proportional, the higher the operating frequency, the higher the power consumption, and the shorter the standby time.
  • the processor works when the application is running without affecting the normal operation of the application.
  • the frequency and / or the number of working cores are limited to achieve power saving purposes.
  • a configuration file is a collection of settings and files required by the software system to load an application environment for a user. By editing and modifying the configuration file, the operating frequency and/or the number of working cores of the processor used by the application can be limited. Easy to operate and easy to implement.
  • detecting whether the configuration file has the specified application configuration parameter can be executed when the specified application is installed, and determining the operating frequency and/or the working core of the specified application runtime can be in the specified application. Executed when running for the first time.
  • the configuration parameters include: an installation package name of the application, an upper limit of the operating frequency of the application runtime processor, and/or an upper limit of the working core of the application runtime processor.
  • the upper limit of the operating frequency is achieved by writing the application package name of the application, the upper limit of the operating frequency of the application runtime processor, and/or the upper limit of the working core of the application runtime processor to the configuration file. And / or the setting of the working core limit is simple to write, does not increase the operating load of the processor, and is easy to implement.
  • the configuration parameter is written into the configuration file, and specifically includes the following content:
  • the process of obtaining the work core cap is similar.
  • the configuration parameter is generated according to the preset adjustment policy and the working frequency and the working core number, and the configuration parameter is written into the configuration file, which specifically includes the following steps: determining the preset of the specified application. The real-time working frequency in the running time period; determining the average working frequency of the specified application within the preset running time period according to the real-time working frequency, and determining the average working frequency as the working frequency upper limit; writing the working frequency upper limit and the installation package name Configuration file.
  • a preset running time period is recorded, in which the working state of the processor during the running of the application, that is, the operating frequency of the processor, according to the processor in the preset running time period, is recorded.
  • the working frequency determines the average operating frequency within the preset running time period, and writes the average working frequency value and the installation package name into the configuration file to save the power while ensuring the normal operation of the application.
  • the average working core number in the preset running time period may also be determined as the upper working core limit. Specifically, when the average working core value is a non-integer, the rounding is performed according to the actual application situation. .
  • the configuration parameter is generated according to the preset adjustment policy and the working frequency and the working core number, and the configuration parameter is written into the configuration file, which specifically includes the following steps: determining the running time of the application; Determine the operating frequency with the highest operating frequency during the running time, and determine the working frequency with the highest operating frequency as the upper working frequency limit; write the working frequency upper limit and the installation package name to the configuration file.
  • the working frequency with the highest operating frequency is determined as the upper working frequency limit, and the configuration file is written, and the average operating frequency is compared.
  • the working frequency with the highest operating frequency makes the application run more smoothly.
  • the working core with the highest operating frequency can also be determined as the upper working core limit.
  • the method further includes: determining an application type of the specified application; determining an application of the same type as the specified application according to the application type; and determining an operating frequency and/or a working number of the application according to the specified application Generate configuration parameters for the same type of application.
  • configuration parameters of the same type of application are generated and written into the configuration file to implement the application.
  • the batch operation of the working frequency and/or the working number limit further facilitates the user's processing and improves the user experience.
  • the type of the application may be determined, and the processor corresponding to the application is determined according to the correspondence between the type of the pre-stored application and the operating frequency of the processor.
  • the working frequency is determined as the upper limit of the operating frequency.
  • the application type may include, but is not limited to, an audio play type, a video play type, an e-book type, and a social application type.
  • an apparatus for adjusting an operating frequency and/or a working core of a processor comprising: a detecting unit configured to detect whether a configuration parameter of a specified application is provided in the configuration file; Set to determine the operating frequency and/or the number of working cores of the specified application runtime when the configuration parameter is not met; the generating unit is configured to generate according to the preset adjustment strategy and the operating frequency and/or the number of working cores Configure parameters and write configuration parameters to the configuration file, where the configuration parameters are used to adjust the operating frequency and/or the number of working cores for the specified application runtime.
  • the adjustment policy by detecting whether the configuration file of the specified application is provided in the configuration file, when the configuration parameter is not detected, according to the operating frequency and/or the working core of the specified application runtime, and the preset
  • the adjustment policy generates configuration parameters and writes the configuration parameters into the configuration file, which implements the limitation on the working frequency and/or the number of working cores when the specified application is running. It does not require manual setting by the user, which facilitates the user's operation and prolongs the operation.
  • the standby time of the terminal improves the user experience.
  • the processor includes a CPU (Central Processing Unit) and a GPU (Graphics Processing Unit), and the operating frequency, that is, the clock frequency, determines the running speed of the terminal, and the operating frequency and consumption of the processor.
  • the power is proportional, the higher the operating frequency, the higher the power consumption, and the shorter the standby time.
  • the processor works when the application is running without affecting the normal operation of the application.
  • the frequency and / or the number of working cores are limited to achieve power saving purposes.
  • a configuration file is a collection of settings and files required by the software system to load an application environment for a user. By editing and modifying the configuration file, the operating frequency and/or the number of working cores of the processor used by the application can be limited. Easy to operate and easy to implement.
  • detecting whether the configuration file has the specified application configuration parameter can be executed when the specified application is installed, and determining the operating frequency and/or the working core of the specified application runtime can be in the specified application. Executed when running for the first time.
  • the configuration parameters include: an installation package name of the application, an upper limit of the operating frequency of the application runtime processor, and/or an upper limit of the working core of the application runtime processor.
  • the upper limit of the operating frequency is achieved by writing the application package name of the application, the upper limit of the operating frequency of the application runtime processor, and/or the upper limit of the working core of the application runtime processor to the configuration file. And / or the setting of the working core limit is simple to write, does not increase the operating load of the processor, and is easy to implement.
  • the configuration parameter is written into the configuration file, and specifically includes the following content:
  • the process of obtaining the work core cap is similar.
  • the determining unit is further configured to: determine a real-time working frequency within a preset running time period of the specified application; the determining unit is further configured to: determine, according to the real-time working frequency, that the specified application is in advance The average operating frequency in the running time period is set, and the average working frequency is determined as the working frequency upper limit; the adjusting device of the operating frequency and/or the working core of the processor further includes: a writing unit, which is set to set the working frequency upper limit and the installation The package name is written to the configuration file.
  • a preset running time period is recorded, in which the working state of the processor during the running of the application, that is, the operating frequency of the processor, according to the processor in the preset running time period, is recorded.
  • the working frequency determines the average operating frequency within the preset running time period, and writes the average working frequency value and the installation package name into the configuration file to save the power while ensuring the normal operation of the application.
  • the average working core number in the preset running time period may also be determined as the upper working core limit. Specifically, when the average working core value is a non-integer, the rounding is performed according to the actual application situation. .
  • the determining unit is further configured to: determine an operating time of the application; the determining unit is further configured to: determine an operating frequency with the highest running frequency during the running time, and set the operating frequency with the highest operating frequency Determined as the upper operating frequency limit; the write unit is also set to: write the upper operating frequency limit and the installation package name to the configuration file.
  • the working frequency with the highest operating frequency is determined as the upper working frequency limit, and the configuration file is written, and the average operating frequency is compared.
  • the working frequency with the highest operating frequency makes the application run more smoothly.
  • the working core with the highest operating frequency can also be determined as the upper working core limit.
  • the determining unit is further configured to: determine an application type of the specified application; the determining unit is further configured to: determine an application of the same type as the specified application according to the application type; and the generating unit further sets To: Generate configuration parameters for the same type of application based on the operating frequency and/or the number of working cores for the specified application.
  • configuration parameters of the same type of application are generated and written into the configuration file to implement the application.
  • the batch operation of the working frequency and/or the working number limit further facilitates the user's processing and improves the user experience.
  • the type of the application may be determined, and the processor corresponding to the application is determined according to the correspondence between the type of the pre-stored application and the operating frequency of the processor.
  • the working frequency is determined as the upper limit of the operating frequency.
  • the application type may include, but is not limited to, an audio play type, a video play type, an e-book type, and a social application type.
  • a terminal comprising the apparatus for adjusting the operating frequency and/or the working core of the processor according to any one of the above aspects, and therefore, the terminal comprises any one of the above technical solutions.
  • the technical effects of the operating frequency of the processor and/or the adjustment device of the working core are not described herein.
  • the policy by detecting whether the configuration file has the configuration parameter of the specified application, when the configuration parameter is not detected, according to the operating frequency and/or the working core of the specified application runtime, and the preset adjustment
  • the policy generates configuration parameters and writes the configuration parameters to the configuration file, which limits the working frequency and/or the number of working cores when the specified application is running. It does not require manual setting by the user, which facilitates the user's operation and extends the terminal.
  • the standby time improves the user experience.
  • FIG. 1 is a schematic flow chart showing a method of adjusting an operating frequency and/or a working core of a processor according to an embodiment of the present invention
  • FIG. 2 shows a schematic block diagram of an apparatus for adjusting the operating frequency and/or the number of operating cores of a processor in accordance with an embodiment of the present invention
  • Figure 3 shows a schematic block diagram of a terminal in accordance with an embodiment of the present invention
  • FIG. 4 is a schematic flow chart showing a method of adjusting an operating frequency and/or a working core of a processor according to another embodiment of the present invention
  • Figure 5 is a diagram showing the relationship between working time and operating frequency in accordance with one embodiment of the present invention.
  • FIG. 6 shows a schematic structural diagram of a terminal according to an embodiment of the present invention.
  • FIG. 1 shows a schematic flow chart of a method of adjusting the operating frequency and/or the number of operating cores of a processor in accordance with one embodiment of the present invention.
  • a method for adjusting an operating frequency and/or a working core of a processor includes: Step 102: detecting whether a configuration parameter of a specified application is provided in a configuration file; When it is detected that the configuration parameter is not available, determining the operating frequency and/or the working core of the specified application runtime processor; and step 106, generating the configuration parameter according to the preset adjustment strategy and the working frequency and/or the working core number, and The configuration parameters are written to a configuration file, where the configuration parameters are used to adjust the operating frequency and/or the number of working cores for the specified application runtime.
  • the adjustment policy by detecting whether the configuration file of the specified application is provided in the configuration file, when the configuration parameter is not detected, according to the operating frequency and/or the working core of the specified application runtime, and the preset
  • the adjustment policy generates configuration parameters and writes the configuration parameters into the configuration file, which implements the limitation on the working frequency and/or the number of working cores when the specified application is running. It does not require manual setting by the user, which facilitates the user's operation and prolongs the operation.
  • the standby time of the terminal improves the user experience.
  • the processor includes a CPU (Central Processing Unit) and a GPU (Graphics Processing Unit), and the operating frequency, that is, the clock frequency, determines the running speed of the terminal, and the operating frequency and consumption of the processor.
  • the power is proportional, the higher the operating frequency, the higher the power consumption, and the shorter the standby time.
  • the processor works when the application is running without affecting the normal operation of the application.
  • the frequency and / or the number of working cores are limited to achieve power saving purposes.
  • a configuration file is a collection of settings and files required by the software system to load an application environment for a user. By editing and modifying the configuration file, the operating frequency and/or the number of working cores of the processor used by the application can be limited. Easy to operate and easy to implement.
  • detecting whether the configuration file has the specified application configuration parameter can be executed when the specified application is installed, and determining the operating frequency and/or the working core of the specified application runtime can be in the specified application. Executed when running for the first time.
  • the configuration parameters include: an installation package name of the application, an upper limit of the operating frequency of the application runtime processor, and/or an upper limit of the working core of the application runtime processor.
  • the upper limit of the operating frequency is achieved by writing the application package name of the application, the upper limit of the operating frequency of the application runtime processor, and/or the upper limit of the working core of the application runtime processor to the configuration file. And / or the setting of the working core limit is simple to write, does not increase the operating load of the processor, and is easy to implement.
  • the configuration parameter is written into the configuration file, and specifically includes the following content:
  • the process of obtaining the work core cap is similar.
  • the configuration parameter is generated according to the preset adjustment policy and the working frequency and the working core number, and the configuration parameter is written into the configuration file, which specifically includes the following steps: determining the preset of the specified application. The real-time working frequency in the running time period; determining the average working frequency of the specified application within the preset running time period according to the real-time working frequency, and determining the average working frequency as the working frequency upper limit; writing the working frequency upper limit and the installation package name Configuration file.
  • a preset running time period is recorded, in which the working state of the processor during the running of the application, that is, the operating frequency of the processor, according to the processor in the preset running time period, is recorded.
  • the working frequency determines the average operating frequency within the preset running time period, and writes the average working frequency value and the installation package name into the configuration file to save the power while ensuring the normal operation of the application.
  • the average working core number in the preset running time period may also be determined as the upper working core limit. Specifically, when the average working core value is a non-integer, the rounding is performed according to the actual application situation. .
  • the configuration parameter is generated according to the preset adjustment policy and the working frequency and the working core number, and the configuration parameter is written into the configuration file, which specifically includes the following steps: determining the running time of the application; Determine the operating frequency with the highest operating frequency during the running time, and determine the working frequency with the highest operating frequency as the upper working frequency limit; write the working frequency upper limit and the installation package name to the configuration file.
  • the working frequency with the highest operating frequency is determined as the upper working frequency limit, and the configuration file is written, and the average operating frequency is compared.
  • the working frequency with the highest operating frequency makes the application run more smoothly.
  • the working core with the highest operating frequency can also be determined as the upper working core limit.
  • the method further includes: determining an application type of the specified application; determining an application of the same type as the specified application according to the application type; and determining an operating frequency and/or a working number of the application according to the specified application Generate configuration parameters for the same type of application.
  • configuration parameters of the same type of application are generated and written into the configuration file to implement the application.
  • the batch operation of the working frequency and/or the working number limit further facilitates the user's processing and improves the user experience.
  • the type of the application may be determined, and the processor corresponding to the application is determined according to the correspondence between the type of the pre-stored application and the operating frequency of the processor.
  • the working frequency is determined as the upper limit of the operating frequency.
  • the application type may include, but is not limited to, an audio play type, a video play type, an e-book type, and a social application type.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • PROM Programmable Read-Only Memory
  • EPROM Erasable Programmable Read Only Memory
  • OTPROM One-Time Programmable Read-Only Memory
  • EEPROM Electronically-Erasable Programmable Read-Only Memory
  • CD-ROM Compact Disc Read-Only Memory
  • FIG. 2 shows a schematic block diagram of an adjustment device for the operating frequency and/or the number of operating cores of a processor in accordance with an embodiment of the present invention.
  • the apparatus 200 for adjusting the operating frequency and/or the working core of the processor includes: a detecting unit 202 configured to detect whether a configuration parameter of a specified application is provided in the configuration file;
  • the determining unit 204 is configured to determine, when the configuration parameter is not provided, the working frequency and/or the working core of the specified application runtime processor;
  • the generating unit 206 is configured to adjust the working strategy according to the preset adjusting strategy and/or Or the work core generates configuration parameters and writes configuration parameters to the configuration file, where the configuration parameters are used to adjust the operating frequency and/or the number of working cores when the specified application is running.
  • the adjustment policy by detecting whether the configuration file of the specified application is provided in the configuration file, when the configuration parameter is not detected, according to the operating frequency and/or the working core of the specified application runtime, and the preset
  • the adjustment policy generates configuration parameters and writes the configuration parameters into the configuration file, which implements the limitation on the working frequency and/or the number of working cores when the specified application is running. It does not require manual setting by the user, which facilitates the user's operation and prolongs the operation.
  • the standby time of the terminal improves the user experience.
  • the processor includes a CPU (Central Processing Unit) and a GPU (Graphics Processing Unit), and the operating frequency, that is, the clock frequency, determines the running speed of the terminal, and the operating frequency and consumption of the processor.
  • the power is proportional, the higher the operating frequency, the higher the power consumption, and the shorter the standby time.
  • the processor works when the application is running without affecting the normal operation of the application.
  • the frequency and / or the number of working cores are limited to achieve power saving purposes.
  • a configuration file is a collection of settings and files required by the software system to load an application environment for a user. By editing and modifying the configuration file, the operating frequency and/or the number of working cores of the processor used by the application can be limited. Easy to operate and easy to implement.
  • detecting whether the configuration file has the specified application configuration parameter can be executed when the specified application is installed, and determining the operating frequency and/or the working core of the specified application runtime can be in the specified application. Executed when running for the first time.
  • the configuration parameters include: an installation package name of the application, an upper limit of the operating frequency of the application runtime processor, and/or an upper limit of the working core of the application runtime processor.
  • the upper limit of the operating frequency is achieved by writing the application package name of the application, the upper limit of the operating frequency of the application runtime processor, and/or the upper limit of the working core of the application runtime processor to the configuration file. And / or the setting of the working core limit is simple to write, does not increase the operating load of the processor, and is easy to implement.
  • the configuration parameter is written into the configuration file, and specifically includes the following content:
  • the process of obtaining the work core cap is similar.
  • the determining unit 204 is further configured to: determine a real-time working frequency within a preset running time period of the specified application; the determining unit 204 is further configured to: determine the specified application according to the real-time working frequency The average operating frequency within the preset operating time period and the average operating frequency is determined as the upper operating frequency limit; the adjusting device 200 of the operating frequency and/or the working core of the processor further includes: a writing unit 208 configured to work The upper frequency limit and the installation package name are written to the configuration file.
  • a preset running time period is recorded, in which the working state of the processor during the running of the application, that is, the operating frequency of the processor, according to the processor in the preset running time period, is recorded.
  • the working frequency determines the average operating frequency within the preset running time period, and writes the average working frequency value and the installation package name into the configuration file to save the power while ensuring the normal operation of the application.
  • the average working core number in the preset running time period may also be determined as the upper working core limit. Specifically, when the average working core value is a non-integer, the rounding is performed according to the actual application situation. .
  • the determining unit 204 is further configured to: determine an operating time of the application; the determining unit 204 is further configured to: determine an operating frequency with the highest operating frequency during the running time, and have the highest operating frequency. The operating frequency is determined as the upper operating frequency limit; the writing unit 208 is further configured to: write the upper operating frequency limit and the installation package name to the configuration file.
  • the working frequency with the highest operating frequency is determined as the upper working frequency limit, and the configuration file is written, and the average operating frequency is compared.
  • the working frequency with the highest operating frequency makes the application run more smoothly.
  • the working core with the highest operating frequency can also be determined as the upper working core limit.
  • the determining unit 204 is further configured to: determine an application type of the specified application; the determining unit 204 is further configured to: determine an application of the same type as the specified application according to the application type; 206 is further configured to: generate configuration parameters of the same type of application according to the operating frequency and/or the number of working cores of the specified application.
  • configuration parameters of the same type of application are generated and written into the configuration file to implement the application.
  • the batch operation of the working frequency and/or the working number limit further facilitates the user's processing and improves the user experience.
  • the type of the application may be determined, and the processor corresponding to the application is determined according to the correspondence between the type of the pre-stored application and the operating frequency of the processor.
  • the working frequency is determined as the upper limit of the operating frequency.
  • the application type may include, but is not limited to, an audio play type, a video play type, an e-book type, and a social application type.
  • the units in the terminal in the embodiment of the present invention may be combined, divided, and deleted according to actual needs.
  • FIG. 3 shows a schematic block diagram of a terminal in accordance with an embodiment of the present invention.
  • a terminal 300 includes an apparatus for adjusting an operating frequency and/or a working core of the processor according to any one of the above aspects. Therefore, the terminal includes any of the above.
  • the technical effects of the operating frequency and/or working core adjustment device 200 of the processor described in the technical solution are not described herein again.
  • FIG. 4 shows a schematic flow chart of a method of adjusting the operating frequency and/or the number of operating cores of a processor in accordance with another embodiment of the present invention.
  • Step 402 Install a third-party application.
  • Step 404 determining whether the third-party application is in the configuration file, when the determination result is "Yes”, proceeds to step 410, and when the determination result is "No", proceeds to step 406;
  • Step 406 Run the third-party application for the first time to obtain the working frequency and the working core of the CPU and the GPU.
  • Step 408 Write the limit parameters of the application name, CUP, and GUP into the configuration file.
  • Step 410 running the third party application.
  • the third-party application when the third-party application is installed for the first time, it is checked whether the application is in the list of the limited-frequency limit configuration file. If not, the CPU, the GPU working frequency, and the working core number are monitored when the application is used for the first time.
  • the CPU and GPU limit parameters that is, the upper limit of the working frequency and the upper limit of the working core, are implemented, which realizes the limitation of the working frequency and/or the number of working cores when the specified application is running, and does not require manual setting by the user. The user's operation extends the standby time of the terminal and improves the user experience.
  • Figure 5 illustrates a graph of operating time versus operating frequency in accordance with one embodiment of the present invention.
  • the operating frequency of the CPU is monitored in the range of 900MHz to 1150MHz. It is found that the CPU runs at 1000MHz for most of the time, and only runs at 1100MHz for a small part of the time, so 1000MHz will be used. Determined to be the upper limit of the work, that is, when the application is running, the operating frequency of the CPU does not exceed 1000MHz, which makes the application run more smoothly while saving power.
  • FIG. 6 shows a schematic structural diagram of a terminal according to an embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
  • the terminal 300 includes a processor 301, a memory 302, and a transceiver 303.
  • the transceiver 303 is configured to transmit and receive data with and from an external device.
  • the number of processors 301 in the terminal 300 may be one or more.
  • the processor 301, the memory 302, and the transceiver 303 may be connected by a bus system or other means.
  • the terminal 300 can be used to perform the method shown in FIG.
  • the program code is stored in the memory 302, and the processor 301 can call the program code stored in the memory 302 to perform related functions through a bus system.
  • the respective units described in FIG. 2 eg, the detecting unit 202, the determining unit 204, the generating unit 206, the writing unit 208, etc.
  • the processor 301 are program codes stored in the memory 302. And being executed by the processor 301 to implement the functions of the respective units to implement a method of adjusting the operating frequency of the processor and/or the number of working cores.
  • the processor 301 detecting whether a configuration parameter of the specified application is provided in the configuration file; determining, when the configuration parameter is not provided, determining an operating frequency of the specified application runtime processor and/or a working core number; generating the configuration parameter according to a preset adjustment policy and the working frequency and/or working core number, and writing the configuration parameter to the configuration file, wherein the configuration parameter is used to adjust the Specifies the operating frequency and/or number of working cores at which the application is running.
  • the configuration parameter includes: an installation package name of the application, an upper limit of an operating frequency of the processor when the application is running, and/or a processor of the processor when the application is running The maximum number of work cores.
  • the generating the configuration parameter according to the preset adjustment policy and the working frequency and the working core number, and writing the configuration parameter to the configuration file specifically including the following: the processor 301 Determining a real-time working frequency within a preset running time period of the specified application; determining an average operating frequency of the specified application during the preset running time period according to the real-time working frequency, and operating the average The frequency is determined as the upper limit of the operating frequency; the upper limit of the operating frequency and the installation package name are written into the configuration file.
  • the generating the configuration parameter according to the preset adjustment policy and the working frequency and the working core number, and writing the configuration parameter to the configuration file specifically: the processor 301 determines The running time of the application; determining an operating frequency with the highest running frequency in the running time, and determining the working frequency with the highest running frequency as the working frequency upper limit; and the working frequency upper limit and the installation package The name is written to the configuration file.
  • the processor 301 determining an application type of the specified application; determining an application of the same type as the specified application according to the application type; according to the working frequency of the specified application And/or the work core generates configuration parameters of the same type of application.
  • the present invention proposes a new The adjustment scheme is configured to detect whether the configuration parameter of the specified application is provided in the configuration file, so that when the configuration parameter is not detected, the operating frequency and/or the working core of the specified application runtime and the preset adjustment policy are generated.
  • the configuration parameters are written into the configuration file, which limits the working frequency and/or the number of working cores when the specified application is running. It does not require manual setting by the user, which facilitates the user's operation and prolongs the standby of the terminal. Time has improved the user experience.

Landscapes

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

Abstract

一种处理器工作频率和/或工作核数的调整方法、装置和终端。所述调整方法包括:检测配置文件中是否具备指定应用程序的配置参数(102);在检测到不具备配置参数时,确定指定应用程序运行时处理器的工作频率和/或工作核数(104);根据预设的调整策略以及工作频率和/或工作核数生成配置参数,并将配置参数写入配置文件,其中,配置参数用于调整指定应用程序运行时的工作频率和/或工作核数(106)。该调整方法实现了对指定应用程序运行时的工作频率和/或工作核数的限制,不需要用户手动设置,方便了用户的操作,延长了终端的待机时间,提升了用户的使用体验。

Description

处理器工作频率和/或工作核数的调整方法、装置和终端
本申请要求于2016年7月29日提交中国专利局,申请号为201610614688.1、发明名称为“处理器工作频率和/或工作核数的调整方法、装置和终端”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及终端技术领域,具体而言,涉及一种处理器的工作频率和/或工作核数的调整方法、一种处理器的工作频率和/或工作核数的调整装置和一种终端。
背景技术
在相关技术中,在android系统中,通过在运行应用程序时限制CPU和/或GPU的工作频率以及工作核数,以达到延长待机时间的目的。
对于预装的应用程序,部分终端厂商预先在配置文件中写入需要限频和/或限核的应用程序的包名、CPU和/或GPU允许占用的最高频率及最大核数,从而达到省电目的,但是通常情况下用户安装的第三方应用程序并不在配置文件名单中,如果要实现该第三方应用程序的限频和/或限核,需要用户手动设置,操作较复杂,影响了用户的使用体验。
因此,如何设计一种新的调整方案,以在第三方应用程序运行时自动实现处理器的限频和/或限核成为亟待解决的技术问题。
发明内容
本发明正是基于上述技术问题至少之一,提出了一种新的调整方案,通过检测配置文件中是否具备指定应用程序的配置参数,以在检测不到配置参数时,根据指定应用程序运行时处理器的工作频率和/或工作核数以及预设的调整策略生成配置参数,并将配置参数写入配置文件中,实现了对指定应用程序运行时的工作频率和/或工作核数的限制,不需要用户手动设置,方便了用户的操作,延长了终端的待机时间,提升了用户的使用体验。
有鉴于此,本发明提出了一种处理器的工作频率和/或工作核数的调整方法,包括:检测配置文件中是否具备指定应用程序的配置参数;在检测到不具备配置参数时,确定指定应用程序运行时处理器的工作频率和/或工作核数;根据预设的调整策略以及工作频率和/或工作核数生成配置参数,并将配置参数写入配置文件,其中,配置参数用于调整指定应用程序运行时的工作频率和/或工作核数。
在该技术方案中,通过检测配置文件中是否具备指定应用程序的配置参数,以在检测不到配置参数时,根据指定应用程序运行时处理器的工作频率和/或工作核数以及预设的调整策略生成配置参数,并将配置参数写入配置文件中,实现了对指定应用程序运行时的工作频率和/或工作核数的限制,不需要用户手动设置,方便了用户的操作,延长了终端的待机时间,提升了用户的使用体验。
具体地,处理器包括CPU(Central Processing Unit,中央处理器)与GPU(Graphics Processing Unit,图形处理器),工作频率,即时钟频率,决定了终端的运行速度,而处理器的工作频率与耗电量成正比,工作频率越高,耗电量越高,待机时间就越短,为了延长待机时间,在不影响应用程序正常运行的前提下,对该应用程序运行时使用的处理器的工作频率和/或工作核数进行一定的限制,以达到省电的目的。
配置文件是软件系统为用户加载应用环境所需要的设置与文件的集合,通过对配置文件进行编辑和修改,能够实现对应用程序运行时使用的处理器的工作频率和/或工作核数的限制,操作简单,易于实施。
另外,需要说明的是,检测配置文件中是否具备指定应用程序的配置参数可以在指定应用程序安装时执行,确定指定应用程序运行时处理器的工作频率和/或工作核数可以在指定应用程序首次运行时执行。
在上述技术方案中,优选地,配置参数包括:应用程序的安装包名,应用程序运行时处理器的工作频率上限和/或应用程序运行时处理器的工作核数上限。
在该技术方案中,通过将应用程序的安装包名、应用程序运行时处理器的工作频率上限和/或应用程序运行时处理器的工作核数上限写入配置文件,实现了对工作频率上限和/或工作核数上限的设置,编写简单,不会增加处理器运行负担,易于实施。
具体地,将配置参数写入配置文件,具体可以包括以下内容:
<PROFILE Label= “应用程序名称” Release=“Yes”>
<APPLICATION Label=“应用程序的包名”/>
<PROPERTY Label=“cpu_freq_max”Value=“960M”>
</PROFILE>
工作核数上限的获取过程与之类似。
在上述任一项技术方案中,优选地,根据预设的调整策略与工作频率与工作核数生成配置参数,并将配置参数写入配置文件,具体包括以下步骤:确定指定应用程序的预设运行时间段内的实时工作频率;根据实时工作频率确定指定应用程序在预设运行时间段内的平均工作频率,并将平均工作频率确定为工作频率上限;将工作频率上限与安装包名写入配置文件。
在该技术方案中,预设运行时间段,在该预设运行时间段内记录应用程序运行过程中处理器的工作情况,即处理器的工作频率,根据预设运行时间段内的处理器的工作频率确定该预设运行时间段内的平均工作频率,并将平均工作频率值与安装包名等写入配置文件,在节省电量的同时,保证了应用程序的正常运行。
另外,对于处理器的工作核数,也可以将预设运行时间段内的平均工作核数确定为工作核数上限,具体的,在平均工作核数值为非整数时,根据实际应用情况进行四舍五入。
在上述任一项技术方案中,优选地,根据预设的调整策略与工作频率与工作核数生成配置参数,并将配置参数写入配置文件,具体包括以下步骤:确定应用程序的运行时间;确定运行时间内运行频率最高的工作频率,并将运行频率最高的工作频率确定为工作频率上限;将工作频率上限与安装包名写入配置文件。
在该技术方案中,通过在用于程序的某个运行时间的,监视应用程序的运行情况,将运行频率最高的工作频率确定为工作频率上限,并写入配置文件,与取平均工作频率相比,基于运行频率最高的工作频率运行,使应用程序运行过程中更平稳。
对于处理器的工作核数,也可以将运行频率最高的工作核数确定为工作核数上限。
另外,还可以通过将应用程序正常运行时的最低工作频率确定为工作频率上限,以实现进一步省电的目的。
在上述任一项技术方案中,优选地,还包括:确定指定应用程序的应用类型;根据应用类型确定与指定应用程序同类型的应用程序;根据指定应用程序的工作频率和/或工作核数生成同类型的应用程序的配置参数。
在该技术方案中,对于同类型的应用程序,根据指定应用程序的工作频率和/或工作核数,生成同类型的应用程序的配置参数,并写入配置文件中,实现了对应用程序的工作频率和/或工作核数限制的批量操作,进一步方便了用户的处理,提升了用户的使用体验。
另外,也可以根据预存的应用程序与应用程序类型的对应关系,确定应用程序的类型,根据预存的应用程序的类型与处理器的工作频率的对应关系,确定与该类应用程序对应的处理器的工作频率,并确定为工作频率上限。
需要说明的是,应用类型可以包括但不限于音频播放类型、视频播放类型、电子书类型和社交应用类型等。
根据本发明第二方面,还提出了一种处理器的工作频率和/或工作核数的调整装置,包括:检测单元,设置为检测配置文件中是否具备指定应用程序的配置参数;确定单元,设置为在检测到不具备配置参数时,确定指定应用程序运行时处理器的工作频率和/或工作核数;生成单元,设置为根据预设的调整策略以及工作频率和/或工作核数生成配置参数,并将配置参数写入配置文件,其中,配置参数用于调整指定应用程序运行时的工作频率和/或工作核数。
在该技术方案中,通过检测配置文件中是否具备指定应用程序的配置参数,以在检测不到配置参数时,根据指定应用程序运行时处理器的工作频率和/或工作核数以及预设的调整策略生成配置参数,并将配置参数写入配置文件中,实现了对指定应用程序运行时的工作频率和/或工作核数的限制,不需要用户手动设置,方便了用户的操作,延长了终端的待机时间,提升了用户的使用体验。
具体地,处理器包括CPU(Central Processing Unit,中央处理器)与GPU(Graphics Processing Unit,图形处理器),工作频率,即时钟频率,决定了终端的运行速度,而处理器的工作频率与耗电量成正比,工作频率越高,耗电量越高,待机时间就越短,为了延长待机时间,在不影响应用程序正常运行的前提下,对该应用程序运行时使用的处理器的工作频率和/或工作核数进行一定的限制,以达到省电的目的。
配置文件是软件系统为用户加载应用环境所需要的设置与文件的集合,通过对配置文件进行编辑和修改,能够实现对应用程序运行时使用的处理器的工作频率和/或工作核数的限制,操作简单,易于实施。
另外,需要说明的是,检测配置文件中是否具备指定应用程序的配置参数可以在指定应用程序安装时执行,确定指定应用程序运行时处理器的工作频率和/或工作核数可以在指定应用程序首次运行时执行。
在上述技术方案中,优选地,配置参数包括:应用程序的安装包名,应用程序运行时处理器的工作频率上限和/或应用程序运行时处理器的工作核数上限。
在该技术方案中,通过将应用程序的安装包名、应用程序运行时处理器的工作频率上限和/或应用程序运行时处理器的工作核数上限写入配置文件,实现了对工作频率上限和/或工作核数上限的设置,编写简单,不会增加处理器运行负担,易于实施。
具体地,将配置参数写入配置文件,具体可以包括以下内容:
<PROFILE Label= “应用程序名称” Release=“Yes”>
<APPLICATION Label=“应用程序的包名”/>
<PROPERTY Label=“cpu_freq_max”Value=“960M”>
</PROFILE>
工作核数上限的获取过程与之类似。
在上述任一项技术方案中,优选地,确定单元还设置为:确定指定应用程序的预设运行时间段内的实时工作频率;确定单元还设置为:根据实时工作频率确定指定应用程序在预设运行时间段内的平均工作频率,并将平均工作频率确定为工作频率上限;处理器的工作频率和/或工作核数的调整装置还包括:写入单元,设置为将工作频率上限与安装包名写入配置文件。
在该技术方案中,预设运行时间段,在该预设运行时间段内记录应用程序运行过程中处理器的工作情况,即处理器的工作频率,根据预设运行时间段内的处理器的工作频率确定该预设运行时间段内的平均工作频率,并将平均工作频率值与安装包名等写入配置文件,在节省电量的同时,保证了应用程序的正常运行。
另外,对于处理器的工作核数,也可以将预设运行时间段内的平均工作核数确定为工作核数上限,具体的,在平均工作核数值为非整数时,根据实际应用情况进行四舍五入。
在上述任一项技术方案中,优选地,确定单元还设置为:确定应用程序的运行时间;确定单元还设置为:确定运行时间内运行频率最高的工作频率,并将运行频率最高的工作频率确定为工作频率上限;写入单元还设置为:将工作频率上限与安装包名写入配置文件。
在该技术方案中,通过在用于程序的某个运行时间的,监视应用程序的运行情况,将运行频率最高的工作频率确定为工作频率上限,并写入配置文件,与取平均工作频率相比,基于运行频率最高的工作频率运行,使应用程序运行过程中更平稳。
对于处理器的工作核数,也可以将运行频率最高的工作核数确定为工作核数上限。
另外,还可以通过将应用程序正常运行时的最低工作频率确定为工作频率上限,以实现进一步省电的目的。
在上述任一项技术方案中,优选地,确定单元还设置为:确定指定应用程序的应用类型;确定单元还设置为:根据应用类型确定与指定应用程序同类型的应用程序;生成单元还设置为:根据指定应用程序的工作频率和/或工作核数生成同类型的应用程序的配置参数。
在该技术方案中,对于同类型的应用程序,根据指定应用程序的工作频率和/或工作核数,生成同类型的应用程序的配置参数,并写入配置文件中,实现了对应用程序的工作频率和/或工作核数限制的批量操作,进一步方便了用户的处理,提升了用户的使用体验。
另外,也可以根据预存的应用程序与应用程序类型的对应关系,确定应用程序的类型,根据预存的应用程序的类型与处理器的工作频率的对应关系,确定与该类应用程序对应的处理器的工作频率,并确定为工作频率上限。
需要说明的是,应用类型可以包括但不限于音频播放类型、视频播放类型、电子书类型和社交应用类型等。
根据本发明第三方面,还提出了一种终端,包括上述任一项技术方案所述的处理器的工作频率和/或工作核数的调整装置,因此,该终端包括上述任一项技术方案所述的处理器的工作频率和/或工作核数的调整装置的技术效果,在此不再赘述。
通过以上技术方案,通过检测配置文件中是否具备指定应用程序的配置参数,以在检测不到配置参数时,根据指定应用程序运行时处理器的工作频率和/或工作核数以及预设的调整策略生成配置参数,并将配置参数写入配置文件中,实现了对指定应用程序运行时的工作频率和/或工作核数的限制,不需要用户手动设置,方便了用户的操作,延长了终端的待机时间,提升了用户的使用体验。
附图说明
图1示出了根据本发明的一个实施例的处理器的工作频率和/或工作核数的调整方法的示意流程图;
图2示出了根据本发明的实施例的处理器的工作频率和/或工作核数的调整装置的示意框图;
图3示出了根据本发明的实施例的终端的示意框图;
图4示出了根据本发明的另一个实施例的处理器的工作频率和/或工作核数的调整方法的示意流程图;
图5示出了根据本发明的一个实施例的工作时间与工作频率的关系图;
图6示出了根据本发明的实施例的终端的结构示意图。
具体实施方式
为了能够更清楚地理解本发明的上述目的、特征和优点,下面结合附图和具体实施方式对本发明进行进一步的详细描述。需要说明的是,在不冲突的情况下,本申请的实施例及实施例中的特征可以相互组合。
在下面的描述中阐述了很多具体细节以便于充分理解本发明,但是,本发明还可以采用第三方不同于在此描述的第三方方式来实施,因此,本发明的保护范围并不受下面公开的具体实施例的限制。
图1示出了根据本发明的一个实施例的处理器的工作频率和/或工作核数的调整方法的示意流程图。
如图1所示,根据本发明的一个实施例的处理器的工作频率和/或工作核数的调整方法,包括:步骤102,检测配置文件中是否具备指定应用程序的配置参数;步骤104,在检测到不具备配置参数时,确定指定应用程序运行时处理器的工作频率和/或工作核数;步骤106,根据预设的调整策略以及工作频率和/或工作核数生成配置参数,并将配置参数写入配置文件,其中,配置参数用于调整指定应用程序运行时的工作频率和/或工作核数。
在该技术方案中,通过检测配置文件中是否具备指定应用程序的配置参数,以在检测不到配置参数时,根据指定应用程序运行时处理器的工作频率和/或工作核数以及预设的调整策略生成配置参数,并将配置参数写入配置文件中,实现了对指定应用程序运行时的工作频率和/或工作核数的限制,不需要用户手动设置,方便了用户的操作,延长了终端的待机时间,提升了用户的使用体验。
具体地,处理器包括CPU(Central Processing Unit,中央处理器)与GPU(Graphics Processing Unit,图形处理器),工作频率,即时钟频率,决定了终端的运行速度,而处理器的工作频率与耗电量成正比,工作频率越高,耗电量越高,待机时间就越短,为了延长待机时间,在不影响应用程序正常运行的前提下,对该应用程序运行时使用的处理器的工作频率和/或工作核数进行一定的限制,以达到省电的目的。
配置文件是软件系统为用户加载应用环境所需要的设置与文件的集合,通过对配置文件进行编辑和修改,能够实现对应用程序运行时使用的处理器的工作频率和/或工作核数的限制,操作简单,易于实施。
另外,需要说明的是,检测配置文件中是否具备指定应用程序的配置参数可以在指定应用程序安装时执行,确定指定应用程序运行时处理器的工作频率和/或工作核数可以在指定应用程序首次运行时执行。
在上述技术方案中,优选地,配置参数包括:应用程序的安装包名,应用程序运行时处理器的工作频率上限和/或应用程序运行时处理器的工作核数上限。
在该技术方案中,通过将应用程序的安装包名、应用程序运行时处理器的工作频率上限和/或应用程序运行时处理器的工作核数上限写入配置文件,实现了对工作频率上限和/或工作核数上限的设置,编写简单,不会增加处理器运行负担,易于实施。
具体地,将配置参数写入配置文件,具体可以包括以下内容:
<PROFILE Label= “应用程序名称” Release=“Yes”>
<APPLICATION Label=“应用程序的包名”/>
<PROPERTY Label=“cpu_freq_max”Value=“960M”>
</PROFILE>
工作核数上限的获取过程与之类似。
在上述任一项技术方案中,优选地,根据预设的调整策略与工作频率与工作核数生成配置参数,并将配置参数写入配置文件,具体包括以下步骤:确定指定应用程序的预设运行时间段内的实时工作频率;根据实时工作频率确定指定应用程序在预设运行时间段内的平均工作频率,并将平均工作频率确定为工作频率上限;将工作频率上限与安装包名写入配置文件。
在该技术方案中,预设运行时间段,在该预设运行时间段内记录应用程序运行过程中处理器的工作情况,即处理器的工作频率,根据预设运行时间段内的处理器的工作频率确定该预设运行时间段内的平均工作频率,并将平均工作频率值与安装包名等写入配置文件,在节省电量的同时,保证了应用程序的正常运行。
另外,对于处理器的工作核数,也可以将预设运行时间段内的平均工作核数确定为工作核数上限,具体的,在平均工作核数值为非整数时,根据实际应用情况进行四舍五入。
在上述任一项技术方案中,优选地,根据预设的调整策略与工作频率与工作核数生成配置参数,并将配置参数写入配置文件,具体包括以下步骤:确定应用程序的运行时间;确定运行时间内运行频率最高的工作频率,并将运行频率最高的工作频率确定为工作频率上限;将工作频率上限与安装包名写入配置文件。
在该技术方案中,通过在用于程序的某个运行时间的,监视应用程序的运行情况,将运行频率最高的工作频率确定为工作频率上限,并写入配置文件,与取平均工作频率相比,基于运行频率最高的工作频率运行,使应用程序运行过程中更平稳。
对于处理器的工作核数,也可以将运行频率最高的工作核数确定为工作核数上限。
另外,还可以通过将应用程序正常运行时的最低工作频率确定为工作频率上限,以实现进一步省电的目的。
在上述任一项技术方案中,优选地,还包括:确定指定应用程序的应用类型;根据应用类型确定与指定应用程序同类型的应用程序;根据指定应用程序的工作频率和/或工作核数生成同类型的应用程序的配置参数。
在该技术方案中,对于同类型的应用程序,根据指定应用程序的工作频率和/或工作核数,生成同类型的应用程序的配置参数,并写入配置文件中,实现了对应用程序的工作频率和/或工作核数限制的批量操作,进一步方便了用户的处理,提升了用户的使用体验。
另外,也可以根据预存的应用程序与应用程序类型的对应关系,确定应用程序的类型,根据预存的应用程序的类型与处理器的工作频率的对应关系,确定与该类应用程序对应的处理器的工作频率,并确定为工作频率上限。
需要说明的是,应用类型可以包括但不限于音频播放类型、视频播放类型、电子书类型和社交应用类型等。
本发明实施例方法中的步骤可以根据实际需要进行顺序调整、合并和删减。
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,存储介质包括只读存储器(Read-Only Memory,ROM)、随机存储器(Random Access Memory,RAM)、可编程只读存储器(Programmable Read-only Memory,PROM)、可擦除可编程只读存储器(Erasable Programmable Read Only Memory,EPROM)、一次可编程只读存储器(One-time Programmable Read-Only Memory,OTPROM)、电子抹除式可复写只读存储器(Electrically-Erasable Programmable Read-Only Memory,EEPROM)、只读光盘(Compact Disc Read-Only Memory,CD-ROM)或其他光盘存储器、磁盘存储器、磁带存储器、或者能够用于携带或存储数据的计算机可读的任何其他介质。
图2示出了根据本发明的实施例的处理器的工作频率和/或工作核数的调整装置的示意框图。
如图2所示,根据本发明的实施例的处理器的工作频率和/或工作核数的调整装置200,包括:检测单元202,设置为检测配置文件中是否具备指定应用程序的配置参数;确定单元204,设置为在检测到不具备配置参数时,确定指定应用程序运行时处理器的工作频率和/或工作核数;生成单元206,设置为根据预设的调整策略以及工作频率和/或工作核数生成配置参数,并将配置参数写入配置文件,其中,配置参数用于调整指定应用程序运行时的工作频率和/或工作核数。
在该技术方案中,通过检测配置文件中是否具备指定应用程序的配置参数,以在检测不到配置参数时,根据指定应用程序运行时处理器的工作频率和/或工作核数以及预设的调整策略生成配置参数,并将配置参数写入配置文件中,实现了对指定应用程序运行时的工作频率和/或工作核数的限制,不需要用户手动设置,方便了用户的操作,延长了终端的待机时间,提升了用户的使用体验。
具体地,处理器包括CPU(Central Processing Unit,中央处理器)与GPU(Graphics Processing Unit,图形处理器),工作频率,即时钟频率,决定了终端的运行速度,而处理器的工作频率与耗电量成正比,工作频率越高,耗电量越高,待机时间就越短,为了延长待机时间,在不影响应用程序正常运行的前提下,对该应用程序运行时使用的处理器的工作频率和/或工作核数进行一定的限制,以达到省电的目的。
配置文件是软件系统为用户加载应用环境所需要的设置与文件的集合,通过对配置文件进行编辑和修改,能够实现对应用程序运行时使用的处理器的工作频率和/或工作核数的限制,操作简单,易于实施。
另外,需要说明的是,检测配置文件中是否具备指定应用程序的配置参数可以在指定应用程序安装时执行,确定指定应用程序运行时处理器的工作频率和/或工作核数可以在指定应用程序首次运行时执行。
在上述技术方案中,优选地,配置参数包括:应用程序的安装包名,应用程序运行时处理器的工作频率上限和/或应用程序运行时处理器的工作核数上限。
在该技术方案中,通过将应用程序的安装包名、应用程序运行时处理器的工作频率上限和/或应用程序运行时处理器的工作核数上限写入配置文件,实现了对工作频率上限和/或工作核数上限的设置,编写简单,不会增加处理器运行负担,易于实施。
具体地,将配置参数写入配置文件,具体可以包括以下内容:
<PROFILE Label= “应用程序名称” Release=“Yes”>
<APPLICATION Label=“应用程序的包名”/>
<PROPERTY Label=“cpu_freq_max”Value=“960M”>
</PROFILE>
工作核数上限的获取过程与之类似。
在上述任一项技术方案中,优选地,确定单元204还设置为:确定指定应用程序的预设运行时间段内的实时工作频率;确定单元204还设置为:根据实时工作频率确定指定应用程序在预设运行时间段内的平均工作频率,并将平均工作频率确定为工作频率上限;处理器的工作频率和/或工作核数的调整装置200还包括:写入单元208,设置为将工作频率上限与安装包名写入配置文件。
在该技术方案中,预设运行时间段,在该预设运行时间段内记录应用程序运行过程中处理器的工作情况,即处理器的工作频率,根据预设运行时间段内的处理器的工作频率确定该预设运行时间段内的平均工作频率,并将平均工作频率值与安装包名等写入配置文件,在节省电量的同时,保证了应用程序的正常运行。
另外,对于处理器的工作核数,也可以将预设运行时间段内的平均工作核数确定为工作核数上限,具体的,在平均工作核数值为非整数时,根据实际应用情况进行四舍五入。
在上述任一项技术方案中,优选地,确定单元204还设置为:确定应用程序的运行时间;确定单元204还设置为:确定运行时间内运行频率最高的工作频率,并将运行频率最高的工作频率确定为工作频率上限;写入单元208还设置为:将工作频率上限与安装包名写入配置文件。
在该技术方案中,通过在用于程序的某个运行时间的,监视应用程序的运行情况,将运行频率最高的工作频率确定为工作频率上限,并写入配置文件,与取平均工作频率相比,基于运行频率最高的工作频率运行,使应用程序运行过程中更平稳。
对于处理器的工作核数,也可以将运行频率最高的工作核数确定为工作核数上限。
另外,还可以通过将应用程序正常运行时的最低工作频率确定为工作频率上限,以实现进一步省电的目的。
在上述任一项技术方案中,优选地,确定单元204还设置为:确定指定应用程序的应用类型;确定单元204还设置为:根据应用类型确定与指定应用程序同类型的应用程序;生成单元206还设置为:根据指定应用程序的工作频率和/或工作核数生成同类型的应用程序的配置参数。
在该技术方案中,对于同类型的应用程序,根据指定应用程序的工作频率和/或工作核数,生成同类型的应用程序的配置参数,并写入配置文件中,实现了对应用程序的工作频率和/或工作核数限制的批量操作,进一步方便了用户的处理,提升了用户的使用体验。
另外,也可以根据预存的应用程序与应用程序类型的对应关系,确定应用程序的类型,根据预存的应用程序的类型与处理器的工作频率的对应关系,确定与该类应用程序对应的处理器的工作频率,并确定为工作频率上限。
需要说明的是,应用类型可以包括但不限于音频播放类型、视频播放类型、电子书类型和社交应用类型等。
本发明实施例终端中的单元可以根据实际需要进行合并、划分和删减。
图3示出了根据本发明的实施例的终端的示意框图。
如图3所示,根据本发明的实施例的终端300,包括上述任一项技术方案的所述处理器的工作频率和/或工作核数的调整装置200,因此,该终端包括上述任一项技术方案所述的处理器的工作频率和/或工作核数的调整装置200的技术效果,在此不再赘述。
图4示出了根据本发明的另一个实施例的处理器的工作频率和/或工作核数的调整方法的示意流程图。
步骤402,安装第三方应用;
步骤404,判断第三方应用是否在配置文件中,在判断结果为“是”时,进入步骤410,在判断结果为“否”时,进入步骤406;
步骤406,首次运行第三方应用,获取CPU、GPU的工作频率及工作核数;
步骤408,将应用名、CUP以及GUP的限制参数写入配置文件;
步骤410,运行该第三方应用。
在该技术方案中,首次安装第三方应用时,检查此应用是否在限频限核配置文件的名单中,若不在,则在首次使用应用时,监测CPU、GPU的工作频率以及工作核数,并依据一定策略计算得到CPU,GPU的限制参数,即工作频率上限与工作核数上限,实现了对指定应用程序运行时的工作频率和/或工作核数的限制,不需要用户手动设置,方便了用户的操作,延长了终端的待机时间,提升了用户的使用体验。
图5示出了根据本发明的一个实施例的工作时间与工作频率的关系图。
如图5所示,在指定应用程序运行70s过程中,在900MHz至1150MHz范围内,监测CPU的工作频率,通过检测发现CPU大部分时间运行在1000MHz,只有少部分时间运行在1100MHz,因此将1000MHz确定为工作频繁上限,即该应用程序运行时,CUP的工作频率不超过1000MHz,在省电的同时使应用程序的运行更平稳。
图6示出了根据本发明的实施例的终端的结构示意图。
如图6所示,为本发明一个实施例提供的一种终端的结构示意图,在本发明实施例中,所述终端300包括处理器301、存储器302和收发器303。收发器303用于与外部设备之间收发数据。所述终端300中的处理器301的数量可以是一个或多个。本发明的一些实施例中,所述处理器301、存储器302和收发器303可通过总线系统或其他方式连接。所述终端300可以用于执行图1所示的方法。
其中,存储器302中存储程序代码,且所述处理器301可通过总线系统,调用所述存储器302中存储的程序代码以执行相关的功能。例如,图2中所述的各个单元(例如,所述检测单元202、所述确定单元204、所述生成单元206、所述写入单元208等)是存储在所述存储器302中的程序代码,并由所述处理器301所执行,从而实现所述各个单元的功能以实现处理器工作频率和/或工作核数的调整方法。
具体而言,所述处理器301:检测配置文件中是否具备指定应用程序的配置参数;在检测到不具备所述配置参数时,确定所述指定应用程序运行时处理器的工作频率和/或工作核数;根据预设的调整策略以及所述工作频率和/或工作核数生成所述配置参数,并将所述配置参数写入所述配置文件,其中,所述配置参数用于调整所述指定应用程序运行时的工作频率和/或工作核数。
在进一步的实施例中,所述配置参数包括:所述应用程序的安装包名,所述应用程序运行时所述处理器的工作频率上限和/或所述应用程序运行时所述处理器的工作核数上限。
在进一步的实施例中,所述根据预设的调整策略与所述工作频率与工作核数生成所述配置参数,并将所述配置参数写入配置文件,具体包括以下:所述处理器301确定所述指定应用程序的预设运行时间段内的实时工作频率;根据所述实时工作频率确定所述指定应用程序在所述预设运行时间段内的平均工作频率,并将所述平均工作频率确定为所述工作频率上限;将所述工作频率上限与所述安装包名写入所述配置文件。
在进一步的实施例中,所述根据预设的调整策略与所述工作频率与工作核数生成所述配置参数,并将所述配置参数写入配置文件,具体包括:所述处理器301确定所述应用程序的运行时间;确定所述运行时间内运行频率最高的工作频率,并将所述运行频率最高的工作频率确定为所述工作频率上限;将所述工作频率上限与所述安装包名写入所述配置文件。
在进一步的实施例中,所述处理器301:确定所述指定应用程序的应用类型;根据所述应用类型确定与所述指定应用程序同类型的应用程序;根据所述指定应用程序的工作频率和/或工作核数生成所述同类型的应用程序的配置参数。
以上结合附图详细说明了本发明的技术方案,考虑到相关技术中如何在第三方应用程序运行时自动实现处理器的限频和/或限核的技术问题,本发明提出了一种新的调整方案,通过检测配置文件中是否具备指定应用程序的配置参数,以在检测不到配置参数时,根据指定应用程序运行时处理器的工作频率和/或工作核数以及预设的调整策略生成配置参数,并将配置参数写入配置文件中,实现了对指定应用程序运行时的工作频率和/或工作核数的限制,不需要用户手动设置,方便了用户的操作,延长了终端的待机时间,提升了用户的使用体验。
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。

Claims (11)

  1. 一种处理器的工作频率和/或工作核数的调整方法,其特征在于,包括:
    检测配置文件中是否具备指定应用程序的配置参数;
    在检测到不具备所述配置参数时,确定所述指定应用程序运行时处理器的工作频率和/或工作核数;
    根据预设的调整策略以及所述工作频率和/或工作核数生成所述配置参数,并将所述配置参数写入所述配置文件,
    其中,所述配置参数用于调整所述指定应用程序运行时的工作频率和/或工作核数。
  2. 根据权利要求1所述的处理器的工作频率和/或工作核数的调整方法,其特征在于,所述配置参数包括:
    所述应用程序的安装包名,所述应用程序运行时所述处理器的工作频率上限和/或所述应用程序运行时所述处理器的工作核数上限。
  3. 根据权利要求2所述的处理器的工作频率和/或工作核数的调整方法,其特征在于,所述根据预设的调整策略与所述工作频率与工作核数生成所述配置参数,并将所述配置参数写入配置文件,具体包括以下步骤:
    确定所述指定应用程序的预设运行时间段内的实时工作频率;
    根据所述实时工作频率确定所述指定应用程序在所述预设运行时间段内的平均工作频率,并将所述平均工作频率确定为所述工作频率上限;
    将所述工作频率上限与所述安装包名写入所述配置文件。
  4. 根据权利要求2所述的处理器的工作频率和/或工作核数的调整方法,其特征在于,所述根据预设的调整策略与所述工作频率与工作核数生成所述配置参数,并将所述配置参数写入配置文件,具体包括以下步骤:
    确定所述应用程序的运行时间;
    确定所述运行时间内运行频率最高的工作频率,并将所述运行频率最高的工作频率确定为所述工作频率上限;
    将所述工作频率上限与所述安装包名写入所述配置文件。
  5. 根据权利要求1至4中任一项所述的处理器的工作频率和/或工作核数的调整方法,其特征在于,还包括:
    确定所述指定应用程序的应用类型;
    根据所述应用类型确定与所述指定应用程序同类型的应用程序;
    根据所述指定应用程序的工作频率和/或工作核数生成所述同类型的应用程序的配置参数。
  6. 一种处理器的工作频率和/或工作核数的调整装置,其特征在于,包括:
    检测单元,设置为检测配置文件中是否具备指定应用程序的配置参数;
    确定单元,设置为在检测到不具备所述配置参数时,确定所述指定应用程序运行时处理器的工作频率和/或工作核数;
    生成单元,设置为根据预设的调整策略以及所述工作频率和/或工作核数生成所述配置参数,并将所述配置参数写入所述配置文件,
    其中,所述配置参数用于调整所述指定应用程序运行时的工作频率和/或工作核数。
  7. 根据权利要求6所述的处理器的工作频率和/或工作核数的调整装置,其特征在于,所述配置参数包括:
    所述应用程序的安装包名,所述应用程序运行时所述处理器的工作频率上限和/或所述应用程序运行时所述处理器的工作核数上限。
  8. 根据权利要求7所述的处理器的工作频率和/或工作核数的调整装置,其特征在于,
    所述确定单元还设置为:确定所述指定应用程序的预设运行时间段内的实时工作频率;
    所述确定单元还设置为:根据所述实时工作频率确定所述指定应用程序在所述预设运行时间段内的平均工作频率,并将所述平均工作频率确定为所述工作频率上限;
    所述处理器的工作频率和/或工作核数的调整装置还包括:
    写入单元,设置为将所述工作频率上限与所述安装包名写入所述配置文件。
  9. 根据权利要求7所述的处理器的工作频率和/或工作核数的调整装置,其特征在于,
    所述确定单元还设置为:确定所述应用程序的运行时间;
    所述确定单元还设置为:确定所述运行时间内运行频率最高的工作频率,并将所述运行频率最高的工作频率确定为所述工作频率上限;
    所述写入单元还设置为:将所述工作频率上限与所述安装包名写入所述配置文件。
  10. 根据权利要求6至9中任一项所述的处理器的工作频率和/或工作核数的调整装置,其特征在于,
    所述确定单元还设置为:确定所述指定应用程序的应用类型;
    所述确定单元还设置为:根据所述应用类型确定与所述指定应用程序同类型的应用程序;
    所述生成单元还设置为:根据所述指定应用程序的工作频率和/或工作核数生成所述同类型的应用程序的配置参数。
  11. 一种终端,其特征在于,包括:如权利要求6至10中任一项所述的处理器的工作频率和/或工作核数的调整装置。
PCT/CN2016/107949 2016-07-29 2016-11-30 处理器工作频率和/或工作核数的调整方法、装置和终端 WO2018018820A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610614688.1A CN106249844A (zh) 2016-07-29 2016-07-29 处理器工作频率和/或工作核数的调整方法、装置和终端
CN201610614688.1 2016-07-29

Publications (1)

Publication Number Publication Date
WO2018018820A1 true WO2018018820A1 (zh) 2018-02-01

Family

ID=57606010

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/107949 WO2018018820A1 (zh) 2016-07-29 2016-11-30 处理器工作频率和/或工作核数的调整方法、装置和终端

Country Status (2)

Country Link
CN (1) CN106249844A (zh)
WO (1) WO2018018820A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11036209B2 (en) * 2019-09-24 2021-06-15 Rockwell Automation Technologies, Inc. Peer-level control of industrial automation system components

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018191847A1 (zh) * 2017-04-17 2018-10-25 深圳市柔宇科技有限公司 头戴式显示设备及其传感器功率调节方法
CN107102707B (zh) * 2017-04-19 2020-09-29 青岛海信移动通信技术股份有限公司 温度控制方法及移动终端
CN107391254B (zh) * 2017-06-14 2021-03-26 深圳天珑无线科技有限公司 智能终端及其资源配置方法、计算机可读存储介质
CN109889896B (zh) * 2019-03-27 2022-05-27 努比亚技术有限公司 动态调节cpu运行频率的方法、移动终端及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102810066A (zh) * 2011-06-03 2012-12-05 北京千橡网景科技发展有限公司 终端适配方法、基于终端特性配置程序的终端及服务器
CN103077087A (zh) * 2013-01-10 2013-05-01 惠州Tcl移动通信有限公司 一种应用程序自动适配多核处理器模式的方法及移动设备
CN104424031A (zh) * 2013-08-23 2015-03-18 中兴通讯股份有限公司 一种处理器工作频率的控制方法及装置
CN105302270A (zh) * 2014-06-27 2016-02-03 宇龙计算机通信科技(深圳)有限公司 一种终端续航的优化方法、装置及终端
CN105334939A (zh) * 2014-06-30 2016-02-17 北京安兔兔科技有限公司 终端功耗控制方法及装置

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102104690A (zh) * 2009-12-22 2011-06-22 康佳集团股份有限公司 一种节省电能的方法、装置和移动终端
CN104794005A (zh) * 2015-03-23 2015-07-22 北京畅游天下网络技术有限公司 一种优化cpu运行频率的方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102810066A (zh) * 2011-06-03 2012-12-05 北京千橡网景科技发展有限公司 终端适配方法、基于终端特性配置程序的终端及服务器
CN103077087A (zh) * 2013-01-10 2013-05-01 惠州Tcl移动通信有限公司 一种应用程序自动适配多核处理器模式的方法及移动设备
CN104424031A (zh) * 2013-08-23 2015-03-18 中兴通讯股份有限公司 一种处理器工作频率的控制方法及装置
CN105302270A (zh) * 2014-06-27 2016-02-03 宇龙计算机通信科技(深圳)有限公司 一种终端续航的优化方法、装置及终端
CN105334939A (zh) * 2014-06-30 2016-02-17 北京安兔兔科技有限公司 终端功耗控制方法及装置

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11036209B2 (en) * 2019-09-24 2021-06-15 Rockwell Automation Technologies, Inc. Peer-level control of industrial automation system components
US11579597B2 (en) 2019-09-24 2023-02-14 Rockwell Automation Technologies, Inc. Peer-level control of industrial automation system components

Also Published As

Publication number Publication date
CN106249844A (zh) 2016-12-21

Similar Documents

Publication Publication Date Title
WO2018018820A1 (zh) 处理器工作频率和/或工作核数的调整方法、装置和终端
WO2018214320A1 (zh) 数据库业务逻辑监控方法、系统、及存储介质
US7249024B2 (en) Resource saving preemption
WO2014071755A1 (zh) 实现移动终端应用程序下载的方法及移动终端
WO2018076861A1 (zh) 数据传输的控制方法、装置、存储介质、服务器及系统
WO2016141667A1 (zh) 一种移动终端的网络连接控制方法及系统
WO2017107611A1 (zh) 一种智能家居控制方法以及装置、系统
WO2017088513A1 (zh) 一种混合网络制式下的业务处理方法、装置及移动终端
WO2018076841A1 (zh) 数据分享方法、装置、存储介质及服务器
WO2018068533A1 (zh) 一种人脸检测的方法及装置
WO2017076039A1 (zh) 一种智能设备多屏幕运行实现方法及其系统
WO2015003516A1 (zh) 生成升级包的方法、服务器、软件升级方法、移动终端
WO2016095551A1 (zh) 一种MySQL数据库监控选项脚本的实现方法及装置
WO2017219661A1 (zh) 一种控制终端进程的方法及系统
WO2018227772A1 (zh) 柜员机控件更新方法、装置、计算机设备及存储介质
WO2017096924A1 (zh) 一种基于移动终端的页面连续截图方法、系统及移动终端
WO2018076865A1 (zh) 数据分享方法、装置、存储介质及电子设备
WO2020258574A1 (zh) 空调器的控制方法、装置、空调器和存储介质
WO2013174210A1 (zh) 一种闪存设备中数据存储的方法及装置
WO2019100593A1 (zh) 电视待机开机方法、电视及计算机可读存储介质
WO2018076869A1 (zh) 一种数据备份方法、装置、存储介质和电子设备
WO2013123816A1 (zh) 手机及其文件配置方法
WO2015180434A1 (zh) 一种数据库集群管理数据的方法、节点及系统
EP3000045A1 (en) Apparatus and method of recognizing external device in a communication system
WO2018135800A1 (en) Electronic apparatus, control method of the same, and recording media

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: 16910398

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16910398

Country of ref document: EP

Kind code of ref document: A1