Intelligent data maintenance method based on multi-dimensional resource monitoring
By employing multi-dimensional resource monitoring and automatic recovery mechanisms, the system instability caused by single-resource monitoring in existing technologies is resolved, achieving high system stability and data security, making it suitable for production and service sectors.
Patent Information
- Application Number
- CN202511583233.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-31
- Publication Date
- 2026-01-23
AI Technical Summary
Existing monitoring methods focus only on a single resource, making it difficult to assess the overall system status. Furthermore, they cannot automatically recover when anomalies are detected, leading to system interruptions or data loss.
This system provides multi-dimensional resource monitoring, including comprehensive monitoring of CPU, memory, disk, and database status, and automatically attempts to recover when problems are detected. It uses a Python 3.x environment, the psutil and pymysql packages, and configures the config.json file to achieve customized monitoring. It uses psutil to obtain system resource status and pymysql to obtain database status, and automatically handles exceptions.
It improves system stability and data security, reduces downtime risk, lowers operation and maintenance costs, and is suitable for production and service fields with high stability requirements.
Smart Images

Figure FT_1 
Figure FT_2
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer system monitoring and data maintenance technology, and in particular to an intelligent data maintenance method based on multi-dimensional resource monitoring. Background Technology
[0002] The significance of modern enterprise information systems lies in the centralized processing of massive amounts of data. The interplay of various systems is essential for maintaining the stable operation of the enterprise information system. Such a large volume of data and systems may be hosted on multiple servers and application machines. If any of these computers malfunctions, it could lead to system crashes, and if not handled promptly, could result in losses for the enterprise.
[0003] Existing monitoring methods typically focus on a single resource, either the database or system resources. Information systems are diverse, each relying on different system resources and environments. Simple database and system resource monitoring is insufficient to assess the overall system status. Furthermore, existing methods often fail to automatically attempt recovery when process anomalies are detected, leading to system interruptions or data loss. Therefore, a method is needed that can monitor system resources from multiple dimensions and possess intelligent maintenance capabilities. Summary of the Invention
[0004] To address the aforementioned technical problems, this invention provides a configurable, multi-dimensional resource monitoring intelligent data maintenance method. By comprehensively monitoring system resources (including CPU, memory, disk, etc.), process status, and database status, and automatically attempting recovery when problems are detected, the method improves system stability and data security.
[0005] To achieve the above objectives, the technical solution adopted by this invention is as follows: an intelligent data maintenance method based on multi-dimensional resource monitoring, comprising a main server, the main server including an interface for receiving monitoring information transmitted from several computers; installing a Python 3.x environment and installing the psutil, requests, and pymysql packages on the computers to be monitored; creating a configuration file config.json in the directory where the pymysql package is located, and modifying the config.json file to configure the program processes, drive letters, and database connection information to be monitored in JSON format, and filling in the main server interface information for receiving data; so as to meet the customized monitoring needs of different computers and different programs. Specifically, it includes the following steps: Step 1: Deploy the server-side and application-side config.json file configurations; Step 2: Obtain the status of the specified database; Step 3: Obtain the running information and status of the specified process on the computer; Step 4: Obtain the computer system status; Step 5: Configurable to determine process running information and restart, close, or open corresponding abnormal processes; Step 6: Integrate the acquired data into a data structure, and report the data to the main server in JSON format from the relevant interface and store it; Step 7: Re-execute the monitoring steps 1-6 according to the set cycle.
[0006] Furthermore, in step 1, the server installs the system database and corresponding visual interface services; the application installs the Python 3.x environment and the psutil, requests, and pymysql packages; a configuration file config.json is created in the directory where the pymysql package is located, and the config.json file is modified to configure the program processes to be monitored, disk signs, database connection information in JSON format, and the main server interface information for receiving data is filled in. The server receives information transmitted from multiple application clients.
[0007] Furthermore, step 2 uses the config.json file configured in step 1 to execute SQL statements to determine the status of a specified table or whether the data in the table is abnormal.
[0008] Furthermore, step 3 uses the config.json file configured in step 1 to find the status of the monitored software process and the computer resource utilization index to determine whether the software is running normally.
[0009] Furthermore, if the program process is found to have closed abnormally, it will automatically restart and report the incident to the server.
[0010] Furthermore, when step 3 detects abnormal system resource usage, the program automatically queries the program or process causing the abnormality and reports the abnormal data to the server, facilitating timely detection and problem localization by the administrator. System status data includes memory usage; if the remaining memory is insufficient to meet a set threshold, memory will be cleared.
[0011] Furthermore, step 4 involves using a program to collect CPU, memory, disk, and network data from the monitored computer to determine its operating status and environment.
[0012] Overall, the present invention has the following benefits: The present invention proposes an intelligent data maintenance method based on multi-dimensional resource monitoring. Through multi-dimensional real-time monitoring and anomaly handling mechanisms, it ensures the stable operation of the computer, reduces the losses caused to users by downtime or system crashes, and improves the stability of the system and data security.
[0013] This method can be triggered by Windows scheduled tasks to efficiently monitor key indicators such as system resource status, process status, and database status, and record the monitoring data to the database in real time for easy subsequent analysis and tracing.
[0014] This method, through configurable design, automatic anomaly handling and alarms, persistent data storage, and automated execution based on Windows scheduled tasks, can efficiently monitor key indicators such as system resource status, process status, and database status, and record monitoring data to the database in real time for easy subsequent analysis and traceability.
[0015] These features enable users to effectively improve the stability of computer operation, reduce maintenance costs, and reduce the risk of business interruption due to machine failures. They are particularly suitable for production and service industries with high requirements for system stability.
[0016] By configuring JSON format and interfaces, customized monitoring needs for different computers and programs can be met, enabling unified management of multiple computers and saving time and manpower costs. Attached Figure Description
[0017] Figure 1 This is a flowchart illustrating the deployment process of the intelligent data maintenance method based on multi-dimensional resource monitoring, according to an embodiment of the present invention.
[0018] Figure 2 This is a flowchart illustrating the operation of the intelligent data maintenance method based on multi-dimensional resource monitoring, according to an embodiment of the present invention. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific examples described herein are merely illustrative and not intended to limit the scope of the invention.
[0020] like Figure 1 The overall process shown first involves selecting a master server, which is used to receive monitoring information transmitted from various computer programs and to set up interfaces to process this data.
[0021] Install a Python 3.x environment on the application computer whose status needs to be monitored, and install the psutil, requests, and pymysql packages (pip). On the application computer whose status needs to be monitored, set up config.json and program files, and modify the config.json file to configure the program processes, drive letters, database connection information to be monitored in JSON format, and fill in the main server interface information for receiving data. The server receives information transmitted from multiple application terminals.
[0022] Configure the monitored program processes, drive letters, and database connection information in JSON format, and fill in the main server interface information for receiving data; this allows for customized monitoring of different computers and programs. After configuration, test the program to check for any error messages. Finally, deploy it to a scheduled task, making sure to select pythonw.exe as the startup program.
[0023] like Figure 2 As shown, the flowchart of this embodiment is as follows. Each time the scheduled task starts, it reads the above JSON configuration; collects the current machine status; executes a database query; POSTs the result to the interface specified by the URL; and then exits.
[0024] The program automatically searches for relevant processes, databases, system status, and other related information using the config file. Get system status monitoring: Get system resource status, including CPU usage, memory usage and disk usage, by calling the psutil library; if the remaining memory is insufficient to meet the set threshold, clean up the memory.
[0025] Database status monitoring is achieved by connecting to the database and executing preset SQL queries to obtain key database status information, primarily checking whether the relevant software is writing data into the database correctly. Check the status of the target process, including whether the process is alive, its CPU and memory usage; if the process is not running, attempt to start it automatically. The system status, process status, and database status are integrated into a single data structure and reported in JSON format to a designated server (data is passed in from the relevant interface). Monitoring data is also recorded in the database in real time for easy analysis and traceability.
[0026] The above monitoring steps will be re-executed according to the set cycle.
[0027] The above embodiments are only for illustrating the operation process of the present invention and should not be used to limit the scope of protection of the present invention. Any modifications made to the technical solution based on the technical concept proposed in the present invention shall fall within the scope of protection of the present invention.
Claims
1. An intelligent data maintenance method based on multi-dimensional resource monitoring, characterized in that: Step 1: Deploy the server-side and application-side config.json file configurations; Step 2: Obtain the status of the specified database; Step 3: Obtain the running information and status of the specified process on the computer; Step 4: Obtain the computer system status; Step 5: Configurable to determine process running information and restart, close, or open corresponding abnormal processes; Step 6: Integrate the acquired data into a data structure, and report the data to the main server in JSON format from the relevant interface and store it; Step 7: Re-execute the monitoring steps 1-6 according to the set cycle.
2. The intelligent data maintenance method based on multi-dimensional resource monitoring according to claim 1, characterized in that: In step 1, the server installs the system database and the corresponding visual interface service; the application installs the Python 3.x environment and the psutil, requests, and pymysql packages; a configuration file config.json is created in the directory where the pymysql package is located, and the config.json file is modified to configure the program processes to be monitored, disk letters, database connection information in JSON format, and the main server interface information for receiving data is filled in. The server receives information transmitted from multiple application clients.
3. The intelligent data maintenance method based on multi-dimensional resource monitoring according to claim 1, characterized in that: Step 2 uses the config.json file configured in Step 1 to execute SQL statements to determine the status of a specified table or whether the data in the table is abnormal.
4. The intelligent data maintenance method based on multi-dimensional resource monitoring according to claim 1, characterized in that: Step 3 uses the config.json file configured in Step 1 to find the status of the monitored software process and the computer resource utilization indicators to determine whether the software is running normally.
5. The intelligent data maintenance method based on multi-dimensional resource monitoring according to claim 4, characterized in that: If the program process is found to have closed abnormally, it will automatically restart and report to the server.
6. The intelligent data maintenance method based on multi-dimensional resource monitoring according to claim 4, characterized in that: When step 3 detects abnormal system resource usage, the program automatically queries the program or process that caused the abnormality and reports the abnormal data to the server.
7. The intelligent data maintenance method based on multi-dimensional resource monitoring according to claim 1, characterized in that: Step 4: Collect CPU, memory, disk, and network data of the monitored computer through the program to determine the operating status and environment of the computer under test.