A method, system and computer-readable storage medium for locating the root cause of a fault with the minimum necessary cost based on a cause-effect diagram

Through the minimum cost necessary cause fault root cause location method based on causal graph, the problems in the existing technology that fault root cause location cannot be effectively expressed as a continuous optimization problem and cannot be encapsulated in a unified likelihood function are solved. It realizes the fault root cause location that quickly finds the necessary cause in a complex multi-cause data environment and provides effective fault intervention guidance.

CN118798346BActive Publication Date: 2025-09-23GUANGDONG UNIV OF TECH
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410779047.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-17
Publication Date
2025-09-23
Estimated Expiration
2044-06-17

AI Technical Summary

Technical Problem

Existing technologies fail to effectively formulate the root cause location problem as a continuous optimization problem and fail to encapsulate the method in a unified likelihood function, making it difficult for operation and maintenance personnel to quickly find the root cause of the fault that is a necessary but not sufficient cause, and unable to provide effective intervention guidance.

Method used

A minimum-cost necessary cause fault root cause location method based on causal graph is adopted. The neural network is configured by initializing parameters, and the encoder and decoder are constructed using the training dataset. Data encoding and counterfactual processes are performed to calculate the minimum-cost necessary cause of the system. The value of the necessity probability is adjusted using cost-weighted necessary probability (CPN), and the counterfactual distribution of necessary intervention is generated by autoregression.

Benefits of technology

It realizes the formulation of fault root cause location problem as a continuous optimization problem in a complex multi-cause data environment, provides an end-to-end fault root cause location framework, can quickly find necessary causes and insufficient causes, and provide effective fault intervention guidance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118798346B_ABST
    Figure CN118798346B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, system and computer-readable storage medium for locating the root cause of a fault with the minimum necessary cause based on a causal graph. The method comprises the following steps: initializing parameters to configure a neural network; receiving a causal graph and a corresponding data set, dividing the data set into a test data set and a training data set, and using the test data set to initialize intervention data; using the training data set to construct and train an encoder and a decoder according to a preset method; converting the data in the test data set into masks in batches, splicing them with the test data itself and inputting them into the encoder for encoding to obtain the encoded data; splicing the encoded data with the mask calculated using the intervention data and inputting them into the decoder for a counterfactual process to obtain the counterfactual target result; using the result to calculate the minimum necessary cause of the system according to a preset method. The present invention formulates the search problem as a continuous optimization problem, encapsulates the method in a unified likelihood function, and provides an end-to-end framework for the task.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of fault root cause location, and more specifically, relates to a method, system and computer-readable storage medium for locating the minimum necessary cause of a fault root cause based on a cause-and-effect graph. Background Art

[0002] Identifying the root cause of failures is a critical and challenging task. Outlier detection is crucial in the industrial, medical, and financial sectors. Outliers can be caused by data errors, system failures, operational errors, and other factors, and they can serve as early warning signs of failure. If operations personnel can promptly detect and locate the root causes of these outliers, they can take action before failures occur, avoiding or reducing the resulting losses. For example, in the complex network systems of the modern aviation industry, the cost of system failures is extremely high. A five-hour power outage at Delta Air Lines' operations center resulted in 2,000 flight cancellations and an estimated $150 million in losses. Given the complex dependencies between monitored nodes and the vast amounts of data involved, manual root cause analysis becomes impractical. However, when the purpose of root cause analysis is to initiate action, the root cause should be causally related to the target outlier. Therefore, outlier detection within this causal process has become a particular focus.

[0003] Outlier detection focuses on identifying data points that deviate significantly from normal data patterns. Early work by Knorr et al. provided an explanation for the “exceptionalness” of outliers within a feature subspace. Subsequent work, such as that by Micenkova et al. and Gupta et al., focused on analyzing features associated with outliers to characterize anomalous populations. Although these methods can identify features associated with outliers, these features are not necessarily the cause of the anomalies, as there may be common underlying factors influencing both features and outliers. Recent root cause analysis (RCA) methods by Budhathoki et al. explain anomalous observations at leaf nodes based on a given causal structure of the system and a learned functional causal model (Peter, 2017). These methods work by first detecting anomalous leaves and then leveraging causal structure and counterfactual reasoning to attribute outlier scores to ancestral nodes (Budhathoki et al., 2022). This approach not only helps identify outliers but also reveals the deeper causes behind these anomalies. Recently, Nguyen et al. extended this framework to detect abnormal edges, not just node anomalies, but also considering changes in individual edges and modeling them through Bayesian linear regression, where the noise in the causal edges is represented as the distribution of regression weights (Nguyen, 2024), thereby improving the comprehensiveness of abnormal cause detection. However, the core of fault root cause location is to intervene in the root cause of the fault through operation and maintenance measures to resolve the fault alarm. The root causes derived by most outlier detection methods do not provide good guidance for intervention actions. The reason is that in real-world scenarios, operation and maintenance personnel are more concerned with what to do to resolve the fault alarm than with how the fault occurred. In other words, the purpose of root cause location should be to find necessary causes rather than sufficient causes, but existing root cause location methods focus on finding sufficient causes.

[0004] According to Pearl et al.'s definition of the probability of necessary cause (PN), the PN in a fault scenario can be expressed as: given fault Y and a set of events X, if event X is eliminated, fault Y is also eliminated. The necessary cause is defined as event X that maximizes the PN. However, finding the necessary cause is challenging. Existing methods attempt to extend the definition of PN to accommodate complex real-world environments, such as multi-cause data, but they suffer from simple binary variable assumptions and ignore contextual information in real-world environments. Furthermore, learning the action with the optimal PN remains a problem.

[0005] The prior art invention patent with publication number CN115964211A proposes a root cause location method, apparatus, device and readable medium. The scheme includes: first, for an abnormal target indicator, using the time series data corresponding to the target indicator and the time series data corresponding to the candidate indicators associated with the target indicator to train a linear regression model to obtain the model regression coefficient, so as to screen out possible root cause indicators from the candidate indicators associated with the target indicator according to the model regression coefficient; then, using the attribution analysis method to calculate the attribution score of each possible root cause indicator, so as to determine the root cause indicator from the possible root cause indicators according to the attribution score. This scheme fails to express the search problem as a continuous optimization problem, nor does it encapsulate the method in a unified likelihood function to provide an end-to-end framework for the task. Summary of the Invention

[0006] In order to overcome the problems in the prior art that the search problem cannot be expressed as a continuous optimization problem and the method cannot be encapsulated in a unified likelihood function, the present invention provides an end-to-end framework for the task and provides a method, system and computer-readable storage medium for locating the root cause of a fault with the minimum necessary cost based on a causal graph.

[0007] A first aspect of the present invention provides a method for locating a root cause of a fault with the minimum necessary cost based on a causal graph, comprising the following steps:

[0008] S1: Configure the neural network using initialization parameters; receive a preset scenario causal graph and collect a corresponding data set, divide the data set into a test data set and a training data set, and use the test data set to initialize intervention data;

[0009] S2: Using the training data set to construct and train an encoder and a decoder according to a preset method;

[0010] S3: Convert the data in the test dataset into masks in batches, concatenate them with the data in the test dataset, and input them into the encoder for encoding to obtain the encoded data;

[0011] S4: splicing the encoded data with the mask calculated using the intervention data and inputting the result into a decoder to perform a counterfactual process to obtain a counterfactual target result;

[0012] S5: Calculate the minimum cost necessary factor of the system using the counterfactual target result according to a preset method.

[0013] Furthermore, the initialization parameters in step S1 include: selecting the number of network layers, activation function, number of iterations, data set partitioning ratio and training batch size.

[0014] Furthermore, the steps of training and constructing the encoder and decoder in step S2 include:

[0015] S2.1: Read the training dataset in batches as training input;

[0016] S2.2: Use the loss function to train the encoder encoding process and the decoder reconstruction process;

[0017] S2.3: Determine whether the preset number of iterations has been reached. If not, continue reading the training data set for training. If the preset number of iterations has been reached, end the training.

[0018] Furthermore, the loss function in step S2.2 consists of two parts: the reconstructed mean square error loss and the KL divergence of the latent variables.

[0019] Furthermore, the step of calculating the minimum cost necessary factor of the system in the method in step S5 includes:

[0020] S5.1: Calculate the probability of cost necessity using the counterfactual target result according to a preset formula;

[0021] S5.2: Optimize the probability using a preset gradient descent algorithm and determine whether it converges. If not, it iteratively update the intervention data using the preset gradient descent algorithm and return to S4 to continue execution. If it converges, it outputs the intervention data as the minimum cost necessary factor for the system.

[0022] Furthermore, the formula for calculating the cost necessity probability in step S5.1 is expressed as:

[0023]

[0024] Among them, it consists of two parts: cost function and necessity probability. The cost function is composed of the expert's prior cost coefficient c={c1,c2,c3,…,c n}, intervention vector s={s1,s2,s3,…,s n} and the number of modified variables b, n represents the number of cause variables, the number of modified variables b is equal to the number of non-zero elements in the intervention vector, and the cost function f cost The specific form is:

[0025]

[0026] In the continuous and multivariate case, the necessary probability PN is defined as the counterfactual outcome At the target value y target The specific form of the probability density on the necessity probability PN is:

[0027]

[0028] The probability density function is represented by f(·), Denotes the counterfactual result of the decoder output The mean and variance of Together with the decoder, the cost function and the necessity probability are combined to obtain the formula of cost necessity probability, which is expressed as:

[0029] costPN=f cost (1-PN)

[0030] Furthermore, the gradient descent algorithm in step S5.2 is a continuous least squares algorithm.

[0031] A second aspect of the present invention provides a system for locating the root cause of a fault with the minimum necessary cause based on a causal graph. The system comprises: a memory and a processor. The memory includes a method program for locating the root cause of a fault with the minimum necessary cause based on a causal graph. When the method program for locating the root cause of a fault with the minimum necessary cause based on a causal graph is executed by the processor, the following steps are implemented:

[0032] S1: Configure the neural network using initialization parameters; receive a preset scenario causal graph and collect a corresponding data set, divide the data set into a test data set and a training data set, and use the test data set to initialize intervention data;

[0033] S2: Using the training data set to construct and train an encoder and a decoder according to a preset method;

[0034] S3: Convert the data in the test dataset into masks in batches, concatenate them with the data in the test dataset, and input them into the encoder for encoding to obtain the encoded data;

[0035] S4: splicing the encoded data with the mask calculated using the intervention data and inputting the result into a decoder to perform a counterfactual process to obtain a counterfactual target result;

[0036] S5: Calculate the minimum cost necessary factor of the system using the counterfactual target result according to a preset method.

[0037] Furthermore, the initialization parameters in S1 include: selecting the number of network layers, activation function, number of iterations, data set partitioning ratio and training batch size.

[0038] The third aspect of the present invention provides a computer-readable storage medium, which includes a method program for locating the root cause of a fault with the minimum necessary cause based on a causal graph. When the method program for locating the root cause of a fault with the minimum necessary cause based on a causal graph is executed by a processor, the steps of the method for locating the root cause of a fault with the minimum necessary cause based on a causal graph are implemented.

[0039] Compared with the prior art, the beneficial effects of the technical solution of the present invention are:

[0040] This paper proposes a cost-weighted necessary probability (CPN) that extends the original PN to continuous multi-cause data and formulates contextual information as a cost-weighted function to adjust the PN value. To implement CPN, we incorporate autoregression into the generative model, assuming that a variable is determined by its predecessor variables and its own latent variables. Through point-to-point transformation, we obtain the counterfactual distribution of the necessary intervention.

[0041] The present invention formulates the search problem as a continuous optimization problem, encapsulates the method in a unified likelihood function, and provides an end-to-end framework for the task. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to make the purpose and technical solution of the present invention clearer, the present invention provides the following drawings and descriptions:

[0043] Figure 1 A flowchart of a method for locating the root cause of a fault with the minimum necessary cost based on a cause-and-effect graph provided by an embodiment of the present invention;

[0044] Figure 2 A schematic diagram of the operation of the generation model adopted by the system provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0045] In order to more clearly understand the above-mentioned objects, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that, in the absence of conflict, the embodiments of the present application and the features therein can be combined with each other.

[0046] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the scope of protection of the present invention is not limited to the specific embodiments disclosed below.

[0047] like Figure 1 FIG. 1 is a flowchart illustrating a method for locating the root cause of a fault with the minimum necessary cost based on a cause-and-effect graph according to an embodiment of the present invention. The specific steps are as follows:

[0048] S1: Configure the neural network using initialization parameters; receive a preset scenario causal graph and collect a corresponding data set, divide the data set into a test data set and a training data set, and use the test data set to initialize intervention data;

[0049] More specifically, the initialization parameters in step S1 include: selecting the number of network layers, activation function, number of iterations, dataset partition ratio and training batch size.

[0050] In a specific embodiment, a fully connected neural network consists of 1 input layer, 3 hidden layers, and 1 output layer. The input layer and the output layer are alternately composed of linear layers and nonlinear layers. The nonlinear layer uses ReLU (Rectified Linear Unit) as the activation function. The input layer is a linear layer. The number of iterations is initialized to 0 and 20. The data set is divided into a test data set and a training data set in a ratio of 3:7. The training batch size is 64, and the test data set is initialized as intervention data. A causal graph G = (V, E) is received. The causal graph remains unchanged for the same scenario. V represents a set of variables, and E represents a set of edges between variables. The data set consists of n+1 variables, where the variable set is decomposed into V: = {X, Y} in causal order, where Y is the target variable of interest, and X = {X1, X2, X3, ..., X n} is the set of cause variables, and n is the number of cause variables. According to the causal order, we can further obtain X={A k ,X k ,D k}, where X k represents the kth variable, A k ={X1,…,X k-1} represents X k The preceding variable, X k Affected by these variables, D k ={X k+1 ,…,X n} represents X k The subsequent variables will not affect X k . Corresponding to the variable set X and Y, x={x1,x2,x3,…,x n} and y represent the data instances of the cause variable set and the target variable, a k ={x1,…,x k-1} represents the variable X k The preceding data instance of .

[0051] S2: Using the training data set to construct and train an encoder and a decoder according to a preset method;

[0052] The specific process is:

[0053] S2.1: Read the training dataset in batches as training input;

[0054] S2.2: Use the loss function to train the encoder encoding process and the decoder reconstruction process;

[0055] More specifically, the loss function in step S2.2 consists of two parts: the reconstructed mean square error loss and the KL divergence of the latent variables.

[0056] S2.3: Determine whether the preset number of iterations has been reached. If not, continue reading the training data set for training. If the preset number of iterations has been reached, end the training.

[0057] In a specific embodiment, the training data set is read in batches, and generally the complete data sample is not directly used as input. All data are trained in batches, and one iteration is considered as one training of all data.

[0058] Training the generative model includes the encoding process and the reconstruction process during the decoding process. The encoder outputs the data of the latent variable based on the input data x, y Encoder with F enc (·) indicates that its specific form is:

[0059]

[0060] For the encoding process in the encoder, according to the order in the causal order, the input layer receives the input of the i-th variable in sequence, and the input consists of n-dimensional input m i and 1 dimension x i Spliced ​​together, where m i is a matrix of the same shape as x, except that a i The output layer outputs a matrix with a dimension of 1, which is expressed as The encoding process uses f enc (·) indicates that the specific form is:

[0061]

[0062]

[0063] By looping through this process in the order of the supervisory signal, we can get

[0064] For the reconstruction process in the decoder, such as Figure 2 As shown, the decoder is based on the input data x and the latent variable data output by the encoder Calculate the output of the neural network Decoder with G dec (·) indicates that its specific form is:

[0065]

[0066] In the decoder, the input layer receives the input of the i-th variable in sequence according to the order in the causal order. The input consists of an n-dimensional input m i and 1 dimension Spliced ​​together, where m i is a matrix of the same shape as x, except that a iThe output layer outputs a matrix with a dimension of 1, which is expressed as Decoding process dec (·) indicates that its specific form is:

[0067]

[0068]

[0069] By looping through this process in the order of causal order, we can get

[0070] The gradient descent method is used for training, where the loss function of the neural network is:

[0071]

[0072] The loss function L is composed of the reconstruction error L re The KL divergence L between the standard prior and the approximate posterior of the latent variable KL It consists of two parts, where the reconstruction error is obtained by calculating the MSE loss between the input data and the output data, and the specific form is:

[0073]

[0074] Assuming that the prior of the latent variable is a standard normal distribution, the KL divergence is calculated from the approximate posterior of the latent variable, and the specific form is:

[0075]

[0076] where p(z i ) represents z i The prior, Indicates that given a i ,x i hour The approximate posterior of .

[0077] The ratio of the above two losses is adjusted by the hyperparameter w, and the specific expression of the loss function is:

[0078] L=L re +L KL w

[0079] S3: Convert the data in the test dataset into masks in batches, splice them with the data in the test dataset itself, and input them into the encoder for encoding to obtain the encoded data

[0080] S4: splicing the encoded data with the mask calculated using the intervention data and inputting the result into a decoder to perform a counterfactual process to obtain a counterfactual target result;

[0081] In a specific embodiment, a fault maintenance scenario may include variables such as system uptime percentage, CPU utilization, memory utilization, network latency, and service response time. These variables are arranged in causal order, i.e., X1 = system uptime percentage, X2 = CPU utilization, X3 = memory utilization, X4 = network latency, and Y = service response time. The input data is converted into a mask, concatenated with the original data, and then fed into the decoder. The mask is initialized to all zeros, and the corresponding preceding variable position is the data corresponding to the preceding variable. For example, in the above scenario, the input data has five dimensions, of which the cause variable has four dimensions. Assuming a training batch size of 64, the mask for each dimension is a 64×4 two-dimensional tensor composed of the preceding variable data of the variable. For memory utilization (X3), the preceding variables are A3 = {system uptime percentage (X1), CPU utilization (X2)}. Therefore, the mask for each sample of memory utilization (X3) is m3 = [x1, x2, 0, 0]. Similarly, each variable needs to generate a mask and then input it into the encoder. The mask of each sample corresponding to the system uptime percentage (X1) is m1 = [0, 0, 0, 0], and the mask of each sample corresponding to the service response time (Y) is m y =[x1,x2,x3,x4]. These masks are concatenated with the data itself to form the encoder input. For example, the system uptime percentage (X1) corresponds to the input of each sample as [0,0,0,0,x1], the memory usage (X3) corresponds to the input of each sample as [x1,x2,0,0,x3], and the service response time (Y) corresponds to the input of each sample as [x1,x2,x3,x4,y].

[0082] Then the counterfactual process is performed, inputting the encoder's output data The mask generated by the intervention data is passed to the decoder to calculate the intervention vector and perform counterfactual calculations.

[0083] In the decoder, as Figure 2 As shown, according to the order in the causal order, if i is not a non-zero position in the intervention vector s, the input layer receives the i-th input in sequence, and the input consists of n-dimensional inputs and 1 dimension Spliced ​​together, It is an x s The matrix, except The output layer outputs a matrix with a dimension of 1, which is expressed as The specific form is:

[0084]

[0085] If i is a non-zero position in the intervention vector s, it does not need to go through the decoder output, Direct use Indicates that the specific form is:

[0086]

[0087] By looping through this process in the order of the supervisory signal, we can get

[0088] Similarly, in the above fault operation and maintenance scenario, the intervention vector is calculated by the difference between the initial input data and the intervention data. For example, the value of a sample in the input data is x = [x1, x2, x3, x4] = [1, 2, 3, 4], and the intervention data sample value is Then the intervention vector is s=xx s =[0,0,2,0]. This means that the memory usage (X3) is intervened, and the intervention step is 2. For the variables system uptime percentage (X1) and CPU usage (X2), since they are not intervened and are the predecessor variables of the intervention variables, the counterfactual result after the decoder is equal to the reconstruction result, that is, Since the memory usage (X3) is intervened, the counterfactual result is equal to the intervention value Since network delay (X4) and service response time (Y) are affected by memory usage (X3), the decoder is needed to obtain the output. The decoder input is composed of the mask and the value of the latent variable. The mask also has 4 dimensions. For example, the mask of network delay (X4) is m4 = [1, 2, 1, 0]. After splicing with the value of the latent variable, the input is The counterfactual result is output by the decoder. The mask and counterfactual value of the service response time (Y) need to know the counterfactual result of the network delay (X4) before they can be calculated. The input is represented as Output counterfactual target results

[0089] S5: Calculate the minimum cost necessary factor of the system using the counterfactual target result according to a preset method.

[0090] The specific process is:

[0091] S5.1: Calculate the probability of cost necessity using the counterfactual target result according to a preset formula;

[0092] It should be noted that the formula for calculating the cost necessity probability in step S5.1 is expressed as:

[0093]

[0094] Among them, it consists of two parts: cost function and necessity probability. The cost function is composed of the expert's prior cost coefficient c={c1,c2,c3,…,c n}, intervention vector s={s1,s2,s3,…,s n} and the number of modified variables b, n represents the number of cause variables, the number of modified variables b is equal to the number of non-zero elements in the intervention vector, and the cost function f cost The specific form is:

[0095]

[0096] In the continuous and multivariate case, the necessary probability PN is defined as the counterfactual outcome At the target value y target The specific form of the probability density on the necessity probability PN is:

[0097]

[0098] The probability density function is represented by f(·), Denotes the counterfactual result of the decoder output The mean and variance of Together with the decoder, the cost function and the necessity probability are combined to obtain the formula of cost necessity probability, which is expressed as:

[0099] costPN=f cost (1-PN)

[0100] The optimization function is expressed as:

[0101]

[0102] S5.2: Optimize the probability using a preset gradient descent algorithm and determine whether it converges. If not, it iteratively update the intervention data using the preset gradient descent algorithm and return to S4 to continue execution. If it converges, it outputs the intervention data as the minimum cost necessary factor for the system.

[0103] More specifically, the gradient descent algorithm in step S5.2 is a continuous least squares algorithm.

[0104] In a specific embodiment, the optimized x s Output, by taking the difference with x, we can get the intervention vector s. The variables corresponding to the non-zero elements in the intervention vector represent the variables in order to achieve the target value y. target , the variable that should be intervened, the element value of the vector represents the step size that needs to be intervened. If the element value is 0, it means that no intervention is required. The intervention data is output, which is represented by the minimum cost necessary factor obtained by the system.

[0105] A second aspect of the present invention provides a system for locating the root cause of a fault with the minimum necessary cause based on a causal graph. The system comprises: a memory and a processor. The memory includes a method program for locating the root cause of a fault with the minimum necessary cause based on a causal graph. When the method program for locating the root cause of a fault with the minimum necessary cause based on a causal graph is executed by the processor, the following steps are implemented:

[0106] S1: Configure the neural network using initialization parameters; receive a preset scenario causal graph and collect a corresponding data set, divide the data set into a test data set and a training data set, and use the test data set to initialize intervention data;

[0107] S2: Using the training data set to construct and train an encoder and a decoder according to a preset method;

[0108] S3: Convert the data in the test dataset into masks in batches, concatenate them with the data in the test dataset, and input them into the encoder for encoding to obtain the encoded data;

[0109] S4: splicing the encoded data with the mask calculated using the intervention data and inputting the result into a decoder to perform a counterfactual process to obtain a counterfactual target result;

[0110] S5: Calculate the minimum cost necessary factor of the system using the counterfactual target result according to a preset method.

[0111] More specifically, the initialization parameters in S1 include: selecting the number of network layers, activation function, number of iterations, dataset partitioning ratio, and training batch size.

[0112] The third aspect of the present invention provides a computer-readable storage medium, which includes a method program for locating the root cause of a fault with the minimum necessary cause based on a causal graph. When the method program for locating the root cause of a fault with the minimum necessary cause based on a causal graph is executed by a processor, the steps of the method for locating the root cause of a fault with the minimum necessary cause based on a causal graph are implemented.

[0113] Obviously, the above embodiments of the present invention are merely examples for the purpose of clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. Those skilled in the art will appreciate that other variations or modifications can be made based on the above description. It is not necessary and impossible to enumerate all embodiments here. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention shall be included within the scope of protection of the claims of the present invention.

Claims

1. A method for locating the root cause of a fault with the minimum necessary cost based on a causal graph, characterized in that: The steps include: S1: Configure the neural network using the initialization parameters; Receive a preset scenario causal graph and collect a corresponding data set, divide the data set into a test data set and a training data set, and use the test data set to initialize intervention data; The data set includes one or more of the following: system uptime percentage, CPU usage, memory usage, network latency, and service response time; S2: Using the training data set to construct and train an encoder and a decoder according to a preset method; S3: Convert the data in the test dataset into masks in batches, concatenate them with the data in the test dataset, and input them into the encoder for encoding to obtain the encoded data; S4: splicing the encoded data with the mask calculated using the intervention data and inputting the result into a decoder to perform a counterfactual process to obtain a counterfactual target result; S5: Calculate the minimum cost necessary factor using the counterfactual target result according to a preset method; The steps of calculating the minimum cost necessary factor include: S5.1: Calculate the probability of cost necessity using the counterfactual target result according to the preset formula, which is expressed as: Among them, it consists of two parts: cost function and necessity probability. The cost function is composed of the expert's prior cost coefficient , intervention vector and the number of variables modified Composition, n represents the number of cause variables, the number of modified variables Equal to the number of non-zero elements in the intervention vector, the cost function The specific form is: In continuous and multivariate cases, the necessity probability Defined as a counterfactual outcome At target value The probability density on The specific form is: The probability density function is expressed as , Denotes the counterfactual result of the decoder output The mean and variance of Together with the decoder, the cost function and the necessity probability are combined to obtain the formula of cost necessity probability, which is expressed as: 。 2. The method for locating the root cause of a fault with the minimum necessary cost based on a causal graph according to claim 1, characterized in that: The initialization parameters in step S1 include: selecting the number of network layers, activation function, number of iterations, dataset partition ratio and training batch size.

3. The method for locating the root cause of a fault with the minimum necessary cost based on a causal graph according to claim 1, characterized in that: The steps of training and constructing the encoder and decoder in step S2 include: S2.1: Read the training dataset in batches as training input; S2.2: Use the loss function to train the encoder encoding process and the decoder reconstruction process; S2.3: Determine whether the preset number of iterations has been reached. If not, continue reading the training data set for training. If the preset number of iterations has been reached, end the training.

4. The method for locating the root cause of a fault with the minimum necessary cost based on a cause-effect graph according to claim 3, characterized in that: The loss function in step S2.2 consists of two parts: the reconstructed mean square error loss and the KL divergence of the latent variables.

5. The method for locating the root cause of a fault with the minimum necessary cost based on a causal graph according to claim 1, characterized in that: The step of calculating the minimum cost necessary factor in step S5 further includes: S5.2: Optimize the cost necessity probability using a preset gradient descent algorithm and determine whether it converges. If not, it iteratively update the intervention data using the preset gradient descent algorithm and return to S4 to continue execution. If it converges, it outputs the intervention data as the minimum cost necessary factor.

6. The method for locating the root cause of a fault with the minimum necessary cost based on a cause-effect graph according to claim 5, characterized in that: The gradient descent algorithm in step S5.2 is a continuous least squares algorithm.

7. A minimum cost necessary cause fault root cause location system based on causal graph, characterized in that: The system includes: a memory and a processor. The memory includes a method program for locating a root cause of a fault with the minimum necessary cause based on a causal graph. When the method program for locating a root cause of a fault with the minimum necessary cause based on a causal graph is executed by the processor, the following steps are implemented: S1: Configure the neural network using initialization parameters; receive a preset scenario causal graph and collect a corresponding data set, divide the data set into a test data set and a training data set, and use the test data set to initialize intervention data; S2: Using the training data set to construct and train an encoder and a decoder according to a preset method; S3: Convert the data in the test dataset into masks in batches, concatenate them with the data in the test dataset, and input them into the encoder for encoding to obtain the encoded data; S4: splicing the encoded data with the mask calculated using the intervention data and inputting the result into a decoder to perform a counterfactual process to obtain a counterfactual target result; S5: Calculate the minimum cost necessary factor using the counterfactual target result according to a preset method; The steps of calculating the minimum cost necessary factor include: S5.1: Calculate the probability of cost necessity using the counterfactual target result according to the preset formula, which is expressed as: Among them, it consists of two parts: cost function and necessity probability. The cost function is composed of the expert's prior cost coefficient , intervention vector and the number of variables modified Composition, n represents the number of cause variables, the number of modified variables Equal to the number of non-zero elements in the intervention vector, the cost function The specific form is: In continuous and multivariate cases, the necessity probability Defined as a counterfactual outcome At target value The probability density on The specific form is: The probability density function is expressed as , Denotes the counterfactual result of the decoder output The mean and variance of Together with the decoder, the cost function and the necessity probability are combined to obtain the formula of cost necessity probability, which is expressed as: 。 8. The minimum cost necessary cause fault root cause location system based on causal graph according to claim 7, characterized in that: The initialization parameters in S1 include: selecting the number of network layers, activation function, number of iterations, dataset partitioning ratio and training batch size.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium includes a method program for locating the root cause of a fault with the minimum necessary cause based on a causal graph. When the method program for locating the root cause of a fault with the minimum necessary cause based on a causal graph is executed by a processor, the steps of a method for locating the root cause of a fault with the minimum necessary cause based on a causal graph as described in any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Root cause positioning method, device and equipment and readable medium

    CN115964211A

  • Fault root cause positioning method and system based on causal reinforcement learning

    CN114666204A

  • Root cause determination method and device and storage medium

    CN116974805A