A Risk Prediction Method for Chaos Engineering Systems Based on Graph Attention Networks

Through the graph attention network-based method, the self-attention mechanism and graph convolutional network are used to process the topological structure and heterogeneous data of the chaotic engineering system, the problem of failure to effectively utilize topological relationships and integrate heterogeneous data in the existing technology is solved, and high-quality risk prediction and real-time response capabilities are achieved.

CN120197959BActive Publication Date: 2025-08-01NANJING ZHENGFENG INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510689152.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-27
Publication Date
2025-08-01
Estimated Expiration
2045-05-27

AI Technical Summary

Technical Problem

The existing technology fails to fully utilize the topological structure information between system components in the risk prediction of chaos engineering systems, ignores the rich topological relationships in CMDB, is difficult to effectively model the risk propagation mechanism, lacks the ability to integrate heterogeneous data, is highly dependent on artificial feature engineering, and lacks a global perspective, which leads to lack of interpretability and real-time response capabilities for predicted results.

Method used

The graph attention network is adopted to store topological structure information between components, use the self-attention mechanism and graph convolution network to process classified data and digital data, and build a joint learning loss function to realize the fusion of heterogeneous data and model the risk propagation path, reduce the dependence of artificial feature engineering, and improve the quality of feature representation and the reliability of predicted results.

Benefits of technology

It fully utilizes the topological relationship between system components, accurately models the risk propagation path, improves the reliability of feature representation quality and predicted results, meets the real-time requirements of the financial system, and provides an end-to-end risk prediction process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120197959B_ABST
    Figure CN120197959B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for predicting risks of a chaos engineering system based on a graph attention network, belonging to the technology of predicting risks of a chaos engineering system. The method includes: storing topological structure information of interactions between components in the chaos engineering system; respectively using a self-attention mechanism to generate feature representations for categorical data and numerical data, and obtaining an intermediate vector after connection; using a graph convolutional network to aggregate the topological structure information to obtain a final representation of the intermediate vector; using a decoder to reconstruct the final representation of the intermediate vector, and using a classifier to predict the risks of the chaos engineering system; using the trained classifier to predict the system risks. The present invention makes full use of the inherent topological relationship of the system, overcomes the limitation of traditional methods that ignore the complex interactions between components; uses the self-attention mechanism to adaptively assign weights to different features, captures the complex correlations between data, and greatly improves the quality of feature representations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method for predicting risks in a chaos engineering system, specifically a method for predicting risks in a chaos engineering system based on a graph attention network, belonging to the technical field of chaos engineering. Background Art

[0002] In recent years, machine learning technologies represented by deep learning have made breakthrough progress and achieved good results in fields such as image recognition, speech recognition, and natural language processing. The application of deep learning in chaos engineering has also become a research hotspot that people pay attention to, such as automated fault injection, fault path analysis, risk scenario modeling, etc., but its application in system risk prediction is still relatively few. The chaos engineering system simulates various abnormal situations that may occur in the financial system, such as risk scenarios like network latency, hardware failures, and service unavailability, and detects the elasticity and fault tolerance of the financial system in advance through drills.

[0003] Currently, the monitoring of chaos engineering on the market mainly focuses on indicators such as system availability, network latency, fault recovery time, and error rate. The risk prediction of chaos engineering systems mainly relies on traditional statistical methods, rule engine methods, basic machine learning algorithms, and simple deep learning models. Traditional statistical methods construct prediction models through time series analysis and regression analysis; rule engine methods set thresholds based on expert experience to trigger early warnings; machine learning methods such as decision trees and random forests use system indicators as features for risk prediction; simple deep learning models such as RNN and LSTM are used to process system time series data. In addition, many institutions use isolated monitoring systems, and each subsystem is independently deployed with monitoring tools. However, these existing technologies have the following significant defects when dealing with risk prediction in complex financial systems:

[0004] (1) The topological structure information between system components is not fully utilized. Components are often regarded as independent individuals, ignoring the rich topological relationships contained in the Configuration Management Database (CMDB).

[0005] (2) It is difficult to effectively model the propagation mechanism of risks in the system and cannot accurately reflect the cascade failure characteristics.

[0006] (3) The financial system contains various heterogeneous data such as log texts, system indicators, and network traffic, while traditional methods lack the ability to integrate different data sources.

[0007] (4) Traditional machine learning methods highly rely on manual feature engineering, resulting in limited adaptability and scalability.

[0008] (5) Usually only focuses on local component risks, lacks a global perspective, and is difficult to capture the complex non-linear relationships between system components, resulting in insufficient real-time response capabilities, and the prediction results lack sufficient interpretability, making it difficult to provide effective support for decision-makers. Summary of the Invention

[0009] Object of the Invention: Aiming at the above problems, the object of the present invention is to provide a risk prediction method for a chaos engineering system based on a graph attention network.

[0010] Technical Solution: A risk prediction method for a chaos engineering system based on a graph attention network of the present invention includes the following steps:

[0011] Step 1, according to the fault drill result log of the financial system chaos engineering, based on the CMDB topology database, store the topological structure information of the interaction between components in the chaos engineering system;

[0012] Step 2, extract features from the fault drill result log to obtain classification data, and use the system monitoring data as digital data. Respectively use the self-attention mechanism to generate feature representations for the classification data and the digital data, and obtain an intermediate vector after connection;

[0013] Step 3, use the graph convolutional network to aggregate the topological structure information, update the intermediate vector, and obtain the final representation of the intermediate vector;

[0014] Step 4, use the decoder to reconstruct the final representation of the intermediate vector, and use the classifier to predict the risk of the chaos engineering system;

[0015] Step 5, construct a joint learning loss function, and use the joint learning loss function for backpropagation to optimize the decoder and the classifier;

[0016] Step 6, use the trained classifier to predict the system risk.

[0017] Further, Step 2 includes:

[0018] Denote the classification data as and denote the digital data as , and transform the scattered classification data into a continuous low-dimensional vector representation through an embedding technique, where m represents the total number of classifications, n represents the total number of features of the digital data, that is, the number of system monitoring indicators, and d represents the embedding size;

[0019] Apply the self-attention mechanism to the embedded classification data for feature representation, and the formula is:

[0020] ,

[0021] In the formula, respectively represent the query vector, the key vector, and the value vector, is the self-attention function representing the embedded representation of categorical data, is the learned weight matrix, is the bias vector, is the scaling factor;

[0022] After normalizing the numerical data, the self-attention mechanism is applied for feature representation, and the formula is:

[0023] ,

[0024] In the formula, respectively represent the query vector, the key vector, and the value vector, is the self-attention function, is the learned weight matrix, is the bias vector, is the normalized numerical data;

[0025] Connect the feature representations of categorical data and numerical data to construct an intermediate vector , and the formula is:

[0026] ,

[0027] In the formula, represents the concatenation operation;

[0028] Use the softmax function to scale the values of the intermediate vector to the interval [0, 1], and the formula is:

[0029] ,

[0030] In the formula, represents the value of the i-th variable in the intermediate vector C, represents the value of the j-th variable in the intermediate vector C; j is used for the accumulation function, and the range is from 1 to .

[0031] Furthermore, in step 3, the update formula for the intermediate vector is:

[0032] ,

[0033] In the formula, is the intermediate vector after the (l + 1)-th layer of the graph convolutional network, represents the non-linear activation function, is the degree matrix of represents the matrix without normalization, , is the adjacency matrix of the graph convolutional network, represents the identity matrix, is the weight matrix of layer l;

[0034] Define a learning parameter , use the graph convolutional network to aggregate the adjacency matrix and obtain the final intermediate vector. The formula is:

[0035] ,

[0036] Among them, G is the final representation of the intermediate vector.

[0037] Furthermore, step 4 includes:

[0038] The final representation of the intermediate vector is input into the decoder for reconstruction, and the formula for obtaining the reconstructed feature vector is:

[0039] ,

[0040] in, is the weight matrix of the linear transformation, T represents the transpose;

[0041] The original digital data and the intermediate vector are connected as a combination of predicted risk probability and input into the classifier to obtain the prediction result. The formula is:

[0042] ,

[0043] in, is the sigmoid activation function, represents a fully connected layer.

[0044] Furthermore, the joint learning loss function includes the mean square loss and cross entropy loss of the reconstruction task and the classification task. The joint learning loss function is expressed as follows:

[0045] ,

[0046] in, is the weight; Indicates positive motivation, Represents reverse incentive; is the risk prediction probability, which is the output of the classifier after passing through the softmax layer; Represent the original intermediate vector and the reconstructed intermediate vector respectively; represents a set of trainable parameters; is L2 regularization.

[0047] Beneficial effects: Compared with the prior art, the present invention has the following significant advantages:

[0048] 1. Based on the fault drill result log of the financial system chaos engineering and the CMDB topology database, the present invention stores and utilizes the interactive topology structure information between system components, providing a complete data basis for subsequent risk prediction. This method makes full use of the inherent topology relationship of the system, overcoming the limitation of traditional methods that ignore the complex interactions between components;

[0049] 2. By generating the embedded representation of the classification data and applying the self-attention mechanism to process the embedded and digital data, the present invention realizes the effective fusion of heterogeneous data;

[0050] 3. Through the self-attention mechanism, weights can be adaptively assigned to different features, capturing the complex correlations between data, greatly improving the quality of feature representation, and reducing the dependence on manual feature engineering;

[0051] 4. Innovatively introducing the graph convolutional network to connect and update the feature representation enables the model to effectively model the propagation path and influence scope of risks in the system. Through the message passing mechanism, the graph convolutional operation enables each node to aggregate the information of its neighbor nodes, thereby capturing the interactive impacts of components in different scopes and accurately identifying potential systemic risks;

[0052] 5. The present invention uses a decoder to reconstruct the intermediate vector to obtain a better representation of the original data, and at the same time uses a classifier for system risk prediction, which not only improves the depth of understanding of the input data by the classifier, but also enhances the reliability of the prediction results, providing a solid foundation for risk warning;

[0053] 6. By constructing a joint learning loss function applied to the input vector reconstruction and system risk prediction, the present invention realizes multi-objective optimization, can simultaneously focus on data representation learning and risk prediction performance, and achieves a more balanced and comprehensive optimization effect. The joint learning framework continuously learns from new fault drill data and continuously improves the prediction ability;

[0054] 7. Using the trained classifier for system risk prediction realizes an end-to-end process from input data to risk prediction results. Based on the optimized classifier architecture, the present invention can achieve an inference speed of milliseconds, meeting the real-time requirements of the financial system for risk prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Figure 1 is the flow chart of the present invention;

[0056] Figure 2 is the overall working block diagram of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0057] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments.

[0058] Combine Figures 1 to 2 As shown, a method for predicting risks of a chaos engineering system based on a graph attention network according to this embodiment includes the following steps:

[0059] Step 1: Based on the fault rehearsal result log of the financial system chaos engineering and the CMDB topology database, store the topology structure information of the interaction between components in the chaos engineering system.

[0060] Obtain the fault rehearsal result log of the financial system chaos engineering. This fault rehearsal result log usually includes the specific types and parameters of fault injection, the target components and time nodes of injection, the state changes and performance metrics (such as response time, error rate, etc.) of each component of the system during the fault, the call relationship and exception information between components, as well as the fault recovery process and the final rehearsal effect evaluation, etc. Use the CMDB (Configuration Management Database) topology database to store the topology structure information of the interaction between components in the chaos engineering system, where the topology structure information refers to the adjacency matrix between components, and the scenario support is provided by the chaos engineering automated fault injection rehearsal.

[0061] In this example, the topology structure information is represented as a graph data structure, which is composed of nodes and edges, and the graph data structure is stored in the form of an adjacency matrix. If a graph data structure has N nodes, then the adjacency matrix is of, if node n i and node n j are connected by an edge, that is, the two nodes are related, then the value of the n i -th row and the n j -th column of the adjacency matrix will be 1, otherwise it will be 0.

[0062] Step 2: Extract features from the fault rehearsal result log to obtain classification data, use the system monitoring data as digital data, respectively use the self-attention mechanism to generate feature representations for the classification data and the digital data, and obtain an intermediate vector after connection.

[0063] In the fault drill result log, different fault types such as service outage, latency injection, abnormal return, resource exhaustion, etc. correspond to different classification data. Each fault type serves as a category label, indicating whether this type of fault occurred or the specific status of this fault in the drill. For example: {"fault type": [1, 0, 1, 0]}, where each position in the array corresponds to a fault type, 1 indicates that this fault type occurred, and 0 indicates that it did not occur. The positions correspond in sequence to [service outage, latency injection, abnormal return, resource exhaustion]. During the system operation, monitoring data will be generated regularly, mainly including indicators such as CPU usage, memory occupancy, disk read / write speed, network traffic, response time, error rate, number of threads, and system load.

[0064] Further, step 2 includes:

[0065] Denote the classification data as , x em indicating the m-th classification attribute, denote the numerical data as , and transform the scattered classification data into a continuous low-dimensional vector representation , , where represents the embedding matrix, m represents the total number of classifications, n represents the total number of features of the numerical data, that is, the number of system monitoring indicators, and d represents the embedding size;

[0066] Apply the self-attention mechanism to the embedded classification data for feature representation. The formula is:

[0067] ,

[0068] In the formula, represent the query vector, key vector, and value vector respectively, represents the self-attention function of the embedded representation of the classification data, is the learned weight matrix, is the bias vector, is the scaling factor;

[0069] After normalizing the numerical data, apply the self-attention mechanism to perform feature representation. The formula is:

[0070] ,

[0071] In the formula, represent the query vector, key vector, and value vector respectively, represents the self-attention function, is the learned weight matrix, is the bias vector, is the normalized numerical data;

[0072] Concatenate the feature representations of categorical data and the feature representations of numerical data to construct an intermediate vector , the formula is:

[0073] ,

[0074] In the formula, represents the concatenation operation, respectively represent the query vector, key vector, and value vector of the i-th variable;

[0075] Through the above formula, all categorical attributes in the set are concatenated with all numerical attributes in the set to form the intermediate vector C;

[0076] Use the softmax function to scale the values of the intermediate vector to the interval [0, 1], the formula is:

[0077] ,

[0078] In the formula, represents the value of the i-th variable in the intermediate vector C, represents the value of the j-th variable in the intermediate vector C; j is used for the accumulation function, and the range is from 1 to .

[0079] Step 3, use the graph convolutional network to aggregate the topological structure information, update the intermediate vector, and obtain the final representation of the intermediate vector.

[0080] In this example, the system topology structure data is supported by the scenario of the chaos engineering automated fault injection drill, and the graph convolutional network (Graph Convolutional Networks, GCN) is used to aggregate the neighbor information. The graph convolutional network (Graph Convolutional Networks, GCN) is the application of CNN on non-Euclidean data of the graph structure. GCN is an important branch in graph neural networks. GCN is actually a special form of Laplacian smoothing. The main idea of GCN is to take the weighted average of the features of all neighbor nodes including its own node. Nodes with low degrees obtain greater weights, and then the obtained feature vectors are trained through a neural network. In GCN, the update of node features is achieved by continuously aggregating the features of neighbor nodes, which will enhance the similarity of adjacent nodes, thus greatly enhancing the classification ability.

[0081] For a graph structure dataset G, which has N nodes, and each node has its own features. Let the features of these nodes form a A matrix X of size, where D represents the dimension of the hidden state of each node. Additionally, the relationships between the nodes can also be extracted as a relationship matrix A of size, also known as the adjacency matrix. X and A are the input features in the GCN network. X represents the node features, and each node has its own vector representation; the adjacency matrix A represents the graph structure features, that is, the information of the edges between nodes.

[0082] Furthermore, in step 3, the update formula for the intermediate vector is:

[0083] ,

[0084] In the formula, is the intermediate vector after the layer of the graph convolutional network, represents the non-linear activation function; is the degree matrix of, represents the matrix without normalization, , is the adjacency matrix of the graph convolutional network, I represents the identity matrix, is the weight matrix of the l-th layer;

[0085] Define a learning parameter , and use the graph convolutional network to aggregate the adjacency matrix to obtain the final intermediate vector. The formula is:

[0086] ,

[0087] where G is the final representation of the intermediate vector.

[0088] Step 4, use the decoder to reconstruct the final representation of the intermediate vector, and use the classifier to predict the risks of the chaos engineering system.

[0089] Use the decoder to reconstruct the intermediate vector to capture a better representation of the original data. Among them, the decoder includes two fully connected layers.

[0090] The classifier uses a fully connected layer to predict whether there are system risks. Although the intermediate vector can capture semantic information from the original data, it is prone to losing the shallow information in the original data. To make up for the information loss, in this example, the original numerical input and the intermediate vector are concatenated as the combined input for predicting the risk probability.

[0091] Furthermore, step 4 includes:

[0092] Input the final representation of the intermediate vector into the decoder for reconstruction, and the formula for obtaining the reconstructed feature vector is:

[0093] ,

[0094] Among them, is the weight matrix of the linear transformation, and T represents the transpose;

[0095] Connect the original digital data and the intermediate vector as the combination for predicting the risk probability, input it into the classifier, and obtain the prediction result. The formula is:

[0096] ,

[0097] Among them, is the sigmoid activation function, represents the fully connected.

[0098] Step 5: Construct a joint learning loss function, and use the joint learning loss function for backpropagation to optimize the decoder and the classifier.

[0099] Furthermore, the joint learning loss function includes the mean square loss and cross-entropy loss of these two tasks, namely the reconstruction task and the classification task. The joint learning loss function is expressed as follows:

[0100] ,

[0101] Among them, is the weight; represents the forward incentive, represents the reverse incentive; is the risk prediction probability, that is, the output after the classifier passes through the softmax layer; respectively represent the original intermediate vector and the reconstructed intermediate vector; represents the set of trainable parameters; is the L2 regularization.

[0102] Step 6: Use the trained classifier to predict the system risk.

[0103] After optimizing the decoder and the classifier using the loss function in Step 5, the trained classifier can be obtained. After inputting the fault drill result data into the classifier, the classifier will model the risk scenario, and finally generate the risk prediction result of the chaos engineering system. Among them, the fault drill result data includes node features (such as performance indicators, logs, etc.), graph structure (service / component dependency relationship), and labels (whether there is a risk). The specific data comes from the CMDB topology database.

Claims

1. A method for predicting risks of a chaos engineering system based on a graph attention network, characterized in that, It includes the following steps: Step 1: Based on the fault drill result log of the financial system chaos engineering and the CMDB topology database, store the topology structure information of the interaction between components in the chaos engineering system; Step 2: Extract features from the fault drill result log to obtain classification data, and use the monitoring data of the chaos engineering system as digital data. Respectively use the self-attention mechanism to generate feature representations for the classification data and the digital data, and obtain an intermediate vector after connection; among them, the monitoring data includes CPU usage rate, memory occupancy, disk read and write speed, network traffic, response time, error rate, number of threads, and system load; Step 3: Use the graph convolutional network to aggregate the topology structure information and update the intermediate vector to obtain the final representation of the intermediate vector; Step 4: Use the decoder to reconstruct the final representation of the intermediate vector, and use the classifier to predict the risk of the chaos engineering system; Step 5: Construct a joint learning loss function, and use the joint learning loss function for backpropagation to optimize the decoder and the classifier; Step 6: Use the trained classifier to predict the system risk.

2. The risk prediction method of a chaos engineering system based on a graph attention network according to claim 1, characterized in that Step 2 includes: Denote the categorical data as , denote the numerical data as , and transform the scattered categorical data into a continuous low-dimensional vector representation , where m represents the total number of categories, n represents the total number of features of the numerical data, that is, the number of system monitoring indicators, and d represents the embedding size; Apply the self-attention mechanism to the embedded classification data for feature representation, and the formula is: , In the formula, respectively represent the query vector, key vector, and value vector, represents the self-attention function of the embedded representation of the classification data, is the learned weight matrix, is the bias vector, is the scaling factor; After normalizing the digital data, apply the self-attention mechanism for feature representation, and the formula is: , In the formula, respectively represent the query vector, key vector, and value vector, represents the self-attention function, is the learned weight matrix, is the bias vector, is the normalized digital data; Concatenate the feature representation of categorical data and the feature representation of numerical data to construct an intermediate vector , the formula is: , In the formula, represents a connection operation; Use the softmax function to scale the values of the intermediate vector to the interval [0,1], and the formula is: , In the formula, represents the value of the i-th variable in the intermediate vector C, represents the value of the j-th variable in the intermediate vector C; j is used in the accumulation function and ranges from 1 to .

3. A method for predicting risks of a chaos engineering system based on a graph attention network according to claim 2, characterized in that, In Step 3, the update formula of the intermediate vector is: , In the formula, is the intermediate vector after the (l + 1)-th layer of the graph convolutional network, represents the non-linear activation function, is 's degree matrix, represents the matrix without normalization, , is the adjacency matrix of the graph convolutional network, represents the identity matrix, is the weight matrix of the l-th layer; Define a learning parameter , aggregate the adjacency matrix using a graph convolutional network to obtain the final intermediate vector, with the formula: , where G is the final representation of the intermediate vector.

4. A risk prediction method for a chaos engineering system based on a graph attention network according to claim 3, wherein Step 4 includes: Input the final representation of the intermediate vector into the decoder for reconstruction, and the formula for obtaining the reconstructed feature vector is: , Among them, is the weight matrix of the linear transformation, and T represents the transpose; Connect the original digital data and the intermediate vector as a combination for predicting the risk probability, input it into the classifier, and obtain the prediction result, and the formula is: , Among them, is the sigmoid activation function, represents the fully connected layer.

5. A method for predicting risks of a chaos engineering system based on a graph attention network according to claim 4, characterized in that, The joint learning loss function includes the mean square loss and cross-entropy loss of the two tasks of the reconstruction task and the classification task, and the joint learning loss function is expressed as follows: , Among them, is the weight; represents positive incentive, represents negative incentive; is the risk prediction probability, that is, the output after the classifier passes through the softmax layer; respectively represent the original intermediate vector and the reconstructed intermediate vector; represents the set of trainable parameters; is L2 regularization.

Citation Information

Patent Citations

  • Fault drilling method and device based on chaos engineering

    CN113010393A

  • Distributed system risk identification method, device, equipment, medium and program product

    CN114238046A