Database running state monitoring method and device, medium and equipment
By dividing the NoSQL database into multiple clusters, aggregating the operating data of nodes in the cluster, and using the status evaluation model to generate prediction information, the problem that existing monitoring methods cannot deeply analyze the operating status of the database is solved, and in-depth trend analysis and abnormal detection of the NoSQL database are realized, which significantly improves the stability and reliability of the database.
Patent Information
- Application Number
- CN202411663756.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-03-14
AI Technical Summary
Existing NoSQL database monitoring methods cannot deeply analyze the database's operating status, making it difficult to identify performance bottlenecks or optimization opportunities.
By dividing the target database into multiple target database clusters, the operation data of multiple database nodes in the cluster are aggregated to obtain the aggregated data and input it into the trained state evaluation model to generate state prediction information.
In-depth trend analysis and abnormal detection of NoSQL databases have been realized, helping operation and maintenance personnel take measures in advance, reduce system downtime, and improve database stability and reliability.
Smart Images

Figure CN119621467A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of database monitoring, and in particular relates to a method, device, medium and equipment for monitoring the operation status of a database. Background Art
[0002] With the rapid development of Internet applications, the demand for data processing and storage is also growing. Traditional relational databases are gradually unable to meet the needs of large-scale, high-concurrency, and real-time data processing. Therefore, new database technologies such as NoSQL databases and distributed databases have emerged. For example, SSDB (Simple Sorted DataBase), as a high-performance NoSQL database based on key-value pairs, is widely used in scenarios such as real-time data processing, caching, and message queues. With the continuous increase in the number of users and the continuous expansion of the system scale, it is particularly important to monitor the operating status of the NoSQL database efficiently and accurately.
[0003] Existing methods for monitoring NoSQL databases mainly rely on general monitoring tools to monitor single or limited performance indicators, such as CPU usage, memory consumption, etc., compare these performance indicators with indicator thresholds, and issue alarms based on the comparison results. General monitoring tools lack the ability to conduct in-depth analysis of NoSQL databases, cannot identify specific performance bottlenecks or optimization opportunities, and are difficult to meet the specific needs of different application scenarios.
[0004] Therefore, a NoSQL database monitoring method is needed that can deeply analyze the operating status of the database. Summary of the invention
[0005] In view of this, the present invention provides a database operation status monitoring method, device, medium and equipment, the main purpose of which is to solve the problem that the existing NoSQL database monitoring method cannot deeply analyze the operation status of the database.
[0006] According to one aspect of the present application, a method for monitoring database operation status is provided, the method comprising:
[0007] Grouping multiple database nodes in a target database to obtain multiple target database clusters, and obtaining various operating data of each database node in each target database cluster;
[0008] In each of the target database clusters, each type of operating data of multiple database nodes is aggregated to obtain aggregated data of the target database cluster;
[0009] Based on the aggregated data of the target database cluster and the trained state assessment model, state prediction information of the target database cluster is obtained.
[0010] Optionally, the operation data includes CPU usage, memory usage, network traffic data, disk input and output data, data access latency, read and write operation times, and cache hit rate; the aggregating each type of operation data of the multiple database nodes to obtain the aggregated data of the target database cluster includes:
[0011] Based on the collection time of the running data and the preset aggregation time, multiple aggregation time nodes are obtained;
[0012] In each of the aggregation time nodes, based on the aggregation function corresponding to the operation data, each type of operation data of the multiple database nodes is respectively aggregated to obtain multiple types of operation data corresponding to each of the aggregation time nodes;
[0013] In each target database cluster, each type of operation data is arranged in the order of aggregation time nodes to obtain the aggregated data of the target database cluster.
[0014] Optionally, after obtaining the status prediction information of the target database cluster, the database operation status monitoring method further includes:
[0015] If it is determined that the state of the target database cluster is an abnormal state, the state prediction information includes historical operation data similar to the aggregated data of the target database cluster;
[0016] Based on the similar historical operation data, determining a corresponding predicted data threshold that causes the target database cluster to be in a predicted abnormal state;
[0017] An actual data threshold is determined based on the predicted data threshold.
[0018] Optionally, after determining the actual data threshold according to the predicted data threshold, the database operation status monitoring method further includes:
[0019] For each type of running data, compare the running data of the current aggregation time node with the actual data threshold;
[0020] If the operating data of the current aggregation time node is greater than or equal to the actual data threshold, an alarm message indicating that the target database cluster is in an abnormal state at the current aggregation time node is sent to a terminal of an operation and maintenance personnel.
[0021] Optionally, the state prediction information includes health assessment information, trend prediction information and abnormal state prediction information; after obtaining the state prediction information of the target database cluster, the database operation state monitoring method further includes:
[0022] Based on the similar historical operation data, determining a historical database cluster that generates the similar historical operation data;
[0023] In a preset operation and maintenance record table, obtaining the response measures taken when the historical database cluster is in an abnormal state during the period of generating the similar historical operation data;
[0024] The aggregated data, health assessment information, trend prediction information, abnormal state prediction information of the target database cluster and its corresponding historical operation data and countermeasures are sent to the display terminal.
[0025] Optionally, the trained state assessment model is obtained by the following method, including:
[0026] Divide the historical database into multiple historical database clusters, and obtain multiple historical aggregation time nodes based on the collection time of historical operation data of each database node in the historical database cluster and the preset aggregation time;
[0027] In each of the historical aggregation time nodes, each type of historical operation data of multiple database nodes is aggregated respectively to obtain multiple types of historical operation data corresponding to the historical aggregation time node;
[0028] In each historical database cluster, multiple historical operation data corresponding to each historical aggregation time node are arranged in the order of the historical aggregation time nodes to obtain the aggregated data of the historical database cluster;
[0029] Based on the aggregated data of the historical database cluster, a status assessment is performed on the historical database cluster to obtain historical health assessment information, and the corresponding aggregated time nodes and aggregated data when the historical database cluster is in an abnormal state are marked. Based on the health assessment information, aggregated data and abnormal state of the historical database cluster, an initial status assessment model is trained to obtain a trained status assessment model.
[0030] Optionally, the grouping of multiple database nodes in the target database to obtain multiple target database clusters includes:
[0031] Based on the data categories processed by the database nodes and preset grouping rules, multiple database nodes are grouped and processed to obtain multiple target database clusters.
[0032] According to another aspect of the present application, a database operation status monitoring device is provided, comprising:
[0033] An acquisition module is used to group multiple database nodes in a target database to obtain multiple target database clusters, and to obtain various operating data of each database node in each target database cluster;
[0034] An aggregation module, used for aggregating each type of operation data of multiple database nodes in each of the target database clusters to obtain aggregated data of the target database cluster;
[0035] The determination module is used to obtain the state prediction information of the target database cluster based on the aggregated data of the target database cluster and the trained state evaluation model.
[0036] Optionally, the operating data includes CPU usage, memory usage, network traffic data, disk input and output data, data access latency, number of read and write operations, and cache hit rate.
[0037] Optionally, the aggregation module is further used for:
[0038] Based on the collection time of the running data and the preset aggregation time, multiple aggregation time nodes are obtained;
[0039] In each of the aggregation time nodes, based on the aggregation function corresponding to the operation data, each type of operation data of the multiple database nodes is respectively aggregated to obtain multiple types of operation data corresponding to each of the aggregation time nodes;
[0040] In each target database cluster, each type of operation data is arranged in the order of aggregation time nodes to obtain the aggregated data of the target database cluster.
[0041] Optionally, the database operation status monitoring device further includes:
[0042] A threshold determination module is used to, if it is determined that the state of the target database cluster is an abnormal state, then the state prediction information contains historical operation data similar to the aggregated data of the target database cluster; based on the similar historical operation data, determine the corresponding predicted data threshold that causes the target database cluster to be in the predicted abnormal state; and determine the actual data threshold according to the predicted data threshold.
[0043] Optionally, the database operation status monitoring device further includes:
[0044] The real-time alarm module is used to compare the operating data of the current aggregation time node with the actual data threshold for each type of operating data; if the operating data of the current aggregation time node is greater than or equal to the actual data threshold, an alarm message indicating that the target database cluster is in an abnormal state at the current aggregation time node is sent to the terminal of the operation and maintenance personnel.
[0045] Optionally, the status prediction information includes health assessment information, trend prediction information and abnormal status prediction information.
[0046] Optionally, the database operation status monitoring device further includes:
[0047] A display module is used to determine, based on the similar historical operation data, a historical database cluster that generates the similar historical operation data; obtain, from a preset operation and maintenance record table, countermeasures taken when the historical database cluster is in an abnormal state during the period when the historical database cluster generates the similar historical operation data; and send the aggregated data, health assessment information, trend prediction information, abnormal state prediction information of the target database cluster and its corresponding historical operation data and countermeasures to a display terminal.
[0048] Optionally, the database operation status monitoring device further includes:
[0049] A training module is used to divide the historical database into multiple historical database clusters, and obtain multiple historical aggregation time nodes based on the collection time of the historical operation data of each database node in the historical database cluster and the preset aggregation time; in each of the historical aggregation time nodes, each type of historical operation data of the multiple database nodes is aggregated separately to obtain multiple historical operation data corresponding to the historical aggregation time node; in each historical database cluster, the multiple historical operation data corresponding to each historical aggregation time node are arranged in the order of the historical aggregation time nodes to obtain the aggregated data of the historical database cluster; based on the aggregated data of the historical database cluster, the status of the historical database cluster is evaluated to obtain historical health evaluation information, the aggregation time node and aggregation data corresponding to the abnormal state of the historical database cluster are marked, and the initial status evaluation model is trained based on the health evaluation information, aggregation data and abnormal state of the historical database cluster to obtain a trained status evaluation model.
[0050] Optionally, the acquisition module is further used for:
[0051] Based on the data categories processed by the database nodes and preset grouping rules, multiple database nodes are grouped and processed to obtain multiple target database clusters.
[0052] According to another aspect of the present application, a storage medium is provided, in which at least one executable instruction is stored, and the executable instruction enables a processor to execute operations corresponding to the above-mentioned database operation status monitoring method.
[0053] According to another aspect of the present application, a computer device is provided, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus;
[0054] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute operations corresponding to the database operation status monitoring method as described above.
[0055] Through the above technical scheme, the present application provides a database operation status monitoring method, device, medium and equipment, which divides the target database into multiple target database clusters, aggregates the operation data of multiple database nodes in the target database cluster, obtains the aggregated data of the target database cluster, and inputs the aggregated data of the target database into a trained status assessment model, which outputs the status prediction information of the target database. Since the aggregated data can reflect the operation data characteristics of the target database, combined with advanced machine learning training, it can perform in-depth trend analysis and anomaly detection on the target database cluster based on historical operation data and real-time aggregated data, helping operation and maintenance personnel to take measures before problems occur, reducing system downtime, and significantly improving the stability and reliability of the SSDB database.
[0056] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0058] Figure 1 A flowchart of a method for monitoring database operation status provided by an embodiment of the present application is shown;
[0059] Figure 2 Another flow chart of a method for monitoring database operation status provided by an embodiment of the present application is shown;
[0060] Figure 3 Another flow chart of a method for monitoring database operation status provided by an embodiment of the present application is shown;
[0061] Figure 4 A block diagram of a database operation status monitoring device provided by an embodiment of the present application is shown;
[0062] Figure 5 A schematic diagram of the structure of a computer device provided in an embodiment of the present application is shown.
[0063] In the figure: 402 - acquisition module; 404 - aggregation module; 406 - determination module; 408 - integration module; 502 - processor; 504 - communication interface; 506 - memory; 508 - communication bus; 510 - program. DETAILED DESCRIPTION
[0064] The present invention will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present invention can be combined with each other without conflict.
[0065] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the specific implementation methods, structures, features and effects of the present invention application are described in detail below in conjunction with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures, or characteristics in one or more embodiments may be combined in any suitable form.
[0066] In view of the problem that the existing NoSQL database monitoring method cannot deeply analyze the operation status of the database, the embodiment of the present application provides a database operation status monitoring method, such as Figure 1 As shown, the method includes:
[0067] 102: Grouping multiple database nodes in the target database to obtain multiple target database clusters, and obtaining various operating data of each database node in each target database cluster;
[0068] 104: In each target database cluster, aggregate each type of operation data of multiple database nodes to obtain aggregated data of the target database cluster;
[0069] 106: Based on the aggregated data of the target database cluster and the trained state evaluation model, obtain state prediction information of the target database cluster.
[0070] In order to solve the limitations of traditional relational databases in processing large-scale data, high concurrent access, unstructured data, etc., NoSQL databases are introduced. SSDB database is a NoSQL database. SSDB database is a key-value storage database based on memory. It uses efficient data structures such as skip lists and hash tables, which makes it have high performance in read and write operations. At the same time, the data in the memory can be written to the disk regularly or in real time to ensure the persistence of the data. It has large data storage capabilities, so SSDB databases have been widely used in many fields. The existing database status monitoring method is to use monitoring tools. Since the monitoring tools need to monitor multiple indicators, they often occupy a large amount of system resources. Especially in high-concurrency scenarios, the monitoring tools themselves may have a negative impact on database performance, and even cause performance bottlenecks, affecting the real-time nature of status detection. Most of the existing monitoring tools provide general data analysis and alarm functions, lack of in-depth analysis of SSDB databases, and it is difficult to identify specific performance bottlenecks or optimization opportunities. Therefore, this application proposes a status monitoring method suitable for SSDB databases.
[0071] Specifically, the target database is an SSDB database, which is a distributed database, that is, the target database includes multiple database nodes, and the database nodes are set on different servers. Based on the data categories processed by the database nodes and preset grouping rules, the multiple database nodes are grouped and processed to obtain multiple target database clusters. For example, the database nodes involving after-sales data are grouped as a database cluster, and the database nodes involving product introductions are grouped as a database cluster.
[0072] Obtain the operating data of the database nodes contained in each database cluster, aggregate the operating data of multiple database nodes in each database cluster, and obtain the aggregated data of each database cluster. The aggregated data can better reflect the operating data characteristics of the database cluster. Train the initial state assessment model based on the historical aggregated data of the historical database cluster to obtain the trained state assessment model, input the aggregated data of the target database into the trained state assessment model, and the trained state assessment model conducts in-depth analysis on the aggregated data of the target database, outputs the state prediction information of the target database, generates performance indicators and health status assessment reports, and predicts performance bottlenecks and failures that may occur in the future.
[0073] The status assessment model integrates machine learning algorithms, which can perform in-depth analysis of historical data, discover potential trends and anomalies, and warn of possible performance bottlenecks or system failures in advance, helping operation and maintenance personnel to take measures before problems occur and reduce system downtime. Operation and maintenance personnel can better control the operation of the system, reduce the frequency of system failures, system downtime and fault repair time, and ensure business continuity, which not only improves the overall operation efficiency of the system, but also reduces maintenance costs. Existing SSDB database monitoring tools can usually only monitor single or limited performance indicators, such as CPU usage or memory consumption. The present invention introduces multi-dimensional monitoring capabilities, which can not only monitor basic system performance indicators (such as CPU, memory, disk I / O, network traffic, etc.), but also monitor SSDB-specific operating indicators, such as data access latency, number of read and write operations, cache hit rate, etc., thereby providing a more comprehensive system status view. This comprehensive monitoring enables operation and maintenance personnel to understand the health of the system in real time, so as to quickly respond to potential problems.
[0074] Since SSDB databases are widely used in distributed environments, the database status monitoring method of this application is applicable to monitoring systems with distributed architectures. The system can coordinate monitoring among multiple SSDB database nodes and analyze and display data in distributed environments, thereby ensuring that unified and accurate monitoring results can still be provided under large-scale distributed deployments.
[0075] The database status monitoring method of the present application includes but is not limited to application scenarios in public services, financial management, digital healthcare, and insurance business.
[0076] Compared with the prior art, the database status monitoring method provided by the present application divides the target database into multiple target database clusters, aggregates the operating data of multiple database nodes in the target database cluster, obtains the aggregated data of the target database cluster, and inputs the aggregated data of the target database into a trained status assessment model, which outputs the status prediction information of the target database. Since the aggregated data can reflect the operating data characteristics of the target database, combined with advanced machine learning training, it can perform in-depth trend analysis and anomaly detection on the target database cluster based on historical operating data and real-time aggregated data, help operation and maintenance personnel take measures before problems occur, reduce system downtime, and significantly improve the stability and reliability of the SSDB database.
[0077] In another embodiment of the present invention, Figure 2 As shown, each type of running data of multiple database nodes is aggregated to obtain the aggregated data of the target database cluster, including:
[0078] 202: obtaining multiple aggregation time nodes based on the collection time of the running data and the preset aggregation time;
[0079] 204: In each aggregation time node, based on the aggregation function corresponding to the operation data, each type of operation data of multiple database nodes is respectively aggregated to obtain multiple types of operation data corresponding to each aggregation time node;
[0080] 206: In each target database cluster, each type of operation data is arranged in the order of aggregation time nodes to obtain the aggregated data of the target database cluster.
[0081] Specifically, an aggregation time node is a time interval node generated by combining multiple adjacent collection times. At each aggregation time node, the operation data is aggregated. Different operation data are aggregated in different ways according to the characteristics of the operation data to improve data accuracy. The historical operation data is sorted in the order of the aggregation time nodes to obtain the aggregated data of the target database cluster.
[0082] In one embodiment, the aggregated data can form a trajectory line of the operating data. The trained state assessment model compares the trajectory line of the aggregated data with the trajectory line of the historical operating data to determine the historical operating data that is similar to the aggregated data, and determines the state and development trend of the target database cluster based on the state of the similar historical operating data.
[0083] In one embodiment, Figure 3 As shown, the database operation status monitoring method also includes:
[0084] 302: If it is determined that the state of the target database cluster is an abnormal state, the state prediction information includes historical operation data similar to the aggregated data of the target database cluster;
[0085] 304: Determine, based on similar historical operation data, a corresponding prediction data threshold that causes the target database cluster to be in a predicted abnormal state;
[0086] 306: Determine an actual data threshold according to the predicted data threshold;
[0087] 308: for each type of operating data, comparing the operating data of the current aggregation time node with the actual data threshold;
[0088] 310: If the operating data of the current aggregation time node is greater than or equal to the actual data threshold, an alarm message indicating that the target database cluster is in an abnormal state at the current aggregation time node is sent to the terminal of the operation and maintenance personnel.
[0089] Specifically, if it is determined that the target database cluster is in an abnormal state at a certain time in the future, and the state prediction information contains historical operating data similar to the aggregated data of the target database cluster, the predicted data threshold corresponding to the time when the target database cluster is in the predicted abnormal state is determined based on the abnormal state and the similar historical operating data, and based on the predicted data threshold and the future time corresponding to the abnormal state, the actual data threshold is modified to a value smaller than the predicted data threshold in a preset time period before the future time, to ensure early alarm when the value is less than the predicted data threshold, and various forms of alarms can be issued, including but not limited to emails, text messages, system notifications, etc.
[0090] In one embodiment, the initial actual data threshold is determined based on practical experience. When it is determined that the target database cluster is in an abnormal state at a certain time in the future, the actual data threshold is modified before this time based on the time of the abnormal state.
[0091] In one embodiment, each type of operating data corresponds to a predicted data threshold and an actual data threshold.
[0092] In one embodiment, the abnormal state may be determined based on one type of operation data, or multiple types of operation data may be combined together to determine the abnormal state.
[0093] Unlike traditional monitoring systems that rely on static thresholds to trigger alarms, this application introduces an adaptive alarm mechanism. The alarm threshold is automatically adjusted according to the actual operating conditions to reduce the incidence of false alarms while ensuring that key anomalies can be captured and processed in a timely manner. This dynamic adjustment capability greatly improves the accuracy and response speed of alarms. This dynamic adjustment capability ensures that operation and maintenance personnel can be notified immediately when critical problems occur, so that they can intervene quickly.
[0094] In one embodiment, the user can set parameters, configure monitoring rules, and view optimization suggestions through the interactive interface. After receiving the user's input signal, the interactive interface performs corresponding processing based on the data information.
[0095] In one embodiment, the state prediction information includes health assessment information, trend prediction information, and abnormal state prediction information; after obtaining the state prediction information of the target database cluster, the database operation state monitoring method further includes:
[0096] Based on similar historical operation data, determine a historical database cluster that generates similar historical operation data;
[0097] In the preset operation and maintenance record table, obtain the response measures taken when the historical database cluster is in an abnormal state during the period of generating similar historical operation data;
[0098] Send the target database cluster's aggregated data, health assessment information, trend prediction information, abnormal state prediction information and its corresponding historical operation data and response measures to the display terminal.
[0099] Specifically, the characteristics of the SSDB database determine that it will have different performance bottlenecks and optimization requirements in different application scenarios. Most existing systems only provide monitoring and alarm functions, and cannot provide optimization suggestions to administrators based on historical data and real-time monitoring results, resulting in system optimization relying more on manual experience and failing to fully utilize data-driven intelligent means.
[0100] The present application proposes that if the state of the target database cluster is determined to be an abnormal state, the state prediction information includes historical operation data similar to the aggregated data of the target database cluster, the historical database cluster and generation time corresponding to the similar historical operation data are determined, and in the preset operation and maintenance record table, the effective response measures taken when the historical database cluster is in an abnormal state corresponding to the similar historical operation data are found, and the abnormal state information and effective response measures are sent to the display terminal. The display terminal can be any display device, so that the operation and maintenance personnel can intuitively understand the state of the database through the display terminal, and the operation and maintenance personnel can quickly grasp the system operation status without in-depth understanding of the technical details, thereby improving work efficiency.
[0101] The health assessment report is an assessment of the health of the database based on aggregated data. The trend analysis information is an analysis of the future state of the database. The abnormal state prediction clearly points out at what time in the future the database may be in an abnormal state, such as a failure or performance bottleneck.
[0102] In one embodiment, the trained state assessment model is obtained by the following method, including:
[0103] According to the data type processed by the database node and the preset grouping rules, multiple database nodes in the historical database are divided into multiple historical database clusters, and the historical operation data of each database node in each historical database cluster is obtained.
[0104] Based on the collection time of the historical operation data of each database node in the historical database cluster and the preset aggregation time, multiple historical aggregation time nodes are obtained;
[0105] At each historical aggregation time node, based on the aggregation function corresponding to the historical operation data, each type of historical operation data of multiple database nodes is aggregated respectively to obtain multiple types of historical operation data corresponding to each historical aggregation time node;
[0106] In each historical database cluster, multiple historical operation data corresponding to each historical aggregation time node are arranged in the order of the historical aggregation time nodes to obtain the aggregated data of the historical database cluster;
[0107] Based on the aggregated data of the historical database cluster, the status of the historical database cluster is evaluated to obtain historical health assessment information, and the corresponding aggregated time nodes and aggregated data when the historical database cluster is in an abnormal state are marked. Based on the health assessment information, aggregated data and abnormal state of the historical marked database cluster, the initial status assessment model is trained to obtain a trained status assessment model.
[0108] Specifically, the historical database can be a database for a variety of application scenarios, including but not limited to public services, financial management, medical services, insurance management, etc. The data of the historical database is distributed and stored on multiple servers, each server is a database node, and each database node processes at least one type of data, such as after-sales service data, order publishing data, etc. Historical operation data includes CPU usage, memory usage, network traffic data, disk input and output data, data access delay, number of read and write operations, and cache hit rate. Through command query, data such as CPU usage, memory usage, network traffic data, disk input and output data, number of read and write operations, and cache hit rate are obtained; the time between the query command and the return command is calculated as the data access delay.
[0109] A historical aggregation time node is a time interval node generated by combining multiple adjacent historical collection times. At each historical aggregation time node, the historical operation data is aggregated to improve the accuracy of the data. The historical operation data is arranged in the order of the historical aggregation time nodes to obtain the aggregated data of the historical database set, forming a data arrangement within a time period, which makes it easier to perform trend forecasting analysis and anomaly detection, thereby improving the status monitoring effect.
[0110] Perform status assessment and abnormal status determination on the historical database cluster; train the initial status assessment model based on the health assessment information, aggregated data, and abnormal status of the historical database cluster to obtain a trained status assessment model; predict real-time data based on the trained status assessment model; conduct in-depth analysis of the target database status, and improve the monitoring accuracy of the database status.
[0111] In one embodiment, log management is optimized, which can not only efficiently record key events and abnormal situations during the operation of the target database, but also support the archiving, compression and auditing functions of log data, ensuring that performance and stability can be maintained in the case of long-term operation, and providing a reliable basis for problem troubleshooting and compliance auditing.
[0112] Furthermore, as a response to the above Figure 1 The implementation of the method shown is as follows Figure 4 As shown, an embodiment of the present invention provides a database operation status monitoring device, comprising:
[0113] The acquisition module 402 is used to group multiple database nodes in the target database to obtain multiple target database clusters, and obtain various operation data of each database node in each target database cluster;
[0114] Aggregation module 404, used to aggregate each type of operation data of multiple database nodes in each target database cluster to obtain aggregated data of the target database cluster;
[0115] The determination module 406 is used to obtain the state prediction information of the target database cluster based on the aggregated data of the target database cluster and the trained state evaluation model.
[0116] Compared with the prior art, the database operation status monitoring device provided by the present application divides the target database into multiple target database clusters, aggregates the operation data of multiple database nodes in the target database cluster, obtains the aggregated data of the target database cluster, and inputs the aggregated data of the target database into a trained status assessment model, which outputs the status prediction information of the target database. Since the aggregated data can reflect the operation data characteristics of the target database, combined with advanced machine learning training, it can perform in-depth trend analysis and anomaly detection on the target database cluster based on historical operation data and real-time aggregated data, help operation and maintenance personnel take measures before problems occur, reduce system downtime, and significantly improve the stability and reliability of the SSDB database.
[0117] In one embodiment, the operation data includes CPU usage, memory usage, network traffic data, disk input and output data, data access latency, read and write operation times, and cache hit rate.
[0118] In one embodiment, the aggregation module is further configured to:
[0119] Based on the collection time of the running data and the preset aggregation time, multiple aggregation time nodes are obtained;
[0120] At each aggregation time node, based on the aggregation function corresponding to the operation data, each type of operation data of multiple database nodes is aggregated respectively to obtain multiple types of operation data corresponding to each aggregation time node;
[0121] In each target database cluster, each type of operation data is arranged in the order of aggregation time nodes to obtain the aggregated data of the target database cluster.
[0122] In one embodiment, the database operation status monitoring device further includes:
[0123] A threshold determination module is used to, if it is determined that the state of the target database cluster is an abnormal state, then the state prediction information contains historical operating data similar to the aggregated data of the target database cluster; based on the similar historical operating data, determine the corresponding predicted data threshold that causes the target database cluster to be in the predicted abnormal state; and determine the actual data threshold based on the predicted data threshold.
[0124] In one embodiment, the database operation status monitoring device further includes:
[0125] The real-time alarm module is used to compare the operating data of the current aggregation time node with the actual data threshold for each type of operating data; if the operating data of the current aggregation time node is greater than or equal to the actual data threshold, an alarm message indicating that the target database cluster is in an abnormal state at the current aggregation time node is sent to the terminal of the operation and maintenance personnel.
[0126] In one embodiment, the status prediction information includes health assessment information, trend prediction information, and abnormal status prediction information.
[0127] In one embodiment, the database operation status monitoring device further includes:
[0128] The display module is used to determine the historical database cluster that generates similar historical operation data based on similar historical operation data; obtain the response measures taken when the historical database cluster is in an abnormal state during the period when the historical database cluster generates similar historical operation data in a preset operation and maintenance record table; and send the aggregated data, health assessment information, trend prediction information, abnormal state prediction information of the target database cluster and its corresponding historical operation data and response measures to the display terminal.
[0129] In one embodiment, the database operation status monitoring device further includes:
[0130] The training module is used to divide the historical database into multiple historical database clusters, and obtain multiple historical aggregation time nodes based on the collection time of the historical operation data of each database node in the historical database cluster and the preset aggregation time; in each historical aggregation time node, each historical operation data of multiple database nodes is aggregated separately to obtain multiple historical operation data corresponding to the historical aggregation time node; in each historical database cluster, the multiple historical operation data corresponding to each historical aggregation time node are arranged in the order of the historical aggregation time nodes to obtain the aggregated data of the historical database cluster; based on the aggregated data of the historical database cluster, the status of the historical database cluster is evaluated to obtain historical health evaluation information, the aggregation time nodes and aggregation data corresponding to the abnormal state of the historical database cluster are marked, and the initial status evaluation model is trained based on the health evaluation information, aggregation data and abnormal state of the historical marked database cluster to obtain the trained status evaluation model.
[0131] In one embodiment, the acquisition module is further used to:
[0132] Based on the data categories processed by the database nodes and preset grouping rules, multiple database nodes are grouped and processed to obtain multiple target database clusters.
[0133] According to an embodiment of the present invention, a storage medium is provided, wherein the storage medium stores at least one executable instruction, and the computer executable instruction can execute the database operation status monitoring method in any of the above method embodiments.
[0134] Figure 5 A schematic diagram of the structure of a computer device provided according to an embodiment of the present invention is shown. The specific embodiment of the present invention does not limit the specific implementation of the computer device.
[0135] like Figure 5 As shown, the computer device may include: a processor (processor) 502 , a communication interface (Communications Interface) 504 , a memory (memory) 506 , and a communication bus 508 .
[0136] The processor 502 , the communication interface 504 , and the memory 506 communicate with each other via a communication bus 508 .
[0137] The communication interface 504 is used to communicate with other devices such as clients or other servers.
[0138] The processor 502 is used to execute the program 510, and specifically can execute the relevant steps in the above-mentioned database operation status monitoring method embodiment.
[0139] Specifically, the program 510 may include program codes, which include computer operation instructions.
[0140] The processor 502 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention. The one or more processors included in the computer device may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.
[0141] The memory 506 is used to store the program 510. The memory 506 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0142] The program 510 may be specifically configured to enable the processor 502 to perform the following operations:
[0143] Grouping multiple database nodes in a target database to obtain multiple target database clusters, and obtaining various operating data of each database node in each target database cluster;
[0144] In each target database cluster, each type of operating data of multiple database nodes is aggregated to obtain aggregated data of the target database cluster;
[0145] Based on the aggregated data of the target database cluster and the trained status assessment model, the status prediction information of the target database cluster is obtained.
[0146] The above embodiments are only exemplary embodiments of the present application and are not intended to limit the present application. The protection scope of the present application is defined by the claims. Those skilled in the art may make various modifications or equivalent substitutions to the present application within the essence and protection scope of the present application, and such modifications or equivalent substitutions shall also be deemed to fall within the protection scope of the present application.
Claims
1. A method for monitoring database operation status, characterized in that: include: Grouping multiple database nodes in a target database to obtain multiple target database clusters, and obtaining various operating data of each database node in each target database cluster; In each of the target database clusters, each type of operating data of multiple database nodes is aggregated to obtain aggregated data of the target database cluster; Based on the aggregated data of the target database cluster and the trained state assessment model, state prediction information of the target database cluster is obtained.
2. The database operation status monitoring method according to claim 1, characterized in that: The operation data includes CPU usage, memory usage, network traffic data, disk input and output data, data access latency, read and write operation times, and cache hit rate; the aggregation processing of each operation data of multiple database nodes to obtain the aggregated data of the target database cluster includes: Based on the collection time of the running data and the preset aggregation time, multiple aggregation time nodes are obtained; In each of the aggregation time nodes, based on the aggregation function corresponding to the operation data, each type of operation data of the multiple database nodes is respectively aggregated to obtain multiple types of operation data corresponding to each of the aggregation time nodes; In each target database cluster, each type of operation data is arranged in the order of aggregation time nodes to obtain the aggregated data of the target database cluster.
3. The database operation status monitoring method according to claim 1, characterized in that: After obtaining the state prediction information of the target database cluster, the database operation state monitoring method further includes: If it is determined that the state of the target database cluster is an abnormal state, the state prediction information includes historical operation data similar to the aggregated data of the target database cluster; Based on the similar historical operation data, determining a corresponding predicted data threshold that causes the target database cluster to be in a predicted abnormal state; An actual data threshold is determined based on the predicted data threshold.
4. The database operation status monitoring method according to claim 3, characterized in that: After determining the actual data threshold according to the predicted data threshold, the database operation status monitoring method further includes: For each type of running data, compare the running data of the current aggregation time node with the actual data threshold; If the operating data of the current aggregation time node is greater than or equal to the actual data threshold, an alarm message indicating that the target database cluster is in an abnormal state at the current aggregation time node is sent to a terminal of an operation and maintenance personnel.
5. The database operation status monitoring method according to claim 3, characterized in that: The state prediction information includes health assessment information, trend prediction information and abnormal state prediction information; after obtaining the state prediction information of the target database cluster, the database operation state monitoring method further includes: Based on the similar historical operation data, determining a historical database cluster that generates the similar historical operation data; In a preset operation and maintenance record table, obtaining the response measures taken when the historical database cluster is in an abnormal state during the period of generating the similar historical operation data; The aggregated data, health assessment information, trend prediction information, abnormal state prediction information of the target database cluster and its corresponding historical operation data and countermeasures are sent to the display terminal.
6. The database operation status monitoring method according to any one of claims 1 to 5, characterized in that: The trained state evaluation model is obtained by the following method, including: The historical database is divided into multiple historical database clusters, and multiple historical aggregation time nodes are obtained based on the collection time of the historical operation data of each database node in the historical database cluster and the preset aggregation time; In each of the historical aggregation time nodes, each type of historical operation data of multiple database nodes is aggregated respectively to obtain multiple types of historical operation data corresponding to the historical aggregation time node; In each historical database cluster, multiple historical operation data corresponding to each historical aggregation time node are arranged in the order of the historical aggregation time nodes to obtain the aggregated data of the historical database cluster; Based on the aggregated data of the historical database cluster, a status assessment is performed on the historical database cluster to obtain historical health assessment information, and the corresponding aggregated time nodes and aggregated data when the historical database cluster is in an abnormal state are marked. Based on the health assessment information, aggregated data and abnormal state of the historical database cluster, an initial status assessment model is trained to obtain a trained status assessment model.
7. The database operation status monitoring method according to any one of claims 1 to 5, characterized in that: The step of grouping multiple database nodes in the target database to obtain multiple target database clusters includes: Based on the data categories processed by the database nodes and preset grouping rules, multiple database nodes are grouped and processed to obtain multiple target database clusters.
8. A database operation status monitoring device, characterized in that: include: An acquisition module is used to group multiple database nodes in a target database to obtain multiple target database clusters, and to obtain various operating data of each database node in each target database cluster; An aggregation module, used for aggregating each type of operation data of multiple database nodes in each of the target database clusters to obtain aggregated data of the target database cluster; The determination module is used to obtain the state prediction information of the target database cluster based on the aggregated data of the target database cluster and the trained state evaluation model.
9. A storage medium, wherein at least one executable instruction is stored in the storage medium, and the executable instruction enables a processor to execute an operation corresponding to the database operation status monitoring method according to any one of claims 1 to 7.
10. A computer device comprising: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform operations corresponding to the database operation status monitoring method according to any one of claims 1-7.
Citation Information
Patent Citations
Cluster state monitoring method and device
CN112115031A
Interface calling monitoring method and device, electronic equipment and storage medium
CN115576775A
Computer system, compute node, and data management method
US20230109600A1
Cited By
Performance bottleneck evaluation method and device for GoldenDB database and medium
CN122261962A
A performance bottleneck evaluation method, device and medium of a GoldenDB database
CN122261962B