Computer resource management method and system based on artificial intelligence and medium
Through the computer resource management method based on artificial intelligence, real-time and historical memory resource data are used for dynamic management, the problem of undynamic memory resource management in the existing technology is solved, and more efficient resource utilization and intelligent exception recognition are achieved.
Patent Information
- Application Number
- CN202510025451.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-08
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2045-01-08
AI Technical Summary
The prior art is difficult to realize the dynamic management of memory resources in computers, and it is easy to trigger unnecessary intervention operations due to the high memory resource occupancy rate caused by user behavior.
Using an artificial intelligence-based computer resource management method, by obtaining real-time and historical memory resource data, calculating real-time memory consumption index, detecting and analyzing the memory consumption of each application, identifying exception types and performing intelligent management.
It realizes dynamic management of memory resources in computers, improves the rational utilization and computing efficiency of memory resources, reduces unnecessary intervention operations, and can intelligently identify abnormalities with high memory resource occupancy rate.
Smart Images

Figure CN119440962A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of computer resource management, and in particular 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 rational use of resources. Through resource management, the system can dynamically allocate resources to meet the needs of different tasks, while avoiding waste or conflict of resources, improving overall computing efficiency, and providing abnormal warning or adjustment mechanisms to deal with emergencies when necessary.
[0003] In the prior art, memory resource management in computer resources often relies on pre-set thresholds to manage memory resource allocation, and cannot dynamically manage memory resources. It is also easy to identify high memory resource usage caused by user behavior as application abnormalities, thereby triggering unnecessary intervention operations. To this end, the present invention proposes a computer resource management method, system and medium based on artificial intelligence. Summary of the invention
[0004] 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 technology.
[0005] The technical problems to be solved by the present invention are: How to achieve dynamic management of computer memory resources based on artificial intelligence.
[0006] In the first aspect, in order to achieve the above-mentioned purpose, the present invention adopts the following technical solutions: A computer resource management method based on artificial intelligence, the computer resource management method is as follows: Step S1, obtaining real-time memory resource data of an application program running in a computer and historical memory resource data 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 the computer's real-time memory consumption index through the detection and analysis; 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.
[0007] Furthermore, the real-time memory resource data is an application unique identifier, application name, real-time memory consumption, and real-time collection time corresponding to an application running in the computer; The historical memory resource data includes the historical collection time when the historical memory usage of the computer is collected and the historical memory usage of the computer.
[0008] Furthermore, 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.
[0009] Furthermore, 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, the standard deviation LBZ of the historical memory usage in the computer is calculated by a formula, and 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.
[0010] Furthermore, 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 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 application memory consumption, and the next step is entered; wherein the abnormal application 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.
[0011] Furthermore, 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.
[0012] Furthermore, 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 application abnormal memory consumption from the first historical collection time to the second historical collection time, no operation is performed; if the application does not have application abnormal memory consumption from the first historical collection time to the second historical collection time, the collection duration obtained by subtracting the first historical collection time from the second historical collection time is recorded as the normal application duration; 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.
[0013] Furthermore, the step S4 further includes 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.
[0014] In a second aspect, a computer resource management system based on artificial intelligence comprises: 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 the real-time memory resource data and the historical memory resource data, and to obtain the computer's real-time memory consumption index 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.
[0015] According to a third aspect, a computer-readable storage medium stores a computer program, which implements a computer resource management method when executed by a processor.
[0016] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are: The present invention first obtains the real-time memory resource data of the application program being run in the computer and the historical memory resource data of the computer, and then performs 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, obtains the real-time memory consumption index of the computer through the detection and analysis, and then performs detection and analysis on the real-time memory consumption of each application program in the computer according to the real-time total memory consumption index, and simultaneously obtains the application abnormality data of the application program, detects the abnormal type of the application program through the application normal data and the application abnormality data, and performs corresponding management according to the abnormal type of the application program. The present invention realizes the dynamic management of the memory resources in the computer, and intelligently identifies the abnormal identification of the high memory resource occupancy rate. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to facilitate understanding by those skilled in the art, the present invention is further described below with reference to the accompanying drawings.
[0018] Figure 1 is the overall system block diagram of the present invention; Figure 2 A real-time memory resource distribution diagram of the application program in the present invention; Figure 3 It is a schematic diagram comparing the normal quadratic regression equation and the abnormal quadratic regression equation in the present invention; Figure 4 It is a schematic diagram of the structure of the computer device in the present invention. DETAILED DESCRIPTION
[0019] 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 part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0020] Example 1: Please refer to Figure 1-Figure 3 As shown, the technical solution provided by the present invention is: a computer resource management method based on artificial intelligence. In this embodiment, the method is mainly used to manage the memory resources of the computer. The method is specifically as follows: Step S1, obtaining real-time memory resource data of an application program running in a computer and historical memory resource data of the computer; In this embodiment, step S1 includes the following sub-steps: Step S11, as Figure 2 As shown, the real-time memory resource data of the running application is obtained, and a real-time memory resource distribution map of the application is drawn according to the real-time memory resource data; 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 collection time corresponding to the application running in the computer; the horizontal axis in the real-time memory resource distribution graph is the application unique identifier of the application, and the vertical axis is the real-time memory occupancy rate corresponding to the application; Exemplarily, the real-time memory resource data is acquired using Windows API functions, and a real-time memory resource data table is established, and then the real-time memory resource data table is merged and saved. The real-time memory resource data table is shown in Table 1. The details of Table 1 are as follows:
[0021] It should be noted that the system API is a predefined function that aims to provide applications and developers with the ability to access a set of routines based on certain software or hardware without having to access the source code or understand the details of the internal working mechanism; 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.
[0022] It should be specifically noted that 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; Exemplarily, the historical memory resource consumption corresponding to any historical collection time in the computer is collected through the system log of the computer, and a historical memory resource data table is established, and then the historical memory resource data table is merged and saved. The historical memory resource data table is shown in Table 2. Table 2 is as follows:
[0023] 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 the computer's real-time memory consumption index through the detection and analysis; In this embodiment, 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, the standard deviation LBZ of the historical memory usage in the computer is calculated by a formula, and 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.
[0024] 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; In this embodiment, 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; It should be specifically noted that the second abnormality threshold is greater than the first abnormality threshold, and the first abnormality 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; It should be noted that the historical application memory consumption data includes the application unique identifier, application name, historical memory consumption, and historical collection time of the application; Exemplarily, historical application memory consumption data corresponding to any running application in the computer is collected through the system log of the computer, and a historical application memory consumption data table is established, and then the historical application memory consumption data tables corresponding to all running applications are merged and saved. The historical application memory consumption data corresponding to any running application is shown in Table 3, which is as follows:
[0025] 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; Specifically, 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; Specifically, the normal memory usage range is [YYP-k×YYB, YYP+k×YYB], where k is a fixed weight coefficient; It should be specifically noted that in the standard normal distribution, the distribution law of 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 data points that deviate from the mean, but there are false positives; when k=3, it is used to reduce false positives, and users or staff can make selections as needed; Step S34, obtaining the real-time memory consumption of the application according to the real-time memory resource data, comparing 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 abnormal memory consumption of the application, and the next step is entered; It should be specifically noted that the abnormal application memory consumption of an application is the instantaneous memory consumption of the application at any moment; 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.
[0026] 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; In this embodiment, 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 application abnormal memory consumption from the first historical collection time to the second historical collection time, no operation is performed; if the application does not have application abnormal memory consumption from the first historical collection time to the second historical collection time, the collection duration obtained by subtracting the first historical collection time from the second historical collection time is recorded as the normal application duration; It should be specifically noted that 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; It should be noted that the normal memory consumption of an application is the instantaneous memory consumption of the application at any time during the normal duration of the application; Step S43, as Figure 3 As shown, the abnormal application duration and the normal application duration are recorded as the application recording duration, and then the normal quadratic regression equation of the application is established through the application recording 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, and ZYS is the application recording duration of the application. a1, b1 and c1 are calculated by the least squares method; It should be specifically noted that the least square method is an existing technology; a1 is the change amplitude index of normal application memory consumption, b1 is the linear change index of normal application memory consumption with application recording duration, c1 is the normal application memory consumption of the application at the first historical collection time, and c1>0; when recording the abnormal application duration and the normal application duration, both are the second historical collection time minus the first historical collection time, so the abnormal application duration is the same as the normal application duration; 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 memory consumption of the application. a2, b2 and c2 are calculated by the least squares method. It should be specifically noted that 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; It should be specifically noted that the exception type of the application includes a first exception type and a 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-active user operation; In this application, if corresponding calculation formulas appear, the above calculation formulas are all dimensionless and take their numerical calculations. The weight coefficients, proportional coefficients and other coefficients in the formulas are set to a result value obtained by quantifying each parameter. The size of the weight coefficient and the proportional coefficient can be determined as long as it does not affect the proportional relationship between the parameter and the result value.
[0027] 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: 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 the real-time memory resource data and the historical memory resource data, and to obtain the computer's real-time memory consumption index 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.
[0028] Embodiment three: Figure 4 The following is a schematic diagram of the structure of a computer device, such as Figure 4 As shown, the computer device may include: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus. The processor may call the logic instructions in the memory to execute a computer resource management method based on artificial intelligence, the method comprising: obtaining the real-time memory resource data of the application program running in the computer and the 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 the 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 the application abnormality data of the application program, and then detecting the abnormal type of the application program through the application normal data and the application abnormality data, and performing corresponding management according to the abnormal type of the application program.
[0029] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0030] 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, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute an artificial intelligence-based computer resource management method provided by the above methods, the method including: obtaining real-time memory resource data of applications running in the computer and historical memory resource data of the computer; 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 the computer's real-time memory consumption index through detection and analysis; detecting and analyzing the real-time memory consumption of each application in the computer based on the real-time total memory consumption index; obtaining application exception data of the application, and then detecting the exception type of the application through the application normal data and the application exception data, and performing corresponding management according to the exception type of the application.
[0031] On the other hand, the present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the above-mentioned artificial intelligence-based computer resource management method, the method comprising: obtaining real-time memory resource data of applications running in the computer and historical memory resource data of the computer; 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 the computer's real-time memory consumption index through the detection and analysis; performing detection and analysis on the real-time memory consumption of each application in the computer based on the real-time total memory consumption index; obtaining application exception data of the application, and then detecting the exception type of the application through the application normal data and the application exception data, and performing corresponding management according to the exception type of the application.
[0032] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0033] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for 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.
[0034] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions 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 an application program running in a computer and historical memory resource data 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 the computer's real-time memory consumption index through the detection and analysis; 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 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 running in the computer; The historical memory resource data includes the historical collection time when the historical memory usage of the computer is collected and the historical memory usage of the computer.
3. The computer resource management method based on artificial intelligence according to claim 2, 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.
4. The computer resource management method based on artificial intelligence according to claim 3, characterized in that: 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.
5. The computer resource management method based on artificial intelligence according to claim 4, 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.
6. The computer resource management method based on artificial intelligence according to claim 5, 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.
7. The computer resource management method based on artificial intelligence according to claim 6, 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.
8. The computer resource management method based on artificial intelligence according to claim 7, 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.
9. 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 8, 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 the real-time memory resource data and the historical memory resource data, and to obtain the computer's real-time memory consumption index 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.
10. 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 8 is implemented.
Citation Information
Patent Citations
Memory resource processing method and device, electronic equipment and storage medium
CN114327867A
Method and system for abnormal alarm based on network and memory state data
CN117472702A
Abnormity warning method and system based on operation state data correlation
CN117749486A
Memory management method and system, desktop computer and computer storage medium
CN118312320A
Resource management device, resource management method, and resource management program
JP2015121964A
Cited By
Network security situation contrastive analysis method and device based on artificial intelligence, and medium
CN121000477A