System parameter adjusting method and device, electronic equipment and storage medium
By using the system parameter adjustment model in electronic equipment, and accurately adjusting the system parameters in combination with system status, application operation and user operation data, the problem of insufficient adjustment accuracy in the existing technology is solved and the equipment performance is improved.
Patent Information
- Application Number
- CN202411629263.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-03-04
AI Technical Summary
In the prior art, electronic equipment is inaccurate when adjusting system parameters, which affects the performance of equipment.
By obtaining the current system status data of the electronic device, application operation data and user operation data, these data are input to the trained system parameter adjustment model, and the adjustment information output from the system parameter adjustment model is obtained, and the system parameters are adjusted based on this.
It realizes accurate adjustment of electronic equipment system parameters, improves equipment performance, and enables it to adapt to the operating applications and user operations.
Smart Images

Figure CN119557180A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electronic equipment, and more specifically, to a method and device for adjusting system parameters, an electronic device and a storage medium. Background Art
[0002] With the rapid advancement of science and technology and living standards, electronic devices (such as smart phones, tablet computers, etc.) have become one of the commonly used electronic products in people's lives. When the electronic device is running, the system parameters of the electronic device will affect the performance of the electronic device. Therefore, the system parameters that affect the performance are usually adjusted during the operation of the electronic device. However, when adjusting the system parameters in the related art, the adjustment strategy set according to experience is usually used for adjustment, so the accuracy of the electronic device in adjusting the system parameters is insufficient. Summary of the invention
[0003] The present application proposes a system parameter adjustment method, device, electronic device and storage medium, which can accurately adjust the system parameters of the electronic device, thereby improving the performance of the electronic device.
[0004] In a first aspect, an embodiment of the present application provides a method for adjusting system parameters, which is applied to an electronic device, and the method comprises: obtaining current system status data, application running data, and user operation data of the electronic device; inputting the current system status data, application running data, and user operation data into a trained system parameter adjustment model to obtain adjustment information of a first system parameter output by the system parameter adjustment model, wherein the first system parameter comprises at least one system parameter among the dynamically adjustable system parameters of the electronic device; and adjusting the first system parameter based on the adjustment information.
[0005] In a second aspect, an embodiment of the present application provides a system parameter adjustment device, which is applied to an electronic device, and the device includes: a status data acquisition module, an adjustment information acquisition module and a system parameter adjustment module, wherein the status data acquisition module is used to obtain the current system status data, application running data and user operation data of the electronic device; the adjustment information acquisition module is used to input the current system status data, application running data and user operation data into a trained system parameter adjustment model to obtain adjustment information of a first system parameter output by the system parameter adjustment model, wherein the first system parameter includes at least one system parameter among the dynamically adjustable system parameters of the electronic device; and the system parameter adjustment module is used to adjust the first system parameter based on the adjustment information.
[0006] In a third aspect, an embodiment of the present application provides an electronic device, comprising: one or more processors; a memory; and one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, and the one or more applications are configured to execute the system parameter adjustment method provided in the first aspect above.
[0007] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a program code is stored. The program code can be called by a processor to execute the method for adjusting system parameters provided in the first aspect above.
[0008] The solution provided by the present application obtains the current system status data, application running data and user operation data of the electronic device, inputs the current system status data, application running data and user operation data into the trained system parameter adjustment model, obtains the adjustment information of the first system parameter output by the system parameter adjustment model, the first system parameter includes at least one system parameter among the dynamically adjustable system parameters of the electronic device, and adjusts the first system parameter based on the adjustment information. Thus, when the dynamically adjustable system parameters of the electronic device are adjusted, not only the system status data but also the application running data and user operation data are combined, so that the system parameters to be adjusted and their adjustment information can be accurately determined, so that the performance of the electronic device after the system parameters are adjusted can be adapted to the running application and the actual operation of the user, so that the system parameters of the electronic device can be adjusted more accurately, thereby improving the performance of the electronic device. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0010] Figure 1 A schematic flow chart of a method for adjusting system parameters according to an embodiment of the present application is shown.
[0011] Figure 2 A schematic flow chart of a method for adjusting system parameters according to another embodiment of the present application is shown.
[0012] Figure 3 A schematic diagram of a system parameter adjustment model provided in an embodiment of the present application is shown.
[0013] Figure 4A schematic flow chart of a method for adjusting system parameters according to yet another embodiment of the present application is shown.
[0014] Figure 5 A schematic flow chart of a method for adjusting system parameters according to another embodiment of the present application is shown.
[0015] Figure 6 A block diagram of a device for adjusting system parameters according to an embodiment of the present application is shown.
[0016] Figure 7 It is a block diagram of an electronic device according to an embodiment of the present application for executing a method for adjusting system parameters according to an embodiment of the present application.
[0017] Figure 8 It is a storage unit of an embodiment of the present application for storing or carrying program codes for implementing a method for adjusting system parameters according to an embodiment of the present application. DETAILED DESCRIPTION
[0018] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0019] During the operation of electronic devices, some dynamically adjustable system parameters are usually adjusted. Dynamically adjustable system parameters are parameters that can be changed as needed during the operation of the system, such as the swappiness parameter in memory recycling, the threshold for triggering memory recycling, the operating frequency of the processor, the scheduling priority of the processor, the file system cache size, and the network bandwidth limit. Swappiness is a parameter in the Linux kernel that is used to adjust the priority of the system to use swap space when the memory is tight. The value of Swappiness ranges from 0 to 100, where 0 means using Swap as little as possible and 100 means using Swap as much as possible.
[0020] In the related art, when an electronic device actually adjusts dynamically adjustable system parameters, there are many parameters that affect system performance. When determining how to adjust these dynamically adjustable system parameters, the adjustment strategy is usually set based on experience, such as setting which parameters to adjust, the adjustment value of the parameters, etc. For example, when the system parameters are adjusted due to insufficient memory, there are many parameters that affect the memory. You can change the minimum memory recovery waterline that can increase the memory, or you can change the swappiness to recycle more file pages, thereby freeing up more memory space. However, under what circumstances, how to choose and how to adjust are determined by empiricism. Therefore, the flexibility and accuracy of the related art in adjusting the system parameters are insufficient, which in turn affects the performance of the electronic device.
[0021] In response to the above problems, the inventors have proposed a method, device, electronic device, and storage medium for adjusting system parameters provided in the embodiments of the present application, which can realize that when the dynamically adjustable system parameters of the electronic device are adjusted, not only the system status data but also the application running data and the user operation data are combined, so that the system parameters that need to be adjusted and their adjustment information can be accurately determined, so that the performance of the electronic device after adjusting the system parameters can be adapted to the running application and the actual operation of the user, so that the system parameters of the electronic device can be adjusted more accurately, thereby improving the performance of the electronic device. Among them, the specific method for adjusting the system parameters is described in detail in the subsequent embodiments.
[0022] The following is a detailed description of the method for adjusting system parameters provided in the embodiment of the present application in conjunction with the accompanying drawings.
[0023] See also Figure 1 , Figure 1 FIG. 1 is a flow chart of a method for adjusting system parameters provided by an embodiment of the present application. In a specific embodiment, the method for adjusting system parameters is applied to Figure 6 The system parameter adjustment device 500 and the electronic device 100 equipped with the system parameter adjustment device 500 are shown in FIG. Figure 7 ). The following will take an electronic device as an example to illustrate the specific process of this embodiment. Of course, it can be understood that the electronic device used in this embodiment can be a smart phone, a tablet computer, a smart watch, an e-book, a laptop computer, etc., which is not limited here. Figure 1 The process shown is described in detail, and the system parameter adjustment method may specifically include the following steps:
[0024] Step S110: Acquire current system status data, application running data, and user operation data of the electronic device.
[0025] In an embodiment of the present application, when an electronic device adjusts a dynamically adjustable system parameter, it can obtain the current system state data, application running data, and user operation data at the current moment, so as to adjust the system parameters according to the system state data, application running data, and user operation data. Among them, the system parameters can be variables related to the system state, function, and behavior, etc., and the system parameters can affect the operating performance of the electronic device; the dynamically adjustable system parameters can be system parameters that can be adjusted by the electronic device during operation, such as swappiness parameters, memory recycling thresholds, processor operating frequency, processor scheduling priority, file system cache size, network bandwidth restrictions, etc.; the system state data can refer to various data describing the current operating status, performance, configuration, etc. of the system, the application running data can refer to data that can characterize the characteristics, status, etc. of the running application, and the user operation data can refer to data that can reflect the user's operating behavior when the application is running.
[0026] In some embodiments, the system status data may include the usage status of the processor, the usage status of the memory, the current parameter values of various dynamically adjustable system parameters, etc. Among them, the usage status of the processor may include the usage rate, load, frequency, etc. of the central processing unit (CPU), and the usage status of the memory includes the memory occupancy rate, available memory, zram free size, etc. Of course, the system status data may also include the usage status of hard disk and other storage devices, network status, network configuration, battery power, power connection status, and other data. It can be understood that the system status data can reflect the overall resource usage and operating status of the electronic device, and therefore can provide a basis for adjusting system parameters for the electronic device to avoid jamming during operation.
[0027] In some implementations, the application running data includes application information, running status, and resource occupancy parameters of the currently running application. The application information of the application may include basic information of the application, application description, and other information. The basic information may be information such as the application name, version, and storage space occupied. The application description may be a brief description of the function, purpose, and characteristics of the application. Of course, the application information may also include other information, such as the category of the application. It can be understood that the application running data may reflect the running status of the application, the resources required when the application is running, and the like. Therefore, the above application running data may be obtained to adjust the system parameters according to the application running data.
[0028] In a possible implementation, the electronic device can use the application management function in the operating system to obtain detailed information of the above running application from the installed application, and then obtain the above application information. Of course, the electronic device can also obtain the application information of the application in other ways, for example, by obtaining the application information of the application from an application store.
[0029] In the above manner, the running state of the application may include the foreground running state and the background running state, and the resource occupancy state of the application may be the memory resources and computing resources occupied by the application, for example, it may include the memory size occupied by the application and the corresponding CPU occupancy rate. The foreground running state refers to the state in which the electronic device displays the application interface of the application on the screen. When the application is running in the foreground, the user can see the application interface of the application on the screen; the background running state relative to the foreground running state refers to the state in which the electronic device does not display the application interface of the application on the screen, and the user cannot interact with the application interface of the application, but the application will still occupy the system resources of the electronic device when it is running in the background.
[0030] In some embodiments, the user operation data may include screen touch data, and the screen touch data may include the frequency of touch operations, such as the frequency of sliding operations and clicking operations. It can be understood that the screen touch data can reflect the user's usage of the application currently running in the foreground and the user's habits. When the user's usage and user habits are different, the required resources are also different. Therefore, when adjusting the system parameters of the electronic device, the user operation data can be obtained to more accurately adjust the dynamically adjustable system parameters.
[0031] Step S120: Input the current system status data, application running data and user operation data into a trained system parameter adjustment model to obtain adjustment information of a first system parameter output by the system parameter adjustment model, wherein the first system parameter includes at least one system parameter among the dynamically adjustable system parameters of the electronic device.
[0032] In an embodiment of the present application, after the electronic device obtains the current system status data, application running data and user operation data, it can adjust the dynamically adjustable system parameters of the electronic device based on the obtained system status data, application running data and user operation data. Among them, the electronic device can input the above system status data, application running data and user operation data into the trained system parameter adjustment model, so as to obtain the adjustment information corresponding to the first system parameter output by the system parameter adjustment model; the above adjustment information can be the target value to be adjusted to the first system parameter, or it can be the change amount of the first system parameter based on the current value. The adjustment information of the first system parameter output by the system parameter adjustment model matches the current system status data, application running data and user operation data of the electronic device. After the electronic device adjusts the first system parameter according to the adjustment information, it can ensure that the electronic device can run smoothly under the current system status data, application running data and user operation data.
[0033] In some embodiments, a pre-trained system parameter adjustment model may be stored in the electronic device. The system parameter adjustment model may be pre-trained based on system status data, application running data, and user operation data collected at historical moments. The system status data, application running data, and user operation data at each moment are marked with corresponding parameter adjustment labels. The parameter adjustment label may represent each system parameter in the above first system parameter and its corresponding adjustment information system parameter adjustment.
[0034] In a possible implementation, the above system parameter adjustment model can be trained in the following manner: different system status data, application operation data and user operation data can be obtained in advance through testing, and the system parameter adjustment information adapted thereto can be obtained; for each set of system status data, application operation data and user operation data, the parameter adjustment label corresponding to the adapted system parameter adjustment information can be marked, thereby obtaining a sample data set; when the system parameter adjustment model is obtained by training based on the sample data set, the system status data, application operation data and user operation data can be input into the initial model to obtain the result output by the initial model, and the target loss value of the initial model can be determined according to the output result and the parameter adjustment label; after determining the target loss value corresponding to the initial model, the initial model can be iteratively trained according to the target loss value to obtain the final system parameter adjustment model. Among them, the initial model can be a neural network, a Softmax logistic regression model, a support vector machine, etc., and the specific initial model can be not limited; when determining the target loss value, the loss value can be determined according to the difference between the output result and the marked parameter adjustment label.
[0035] When the initial model is iteratively trained according to the target loss value, the model parameters of the initial model can be adjusted according to the calculated target loss value; the system state data, application operation data and user operation data are repeatedly input into the initial model to obtain the output result of the initial model, and the target loss value of the initial model can be determined according to the output result and the parameter adjustment label, and the model parameters of the initial model can be adjusted according to the calculated target loss value until the training end condition is met, and the trained system parameter adjustment model is obtained. The training end condition of iterative training may include: the number of iterative training reaches the target number; or the total loss value of the initial model meets the set condition.
[0036] Of course, the specific training method of the above system parameter adjustment model can be unlimited. For example, unsupervised training can also be implemented through reinforcement learning to obtain the system parameter adjustment model. In the unsupervised training process, the model uses an unlabeled data set, that is, the data has no clear labels or results, and the model needs to learn patterns and rules from these data by itself.
[0037] In some implementations, the first system parameter may be part or all of the dynamically adjustable system parameters. Optionally, the first system parameter may be a predetermined key parameter that has a significant impact on system performance.
[0038] Step S130: Adjust the first system parameter based on the adjustment information.
[0039] In the embodiment of the present application, after the electronic device obtains the adjustment information of the first system parameter, it can adjust the first system parameter based on the adjustment information. The adjustment information indicates the target value to which each system parameter in the first system parameter needs to be adjusted, or the change amount of each system parameter, so based on the adjustment information, the first system parameter can be adjusted.
[0040] In some embodiments, the above adjustment information may indicate the target value to which each system parameter in the first system parameter needs to be adjusted. Exemplarily, the value range of each system parameter in the adjustment information is 0 to 1. After the adjustment information is obtained, the value of 0 to 1 is mapped to the range of the system parameter value to obtain the target value to which the system parameter needs to be adjusted. For example, for the swappiness parameter, the parameter value range of swappiness is 0 to 200. If the adjustment information output by the above system parameter adjustment model can be 0.5, then the target value to which swappiness needs to be adjusted is 100.
[0041] In some embodiments, the above adjustment information may be the amount of change in a system parameter. Exemplarily, the amount of change in a system parameter may range from -1 to 1. The value to be adjusted may be determined based on the product of the range of the system parameter value and the amount of change in the system parameter. If the amount of change is negative, it indicates that the parameter value of the system parameter needs to be reduced. If the amount of change is positive, it indicates that the parameter value of the system parameter needs to be increased. For example, for the swappiness parameter, the parameter value range of swappiness is 0 to 200. If the adjustment information output by the above system parameter adjustment model is -0.1, then swappiness needs to be reduced by 0.1*200=20. If the adjustment information output by the above system parameter adjustment model is 0.3, then swappiness needs to be increased by 0.3*200=60.
[0042] It should be noted that in the above implementation, if the target value to be adjusted to of a certain system parameter in the adjustment information is the same as the current parameter value of the system parameter, or the change in a certain system parameter in the adjustment information is 0, then it means that the system parameter does not need to be adjusted, so the system parameter can be kept unchanged.
[0043] The system parameter adjustment method provided in the embodiment of the present application can realize the adjustment of the dynamically adjustable system parameters of the electronic device by combining not only the system status data but also the application running data and the user operation data, so as to accurately determine the system parameters that need to be adjusted and their adjustment information, so that the performance of the electronic device after the system parameters are adjusted can be adapted to the running application and the actual operation of the user, so that the system parameters of the electronic device can be adjusted more accurately, thereby improving the performance of the electronic device.
[0044] See also Figure 2 , Figure 2 A flow chart of a method for adjusting system parameters provided by another embodiment of the present application is shown. The method for adjusting system parameters is applied to the above electronic device. Figure 2 The process shown is described in detail, and the method for adjusting the system parameters may specifically include the following steps:
[0045] Step S210: Acquire system status data, application operation data, and user operation data of the electronic device during historical operation.
[0046] In the embodiment of the present application, the embodiment of the present application provides a method for training a system parameter adjustment model. It is worth noting that the training of the system parameter adjustment model can be performed in advance, and the trained system parameter adjustment model can be used each time the system parameters need to be adjusted, without the need to train the system parameter adjustment model each time the system parameters are adjusted. When training the system parameter adjustment model, the system status data, application operation data, and user operation data of the electronic device during historical operation can be obtained.
[0047] Step S220: Obtain the historical device operation status after adjusting the system parameters of the electronic device using the historical adjustment information, wherein the historical adjustment information is output by the reinforcement learning model based on the input system status data, application operation data, and user operation data during the historical operation.
[0048] In an embodiment of the present application, during the training phase for the system parameter adjustment model, the system state data, application operation data, and user operation data of the electronic device during operation can be obtained and recorded. The system state data, application operation data, and user operation data recorded each time can be used as a set of state data. After each set of state data is obtained, the set of state data can be input into the reinforcement learning model, and the reinforcement learning model can output adjustment information of the first system parameter based on the input set of state data; after the electronic device can adjust the first system parameter based on the adjustment information, the electronic device can obtain the device operation state (as the historical device operation state). The device operation state may include the running smoothness and power consumption of the application.
[0049] Among them, reinforcement learning (RL), also known as reinforcement learning, evaluation learning or enhanced learning, is one of the paradigms and methodologies of machine learning. It is used to describe and solve the problem of how an agent can maximize rewards or achieve specific goals through learning strategies during its interaction with the environment. The learning strategy is the behavioral rule used by the agent in reinforcement learning, and the learning strategy is usually a neural network.
[0050] Step S230: Based on the historical device operating status, the system status data during the historical operation, the application operation data and the user operation data, the reinforcement learning model is trained to obtain the system parameter adjustment model.
[0051] In an embodiment of the present application, after the electronic device obtains the above-mentioned historical device operating status, the system status data during the historical operation, the application operating data, the user operation data and the corresponding device operating status, it can train the reinforcement learning model based on the historical device operating status, the system status data during the historical operation, the application operating data and the user operation data to obtain a system parameter adjustment model.
[0052] The mathematical framework of the reinforcement learning model is Markov decision process (MDPs). Figure 3 The reinforcement learning model can be a Deep Deterministic Policy Gradient (DDPG) model. The reinforcement learning model can be a model based on the Actor-Critic algorithm. The reinforcement learning model contains an actor network (i.e., a policy network) and a critic network (i.e., a value network). The reinforcement learning model can generate multiple agents, each of which independently explores the environment and obtains reward values from the environment to update the reinforcement learning model. The policy network is responsible for giving the action in the current state, and the value network is responsible for predicting the total benefit (i.e., long-term benefit) that can be obtained from the current state to the end. For the training of the reinforcement learning model, it is usually through multiple interactions between the agent and the environment to obtain the action, state, and reward of each interaction, and then these multiple groups (action, state, reward) are used as training data to train the agent once. The above process is used to train the agent for the next round until the convergence condition is met. Intelligent agent is a very important concept in the field of artificial intelligence. Any independent entity that can think and interact with the environment can be abstracted as an intelligent agent. In reinforcement learning, the intelligent agent is mainly guided by incentive mechanisms to obtain the maximum expected benefit through continuous exploration.
[0053] In some embodiments, when training the above reinforcement learning model, the reward value can be determined based on the historical device operating status; the reinforcement learning model is trained based on the reward value, the historical device operating status, the system status data during historical operation, the application operation data and the user operation data to obtain the system parameter adjustment model.
[0054] Among them, the reinforcement learning model can take the reward value obtained each time, the historical device operation status, the system status data during historical operation, the application operation data and the user operation data as a sample, and then conduct the next exploration to obtain the next sample, and splice the current sample at the end of the historical sample to obtain a sample sequence. After multiple explorations, the reinforcement learning model is trained using the current sample sequence.
[0055] Based on this, the optimized policy network can be used to determine actions with better effects. Actions with better effects usually refer to actions that can generate more reward values, and the reward values are usually related to the task objectives defined by the agent. In an embodiment of the present application, after adjusting the first system parameter based on the adjustment information output by the reinforcement learning model according to the input historical runtime system state data, application operation data, and user operation data, if the device operation state characterizes that the application running in the foreground is running smoothly and the power consumption is lower, more positive rewards are given, and if the device operation state characterizes that the application running in the foreground is stuck, a negative reward is given. Therefore, after the reinforcement learning model is trained, the adjustment information determined by the execution of the reinforcement learning model output can be used to enable the electronic device to adjust the first system parameter based on the adjustment information, so that the application can run smoothly and with low power consumption.
[0056] In a possible implementation, during the training process, if the current training round has reached the total training round of the reinforcement learning model, the training of the reinforcement learning model can be stopped, and the trained reinforcement learning model can be used as the system parameter adjustment model.
[0057] Step S240: Acquire the current system status data, application running data and user operation data of the electronic device.
[0058] Step S250: Input the current system status data, application running data and user operation data into a trained system parameter adjustment model to obtain adjustment information of a first system parameter output by the system parameter adjustment model, wherein the first system parameter includes at least one system parameter among the dynamically adjustable system parameters of the electronic device.
[0059] Step S260: Adjust the first system parameter based on the adjustment information.
[0060] In the embodiment of the present application, steps S240 to S260 may refer to the contents of other embodiments and will not be described in detail here.
[0061] The system parameter adjustment method provided in the embodiment of the present application can realize the adjustment of the dynamically adjustable system parameters of the electronic device by combining not only the system status data but also the application running data and the user operation data, so as to accurately determine the system parameters that need to be adjusted and their adjustment information, so that the performance of the electronic device after adjusting the system parameters can be adapted to the running application and the actual operation of the user, so that the system parameters of the electronic device can be adjusted more accurately, thereby improving the performance of the electronic device; in addition, the embodiment of the present application also provides a training method for the system parameter adjustment model, which is trained by reinforcement learning to obtain the system parameter adjustment model, so that the system parameter adjustment model can output adjustment information related to the system status, user operation behavior and habits, thereby more accurately adjusting the system parameters.
[0062] See also Figure 4 , Figure 4 A flow chart of a method for adjusting system parameters provided by another embodiment of the present application is shown. The method for adjusting system parameters is applied to the above electronic device. Figure 4 The process shown is described in detail, and the method for adjusting the system parameters may specifically include the following steps:
[0063] Step S310: When the electronic device is running, the electronic device is run with recommended parameter values, the recommended parameter values include parameter values of each system parameter in second system parameters, and the second system parameters include at least one system parameter in fixed system parameters of the electronic device.
[0064] In the embodiment of the present application, in addition to the dynamically adjustable system parameters, the electronic device may also include fixed system parameters, that is, system parameters that remain unchanged, such as memory compression (zram) space, flash swap (flashswap) space, default screen resolution, remaining power threshold for automatic shutdown, etc. For these fixed system parameters (as the second system parameters), the electronic device can operate the electronic device with the recommended parameter values during operation, that is, when the electronic device is running, the actual parameter value of each system parameter in the second system parameters is the parameter value of the system parameter in the above recommended parameter values.
[0065] In some implementations, the second system parameter may be part or all of the fixed system parameters. Optionally, the second system parameter may be a predetermined key parameter that has a significant impact on system performance.
[0066] In some implementations, the recommended parameter values are determined by:
[0067] Acquire performance parameters of the electronic device; input the performance parameters into a pre-trained parameter recommendation model to obtain the recommended parameter values output by the parameter recommendation model.
[0068] In the above implementation, the above performance parameters may be parameters that characterize the performance of the electronic device. When determining the above recommended parameter values, the above recommended parameter values may be determined based on the actual performance parameters of the electronic device, so that the recommended parameter values match the actual performance parameters of the electronic device, thereby enabling the electronic device to improve performance when operating the electronic device with the recommended parameter values.
[0069] In a possible implementation, the above performance parameters may include at least one of a processor performance score, a memory performance score, a flash memory performance score, the number of background keep-alive applications, and a system fluency score.
[0070] Optionally, the performance of the processor, the performance of the memory, and the performance of the flash memory can be benchmarked by benchmarking software to determine the performance score of the processor, the performance score of the memory, and the performance score of the flash memory. In addition, the performance score of the processor, the performance score of the memory, and the performance score of the flash memory can be weighted and summed according to the weights corresponding to the processor, the memory, and the flash memory, so that these scores are expressed as one value.
[0071] Optionally, the above system fluency score is used to characterize the system fluency, which can be determined according to the number of times the number of lost frames is greater than N frames, the average duration of application hot start, etc. For example, the above number of times, average duration, etc. can be weighted and summed according to pre-configured weights to obtain a fluency score.
[0072] In some embodiments, when the above parameter recommendation model is trained, a sample data set can be obtained, wherein the sample data set includes sample performance parameters and sample parameter values of sample devices of different models, and the sample parameter values include the parameter value of each system parameter in the second system parameters of the sample device; based on the sample data set, the initial recommendation model is trained to obtain the parameter recommendation model.
[0073] In the above method, in the above sample data set, the sample performance parameter is the performance parameter of the sample device, the sample performance parameter is marked with a sample parameter value, and the sample parameter value can be the parameter value of the first system parameter of the sample device, that is, the parameter value set before the sample device leaves the factory.
[0074] In some embodiments, when a parameter recommendation model is obtained by training based on a sample data set, the sample performance parameters can be input into the initial recommendation model to obtain the output result of the initial recommendation model. According to the output result and the sample parameter value marked by the above sample performance parameters, the target loss value of the initial recommendation model can be determined; after determining the target loss value corresponding to the initial recommendation model, the initial recommendation model can be iteratively trained according to the target loss value to obtain the final parameter recommendation model. When determining the target loss value, the loss value can be determined according to the difference between the output result and the marked sample parameter value.
[0075] When the initial model is iteratively trained according to the target loss value, the model parameters of the initial recommendation model can be adjusted according to the calculated target loss value; the sample performance parameters are repeatedly input into the initial recommendation model to obtain the output result of the initial recommendation model, and the target loss value of the initial recommendation model is determined according to the output result and the sample parameter value marked by the sample performance parameter, and the model parameters of the initial recommendation model are adjusted according to the calculated target loss value until the training end condition is met to obtain the trained parameter recommendation model. Among them, the initial recommendation model can be a neural network, a Softmax logistic regression model, a support vector machine, etc., and the specific initial model can be not limited; the training end condition of the iterative training can include: the number of iterative training reaches the target number; or the total loss value of the initial recommendation model meets the set condition.
[0076] In some embodiments, considering that among the sample performance parameters and sample parameter values of the above sample devices collected, it is possible that the sample parameter values of some sample devices during use do not match the sample performance parameters, that is, the sample parameter values are inaccurate. Therefore, the defect (bug) record of the sample device can also be obtained, and the sample parameter values of the sample device can be calibrated based on the defect record of the sample device. In this way, the accuracy of the above sample data set can be improved, and then the accuracy of the trained parameter recommendation model can be improved, so that the parameter recommendation model can output the recommended parameter value more accurately. For example, for the target sample device, it generates a bug ticket, which shows that because the number of background applications to keep alive is increased, zram is set larger, resulting in jams. Therefore, for the above sample parameter values of the target sample device, the zram in the sample parameter values of the target sample device can be reduced.
[0077] It should be noted that the parameter recommendation model can be trained in advance, and it is not necessary to train the parameter recommendation model every time the recommended parameter value is determined. In addition, the above recommended parameter values for the electronic device can be determined before the electronic device leaves the factory, for example, during the stage of developing the electronic device, so that the parameter value of the second system parameter of the electronic device can be set according to the above recommended parameter value after leaving the factory.
[0078] Step S320: Acquire the current system status data, application running data and user operation data of the electronic device.
[0079] Step S330: Input the current system status data, application running data and user operation data into the trained system parameter adjustment model to obtain adjustment information of the first system parameter output by the system parameter adjustment model, wherein the first system parameter includes at least one system parameter among the dynamically adjustable system parameters of the electronic device.
[0080] Step S340: Adjust the first system parameter based on the adjustment information.
[0081] In the embodiment of the present application, steps S320 to S340 may refer to the contents of other embodiments and will not be described in detail here.
[0082] The system parameter adjustment method provided in the embodiment of the present application can realize the adjustment of the dynamically adjustable system parameters of the electronic device by combining not only the system status data but also the application running data and the user operation data, so as to accurately determine the system parameters that need to be adjusted and their adjustment information, so that the performance of the electronic device after the system parameters are adjusted can be adapted to the running application and the actual operation of the user, so that the system parameters of the electronic device can be adjusted more accurately, thereby improving the performance of the electronic device; in addition, the fixed system parameters of the electronic device are determined by the performance parameters of the electronic device, so that the recommended parameter values can be matched with the actual performance parameters of the electronic device, thereby enabling the electronic device to improve its performance when the electronic device is operated with the recommended parameter values.
[0083] See also Figure 5 , Figure 5 A flow chart of a method for adjusting system parameters provided by another embodiment of the present application is shown. The method for adjusting system parameters is applied to the above electronic device. Figure 5 The process shown is described in detail, and the method for adjusting the system parameters may specifically include the following steps:
[0084] Step S410: Acquire current system status data, application running data, and user operation data of the electronic device.
[0085] In some embodiments, the application running data includes application information of the currently running application, and the application information may include the application type. It is understandable that due to the large number of applications, if a single application is used as an input, the amount of training during model training is large, so the application information may be the application type. Among them, the specific classification criteria of the application type may not be limited, for example, it can be divided into video category, game category, daily use category, large task category and other categories.
[0086] In a possible implementation, when determining the above application types, the electronic device may input the application name, running status, and resource occupancy parameters of the running application program into a running trained application classification model to obtain the application type output by the application classification model.
[0087] Optionally, the reinforcement learning model ML_C can be trained to output the application type of the application according to the application name, running status and resource occupancy parameters of the input application. ML_C can be implemented by a multi-layer MLP classification model. When training ML_C, every time a new application is installed, the application name, running status and resource occupancy parameters of the application can be collected for a period of time, and then input into ML_C to classify it, and obtain the classification results. Finally, these data can be used as a new data set to update the model. Exemplarily, the application data such as the application name, running status and resource occupancy parameters of the application can be input into the application classification model for running training. After the input layer and the hidden layer, the output layer can output the probability of each category, and according to the probability of each category, the category with the highest probability is determined as the application type of the application.
[0088] Step S420: Input the current system status data, application running data and user operation data into a trained system parameter adjustment model to obtain adjustment information of a first system parameter output by the system parameter adjustment model, wherein the first system parameter includes at least one system parameter among the dynamically adjustable system parameters of the electronic device.
[0089] Step S430: Adjust the first system parameter based on the adjustment information.
[0090] In the embodiment of the present application, steps S410 to S430 may refer to the contents of other embodiments and will not be described in detail here.
[0091] Step S440: updating the system parameter adjustment model based on the device operation status of the electronic device, the current system status data, application operation data and user operation data.
[0092] In the embodiment of the present application, after the electronic device adjusts the first system parameter based on the above adjustment information, it can determine the device operation state of the electronic device, and then update the system parameter adjustment model according to the device operation state of the electronic device, the current system state data, the application operation data and the user operation data. In other words, the system state data, the application operation data and the user operation data obtained this time, as well as the adjustment information and the device operation state determined this time, can be used as new sample data to update and train the system parameter adjustment model, so as to further improve the accuracy of the system parameter adjustment model in determining the above adjustment information.
[0093] The system parameter adjustment method provided in the embodiment of the present application can realize the adjustment of the dynamically adjustable system parameters of the electronic device by combining not only the system status data but also the application running data and the user operation data, so as to accurately determine the system parameters that need to be adjusted and their adjustment information, so that the performance of the electronic device after the system parameters are adjusted can be adapted to the running application and the actual operation of the user, so that the system parameters of the electronic device can be adjusted more accurately, thereby improving the performance of the electronic device; in addition, after the dynamically adjustable system parameters are adjusted according to the determined adjustment information, the system parameter recommendation model is further updated according to the data obtained this time, so as to further improve the accuracy of the adjustment information determined by the system parameter recommendation model.
[0094] See also Figure 6 , which shows a structural block diagram of a system parameter adjustment device 500 provided in an embodiment of the present application. The system parameter adjustment device 500 applies the above-mentioned electronic device, and the system parameter adjustment device 500 includes: a state data acquisition module 510, an adjustment information acquisition module 520 and a system parameter adjustment module 530. Among them, the state data acquisition module 510 is used to obtain the current system state data, application running data and user operation data of the electronic device; the adjustment information acquisition module 520 is used to input the current system state data, application running data and user operation data into the trained system parameter adjustment model to obtain the adjustment information of the first system parameter output by the system parameter adjustment model, and the first system parameter includes at least one system parameter among the dynamically adjustable system parameters of the electronic device; the system parameter adjustment module 530 is used to adjust the first system parameter based on the adjustment information.
[0095] In some embodiments, the system parameter adjustment device 500 may further include a first model training module. The first model training module may be used to: obtain the system state data, application operation data, and user operation data of the electronic device during historical operation; obtain the historical device operation state after adjusting the system parameters of the electronic device using historical adjustment information, wherein the historical adjustment information is output by the reinforcement learning model according to the input system state data, application operation data, and user operation data during the historical operation; and train the reinforcement learning model based on the historical device operation state, the system state data, application operation data, and user operation data during the historical operation to obtain the system parameter adjustment model.
[0096] In one possible implementation, the first model training module can be specifically used to: determine a reward value based on the historical device operating status; train the reinforcement learning model based on the reward value, the historical device operating status, the system status data during the historical operation, the application operation data, and the user operation data to obtain the system parameter adjustment model.
[0097] In some implementations, the system status data includes processor usage status and memory usage status, the application running data includes application information, running status, and resource occupancy parameters of the currently running application, and the user operation data includes screen touch data.
[0098] In some implementations, the system parameter adjustment device 500 may further include a device operation module. The device operation module may be configured to operate the electronic device with a recommended parameter value when the electronic device is running, wherein the recommended parameter value includes a parameter value of each system parameter in the second system parameter, and the second system parameter includes at least one system parameter in the fixed system parameters of the electronic device.
[0099] In a possible implementation, the system parameter adjustment device 500 may further include a recommended parameter value determination module. The recommended parameter value determination module may be used to obtain the performance parameters of the electronic device; input the performance parameters into a pre-trained parameter recommendation model to obtain the recommended parameter values output by the parameter recommendation model.
[0100] Optionally, the system parameter adjustment device 500 may further include a second model training module. The second model training module may be used to: obtain a sample data set, the sample data set including sample performance parameters and sample parameter values of sample devices of different models, the sample parameter values including the parameter value of each system parameter in the second system parameter of the sample device; based on the sample data set, train the initial recommendation model to obtain the parameter recommendation model.
[0101] Optionally, the second model training module may also be used to calibrate sample parameter values of the sample device based on defect records of the sample device.
[0102] In a possible implementation manner, the system parameter adjustment device 500 may further include a model update module. The model update module may be configured to update the system parameter adjustment model based on the device operation state of the electronic device, the current system state data, application operation data, and user operation data after adjusting each system parameter based on the adjustment information of each system parameter.
[0103] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.
[0104] In several embodiments provided in the present application, the coupling between modules may be electrical, mechanical or other forms of coupling.
[0105] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software functional modules.
[0106] In summary, the solution provided by the present application obtains the current system status data, application running data and user operation data of the electronic device, inputs the current system status data, application running data and user operation data into the trained system parameter adjustment model, obtains the adjustment information of the first system parameter output by the system parameter adjustment model, the first system parameter includes at least one system parameter among the dynamically adjustable system parameters of the electronic device, and adjusts the first system parameter based on the adjustment information. Thus, when the dynamically adjustable system parameters of the electronic device are adjusted, not only the system status data but also the application running data and the user operation data are combined, so that the system parameters that need to be adjusted and their adjustment information can be accurately determined, so that the performance of the electronic device after adjusting the system parameters can be adapted to the running application and the actual operation of the user, so that the system parameters of the electronic device can be adjusted more accurately, thereby improving the performance of the electronic device.
[0107] Please refer to Figure 7, which shows a structural block diagram of an electronic device provided in an embodiment of the present application. The electronic device 100 may be an electronic device capable of running applications, such as a smart phone, a tablet computer, a smart watch, an e-book, etc. The electronic device 100 in the present application may include one or more of the following components: a processor 110, a memory 120, and one or more applications, wherein the one or more applications may be stored in the memory 120 and configured to be executed by one or more processors 110, and the one or more applications are configured to execute the method described in the aforementioned method embodiment.
[0108] The processor 110 may include one or more processing cores. The processor 110 uses various interfaces and lines to connect various parts of the entire electronic device 100, and executes various functions and processes data of the electronic device 100 by running or executing instructions, programs, code sets or instruction sets stored in the memory 120, and calling data stored in the memory 120. Optionally, the processor 110 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 110 can integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 110, but may be implemented separately through a communication chip.
[0109] The memory 120 may include a random access memory (RAM) or a read-only memory (ROM). The memory 120 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 120 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the following various method embodiments, etc. The data storage area may also store data (such as a phone book, audio and video data, chat record data) created by the electronic device 100 during use.
[0110] Please refer to Figure 8 , which shows a structural block diagram of a computer-readable storage medium provided in an embodiment of the present application. The computer-readable medium 800 stores program codes, which can be called by a processor to execute the method described in the above method embodiment.
[0111] The computer readable storage medium 800 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk, or a ROM. Optionally, the computer readable storage medium 800 includes a non-transitory computer-readable storage medium. The computer readable storage medium 800 has storage space for program code 810 that performs any method step in the above method. These program codes can be read from or written to one or more computer program products. The program code 810 can be compressed, for example, in an appropriate form.
[0112] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for adjusting system parameters, characterized in that: Applied to electronic equipment, the method comprises: Acquiring current system status data, application running data, and user operation data of the electronic device; Inputting the current system state data, application running data, and user operation data into a trained system parameter adjustment model to obtain adjustment information of a first system parameter output by the system parameter adjustment model, wherein the first system parameter includes at least one system parameter among dynamically adjustable system parameters of the electronic device; Based on the adjustment information, the first system parameter is adjusted.
2. The method according to claim 1, characterized in that The system parameter adjustment model is trained in the following way: Acquire system status data, application operation data, and user operation data of the electronic device during historical operation; Acquire a historical device operation state after adjusting the system parameters of the electronic device using historical adjustment information, wherein the historical adjustment information is output by the reinforcement learning model according to the input system state data, application operation data, and user operation data during the historical operation; Based on the historical device operating status, the system status data during the historical operation, the application operation data and the user operation data, the reinforcement learning model is trained to obtain the system parameter adjustment model.
3. The method according to claim 2, characterized in that The training of the reinforcement learning model based on the historical device operation status, the system state data during the historical operation, the application operation data, and the user operation data to obtain the system parameter adjustment model includes: Determining a reward value based on the historical device operating status; The reinforcement learning model is trained based on the reward value, the historical device operating status, the system status data during the historical operation, the application operating data and the user operation data to obtain the system parameter adjustment model.
4. The method according to claim 1, characterized in that: The system status data includes the usage status of the processor and the usage status of the memory, the application running data includes the application information, running status and resource occupation parameters of the currently running application program, and the user operation data includes screen touch data.
5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: When the electronic device is running, the electronic device is run with recommended parameter values, the recommended parameter values include parameter values of each system parameter in second system parameters, and the second system parameters include at least one system parameter in fixed system parameters of the electronic device.
6. The method according to claim 5, characterized in that The recommended parameter values are determined in the following manner: Acquiring performance parameters of the electronic device; The performance parameters are input into a pre-trained parameter recommendation model to obtain the recommended parameter values output by the parameter recommendation model.
7. The method according to claim 6, characterized in that The parameter recommendation model is trained in the following way: Acquire a sample data set, wherein the sample data set includes sample performance parameters and sample parameter values of sample devices of different models, wherein the sample parameter values include parameter values of each system parameter in the second system parameters of the sample devices; Based on the sample data set, the initial recommendation model is trained to obtain the parameter recommendation model.
8. The method according to claim 7, characterized in that Before training the initial recommendation model based on the sample data set to obtain the parameter recommendation model, the method further includes: Based on the defect record of the sample device, the sample parameter value of the sample device is calibrated.
9. The method according to any one of claims 1 to 4, characterized in that: After adjusting each of the system parameters based on the adjustment information of each of the system parameters, the method further includes: The system parameter adjustment model is updated based on the device operation status of the electronic device, the current system status data, application operation data and user operation data.
10. A system parameter adjustment device, characterized in that: Applied to electronic equipment, the device comprises: a state data acquisition module, an adjustment information acquisition module and a system parameter adjustment module, wherein: The status data acquisition module is used to acquire the current system status data, application running data and user operation data of the electronic device; The adjustment information acquisition module is used to input the current system state data, application running data and user operation data into the trained system parameter adjustment model to obtain adjustment information of the first system parameter output by the system parameter adjustment model, wherein the first system parameter includes at least one system parameter among the dynamically adjustable system parameters of the electronic device; The system parameter adjustment module is used to adjust the first system parameter based on the adjustment information.
11. An electronic device, characterized in that: include: one or more processors; Memory; One or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the method according to any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program codes, which can be called by a processor to execute the method according to any one of claims 1 to 9.