Process optimization method, electronic equipment and readable storage medium
Through computing model screening and optimizing inactive processes, the problem of impossible to accurately determine the optimized services in the existing technology is solved, and the precise release of resources and user experience is achieved.
Patent Information
- Application Number
- CN202310775390.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-27
- Publication Date
- 2024-12-27
AI Technical Summary
Existing resource monitoring methods cannot accurately determine the services that need to be optimized, resulting in the inability to accurately release resources and affect the user experience.
By obtaining the terminal's target process resource usage data and user feedback data, input it into the calculation model to calculate the popularity value, filter out inactive processes, and optimize them based on the optimization operation data.
Accurate determination and optimization of inactive processes is achieved, resources are released without affecting the active process, and user experience is improved.
Smart Images

Figure CN119201371A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and in particular to a process optimization method, an electronic device, and a readable storage medium. Background Art
[0002] When using a personal computer or a cloud computer, it is essential to monitor the use of computer resources. For personal computers, by collecting the usage information of various resources, early warnings are issued for software that exceeds the resource usage threshold, and users are guided to close and release the occupied resources; for cloud computers, a dedicated operation and maintenance system is usually used to collect resource usage information from cloud computers, analyze the resource usage information, and then report abnormal usage information for timely processing by operation and maintenance personnel.
[0003] However, the existing resource monitoring method or system is to warn users when resources are close to exhaustion, and users can choose to close the services they are using. However, there is a problem that the services that need to be optimized cannot be accurately determined. Summary of the invention
[0004] The embodiments of the present application provide a process optimization method, an electronic device, and a readable storage medium, which can solve the problem of being unable to accurately determine the services that need to be optimized.
[0005] In order to solve the above technical problems, this application is implemented as follows:
[0006] In a first aspect, a process optimization method is provided, the method comprising: obtaining target resource usage data and target user feedback data of each target process of a terminal within a preset time; inputting the target resource usage data and target user feedback data of each target process into a target calculation model to obtain a target heat value corresponding to each target process; determining a target process list according to the target heat value corresponding to each target process, wherein the target process list includes one or more inactive processes; receiving optimization operation data for at least one of the inactive processes in the target process list; and optimizing at least one of the inactive processes according to the optimization operation data.
[0007] In a second aspect, an electronic device is provided, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the process optimization method described in the first aspect.
[0008] According to a third aspect, a readable storage medium is provided, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the process optimization method according to the first aspect are implemented.
[0009] The technical solution provided by this application may have the following beneficial effects:
[0010] In an embodiment of the present application, target resource usage data and target user feedback data of each target process of the terminal within a preset time are obtained; the target resource usage data and target user feedback data of each target process are input into a target calculation model to obtain a target heat value corresponding to each target process; a target process list is determined according to the target heat value corresponding to each target process, wherein the target process list includes one or more inactive processes; optimization operation data for at least one of the inactive processes in the target process list is received; and at least one of the inactive processes is optimized according to the optimization operation data, thereby achieving accurate determination of the inactive processes that need to be optimized, thereby optimizing the inactive processes.
[0011] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0013] Figure 1 A flowchart of a process optimization method provided by an exemplary embodiment of the present application is shown;
[0014] Figure 2 A flowchart of another process optimization method provided by an exemplary embodiment of the present application is shown;
[0015] Figure 3 A schematic diagram of the structure of a process optimization device provided by an exemplary embodiment of the present application is shown;
[0016] Figure 4 A flowchart of another process optimization method provided by an exemplary embodiment of the present application is shown;
[0017] Figure 5 A schematic structural diagram of an electronic device provided by an exemplary embodiment of the present application is shown. DETAILED DESCRIPTION
[0018] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0019] Figure 1 A flowchart of a process optimization method provided by an exemplary embodiment of the present application is shown. Figure 1 , the method comprises the following steps:
[0020] Step 102, obtaining target resource usage data and target user feedback data of each target process of the terminal within a preset time;
[0021] Among them, the target resource usage data may include the central processing unit (CPU) resource occupancy data, memory resource occupancy data and swap (SWAP) space occupancy data of each target process, and the target user feedback data includes the target user's historical processing behavior on each target process.
[0022] Step 104, inputting the target resource usage data and the target user feedback data of each target process into the target calculation model to obtain the target heat value corresponding to each target process;
[0023] Among them, the target calculation model is used to analyze the target resource usage data and target user feedback data of each target process obtained above, calculate the target heat value corresponding to each target process through a machine learning algorithm, and judge the operation and usage of each target process through the target heat value.
[0024] Step 106, determining a target process list according to the target heat value corresponding to each of the target processes, wherein the target process list includes one or more inactive processes;
[0025] Among them, by screening the target heat values corresponding to each target process, the inactive processes in the current target process are determined. The inactive processes may include target processes with low CPU resource usage for a long time, basically unchanged memory overhead, and increased SWAP space usage. Considering optimizing the inactive processes can not only release resources, but also will not affect the active processes.
[0026] Step 108, receiving optimization operation data for at least one of the inactive processes in the target process list;
[0027] The optimization operation data is obtained by receiving an optimization operation performed by a target user on at least one inactive process in a target process list.
[0028] Step 110: Optimize at least one of the inactive processes according to the optimization operation data.
[0029] In an embodiment of the present application, by acquiring target resource usage data and target user feedback data of each target process of the terminal within a preset time, the target resource usage data and target user feedback data of each target process are input into a target calculation model to obtain a target heat value corresponding to each target process, and the current operation and use of each target process are measured by the target heat value, and then a target process list including at least one inactive process is determined according to the obtained target heat value corresponding to each of the target processes. The processes in the target process list are all inactive processes with low target heat values, and they can be considered for optimization. The target process list can be displayed to the target user, so that the target user can select an inactive process that the target user is not currently using or meets user needs from at least one inactive process in the target process list. After receiving optimization operation data for at least one of the inactive processes in the target process list, at least one of the inactive processes is optimized according to the optimization operation data, so that the inactive process that needs to be optimized is accurately determined, thereby optimizing the inactive process so that the service normally used by the target user is not affected, and resources are released in time to improve the user experience.
[0030] In one implementation, the above step 102 may include the following steps:
[0031] Step 1021, obtaining initial resource usage data and initial user feedback data of each target process of the terminal within a preset time;
[0032] Step 1022: pre-process the initial resource usage data and the initial user feedback data respectively to obtain the target resource usage data and the target user feedback data.
[0033] In an embodiment of the present application, the initial resource usage data and initial user feedback data of each target process of the terminal within a preset time cannot be directly used as the input of the target calculation model for obtaining the target heat value due to their complexity and uncertainty. It is necessary to preprocess the initial resource usage data and the initial user feedback data respectively, for example, cleaning dirty data, normalizing the data, etc. Using the preprocessed target resource usage data and the target user feedback data as the input of the target calculation model can improve the accuracy of the target calculation model, thereby obtaining a more accurate target heat value.
[0034] In one implementation, preprocessing the initial resource usage data in step 1022 to obtain the target resource usage data may include the following steps:
[0035] Step 1023, cleaning the initial resource usage data to obtain first resource usage data;
[0036] Step 1024, normalize the first resource usage data to obtain the target resource usage data, wherein the target resource usage data includes the CPU resource occupancy data, memory resource occupancy data and SWAP space occupancy data of each target process.
[0037] In an embodiment of the present application, the initial resource usage data obtained is cleaned and normalized, so that the target resource usage data obtained after the above preprocessing is more standardized and representative, so that the target heat value obtained through the target calculation model based on the target resource usage data is more accurate, so that inactive processes can be accurately determined.
[0038] In one implementation, the preprocessing of the initial user feedback data in step 1022 to obtain the target user feedback data may include the following steps:
[0039] Step 1025, obtaining a plurality of first processes included in the initial user feedback data and a running state corresponding to each of the first processes, wherein the target process includes a plurality of the first processes;
[0040] Step 1026, determining the weight coefficient of the first process whose running state is closed as a first parameter value, and determining the weight coefficient of the first process whose running state is running as a second parameter value, wherein the first parameter value is greater than the second parameter value;
[0041] Step 1027: Determine the target user feedback data based on each of the first processes and the weight coefficient corresponding to each of the first processes.
[0042] In an embodiment of the present application, the initial user feedback data is preprocessed by assigning a larger weight coefficient to the first process when the running state of the first process is closed, and assigning a smaller weight coefficient to the first process when the running state of the first process is running. In this way, the running state of each process is marked first, and each process is marked with weight coefficients of different sizes, so as to improve the representativeness and accuracy of the target user feedback data, so as to obtain a more accurate target heat value after inputting the above-mentioned target resource usage data and the target user feedback data into the target calculation model, and accurately determine the inactive process.
[0043] In one implementation, the above step 104 may include the following steps:
[0044] Step 1041, performing a logistic regression process on each of the target processes using a first preset formula to obtain an initial heat value corresponding to each of the target processes;
[0045] The first preset formula may include: k =f(θ T x), where μ k is the initial heat value, θ T Learn parameters for the network, such as θ T =[θ1 θ2 … θ n ] T (θ i represents the i-th network learning parameter), x is the target resource usage data and target user feedback data of each target process, for example, x = [x1 x2 … x n ](x i is the i-th input data, such as CPU resource usage data, memory resource usage data, SWAP space usage data, and user feedback data).
[0046] Step 1042: Map the initial heat value corresponding to each target process to a preset interval using a second preset formula to obtain a target heat value corresponding to each target process within the preset interval.
[0047] The second preset formula may include: Among them, Z is the input data, that is, μ k As input, μ is converted into k Mapped to the interval [0,1].
[0048] In one implementation, the above step 106 may include the following steps:
[0049] Step 1061, determining the target process whose target heat value is less than a preset threshold as the inactive process;
[0050] Among them, the situation where the target heat value is less than the preset threshold may include low CPU resource usage for a long time, basically unchanged memory overhead, and increased SWAP space usage. The target heat value can accurately express the above situation in a numerical form, thereby determining inactive processes.
[0051] Step 1062, summarizing the inactive processes to obtain the target process list.
[0052] In an embodiment of the present application, after obtaining the target heat value through the target calculation model, the operation and use of each target process is judged according to the target heat value corresponding to each target process. When the target heat value corresponding to the target process is less than the preset threshold, the target process is determined to be an inactive process. The target heat value obtained through the target calculation model comprehensively considers the use of the target resources and the feedback of the target user, so that the target heat value can accurately express the activity level of the target process and provide an accurate basis for judgment for the user. Among multiple target processes, an inactive process is determined according to the size relationship between the target heat value and the preset threshold, and then at least one inactive process determined is summarized to form a target process list, so as to display the inactive process to the user.
[0053] Figure 2 A flowchart of another process optimization method provided by an exemplary embodiment of the present application is shown in one implementation manner, see Figure 2 , the method comprises the following steps:
[0054] Step 202, obtaining target resource usage data and target user feedback data of each target process of the terminal within a preset time;
[0055] Step 204, inputting the target resource usage data and the target user feedback data of each target process into the target calculation model to obtain the target heat value corresponding to each target process;
[0056] Step 206, determining a target process list according to the target heat value corresponding to each of the target processes, wherein the target process list includes one or more inactive processes;
[0057] Step 208, receiving optimization operation data for at least one of the inactive processes in the target process list;
[0058] Among them, step 202 to step 208 are the same as the above-mentioned step 102 to step 108, and the details can be referred to the above-mentioned step 102 to step 108.
[0059] Step 210, adding the optimization operation data to the target user feedback data to obtain target training data;
[0060] Step 212: Optimize the target computing model according to the target training data.
[0061] Among them, the target user feedback data includes the historical processing operation data of the target user on the target process. After the user currently performs optimization operations on the inactive process, it is also necessary to add the current optimization operation data to the target user feedback data to update the target user feedback data, so as to optimize the target calculation model according to the updated target user feedback data.
[0062] Step 214: Optimize at least one of the inactive processes according to the optimization operation data.
[0063] Step 216, determining the processing result corresponding to the inactive process whose optimization operation data is a null value according to the preset configuration;
[0064] Optionally, the preset configuration may include active selection or automatic selection by the target user.
[0065] Step 218: Execute a target operation based on the processing result, wherein the target operation includes shutting down or running.
[0066] In an embodiment of the present application, after the inactive process is determined according to the target heat value obtained from the target calculation model, the target user selects to perform optimization operations on at least one inactive process based on the displayed target process list including the inactive process. After receiving the optimization operation data, the current optimization operation data is added to the target user feedback data to update the target user feedback data, so that the parameters of the target calculation model can be updated in real time, the target calculation model can be optimized, and the accuracy of the target heat value can be further improved, thereby improving the accuracy of determining the inactive process.
[0067] In addition, after optimizing at least one inactive process according to the optimization operation data, according to the preset configuration, for example, the target user actively selects the processing result, or the configuration automatically selects the processing result, the processing result corresponding to the inactive process whose optimization operation data is an empty value is determined, and the target operation of closing or running the inactive process is performed based on the processing result.
[0068] Figure 3 A schematic diagram of the structure of a process optimization device provided by an exemplary embodiment of the present application is shown. Figure 3 The device 300 includes a cloud platform system resource data collection module 31, a cloud platform user feedback data recording module 32, a service heat calculation module 33, a result push module 34 and a user behavior feedback module 35.
[0069] Among them, the cloud platform system resource data collection module 31 is used to collect system resource data; the cloud platform user feedback data recording module 32 is used to record the user's feedback messages when interacting with the user; the service heat calculation module 33 is used to analyze the system resource data collected by the cloud platform system resource data collection module 31 and the user feedback data recorded by the cloud platform user feedback data recording module 32, calculate the heat value of each process through a machine learning algorithm, and filter out inactive processes; the result push module 34 is used to push the inactive processes obtained by the service heat calculation module 33 to the user and display them; the user behavior feedback module 35 is used to obtain the user's feedback data and send it to the cloud platform user feedback data recording module 32.
[0070] Figure 4 FIG. 1 is a flowchart of another process optimization method provided by an exemplary embodiment of the present application, which can be executed by the above-mentioned process optimization device. Figure 4 As shown, the method comprises the following steps:
[0071] Step 401, perform a periodic scan on the processes / services in the cloud computer to obtain system resource data of each process / service; for example, CPU occupancy rate, memory occupancy size, instantaneous input and output (IO) response time. In Windows system, the system resource occupancy data can be obtained through the C language-based Application Programming Interface (API) provided by Windows; in Linux system, the system resource occupancy data of each process can be obtained through top, free, iostat commands and netlink communication mechanism.
[0072] Step 402, record user feedback data; save the data in a structured manner, for example, for services that users choose to close based on feedback, the weight coefficient is set to α, and for services that users choose not to close, the weight coefficient is set to β (α>β), as data input for subsequent analysis of user behavior.
[0073] Step 403: pre-process the collected system resource data.
[0074] Step 404: pre-process the user feedback data.
[0075] Step 405, train the calculation model through the machine learning algorithm, input parameters including: 1) process CPU resource occupancy; 2) memory resource occupancy; 3) SWAP space occupancy; 4) user feedback data, input the calculation model, and the output parameters are: each process / service heat value.
[0076] Step 406, determining whether the heat value is less than a preset threshold.
[0077] Step 407, filter out services with a heat value smaller than a preset threshold, that is, services with a lower heat value, and form a service list; the service list includes services with a heat value smaller than the preset threshold.
[0078] Step 408: Push services whose popularity is less than the threshold to the user, reminding “xx service may not be used, do you want to choose to close it?”.
[0079] Step 409, obtaining optimization operation data of the user choosing to close certain services or not perform operations based on this information.
[0080] Step 410, optimize the services whose heat is less than the threshold value according to the optimization operation data, and feed back the optimization operation data to continue to be used for training the calculation model.
[0081] In an exemplary embodiment, an electronic device is also provided, the electronic device is used to execute the above process optimization method, Figure 5 A schematic diagram of the structure of an electronic device for implementing various embodiments of the present application. The electronic device may have relatively large differences due to different configurations or performances, and may include a processor (processor) 501, a communication interface (Communications Interface) 502, a memory (memory) 503 and a communication bus 504, wherein the processor 501, the communication interface 502, and the memory 503 communicate with each other through the communication bus 504. The processor 501 may call a computer program stored in the memory 503 and executable on the processor 501 to perform the following steps:
[0082] Obtain target resource usage data and target user feedback data of each target process of the terminal within a preset time; input the target resource usage data and target user feedback data of each target process into a target calculation model to obtain a target heat value corresponding to each target process; determine a target process list according to the target heat value corresponding to each target process, wherein the target process list includes one or more inactive processes; receive optimization operation data for at least one of the inactive processes in the target process list; and optimize at least one of the inactive processes according to the optimization operation data.
[0083] The specific execution steps can refer to the various steps of the above-mentioned process optimization method embodiment, and can achieve the same technical effect. To avoid repetition, they will not be repeated here.
[0084] The above electronic device structure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. For example, the input unit may include a graphics processing unit (GPU) and a microphone, and the display unit may be configured with a display panel in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit includes a touch panel and at least one of other input devices. The touch panel is also called a touch screen. Other input devices may include, but are not limited to, a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
[0085] The memory can be used to store software programs and various data. The memory may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory may include a volatile memory or a non-volatile memory, or the memory may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct memory bus random access memory (DRRAM).
[0086] The processor may include one or more processing units; optionally, the processor integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to the operating system, user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor.
[0087] In an exemplary embodiment, a readable storage medium is also provided, in which at least one computer program is stored, and the computer program is loaded and executed by a processor to implement all or part of the steps in the above process optimization method. For example, the readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, etc.
[0088] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the claims.
[0089] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A process optimization method, characterized in that: include: Obtain target resource usage data and target user feedback data of each target process of the terminal within a preset time; Inputting the target resource usage data and target user feedback data of each target process into the target calculation model to obtain the target heat value corresponding to each target process; Determine a target process list according to the target heat value corresponding to each target process, wherein the target process list includes one or more inactive processes; Receiving optimization operation data for at least one of the inactive processes in the target process list; At least one of the inactive processes is optimized according to the optimization operation data.
2. The method according to claim 1, characterized in that The step of obtaining target resource usage data and target user feedback data of each target process of the terminal within a preset time includes: Obtaining initial resource usage data and initial user feedback data of each target process of the terminal within a preset time; The initial resource usage data and the initial user feedback data are preprocessed respectively to obtain the target resource usage data and the target user feedback data.
3. The method according to claim 2, characterized in that The preprocessing of the initial resource usage data to obtain the target resource usage data includes: Cleaning the initial resource usage data to obtain first resource usage data; The first resource usage data is normalized to obtain the target resource usage data, wherein the target resource usage data includes CPU resource occupancy data, memory resource occupancy data and SWAP space occupancy data of each target process.
4. The method according to claim 2, characterized in that: The preprocessing of the initial user feedback data to obtain the target user feedback data includes: Acquire multiple first processes included in the initial user feedback data and a running state corresponding to each of the first processes, wherein the target process includes multiple first processes; Determine the weight coefficient of the first process whose running state is closed as a first parameter value, and determine the weight coefficient of the first process whose running state is running as a second parameter value, wherein the first parameter value is greater than the second parameter value; The target user feedback data is determined based on each of the first processes and a weight coefficient corresponding to each of the first processes.
5. The method according to any one of claims 1 to 4, characterized in that: The target resource usage data and target user feedback data of each target process are input into the target calculation model to obtain the target heat value corresponding to each target process, including: Performing logistic regression processing on each target process using a first preset formula to obtain an initial heat value corresponding to each target process; The initial heat value corresponding to each target process is mapped to a preset interval through a second preset formula to obtain a target heat value corresponding to each target process within the preset interval.
6. The method according to claim 1, characterized in that Determining the target process list according to the target heat value corresponding to each target process includes: Determine the target process whose target heat value is less than a preset threshold as the inactive process; The inactive processes are aggregated to obtain the target process list.
7. The method according to claim 1, characterized in that After receiving the optimization operation data for at least one of the inactive processes in the target process list, the method further includes: Adding the optimization operation data to the target user feedback data to obtain target training data; The target computing model is optimized according to the target training data.
8. The method according to claim 1, characterized in that After optimizing at least one of the inactive processes according to the optimization operation data, the method further includes: Determine, according to a preset configuration, a processing result corresponding to the inactive process whose optimization operation data is a null value; A target operation is performed based on the processing result, wherein the target operation includes shutting down or running.
9. An electronic device, characterized in that: The method comprises a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the process optimization method as described in any one of claims 1 to 8.
10. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the steps of the process optimization method according to any one of claims 1 to 8 are implemented.