CN112380012A - Resource adjusting method and device, terminal equipment and storage medium - Google Patents

Resource adjusting method and device, terminal equipment and storage medium Download PDF

Info

Publication number
CN112380012A
CN112380012A CN202011278203.9A CN202011278203A CN112380012A CN 112380012 A CN112380012 A CN 112380012A CN 202011278203 A CN202011278203 A CN 202011278203A CN 112380012 A CN112380012 A CN 112380012A
Authority
CN
China
Prior art keywords
intelligent terminal
decision
system state
adjusting
algorithm model
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202011278203.9A
Other languages
Chinese (zh)
Inventor
王睿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Oppo Chongqing Intelligent Technology Co Ltd
Original Assignee
Oppo Chongqing Intelligent Technology Co Ltd
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 Oppo Chongqing Intelligent Technology Co Ltd filed Critical Oppo Chongqing Intelligent Technology Co Ltd
Priority to CN202011278203.9A priority Critical patent/CN112380012A/en
Publication of CN112380012A publication Critical patent/CN112380012A/en
Pending legal-status Critical Current

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]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • 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/329Power saving characterised by the action undertaken by task scheduling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3058Monitoring arrangements for monitoring environmental properties or parameters of the computing system or of the computing system component, e.g. monitoring of power, currents, temperature, humidity, position, vibrations
    • 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]
    • G06F9/5094Allocation of resources, e.g. of the central processing unit [CPU] where the allocation takes into account power or heat criteria
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • Mathematical Physics (AREA)
  • Telephone Function (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The application discloses a resource adjusting method, a device, a terminal device and a storage medium, wherein the method comprises the following steps: the system state of the intelligent terminal during running application is monitored; obtaining a decision result corresponding to the system state based on a pre-trained decision algorithm model; and adjusting and controlling the system state parameters of the intelligent terminal according to the decision result so as to adjust the system resources. According to the scheme, the problem of overhigh power consumption caused by the SoC of the intelligent terminal is reduced as much as possible while the application performance of the intelligent terminal is ensured, the heating condition of the intelligent terminal is reduced, the endurance of the intelligent terminal is prolonged, and better application experience is created for a user.

Description

Resource adjusting method and device, terminal equipment and storage medium
Technical Field
The present application relates to the field of intelligent terminal technologies, and in particular, to a resource adjusting method and apparatus, a terminal device, and a storage medium.
Background
In the existing GameZone (game space) technology, in order to save the power consumption of the mobile phone, a method for limiting the resources of the mobile phone is adopted, which limits the frequency according to a single dimension of the real-time monitoring of the production frame rate of the faceflunger (image composition service), wherein a lower fixed frequency is defined when the production is fast, and a relatively higher frequency is defined when the production is slow.
Most of the existing technologies rely on the autonomous regulation of a mobile phone SoC chip (system on chip), which often causes the frequency of a CPU/GPU (central processing unit/graphics processing unit) to be increased too high, resulting in the situation that the mobile phone is hot. And the dimension of monitoring is too little, only the single dimension of the speed of producing the frame by the mobile phone is needed, the output control frequency can be switched between two fixed frequencies, and the control is not intelligent, flexible and accurate enough. In addition, the existing related technology is difficult to maintain, and a great amount of time and manpower resources are consumed for adjusting one game on one model.
Disclosure of Invention
The application mainly aims to provide a resource adjusting method, a resource adjusting device, a terminal device and a storage medium, and aims to realize intelligent adjustment of system resources of an intelligent terminal and reduce power consumption of the intelligent terminal while ensuring application running performance.
In order to achieve the above object, the present application provides a resource adjusting method, where the resource adjusting method is applied to an intelligent terminal, and the resource adjusting method includes the following steps:
monitoring the system state of the intelligent terminal when the intelligent terminal runs an application;
obtaining a decision result corresponding to the system state based on a pre-trained decision algorithm model;
and adjusting and controlling the system state parameters of the intelligent terminal according to the decision result so as to adjust system resources.
In addition, an embodiment of the present application further provides a resource adjusting apparatus, where the resource adjusting apparatus includes:
the monitoring module is used for monitoring the system state of the intelligent terminal during running application;
the decision algorithm module is used for acquiring a decision result corresponding to the system state based on a pre-trained decision algorithm model;
and the adjusting control module is used for adjusting and controlling the system state parameters of the intelligent terminal according to the decision result so as to adjust the system resources.
The embodiment of the present application further provides a terminal device, where the terminal device includes a memory, a processor, and a resource adjusting program stored in the memory and capable of running on the processor, and the resource adjusting program, when executed by the processor, implements the steps of the resource adjusting method described above.
An embodiment of the present application further provides a computer-readable storage medium, where a resource adjusting program is stored on the computer-readable storage medium, and when being executed by a processor, the resource adjusting program implements the steps of the resource adjusting method described above.
The resource adjusting method, the resource adjusting device, the terminal equipment and the storage medium provided by the embodiment of the application monitor the system state of the intelligent terminal when the intelligent terminal runs and applies; obtaining a decision result corresponding to the system state based on a pre-trained decision algorithm model; and adjusting and controlling the system state parameters of the intelligent terminal according to the decision result so as to adjust system resources. The scheme can utilize a machine learning method to train a decision algorithm model, real-time data of intelligent terminals such as mobile phones and the like are used as input, a special state is synthesized through the decision algorithm model, and finally the action most suitable for the current intelligent terminal state is obtained according to the calculation of the model. According to the scheme, the system state parameters such as the CPU/GPU/DDR frequency point of the intelligent terminal can be output by utilizing the actions, and the system resources of the intelligent terminal are adjusted according to the output system state parameters. When the application performance of the intelligent terminal is guaranteed, the problem of overhigh power consumption caused by the SoC of the intelligent terminal is reduced as much as possible, the heating condition of the intelligent terminal is reduced, the endurance of the intelligent terminal is prolonged, and better application experience is created for a user.
Drawings
Fig. 1 is a schematic diagram of functional modules of a terminal device to which a resource adjusting apparatus of the present application belongs;
FIG. 2 is a flowchart illustrating an exemplary embodiment of a resource adjustment method of the present application;
FIG. 3 is a diagram illustrating a data structure read in an embodiment of the present application;
FIG. 4 is a schematic structural diagram of a controller according to an embodiment of the present disclosure;
FIG. 5 is a schematic flow chart diagram illustrating another exemplary embodiment of a resource adjustment method of the present application;
FIG. 6 is a schematic flow chart diagram illustrating a resource adjustment method according to still another exemplary embodiment of the present application;
FIG. 7 is a schematic flow chart diagram illustrating a resource adjustment method according to another exemplary embodiment of the present application;
FIG. 8 is a schematic flow chart diagram illustrating a resource adjustment method according to another exemplary embodiment of the present application;
fig. 9 is a flowchart illustrating a resource adjustment method according to another exemplary embodiment of the present application.
The implementation, functional features and advantages of the objectives of the present application will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The main solution of the embodiment of the application is as follows: the system state of the intelligent terminal during running application is monitored; obtaining a decision result corresponding to the system state based on a pre-trained decision algorithm model; and adjusting and controlling the system state parameters of the intelligent terminal according to the decision result so as to adjust system resources. The scheme can utilize a machine learning method to train a decision algorithm model, real-time data of intelligent terminals such as mobile phones and the like are used as input, a special state is synthesized through the decision algorithm model, and finally the action most suitable for the current intelligent terminal state is obtained according to the calculation of the model. According to the scheme, the system state parameters such as the CPU/GPU/DDR frequency point of the intelligent terminal can be output by utilizing the actions, and the system resources of the intelligent terminal are adjusted according to the output system state parameters. When the application performance of the intelligent terminal is guaranteed, the problem of overhigh power consumption caused by the SoC of the intelligent terminal is reduced as much as possible, the heating condition of the intelligent terminal is reduced, the endurance of the intelligent terminal is prolonged, and better application experience is created for a user.
The technical terms related to the embodiments of the present application are:
DDR, Double Data Rate, Double Rate synchronous dynamic random access memory;
FPS, Frames per second;
GPU, Graphics Processing Unit, Graphics processor;
CPU, Central Processing Unit;
surfefinger, image composition service.
SOC, System on Chip, and cell phone chipset, commonly referred to as System-on-Chip, also referred to as System-on-Chip, are integrated circuits with special purpose, which contain the complete System and embed all the contents of the software. In a narrow sense, the system is the chip integration of the core of an information system, and the key components of the system are integrated on one chip.
In the embodiment of the present application, it is considered that, in the related art, in order to save the power consumption of the mobile phone, a method for limiting the mobile phone resources is adopted, which limits the frequency according to a single dimension of the real-time monitoring of the production frame rate of the faceflunger (image composition service). Most of the technology depends on the autonomous adjustment of the SoC chip of the mobile phone, and the frequency of the CPU/GPU is often increased too high, so that the mobile phone is heated and scalded. And the dimension of monitoring is too little, only the single dimension of the speed of producing the frame by the mobile phone is needed, the output control frequency can be switched between two fixed frequencies, and the control is not intelligent, flexible and accurate enough. In addition, the existing related technology is difficult to maintain, and a great amount of time and manpower resources are consumed for adjusting one game on one model.
Therefore, the solution provided by the embodiment of the application can realize intelligent adjustment of the system resources of the intelligent terminal, and reduce the power consumption of the intelligent terminal while ensuring the application running performance.
Specifically, referring to fig. 1, fig. 1 is a schematic diagram of a functional module of a terminal device to which the resource adjusting apparatus of the present application belongs. The resource adjusting device may be a device which is independent of the terminal device and can adjust the system resource of the terminal device, and the device may be borne on the terminal device in a form of hardware or software. The terminal device can be an intelligent mobile terminal such as a mobile phone and a tablet personal computer capable of running various application programs, and can also be a fixed terminal device or a server for installing various application programs.
In this embodiment, the terminal device to which the resource adjusting apparatus belongs at least includes an output module 110, a processor 120, a memory 130, and a communication module 140.
The memory 130 stores an operating system and a resource adjusting test program, and the resource adjusting device can store information such as a monitored system state when the intelligent terminal runs and applies, an obtained decision result corresponding to the system state, and a system state parameter after adjusting and controlling the system state parameter of the intelligent terminal according to the decision result in the memory 130; the output module 110 may be a display screen, a speaker, etc. The communication module 140 may include a WIFI module, a mobile communication module, a bluetooth module, and the like, and communicates with an external device or a server through the communication module 140.
Wherein the resource adjusting program in the memory 130, when executed by the processor, implements the steps of:
monitoring the system state of the intelligent terminal when the intelligent terminal runs an application;
obtaining a decision result corresponding to the system state based on a pre-trained decision algorithm model;
and adjusting and controlling the system state parameters of the intelligent terminal according to the decision result so as to adjust system resources.
Further, the resource adjustment program in the memory 130 when executed by the processor further implements the steps of:
searching the state decision mapping table according to the system state to obtain an adjusting control instruction with the highest decision value;
and outputting a corresponding decision action as a decision result according to the obtained adjusting control instruction with the highest decision value.
Further, the resource adjustment program in the memory 130 when executed by the processor further implements the steps of:
reading system state parameters when the intelligent terminal runs an application, wherein the system state parameters comprise one or more of the following parameters: state parameters of a system CPU, a GPU and a DDR;
and obtaining the system state of the intelligent terminal when the intelligent terminal runs the application according to the system state parameters.
Further, the resource adjustment program in the memory 130 when executed by the processor further implements the steps of:
and preprocessing the system state parameters.
Further, the resource adjustment program in the memory 130 when executed by the processor further implements the steps of:
outputting a corresponding adjusting control action of the CPU/GPU/DDR frequency point as a decision result according to the adjusting control instruction with the highest decision value;
the step of adjusting and controlling the system state parameters of the intelligent terminal according to the decision result to adjust the system resources comprises:
and adjusting the CPU/GPU/DDR frequency point of the intelligent terminal according to the output adjustment control action of the corresponding CPU/GPU/DDR frequency point so as to adjust the system resource.
Further, the resource adjustment program in the memory 130 when executed by the processor further implements the steps of:
and respectively adjusting the maximum frequency point of the CPU/GPU/DDR of the intelligent terminal through a maximum frequency controller and adjusting the minimum frequency point of the CPU/GPU/DDR of the intelligent terminal through a minimum frequency controller according to the output adjustment control action of the corresponding CPU/GPU/DDR frequency point.
Further, the resource adjustment program in the memory 130 when executed by the processor further implements the steps of:
and releasing the regulation control of the system state parameters of the intelligent terminal in response to the program exit instruction of the application.
Further, the resource adjustment program in the memory 130 when executed by the processor further implements the steps of:
and training the decision algorithm model.
The step of training the decision algorithm model comprises:
collecting decision algorithm model related data of the intelligent terminal;
obtaining the real-time system running state of the intelligent terminal based on the decision algorithm model related data;
configuring system state parameters to execute actions based on the real-time running state of the system;
outputting a corresponding system parameter adjusting control instruction according to the system state parameter execution action;
adjusting the system real-time state parameters of the intelligent terminal based on the system state parameter adjusting control instruction;
obtaining the system state of the intelligent terminal after adjusting the real-time state parameters of the system;
evaluating the system state of the intelligent terminal after the real-time state parameters of the system are adjusted to obtain a corresponding decision value;
the system state of the intelligent terminal after the real-time state parameters of the system are adjusted, the system state parameter adjusting control instruction and the corresponding decision value are stored in the state decision mapping table in an associated mode;
and repeatedly executing the steps and carrying out iteration, and training the decision algorithm model to obtain the trained decision algorithm model.
Further, the resource adjustment program in the memory 130 when executed by the processor further implements the steps of:
and preprocessing the relevant data of the decision algorithm model.
Further, the resource adjustment program in the memory 130 when executed by the processor further implements the steps of:
periodically reading system real-time state parameters of the intelligent terminal;
collecting the application type and application scene information of the running application on the intelligent terminal;
acquiring the model and/or current user information of the intelligent terminal;
receiving network related configuration information pushed by a cloud;
further, the resource adjustment program in the memory 130 when executed by the processor further implements the steps of:
and updating the decision algorithm model according to the current regulation control result.
Further, the resource adjustment program in the memory 130 when executed by the processor further implements the steps of:
and correcting the decision algorithm model according to the current regulation control result and by combining a big data return function.
Further, the resource adjustment program in the memory 130 when executed by the processor further implements the steps of:
and when the current regulation control result is abnormal, compensating the current regulation control result according to a preset strategy.
According to the scheme, the system state of the intelligent terminal during running application is monitored; obtaining a decision result corresponding to the system state based on a pre-trained decision algorithm model; and adjusting and controlling the system state parameters of the intelligent terminal according to the decision result so as to adjust system resources. The scheme can utilize a machine learning method to train a decision algorithm model, real-time data of intelligent terminals such as mobile phones and the like are used as input, a special state is synthesized through the decision algorithm model, and finally the action most suitable for the current intelligent terminal state is obtained according to the calculation of the model. According to the scheme, the system state parameters such as the CPU/GPU/DDR frequency point of the intelligent terminal can be output by utilizing the actions, and the system resources of the intelligent terminal are adjusted according to the output system state parameters. When the application performance of the intelligent terminal is guaranteed, the problem of overhigh power consumption caused by the SoC of the intelligent terminal is reduced as much as possible, the heating condition of the intelligent terminal is reduced, the endurance of the intelligent terminal is prolonged, and better application experience is created for a user.
Based on the above terminal device architecture but not limited to the above architecture, embodiments of the method of the present application are provided.
The execution subject of the method of the embodiment may be a resource adjusting device, or may be a fixed terminal device or a server, etc. in which various application programs are installed. In this embodiment, a resource adjusting device is taken as an example, and the resource adjusting device may be borne on the intelligent terminal device in a form of hardware or software. The intelligent terminal equipment can be an intelligent mobile terminal such as a mobile phone and a tablet personal computer which can run various application programs.
The resource adjusting apparatus may include:
the monitoring module is used for monitoring the system state of the intelligent terminal during running application;
the decision algorithm module is used for acquiring a decision result corresponding to the system state based on a pre-trained decision algorithm model;
and the adjusting control module is used for adjusting and controlling the system state parameters of the intelligent terminal according to the decision result so as to adjust the system resources.
Specifically, referring to fig. 2, fig. 2 is a flowchart illustrating an exemplary embodiment of a resource adjusting method according to the present application. The resource adjusting method is applied to the intelligent terminal and comprises the following steps:
s101, monitoring a system state when the intelligent terminal runs an application;
the monitoring system state of the intelligent terminal during running application is to adjust state parameters such as the frequency of a CPU/GPU/DDR of the system according to the current system state so as to reasonably utilize system resources of the intelligent terminal, the problem of overhigh power consumption caused by the SoC of the intelligent terminal is reduced as much as possible while the application performance of the intelligent terminal is ensured, the heating condition of the intelligent terminal is reduced, the endurance of the intelligent terminal is prolonged, and better application experience is created for a user.
As an implementation manner, the system state may be determined according to a system state parameter when the intelligent terminal runs the application.
The system state parameters may include one or more of the following parameters: state parameters of a system CPU, a GPU, a DDR and an FPS; specifically, taking a mobile phone as an example, the following parameters may be included: game real-time FPS, CPU frequency, GPU frequency, CPU load, GPU load, frame interval, CPU temperature, GPU temperature, handset case temperature, etc.
For example, there are 24 FPS states (from 0-120, one state every 5 FPS), and the CPU/GPU frequency varies according to the mobile phone chip. The final system state is composed of a state union of each of the above. For example, the A state of the system can be defined as { FPS:60, CPU frequency: 2.4G, GPU frequency: 300M, CPU load: 0.5, GPU load: 0.2, temperature: 40 degrees }.
Specifically, as an implementation manner, the monitoring a system state when the intelligent terminal runs an application may include:
and reading the system state parameters when the intelligent terminal runs the application, wherein the read data structure can be shown in fig. 3.
In a specific implementation, a data reading module, such as a data reader, may be disposed in the monitoring module of the resource adjusting device, and the data reader may include a plurality of containers, and each container is responsible for reading one type of data. In addition to reading, the container also needs to save the read data.
After the data reading is completed, it needs to be preprocessed to ensure that the data is provided to the algorithm module in the correct format.
Furthermore, the system state parameters can be preprocessed after the system state parameters of the intelligent terminal during running application are read, wherein the preprocessing is mainly to align the data to obtain a proper and correct data format for subsequent algorithm processing.
When data is read, the data reading module is mainly carried out through the Oiface service of the mobile phone system, and the reading time interval can be modified correspondingly according to platforms of different mobile phones. The selection principle is to ensure that the extra power consumption generated by the load brought by the algorithm is within a reasonable range, and the timeliness of the data is ensured. Considering the 60Hz refresh rate for most cell phone screens, a 16.6 ms frame interval, 50ms is a reasonable time interval. Namely, in the scheme of the application, the system data is acquired once in 50 milliseconds, so that the data is more effective while the load brought by the algorithm is reduced as much as possible.
And then, obtaining the system state of the intelligent terminal when the intelligent terminal runs the application according to the system state parameters.
Step S102, obtaining a decision result corresponding to the system state based on a pre-trained decision algorithm model;
as an embodiment, the decision algorithm model may include a state decision mapping table, where the state decision mapping table includes mapping relationships between system states, adjustment control instructions, and corresponding decision values, and the step of obtaining a decision result corresponding to the system state based on a pre-trained decision algorithm model may include:
searching the state decision mapping table according to the system state to obtain an adjusting control instruction with the highest decision value;
and outputting a corresponding decision action as a decision result according to the obtained adjusting control instruction with the highest decision value.
The decision algorithm model is based on the principle that real-time data of intelligent terminals such as mobile phones are used as input by a reinforcement learning method in machine learning, a specific system state is synthesized through the decision algorithm model, and finally the action which is most suitable for the state of the intelligent terminals such as the mobile phones is obtained according to calculation of the decision algorithm model. And then, outputting system state parameters such as CPU/GPU/DDR frequency points and the like by utilizing the actions, and adjusting system resources of intelligent terminals such as mobile phones and the like according to the output frequency points.
The decision algorithm model is a model formed by integrating a series of calculation and construction methods constructed based on reinforcement learning, and comprises parts of processing input data, constructing and updating states, calculating return values, updating Q values, calculating weight of historical data and the like. Each part is responsible for a separate task. These tasks are executed according to a flow, and finally, actions are output.
Reinforcement learning is a branch of machine learning that is mainly used to describe and solve the problem of an Agent (Agent) in interacting with the environment to achieve maximum return or achieve a specific goal by learning a strategy. A common model of reinforcement learning consists of a series of markov states, with the Markov Decision Process (MDP) being used to make decisions. The method makes some improvements on a general reinforcement learning algorithm, does not depend on frequent interaction environment, adopts a history weighting mode when calculating the Reward value and the Q value, and applies exponential decay to the original value, so that the historical data at different times occupy different proportions. And simultaneously, the importance degree of the historical value is marked by setting some indexes such as an FPS threshold value, a CPU utilization rate and the like, and secondary correction is carried out on the alignment proportion.
The decision algorithm model body is composed of a Q table. The Q table is composed of a series of states, actions, and Q values mapped to each other. The Q value reflects how well a certain action is taken in a certain state. In the present application, the state is composed of various parameters of the system, and is divided into:
FPS, CPU frequency, GPU frequency, CPU load, GPU load, frame interval, temperature, wherein the temperature may include CPU temperature, GPU temperature, handset case temperature, etc.
For example, there are 24 FPS states (from 0-120, one state every 5 FPS), and the CPU/GPU frequency varies according to the mobile phone chip. The final system state is composed of a state union of each of the above. For example, the A state of the system can be defined as { FPS:60, CPU frequency: 2.4G, GPU frequency: 300M, CPU load: 0.5, GPU load: 0.2, temperature: 40 degrees }.
Taking a mobile phone as an example, each state corresponds to some actions, and after the corresponding actions are made, the quality degree of the actions at this time, namely the Q value, is calculated according to the new state reached by the mobile phone.
The definition of the action is as follows:
CPU_MAX Level Up;
CPU_MAX Level Down;
GPU_MAX Level Up;
GPU_MAX Level Down;
DDR_MAX Level Up;
DDR_MAX Level Down;
CPU_MIN Level Up;
CPU_MIN Level Down;
GPU_MIN Level Up;
GPU_MIN Level Down;
DDR_MIN Level Up;
DDR_MIN Level Down;
Same。
after a period of training, the decision algorithm model can obtain the best decision in the current state, and further implement corresponding actions. The whole training process is carried out at the mobile phone side, and the complete trained decision algorithm model can dynamically adjust various resources of the system in real time according to the existing state of the mobile phone, so that the application on the mobile phone, such as games, can obtain just good game resources, optimal processing is carried out under the condition of ensuring the game performance, and the purpose of saving resources is achieved.
And S103, adjusting and controlling the system state parameters of the intelligent terminal according to the decision result so as to adjust system resources.
Specifically, as described above, after the system state is obtained, a state decision mapping table in a decision algorithm model is searched according to the system state, and an adjustment control instruction with the highest decision value is obtained;
and then, outputting a corresponding decision action as a decision result according to the obtained adjusting control instruction with the highest decision value. For example, according to the obtained adjustment control instruction with the highest decision value, outputting a corresponding adjustment control action of system state parameters including a CPU/GPU/DDR frequency point and the like as a decision result;
and then, adjusting the system state parameters of the CPU/GPU/DDR frequency points and the like of the intelligent terminal according to the adjustment control action of the output corresponding system state parameters of the CPU/GPU/DDR frequency points and the like so as to adjust system resources.
Taking the adjustment of the CPU/GPU/DDR frequency point as an example, the step of adjusting the CPU/GPU/DDR frequency point of the intelligent terminal according to the output adjustment control action of the corresponding CPU/GPU/DDR frequency point may include:
and respectively adjusting the maximum frequency point of the CPU/GPU/DDR of the intelligent terminal through a maximum frequency controller and adjusting the minimum frequency point of the CPU/GPU/DDR of the intelligent terminal through a minimum frequency controller according to the output adjustment control action of the corresponding CPU/GPU/DDR frequency point.
And the maximum frequency controller and the minimum frequency controller are paired and bound pairwise.
The concrete implementation is as follows:
taking frequency control as an example, the frequency control is mainly realized by a single controller. Each controller load controls an output, specifically:
CPU _ MAX: the control and regulation of the maximum frequency of the CPU are carried out;
CPU _ MIN: the control and regulation of the minimum frequency of the CPU are carried out;
GPU _ MAX: the control unit is responsible for controlling and adjusting the maximum frequency of the GPU;
GPU _ MIN: the control is responsible for adjusting the minimum frequency of the GPU;
DDR _ MAX: the DDR maximum frequency is controlled and adjusted;
DDR _ MIN: and the control is responsible for adjusting the minimum frequency of the DDR.
The structure of the controller may be as shown in fig. 4, and in fig. 4, mlevel means "my level" and indicates a level value of a current parameter of the system.
The system of this embodiment has 6 controllers for controlling the module frequencies shown in fig. 4. Each controller has a level value, and after the decision algorithm module outputs an action, the controller firstly applies the action to modify the level value of the controller so as to adapt to frequency control. And then the controller receives a control command, and at the moment, the controller transmits the level value of the controller to the frequency modulation interface to realize frequency modulation.
The controllers will be paired two by two, i.e. MAX and MIN controls for each class are paired. To ensure the control is reasonable and accurate, the controller needs to be bundled. Each pair of controllers are interconnected and are classified into a strong connection relationship and a weak connection relationship. A weakly connected controller needs to obey the logic of a strongly connected controller. After pairing, the level values of the two controllers need to satisfy a connection formula, that is, the strong controller changes, the weak controller needs to change along with the strong controller, and otherwise, the weak controller does not need to change.
When frequency modulation is realized through a frequency modulation interface, as an implementation mode, frequency control is mainly realized through a high-pass perfLock interface. Each controller contains a set and release interface. The Set interface is responsible for setting the frequency and applying the output of the decision algorithm module. The Release interface is responsible for releasing the frequency control and is typically used when exiting the application. In order to ensure the accuracy of the control, the single control interval is generally not less than 50ms considering the time slice selection and the control time consumption of the system.
According to the scheme, the system state of the intelligent terminal during running application is monitored; obtaining a decision result corresponding to the system state based on a pre-trained decision algorithm model; and adjusting and controlling the system state parameters of the intelligent terminal according to the decision result so as to adjust system resources. The scheme can utilize a machine learning method to train a decision algorithm model, real-time data of intelligent terminals such as mobile phones and the like are used as input, a special state is synthesized through the decision algorithm model, and finally the action most suitable for the current intelligent terminal state is obtained according to the calculation of the model. According to the scheme, the system state parameters such as the CPU/GPU/DDR frequency point of the intelligent terminal can be output by utilizing the actions, and the system resources of the intelligent terminal are adjusted according to the output system state parameters. When the application performance of the intelligent terminal is guaranteed, the problem of overhigh power consumption caused by the SoC of the intelligent terminal is reduced as much as possible, the heating condition of the intelligent terminal is reduced, the endurance of the intelligent terminal is prolonged, and better application experience is created for a user.
Referring to fig. 5, fig. 5 is a flowchart illustrating another exemplary embodiment of the resource adjusting method of the present application. Based on the embodiment shown in fig. 2, the method further includes:
and step S104, responding to the program exit instruction of the application, and releasing the regulation control of the system state parameters of the intelligent terminal.
Compared with the embodiment shown in fig. 2, the present embodiment further includes releasing the adjustment control of the system state parameter of the intelligent terminal.
Specifically, taking a game application as an example, in a game using process, the implementation scheme of the embodiment shown in fig. 2 of the present application may be adopted to monitor a system state of the intelligent terminal when the game is run; obtaining a decision result corresponding to the system state based on a pre-trained decision algorithm model; and adjusting and controlling the system state parameters of the intelligent terminal according to the decision result so as to adjust system resources. After the system exits the game program, the release interface of the frequency modulation interface of the controller is called to release the frequency control, so that the system resource is saved, and unnecessary power consumption is avoided.
According to the scheme, the system state of the intelligent terminal during running application is monitored; obtaining a decision result corresponding to the system state based on a pre-trained decision algorithm model; and adjusting and controlling the system state parameters of the intelligent terminal according to the decision result so as to adjust system resources. And further, after the application program exits, the regulation control of the system state parameters of the intelligent terminal is released, the scheme can utilize a machine learning method and a training decision algorithm model, real-time data of the intelligent terminals such as mobile phones and the like are used as input, a special state is synthesized through the decision algorithm model, and finally the action which is most suitable for the current intelligent terminal state is obtained according to the calculation of the model. According to the scheme, the system state parameters such as the CPU/GPU/DDR frequency point of the intelligent terminal can be output by utilizing the actions, and the system resources of the intelligent terminal are adjusted according to the output system state parameters. When the application performance of the intelligent terminal is guaranteed, the problem of overhigh power consumption caused by the SoC of the intelligent terminal is reduced as much as possible, the heating condition of the intelligent terminal is reduced, the endurance of the intelligent terminal is prolonged, and better application experience is created for a user.
Referring to fig. 6, fig. 6 is a flowchart illustrating a resource adjustment method according to still another exemplary embodiment of the present application. Based on the embodiment shown in fig. 5, before the step S101, based on a pre-trained decision algorithm model, obtaining a decision result corresponding to the system state parameter, the method further includes:
and S100, training the decision algorithm model.
Compared with the embodiment shown in fig. 5, the embodiment further includes a scheme for training a decision algorithm model.
Specifically, the step of training the decision algorithm model may include:
firstly, collecting decision algorithm model related data of the intelligent terminal;
wherein the decision algorithm model related data may be pre-processed.
Then, obtaining the real-time running state of the system of the intelligent terminal based on the decision algorithm model related data;
configuring system state parameters to execute actions based on the real-time running state of the system;
outputting a corresponding system parameter adjusting control instruction according to the system state parameter execution action;
adjusting the system real-time state parameters of the intelligent terminal based on the system state parameter adjusting control instruction;
obtaining the system state of the intelligent terminal after adjusting the real-time state parameters of the system;
then, evaluating the system state of the intelligent terminal after the real-time state parameters of the system are adjusted to obtain a corresponding decision value;
the system state of the intelligent terminal after the real-time state parameters of the system are adjusted, the system state parameter adjusting control instruction and the corresponding decision value are stored in the state decision mapping table in an associated mode;
and repeatedly executing the steps and carrying out iteration, and training the decision algorithm model to obtain the trained decision algorithm model.
Specifically, in the above scheme, when collecting data related to a decision algorithm model of the intelligent terminal, one or more of the following manners may be adopted:
periodically reading system real-time state parameters of the intelligent terminal;
collecting the application type and application scene information of the running application on the intelligent terminal;
acquiring the model and/or current user information of the intelligent terminal;
and receiving network related configuration information pushed by the cloud.
The scheme for periodically reading the real-time system state parameters of the intelligent terminal can be as follows:
as an implementation manner, the system state may be determined according to a system state parameter when the intelligent terminal runs the application.
The system state parameters may include one or more of the following parameters: state parameters of a system CPU, a GPU, a DDR and an FPS; specifically, taking a mobile phone as an example, the following parameters may be included: game real-time FPS, CPU frequency, GPU frequency, CPU load, GPU load, frame interval, CPU temperature, GPU temperature, handset case temperature, etc.
For example, there are 24 FPS states (from 0-120, one state every 5 FPS), and the CPU/GPU frequency varies according to the mobile phone chip. The final system state is composed of a state union of each of the above. For example, the A state of the system can be defined as { FPS:60, CPU frequency: 2.4G, GPU frequency: 300M, CPU load: 0.5, GPU load: 0.2, temperature: 40 degrees }.
Specifically, as an implementation manner, the monitoring a system state when the intelligent terminal runs an application may include:
and reading the system state parameters when the intelligent terminal runs the application, wherein the read data structure can be shown in fig. 3.
In particular, a data reading module, such as a data reader, may be provided, and the data reader may include a plurality of containers, each of which is responsible for reading a type of data. In addition to reading, the container also needs to save the read data.
After the data reading is completed, it needs to be preprocessed to ensure that the data is provided to the algorithm module in the correct format.
Furthermore, the system state parameters can be preprocessed after the system state parameters of the intelligent terminal during running application are read, wherein the preprocessing is mainly to align the data to obtain a proper and correct data format for subsequent algorithm processing.
When data is read, the data reading module is mainly carried out through the Oiface service of the mobile phone system, and the reading time interval can be modified correspondingly according to platforms of different mobile phones. The selection principle is to ensure that the extra power consumption generated by the load brought by the algorithm is within a reasonable range, and the timeliness of the data is ensured. Considering the 60Hz refresh rate for most cell phone screens, a 16.6 ms frame interval, 50ms is a reasonable time interval. Namely, in the scheme of the application, the system data is acquired once in 50 milliseconds, so that the data is more effective while the load brought by the algorithm is reduced as much as possible.
Then, the system state of the intelligent terminal during running application can be obtained according to the system state parameters, and the system state parameters are adjusted and controlled based on the system state and in combination with a decision algorithm model.
In the above scheme, as a scheme extension, the application type and the application scene information of the running application on the intelligent terminal can be collected; acquiring the model and/or current user information of the intelligent terminal; and network related configuration information pushed by the cloud.
Specifically, taking a mobile game application as an example, in the process of collecting mobile data, in addition to data such as the state and resources of the mobile phone itself, the state of the game may be added. The game may provide its state information to refine the information input to the decision algorithm module. For example, the game may send a notification to the mobile phone telling the mobile phone that the game is in a loading, logging, battle, heavy load, light load, etc. scenario, helping the system to better understand the resources needed by the mobile phone in the current state, and outputting a finer and more accurate frequency adjustment.
In addition, the system can provide game scene information, temperature, network conditions and other information, the information can be utilized by mobile phone system resources, the information is filled into the decision algorithm module, the information is fully learned, and the decision algorithm model is trained, so that the accuracy of control of the decision algorithm model is improved.
The implementation process of the decision algorithm model of the embodiment can be as follows:
1) and the decision algorithm model receives the data provided by the data reading module and carries out pretreatment in an aligned mode.
2) After the preprocessing is completed, the data is saved to form historical data and is updated to the system.
3) Ready for decision making. There may be three decision modes of Random, Normal, and TryIns (reaching valid value): the Random mode corresponds to Random decision, and aims to jump out in the inherent cycle and enrich the content of the Q table; the Normal mode corresponds to a Normal decision, namely a decision with the most appropriate Q value is selected; the TryIns approach corresponds to a learning decision, that is, the algorithm selects as many as possible decisions that have not been learned in the learning process, so as to achieve the validity of each decision of each state.
4) And taking a decision and outputting a decision result to the regulation control module.
5) And the adjusting control module realizes frequency control.
6) And the decision algorithm module updates the last state according to the frequency control result.
Loop to 1).
And continuously updating and iterating through the process, and training the decision algorithm model to obtain the trained decision algorithm model.
In the process, the initial data obtained by the decision algorithm model can be not only the data inside the system, but also the strategy of real-time algorithm change by sending parameters through the cloud, so that the special parameter push aiming at different games, different devices and even different users can be realized. Different parameter pushing can control the behavior of the decision algorithm module, and differentiated control is achieved.
Compared with the prior art, according to the technical scheme, the required state can be fitted according to the data information provided by the intelligent terminal systems such as the mobile phone and the like, the system resources can be dynamically adjusted in real time by using a reinforcement learning method according to the state of the system, and the reasonable system resources can be provided for the game and the like under the condition of ensuring the application performance of the game and the like, so that the power consumption of the mobile phone is reduced.
In addition, the model parameter configuration can be issued through the cloud, real-time dynamic adjustment can be achieved, different configurations are pushed for different user groups, and deployment is conducted in a differentiated mode. Meanwhile, a faster mode is provided for the updating iteration of the model.
Furthermore, the cloud issuing parameters further improve the research and development efficiency, and shorten the tuning time of a single game machine, so that the resource cost is greatly saved.
In summary, taking a mobile phone as an example, the resource adjusting method provided in the embodiment of the present application utilizes a machine learning algorithm, dynamically adjusts resources of the mobile phone in real time by obtaining various data of the mobile phone, and pushes a single user of a single game of a single machine type in cooperation with cloud delivery configuration, so that the purposes of saving energy and power consumption are achieved without affecting performance, and game experience of the user is improved.
According to the scheme, the system state of the intelligent terminal during running application is monitored by training the decision algorithm model; obtaining a decision result corresponding to the system state based on a pre-trained decision algorithm model; and adjusting and controlling the system state parameters of the intelligent terminal according to the decision result so as to adjust system resources. And further, after the application program exits, the regulation control of the system state parameters of the intelligent terminal is released, the scheme can utilize a machine learning method and a training decision algorithm model, real-time data of the intelligent terminals such as mobile phones and the like are used as input, a special state is synthesized through the decision algorithm model, and finally the action which is most suitable for the current intelligent terminal state is obtained according to the calculation of the model. According to the scheme, the system state parameters such as the CPU/GPU/DDR frequency point of the intelligent terminal can be output by utilizing the actions, and the system resources of the intelligent terminal are adjusted according to the output system state parameters. When the application performance of the intelligent terminal is guaranteed, the problem of overhigh power consumption caused by the SoC of the intelligent terminal is reduced as much as possible, the heating condition of the intelligent terminal is reduced, the endurance of the intelligent terminal is prolonged, and better application experience is created for a user.
Referring to fig. 7, fig. 7 is a flowchart illustrating a resource adjustment method according to another exemplary embodiment of the present application. Based on the embodiment shown in fig. 6, the resource adjusting method further includes:
and step S105, updating the decision algorithm model according to the current regulation control result.
Compared with the embodiment shown in fig. 6, the present embodiment further includes a scheme for updating the decision algorithm model.
Specifically, after the current system state parameters are adjusted and controlled through the decision algorithm model, the decision algorithm model can be updated according to the current adjustment and control result, for example, the system state corresponding to the currently adjusted system state parameters can be used as the input of the decision algorithm model, the decision algorithm model is further trained, the update iteration of the model is realized, and the accuracy of the control of the decision algorithm model is improved.
Referring to fig. 8, fig. 8 is a flowchart illustrating a resource adjustment method according to another exemplary embodiment of the present application. Based on the embodiment shown in fig. 6, the resource adjusting method further includes:
and S106, correcting the decision algorithm model according to the current regulation control result and by combining a big data return function.
Compared with the embodiment shown in fig. 6, the present embodiment further includes a scheme for modifying the decision algorithm model.
Specifically, in the embodiment, it is considered that, due to different scenes related to the system state, an error may exist in a control result of the decision algorithm model, and therefore, a certain strategy may be adopted to correct the decision algorithm model.
Specifically, as an implementation manner, the big data function can be combined to obtain actual data of many users, and a return function of the decision algorithm model is designed according to the data, so that the maximum effect can be obtained. In addition, the big data can also be used for monitoring the accuracy of decision control and carrying out appropriate correction on the decision algorithm model.
The reward function may be composed of a plurality of parts, and mainly includes:
1.FPS
the FPS is divided into a plurality of stages, corresponding to the highest FPS of different games at present, and each stage has independent return.
The specific FPS return function formula is as follows:
reward-=(fps–targetfps)*slop+(penaltyFactor*targetFps–fps)*penaltySlop;
the closer the actual value of the FPS is to the target value, the greater the return value. If the gap is greater than a certain range, there is an additional penalty.
Wherein targetfps is a target value, penalty is a penalty value, and slop is a coefficient under different conditions;
factor is the factor to align other rewarded.
FPS Trend
Trends in FPS can be divided into a number of cases: fast increase, slow increase, steady, slow decrease, fast decrease.
The concrete formula is as follows:
reward2-=(different–offset)^2*slop+base*previous;
the difference is a difference value of two times of sampling FPS, the offset is a compensation value, the slope is a coefficient under different conditions, the base is a basic value, the base is changed according to different conditions, and the previous is a historical correction value.
3. Stability of
Stability is the most important one, and if frequency modulation occurs as a result, stability is reduced, and reward needs to be reduced, by the following formula:
reward3 ═ 0.5 adjust, change is 1, otherwise 0, Reward is unchanged.
4. Temperature of
Setting a target temperature in the algorithm, wherein the positive return is when the target temperature is lower than the target temperature, and the negative return is vice versa, and the specific formula is as follows:
Reward4-=(different–offset)*slop+base;
wherein, differential is the difference between the actual temperature and the target temperature, offset is compensation, slop is an increase coefficient, and base is a basic return value.
5. Frame production interval
The formula is similar to temperature.
CPU/GPU frequency
The lower the frequency ratio of the CPU and the GPU, the better, so the formula may be:
Reward6=usage*slop*factor;
wherein, use is the frequency proportion, slope is the growth coefficient, and factor is the factor for aligning with other rewarded;
CPU/GPU load
The load of the CPU/GPU and the frequency ratio of the CPU are relevant, and the specific formula is as follows:
Reward7=reward6*factor+load*slop+penalty*offset;
in short, the load return is calculated according to the frequency return.
The final total reward is composed of linear parts, but the proportion of each part is different, and the linear combination of the rewards is the final reward value.
In the above scheme, the big data is the data such as FPS and temperature of many users, and is used as a reference for setting the values of the reference value and the compensation value of the return function. That is, all the coefficients in the formula can be customized according to the big data actually used by the user, and the method is more accurate and effective.
According to the scheme, the system state of the intelligent terminal during running application is monitored by training the decision algorithm model; obtaining a decision result corresponding to the system state based on a pre-trained decision algorithm model; and adjusting and controlling the system state parameters of the intelligent terminal according to the decision result so as to adjust system resources. And further, after the application program exits, the regulation control of the system state parameters of the intelligent terminal is released, the scheme can utilize a machine learning method and a training decision algorithm model, real-time data of the intelligent terminals such as mobile phones and the like are used as input, a special state is synthesized through the decision algorithm model, and finally the action which is most suitable for the current intelligent terminal state is obtained according to the calculation of the model. According to the scheme, the system state parameters such as the CPU/GPU/DDR frequency point of the intelligent terminal can be output by utilizing the actions, and the system resources of the intelligent terminal are adjusted according to the output system state parameters. When the application performance of the intelligent terminal is guaranteed, the problem of overhigh power consumption caused by the SoC of the intelligent terminal is reduced as much as possible, the heating condition of the intelligent terminal is reduced, the endurance of the intelligent terminal is prolonged, and better application experience is created for a user. In addition, the decision algorithm model can be corrected by combining a big data return function according to the current regulation control result, so that the accuracy of the control of the decision algorithm model is improved.
Referring to fig. 9, fig. 9 is a flowchart illustrating a resource adjusting method according to another exemplary embodiment of the present application. Based on the embodiment shown in fig. 6, the resource adjusting method further includes:
and S107, when the current regulation control result is abnormal, compensating the current regulation control result according to a preset strategy.
Compared with the embodiment shown in fig. 6, the present embodiment further includes a scheme for compensating the control result of the decision algorithm model.
Specifically, the present embodiment considers that, during the actual learning of the algorithm, an erroneous control may occur due to the performance limit of the algorithm itself and the limit of the Q-table size. And the intelligent terminal may reach a state that the algorithm has never been learned, so that the situation of poor control occurs. Therefore, a compensation algorithm can be designed to remedy the frame dropping caused by the condition that the algorithm controls incorrectly.
Taking game application as an example, the algorithm can count the average frame rate and power consumption condition of the game, and if the decision algorithm model is controlled to be abnormal, additional compensation operation can be performed through the compensation algorithm.
In addition, as another compensation implementation, in order to prevent the sudden and large frame dropping from having very bad influence on the game experience of the user, an additional compensation frequency boosting operation can be performed by using a full frequency technology. The method can monitor the surfefinger process of the Android mobile phone for drawing the image in real time, so that the frame condition is obtained. If frame dropping occurs, the method can instantly raise all frequencies to the maximum to ensure that the mobile phone runs at full performance, thereby preventing frame dropping to a certain extent and remedying errors generated by the decision algorithm.
According to the scheme, the system state of the intelligent terminal during running application is monitored by training the decision algorithm model; obtaining a decision result corresponding to the system state based on a pre-trained decision algorithm model; and adjusting and controlling the system state parameters of the intelligent terminal according to the decision result so as to adjust system resources. And further, after the application program exits, the regulation control of the system state parameters of the intelligent terminal is released, the scheme can utilize a machine learning method and a training decision algorithm model, real-time data of the intelligent terminals such as mobile phones and the like are used as input, a special state is synthesized through the decision algorithm model, and finally the action which is most suitable for the current intelligent terminal state is obtained according to the calculation of the model. According to the scheme, the system state parameters such as the CPU/GPU/DDR frequency point of the intelligent terminal can be output by utilizing the actions, and the system resources of the intelligent terminal are adjusted according to the output system state parameters. When the application performance of the intelligent terminal is guaranteed, the problem of overhigh power consumption caused by the SoC of the intelligent terminal is reduced as much as possible, the heating condition of the intelligent terminal is reduced, the endurance of the intelligent terminal is prolonged, and better application experience is created for a user. In addition, when the current regulation control result is abnormal, the current regulation control result can be compensated according to a preset strategy, so that the accuracy of the decision algorithm model control is improved.
In addition, an embodiment of the present application further provides a resource adjusting apparatus, where the resource adjusting apparatus includes:
the monitoring module is used for monitoring the system state of the intelligent terminal during running application;
the decision algorithm module is used for acquiring a decision result corresponding to the system state based on a pre-trained decision algorithm model;
and the adjusting control module is used for adjusting and controlling the system state parameters of the intelligent terminal according to the decision result so as to adjust the system resources.
For the principle and implementation process of implementing resource adjustment in this embodiment, please refer to the above embodiments, which are not described herein again.
In addition, the embodiment of the present application further provides a terminal device, where the terminal device includes a memory, a processor, and a resource adjusting program stored on the memory and capable of running on the processor, and when the resource adjusting program is executed by the processor, the steps of the resource adjusting method according to the above embodiment are implemented.
Since the resource adjustment program is executed by the processor, all technical solutions of all the foregoing embodiments are adopted, so that at least all the beneficial effects brought by all the technical solutions of all the foregoing embodiments are achieved, and details are not repeated herein.
In addition, an embodiment of the present application further provides a computer-readable storage medium, where a resource adjustment program is stored on the computer-readable storage medium, and when executed by a processor, the resource adjustment program implements the steps of the resource adjustment method according to the embodiment.
Since the resource adjustment program is executed by the processor, all technical solutions of all the foregoing embodiments are adopted, so that at least all the beneficial effects brought by all the technical solutions of all the foregoing embodiments are achieved, and details are not repeated herein.
Compared with the prior art, the resource adjusting method, the resource adjusting device, the terminal equipment and the storage medium provided by the embodiment of the application monitor the system state of the intelligent terminal when the intelligent terminal runs and applies; obtaining a decision result corresponding to the system state based on a pre-trained decision algorithm model; and adjusting and controlling the system state parameters of the intelligent terminal according to the decision result so as to adjust system resources. The scheme can utilize a machine learning method to train a decision algorithm model, real-time data of intelligent terminals such as mobile phones and the like are used as input, a special state is synthesized through the decision algorithm model, and finally the action most suitable for the current intelligent terminal state is obtained according to the calculation of the model. According to the scheme, the system state parameters such as the CPU/GPU/DDR frequency point of the intelligent terminal can be output by utilizing the actions, and the system resources of the intelligent terminal are adjusted according to the output system state parameters. When the application performance of the intelligent terminal is guaranteed, the problem of overhigh power consumption caused by the SoC of the intelligent terminal is reduced as much as possible, the heating condition of the intelligent terminal is reduced, the endurance of the intelligent terminal is prolonged, and better application experience is created for a user.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, a controlled terminal, or a network device) to execute the method of each embodiment of the present application.
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings of the present application, or which are directly or indirectly applied to other related technical fields, are included in the scope of the present application.

Claims (18)

1. A resource adjusting method is applied to an intelligent terminal and is characterized by comprising the following steps:
monitoring the system state of the intelligent terminal when the intelligent terminal runs an application;
obtaining a decision result corresponding to the system state based on a pre-trained decision algorithm model;
and adjusting and controlling the system state parameters of the intelligent terminal according to the decision result so as to adjust system resources.
2. The resource adjustment method according to claim 1, wherein the decision algorithm model includes a state decision mapping table, the state decision mapping table includes a mapping relationship between a system state, an adjustment control instruction, and a corresponding decision value, and the step of obtaining the decision result corresponding to the system state based on the pre-trained decision algorithm model includes:
searching the state decision mapping table according to the system state to obtain an adjusting control instruction with the highest decision value;
and outputting a corresponding decision action as a decision result according to the obtained adjusting control instruction with the highest decision value.
3. The resource adjustment method according to claim 2, wherein the monitoring of the system state of the intelligent terminal while running the application comprises:
reading system state parameters when the intelligent terminal runs an application, wherein the system state parameters comprise one or more of the following parameters: state parameters of a system CPU, a GPU and a DDR;
and obtaining the system state of the intelligent terminal when the intelligent terminal runs the application according to the system state parameters.
4. The resource adjustment method according to claim 3, wherein the step of reading the system state parameters when the intelligent terminal runs the application further comprises:
and preprocessing the system state parameters.
5. The resource adjustment method according to claim 3, wherein the step of outputting a corresponding decision action according to the adjustment control command with the highest obtained decision value as a decision result comprises:
outputting a corresponding adjusting control action of the CPU/GPU/DDR frequency point as a decision result according to the adjusting control instruction with the highest decision value;
the step of adjusting and controlling the system state parameters of the intelligent terminal according to the decision result to adjust the system resources comprises:
and adjusting the CPU/GPU/DDR frequency point of the intelligent terminal according to the output adjustment control action of the corresponding CPU/GPU/DDR frequency point so as to adjust the system resource.
6. The resource adjusting method according to claim 5, wherein the step of adjusting the CPU/GPU/DDR frequency point of the intelligent terminal according to the output corresponding adjusting control action of the CPU/GPU/DDR frequency point comprises:
and respectively adjusting the maximum frequency point of the CPU/GPU/DDR of the intelligent terminal through a maximum frequency controller and adjusting the minimum frequency point of the CPU/GPU/DDR of the intelligent terminal through a minimum frequency controller according to the output adjustment control action of the corresponding CPU/GPU/DDR frequency point.
7. The resource adjustment method according to claim 6, wherein the maximum frequency controller and the minimum frequency controller are paired and bound with each other.
8. The resource adjustment method according to any one of claims 1-7, characterized in that the method further comprises:
and releasing the regulation control of the system state parameters of the intelligent terminal in response to the program exit instruction of the application.
9. The resource adjustment method according to any one of claims 2 to 7, wherein the step of obtaining the decision result corresponding to the system state parameter based on the pre-trained decision algorithm model further comprises:
and training the decision algorithm model.
10. The resource adjustment method of claim 9, wherein the step of training the decision algorithm model comprises:
collecting decision algorithm model related data of the intelligent terminal;
obtaining the real-time system running state of the intelligent terminal based on the decision algorithm model related data;
configuring system state parameters to execute actions based on the real-time running state of the system;
outputting a corresponding system parameter adjusting control instruction according to the system state parameter execution action;
adjusting the system real-time state parameters of the intelligent terminal based on the system state parameter adjusting control instruction;
obtaining the system state of the intelligent terminal after adjusting the real-time state parameters of the system;
evaluating the system state of the intelligent terminal after the real-time state parameters of the system are adjusted to obtain a corresponding decision value;
the system state of the intelligent terminal after the real-time state parameters of the system are adjusted, the system state parameter adjusting control instruction and the corresponding decision value are stored in the state decision mapping table in an associated mode;
and repeatedly executing the steps and carrying out iteration, and training the decision algorithm model to obtain the trained decision algorithm model.
11. The resource adjustment method according to claim 10, wherein the step of collecting decision algorithm model-related data of the intelligent terminal is followed by further comprising:
and preprocessing the relevant data of the decision algorithm model.
12. The resource adjustment method according to claim 10, wherein the step of collecting decision algorithm model-related data of the intelligent terminal comprises one or more of the following operations:
periodically reading system real-time state parameters of the intelligent terminal;
collecting the application type and application scene information of the running application on the intelligent terminal;
acquiring the model and/or current user information of the intelligent terminal;
and receiving network related configuration information pushed by the cloud.
13. The resource adjustment method according to claim 10, further comprising:
and updating the decision algorithm model according to the current regulation control result.
14. The resource adjustment method according to claim 10, further comprising:
and correcting the decision algorithm model according to the current regulation control result and by combining a big data return function.
15. The resource adjustment method according to claim 10, further comprising:
and when the current regulation control result is abnormal, compensating the current regulation control result according to a preset strategy.
16. A resource adjustment apparatus, comprising:
the monitoring module is used for monitoring the system state of the intelligent terminal during running application;
the decision algorithm module is used for acquiring a decision result corresponding to the system state based on a pre-trained decision algorithm model;
and the adjusting control module is used for adjusting and controlling the system state parameters of the intelligent terminal according to the decision result so as to adjust the system resources.
17. A terminal device, characterized in that the terminal device comprises a memory, a processor and a resource adjusting program stored on the memory and executable on the processor, the resource adjusting program, when executed by the processor, implementing the steps of the resource adjusting method according to any one of claims 1-15.
18. A computer-readable storage medium, having stored thereon a resource adjustment program which, when executed by a processor, implements the steps of the resource adjustment method of any one of claims 1-15.
CN202011278203.9A 2020-11-16 2020-11-16 Resource adjusting method and device, terminal equipment and storage medium Pending CN112380012A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011278203.9A CN112380012A (en) 2020-11-16 2020-11-16 Resource adjusting method and device, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011278203.9A CN112380012A (en) 2020-11-16 2020-11-16 Resource adjusting method and device, terminal equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112380012A true CN112380012A (en) 2021-02-19

Family

ID=74584724

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011278203.9A Pending CN112380012A (en) 2020-11-16 2020-11-16 Resource adjusting method and device, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112380012A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113918002A (en) * 2021-10-27 2022-01-11 杭州逗酷软件科技有限公司 Frequency modulation method, frequency modulation device, storage medium and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109542614A (en) * 2018-05-30 2019-03-29 Oppo广东移动通信有限公司 Resource allocation method, device, terminal and storage medium
CN110287032A (en) * 2019-07-02 2019-09-27 南京理工大学 A kind of optimised power consumption dispatching method of YoloV3-Tiny in multicore system on chip
CN111198761A (en) * 2019-11-08 2020-05-26 深圳传音控股股份有限公司 Resource scheduling and allocating device, method and computer readable storage medium
CN111414069A (en) * 2020-02-14 2020-07-14 苏州浪潮智能科技有限公司 Power consumption control method and system of GPU server and related components

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109542614A (en) * 2018-05-30 2019-03-29 Oppo广东移动通信有限公司 Resource allocation method, device, terminal and storage medium
CN110287032A (en) * 2019-07-02 2019-09-27 南京理工大学 A kind of optimised power consumption dispatching method of YoloV3-Tiny in multicore system on chip
CN111198761A (en) * 2019-11-08 2020-05-26 深圳传音控股股份有限公司 Resource scheduling and allocating device, method and computer readable storage medium
CN111414069A (en) * 2020-02-14 2020-07-14 苏州浪潮智能科技有限公司 Power consumption control method and system of GPU server and related components

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113918002A (en) * 2021-10-27 2022-01-11 杭州逗酷软件科技有限公司 Frequency modulation method, frequency modulation device, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
CN103870322B (en) Method, non-transitory computer-readable medium, the heterogeneous multi-core system of control task transfer
US11422607B2 (en) Terminal and method for managing the same
CN104391444A (en) Improved single-neuron PID tuning method based on discrete system
US11386866B2 (en) Electronic device and screen refresh method thereof
CN111162888B (en) Distributed antenna system, remote access unit, power distribution method, and medium
CN112380012A (en) Resource adjusting method and device, terminal equipment and storage medium
CN109193802A (en) A kind of Demand-side resource regulating method and system considering new energy prediction error
CN107357392A (en) Mobile terminal temperature rise control method, mobile terminal and readable storage medium storing program for executing
CN103888279A (en) Resource pool dynamic management method and system based on feedback control cycle
CN115545549A (en) Cluster energy storage capacity configuration method and device and storage medium
CN114090108B (en) Method and device for executing computing task, electronic equipment and storage medium
CN114443284A (en) Cluster resource load balancing method and device, electronic equipment and medium
US20210192409A1 (en) Dynamic charging demand side response method and dynamic charging demand side management method based on consumer order, and demand side management control system for performing the methods
CN106900070A (en) A kind of mobile device multiple utility program data transfer energy consumption optimization method
CN101937219B (en) Embed data driven intelligent control system and the method thereof of hormone regulating and controlling mechanism
CN109973302A (en) Power limiting control method and device for wind generating set
CN117130769A (en) Frequency modulation method, training method of frequency adjustment neural network and electronic equipment
CN112752327A (en) Power regulation method and access network equipment
CN113946428A (en) Processor dynamic control method, electronic equipment and storage medium
CN110022243A (en) A kind of system and method for low-power consumption bluetooth chip performance parameter adjust automatically
CN111523653A (en) Arithmetic device and method
Iqbal et al. Convolutional neural network-based deep Q-network (CNN-DQN) resource management in cloud radio access network
CN114880079A (en) Kubernetes cluster scale adjustment method, system and equipment based on reinforcement learning
CN108345941A (en) A kind of parameter regulation means and device
CN104682379B (en) Network load dispatch command response method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination