Process management method and device of intelligent terminal, computer device and storage medium

By obtaining process parameters in smart terminals to determine importance levels and expected benefits, and using the Q-learning algorithm to manage container resources, the problem of resource consumption during denial-of-service attacks is solved, thereby improving the reliability and security of containers.

CN114996009BActive Publication Date: 2026-03-03INFORMATION & COMMUNICATION BRANCH STATE GRID JIBEI ELECTRIC POWER CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210627405.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-01
Publication Date
2026-03-03
Estimated Expiration
2042-06-01

AI Technical Summary

Technical Problem

Existing Docker container resource management methods in smart terminals cannot effectively identify and respond to the problem of surging resource demand during denial-of-service attacks, resulting in resources being occupied by malicious containers.

Method used

By obtaining the parameters of each process in the container, the importance level and expected benefits of the process are determined. The state table is updated using the Q-learning algorithm, and the target process with the highest expected benefit is selected for operation and management. Malicious processes are accurately identified and resource allocation is adjusted.

Benefits of technology

It improves the reliability and security of containers, enabling accurate identification and management of malicious processes during denial-of-service attacks, and avoiding excessive resource consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114996009B_ABST
    Figure CN114996009B_ABST
Patent Text Reader

Abstract

Embodiments of the present application relate to a process management method and device of an intelligent terminal, computer equipment and a storage medium. The method comprises: obtaining process parameters associated with or included in each process in a container; determining the importance level corresponding to the process based on the process parameters; determining the expected return of the process operation based on the process parameters and the importance level; selecting the target process operation with the maximum expected return to manage the process, thereby accurately identifying malicious processes, and improving the reliability and security of the container based on the identification results and the expected operation return.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of container technology, and in particular to a process management method, apparatus, computer device and storage medium for a smart terminal. Background Technology

[0002] Docker is an open-source container engine that makes it easy for developers to package applications into images. By uploading these images to an image repository, users can download the image and create a container in their terminal to run the application. The container contains the runtime environment required by the application, greatly simplifying application deployment. Furthermore, the tiered storage used by containers makes maintenance and expansion much easier.

[0003] Docker runs directly on the Linux operating system of smart terminal systems, using cgroups and namespaces to achieve isolation. cgroups constrains containers, while namespaces modify the process view. When creating a process, Docker specifies the necessary namespace mechanisms, including PID, UTS, network, user, mount, IPC, and cgroups. Within a container, the process with PID 1 acts as the container's startup process and can manage the closing and opening of its child processes.

[0004] Existing resource management methods for Docker containers in smart terminals preset the resource utilization rate of containers over a certain period. If a container's determined resource utilization rate exceeds the preset rate, the system checks for spare resources and other containers with determined resource utilization rates reaching the preset rate. If found, the spare resources or resources from other containers are allocated to the container with excessive resource consumption. However, while this resource allocation method effectively evens out resource usage and addresses the issue of excessive container resource requirements, it becomes problematic when a container encounters a denial-of-service (DDoS) attack. The resource demands of these containers can become extremely high, and this method cannot prevent excessive DDoS attacks from consuming terminal resources and also fails to effectively identify DDoS attack scenarios. Summary of the Invention

[0005] In view of this, in order to solve the above-mentioned technical problems or some of the technical problems, the present invention provides a process management method, device, computer equipment and storage medium for a smart terminal.

[0006] In a first aspect, embodiments of the present invention provide a process management method for a smart terminal, comprising:

[0007] Retrieve process parameters associated with or included in each process within the container;

[0008] The importance level of a process is determined based on the process parameters.

[0009] The expected benefits for process operations are determined based on the process parameters and importance levels.

[0010] Select the target process operation that yields the highest expected return to manage the process.

[0011] In one possible implementation, the method further includes:

[0012] The process parameters are preprocessed, and the processes are classified based on the preprocessed process parameters to obtain multiple first process categories;

[0013] Based on the multiple first process categories, a cluster center corresponding to each first process category is determined, resulting in multiple first cluster centers;

[0014] Calculate the GAP value corresponding to each of the first cluster centers, and take the maximum GAP value as the target number of clusters in the process.

[0015] Based on the number of clusters of the target process, the process is reclassified to obtain multiple second process categories after reclassification.

[0016] In one possible implementation, the method further includes:

[0017] Determine the second cluster center for each of the multiple second process categories;

[0018] Based on the process parameters associated with or included by the second cluster center, the importance level corresponding to the process in the plurality of second process categories is determined.

[0019] In one possible implementation, the method further includes:

[0020] Initialize the current state of all processes in the container into a state matrix;

[0021] The corresponding state table is generated based on the state matrix;

[0022] The Q-learning algorithm is used to continuously update the value corresponding to each process state in the state table until the state table converges, thereby obtaining the expected revenue of each process operation corresponding to all processes.

[0023] In one possible implementation, the method further includes:

[0024] Based on the target process operation that maximizes the expected benefit, the current state of the process is changed.

[0025] In one possible implementation, the method further includes:

[0026] Based on the target process operation, a process state change instruction is sent to the container, so that the container changes the current state of the process based on the process state change instruction.

[0027] In one possible implementation, the method further includes:

[0028] Based on a preset time interval, the process parameters associated with or included in each process in the container are periodically obtained.

[0029] Secondly, embodiments of the present invention provide a process management device for a smart terminal, comprising:

[0030] The acquisition module is used to acquire process parameters associated with or included in each process within the container;

[0031] The determination module is used to determine the importance level of a process based on the process parameters;

[0032] The determining module is further configured to determine the expected benefit for process operations based on the process parameters and importance level;

[0033] The management module is used to select the target process operation that yields the greatest expected benefit and manage the process.

[0034] In one possible implementation, the acquisition module is further configured to periodically acquire process parameters associated with or included in each process in the container based on a preset time.

[0035] In one possible implementation, the acquisition module is further configured to preprocess the process parameters, classify the processes based on the preprocessed process parameters to obtain multiple first process categories; determine the cluster center corresponding to each first process category based on the multiple first process categories to obtain multiple first cluster centers; calculate the GAP value corresponding to each of the multiple first cluster centers, and take the maximum GAP value as the target process cluster number; and reclassify the processes based on the target process cluster number to obtain multiple reclassified second process categories.

[0036] In one possible implementation, the determining module is further configured to determine a second cluster center corresponding to each of the plurality of second process categories; and to determine the importance level of the processes in the plurality of second process categories based on the process parameters associated with or included by the second cluster center.

[0037] In one possible implementation, the determining module is further configured to initialize the current state of all processes in the container into a state matrix; generate a corresponding state table based on the state matrix; and continuously update the value corresponding to each process state in the state table using the Q-learning algorithm until the state table converges, thereby obtaining the expected benefits of the process operations corresponding to all processes.

[0038] In one possible implementation, the management module is further configured to modify the current state of the process based on the target process operation that maximizes the expected benefit.

[0039] In one possible implementation, the management module is further configured to send a process state change instruction to the container based on the target process operation, so that the container changes the current state of the process based on the process state change instruction.

[0040] Thirdly, embodiments of the present invention provide a computer device, including: a processor and a memory, wherein the processor is configured to execute a process management program stored in the memory to implement the process management method described in the first aspect above.

[0041] Fourthly, embodiments of the present invention provide a storage medium, comprising: the storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the process management method described in the first aspect above.

[0042] The process management scheme for smart terminals provided in this invention obtains process parameters associated with or included in each process in a container; determines the importance level of the process based on the process parameters; determines the expected benefit of process operations based on the process parameters and importance level; and selects the target process operation with the highest expected benefit to manage the process. Compared with existing process management methods in containers, which suffer from the problem of excessive resource consumption in the container once a denial-of-service attack occurs, this scheme can accurately identify malicious processes and manage processes based on the identification results and expected operation benefits, thereby improving the reliability and security of the container. Attached Figure Description

[0043] Figure 1 A flowchart illustrating a process management method for a smart terminal provided in an embodiment of the present invention;

[0044] Figure 2 A flowchart illustrating another process management method for a smart terminal provided in an embodiment of the present invention;

[0045] Figure 3A schematic diagram of the structure of a process management device for a smart terminal provided in an embodiment of the present invention;

[0046] Figure 4 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present invention. Detailed Implementation

[0047] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0048] To facilitate understanding of the embodiments of the present invention, further explanations and descriptions will be provided below with reference to the accompanying drawings and specific embodiments. These embodiments do not constitute a limitation on the embodiments of the present invention.

[0049] Figure 1 A flowchart illustrating a process management method for a smart terminal provided in an embodiment of the present invention is shown below. Figure 1 As shown, the method specifically includes:

[0050] S11. Obtain the process parameters associated with or included in each process in the container.

[0051] In this embodiment of the invention, process parameters associated with or included in each process in the container of the smart terminal are obtained. These process parameters include, but are not limited to: CPU utilization, memory utilization, number of daily openings, daily usage time ratio, process domain duration, nice value, DNS request frequency, domain resolution error rate, IP address, and domain address of each container process.

[0052] S12. Determine the importance level of the process based on the process parameters.

[0053] Based on the process parameters obtained above, the importance level of each process is evaluated. First, a process importance level evaluation model can be established. After preprocessing and normalizing the relevant process parameters, each process sample is clustered to obtain process samples divided into multiple categories.

[0054] Furthermore, the GAP value for different initial cluster numbers can be calculated using Monte Carlo simulation, and the cluster with the largest GAP value can be selected as the final cluster result.

[0055] Finally, by assigning clusters with larger cluster center coordinates to higher priority process levels based on the location of the cluster centers, the final process importance assessment result is obtained, and thus the final process importance level is obtained.

[0056] S13. Determine the expected benefits for process operations based on the process parameters and importance level.

[0057] Based on the importance level of each process and the real-time memory and CPU usage, a relevant reward function is established to measure the reward of operating on the process. The reward function for operating on the container is continuously iterated. After each operation, the expected reward of the operation is updated according to the expected reward and the actual reward until the process state table converges, thus determining the expected reward of operating on the process.

[0058] S14. Select the target process operation with the highest expected return and manage the process.

[0059] Based on the current container state, the action with the highest expected value in the current state can be selected according to the principle of local optima. The relevant instructions are then sent to the container through a script on the terminal to manage the current container.

[0060] The process management method for smart terminals provided in this invention obtains process parameters associated with or included in each process in a container; determines the importance level of the process based on the process parameters; determines the expected benefit of process operations based on the process parameters and importance level; and selects the target process operation with the highest expected benefit to manage the process. Compared with existing process management methods in containers, which suffer from the problem of excessive resource consumption in the container once a denial-of-service attack occurs, this method can accurately identify malicious processes and manage processes based on the identification results and expected operation benefits, thereby improving the reliability and security of the container.

[0061] Figure 2 A flowchart illustrating another process management method for a smart terminal provided in an embodiment of the present invention is shown below. Figure 2 As shown, the method specifically includes:

[0062] S21. Based on a preset time, periodically obtain the process parameters associated with or included in each process in the container.

[0063] In this embodiment of the invention, a script can be set in the terminal to periodically read the CPU usage, memory usage, daily number of open times, daily usage time ratio, process domain duration, nice value, DNS request frequency, domain resolution error rate, IP address and domain address, and other process parameters associated with or included in each container process, based on a preset time (e.g., 10 seconds).

[0064] Among these, CPU utilization can be obtained using the `top` command to get the CPU usage of the relevant process; accessing the ` / proc / stat` operating system file directory can get the memory usage of the corresponding process; the `free` command can obtain the total system memory usage from the operating system, and the ratio of the memory usage of the corresponding process to the total system memory usage is the memory utilization rate; the `ps -eo pid`, `lstart`, and `etime` commands can obtain the start and stop times of each process, and subtracting the start time from the stop time gives the process usage duration, and can also count the number of times containers are opened within 24 hours each day; the `ps -l` command can obtain the nice value of the corresponding process; domain duration can be obtained by querying the WHOIS database.

[0065] S22. The process parameters are preprocessed, and the processes are classified based on the preprocessed process parameters to obtain multiple first process categories.

[0066] After converting the nice value to a positive value and taking its reciprocal, all process parameters are normalized. The daily usage time ratio of the process is then obtained according to Formula 1, as follows:

[0067]

[0068] Where T is the duration of a process's use in one day, and T0 is the total time within a day.

[0069] The processed nice value is obtained according to Formula 2, as follows:

[0070] N1=(N+20) / 1 Formula 2

[0071] Where N is the nice value obtained from the system, and N1 is the nice value after taking the positive and the reverse.

[0072] The daily usage time ratio, daily usage frequency, and domain duration of the obtained nice value are normalized according to Formula 3.

[0073]

[0074] Among them, X i The data to be processed, namely T1, N1, the daily number of times the process is opened, C, and the domain duration, D, are processed to obtain T2, N2, C1, D1.

[0075] Furthermore, the k-means++ algorithm is used to randomly initialize a cluster number k. The distances between each process sample and other process samples are iterated, and the sample point with the smallest distance to all other samples is selected as the initial cluster center. The roulette wheel method is used to select the next cluster center until the cluster number k is reached. Specifically, the distance between each sample and the nearest existing cluster center is calculated, denoted by A(X). The probability of selecting each sample point as a new cluster center is calculated according to Formula 4.

[0076]

[0077] Here, sample P represents the probability of sample X being selected as the next cluster center. For each process sample, the Euclidean distance to the k cluster centers is calculated, and it is assigned to the cluster center with the smallest margin distance. The cluster center is recalculated for each category, and this process is repeated to reclassify the samples and recalculate the cluster centers until the cluster centers converge. The classification results of the selected K cluster centers are obtained, resulting in multiple first process categories.

[0078] S23. Based on the multiple first process categories, determine the cluster center corresponding to each first process category to obtain multiple first cluster centers.

[0079] S24. Calculate the GAP value corresponding to each of the multiple first cluster centers, and take the maximum GAP value as the target number of clusters.

[0080] Based on multiple first-process categories, the GAP value corresponding to each different cluster center is calculated to determine the k value and obtain the final classification result. The specific process for calculating the GAP value is shown in Formula 5:

[0081] GAP(K) = E(logD) k )-logD k Formula 5

[0082] Where E(logD) k The GAP value refers to the mean of the loss function generated by Monte Carlo simulation of the samples when selecting k cluster centers. The GAP value corresponding to each K value is selected through a process, and the clustering result with the largest GAP value is taken as the target number of clusters.

[0083] S25. Based on the number of clusters of the target process, the process is reclassified to obtain multiple second process categories after reclassification.

[0084] S26. Determine the second cluster center corresponding to each of the multiple second process categories.

[0085] Based on the number of clusters in the target process, the process is reclassified to obtain multiple second process categories. The k-means++ algorithm can be used for classification and to determine the second cluster center corresponding to each second process category, as explained above.

[0086] S27. Based on the process parameters associated with or included by the second cluster center, determine the importance level of the processes in the plurality of second process categories.

[0087] Based on the daily number of times opened and the daily usage time ratio for each cluster center, the nice value is used to classify processes belonging to each different category, and the importance level of processes in multiple second process categories is determined.

[0088] For example, processes that are opened more frequently per day, have a longer daily usage time, and have a higher nice value are considered to have a higher importance level.

[0089] S28. Initialize the current state of all processes in the container into a state matrix.

[0090] The on / off states of the n processes in the container are initialized into a state matrix. Specifically, for each container, the number of samples is n, then the total number of process states corresponding to that container is 2. n Let there be , and let its state S(K) be {X1,X2,…X}. N}, where the corresponding X i This indicates whether the i-th process is in a closed or open state. The corresponding state matrix for constructing the entire container is shown in (6):

[0091]

[0092] Among them, a ij Indicates from state S i to state S j The benefits.

[0093] S29. Generate the corresponding state table based on the state matrix.

[0094] S210. The Q-learning algorithm is used to continuously update the value corresponding to each process state in the state table until the state table converges, so as to obtain the expected revenue of the process operation corresponding to each of the processes.

[0095] A corresponding state table is generated based on the initialization of the state matrix. This state table is referred to as the Q-table. The Q-learning algorithm is used to continuously update the value corresponding to each process state in the state table. This value is referred to as the Q-value. The ε-gredyce strategy is used to explore operations and continuously update the Q-value until the state table converges.

[0096] The Q-table is initialized as a 2^n*2^n matrix, with all corresponding values ​​set to zero. The S(k) values ​​between two states in the matrix are then used to define the relationships between them. Values ​​differing by more than 1 are considered illegal actions. After constructing the initial Q-table, the current state is explored using an ε-greedyce strategy, meaning that other non-optimal state transitions are explored with a probability of ε for each step in the current Q-table. The selection probability is shown in Equation 7:

[0097] P(a'=Argmax{Q(s,a),a∈A})=1-ε Formula 7

[0098] After selecting operation 'a', the corresponding position in the Q-table is updated using Equation 8, where α is the learning efficiency, γ is the discount efficiency, and maxQ'(s',a) is the optimal action in the memory pool. Equation 8 is as follows:

[0099] Q(s1,a1)=Q(s,a)+α[R(s,a)+γmaxQ'(s',a)-Q(s,a)] Formula 8

[0100] R(s,a) is calculated using Formula 9, which is as follows:

[0101]

[0102] Where λ and μ are the corresponding weight coefficients, Y is the importance classification result calculated using the K-means algorithm, and U... t2 CPU utilization is the CPU usage after each process-related data acquisition and process operation is completed. t1 It is the initial process CPU utilization for each read, M t2 This refers to the memory usage after each process-related data acquisition and process operation is completed, in M. t1 It is the initial process memory usage for each read, DN t1 This refers to the number of DNS requests made by a process within the current minute when retrieving process data. This represents the average number of DNS requests per minute for process t1 from 00:00 to t1 each day. F is the process's DNS resolution failure rate, and C is the correlation coefficient between IP addresses and domain addresses. Specifically, let A = [A...]. 1, A2,…,A N The location corresponding to the domain address is B = [B1, B2, ..., B]. N If C is the length of the intersection of A and B, then C is the ratio of the length of B to the length of the intersection of A and B.

[0103] After the operation is performed, the modified Q(s1,a1) is stored in the memory pool. The ε-greedyce strategy is used to repeatedly explore the Q table until the Q table converges or the number of iterations is reached, so as to obtain the expected reward of the process operation corresponding to each process.

[0104] S211. Based on the target process operation, send a process state change instruction to the container so that the container changes the current state of the process based on the process state change instruction.

[0105] The process is managed using the principle of local optima, in the current state S. i Query all possible transitions to the next state S j It queries the current Q table to select the target process operation with the highest expected return value. Based on the target process operation with the highest expected return, it sends a process state change instruction to the container so that the container changes the current state of the process based on the process state change instruction.

[0106] The process management method provided in this invention obtains process parameters associated with or included in each process in a container; determines the importance level of the process based on the process parameters; determines the expected benefit of process operations based on the process parameters and importance level; and selects the target process operation with the greatest expected benefit to manage the process. Compared with existing process management methods in containers, which suffer from the problem of excessive resource consumption of the container and terminal resources when encountering denial-of-service attacks, this method can accurately identify malicious processes and manage processes based on the identification results and expected operation benefits, thereby improving the reliability and security of the container.

[0107] Figure 3 This is a schematic diagram of the structure of a process management device for a smart terminal provided in an embodiment of the present invention, as shown below. Figure 3 As shown, it specifically includes:

[0108] The acquisition module 301 is used to acquire process parameters associated with or included in each process in the container;

[0109] The determination module 302 is used to determine the importance level of a process based on the process parameters.

[0110] The determining module 302 is further configured to determine the expected benefit for process operation based on the process parameters and importance level;

[0111] The management module 303 is used to select the target process operation with the greatest expected benefit to manage the process.

[0112] In one possible implementation, the acquisition module 301 is specifically used to periodically acquire process parameters associated with or included in each process in the container based on a preset time.

[0113] In one possible implementation, the acquisition module 301 is further configured to preprocess the process parameters, classify the processes based on the preprocessed process parameters to obtain multiple first process categories; determine the cluster center corresponding to each first process category based on the multiple first process categories to obtain multiple first cluster centers; calculate the GAP value corresponding to each of the multiple first cluster centers, and take the maximum GAP value as the target process cluster number; and reclassify the processes based on the target process cluster number to obtain multiple reclassified second process categories.

[0114] In one possible implementation, the determining module 302 is specifically used to determine the second cluster center corresponding to each of the multiple second process categories; and to determine the importance level of the processes in the multiple second process categories based on the process parameters associated with or included by the second cluster center.

[0115] In one possible implementation, the determining module 302 is further configured to initialize the current state of all processes in the container into a state matrix; generate a corresponding state table based on the state matrix; and continuously update the value corresponding to each process state in the state table using the Q-learning algorithm until the state table converges, thereby obtaining the expected benefits of the process operations corresponding to all processes respectively.

[0116] In one possible implementation, the management module 303 is specifically used to change the current state of the process based on the target process operation that maximizes the expected benefit.

[0117] In one possible implementation, the management module 303 is further configured to send a process state change instruction to the container based on the target process operation, so that the container changes the current state of the process based on the process state change instruction.

[0118] The process management device for the smart terminal provided in this embodiment can be as follows: Figure 3 The process management device of the smart terminal shown can perform, for example... Figure 1-2 All steps of the process management method of intelligent terminals, thereby achieving Figure 1-2 For details on the technical effects of the process management method of the smart terminal shown, please refer to [link / reference]. Figure 1-2 The relevant descriptions are presented concisely and will not be elaborated upon here.

[0119] Figure 4This is a schematic diagram of the structure of a computer device provided in an embodiment of the present invention. Figure 4 The computer device 400 shown includes at least one processor 401, a memory 402, at least one network interface 404, and other user interfaces 403. The various components in the computer device 400 are coupled together via a bus system 405. It is understood that the bus system 405 is used to implement communication between these components. In addition to a data bus, the bus system 405 also includes a power bus, a control bus, and a status signal bus. However, for clarity, ... Figure 4 The general designated all buses as Bus System 405.

[0120] The user interface 403 may include a display, keyboard, or clicking device (e.g., mouse, trackball, touchpad, or touchscreen).

[0121] It is understood that the memory 402 in the embodiments of the present invention can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The memory 402 described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0122] In some implementations, memory 402 stores elements, executable units or data structures, or subsets thereof, or extended sets thereof: operating system 4021 and application program 4022.

[0123] The operating system 4021 includes various system programs, such as the framework layer, core library layer, and driver layer, used to implement various basic business functions and handle hardware-based tasks. The application program 4022 includes various applications, such as a media player and a browser, used to implement various application functions. The program implementing the method of this embodiment can be included in the application program 4022.

[0124] In this embodiment of the invention, by calling the program or instructions stored in the memory 402, specifically the program or instructions stored in the application program 4022, the processor 401 executes the method steps provided in each method embodiment, including, for example:

[0125] Obtain the process parameters associated with or included in each process in the container; determine the importance level of the process based on the process parameters; determine the expected benefit of the process operation based on the process parameters and the importance level; select the target process operation with the greatest expected benefit to manage the process.

[0126] In one possible implementation, the process parameters are preprocessed, and the processes are classified based on the preprocessed process parameters to obtain multiple first process categories; based on the multiple first process categories, a cluster center corresponding to each first process category is determined to obtain multiple first cluster centers; the GAP value corresponding to each of the multiple first cluster centers is calculated, and the maximum GAP value is used as the target number of process clusters; the processes are reclassified based on the target number of process clusters to obtain multiple reclassified second process categories.

[0127] In one possible implementation, a second cluster center is determined for each of the multiple second process categories; based on the process parameters associated with or included by the second cluster center, the importance level of the processes in the multiple second process categories is determined.

[0128] In one possible implementation, the current state of all processes in the container is initialized into a state matrix; a corresponding state table is generated based on the state matrix; the Q-learning algorithm is used to continuously update the value corresponding to each process state in the state table until the state table converges, thereby obtaining the expected benefits of the process operations corresponding to all processes.

[0129] In one possible implementation, the current state of the process is changed based on the target process operation that maximizes the expected benefit.

[0130] In one possible implementation, based on the target process operation, a process state change instruction is sent to the container, so that the container changes the current state of the process based on the process state change instruction.

[0131] In one possible implementation, process parameters associated with or included in each process in the container are periodically acquired based on a preset time interval.

[0132] The methods disclosed in the above embodiments of the present invention can be applied to processor 401, or implemented by processor 401. Processor 401 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware in processor 401 or by instructions in the form of software. The processor 401 may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of the present invention can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software units in the decoding processor. The software units may be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory 402. Processor 401 reads the information in memory 402 and, in conjunction with its hardware, completes the steps of the above method.

[0133] It is understood that the embodiments described herein can be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described herein, or combinations thereof.

[0134] For software implementation, the techniques described herein can be implemented by units that perform the functions described herein. The software code can be stored in memory and executed by a processor. The memory can be implemented in the processor or external to the processor.

[0135] The computer device provided in this embodiment may be as follows: Figure 4 The computer device shown can perform, for example Figure 1-2 All steps of the process management method of intelligent terminals, thereby achieving Figure 1-2 For details on the technical effects of the process management method of the smart terminal shown, please refer to [link / reference]. Figure 1-2 The relevant descriptions are presented concisely and will not be elaborated upon here.

[0136] This invention also provides a storage medium (computer-readable storage medium). This storage medium stores one or more programs. The storage medium may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as read-only memory, flash memory, hard disk, or solid-state drive; the memory may also include combinations of the above types of memory.

[0137] When one or more programs in the storage medium can be executed by one or more processors, the above-mentioned process management method for intelligent terminals executed on the computer device side can be implemented.

[0138] The processor is used to execute a process management program for a smart terminal stored in memory, to implement the following steps of a process management method for a smart terminal executed on the computer device side:

[0139] Obtain the process parameters associated with or included in each process in the container; determine the importance level of the process based on the process parameters; determine the expected benefit of the process operation based on the process parameters and the importance level; select the target process operation with the greatest expected benefit to manage the process.

[0140] In one possible implementation, the process parameters are preprocessed, and the processes are classified based on the preprocessed process parameters to obtain multiple first process categories; based on the multiple first process categories, a cluster center corresponding to each first process category is determined to obtain multiple first cluster centers; the GAP value corresponding to each of the multiple first cluster centers is calculated, and the maximum GAP value is used as the target number of process clusters; the processes are reclassified based on the target number of process clusters to obtain multiple reclassified second process categories.

[0141] In one possible implementation, a second cluster center is determined for each of the multiple second process categories; based on the process parameters associated with or included by the second cluster center, the importance level of the processes in the multiple second process categories is determined.

[0142] In one possible implementation, the current state of all processes in the container is initialized into a state matrix; a corresponding state table is generated based on the state matrix; the Q-learning algorithm is used to continuously update the value corresponding to each process state in the state table until the state table converges, thereby obtaining the expected benefits of the process operations corresponding to all processes.

[0143] In one possible implementation, the current state of the process is changed based on the target process operation that maximizes the expected benefit.

[0144] In one possible implementation, based on the target process operation, a process state change instruction is sent to the container, so that the container changes the current state of the process based on the process state change instruction.

[0145] In one possible implementation, process parameters associated with or included in each process in the container are periodically acquired based on a preset time interval.

[0146] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0147] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented in hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0148] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A process management method of an intelligent terminal, characterized by, The method comprises the following steps: obtaining process parameters associated with or included in each process in the container; determining the importance level of the process based on the process parameters; determining the expected return of the process operation based on the process parameters and the importance level; selecting the target process operation with the maximum expected return to manage the process; the step of determining the expected return of the process operation based on the process parameters and the importance level comprises: initializing the current state of all processes in the container into a state matrix; generating a corresponding state table based on the state matrix initialization; continuously updating the value corresponding to the state of each process in the state table using the Q-learning algorithm until the state table converges, obtaining the expected return of the process operation corresponding to each process respectively; generating a corresponding state table based on the state matrix initialization, which is referred to as a Q table, and continuously updating the value corresponding to the state of each process in the state table using the Q-learning algorithm, which is referred to as a Q value, wherein the operation exploration is performed using the ε-gredyce strategy, and the Q value is continuously updated until the state table converges; The Q-table is initialized as a 2^n*2^n matrix, with all corresponding values ​​set to zero. The S(k) values ​​between two states in the matrix are then used to define the relationships between them. Values ​​differing by more than 1 are considered illegal actions; n is the number of samples in each container. This indicates that the i-th process is in a closed or open state. After constructing the initial Q-table, the current state is explored using an ε-greedyce strategy, that is, with a probability of ε, other non-optimal state transitions are explored for each step in the current Q-table; the selection probability is shown in the following formula: After the selection operation a, the corresponding position in the Q-table is updated with the following formula, where is the learning efficiency, is the discount efficiency, is the optimal action in the corresponding memory in the memory pool, with the following formula: wherein The calculation is made by the following formula: wherein, , is the corresponding weight coefficient, Y is the importance classification result calculated using the K-means algorithm, is the CPU usage rate after the relevant data of the process is obtained each time and the operation on the process is completed, is the initial process CPU usage rate read each time, is the memory usage rate after the relevant data of the process is obtained each time and the operation on the process is completed, is the initial process memory usage rate read each time, is the DNS request amount of the process in the current one minute when the process data is obtained, is the DNS request amount of the process from 00:00 to each day, F is the DNS resolution failure rate of the process, and C is the correlation coefficient of the IP address and the domain address, and the specific definition is that, assuming that the place corresponding to the IP address is , and the place corresponding to the domain address is , then C is the ratio of the length of the intersection of A and B to the length of B. After the operation is performed, the changed The changed Q table is stored in the memory pool, and the Q table is repeatedly explored using the ε-greedy strategy until the Q table converges or the number of iterations is reached, to obtain the expected returns of the process operations corresponding to all processes respectively.

2. The method of claim 1, wherein, after the step of obtaining the process parameters associated with or included in each process in the container, the method further comprises: preprocessing the process parameters, classifying the processes based on the preprocessed process parameters, and obtaining a plurality of first process categories; determining the cluster center corresponding to each first process category based on the plurality of first process categories, and obtaining a plurality of first cluster centers; calculating the GAP value corresponding to each of the plurality of first cluster centers, and taking the maximum GAP value as the target process cluster number; reclassifying the processes based on the target process cluster number, and obtaining a plurality of second process categories after reclassification.

3. The method of claim 2, wherein, The step of determining the importance level of the process based on the process parameters comprises: determining the second cluster center corresponding to each second process category in the plurality of second process categories; determining the importance level of the process in the plurality of second process categories based on the second cluster center and the process parameters associated with or included in the second cluster center.

4. The method of claim 1, wherein, The step of selecting the target process operation with the maximum expected return to manage the process comprises: changing the current state of the process based on the target process operation with the maximum expected return.

5. The method of claim 4, wherein, The step of changing the current state of the process based on the target process operation with the maximum expected return comprises: sending a process state change instruction to the container based on the target process operation, so that the container changes the current state of the process based on the process state change instruction.

6. The method of claim 1, wherein, The step of obtaining the process parameters associated with or included in each process in the container comprises: periodically obtaining the process parameters associated with or included in each process in the container based on a preset time.

7. A process management apparatus of an intelligent terminal, characterized by comprising: The method comprises the following steps: an obtaining module is configured to obtain process parameters associated with or included in each process in the container; a determining module is configured to determine the importance level of the process based on the process parameters; the determining module is further configured to determine the expected return of the process operation based on the process parameters and the importance level; The management module is configured to select a target process operation with the maximum expected benefit to manage the process; The expected benefit for the process operation is determined based on the process parameters and the importance level, including: initializing current states of all processes in the container into a state matrix; generating a corresponding state table based on the state matrix initialization; updating values corresponding to each process state in the state table using a Q-learning algorithm until the state table converges, to obtain expected benefits of process operations corresponding to the all processes respectively; generating a corresponding state table based on the state matrix initialization, referred to as a Q table, and constantly updating values corresponding to each process state in the state table using a Q-learning algorithm, referred to as Q values, wherein an ε-gredyce strategy is used for operation exploration, and the Q values are constantly updated until the state table converges. The Q-table is initialized as a 2^n*2^n matrix, with all corresponding values ​​set to zero. The S(k) values ​​between two states in the matrix are then used to define the relationships between them. Values ​​differing by more than 1 are considered illegal actions; n is the number of samples in each container. This indicates that the i-th process is in a closed or open state. After constructing the initial Q-table, the current state is explored using an ε-greedyce strategy, that is, with a probability of ε, other non-optimal state transitions are explored for each step in the current Q-table; the selection probability is shown in the following formula: After the selection operation a, the corresponding position in the Q-table is updated with the following equation, where is the learning efficiency, is the discount efficiency, is the optimal action in the corresponding memory in the memory pool, with the following equation: wherein The calculation is made by the following formula: wherein, , is the corresponding weight coefficient, Y is the importance classification result calculated using the K-means algorithm, is the CPU usage rate after the relevant data of the process is obtained each time and the operation on the process is completed, is the initial process CPU usage rate read each time, is the memory usage rate after the relevant data of the process is obtained each time and the operation on the process is completed, is the initial process memory usage rate read each time, is the DNS request amount of the process in the current one minute when the process data is obtained, is the average DNS request amount of the process per minute from 00:00 to F is the DNS resolution failure rate of the process, and C is the correlation coefficient of the IP address and the domain address, and the specific definition is that, assuming that the place corresponding to the IP address is , and the place corresponding to the domain address is , then C is the ratio of the length of the intersection of A and B to the length of B. After the operation is performed, the changed The changed Q table is stored in the memory pool, and the Q table is repeatedly explored using an ε-greedy strategy until the Q table converges or the number of iterations is reached, to obtain the expected returns of the process operations corresponding to all processes respectively.

8. A computer device, comprising: The processor is configured to execute a process management program stored in the memory to implement the process management method in any one of claims 1 to 6. The storage medium stores one or more programs executable by one or more processors to implement the process management method in any one of claims 1 to 6.

9. A storage medium, characterized by ​

Citation Information

Patent Citations

  • Resource allocation method, resource allocation device, electronic equipment and storage medium

    CN113254192A

  • Data set partitioning method and device

    CN114417095A