Intelligent regulation and control method and device for power consumption of terminal operating system
By defining a power consumption optimization objective function Cost, optimizing CPU frequency using normal distributions N1 and N2, and updating using Bayes' theorem, the CPU frequency is dynamically adjusted, solving the balance problem between power consumption and performance in mobile operating systems, realizing intelligent power consumption management, reducing power consumption and improving device performance and stability.
Patent Information
- Application Number
- CN202511038211.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-28
- Publication Date
- 2025-10-17
AI Technical Summary
Existing technologies struggle to effectively reduce the power consumption of mobile operating systems while ensuring device performance, especially in high real-time tasks and unstable network conditions. Existing power management frameworks may impact task execution efficiency and user experience.
By defining the power consumption optimization objective function Cost, the CPU frequency is dynamically adjusted using normal distributions N1 and N2. The distribution is updated using Bayes' theorem, and the optimal CPU frequency is selected to balance performance and energy consumption. The CPU frequency setting is optimized using Bayes' theorem to achieve dynamic adjustment.
It significantly reduces power consumption and extends device battery life while ensuring application performance and response speed, providing intelligent, real-time power management solutions to balance performance and energy consumption and improve system stability.
Smart Images

Figure CN120803239A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the technical field of mobile operating system, and particularly relate to a terminal operating system power consumption intelligent regulation method and device. BACKGROUND
[0002] Energy consumption optimization has always been a key issue in the field of mobile operating system. Especially in the context of the popularization of smart devices today, how to reduce energy consumption while ensuring device performance has become the key to research. Dynamic voltage and frequency scaling (DVFS) technology is widely used, which dynamically adjusts voltage and frequency according to processor load, which can not only ensure the performance of the system, but also effectively reduce energy consumption. However, DVFS technology requires hardware support, and the cooperation between software and hardware is complex, which also limits its application in practice. Another common approach is to arrange the execution time and frequency of background tasks reasonably to reduce unnecessary energy consumption. Although this can effectively reduce energy consumption, it requires developers to make fine management of task priority and execution time. If the management is not in place, it may affect the user experience, especially in the timeliness and frequency of task execution, which requires very accurate judgment.
[0003] In order to consider both performance and energy consumption, cloud computing is proposed as a solution. By transferring some computing tasks to the cloud, the computing burden of the terminal device is reduced, thereby reducing energy consumption. However, this solution requires a stable network connection, otherwise it may affect the response speed of the application and thus affect the user experience. In addition, some existing system-level power consumption management frameworks (such as Doze mode and Battery Optimizations API) can also automatically optimize the energy consumption of applications. Although these frameworks can reduce energy consumption to some extent, they may cause delays when handling tasks that require high real-time performance, affecting the efficiency of task execution.
[0004] As can be seen, in the process of optimizing energy efficiency, how to balance the use of resources and user demand has always been a research difficulty. SUMMARY
[0005] Embodiments of the present application provide a terminal operating system power consumption intelligent regulation method and device. The technical solution is as follows.
[0006] On the one hand, a terminal operating system power consumption intelligent regulation method is provided, the method comprising:
[0007] defining a target function of power consumption optimization and denoted as Cost, wherein the Cost value corresponding to each system available CPU frequency is subject to a first normal distribution N1, and the mean of the first normal distribution N1 is subject to a second normal distribution N2;
[0008] starting an application to be optimized, sampling a random Cost value from a first normal distribution N1;
[0009] setting a system with a CPU frequency corresponding to the random Cost value, and updating the first normal distribution N1 and the second normal distribution N2 of the CPU frequency according to the setting content;
[0010] sampling the second normal distribution N2 to obtain a set of mean samples, wherein the sample is a set of means;
[0011] selecting a sample with the minimum mean from the mean samples, and setting a system with a CPU frequency corresponding to the sample with the minimum mean;
[0012] sampling a Cost value corresponding to the sample with the minimum mean, and updating the second normal distribution N2 of the selected mean;
[0013] repeatedly sampling from the second normal distribution N2, and continuously updating the second normal distribution N2;
[0014] in response to the selected minimum mean remaining unchanged, determining that a CPU frequency corresponding to the minimum mean is an optimal frequency, and setting a system with the optimal CPU frequency.
[0015] Optionally, the target function Cost is:
[0016] Cost = a|FPS-fps| + (1-a)Energy, a is an adjustment coefficient between 0 and 1, FPS represents a target frame rate expected by a user, fps represents an actual frame rate per second of the application to be optimized, and Energy is power consumption, wherein the CPU frequency is used as a rocker, and the sum of FPS and Energy is used as a loss.
[0017] Optionally, the setting of the system with the CPU frequency corresponding to the random Cost value, and the updating of the first normal distribution N1 and the second normal distribution N2 of the CPU frequency according to the setting content, comprises:
[0018] reading a CPU frequency file node available in a device to obtain available CPU frequencies of the device;
[0019] obtaining a frame rate and power consumption of the application to be optimized when running at a random CPU frequency;
[0020] combining the numerical values of the frame rate and the power consumption, and calculating a Cost value of the random CPU frequency according to the target function Cost, wherein the random CPU frequency is one of the available CPU frequencies;
[0021] The first normal distribution N1 and the second normal distribution N2 are updated through the Bayesian theorem and observed actual data, and finally all the first normal distributions N1 and the second normal distributions N2 corresponding to respective available CPU frequencies are updated, wherein the observed actual data refers to the Cost value for updating the first normal distribution N1, and the observed actual data refers to the mean of the Cost value for updating the second normal distribution N2.
[0022] Optionally, the sample with the minimum mean is selected from the mean samples, and a CPU frequency corresponding to the sample with the minimum mean is used for system setting, comprising:
[0023] The sample with the minimum mean is selected from the mean samples.
[0024] The CPU frequency corresponding to the sample with the minimum mean is written into a current CPU frequency file node in the device.
[0025] Optionally, the Cost value corresponding to the sample with the minimum mean is sampled, and a second normal distribution N2 of the selected mean is updated, comprising:
[0026] According to the Bayesian theorem, a posteriori second normal distribution N2 is updated through a priori second normal distribution N2 and observed Cost mean, wherein the observed Cost mean is a mean of the Cost calculated according to the sampled Cost value.
[0027] Optionally, the second normal distribution N2 is repeatedly sampled and continuously updated, comprising:
[0028] The second normal distribution N2 is repeatedly sampled, and a group of mean samples is repeatedly obtained, wherein the sample is a group of means.
[0029] The CPU frequency corresponding to the sample with the minimum mean is repeatedly selected from the obtained mean samples for system setting.
[0030] According to the Bayesian theorem, a posteriori second normal distribution N2 is updated through a priori second normal distribution N2 and observed Cost mean, wherein the observed Cost mean is a mean of the Cost calculated according to the sampled Cost value.
[0031] In another aspect, a terminal operating system power consumption intelligent regulation and control device is provided, and the device comprises:
[0032] A function definition module is configured to define a target function of power consumption optimization and record the target function as Cost, wherein a Cost value corresponding to each available CPU frequency is subject to a first normal distribution N1, and a mean of the first normal distribution N1 is subject to a second normal distribution N2.
[0033] an application starting module, configured to start an application to be optimized, and sample a random Cost value from a first normal distribution N1;
[0034] a system setting module, configured to set a CPU frequency corresponding to the random Cost value, and update the first normal distribution N1 and a second normal distribution N2 of the CPU frequency according to a setting content;
[0035] a distribution sampling module, configured to sample the second normal distribution N2 to obtain a group of mean value samples, wherein the sample is a group of mean values;
[0036] a minimum sampling module, configured to select a sample with a minimum mean value from the mean value samples, and set a CPU frequency corresponding to the sample with the minimum mean value;
[0037] a numerical sampling module, configured to sample a Cost value corresponding to the sample with the minimum mean value, and update the second normal distribution N2 of the selected mean value;
[0038] a repeated processing module, configured to repeatedly sample the second normal distribution N2, and continuously update the second normal distribution N2;
[0039] an optimal determination module, configured to determine that a CPU frequency corresponding to the minimum mean value is an optimal frequency in response to the selected minimum mean value remaining unchanged, and set the optimal CPU frequency.
[0040] In another aspect, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program. The computer program is loaded and executed by a processor to implement the terminal operating system power intelligent regulation method as described above.
[0041] The technical effects brought by the present application at least include the following.
[0042] A terminal operating system power consumption intelligent regulation method includes defining a power consumption optimization objective function Cost, wherein the Cost value corresponding to each CPU frequency available to the system is subject to a first normal distribution N1, and the mean of N1 is subject to a second normal distribution N2; starting the application to be optimized, sampling a random Cost value from N1 and updating N1 and N2; sampling the mean sample from N2, selecting the sample with the smallest mean and performing system setting; updating the normal distribution through Bayes' theorem, repeatedly sampling and optimizing the CPU frequency until the minimum mean is stable, and finally determining the optimal CPU frequency and performing setting. The method maximizes the energy efficiency ratio by dynamically adjusting the CPU frequency, significantly reduces the power consumption on the premise of ensuring the application performance and response speed. The method can balance performance and energy consumption, prolong the device endurance, and in the high-load application scenario, the system power consumption is reduced and the performance is improved. At the same time, the system stability and response speed are guaranteed, providing an intelligent and real-time power consumption management scheme for the terminal operating system. BRIEF DESCRIPTION OF DRAWINGS
[0043] Figure 1 A flowchart of a terminal operating system power consumption intelligent regulation method is shown;
[0044] Figure 2 An architecture diagram of a terminal operating system power consumption intelligent regulation system is shown. DETAILED DESCRIPTION
[0045] To make the purpose, technical scheme and advantages of the present application clearer, the embodiments of the present application will be described in further detail below with reference to the drawings.
[0046] In this paper, "multiple" refers to two or more. "And / or" describes the association between the associated objects, which means that there can be three relationships, for example, A and / or B can represent the three cases of A alone, A and B together, and B alone. The character " / " generally represents that the associated objects before and after are in an "or" relationship.
[0047] Embodiment 1
[0048] As shown in Figure 1 A flowchart of a terminal operating system power consumption intelligent regulation method is provided. The method includes the following contents.
[0049] Step 101, define the objective function of power consumption optimization and record it as Cost.
[0050] Wherein, the Cost value corresponding to each system available CPU frequency is subject to a first normal distribution N1, and the mean of the first normal distribution N1 is subject to a second normal distribution N2.
[0051] The target function Cost of power consumption optimization is defined as Cost = a|FPS-fps|+(1-a)Energy, a is an adjustment coefficient between 0 and 1, FPS represents the target frame rate expected by the user, fps represents the actual frame rate per second of the application to be optimized, and Energy is the power consumption, wherein the CPU frequency is used as a rocker, and the sum of FPS and Energy is used as a loss.
[0052] Wherein, 0 value indicates that the optimization only focuses on power consumption, and 1 indicates that the optimization only focuses on frame rate. The adjustment coefficient can be set as needed. In one example, assuming that the target frame rate FPS is 30, the performance and power consumption balance problem is considered, and the adjustment coefficient a is set to 0.5.
[0053] It is assumed that the Cost value corresponding to each available CPU frequency of the system obeys a normal distribution N1, and the mean value corresponding to N1 obeys another normal distribution N2. It should be noted that the mean value corresponding to N1 is the mean value of the cost value, and this step is used to initialize the probability distribution N1, N2 of the cost value corresponding to the CPU frequency. It is assumed that the prior distribution of N1, N2 obeys a normal distribution with a mean of 0 and a variance of 10. In one possible implementation, the available CPU frequencies of the device are obtained by reading the available CPU frequency file node in the device, such as a set of available system CPU frequencies CpuFreqs = [408000, 600000, 816000, 1008000, 1200000, 1416000, 1608000, 1800000].
[0054] In step 102, the application to be optimized is started, and a random Cost value is sampled from the first normal distribution N1.
[0055] The application to be optimized is opened and run, N1 is sampled, a certain CPU frequency available to the system is randomly selected for setting, the Cost value is sampled, and the normal distribution N1, N2 corresponding to the CPU frequency is updated.
[0056] In step 103, the CPU frequency corresponding to the random Cost value is set in the system, and the first normal distribution N1 and the second normal distribution N2 corresponding to the CPU frequency are updated according to the setting content.
[0057] In one possible implementation, step 103 includes the following sub-steps.
[0058] S31, read the available CPU frequency file node in the device to obtain the available CPU frequency of the device.
[0059] Click to open the main screen of the video player application to be optimized, loop a video, sample the prior distribution N1, randomly select a cost value, set the CPU frequency corresponding to the cost value, and the CPU frequency is within the above available system CPU frequencies CpuFreqs.
[0060] S32, obtain the frame rate and power consumption of the application to be optimized when running at a random CPU frequency.
[0061] Obtain the frame rate and power consumption data of the video player application when playing a video at the CPU frequency, the frame rate is obtained by the frame rate acquisition module, and the power consumption is obtained by the power consumption acquisition module.
[0062] In one example, the frame rate and power consumption of the application when running at a certain CPU frequency are obtained, the frame rate is obtained by the system's frame rate acquisition module, and the power consumption is obtained by the system's power consumption acquisition module.
[0063] S33, combine the values of the frame rate and the power consumption, and calculate the Cost value of the random CPU frequency according to the target function Cost, wherein the random CPU frequency is one of the available CPU frequencies.
[0064] Substitute the obtained frame rate fps and power consumption Energy values into the target function of power consumption optimization Cost = a | FPS-fps | + (1-a) Energy to calculate the Cost value.
[0065] S34, update the first normal distribution N1 and the second normal distribution N2 through the Bayesian theorem and the observed actual data, and finally update the first normal distribution N1 and the second normal distribution N2 corresponding to all available CPU frequencies respectively, wherein for updating the first normal distribution N1, the observed actual data refers to the Cost value, and for updating the second normal distribution N2, the observed actual data refers to the mean of the Cost value.
[0066] It should be noted that this step includes updating the parameters (mean, variance) of the distribution and updating the normal distribution N1, N2 according to the new parameters. The method of updating the normal distribution N1 is introduced below, assuming that the prior distribution N1 is N(μ1, σ1 2 ), μ1, σ1 2 are the mean and variance of N1 respectively, and the likelihood function is N
[0067] σx 2 are the observed cost value, cost mean, and cost variance (the cost value is maintained by a list, and the cost mean and variance are calculated according to the cost values in the list), μ2, σ2 2is the mean and variance of the posterior distribution N1, calculated according to the Bayesian formula Through μ2, σ2 2 The calculation result updates the normal distribution N1, that is, N(μ2,σ2 2 ). Update N2 according to the cost mean sampled from N1, assuming that the prior distribution N2 is N(θ1,γ1 2 ),θ1,γ1 2 are the mean and variance of N2 respectively, and the cost mean As a new sample point of N2, according to the Bayesian update of the posterior distribution of N2,
[0068] In one example, steps S31 to S34 are repeated for 100 samplings. It should be noted that during the first sampling, μ1 in the N1 parameter is 0, σ1 2 is 10, θ1 is 0, γ1 in N2 parameters 2 is 10. When sampling next time, the parameters of the prior distribution N1 are the parameters of the posterior distribution of N1 updated in the previous sampling.
[0069] Step 104 : sampling the second normal distribution N2 to obtain a set of mean samples, wherein the sample is a set of means.
[0070] Sample N2 to obtain a set of mean samples. Select the sample with the smallest mean and use the corresponding CPU frequency to set the frequency. Note that the mean refers to the average cost. To reduce application power consumption, the cost value (i.e., the mean) must be kept as low as possible.
[0071] Step 105 : Select a sample with the smallest mean value from the mean value samples, and use the CPU frequency corresponding to the sample with the smallest mean value for system setting.
[0072] In a possible implementation, step 105 includes the following sub-steps.
[0073] S51, select the sample with the smallest mean from the mean samples.
[0074] S52: Write the CPU frequency corresponding to the sample with the smallest mean into the current CPU frequency file node in the device.
[0075] Step 106: Sample the Cost value corresponding to the sample with the smallest mean, and update the second normal distribution N2 of the selected mean.
[0076] According to Bayes' theorem, the posterior second normal distribution N2 is updated by the prior second normal distribution N2 and the observed cost mean, and the observed cost mean is the mean of the cost calculated according to the sampled cost values.
[0077] It should be noted that sampling the Cost value corresponding to the minimum mean of the sample refers to the Cost value obtained after step 104 sets the CPU frequency, calculating the mean, updating the normal distribution N2 through the prior distribution N2 and the observed Cost mean. The prior distribution N2 is N(θ1, γ1 2 ), θ1, γ1 2 are the mean and variance of N2, respectively, and the posterior distribution of N2 is updated according to Bayes as where θ1, γ1 2 are the mean and variance of N2, respectively, σx 2 are the observed cost mean and cost variance, respectively.
[0078] Step 107 repeatedly samples from the second normal distribution N2, and continuously updates the second normal distribution N2.
[0079] In one possible implementation, step 107 includes the following sub-steps.
[0080] S71 repeatedly samples from the second normal distribution N2 to obtain a set of mean samples, wherein the sample is a set of means.
[0081] S72 repeatedly sets the system with the CPU frequency corresponding to the minimum mean of the obtained mean sample.
[0082] S73 updates the posterior second normal distribution N2 according to Bayes' theorem through the prior second normal distribution N2 and the observed Cost mean, and the observed Cost mean is the mean of the Cost obtained by sampling.
[0083] It should be noted that this process refers to repeating step 106, i.e. each time the minimum mean in the sample is selected to set the system with the CPU frequency, and the normal distribution N2 is updated according to Bayes' theorem through the prior distribution N2 and the observed Cost mean.
[0084] Step 108, in response to the selected minimum mean remaining unchanged, determines that the CPU frequency corresponding to the minimum mean is the optimal frequency, and sets the system with the optimal CPU frequency.
[0085] When the selected minimum mean is always a certain mean, the CPU frequency corresponding to the mean is optimal, and the final setting is performed using the CPU frequency, i.e. after multiple sampling, the mean gradually becomes a fixed value, at this time the sampling result gradually converges, and the CPU frequency selected each time is also fixed and unchanged, at this time the CPU frequency is optimal.
[0086] The embodiment of the application provides a terminal operating system power consumption intelligent regulation and control method, which is applied to a mobile terminal operating system, and finds the optimal performance and energy consumption balance point between exploration (trying a new CPU frequency setting) and utilization (selecting a known optimal CPU frequency setting) through continuous sampling, realizes optimal CPU frequency decision at an application layer to intelligently reduce application power consumption, realizes dynamic selection of the most suitable CPU frequency according to the power consumption characteristics of a running application, solves the performance and energy consumption balance problem in a mobile application running scenario, significantly reduces the power consumption generated by the running application, and simultaneously guarantees the system response speed, performance and stability, greatly prolongs the running time of the entire operating system.
[0087] Embodiment 2
[0088] In addition, the application further provides a terminal operating system power consumption intelligent regulation and control system (as shown in the figure), which is applied to a terminal operating system, and the terminal is used for carrying out the method of embodiment 1, and the system comprises: Figure 2
[0089] A sampling module is used for initializing a prior distribution, sampling a Cost value and a mean value in real time, and updating a posterior distribution.
[0090] A frame rate acquisition module is used for acquiring an application frame rate per second in real time, and the frame rate is obtained by reading a value in a frame rate counter through a specific attribute value.
[0091] A power consumption acquisition module is used for acquiring application power consumption in real time, and the power consumption is calculated according to a formula P=UI, wherein U represents voltage, and I represents current, and the U and I values are obtained by accessing a corresponding file node of a device.
[0092] A loss calculation module is used for calculating a target function of power consumption optimization.
[0093] An available CPU frequency acquisition module is used for acquiring available CPU frequencies of a system, and specifically, a file node of the available CPU frequencies in a device is read.
[0094] A CPU frequency setting module is used for setting the CPU frequencies of the system, and specifically, a CPU frequency value to be set is written into the file node of the available CPU frequencies in the device.
[0095] On the other hand, a terminal operating system power consumption intelligent regulation and control device is provided, and the device comprises:
[0096] A function definition module is used for defining a target function of power consumption optimization and recording as Cost, wherein the Cost values corresponding to each available CPU frequency of the system are subject to a first normal distribution N1, and the mean value of the first normal distribution N1 is subject to a second normal distribution N2.
[0097] The application starting module is configured to start an application to be optimized, and sample a random Cost value from a first normal distribution N1;
[0098] The system setting module is configured to set a CPU frequency corresponding to the random Cost value, and update the first normal distribution N1 and the second normal distribution N2 of the CPU frequency according to the setting content;
[0099] The distribution sampling module is configured to sample the second normal distribution N2 to obtain a group of mean value samples, wherein the sample is a group of mean values.
[0100] The minimum sampling module is configured to select a sample with the minimum mean value from the mean value samples, and set the CPU frequency corresponding to the sample with the minimum mean value.
[0101] The numerical sampling module is configured to sample the Cost value corresponding to the sample with the minimum mean value, and update the second normal distribution N2 of the selected mean value.
[0102] The repeated processing module is configured to repeatedly sample the second normal distribution N2, and continuously update the second normal distribution N2.
[0103] The optimal determination module is configured to determine that the CPU frequency corresponding to the minimum mean value is an optimal frequency in response to the selected minimum mean value remaining unchanged, and set the optimal CPU frequency.
[0104] The embodiments of the present application further provide a computer readable medium, which stores at least one instruction, and the at least one instruction is loaded and executed by a processor to implement the method for intelligently regulating the power consumption of the terminal operating system.
[0105] The above serial numbers of the embodiments of the present application are only for description, and do not represent the advantages or disadvantages of the embodiments.
[0106] Those skilled in the art can understand that all or part of the steps of the above embodiments can be completed by hardware, or by a program instructing related hardware to complete, and the program can be stored in a computer readable storage medium. The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk. The above description is only an optional embodiment of the present application, and does not limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for intelligently controlling power consumption of a terminal operating system, characterized in that: The method comprises: Define an objective function for power consumption optimization and record it as Cost, where the Cost value corresponding to the available CPU frequency of each system obeys a first normal distribution N1, and the mean of the first normal distribution N1 obeys a second normal distribution N2; Start the application to be optimized and sample a random cost value from the first normal distribution N1; Performing system settings on the CPU frequency corresponding to the random cost value, and updating the first normal distribution N1 and the second normal distribution N2 of the corresponding CPU frequency according to the settings; Sampling the second normal distribution N2 to obtain a set of mean samples, wherein the sample is a set of means; Selecting a sample with the smallest mean value from the mean value samples, and using the CPU frequency corresponding to the sample with the smallest mean value for system setting; Sampling the Cost value corresponding to the sample with the smallest mean, and updating the second normal distribution N2 of the selected mean; Repeatedly sampling from the second normal distribution N2 to continuously update the second normal distribution N2; In response to the selected minimum mean value remaining unchanged, the CPU frequency corresponding to the minimum mean value is determined to be the optimal frequency, and the system setting is performed using the optimal CPU frequency.
2. The method according to claim 1, characterized in that The objective function Cost is: Cost = α|FPS-fps|+(1-α)Energy, where α is an adjustment coefficient between 0 and 1, FPS represents the target frame rate expected by the user, fps represents the actual frame rate per second of the application to be optimized, and Energy represents the power consumption. The CPU frequency is used as the rocker arm, and the sum of FPS and Energy is used as the loss.
3. The method according to claim 2, characterized in that The system setting the CPU frequency corresponding to the random cost value and updating the first normal distribution N1 and the second normal distribution N2 of the corresponding CPU frequency according to the setting content includes: Read the available CPU frequency file node in the device to obtain the available CPU frequency of the device; Get the frame rate and power consumption of the application to be optimized when running at a random CPU frequency; Calculating a cost value of the random CPU frequency according to the objective function Cost based on the frame rate and power consumption values, wherein the random CPU frequency is one of the available CPU frequencies; The first normal distribution N1 and the second normal distribution N2 are updated using Bayes' theorem and the actual observed data, and finally the first normal distribution N1 and the second normal distribution N2 corresponding to all available CPU frequencies are updated. For updating the first normal distribution N1, the actual observed data refers to the cost value, and for updating the second normal distribution N2, the actual observed data refers to the mean of the cost values.
4. The method according to claim 1, wherein The selecting a sample with the smallest mean value from the mean value samples, and using the CPU frequency corresponding to the sample with the smallest mean value for system setting, includes: Selecting a sample with the smallest mean from the mean samples; The CPU frequency corresponding to the sample with the smallest mean value is written into the current CPU frequency file node in the device.
5. The method according to claim 1, wherein The step of sampling the cost value corresponding to the sample with the smallest mean and updating the second normal distribution N2 of the selected mean includes: According to Bayes' theorem, the posterior second normal distribution N2 is updated by the prior second normal distribution N2 and the observed Cost mean, where the observed Cost mean is the Cost mean calculated based on the sampled Cost values.
6. The method according to claim 1, characterized in that Repeatedly sampling from the second normal distribution N2 and continuously updating the second normal distribution N2 includes: Repeatedly sampling from the second normal distribution N2 to repeatedly obtain a set of mean samples, wherein the sample is a set of means; Repeatedly select the CPU frequency corresponding to the sample with the smallest mean value from the obtained mean value samples for system setting; According to Bayes' theorem, the posterior second normal distribution N2 is updated by the prior second normal distribution N2 and the observed Cost mean, where the observed Cost mean is the mean of the Cost obtained from the sampled Cost values.
7. A terminal operating system power consumption intelligent control device, characterized in that: The device comprises: A function definition module is used to define an objective function for power consumption optimization and record it as Cost, wherein the Cost value corresponding to the available CPU frequency of each system obeys a first normal distribution N1, and the mean of the first normal distribution N1 obeys a second normal distribution N2; An application startup module is used to start the application to be optimized and sample a random cost value from the first normal distribution N1; A system setting module, configured to perform system settings on the CPU frequency corresponding to the random cost value, and update the first normal distribution N1 and the second normal distribution N2 of the corresponding CPU frequency according to the setting content; a distribution sampling module, configured to sample the second normal distribution N2 to obtain a set of mean samples, wherein the sample is a set of means; A minimum sampling module, configured to select a sample with the smallest mean value from the mean samples, and use the CPU frequency corresponding to the sample with the smallest mean value for system setting; A numerical sampling module, configured to sample the cost value corresponding to the sample with the smallest mean value and update the second normal distribution N2 of the selected mean value; a repeated processing module, configured to repeatedly sample from the second normal distribution N2 and continuously update the second normal distribution N2; The optimal determination module is configured to determine, in response to the selected minimum mean value remaining unchanged, that the CPU frequency corresponding to the minimum mean value is the optimal frequency, and perform system settings using the optimal CPU frequency.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which is loaded and executed by a processor to implement the method for intelligently controlling power consumption of a terminal operating system as described in any one of claims 1 to 6.