A fault root cause tracing method and system for application services
By obtaining the input and output variables and monitoring data of the application service and constructing a knowledge graph to trace the root cause of the fault, the problem of inaccurate fault identification in the existing technology is solved, and the accurate tracing of the root cause of the fault is achieved.
Patent Information
- Application Number
- CN202511072365.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-01
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2045-08-01
AI Technical Summary
The root cause tracing process of application service failures in the existing technology cannot effectively and accurately identify failures, and cannot accurately locate the root cause of the failure and the failure propagation path.
By obtaining the input and output variables of the application service, determining the main data space, calculating the target judgment quantity and performing optimization processing, obtaining monitoring data and setting data reference values, building a knowledge database and establishing a knowledge graph, and combining the final fault results to trace the root cause of the fault.
It improves the accuracy and comprehensiveness of fault identification, reduces the masking effect of non-fault features, improves the accuracy of fault tracing, and can effectively avoid the influence of non-root dependent variables.
Smart Images

Figure CN120611327B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of fault root cause tracing, and particularly relates to a fault root cause tracing method and system of application services. BACKGROUND
[0002] With the rapid development of information technology, in recent years, blockchain, as a kind of distributed ledger technology, has received extensive attention. Blockchain technology has wide application prospects in the fields of finance, supply chain, Internet of Things, etc. due to its characteristics of decentralization, data tamper resistance, security, etc. Service call chain, as an important application of blockchain technology, can realize efficient and reliable service collaboration in the blockchain system, improve the scalability and performance of blockchain applications. Service call chain is a technology that combines multiple services in a specific order to realize complex business logic.
[0003] For actual application services, they combine several application services together through service call chain and according to user demand to realize user demand. However, in the actual running process of application services, due to system, application service running and other factors, the application services have faults. In order to facilitate operation and fault tracking of the application, it is necessary to trace the root cause of the fault for quick maintenance. However, the fault root cause tracing process of the application services in the prior art has the following problems: 1. unable to effectively and accurately identify faults; 2. unable to accurately locate the fault root cause and the propagation path of the fault. SUMMARY
[0004] In order to solve the above technical problems, the application provides a fault root cause tracing method and system of application services to solve the technical problems in the prior art.
[0005] In a first aspect, the application provides the following technical solution, a fault root cause tracing method of application services, comprising:
[0006] obtaining input and output variables of the application services, determining a main data space based on the input and output variables;
[0007] calculating a target judgment quantity based on the main data space, optimizing the target judgment quantity to obtain an optimized judgment quantity, and determining a first fault result based on the optimized judgment quantity;
[0008] obtaining monitoring data of the application services and setting a data reference value, determining a second fault result based on the monitoring data and the data reference value;
[0009] Taking the union of the first fault result and the second fault result to obtain a final fault result, constructing a knowledge database and establishing a knowledge graph based on the knowledge database, and determining a fault root cause tracing result based on the final fault result and the knowledge graph.
[0010] Compared with the existing technology, the beneficial effects of the present invention are as follows: the present invention first obtains the input and output variables of the application service, and determines the main data space based on the input and output variables; then calculates the target judgment amount based on the main data space, optimizes the target judgment amount to obtain the optimized judgment amount, and determines the first fault result based on the optimized judgment amount; then obtains the monitoring data of the application service and sets the data reference value, and determines the second fault result based on the monitoring data and the data reference value; then takes the union of the first fault result and the second fault result to obtain the final fault result, constructs a knowledge database and establishes a knowledge graph based on the knowledge database, and determines the root cause tracing result of the fault based on the final fault result and the knowledge graph. By identifying the first fault result, the present invention can effectively enhance the fault feature part and reduce the masking effect of non-fault features, thereby improving the accuracy of fault identification. By identifying the second fault result, it can effectively identify delay anomalies in the application service, improve the comprehensiveness and accuracy of fault identification, and then output the root cause tracing result, which can effectively avoid the influence of non-root variables on fault tracing and improve the accuracy of tracing.
[0011] Preferably, the step of determining the main data space based on the input and output variables includes:
[0012] Convert the input and output variables into matrix form to obtain the first input matrix With the first input matrix :
[0013] ; ;
[0014] Where, 、 Respectively represent Input variables and output variables at the moment, represents a variable order, is the number of sampling points;
[0015] The first input matrix Divided into matrix blocks and determine the second input matrix based on the matrix blocks , the first input matrix The data dimension is expanded to the second input matrix The data dimensions are the same as those of , to obtain the second output matrix :
[0016] ; ;
[0017] wherein, respectively represent the first to the th matrix block;
[0018] constructing an objective function based on the second input matrix , the second output matrix ;
[0019] ;
[0020] ;
[0021] wherein, respectively represent the weight vector of the second input matrix , the second output matrix , is a weight coefficient vector, is a tensor product symbol;
[0022] determining a main data space based on the objective function.
[0023] Preferably, the step of determining a main data space based on the objective function comprises:
[0024] calculating a Lagrange function of the objective function:
[0025] ;
[0026] wherein, is a Lagrange operator;
[0027] taking partial derivative and transformation on the Lagrange function to obtain a solving equation group:
[0028] ;
[0029] wherein, is an equivalent vector;
[0030] solving the equivalent vector in the solving equation group, and calculating an effective additional data space based on the equivalent vector :
[0031] ;
[0032] wherein, is a residual matrix of an output variable;
[0033] based on the effective additional data space determining a main data space :
[0034] ;
[0035] wherein, represents a pivot of an input variable, represents a number of pivots, represents a load vector of an output variable, represents a residual space other than the effective additional data space .
[0036] Preferably, the step of calculating a target judgment quantity based on the main data space, and optimizing the target judgment quantity to obtain an optimized judgment quantity, and determining a first fault result based on the optimized judgment quantity comprises:
[0037] calculating a target judgment quantity based on the main data space :
[0038] ;
[0039] wherein, represents variable data in the main data space, is a conversion matrix, is a T statistic, is a number of variable data;
[0040] judging whether the target judgment quantity exceeds a preset judgment range, if the target judgment quantity exceeds the preset judgment range, taking corresponding variable data as fault data, and sorting the fault data in the main data space to obtain a sorted data group;
[0041] setting a sliding window in the sorted data group, and judging whether a proportion of fault data in the sliding window exceeds a preset proportion, if the proportion exceeds the preset proportion, taking an interval corresponding to the sliding window as a fault interval, and if a data interval between starting data points in adjacent two fault intervals is less than a preset interval, merging the adjacent two fault intervals to obtain a final fault interval;
[0042] obtaining a preset target model and target training data, training the preset target model by using the target training data to obtain a target model, inputting the final fault interval into the target model to output a predicted value corresponding to variable data in the main data space, and calculating a final judgment quantity based on the predicted value . :
[0043] ;
[0044] ;
[0045] ;
[0046] Where, Represents optimized variable data, is the optimization factor, is the final fault interval, is the R-Square coefficient of the target model, is the coefficient threshold, To optimize the weights, To optimize the target judgment corresponding to the variable data;
[0047] If the final judgment If it exceeds the preset judgment range, the corresponding variable data will be used as the final fault data to obtain the first fault result.
[0048] Preferably, the step of determining the second fault result based on the monitoring data and the data reference value includes:
[0049] Calculating a first degree of distribution between the monitoring data and the data reference value:
[0050] , , ;
[0051] Where, 、 Indicates monitoring data With the The first degree of distribution between the data reference values, Respectively represent Data reference value;
[0052] Obtain an application service response status value and a status reference value, and calculate a second distribution degree between the application service response status value and the status reference value :
[0053] , , , ;
[0054] Where, Indicates the state reference value, Represent the first and second state reference values respectively, Respectively represent normal state and abnormal state, application service response state value, state number;
[0055] calculating a joint distribution degree based on the first distribution degree and the second distribution degree
[0056]
[0057] calculating a state confidence degree based on the joint distribution degree
[0058]
[0059] wherein, a sum of joint distribution degrees of all monitoring data matching a reference value, a sum of joint distribution degrees of monitoring data matching a reference value, application service response state value matching a state reference value,
[0060] determining a second fault result based on the state confidence degree
[0061] Preferably, the step of determining a second fault result based on the state confidence degree comprises:
[0062] acquiring an actual monitoring value at a time point, calculating a target confidence degree of the actual monitoring value based on the state confidence degree
[0063]
[0064] calculating a first judgment value and a second judgment value based on the target confidence degree
[0065]
[0066]
[0067]
[0068] wherein, respectively a normal and an abnormal judgment value, respectively are confidence weights of the last time, the current time, respectively are reliability of the confidence of the last time, the current time, respectively are actual monitoring values respectively are target confidence in normal state, abnormal state;
[0069] If the second judgment value is greater than the first judgment value , the corresponding actual monitoring value is a fault, to obtain the second fault result.
[0070] Preferably, the step of constructing a knowledge database and establishing a knowledge graph based on the knowledge database, and determining a fault root cause tracing result based on the final fault result and the knowledge graph comprises:
[0071] Obtain a historical fault database of an application service and a public fault correlation database, and construct a knowledge database based on the historical fault database and the public fault correlation database;
[0072] Knowledge modeling is performed on the knowledge database to obtain knowledge triple information, and a knowledge graph is constructed based on the knowledge triple information;
[0073] Obtain a training data set, calculate the score function value of each variable in the training data set and take the score function value as the score threshold of the variable, and initialize the Bayesian network structure;
[0074] Calculate the Pearson correlation coefficient between variables in the training data set, and determine the parent-child node set for each variable in the training data set based on the Pearson correlation coefficient and the knowledge graph;
[0075] Add a forward directed edge or a reverse directed edge between the variables in the training data set and the nodes in the parent-child node set in sequence to obtain a plurality of candidate network structures;
[0076] Calculate the score function value of each candidate network structure to obtain a score sequence, and take the candidate network structure corresponding to the maximum value in the score function value in the score sequence as the first optimal local structure;
[0077] Adjust the nodes and directed edges in the first optimal local structure to obtain a plurality of new candidate network structures;
[0078] Calculate the score function value of each new candidate network structure to obtain a new score sequence, and take the new candidate network structure corresponding to the maximum value in the score function value in the new score sequence as the second optimal local structure;
[0079] iteratively repeating the determination process of the second optimal local structure until all variables have a corresponding second optimal local structure, to output an optimal Bayesian network structure;
[0080] inputting the final failure result into the optimal Bayesian network structure, outputting a failure propagation path according to the failure probability of a node in the optimal Bayesian network structure, to obtain a failure root cause tracing result.
[0081] In a second aspect, the present application provides the following technical solution, a failure root cause tracing system of an application service, the system comprises:
[0082] a space determination sub-module, configured to acquire input and output variables of the application service, and determine a main data space based on the input and output variables;
[0083] a first failure module, configured to calculate a target judgment quantity based on the main data space, perform optimization processing on the target judgment quantity to obtain an optimized judgment quantity, and determine a first failure result based on the optimized judgment quantity;
[0084] a second failure module, configured to acquire monitoring data of the application service and set a data reference value, and determine a second failure result based on the monitoring data and the data reference value;
[0085] a root cause tracing module, configured to take a union of the first failure result and the second failure result to obtain a final failure result, construct a knowledge database and establish a knowledge graph based on the knowledge database, and determine a failure root cause tracing result based on the final failure result and the knowledge graph.
[0086] In a third aspect, the present application provides the following technical solution, a computer comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the failure root cause tracing method of the application service as described above when executing the computer program.
[0087] In a fourth aspect, the present application provides the following technical solution, a storage medium having a computer program stored thereon, wherein the computer program is executable on a processor to implement the failure root cause tracing method of the application service as described above. BRIEF DESCRIPTION OF DRAWINGS
[0088] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0089] Figure 1A flowchart of a method for tracing the root cause of a fault in an application service provided in the first embodiment of the present invention;
[0090] Figure 2 A structural block diagram of a fault root cause tracing system for an application service provided in the second embodiment of the present invention;
[0091] Figure 3 A schematic diagram of the hardware structure of a computer provided in another embodiment of the present invention.
[0092] The embodiments of the present invention will be further described below with reference to the accompanying drawings. DETAILED DESCRIPTION
[0093] The following describes embodiments of the present invention in detail, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the embodiments of the present invention, and should not be construed as limiting the present invention.
[0094] Example 1
[0095] In the first embodiment of the present invention, Figure 1 As shown, a method for tracing the root cause of an application service failure includes:
[0096] S1. Obtain input and output variables of the application service, and determine the main data space based on the input and output variables;
[0097] Specifically, for a complete application service call chain, there is usually a combination of multiple application services. Therefore, the input and output variables here are mainly the input and output variables of each individual application service, and the main data space here can be understood as a collection space. The purpose of determining the main data space is to reduce the impact of irrelevant data on fault identification.
[0098] Wherein, the step S1 includes:
[0099] S11, converting the input and output variables into matrix form to obtain a first input matrix With the first input matrix :
[0100] ; ;
[0101] Where, 、 Respectively represent Input variables and output variables at the moment, represents a variable order, is the number of sampling points;
[0102] Specifically, the variable order here is specifically an order that can be dynamically adjusted, which can be determined according to the dimension of the variable.
[0103] S12, dividing the first input matrix into matrix blocks, and determining a second input matrix based on the matrix blocks. , and extending the data dimension of the first input matrix to be the same as the data dimension of the second input matrix to obtain a second output matrix
[0104] :
[0105] In the formula, respectively represent the first matrix block.
[0106] S13, constructing an objective function based on the second input matrix and the second output matrix :
[0107]
[0108]
[0109] In the formula, respectively represent the weight vector of the second input matrix and the second output matrix , is a weight coefficient vector, is a tensor product symbol.
[0110] Specifically, the dimensions of here are the same as the dimensions of the input variable and the output variable, respectively.
[0111] S14, determining a main data space based on the objective function;
[0112] The step S14 includes:
[0113] S141, calculating the Lagrange function of the objective function:
[0114]
[0115] In the formula, is a Lagrange operator.
[0116] S142, partial derivation is performed on the Lagrange function Partial derivation and transformation are performed to obtain the solving equation set:
[0117] ;
[0118] In the formula, is an equivalent vector;
[0119] Specifically, the Lagrange multiplier method is used for partial derivation here, in order to simplify the equation set, corresponding transformation operations are performed on the above equation set respectively, and for the equivalent vector, can be equivalent to and Therefore, an equivalent vector is set to facilitate corresponding solving of the solving equation set.
[0120] S143, the equivalent vector in the solving equation set is solved and based on the equivalent vector , the effective additional data space is calculated:
[0121] ;
[0122] In the formula, is a residual matrix of the output variable;
[0123] Specifically, after the above operations, the variables are divided into two spaces, a main data space and a residual data space, but a part of the variables in the residual data space can be divided into the main data space, therefore, by calculating the effective additional data space , the effective additional data space is divided into the main data space.
[0124] S144, the main data space is determined based on the effective additional data space :
[0125] ;
[0126] In the formula, represents a pivot of the input variable, represents the number of pivots, represents a load vector of the output variable, represents a remaining space in the residual space except for the effective additional data space .
[0127] S2, calculate a target judgment quantity based on the main data space, perform optimization processing on the target judgment quantity to obtain an optimized judgment quantity, and determine a first fault result based on the optimized judgment quantity;
[0128] The step S2 comprises:
[0129] S21, calculate a target judgment quantity based on the main data space :
[0130] ;
[0131] In the formula, represents variable data in the main data space, is a conversion matrix, is a T statistic, is the number of variable data;
[0132] Specifically, the target judgment quantity here is actually a statistic.
[0133] S22, determine whether the target judgment quantity exceeds a preset judgment range, if the target judgment quantity exceeds the preset judgment range, the corresponding variable data is taken as fault data, and the fault data in the main data space is sorted to obtain a sorted data group;
[0134] Specifically, the purpose of sorting is to convert the variable data into a one-dimensional array.
[0135] S23, set a sliding window in the sorted data group, and determine whether the proportion of fault data in the sliding window exceeds a preset proportion, if the proportion exceeds the preset proportion, the interval corresponding to the sliding window is taken as a fault interval, if the data interval between the starting data points in adjacent two fault intervals is less than a preset interval, the adjacent two fault intervals are merged to obtain a final fault interval.
[0136] S24, obtain a preset target model and target training data, train the preset target model through the target training data to obtain a target model, input the final fault interval into the target model to output a predicted value corresponding to the variable data in the main data space based on the predicted value , and calculate a final judgment quantity :
[0137] ;
[0138] ;
[0139] ;
[0140] Where, Represents optimized variable data, is the optimization factor, is the final fault interval, is the R-Square coefficient of the target model, is the coefficient threshold, To optimize the weights, To optimize the target judgment corresponding to the variable data;
[0141] Specifically, the target model here is the CNN-LSTM model in the existing technology. In the process of calculating the final judgment value, the data in different intervals are optimized through the optimization factor to avoid the poor prediction value from having a greater impact on the data outside the final fault interval, thereby affecting the fault identification process. At the same time, the optimization weight here is actually a smoothing factor between 0 and 1. For data close to the fault interval, a higher smoothing factor value is given to assign a higher weight value, while data far from the fault interval is assigned a lower weight value, thereby improving the accuracy of fault identification.
[0142] S25, if the final judgment amount If it exceeds the preset judgment range, the corresponding variable data is used as the final fault data to obtain the first fault result;
[0143] Specifically, the first failure result here may be reflected as a failure of the application service and a failure of the corresponding variable.
[0144] S3. Acquire monitoring data of the application service and set a data reference value, and determine a second fault result based on the monitoring data and the data reference value;
[0145] Wherein, the step S3 includes:
[0146] S31. Calculate a first distribution degree between the monitoring data and the data reference value:
[0147] , , ;
[0148] Where, 、 Indicates monitoring data With the The first degree of distribution between the data reference values, Respectively represent Data reference value.
[0149] S32: Obtain an application service response status value and a status reference value, and calculate a second distribution degree between the application service response status value and the status reference value. :
[0150] , , , ;
[0151] Where, Indicates the state reference value, Represent the first and second state reference values respectively, Represents normal state and abnormal state respectively. Indicates the application service response status value. Indicates the number of states;
[0152] Specifically, when When it is 1, it indicates normal state. When it is 2, it indicates an abnormal state.
[0153] S33, calculating a joint distribution degree based on the first distribution degree and the second distribution degree :
[0154] .
[0155] S34, based on the joint distribution degree Calculate state confidence :
[0156] ;
[0157] Where, Indicates that all monitoring data match the reference value The sum of the joint distribution degrees of Indicates monitoring data Matching reference value , application service response status value Matching status reference value The sum of the joint distribution degrees of ;
[0158] Specifically, .
[0159] S35, based on the state confidence determining a second fault result;
[0160] Wherein, the step S35 includes:
[0161] S351, obtain Actual monitoring value at the moment , based on the state confidence the actual monitoring value falls within ;
[0162] ;
[0163] Specifically, the actual monitoring value falls within ; the monitoring data matches the reference value matches the state reference value .
[0164] S352, based on the target confidence , a first judgment value and a second judgment value are calculated:
[0165] ;
[0166] ;
[0167] ; ;
[0168] In the formula, are normal and abnormal judgment values, respectively, are confidence weights of the previous moment and the current moment, respectively, are reliability degrees of the confidence of the previous moment and the current moment, respectively, are actual monitoring values, are target confidences in normal and abnormal states, respectively;
[0169] Specifically, the confidence weights and the reliability degrees of the confidence can be optimized and the optimal solution can be output by using the evidence reasoning algorithm and adopting the forgetting strategy and gradient descent.
[0170] S353, if the second judgment value is greater than the first judgment value , the corresponding actual monitoring value is a fault, to obtain a second fault result;
[0171] Specifically, since the first fault result considers the variable fault and the data fault of the application service, it does not consider the time delay fault, while the second fault result in the present application considers the time delay fault of the application service and outputs the second fault result, and the second fault result can be located to the fault of the specific application service and the fault of the monitoring data, and the fault of the monitoring data can correspond to the fault of the variable.
[0172] S4, taking the union of the first fault result and the second fault result to obtain a final fault result, constructing a knowledge database and establishing a knowledge graph based on the knowledge database, determining a fault root cause tracing result based on the final fault result and the knowledge graph;
[0173] Specifically, the fault categories identified by the first fault result and the second fault result are different, so it is necessary to take the union of the two to obtain the complete final fault structure, and then combine the knowledge graph to trace the root cause.
[0174] The step S4 comprises:
[0175] S41, obtaining a historical fault database of an application service and a public fault correlation database, and constructing a knowledge database based on the historical fault database and the public fault correlation database;
[0176] Specifically, the historical fault database here includes historical fault information, running state code, input and output variable data, and monitoring data of the application service, and the public fault correlation database specifically refers to the correlation between the fault causes determined by the outside world and the corresponding faults.
[0177] S42, knowledge modeling is performed on the knowledge database to obtain knowledge triple information, and a knowledge graph is constructed based on the knowledge triple information.
[0178] S43, obtaining a training data set, calculating the score function value of each variable in the training data set and taking the score function value as the score threshold of the variable, and initializing the Bayesian network structure.
[0179] Specifically, the score function value here is a BDeu score function value.
[0180] S44, calculating the Pearson correlation coefficient between variables in the training data set, and determining a parent-child node set for each variable in the training data set based on the Pearson correlation coefficient and the knowledge graph.
[0181] S45, adding a forward directed edge or a reverse directed edge between the variables in the training data set and the nodes in the parent-child node set in order to obtain a plurality of candidate network structures.
[0182] Specifically, the forward directed edge is specifically a node in the parent-child node set pointing to a variable in the training data set, and the reverse directed edge is the opposite.
[0183] S46, calculate a score function value of each of the candidate network structures to obtain a score sequence, and take a candidate network structure corresponding to a maximum value in the score function value in the score sequence as a first optimal local structure.
[0184] S47, perform an adjustment operation on the nodes and directed edges in the first optimal local structure to obtain a plurality of new candidate network structures.
[0185] Specifically, the adjustment operation herein includes node sequence inversion, directed edge addition, and directed edge deletion.
[0186] S48, calculate a score function value of each of the new candidate network structures to obtain a new score sequence, and take a new candidate network structure corresponding to a maximum value in the score function value in the new score sequence as a second optimal local structure.
[0187] S49, iteratively repeat the determination process of the second optimal local structure until all variables have corresponding second optimal local structures, and output an optimal Bayesian network structure.
[0188] S410, input the final fault result into the optimal Bayesian network structure, output a fault propagation path according to the fault probability of a node in the optimal Bayesian network structure, and obtain a fault root cause tracing result.
[0189] The application service fault root cause tracing method provided by the embodiment one of the application first acquires input and output variables of an application service, determines a main data space based on the input and output variables, then calculates a target judgment quantity based on the main data space, performs optimization processing on the target judgment quantity to obtain an optimized judgment quantity, and determines a first fault result based on the optimized judgment quantity; then acquires monitoring data of the application service and sets a data reference value, determines a second fault result based on the monitoring data and the data reference value; then takes a union of the first fault result and the second fault result to obtain a final fault result, constructs a knowledge database and establishes a knowledge graph based on the knowledge database, and determines a fault root cause tracing result based on the final fault result and the knowledge graph. The application can effectively enhance the fault feature part and reduce the masking effect of non-fault features by identifying the first fault result, improve the accuracy of fault identification, effectively identify the delay anomaly in the application service by identifying the second fault result, improve the comprehensiveness and accuracy of fault identification, and then output the root cause tracing result, which can effectively avoid the influence of non-root cause variables on fault tracing and improve the accuracy of tracing.
[0190] Embodiment two
[0191] As shown in the embodiment two of the application, an application service fault root cause tracing system is provided, which comprises: Figure 2
[0192] The space determination sub-module 1 is configured to acquire input and output variables of an application service, and determine a main data space based on the input and output variables.
[0193] The first fault module 2 is configured to calculate a target judgment quantity based on the main data space, perform optimization processing on the target judgment quantity to obtain an optimized judgment quantity, and determine a first fault result based on the optimized judgment quantity.
[0194] The second fault module 3 is configured to acquire monitoring data of the application service and set a data reference value, and determine a second fault result based on the monitoring data and the data reference value.
[0195] The root cause tracing module 4 is configured to take a union of the first fault result and the second fault result to obtain a final fault result, construct a knowledge database and establish a knowledge graph based on the knowledge database, and determine a fault root cause tracing result based on the final fault result and the knowledge graph.
[0196] The space determination sub-module 1 comprises:
[0197] The conversion sub-module is configured to convert the input and output variables into a matrix form to obtain a first input matrix and a first output matrix :
[0198] ; ;
[0199] In the formula, x (t) and y (t) respectively represent input variables and output variables at a t-th moment, , , , , , ,
[0200] The expansion sub-module is configured to divide the first input matrix into K matrix blocks, determine a second input matrix based on the matrix blocks, and expand a data dimension of the first input matrix to be the same as a data dimension of the second input matrix to obtain a second output matrix :
[0201] ; ;
[0202] In the formula, the first K matrix blocks are represented by ;
[0203] a function submodule, configured to construct a target function based on the second input matrix , the second output matrix ;
[0204] ;
[0205] ;
[0206] wherein, X2 represents the second input matrix , W2 represents a weight vector of the second output matrix ; , W represents a weight coefficient vector, and ; ;
[0207] a space submodule, configured to determine a main data space based on the target function.
[0208] The space submodule comprises:
[0209] a function unit, configured to calculate a Lagrange function of the target function :
[0210] ;
[0211] wherein, L represents the Lagrange operator;
[0212] a partial derivative unit, configured to perform partial derivation and transformation on the Lagrange function to obtain a solving equation group:
[0213] ;
[0214] wherein, X represents an equivalent vector; a solving unit, configured to solve the equivalent vector X in the solving equation group and calculate an effective additional data space
[0215] based on the equivalent vector X: ;
[0216] ;
[0217] wherein, R represents a residual matrix of an output variable;
[0218] a space unit, configured to determine a main data space based on the effective additional data space:
[0219] ;
[0220] Where, represents the principal element of the input variable, represents the number of pivot elements, represents the loading vector of the output variables, Indicates the residual space except for the valid additional data space The remaining space outside.
[0221] The first fault module 2 includes:
[0222] A judgment quantum module for calculating the target judgment quantity based on the main data space :
[0223] ;
[0224] Where, Represents variable data in the main data space, is the transformation matrix, is the T statistic, is the number of variable data;
[0225] The judgment submodule is used to judge the target judgment value Whether it exceeds the preset judgment range, if the target judgment amount If it exceeds the preset judgment range, the corresponding variable data is used as fault data, and the fault data in the main data space is sorted to obtain a sorted data group;
[0226] a window submodule, configured to set a sliding window in the sorted data group and determine whether the proportion of faulty data in the sliding window exceeds a preset proportion; if so, to define the interval corresponding to the sliding window as the faulty interval; and if the data interval between the starting data points in two adjacent faulty intervals is less than the preset interval, to merge the two adjacent faulty intervals to obtain a final faulty interval;
[0227] The prediction submodule is used to obtain a preset target model and target training data, train the preset target model with the target training data to obtain a target model, input the final fault interval into the target model, and output the predicted value corresponding to the variable data in the main data space. , based on the predicted value Calculate the final judgment amount :
[0228] ;
[0229] ;
[0230] ;
[0231] Where, Represents optimized variable data, is the optimization factor, is the final fault interval, is the R-Square coefficient of the target model, is the coefficient threshold, To optimize the weights, To optimize the target judgment corresponding to the variable data;
[0232] The first output submodule is used to determine the final If it exceeds the preset judgment range, the corresponding variable data will be used as the final fault data to obtain the first fault result.
[0233] The second fault module 3 includes:
[0234] A first distribution degree submodule is configured to calculate a first distribution degree between the monitoring data and the data reference value:
[0235] , , ;
[0236] Where, 、 Indicates monitoring data With the The first degree of distribution between the data reference values, Respectively represent Data reference value;
[0237] The second distribution degree submodule is used to obtain the application service response status value and the status reference value, and calculate the second distribution degree between the application service response status value and the status reference value. :
[0238] , , , ;
[0239] Where, Indicates the state reference value, Represent the first and second state reference values respectively, Respectively represent normal state and abnormal state, Indicates the application service response status value. Indicates the number of states;
[0240] A joint distribution degree submodule, configured to calculate a joint distribution degree based on the first distribution degree and the second distribution degree :
[0241] ;
[0242] State confidence submodule, for determining the confidence level based on the joint distribution Calculate state confidence :
[0243] ;
[0244] Where, Indicates that all monitoring data match the reference value The sum of the joint distribution degrees of Indicates monitoring data Matching reference value , application service response status value Matching status reference value The sum of the joint distribution degrees of ;
[0245] The second output submodule is used to output the state confidence A second fault consequence is determined.
[0246] The second output submodule includes:
[0247] Target unit, used to obtain Actual monitoring value at the moment , based on the state confidence Calculate actual monitoring value Target confidence ;
[0248]
[0249] A judgment value unit for judging the target confidence Calculate the first judgment value and the second judgment value :
[0250] ;
[0251] ;
[0252] ; ;
[0253] Where, are normal and abnormal judgment values, respectively. are the confidence weights of the previous moment and the current moment respectively, are the reliability of the confidence level at the previous moment and the current moment respectively, The actual monitoring values Target confidence in normal state and abnormal state respectively;
[0254] The output unit is configured to output the second fault result if the second determination value is greater than the first determination value and the corresponding actual monitoring value is a fault.
[0255] The root cause tracing module 4 comprises:
[0256] A database submodule is configured to acquire a historical fault database of an application service and a public fault association database, and construct a knowledge database based on the historical fault database and the public fault association database;
[0257] A triple submodule is configured to perform knowledge modeling on the knowledge database to obtain knowledge triple information, and construct a knowledge graph based on the knowledge triple information;
[0258] An initialization submodule is configured to acquire a training data set, calculate a score function value of each variable in the training data set and take the score function value as a score threshold of the variable, and initialize a Bayesian network structure;
[0259] A correlation coefficient submodule is configured to calculate a Pearson correlation coefficient between variables in the training data set, and determine a parent-child node set for each variable in the training data set based on the Pearson correlation coefficient and the knowledge graph;
[0260] A candidate submodule is configured to sequentially add a forward directed edge or a reverse directed edge between a variable in the training data set and a node in the parent-child node set to obtain a plurality of candidate network structures;
[0261] A scoring submodule is configured to calculate a score function value of each candidate network structure to obtain a score sequence, and take a candidate network structure corresponding to a maximum value in the score function value in the score sequence as a first optimal local structure;
[0262] An adjustment submodule is configured to perform an adjustment operation on nodes and directed edges in the first optimal local structure to obtain a plurality of new candidate network structures;
[0263] A structure optimization submodule is configured to calculate a score function value of each new candidate network structure to obtain a new score sequence, and take a new candidate network structure corresponding to a maximum value in the score function value in the new score sequence as a second optimal local structure;
[0264] An iteration submodule is configured to iteratively repeat the determination process of the second optimal local structure until all variables have corresponding second optimal local structures, to output an optimal Bayesian network structure;
[0265] a result output sub-module, configured to input the final fault result into the optimal Bayesian network structure, output a fault propagation path according to a fault probability of a node in the optimal Bayesian network structure, and obtain a fault root cause tracing result.
[0266] In some embodiments of the present application, a computer includes a memory 102, a processor 101, and a computer program stored in the memory 102 and executable on the processor 101, and the processor 101 implements the fault root cause tracing method of the application service when executing the computer program.
[0267] Specifically, the processor 101 can include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present application.
[0268] The memory 102 can include mass storage for data or instructions. By way of example, and not limitation, the memory 102 can include a Hard Disk Drive (HDD), a floppy disk drive, a solid-state drive (SSD), a flash drive, a Compact Disk Read Only Memory (CD-ROM), a Digital Versatile Disk (DVD), a Blu-ray disk, a magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. The memory 102 can be removable and / or non-removable (or fixed) as appropriate. The memory 102 can be internal or external as appropriate. In certain embodiments, the memory 102 is a non-volatile memory. In certain embodiments, the memory 102 includes a Read-Only Memory (ROM) and a Random Access Memory (RAM). The ROM can be a mask-programmed ROM, a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically EPROM (EEPROM), an Electrically Alterable ROM (EAROM), or a FLASH memory, or a combination of two or more of these, as appropriate. The RAM can be a Static Random-Access Memory (SRAM) or a Dynamic Random Access Memory (DRAM), which can be a Fast Page Mode Dynamic Random Access Memory (FPMDRAM), an Extended Data Output Dynamic Random Access Memory (EDODRAM), a Synchronous Dynamic Random-Access Memory (SDRAM), or the like, as appropriate.
[0269] The memory 102 can be used to store or buffer various data files needed for processing and / or communication, and possible computer program instructions executed by the processor 101.
[0270] The processor 101 implements the fault root cause tracing method of the application service by reading and executing the computer program instructions stored in the memory 102.
[0271] In some embodiments, the computer can further include a communication interface 103 and a bus 100. As shown, the processor 101, the memory 102, and the communication interface 103 are connected through the bus 100 and complete communication with each other. Figure 3
[0272] The communication interface 103 is used to realize the communication between the modules, devices, units and / or equipment in the embodiments of the application. The communication interface 103 can also realize data communication with other components, such as external devices, image / data acquisition devices, databases, external storage, image / data processing workstations, etc.
[0273] Bus 100 includes hardware, software, or both, to couple components of computer device to each other and to couple components of computer device to other devices. Bus 100 includes, but is not limited to, at least one of the following: a data bus, an address bus, a control bus, an expansion bus, a local bus, etc. By way of example and not limitation, bus 100 can include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand (IB) interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or another suitable bus or combination of two or more of these. Where appropriate, bus 100 can include one or more buses. Although the present embodiments describe and show a particular bus, the present embodiments contemplate any suitable bus or interconnect.
[0274] The computer can execute the application service fault root cause tracing method of the present application based on the acquired application service fault root cause tracing system, thereby realizing application service fault root cause tracing.
[0275] In still other embodiments of the present application, in combination with the above-mentioned application service fault root cause tracing method, the embodiments of the present application provide the following technical solutions: a storage medium, a computer program being stored on the storage medium, and the computer program being executed by a processor to implement the above-mentioned application service fault root cause tracing method.
[0276] Those skilled in the art will appreciate that the logic and / or steps represented in the flow diagrams and / or otherwise described herein, for example, can be thought of as a list of executable instructions for implementing logic functions, and can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor- containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions, or a combination of both. In the context of this specification, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
[0277] More specific examples (a non-exhaustive list) of the computer-readable medium include the following: an electrical connection (electronic) having one or more wires, a portable computer diskette (magnetic), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium can also be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, for example, via an optical scanner, then compiled, interpreted, or otherwise processed, and stored in a computer memory in a form that is then employable by a computer.
[0278] It should be understood that aspects of the application can be implemented in hardware, software, firmware or combinations thereof. In the above embodiments, various steps or methods can be implemented in software or firmware that is stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any of the following technologies, known in the art, or combinations thereof, can be used: a discrete logic circuit having logic gates for implementing logic functions upon data signals, an application specific integrated circuit having appropriate combinational logic gates, a programmable gate array (PGA), a field programmable gate array (FPGA), or the like.
[0279] The technical features of the above-described embodiments can be combined in any manner, and for the sake of brevity, not all possible combinations are described, however, any combination of the technical features is considered to be within the scope of the present specification.
[0280] The above embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the scope of the patent. It should be noted that for ordinary skilled persons in the art, without departing from the concept of the present application, several modifications and improvements can be made, which are within the protection scope of the present application. Therefore, the protection scope of the present application patent should be subject to the appended claims.
Claims
1. A method for tracing the root cause of an application service failure, characterized in that: include: Obtain input and output variables of the application service, and determine a main data space based on the input and output variables; Calculating a target judgment amount based on the main data space, optimizing the target judgment amount to obtain an optimized judgment amount, and determining a first fault result based on the optimized judgment amount; Acquiring monitoring data of the application service and setting a data reference value, and determining a second fault result based on the monitoring data and the data reference value; Taking a union of the first fault result and the second fault result to obtain a final fault result, constructing a knowledge database and a knowledge graph based on the knowledge database, and determining a fault root cause tracing result based on the final fault result and the knowledge graph; The first fault result corresponds to a variable fault or data fault of the application service, and the second fault result corresponds to a delay fault of the application service; The steps of calculating a target judgment amount based on the main data space, optimizing the target judgment amount to obtain an optimized judgment amount, and determining a first fault result based on the optimized judgment amount include: Calculate target judgment based on the main data space : ; Where, Represents variable data in the main data space, is the transformation matrix, is the T statistic, is the number of variable data; Determine the target judgment amount Whether it exceeds the preset judgment range, if the target judgment amount If it exceeds the preset judgment range, the corresponding variable data is used as fault data, and the fault data in the main data space is sorted to obtain a sorted data group; A sliding window is set in the sorted data group, and it is determined whether the proportion of fault data in the sliding window exceeds a preset proportion. If it exceeds the preset proportion, the interval corresponding to the sliding window is used as the fault interval. If the data interval between the starting data points of two adjacent fault intervals is less than the preset interval, the two adjacent fault intervals are merged to obtain a final fault interval. Obtain a preset target model and target training data, train the preset target model with the target training data to obtain a target model, input the final fault interval into the target model, and output the predicted value corresponding to the variable data in the main data space , based on the predicted value Calculate the final judgment amount : ; ; ; Where, Represents optimized variable data, is the optimization factor, is the final fault interval, is the R-Square coefficient of the target model, is the coefficient threshold, To optimize the weights, To optimize the target judgment corresponding to the variable data; If the final judgment If it exceeds the preset judgment range, the corresponding variable data will be used as the final fault data to obtain the first fault result.
2. The method for tracing the root cause of a fault in an application service according to claim 1, wherein: The step of determining the main data space based on the input and output variables includes: Convert the input and output variables into matrix form to obtain the first input matrix With the first output matrix : ; ; Where, 、 Respectively represent Input variables and output variables at time represents a variable order, is the number of sampling points; The first input matrix Divided into matrix blocks and determine the second input matrix based on the matrix blocks , the first output matrix The data dimension is expanded to the second input matrix The data dimensions are the same as those of , to obtain the second output matrix : ; ; Where, Respectively represent the first to the Matrix blocks; Based on the second input matrix , the second output matrix Construct the objective function: ; ; Where, Represents the second input matrix , the second output matrix The weight vector of is the weight coefficient vector, is the tensor product symbol; A primary data space is determined based on the objective function.
3. The method for tracing the root cause of an application service failure according to claim 2, wherein: The step of determining the main data space based on the objective function comprises: Calculate the Lagrangian function of the objective function : ; Where, is the Lagrangian operator; For the Lagrangian function Perform partial derivatives and transformations to obtain the solution to the equation system: ; Where, is an equivalent vector; Solve the equivalent vector in the equations Solve and based on the equivalent vector Calculate the effective additional data space : ; Where, is the residual matrix of the output variable; Based on the valid additional data space Identify the primary data space : ; Where, represents the principal element of the input variable, represents the number of pivot elements, represents the loading vector of the output variables, Indicates the residual space except for the valid additional data space The remaining space outside.
4. The method for tracing the root cause of a fault in an application service according to claim 1, wherein: The step of determining a second fault result based on the monitoring data and the data reference value includes: Calculating a first degree of distribution between the monitoring data and the data reference value: , , ; Where, 、 Indicates monitoring data With the The first degree of distribution between the data reference values, Respectively represent Data reference value; Obtain an application service response status value and a status reference value, and calculate a second distribution degree between the application service response status value and the status reference value : , , , ; Where, Indicates the state reference value, Represent the first and second state reference values respectively, Respectively represent normal state and abnormal state, Indicates the application service response status value. Indicates the number of states; Calculate the joint distribution degree based on the first distribution degree and the second distribution degree : ; Based on the joint distribution Calculate state confidence : ; Where, Indicates that all monitoring data match the reference value The sum of the joint distribution degrees of Indicates monitoring data Matching reference value , application service response status value Matching status reference value The sum of the joint distribution degrees of ; Based on the state confidence A second fault consequence is determined.
5. The method for tracing the root cause of a fault in an application service according to claim 4, wherein: The state confidence The steps of determining the second fault result include: Get Actual monitoring value at the moment , based on the state confidence Calculate actual monitoring value Target confidence ; ; Where, Indicates the actual monitoring value fall into Between, monitoring data Matching reference value , application service response status value Matching status reference value The state confidence of Based on the target confidence Calculate the first judgment value and the second judgment value : ; ; ; ; Where, are normal and abnormal judgment values, respectively. are the confidence weights of the previous moment and the current moment respectively, are the reliability of the confidence level at the previous moment and the current moment respectively, The actual monitoring values Target confidence in normal and abnormal states respectively; If the second judgment value Greater than the first judgment value , then the corresponding actual monitoring value is a fault to obtain a second fault result.
6. The method for tracing the root cause of an application service failure according to claim 1, wherein: The steps of constructing a knowledge database and establishing a knowledge graph based on the knowledge database, and determining a fault root cause tracing result based on the final fault result and the knowledge graph include: Acquire a historical fault database and a common fault association database of an application service, and construct a knowledge database based on the historical fault database and the common fault association database; Performing knowledge modeling on the knowledge database to obtain knowledge triple information, and constructing a knowledge graph based on the knowledge triple information; Obtaining a training data set, calculating a scoring function value for each variable in the training data set and using the scoring function value as a scoring threshold for the variable, and initializing a Bayesian network structure; Calculating the Pearson correlation coefficient between the variables in the training data set, and determining a parent-child node set for each variable in the training data set based on the Pearson correlation coefficient and the knowledge graph; Adding forward directed edges or reverse directed edges between the variables in the training data set and the nodes in the parent-child node set in order to obtain several candidate network structures; Calculating the scoring function value of each candidate network structure to obtain a scoring sequence, and taking the candidate network result corresponding to the maximum value of the scoring function value in the scoring sequence as the first optimal local structure; Adjusting the nodes and directed edges in the first optimal local structure to obtain several new candidate network structures; Calculating the scoring function value of each of the new candidate network structures to obtain a new scoring sequence, and taking the new candidate network structure corresponding to the maximum value of the scoring function value in the new scoring sequence as the second optimal local structure; Iteratively repeat the process of determining the second optimal local structure until all variables have corresponding second optimal local structures, so as to output the optimal Bayesian network structure; The final fault result is input into the optimal Bayesian network structure, and the fault propagation path is output according to the fault probability of the nodes in the optimal Bayesian network structure to obtain the fault root cause tracing result.
7. A system for tracing the root cause of a fault in an application service, the system adopting the method for tracing the root cause of a fault in an application service according to claim 1, characterized in that: The system comprises: A space determination submodule, configured to obtain input and output variables of the application service and determine a main data space based on the input and output variables; a first fault module, configured to calculate a target judgment amount based on the main data space, optimize the target judgment amount to obtain an optimized judgment amount, and determine a first fault result based on the optimized judgment amount; a second fault module, configured to obtain monitoring data of the application service and set a data reference value, and determine a second fault result based on the monitoring data and the data reference value; A root cause tracing module is used to take the union of the first fault result and the second fault result to obtain a final fault result, build a knowledge database and establish a knowledge graph based on the knowledge database, and determine the fault root cause tracing result based on the final fault result and the knowledge graph.
8. A computer comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method for tracing the root cause of a fault of an application service according to any one of claims 1 to 6 is implemented.
9. A storage medium, characterized in that: The storage medium stores a computer program, which, when executed by a processor, implements the method for tracing the root cause of a fault of an application service according to any one of claims 1 to 6.
Citation Information
Patent Citations
Heat supply system intelligent diagnosis method and system based on knowledge graph and Bayesian
CN115511119A
IT operation and maintenance fault root cause analysis method based on knowledge graph
CN117272170A