An AI-based computer resource management method, system, and medium

Through the computer resource management method based on artificial intelligence, the memory consumption index is calculated using real-time and historical memory resource data, the exception type is identified and managed, and the problem of static and undynamic management of memory resource management in the existing technology is solved, and the intelligent dynamic management of computer memory resources is realized.

CN119440962BActive Publication Date: 2025-06-24EAST CHINA JIAOTONG UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510025451.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-08
Publication Date
2025-06-24
Estimated Expiration
2045-01-08

AI Technical Summary

Technical Problem

In the prior art, the memory resource management of computer resources depends on pre-set thresholds and cannot realize dynamic management, which leads to high memory resource occupancy caused by user behavior and is difficult to identify, triggering unnecessary intervention.

Method used

Using an artificial intelligence-based method, by obtaining real-time and historical memory resource data, calculating memory consumption index, detecting and analyzing the memory consumption of each application, identifying exception types and managing accordingly.

Benefits of technology

It realizes dynamic management of computer memory resources, intelligently identify abnormalities with high memory resource occupancy, avoid unnecessary intervention, and improve resource utilization efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119440962B_ABST
    Figure CN119440962B_ABST
Patent Text Reader

Abstract

The present invention discloses a computer resource management method, system and medium based on artificial intelligence, relating to the technical field of computer resource management, and solving the problem that the current computer cannot dynamically manage memory resources and is prone to identifying the high memory resource occupancy rate caused by user behavior as an application program anomaly. The method includes: obtaining the real-time memory resource data of the application programs running on the computer and the historical memory resource data of the computer; performing memory occupancy detection and analysis on the memory consumption of the computer, and obtaining the real-time memory consumption index of the computer through the detection and analysis; detecting and analyzing the real-time memory consumption of each application program in the computer; obtaining the application anomaly data of the application program, then detecting the anomaly type of the application program through the application normal data and the application anomaly data, and performing corresponding management according to the anomaly type of the application program. The present invention realizes the dynamic management of memory resources in the computer.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of computer resource management, and specifically relates to a computer resource management method, system, and medium based on artificial intelligence. Background Art

[0002] Computer resource management refers to the process of efficiently configuring, scheduling, and optimizing various hardware and software resources (such as CPU, memory, storage, network, etc.) in a computer system to ensure the stability of system performance, the efficiency of task execution, and the reasonable utilization of resources. Through resource management, the system can dynamically allocate resources to meet the needs of different tasks, avoid waste or conflict of resources, improve overall computing efficiency, and provide an exception warning or adjustment mechanism to handle emergencies when necessary.

[0003] In the prior art, the management of memory resources in computer resources often relies on pre-set thresholds for memory resource allocation management, unable to dynamically manage memory resources, and easily identifying the high memory resource occupancy rate caused by user behavior as an application program exception, thus triggering unnecessary intervention operations;

[0004] Therefore, the present invention proposes a computer resource management method, system, and medium based on artificial intelligence. Summary of the Invention

[0005] The purpose of the present invention is to propose a computer resource management method, system, and medium based on artificial intelligence to solve the problems raised in the above background art.

[0006] The technical problem to be solved by the present invention is:

[0007] How to achieve dynamic management of memory resources in a computer based on artificial intelligence.

[0008] In a first aspect, to achieve the above object, the present invention adopts the following technical solution:

[0009] A computer resource management method based on artificial intelligence, and the computer resource management method is specifically as follows:

[0010] Step S1, obtain the real-time memory resource data of the applications running on the computer and the historical memory resource data of the computer;

[0011] Step S2, perform memory occupancy detection and analysis on the memory consumption of the computer based on the real-time memory resource data and the historical memory resource data, and obtain the real-time memory consumption index of the computer through the detection and analysis;

[0012] Step S3, perform detection and analysis on the real-time memory consumption of each application program in the computer based on the real-time total memory consumption index;

[0013] Step S4, obtain the application exception data of the application program, and then detect the exception type of the application program through the application normal data and the application exception data, and perform corresponding management according to the exception type of the application program.

[0014] Furthermore, the real-time memory resource data is the application unique identifier, application name, real-time memory consumption, and real-time acquisition time corresponding to the application program running on the computer;

[0015] The historical memory resource data includes the historical acquisition time when the computer acquires the historical memory usage and the historical memory usage of the computer.

[0016] Furthermore, the step S1 includes the following sub-steps:

[0017] Step S11, obtain the real-time memory resource data of the running application program, and draw a real-time memory resource distribution map of the application program according to the real-time memory resource data; wherein, the abscissa in the real-time memory resource distribution map is the application unique identifier of the application program, and the ordinate is the corresponding real-time memory occupancy rate of the application program;

[0018] Step S12, obtain the historical memory resource usage corresponding to the computer when data is collected at any historical acquisition time, and then merge it with the historical acquisition time to form historical memory resource data.

[0019] Furthermore, the step S2 includes the following sub-steps:

[0020] Step S21, obtain the historical memory usage according to the historical memory resource data of the computer, and calculate the average value LPJ of the historical memory usage through the formula. The specific formula is as follows:

[0021] , where LSNi is the historical memory usage corresponding to the computer at any historical acquisition time, i is the number of the historical acquisition time, i = 1, 2,..., n, n is the upper limit value of i, and n is a positive integer;

[0022] Step S22, calculate the standard deviation LBZ of the historical memory usage in the computer through the formula. The specific formula is as follows:

[0023] ;

[0024] Step S23, obtain the real-time memory consumption of the application program based on the real-time memory resource data, then accumulate the real-time memory consumption to obtain the real-time total memory consumption SSJ of the computer, and calculate the real-time total memory consumption index ZSX of the computer through the formula. The specific formula is as follows:

[0025] ZSX = |SSJ - LPJ| / LBZ。

[0026] Further, the step S3 includes the following sub - steps:

[0027] Step S31, when the real - time total memory consumption index of the computer is less than or equal to the first abnormal threshold, no processing is performed;

[0028] When the real - time total memory consumption index of the computer is less than or equal to the second abnormal threshold and greater than the first abnormal threshold, a warning message is issued;

[0029] When the real - time total memory consumption index of the computer is greater than the second abnormal threshold, proceed to the next step; where the second abnormal threshold is greater than the first abnormal threshold, and the first abnormal threshold is greater than zero;

[0030] Step S32, obtain the application unique identifier of the application program based on the real - time memory resource data, and then obtain the historical application memory consumption data corresponding to the application program one by one according to the application unique identifier of the application program; the historical application memory consumption data includes the application unique identifier of the application program, the application name, the historical memory consumption, and the historical collection time;

[0031] Step S33, calculate the average value and standard deviation of the historical memory consumption corresponding to the application program based on the historical application memory consumption data, and then obtain the normal memory usage range corresponding to the running application program;

[0032] Step S34, obtain the real - time memory consumption of the application program according to the real - time memory resource data;

[0033] Compare the real - time memory consumption with the normal memory usage range of the application program;

[0034] If the real - time memory consumption of the application program is within the normal memory usage range, no operation is performed;

[0035] If the real - time memory consumption of any application program is outside the normal memory usage range, record the real - time memory consumption of the application program as the application abnormal memory consumption, and at the same time proceed to the next step; where the application abnormal memory consumption of the application program is the instantaneous memory consumption of the application program at any moment;

[0036] Step S35, use the real - time collection time when the real - time memory consumption of the application program is outside the normal memory usage range as the initial real - time collection time, use the real - time collection time when the real - time memory consumption of the application program returns to within the normal memory usage range as the termination real - time collection time, and subtract the initial real - time collection time from the termination real - time collection time to obtain the application abnormal duration of the application program;

[0037] Step S36: Combine the application exception duration and the application exception memory consumption of the application into application exception data.

[0038] Further, the step S33 includes the following sub-steps:

[0039] Step S331: Obtain the historical memory consumption based on the historical application memory consumption data of the application, and calculate the corresponding average value YYP of the historical memory consumption of the application through the formula. The specific formula is as follows:

[0040] , where YYXi is the historical memory consumption corresponding to any historical collection time of the application, and i is the number of the historical collection time;

[0041] Step S332: Calculate the standard deviation YYB corresponding to the historical memory consumption of the application through the formula. The specific formula is as follows:

[0042] ;

[0043] Step S333: Obtain the normal memory usage range of the application based on the average value and the standard deviation corresponding to the historical memory consumption of the application.

[0044] Further, the step S4 includes the following sub-steps:

[0045] Step S41: Take the application exception duration of the application as the standard. Subtract the application exception duration from the second historical collection time to obtain the first historical collection time. If there is an application exception memory consumption of the application from the first historical collection time to the second historical collection time, do not perform any operation; if there is no application exception memory consumption of the application from the first historical collection time to the second historical collection time, record the collection duration obtained by subtracting the first historical collection time from the second historical collection time as the application normal duration.

[0046] Among them, the second historical collection time is any time node within the historical collection time; the application exception duration is equal to the application normal duration;

[0047] Step S42: Record the historical memory consumption of the application from the first historical collection time to the second historical collection time as the application normal memory consumption, and combine the application normal memory consumption and the application normal duration into application normal data;

[0048] Among them, the application normal memory consumption of the application is the instantaneous memory consumption at any moment during the application normal duration;

[0049] Step S43: Record the application abnormal duration and the application normal duration as the application record duration, and then establish a normal quadratic regression equation for the application program based on the application record duration of the application program and the corresponding normal memory consumption of the application program. The specific normal quadratic regression equation is as follows:

[0050] ZCY = a1×ZYS² + b1×ZYS + c1, where ZCY is the normal memory consumption of the application program, ZYS is the application record duration of the application program, a1 is the change amplitude index of the normal application memory consumption, b1 is the linear change index of the normal application memory consumption with respect to the application record duration, and c1 is the normal memory consumption of the application program at the first historical collection time, and c1 > 0.

[0051] Further, step S4 further includes the following sub-steps:

[0052] Step S44: Establish an abnormal quadratic regression equation based on the application record duration and the abnormal memory consumption in the application abnormal data of the application program. The specific abnormal quadratic regression equation is as follows:

[0053] YCY = a2×ZYS² + b2×ZYS + c2, where YCY is the abnormal memory consumption of the application program, a2 is the change amplitude index of the abnormal application memory consumption, b2 is the linear change index of the abnormal application memory consumption with respect to the application record duration, and c2 is the abnormal memory consumption of the application program at the initial real-time collection time, and c2 > 0;

[0054] Step S45: Calculate the application abnormal index ZSY through the formula. The specific formula is as follows:

[0055] , where t0 is zero and tm is the maximum duration of the application record duration;

[0056] Step S46: When the application abnormal index is less than or equal to the first abnormal threshold, determine that the abnormal type of the application program is the first abnormal type, and at the same time limit the real-time memory consumption of the application program; when the application abnormal index is greater than the first abnormal threshold, determine that the abnormal type of the application program is the second abnormal type, and at the same time force the application program to stop;

[0057] Among them, the abnormal types of the application program include the first abnormal type and the second abnormal type. The first abnormal type is that the real-time memory consumption of the application program is outside the normal memory usage range due to the user's active operation, and the second abnormal type is that the real-time memory consumption of the application program is outside the normal memory usage range due to non-user active operation.

[0058] Second aspect: An artificial intelligence-based computer resource management system, including:

[0059] A data acquisition module, configured to acquire real-time memory resource data of applications running on a computer and historical memory resource data of the computer;

[0060] A detection and analysis module, configured to perform memory occupancy detection and analysis on the memory consumption of the computer based on the real-time memory resource data and the historical memory resource data, and obtain a real-time memory consumption index of the computer through the detection and analysis;

[0061] A data analysis module, configured to perform detection and analysis on the real-time memory consumption of each application in the computer based on the real-time total memory consumption index;

[0062] A data collection module, configured to acquire application exception data of an application;

[0063] An exception detection module, configured to detect the exception type of an application through application normal data and application exception data;

[0064] An intelligent management module, configured to perform corresponding management according to the exception type of the application.

[0065] Thirdly, a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, a computer resource management method is implemented.

[0066] In summary, due to the adoption of the above technical solutions, the beneficial effects of the present invention are as follows:

[0067] The present invention first acquires real-time memory resource data of applications running on a computer and historical memory resource data of the computer, then performs memory occupancy detection and analysis on the memory consumption of the computer based on the real-time memory resource data and the historical memory resource data, obtains a real-time memory consumption index of the computer through the detection and analysis, then performs detection and analysis on the real-time memory consumption of each application in the computer based on the real-time total memory consumption index, and at the same time acquires application exception data of the application, detects the exception type of the application through application normal data and application exception data, and performs corresponding management according to the exception type of the application. The present invention realizes dynamic management of memory resources in the computer and performs intelligent identification on abnormal identifications with high memory resource occupancy rates. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] For the convenience of those skilled in the art to understand, the present invention will be further described below with reference to the accompanying drawings.

[0069] Figure 1 is the overall system block diagram of the present invention;

[0070] Figure 2 is the real-time memory resource distribution diagram of the application in the present invention;

[0071] Figure 3 Schematic diagram for comparing the normal quadratic regression equation and the abnormal quadratic regression equation in the present invention;

[0072] Figure 4 Schematic diagram of the structure of the computer device in the present invention. Detailed implementation manners

[0073] The technical solution of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0074] Embodiment 1: Please refer to Figures 1-3 As shown in the figure, the technical solution provided by the present invention is: a computer resource management method based on artificial intelligence. In this embodiment, this method is mainly used to manage the memory resources of a computer. The method is specifically as follows:

[0075] Step S1, obtain the real-time memory resource data of the applications running on the computer and the historical memory resource data of the computer;

[0076] In this embodiment, the step S1 includes the following sub-steps:

[0077] Step S11, as Figure 2 shown in the figure, obtain the real-time memory resource data of the running applications, and draw a real-time memory resource distribution map of the applications according to the real-time memory resource data;

[0078] It should be specifically noted that the real-time memory resource data is the application unique identifier, application name, real-time memory consumption, and real-time acquisition time corresponding to the applications running on the computer; the abscissa in the real-time memory resource distribution map is the application unique identifier of the application, and the ordinate is the real-time memory occupancy rate corresponding to the application;

[0079] Exemplarily, use the Windows API function to obtain the real-time memory resource data, establish a real-time memory resource data table, and then merge and save the real-time memory resource data table. The real-time memory resource data table is shown in Table 1, and Table 1 is specifically as follows:

[0080]

[0081] It should be specifically noted that the system API is a pre-defined function, and its purpose is to provide the ability for applications and developers to access a set of routines based on a certain software or hardware, without the need to access the source code or understand the details of the internal working mechanism;

[0082] Step S12: Obtain the historical memory resource usage corresponding to the computer during data collection at any historical collection time, and then merge it with the historical collection time to form historical memory resource data.

[0083] Specifically, the historical memory resource data includes the historical collection time when the computer collects the historical memory usage and the historical memory usage of the computer.

[0084] Exemplarily, collect the historical memory resource consumption corresponding to the computer at any historical collection time through the system log of the computer, establish a historical memory resource data table, and then merge and save the historical memory resource data table. The historical memory resource data table is shown in Table 2, and Table 2 is specifically as follows:

[0085]

[0086] Step S2: Perform memory occupancy detection and analysis on the memory consumption of the computer based on the real-time memory resource data and the historical memory resource data, and obtain the real-time memory consumption index of the computer through the detection and analysis.

[0087] In this embodiment, the step S2 includes the following sub-steps:

[0088] Step S21: Obtain the historical memory usage according to the historical memory resource data of the computer, and calculate the average value LPJ of the historical memory usage through the formula. The specific formula is as follows:

[0089] , where LSNi is the historical memory usage corresponding to the computer at any historical collection time, i is the number of the historical collection time, i = 1, 2,..., n, n is the upper limit value of i, and n is a positive integer;

[0090] Step S22: Calculate the standard deviation LBZ of the historical memory usage in the computer through the formula. The specific formula is as follows:

[0091] ;

[0092] Step S23: Obtain the real-time memory consumption of the application program based on the real-time memory resource data, and then accumulate the real-time memory consumption to obtain the real-time total memory consumption SSJ of the computer. Calculate the real-time total memory consumption index ZSX of the computer through the formula. The specific formula is as follows:

[0093] ZSX = |SSJ - LPJ| / LBZ.

[0094] Step S3: Perform detection and analysis on the real-time memory consumption of each application program in the computer based on the real-time total memory consumption index.

[0095] In this embodiment, step S3 includes the following sub-steps:

[0096] Step S31, when the real-time total memory consumption index of the computer is less than or equal to the first anomaly threshold, no processing is performed;

[0097] When the real-time total memory consumption index of the computer is less than or equal to the second anomaly threshold and greater than the first anomaly threshold, a warning message is issued;

[0098] When the real-time total memory consumption index of the computer is greater than the second anomaly threshold, proceed to the next step;

[0099] It should be specifically noted that the second anomaly threshold is greater than the first anomaly threshold, and the first anomaly threshold is greater than zero;

[0100] Step S32, obtain the application unique identifier of the application program based on the real-time memory resource data, and then obtain the corresponding historical application memory consumption data of the application program one by one according to the application unique identifier of the application program;

[0101] It should be specifically noted that the historical application memory consumption data is the application unique identifier, application name, historical memory consumption amount, and historical collection time of the application program;

[0102] Exemplarily, collect the historical application memory consumption data corresponding to any running application program in the computer through the system log of the computer, establish a historical application memory consumption data table, and then merge and save the historical application memory consumption data tables corresponding to all running application programs. The historical application memory consumption data corresponding to any running application program is shown in Table 3, and Table 3 is specifically as follows:

[0103]

[0104] Step S33, calculate the average value and standard deviation of the historical memory consumption amount corresponding to the application program based on the historical application memory consumption data, and then obtain the normal memory usage range corresponding to the running application program;

[0105] Specifically, step S33 includes the following sub-steps:

[0106] Step S331, obtain the historical memory consumption amount according to the historical application memory consumption data of the application program, and calculate the corresponding average value YYP of the historical memory consumption amount of the application program through the formula. The formula is specifically as follows:

[0107] , where YYXi is the historical memory consumption amount corresponding to the application program at any historical collection time, and i is the number of the historical collection time;

[0108] Step S332: Calculate the standard deviation YYB corresponding to the historical memory consumption of the application through a formula. The specific formula is as follows:

[0109] ;

[0110] Step S333: Obtain the normal memory usage range of the application based on the average value and standard deviation corresponding to the historical memory consumption of the application;

[0111] Specifically, the normal memory usage range is [YYP - k×YYB, YYP + k×YYB], where k is a weight coefficient with a fixed value;

[0112] It should be specifically noted that in the standard normal distribution, the distribution law of the historical memory consumption is as follows: 95.45% of the historical memory consumption is within the range of ±2 times the standard deviation corresponding to the average value of the historical memory consumption, and 99.73% of the data is within the range of ±3 times the standard deviation corresponding to the average value of the historical memory consumption. When k = 2, it is used to mark the data points deviating from the mean, but there are false alarm situations; when k = 3, it is used to reduce false alarm situations, and users or staff can choose according to needs;

[0113] Step S34: Obtain the real-time memory consumption of the application based on the real-time memory resource data, and compare the real-time memory consumption with the normal memory usage range of the application. If the real-time memory consumption of the application is within the normal memory usage range, no operation is performed; if the real-time memory consumption of any application is outside the normal memory usage range, the real-time memory consumption of the application is recorded as the abnormal memory consumption of the application, and at the same time, enter the next step;

[0114] It should be specifically noted that the abnormal memory consumption of the application is the instantaneous memory consumption of the application at any moment;

[0115] Step S35: Take the real-time acquisition time when the real-time memory consumption of the application is outside the normal memory usage range as the initial real-time acquisition time, take the real-time acquisition time when the real-time memory consumption of the application returns to within the normal memory usage range as the termination real-time acquisition time, and subtract the initial real-time acquisition time from the termination real-time acquisition time to obtain the abnormal duration of the application;

[0116] Step S36: Combine the abnormal duration of the application and the abnormal memory consumption of the application into abnormal data of the application.

[0117] Step S4: Obtain the abnormal data of the application, and then detect the abnormal type of the application through the normal data of the application and the abnormal data of the application, and perform corresponding management according to the abnormal type of the application;

[0118] In this embodiment, step S4 includes the following sub-steps:

[0119] Step S41: Taking the application exception duration of the application as a standard, subtract the application exception duration from the second historical collection time to obtain the first historical collection time. If there is an application exception memory consumption of the application during the period from the first historical collection time to the second historical collection time, no operation is performed; if there is no application exception memory consumption of the application during the period from the first historical collection time to the second historical collection time, record the collection duration obtained by subtracting the first historical collection time from the second historical collection time as the application normal duration;

[0120] It should be specifically noted that the second historical collection time is any time node within the historical collection time; the application exception duration is equal to the application normal duration;

[0121] Step S42: Record the historical memory consumption of the application during the period from the first historical collection time to the second historical collection time as the application normal memory consumption, and combine the application normal memory consumption and the application normal duration into application normal data;

[0122] It should be specifically noted that the application normal memory consumption of the application is the instantaneous memory consumption of the application at any moment during the application normal duration;

[0123] Step S43: As shown in Figure 3 , record the application exception duration and the application normal duration as the application record duration, and then establish a normal quadratic regression equation of the application through the application record duration of the application and the corresponding application normal memory consumption. The normal quadratic regression equation is specifically as follows:

[0124] ZCY = a1×ZYS² + b1×ZYS + c1, where ZCY is the application normal memory consumption of the application, ZYS is the application record duration of the application, and a1, b1, and c1 are calculated by the least squares method;

[0125] It should be specifically noted that the least squares method is a prior art; a1 is the change amplitude index of the normal application memory consumption, b1 is the linear change index of the normal application memory consumption with respect to the application record duration, c1 is the application normal memory consumption of the application at the first historical collection time, and c1 > 0; when recording the application exception duration and the application normal duration, both are obtained by subtracting the first historical collection time from the second historical collection time, so the application exception duration is the same as the application normal duration;

[0126] Step S44: Establish an abnormal quadratic regression equation according to the application record duration and the application abnormal memory consumption in the application abnormal data of the application. The abnormal quadratic regression equation is specifically as follows:

[0127] YCY = a2×ZYS² + b2×ZYS + c2, where YCY is the abnormal memory consumption of the application program, and a2, b2, and c2 are calculated by the least squares method;

[0128] Specifically, a2 is the change amplitude index of the abnormal application memory consumption, b2 is the linear change index of the abnormal application memory consumption with the application recording duration, c2 is the abnormal application memory consumption of the application program at the initial real-time acquisition time, and c2 > 0;

[0129] Step S45, calculate the application abnormal index ZSY through the formula. The specific formula is as follows:

[0130] , where t0 is zero and tm is the maximum duration of the application recording duration;

[0131] Step S46, when the application abnormal index is less than or equal to the first abnormal threshold, determine that the abnormal type of the application program is the first abnormal type, and at the same time limit the real-time memory consumption of the application program; when the application abnormal index is greater than the first abnormal threshold, determine that the abnormal type of the application program is the second abnormal type, and at the same time force the application program to stop;

[0132] Specifically, the abnormal types of the application program include the first abnormal type and the second abnormal type. The first abnormal type is that the real-time memory consumption of the application program is outside the normal memory usage range due to the user's active operation, and the second abnormal type is that the real-time memory consumption of the application program is outside the normal memory usage range due to non-user active operation;

[0133] In this application, if there are corresponding calculation formulas, the above calculation formulas are all dimensionless and take their numerical values for calculation. The coefficient such as the weight coefficient and the proportionality coefficient in the formula is set to obtain a result value by quantifying each parameter. Regarding the magnitudes of the weight coefficient and the proportionality coefficient, as long as they do not affect the proportional relationship between the parameter and the result value.

[0134] Embodiment 2: Based on another concept of the same invention, a computer resource management system based on artificial intelligence is also proposed, which specifically includes:

[0135] A data acquisition module for acquiring the real-time memory resource data of the application programs running on the computer and the historical memory resource data of the computer;

[0136] A detection and analysis module for performing memory occupancy detection and analysis on the memory consumption of the computer based on the real-time memory resource data and the historical memory resource data, and detecting and analyzing to obtain the real-time memory consumption index of the computer;

[0137] A data analysis module for detecting and analyzing the real-time memory consumption of each application program in a computer according to the real-time total memory consumption index;

[0138] A data acquisition module for obtaining application exception data of an application program;

[0139] An exception detection module for detecting the exception type of an application program through application normal data and application exception data;

[0140] An intelligent management module for performing corresponding management according to the exception type of an application program.

[0141] Embodiment 3: Figure 4 Illustrates a schematic structural diagram of a computer device, as Figure 4 shown, the computer device may include: a processor, a communication interface, a memory, and a communication bus. Among them, the processor, the communication interface, and the memory complete mutual communication through the communication bus. The processor can call the logical instructions in the memory to execute an artificial intelligence-based computer resource management method, and the method includes: obtaining the real-time memory resource data of the application programs running on the computer and the historical memory resource data of the computer; performing memory occupancy detection and analysis on the memory consumption of the computer according to the real-time memory resource data and the historical memory resource data, and obtaining the real-time memory consumption index of the computer through the detection and analysis; detecting and analyzing the real-time memory consumption of each application program in the computer according to the real-time total memory consumption index; obtaining the application exception data of the application program, and then detecting the exception type of the application program through the application normal data and the application exception data, and performing corresponding management according to the exception type of the application program.

[0142] In addition, when the logical instructions in the above-mentioned memory are implemented in the form of software function units and sold or used as an independent product, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present application. The foregoing storage medium includes: various media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc that can store program codes.

[0143] On the other hand, the present application also provides a computer program product, which includes a computer program stored on a computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute a computer resource management method based on artificial intelligence provided by the above-mentioned various methods. The method includes: obtaining real-time memory resource data of an application program running in the computer and historical memory resource data of the computer; performing memory occupancy detection and analysis on the memory consumption of the computer based on the real-time memory resource data and the historical memory resource data, and obtaining a real-time memory consumption index of the computer through the detection and analysis; performing detection and analysis on the real-time memory consumption of each application program in the computer based on the real-time total memory consumption index; obtaining application exception data of the application program, and then detecting the exception type of the application program through the application normal data and the application exception data, and performing corresponding management according to the exception type of the application program.

[0144] In another aspect, the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it is configured to execute a computer resource management method based on artificial intelligence provided by the above-mentioned various methods. The method includes: obtaining real-time memory resource data of an application program running in the computer and historical memory resource data of the computer; performing memory occupancy detection and analysis on the memory consumption of the computer based on the real-time memory resource data and the historical memory resource data, and obtaining a real-time memory consumption index of the computer through the detection and analysis; performing detection and analysis on the real-time memory consumption of each application program in the computer based on the real-time total memory consumption index; obtaining application exception data of the application program, and then detecting the exception type of the application program through the application normal data and the application exception data, and performing corresponding management according to the exception type of the application program.

[0145] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative efforts.

[0146] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the essence of the above technical solution, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0147] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, and are not intended to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A computer resource management method based on artificial intelligence, characterized in that: The computer resource management method is as follows: Step S1, obtaining real-time memory resource data of the application program running in the computer and historical memory resource data of the computer; the real-time memory resource data is the application unique identifier, application name, real-time memory consumption and real-time collection time corresponding to the application program running in the computer; The historical memory resource data includes the historical collection time when the computer collects the historical memory usage and the historical memory usage of the computer; Step S2, performing memory occupancy detection and analysis on the computer's memory consumption based on the real-time memory resource data and the historical memory resource data, and obtaining a real-time total memory consumption index of the computer through the detection and analysis; Wherein, the step S2 includes the following sub-steps: Step S21, obtaining the historical memory usage according to the historical memory resource data of the computer, and calculating the average value LPJ of the historical memory usage by a formula, the specific formula is as follows: , where LSNi is the historical memory usage of the computer at any historical collection time, i is the number of the historical collection time, i=1, 2, ..., n, n is the upper limit of i, and n is a positive integer; Step S22, calculate the standard deviation LBZ of the historical memory usage in the computer through a formula, the specific formula is as follows: ; Step S23, based on the real-time memory resource data, the real-time memory consumption of the application is obtained, and then the real-time memory consumption is accumulated to obtain the real-time total memory consumption SSJ of the computer, and the real-time total memory consumption index ZSX of the computer is calculated by the formula, and the specific formula is as follows: ZSX=|SSJ-LPJ| / LBZ; Step S3, detecting and analyzing the real-time memory consumption of each application program in the computer according to the real-time total memory consumption index; Step S4, obtaining application abnormality data of the application, and then detecting the abnormal type of the application through the application normal data and the application abnormality data, and performing corresponding management according to the abnormal type of the application.

2. The computer resource management method based on artificial intelligence according to claim 1, characterized in that: The step S1 includes the following sub-steps: Step S11, obtaining the real-time memory resource data of the running application, and drawing a real-time memory resource distribution map of the application according to the real-time memory resource data; wherein the horizontal axis in the real-time memory resource distribution map is the application unique identifier of the application, and the vertical axis is the real-time memory occupancy rate corresponding to the application; Step S12, obtaining the historical memory resource usage corresponding to the computer performing data collection at any historical collection time, and then merging it with the historical collection time into historical memory resource data.

3. The computer resource management method based on artificial intelligence according to claim 1, characterized in that: The step S3 includes the following sub-steps: Step S31, when the real-time total memory consumption index of the computer is less than or equal to the first abnormal threshold, no processing is performed; When the real-time total memory consumption index of the computer is less than or equal to the second abnormal threshold and greater than the first abnormal threshold, a warning message is issued; When the real-time total memory consumption index of the computer is greater than the second abnormal threshold, proceed to the next step; wherein the second abnormal threshold is greater than the first abnormal threshold, and the first abnormal threshold is greater than zero; Step S32, obtaining an application unique identifier of the application based on the real-time memory resource data, and then obtaining historical application memory consumption data corresponding to the application one by one according to the application unique identifier of the application; the historical application memory consumption data includes the application unique identifier of the application, the application name, the historical memory consumption and the historical collection time; Step S33, calculating the average and standard deviation of the historical memory consumption of the application program based on the historical application memory consumption data, and then obtaining the normal memory usage range corresponding to the running application program; Step S34, obtaining the real-time memory consumption of the application program according to the real-time memory resource data; Compare real-time memory consumption with the application's normal memory usage range; If the real-time memory consumption of the application is within the normal memory usage range, no action is taken; If the real-time memory consumption of any application is outside the normal memory usage range, the real-time memory consumption of the application is recorded as abnormal application memory consumption, and the next step is entered; The abnormal memory consumption of the application is the instantaneous memory consumption of the application at any time. Step S35, taking the real-time collection time when the real-time memory consumption of the application is outside the normal memory usage range as the initial real-time collection time, taking the real-time collection time when the real-time memory consumption of the application returns to the normal memory usage range as the termination real-time collection time, and subtracting the initial real-time collection time from the termination real-time collection time to obtain the abnormal application duration of the application; Step S36: Combine the application abnormality duration and the application abnormal memory consumption of the application into application abnormality data.

4. The computer resource management method based on artificial intelligence according to claim 3, characterized in that: The step S33 includes the following sub-steps: Step S331, obtain the historical memory consumption according to the historical application memory consumption data of the application, and calculate the corresponding average value YYP of the historical memory consumption of the application by the formula, the specific formula is as follows: , where YYXi is the historical memory consumption of the application corresponding to any historical collection time, and i is the number of the historical collection time; Step S332, the standard deviation YYB corresponding to the historical memory consumption of the application is calculated by a formula, and the specific formula is as follows: ; Step S333, obtaining a normal memory usage range of the application program according to the average value and standard deviation corresponding to the historical memory consumption of the application program.

5. The computer resource management method based on artificial intelligence according to claim 4, characterized in that: The step S4 includes the following sub-steps: Step S41, taking the application abnormality duration of the application as a standard, subtracting the application abnormality duration from the second historical collection time to obtain the first historical collection time; If the application has abnormal memory consumption from the first historical collection time to the second historical collection time, no operation is performed; If there is no abnormal memory consumption of the application during the period from the first historical collection time to the second historical collection time, the collection time obtained by subtracting the first historical collection time from the second historical collection time is recorded as the normal application time; The second historical collection time is any time node within the historical collection time; the abnormal application duration is equal to the normal application duration; Step S42, recording the historical memory consumption of the application from the first historical collection time to the second historical collection time as the normal memory consumption of the application, and combining the normal memory consumption of the application and the normal duration of the application into the normal application data; The normal memory consumption of the application is the instantaneous memory consumption of the application at any time during the normal duration of the application; Step S43, record the abnormal application duration and the normal application duration as the application record duration, and then establish a normal quadratic regression equation of the application through the application record duration of the application and the corresponding normal memory consumption of the application. The normal quadratic regression equation is as follows: ZCY=a1×ZYS²+b1×ZYS+c1, where ZCY is the normal memory consumption of the application, ZYS is the application recording duration of the application, a1 is the change amplitude index of the normal application memory consumption, b1 is the linear change index of the normal application memory consumption with the application recording duration, c1 is the normal application memory consumption of the application at the first historical collection time, and c1>0.

6. The computer resource management method based on artificial intelligence according to claim 5, characterized in that: The step S4 further comprises the following sub-steps: Step S44, establishing an abnormal quadratic regression equation according to the application recording duration and the application abnormal memory consumption in the application abnormal data of the application program, the abnormal quadratic regression equation is specifically as follows: YCY=a2×ZYS²+b2×ZYS+c2, where YCY is the abnormal application memory consumption of the application, a2 is the change amplitude index of the abnormal application memory consumption, b2 is the linear change index of the abnormal application memory consumption with the application recording time, c2 is the abnormal application memory consumption of the application at the initial real-time collection time, and c2>0; Step S45, calculate the application abnormality index ZSY through the formula, the specific formula is as follows: , where t0 is zero and tm is the maximum duration of application recording; Step S46, when the application anomaly index is less than or equal to the first anomaly threshold, the application anomaly type is determined to be the first anomaly type, and the real-time memory consumption of the application is limited; when the application anomaly index is greater than the first anomaly threshold, the application anomaly type is determined to be the second anomaly type, and the application is forcibly stopped; Among them, the exception types of the application include the first exception type and the second exception type. The first exception type is that the real-time memory consumption of the application is outside the normal memory usage range due to active user operation, and the second exception type is that the real-time memory consumption of the application is outside the normal memory usage range due to non-user active operation.

7. A computer resource management system based on artificial intelligence, characterized in that: In combination with a computer resource management method based on artificial intelligence according to any one of claims 1 to 6, comprising: A data acquisition module, used to acquire real-time memory resource data of an application program running in a computer and historical memory resource data of the computer; A detection and analysis module is used to perform memory usage detection and analysis on the computer's memory consumption based on real-time memory resource data and historical memory resource data, and to obtain a real-time total memory consumption index of the computer through detection and analysis; A data analysis module, used for detecting and analyzing the real-time memory consumption of each application program in the computer according to the real-time total memory consumption index; A data collection module is used to obtain application exception data of the application program; An anomaly detection module, used to detect the anomaly type of the application program by applying normal data and abnormal data; The intelligent management module is used to perform corresponding management according to the exception type of the application.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the computer resource management method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Memory resource processing method and device, electronic equipment and storage medium

    CN114327867A

  • Memory management method and system, desktop computer and computer storage medium

    CN118312320A