A server cluster anomaly detection method
Through the processing and fusion of server cluster logs and hardware performance data, anomaly detectors and predictors are trained, which solves the technical problem that traditional methods cannot detect and predict in real time, realizes real-time anomaly detection and prediction for large-scale server clusters, and improves improve detection accuracy and adaptability.
Patent Information
- Application Number
- CN202410963800.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-18
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2044-07-18
AI Technical Summary
Traditional server cluster anomaly detection methods are difficult to cope with large-scale, dynamically changing environments, cannot detect the correlation between stand-alone scenarios and cluster scenarios in real time, and cannot dynamically predict anomalies in the next time period.
By collecting and preprocessing server stand-alone and cluster log information, singular value decomposition is performed to reduce dimensionality, and low-dimensional feature vectors are obtained. Combined with hardware performance data, weighted average fusion feature vectors are used to train stand-alone and cluster abnormal event detectors and hardware performance Predictor to implement anomaly detection and prediction.
It realizes real-time anomaly detection and prediction for large-scale server clusters, improves detection accuracy and adaptability, and can dynamically cope with complex cluster environments.
Smart Images

Figure CN118519815B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of server management, and in particular to a server cluster anomaly detection method. Background Art
[0002] In today's cloud computing and distributed system development context, the application of large-scale server clusters has become the core of supporting modern computing needs. However, this complex cluster environment is often accompanied by various potential anomalies and failures, which may lead to system performance degradation, service interruption or data corruption. Therefore, server cluster anomaly detection has become a vital task to ensure system stability and reliability.
[0003] Traditional anomaly detection methods are usually based on thresholds or rules, which are often difficult to cope with large-scale, dynamically changing cluster environments. Moreover, due to the large scale of clusters and the rapid generation of log data, the traditional method of manually adjusting thresholds obviously cannot meet real-time requirements; due to the complexity of server clusters, traditional anomaly detection methods cannot correlate and transmit single-machine scenarios and cluster scenarios, and cannot dynamically predict abnormal situations in the next time period.
[0004] Therefore, a server cluster anomaly detection method is needed to adapt to the complexity and dynamics from a single server to a large-scale server cluster. Summary of the invention
[0005] In order to solve the above technical problems, the present invention provides a server cluster anomaly detection method, which performs server cluster anomaly detection through the following steps:
[0006] Step 1: Collect the server single machine log information and server cluster log information to obtain the single machine log information data set and the cluster log information data set; including the single machine log information data set and the cluster log information data set;
[0007] Step 2: Perform data preprocessing on the single-machine log information dataset and the cluster log information dataset, including removing useless characters, processing noise data, deleting duplicate log items, aligning log times, and standardizing text formats;
[0008] Step 3: Perform singular value decomposition and dimensionality reduction on the log information data set; map the original data to a low-dimensional semantic space through the retained singular values and corresponding singular vectors to obtain the low-dimensional feature vectors corresponding to each log information;
[0009] Step 4: Collect server hardware performance data information and fuse it with the low-dimensional feature vector corresponding to the server single-machine log information in the current period. Use weighted average to set weights according to the importance of different server hardware performance to obtain a single-machine weighted mixed feature vector.
[0010] Step 5: Collect the abnormal event information of the single server and fuse it with the low-dimensional feature vector corresponding to the server cluster log information of the current period. Set the weights by weighted average according to the importance of different servers in the cluster to obtain the cluster weighted mixed feature vector.
[0011] Step 6: Collect the server cluster abnormal event information and the server hardware performance data information of each server in the current period and the next period to obtain the cluster abnormality-single machine performance data set;
[0012] Step 7: A single-machine abnormal event detector is obtained by learning and training the model through the single-machine weighted mixed feature vector; a cluster abnormal event detector is obtained by learning and training the model through the cluster weighted mixed feature vector; a server hardware performance predictor is obtained by learning and training the model through the cluster abnormality-single-machine performance data set;
[0013] Step 8: Collect the server stand-alone log information and server hardware performance data information of each server in the current period, input them into the stand-alone anomaly detector to perform stand-alone anomaly event detection, and obtain the server stand-alone anomaly event information of each server in the current period;
[0014] Step 9: Collect the server single machine abnormal event information and server cluster log information of each server in the current period, input them into the cluster abnormal event detector to perform cluster abnormal event detection, and obtain the server cluster abnormal event information of the current period;
[0015] Step 10: Collect the server cluster abnormal event information and server hardware performance data information of each server in the current period, perform hardware performance prediction through the server hardware performance predictor, and obtain the server hardware performance data information predicted for each server in the next period;
[0016] Step 11: Collect the server hardware performance data information predicted by each server in the next period and the server single machine log information in the current period, input them into the single machine anomaly detector to perform single machine anomaly event detection, and obtain the server single machine anomaly event information predicted by each server in the next period without processing;
[0017] Step 12: Collect the server single machine abnormal event information predicted by each server in the next period and the server cluster log information of the current period, input them into the cluster abnormal event detector for cluster abnormal event detection, and obtain the server cluster abnormal event information predicted in the next period without processing.
[0018] As a further solution, when handling single-server abnormal events: collect the server single-server log information of each server when handling single-server abnormal events, and collect the server hardware performance data information predicted for each server in the next time period; input the single-server abnormal event detector to perform single-server abnormal event detection, and obtain the server single-server abnormal event information predicted for each server in the next time period after handling.
[0019] As a further solution, when handling abnormal events in a server cluster: collect server cluster log information when handling abnormal events in the server cluster, collect server single-machine abnormal event information predicted for each server in the next time period after handling; input into the cluster abnormal event detector to perform cluster abnormal event detection, and obtain the server cluster abnormal event information predicted for the next time period after handling.
[0020] As a further solution, the server stand-alone log information includes stand-alone service type, stand-alone task event, stand-alone operation record and stand-alone error information; wherein, the stand-alone service type includes storage server, computing server, network server, data server and hybrid server.
[0021] As a further solution, the server cluster log information includes cluster service type, cluster task events, cluster operation records and cluster error information; wherein, the cluster service type includes storage service cluster, computing service cluster, network service cluster, data service cluster and hybrid service cluster.
[0022] As a further solution, the server hardware performance data information includes CPU utilization, memory usage, network traffic, GPU occupancy, hard disk storage space and data read and write rates.
[0023] As a further solution, when learning and training the model: the training model is performed through the Fusion model, and the learning rules are set through supervised learning, clustering learning, adversarial network or reinforcement learning.
[0024] Compared with the related art, the server cluster anomaly detection method provided by the present invention has the following beneficial effects:
[0025] The present invention collects log information of a single server and a cluster to form a corresponding data set and preprocesses the data; reduces the dimension of the log information data set by singular value decomposition to obtain a low-dimensional feature vector; collects server hardware performance data and fuses it with the low-dimensional feature vector of the single-machine log, and obtains a single-machine weighted mixed feature vector by weighted average; collects single-machine abnormal event information and fuses it with the low-dimensional feature vector of the cluster log to obtain a cluster weighted mixed feature vector. Through these feature vectors and cluster abnormal-single-machine performance data sets, a single-machine abnormal event detector, a cluster abnormal event detector and a server hardware performance predictor are trained. In the detection process, firstly, the single-machine abnormal event is detected using the single-machine log and hardware performance data, and then the cluster abnormal event is detected in combination with the cluster log information, and the hardware performance data and abnormal event information of the next time period are predicted. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 A server cluster anomaly detection method provided by the present invention is shown in FIG. Figure 1 ;
[0027] Figure 2 A server cluster anomaly detection method provided by the present invention is shown in FIG. Figure 2 . DETAILED DESCRIPTION
[0028] The present invention will be further described below in conjunction with the accompanying drawings and implementation modes.
[0029] like Figure 1 and Figure 2 As shown, a server cluster anomaly detection method is performed through the following steps:
[0030] Step 1: Collect the server single machine log information and server cluster log information to obtain the single machine log information data set and the cluster log information data set; including the single machine log information data set and the cluster log information data set;
[0031] Step 2: Perform data preprocessing on the single-machine log information dataset and the cluster log information dataset, including removing useless characters, processing noise data, deleting duplicate log items, aligning log times, and standardizing text formats;
[0032] Step 3: Perform singular value decomposition and dimensionality reduction on the log information data set; map the original data to a low-dimensional semantic space through the retained singular values and corresponding singular vectors to obtain the low-dimensional feature vectors corresponding to each log information;
[0033] Step 4: Collect server hardware performance data information and fuse it with the low-dimensional feature vector corresponding to the server single-machine log information in the current period. Use weighted average to set weights according to the importance of different server hardware performance to obtain a single-machine weighted mixed feature vector.
[0034] Step 5: Collect the abnormal event information of the single server and fuse it with the low-dimensional feature vector corresponding to the server cluster log information of the current period. Set the weights by weighted average according to the importance of different servers in the cluster to obtain the cluster weighted mixed feature vector.
[0035] Step 6: Collect the server cluster abnormal event information and the server hardware performance data information of each server in the current period and the next period to obtain the cluster abnormality-single machine performance data set;
[0036] Step 7: A single-machine abnormal event detector is obtained by learning and training the model through the single-machine weighted mixed feature vector; a cluster abnormal event detector is obtained by learning and training the model through the cluster weighted mixed feature vector; a server hardware performance predictor is obtained by learning and training the model through the cluster abnormality-single-machine performance data set;
[0037] Step 8: Collect the server stand-alone log information and server hardware performance data information of each server in the current period, input them into the stand-alone anomaly detector to perform stand-alone anomaly event detection, and obtain the server stand-alone anomaly event information of each server in the current period;
[0038] Step 9: Collect the server single machine abnormal event information and server cluster log information of each server in the current period, input them into the cluster abnormal event detector to perform cluster abnormal event detection, and obtain the server cluster abnormal event information of the current period;
[0039] Step 10: Collect the server cluster abnormal event information and server hardware performance data information of each server in the current period, perform hardware performance prediction through the server hardware performance predictor, and obtain the server hardware performance data information predicted for each server in the next period;
[0040] Step 11: Collect the server hardware performance data information predicted by each server in the next period and the server single machine log information in the current period, input them into the single machine anomaly detector to perform single machine anomaly event detection, and obtain the server single machine anomaly event information predicted by each server in the next period without processing;
[0041] Step 12: Collect the server single machine abnormal event information predicted by each server in the next period and the server cluster log information of the current period, input them into the cluster abnormal event detector for cluster abnormal event detection, and obtain the server cluster abnormal event information predicted in the next period without processing.
[0042] It should be noted that: this embodiment takes into account the abnormal impact relationship from a single machine to a cluster, and each step is explained below.
[0043] For step 1: First, the abnormal events of the cluster are developed from the abnormal events of a single machine, and the abnormal events of a single machine can be detected and judged through the log information of the single server; further combined with the server cluster log information, we can detect and judge the abnormal events of the cluster.
[0044] For step 2: basic processing operations, the main task is time alignment to obtain the data relationship between the upper and lower time periods.
[0045] For step 3: We perform singular value decomposition on the preprocessed log data to map the data into a low-dimensional semantic space. This low-dimensional representation helps to retain the main semantic information in the data, thereby reducing the complexity and redundancy of the data, and retains the potential semantic relationships in the semantic space after dimensionality reduction to reveal the intrinsic structure of the data.
[0046] For step 4: in the lower-level server hardware performance data information, some related information of abnormal events is also implicit; therefore, we collect server hardware performance data information and fuse it with the low-dimensional feature vector corresponding to the server single-machine log information in the current period. In addition, the importance of each hardware performance is different for each server (for example, the computing server pays more attention to CPU utilization, and the network server pays more attention to network traffic). We also use weighted average to set weights according to the importance of different hardware performance of the server to obtain a single-machine weighted mixed feature vector.
[0047] For step 5: Similarly, the abnormal events of the cluster are all developed from the abnormal events of a single machine. Therefore, the abnormal event information of the single server is collected and fused with the low-dimensional feature vector corresponding to the server cluster log information of the current period; and different clusters have different service focuses, so the importance of each server is also different. We use weighted average to set the weights according to the importance of different servers in the cluster to obtain the cluster weighted mixed feature vector.
[0048] For step 6: When an abnormal event occurs in the cluster, it will in turn affect the load of each server, which will specifically reflect the impact on the server hardware performance data information; if there are two network servers, one of which stops working, the network load of the other will increase. This impact can be predicted based on the server cluster abnormal event information and server hardware performance data information in the current time period, that is, to obtain the server hardware performance data information of each server in the next time period; therefore, we collect relevant data to build a data set.
[0049] For step 7: We train the corresponding detector and predictor through the collected data information; the detector is for judgment at the current moment; the predictor is for prediction at the next moment; but their essence is the calculation of probability.
[0050] For step 8: first obtain the server stand-alone abnormal event information of each server in the current period;
[0051] For step 9: combined with step 8, from a single machine to a cluster, obtain the abnormal event information of the server cluster in the current period;
[0052] For step 10: we obtain the abnormal event information of the server cluster in the current period, and also know the server hardware performance data information of each server at present, so we can predict the server hardware performance data information of the next period;
[0053] For step 11: If we do not take measures to control anomalies, the server stand-alone log information of the next time period and the current time period can be equivalent; it happens that step 10 predicts the server hardware performance data information of the next time period, and we have built a stand-alone anomaly detector; we can input the stand-alone anomaly detector to detect stand-alone anomaly events, and obtain the server stand-alone anomaly event information predicted for each server in the next time period without processing.
[0054] For step 12: Based on step 11, we combine the server cluster log information of the current period and input it into the cluster abnormal event detector to detect cluster abnormal events, and obtain the server cluster abnormal event information predicted for the next period without processing, so as to evaluate the future abnormal trend.
[0055] As a further solution, when handling single-server abnormal events: collect the server single-server log information of each server when handling single-server abnormal events, and collect the server hardware performance data information predicted for each server in the next time period; input the single-server abnormal event detector to perform single-server abnormal event detection, and obtain the server single-server abnormal event information predicted for each server in the next time period after handling.
[0056] It should be noted that: when we plan to take certain abnormal control measures to deal with the situation, we can obtain (or construct) the server stand-alone log information of each server when the situation is handled, and perform stand-alone abnormal event detection by inputting it into the stand-alone anomaly detector. In this way, we can compare it with the server cluster abnormal event information predicted in the next period when no processing is performed in step 11, so as to evaluate whether the abnormal control measures we have taken on the single machine are effective.
[0057] As a further solution, when handling abnormal events in a server cluster: collect server cluster log information when handling abnormal events in the server cluster, collect server single-machine abnormal event information predicted for each server in the next time period after handling; input into the cluster abnormal event detector to perform cluster abnormal event detection, and obtain the server cluster abnormal event information predicted for the next time period after handling.
[0058] It should be noted that: when handling the abnormal events of a single server, we combine the server cluster log information when handling the abnormal events of the server cluster, and input the cluster abnormal event detector to detect the cluster abnormal events, so that we can obtain the server cluster abnormal event information predicted for the next time period after the processing is made. By comparing it with the server cluster abnormal event information predicted for the next time period when no processing is performed in step 12, we can evaluate whether the abnormal control measures taken by our cluster are effective.
[0059] As a further solution, the server stand-alone log information includes stand-alone service type, stand-alone task event, stand-alone operation record and stand-alone error information; wherein, the stand-alone service type includes storage server, computing server, network server, data server and hybrid server.
[0060] As a further solution, the server cluster log information includes cluster service type, cluster task events, cluster operation records and cluster error information; wherein, the cluster service type includes storage service cluster, computing service cluster, network service cluster, data service cluster and hybrid service cluster.
[0061] As a further solution, the server hardware performance data information includes CPU utilization, memory usage, network traffic, GPU occupancy, hard disk storage space and data read and write rates.
[0062] As a further solution, when learning and training the model: the training model is performed through the Fusion model, and the learning rules are set through supervised learning, clustering learning, adversarial network or reinforcement learning.
[0063] It should be noted that Fusion technology plays a key role in our server cluster anomaly detection solution. By introducing Fusion technology, the semantic information extracted by LSI is organically integrated with real-time performance data. This ensures that anomaly detection is not only based on semantic understanding, but also fully considers real-time performance data, improving the anomaly detection accuracy of the overall system; Among them, LSI (Latent Semantic Indexing) latent semantic indexing; Fusion model: that is, fusion model, a strategy to improve the performance of a single model by combining the prediction results of multiple models. It integrates the outputs of multiple models through specific algorithms, aiming to combine the advantages of different models to achieve better prediction results than a single model.
[0064] The above are only embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A server cluster anomaly detection method, It is characterized in that Perform server cluster anomaly detection through the following steps: Step 1: Collect the server single machine log information and server cluster log information to obtain the single machine log information data set and the cluster log information data set; including the single machine log information data set and the cluster log information data set; Step 2: Perform data preprocessing on the single-machine log information dataset and the cluster log information dataset, including removing useless characters, processing noise data, deleting duplicate log items, aligning log times, and standardizing text formats; Step 3: Perform singular value decomposition and dimensionality reduction on the log information data set; map the original data to a low-dimensional semantic space through the retained singular values and corresponding singular vectors to obtain the low-dimensional feature vectors corresponding to each log information; Step 4: Collect server hardware performance data information and fuse it with the low-dimensional feature vector corresponding to the server single-machine log information in the current period. Set weights according to the importance of different server hardware performances, and use weighted averaging to obtain a single-machine weighted mixed feature vector. Step 5: Collect the abnormal event information of the single server and fuse it with the low-dimensional feature vector corresponding to the server cluster log information of the current period. Set the weight according to the importance of different servers in the cluster, and use the weighted average method to obtain the cluster weighted mixed feature vector; Step 6: Collect the server cluster abnormal event information and the server hardware performance data information of each server in the current period and the next period to obtain the cluster abnormality-single machine performance data set; Step 7: A single-machine abnormal event detector is obtained by learning and training the model through the single-machine weighted mixed feature vector; a cluster abnormal event detector is obtained by learning and training the model through the cluster weighted mixed feature vector; a server hardware performance predictor is obtained by learning and training the model through the cluster abnormality-single-machine performance data set; Step 8: Collect the server stand-alone log information and server hardware performance data information of each server in the current period, input them into the stand-alone anomaly detector to perform stand-alone anomaly event detection, and obtain the server stand-alone anomaly event information of each server in the current period; Step 9: Collect the server single machine abnormal event information and server cluster log information of each server in the current period, input them into the cluster abnormal event detector to perform cluster abnormal event detection, and obtain the server cluster abnormal event information of the current period; Step 10: Collect the server cluster abnormal event information and server hardware performance data information of each server in the current period, perform hardware performance prediction through the server hardware performance predictor, and obtain the server hardware performance data information predicted for each server in the next period; Step 11: Collect the server hardware performance data information predicted by each server in the next period and the server single machine log information in the current period, input them into the single machine anomaly detector to perform single machine anomaly event detection, and obtain the server single machine anomaly event information predicted by each server in the next period without processing; Step 12: Collect the server stand-alone abnormal event information predicted by each server in the next period and the server cluster log information of the current period, input them into the cluster abnormal event detector to perform cluster abnormal event detection, and obtain the server cluster abnormal event information predicted in the next period without processing; When learning and training the model: the training model is performed through the Fusion model, and the learning rules are set through supervised learning, clustering learning, adversarial network or reinforcement learning.
2. A server cluster anomaly detection method according to claim 1, It is characterized in that When handling a single-server abnormal event: collect the server single-server log information of each server when handling the single-server abnormal event, collect the server hardware performance data information predicted for each server in the next time period; input the single-server abnormal event detector to perform single-server abnormal event detection, and obtain the server single-server abnormal event information predicted for each server in the next time period after handling.
3. A server cluster anomaly detection method according to claim 2, It is characterized in that When handling abnormal events in the server cluster: collect server cluster log information when handling abnormal events in the server cluster, and collect abnormal event information of each server predicted in the next period after handling; The cluster abnormal event detector is input to perform cluster abnormal event detection, and the server cluster abnormal event information predicted for the next time period after processing is obtained.
4. A server cluster anomaly detection method according to claim 1, It is characterized in that The server stand-alone log information includes stand-alone service type, stand-alone task event, stand-alone operation record and stand-alone error information; wherein, the stand-alone service type includes storage server, computing server, network server, data server and hybrid server.
5. A server cluster anomaly detection method according to claim 1, It is characterized in that The server cluster log information includes cluster service types, cluster task events, cluster operation records and cluster error information; wherein, the cluster service types include storage service clusters, computing service clusters, network service clusters, data service clusters and hybrid service clusters.
6. A server cluster anomaly detection method according to claim 1, It is characterized in that The server hardware performance data information includes CPU utilization, memory usage, network traffic, GPU occupancy, hard disk storage space and data read and write rates.
