Database fault root cause positioning method and device based on causal discovery

By adopting an adaptive causal discovery strategy based on Monte Carlo trees, an interpretable causal graph is generated, which solves the problem of causal relationship identification in database systems, realizes automated fault diagnosis and root cause localization, provides reliable operation and maintenance suggestions, and improves the accuracy and efficiency of fault handling.

CN121542088APending Publication Date: 2026-02-17NINGXIA UNIVERSITY
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202511744736.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2024-11-28
Filing Date
2025-11-25
Publication Date
2026-02-17

Smart Images

  • Figure CN121542088A_ABST
    Figure CN121542088A_ABST
Patent Text Reader

Abstract

The invention provides a database fault root cause positioning method and device based on causal discovery, and belongs to the technical field of database operation and maintenance and fault diagnosis. Comprising the following steps: generating a two-dimensional data table and a statistical information set by using a multi-source operation log of a database system; constructing a causal discovery algorithm set A, and training the gradient boosting tree model by using the training set and the path combination to obtain an agent model Fb; establishing a Monte Carlo tree, selecting child nodes of root nodes according to performance expectation and exploration rewards, and expanding the child nodes to leaf nodes layer by layer; running the Monte Carlo tree, and obtaining a causal graph G * and a performance score by using a voting mode according to all causal relationships in the causal graph obtained by each node; calculating an exploration reward and a performance expectation of each node in a complete algorithm path, and returning the exploration reward and the performance expectation upwards to a root node from a leaf node along the path; updating Fb based on the searched path; and processing the new task by using a Monte Carlo tree, and identifying an affected processing variable according to a path pointing to an abnormal result variable in the causal graph.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of database operation and maintenance and fault diagnosis, and particularly relates to a database fault root cause positioning method and device based on causal discovery. BACKGROUND

[0002] In a high-concurrency access, complex query and mixed load running environment, a database often has performance degradation or fault phenomenon due to various factors. These factors include improper configuration parameter adjustment, query plan degradation, transaction concurrency conflict, cache or index strategy imbalance, hardware resource shortage, network jitter and version release and rollback inconsistency. The above factors are often interrelated, and a local anomaly can form a chain effect through resource competition or execution dependency, thereby causing overall performance anomaly, request timeout or service interruption and other database faults.

[0003] Due to the multiple levels and complex components of a database system, the path of a fault usually has obvious causal chain characteristics. In an actual operation and maintenance scenario, although log information can record the execution state, the time sequence, semantics and granularity thereof are quite different, and it is difficult to reveal the causal dependency relationship between different events by simply relying on keyword matching or threshold detection. Although traditional statistical analysis or machine learning models can detect or classify anomalies, they cannot explain the directionality of "cause-effect", and thus cannot provide accurate basis for repair operations.

[0004] Therefore, the core problem of database fault diagnosis and root cause positioning is how to extract structured information from multi-source logs, identify the causal relationship between different events, and form a verifiable and explainable causal graph. In view of this problem, there is an urgent need for an analysis method that can combine causal discovery and strategy optimization mechanism under a unified data representation, so as to realize automatic and explainable fault diagnosis and root cause positioning in a complex database environment. SUMMARY

[0005] To overcome the above problems, the present application provides a database fault root cause positioning method and device based on causal discovery, which uses a Monte Carlo tree-based adaptive causal discovery strategy to analyze database running logs, generates an explainable causal graph and diagnosis conclusion, discovers key configurations, events and environmental factors that are causally related to target performance indicators (such as query latency, throughput, error rate), and realizes accurate positioning of database fault root cause.

[0006] The technical solution adopted by the embodiment of the present application to solve the technical problems is as follows:

[0007] A database fault root cause positioning method based on causal discovery, comprising:

[0008] Step S1, after unified access, parsing, time alignment and semantic specification of multi-source running logs of a database system, the logs are regularized into a two-dimensional data table D={D m} for directly inputting into a causal discovery algorithm, and a variable dictionary and structural or semantic constraints are generated synchronously; wherein the rows and columns of D correspond to causal units and variables after numerical changes, respectively, and the variable types include processing variables, mixed variables, causal control variables, result variables and derived features; a statistical information set θ={θ m} is established, θ m is the statistical information of the element set D m ; D is divided into a non-overlapping training set D train and a validation set D vectify ;

[0009] Step S2, a causal discovery algorithm set A and a gradient boosting tree base class are constructed, and the causal discovery is run on the training set D in a cold start mode without enabling an agent to obtain path combinations , and a proxy model F is trained;

[0010] Step S3, a Monte Carlo tree is established, after selecting a root node from the causal discovery algorithm set A, the performance score of a path to be expanded is predicted by using the proxy model F , a child node is selected according to the performance expectation and exploration reward of the path expansion to the node, and the expansion is performed layer by layer to a leaf node;

[0011] Step S4, the Monte Carlo tree is run, and all causal relationships in the causal graph obtained by each node are used to vote to obtain a final causal graph G * , and the performance score of the path corresponding to G b is predicted by using the proxy model F * ;

[0012] Step S5, the exploration reward and performance expectation of each node in the complete algorithm path are calculated, and the exploration reward and the performance expectation are transmitted from the leaf node to the root node along the path;

[0013] Step S6, based on all the paths searched by the Monte Carlo tree, the proxy model F b is updated;

[0014] Step S7, a two-dimensional data table D1 corresponding to a new database fault root cause positioning task is input into the Monte Carlo tree to obtain a causal graph G , and according to the causal link pointing to an abnormal result variable in G , the influence on the abnormal result variable is automatically identified; The treatment variables are used as the root cause diagnosis conclusion.

[0015] Preferably, step S2 includes:

[0016] Step S21: Construct the causal discovery algorithm set A and define the coding rules for standardized paths;

[0017] Step S22, under the cold start configuration without enabling the proxy model, use a uniform random seed and hyperparameters in Perform MCTS causal discovery on each target variable column. It runs independently and records the search trajectory in a bypass mode throughout the process, solidifying it into path combinations according to the agreed encoding rules. ;

[0018] Step S23: After establishing and training the gradient boosting tree model, the surrogate model F is obtained. b The implementation steps include:

[0019] Step S231, in the training dataset D train Run set A for each path i The causal discovery algorithm a ij Generate a cause-effect graph and calculate the performance score F(x). n ): ;

[0020] In the formula, w1, w2, w3, and w4 are weights, and SHD(x) n ) represents path x n Structural Hamming distance, AUPRC(x) n ) represents path x n Precision recall, TPR(x) n ) represents path x n The true rate of occurrence, FDR(x) n ) represents path x n False discovery rate;

[0021] Step S232, for each path x n Extract the feature φ(x) n ), where φ(x) n Includes path structure and algorithm selection. ij and statistical information set θ train ;

[0022] Step S233, establish the training set {(φ(x)} n ),F(x n ))}, using the training set {(φ(x)} n ),F(x n Train the agent model Fb , the agent model F b The objective is to minimize the error between the predicted value and the true score, which is formulated as: ;

[0023] Where, when the maximum number of training times or Loss converges, the agent model F b training is completed.

[0024] Preferably, the step S3 comprises:

[0025] Step S31, according to the statistical information set θ train of the observation data set D train , randomly select A i (S0) as the initial node of the Monte Carlo tree from the set A i ;

[0026] Step S32, using the agent model F b to predict the performance of the current path s in the Monte Carlo tree selecting expansion to the candidate node a, to obtain the predicted performance score F b (s.a), a∈A i , calculate the expected performance Q(s,a) after the current path s selecting expansion to the candidate node a: ;

[0027] Where, Q(s,a) represents the average performance prediction value after the current path s selecting expansion to the candidate node a, X(s.a) represents the complete path set generated from the path s.a; x represents a complete path generated from s.a, F(x) represents the performance score of the complete path x, and β represents the weight factor;

[0028] Step S33, during the training process, update n(s,a) and n(s) after each calculation of Q(s,a), where n(s,a) represents the number of visits to the current path s expanding to the candidate node a, and n(s) represents the number of visits to the current path s;

[0029] Step S34, calculate and update the exploration reward U(s,a) of the path s.a: ;

[0030] Where, C is a normal number that controls the degree of exploration;

[0031] Step S35, based on the performance expectation Q(s,a) and the exploration reward U(s,a), construct a probability selection strategy π: ; ;

[0032] Where Score(s,a) represents the selection score for candidate node a. This represents the exponential sum of the scores of all algorithms a to be extended in path s, where A(s) is the set of candidate nodes that can be selected for the current path s;

[0033] Step S36, based on the AlphaGo Zero strategy, the node expansion selection strategy is as follows: ;

[0034] Once the maximum preset depth is reached, the expansion stops and the current complete causal discovery algorithm path is returned.

[0035] Preferably, step S4 includes:

[0036] Step S41: Run all algorithm nodes on the returned algorithm path and obtain the causal graph G for each node. z * , z∈[1,Z], where Z is the total number of nodes in the Monte Carlo tree; divide each causal graph G z * All causal relationships are processed using a voting method to derive the final causal graph. ;

[0037] Step S42, according to D train The corresponding true causal graph G evaluates the causal graph. ,get The path x that produces the corresponding result * Overall performance score F(x) * ).

[0038] Preferably, step S5 includes:

[0039] Step S51: Calculate the exploration reward U(s,a) of each node in the current complete algorithm path x, and pass it back up the path from the leaf node as the reward value;

[0040] Step S52: For each node sa on path x, increase the number of visits to the node n(sa);

[0041] Step S53; Update the expected performance Q(sa), with the following formula: ;

[0042] Where F(x) is the performance score of the new path, Q new (sa) represents the updated performance expectation value, Q old (sa) represents the expected performance value before the update; n new(sa) represents the updated number of visits, n old (sa) represents the number of visits before the update;

[0043] Step S54: Repeat steps S52 and S53 to backpropagate U(s,a) and Q(sa) upwards layer by layer until the root node S0 is reached.

[0044] Step S55, use the validation set D vectify Verify the performance of the Monte Carlo tree.

[0045] Preferably, step S6 includes:

[0046] Step S61, for path x * Establish φ(x) * ), and φ(x * ) and F(x * Add to the training set {(φ(x)} n ),F(x n ))}middle;

[0047] Step S62, from the training set {(φ(x)} n ),F(x n Select N1 elements from ))} to generate a path validation set to verify the surrogate model F. b If N1 < N, use the mean squared error (MSE) and coefficient of determination to evaluate the surrogate model's prediction of the surrogate model F. b Record the performance data;

[0048] Step S63: Determine whether the proxy model F needs to be updated. b Specifically, when the obtained Loss value is higher than the previous Loss value, or when the prediction result of the determination coefficient evaluation proxy model exceeds the determination coefficient threshold, it is considered that F needs to be updated. b Adjust the proxy model F b After obtaining the parameters, return to step S62;

[0049] Step S64: When the recorded performance data accumulates to N2, the agent model F is triggered. b The update is performed by implementing the training process of step S2 based on the training set of step S61.

[0050] Preferably, in step S7, the columns of D1 are subsets of D, and the output of step S7 includes the optimal pipeline configuration Pip* based on final convergence and the cause-effect graph. ,Depend on The root cause diagnosis conclusions derived from the causal structure and the corresponding recommended measures, among which, It reflects the causal dependencies of all treatment variables, confounding variables, causal regulation variables and outcome variables, identifies one or more treatment variables that have a significant impact on the outcome abnormality, and provides the causal links between each treatment variable with a significant impact and the outcome variable.

[0051] As can be seen from the above technical solutions, the database fault root cause localization method and system based on causal discovery provided by the embodiments of the present invention, without changing the existing MCTS "selection-expansion-simulation-backhaul" process, takes the single two-dimensional structured observation data table D formed in step S1 as input (rows correspond to causal units, columns contain processing variables T_, result variables O_, and confounding / instrumental variables X_ / Z_), and first completes time alignment and numerical preprocessing; then in step S2, a composable causal discovery algorithm set A and gradient boosting tree base classes are constructed on the training set. The above uses a cold start method to run causal discovery search and collect path combinations { (Record states—action sequences, candidate graph gains, and constraint satisfaction, etc.), and train a surrogate model based on this. Upon entering the adaptive search phase, using A as the operator space, the structural score and evidence of conditional independence are integrated, and... The proxy score is incorporated into the scoring function as an addendum, used for / The system guides initialization and early exploration; when searching to a leaf node, it selects and expands child nodes based on the comprehensive score and constraint satisfaction of the current configuration, updates node values ​​through sampling and backhaul, continuously generates and evaluates candidate causal graphs, calculates configuration performance as a reward and backhauls it upwards; it combines online integration strategies to accumulate and iteratively correct high-confidence structures, thereby adaptively optimizing causal discovery configuration and local structure in database log scenarios, achieving robust estimation of causal effects of target performance indicators and root cause localization of faults; when the proxy model is not enabled, the scoring function automatically degenerates into a baseline form containing only basic terms, and the overall behavior remains backward compatible and stable with the original implementation. Attached Figure Description

[0052] Figure 1 A flowchart for implementing a database fault root cause localization method based on causal discovery.

[0053] Figure 2 This is a schematic diagram of the adaptive causal discovery strategy based on Monte Carlo trees.

[0054] Figure 3 This is a flowchart illustrating the operation of an adaptive causal discovery strategy based on Monte Carlo trees.

[0055] Figure 4 Architecture diagram of the adaptive causal discovery algorithm based on Monte Carlo trees. Detailed Implementation

[0056] The technical solution and effects of the present invention will be further described in detail below with reference to the accompanying drawings.

[0057] This invention provides an adaptive causal discovery method based on Monte Carlo trees. This method structures multi-source database operation logs into a unified data representation, combines pipeline-level causal discovery with online integration strategies, and generates interpretable causal graphs and diagnostic conclusions to guide operational decisions such as parameter rollback, rate limiting, and degradation. Using database operation logs as the data source, this method applies the core mechanism of "adaptive search—evaluation—backhaul integration" to database operation and maintenance diagnostic scenarios, automatically discovering key configurations, events, and environmental factors causally related to target performance indicators (such as query latency, throughput, and error rate). [Reference] Figure 1 The flowchart shown includes the following specific implementation:

[0058] Step S1 involves uniformly accessing, parsing, aligning the time, and standardizing the semantics of the database operation logs, then organizing them into a single two-dimensional data table D that can be directly consumed by the causal discovery algorithm. Simultaneously, a variable dictionary and necessary structural / semantic constraints are generated to ensure temporal causality consistency and prevent information leakage. Each row corresponds to a causal unit (session, query, fixed time window, or instance; a fixed granularity is used in implementation), and each column corresponds to a numerical variable. Column names use prefixes to specify their roles: processing variables are labeled T_, target variables are labeled O_, observable confounding variables are labeled X_, regulatory variables are labeled Z_, and derived features formed from information prior to the processing event are labeled pre_. Step S1 simultaneously produces the variable dictionary and necessary structural / semantic constraints to ensure that subsequent causal discovery proceeds without leaking future information or violating temporal causality. After S1 is completed, subsequent steps run directly on table D, no longer relying on external metadata.

[0059] Step S2: Construct a composable set of causal discovery algorithms A (including primitives such as independence testing, structure scoring, and local graph operations) and determine gradient boosting tree as the base class for the surrogate scorer. The above describes a cold start method using MCTS causal discovery to obtain path combinations. (That is, the state-action sequence formed during the search process and its corresponding candidate graph, edge / structure changes, and scoring gains, etc.; if historical path records already exist, they can also be used directly), and then based on and{ Construct training samples for the gradient boosting tree and complete the training to obtain the surrogate model. ; then Initialize the access scoring function and selection strategy with the scoring items and / or π0, Q0. If not enabled, the weights are reset to zero to ensure backward compatibility. Only as an additive component of the scoring function and / or Initialization source access main process: When enabled, it provides candidate structures. The score guides early, effective exploration; when disabled or invalidated, its weight is reset to zero, and the whole thing degenerates into a proxy-free baseline, thus ensuring backward compatibility and pluggability with the original implementation.

[0060] Step S3: Construct a Monte Carlo tree. After selecting the root node from the causal discovery algorithm set A, use the surrogate model. Predict the performance score of the path to be expanded, select child nodes based on the expected performance of the path to the node and the exploration reward, and expand layer by layer to the leaf node;

[0061] Step S4: Run the Monte Carlo tree and use a voting method to derive the final causal graph based on all causal relationships in the causal graph derived from each node. and the use of proxy models predict The performance score of the path that produces the corresponding result;

[0062] Step S5: Calculate the exploration reward and performance expectation of each node in the complete algorithm path, and backpropagate the exploration reward and performance expectation from the leaf node to the root node along the path.

[0063] Step S6: Update the proxy model based on all paths searched by the Monte Carlo tree. ;

[0064] Step S7, using Monte Carlo trees and surrogate models To handle the causal discovery task, the causal discovery algorithm path with the highest performance score is selected. The causal algorithm combinations formed by the nodes in the path are then used to explore the causal discovery task. A new two-dimensional data table D (whose columns are a subset of the original D) is input into the Monte Carlo tree, and the causal graph G* is generated. Middle refers to abnormal result variables The system automatically identifies one or more processing variables that significantly influence abnormal results, and provides the corresponding causal links and key intermediate links, thereby achieving root cause localization of database failures. It combines a Monte Carlo tree search framework with a surrogate model to optimize an efficient adaptive causal discovery algorithm, and uses an online ensemble strategy to combine multiple models generated during the search process into a composite model to improve the final prediction performance.

[0065] After completing the selection, expansion, evaluation, and backpropagation of candidate causal algorithm pipelines, the system runs the causal analysis process based on the finally converged pipeline configuration Pip*, obtaining a stable and consistent final causal graph G*. In this causal graph, all processed variables... Confounding variables Causal regulation variables With outcome variable The causal dependency is clearly characterized. The system further relies on... Middle refers to abnormal result variables The system automatically identifies one or more processing variables that significantly impact abnormal results, and provides the corresponding causal chain and key intermediate links, thereby enabling root cause localization of database failures. The final output includes the optimal pipeline (Pip*) and a cause-effect graph. The root cause diagnosis conclusions derived from this causal structure can be directly used for subsequent operational strategies such as rollback, rate limiting, and release timing adjustments. Based on G*, the causal relationship between key processing variables and target variables can be clearly identified, and operational suggestions (including but not limited to parameter rollback, concurrency rate limiting, and release timing adjustments) can be provided accordingly. In the implementation examples and offline playback, the G* obtained after weighting and consistency checks on the candidate graph using the online integration strategy exhibits good stability in structure and conclusions, effectively supporting root cause localization and handling decisions. Therefore, this invention can provide interpretable, verifiable, and implementable database fault diagnosis results without changing the business architecture and existing monitoring and collection mechanisms. Here, significant impact can refer to data jumps exceeding a preset threshold, such as exceeding a change threshold.

[0066] Preferably, step S1 is specifically implemented by including:

[0067] Step S11 (Data Access and Source Identification): Access multi-source data such as query execution logs, configuration and change records, resource and error monitoring, and release and rollback audits. Register the timestamp field, primary key, and minimum required columns of each source, and establish a mapping relationship to a unified schema. Fix the minimum required columns (including unit_id, start_ts, end_ts, and processing / result / mixed candidate fields related to causal analysis) to ensure that subsequent processing can be carried out within the same semantic and field space. Unify the semantics of key fields from each source and ensure the traceability and consistency of fields in subsequent processing.

[0068] Step S12 (Parsing and Standardized Coding): Parse the accessed data, force the type and normalize the units, standardize the numerical quantities to a unified dimension, convert the Boolean quantities to 0 / 1, and numerically encode the category quantities in a pre-defined manner. At the same time, retain the field source and transformation metadata to support subsequent reproduction and auditing, forming a stable and reproducible columnar input.

[0069] Step S13 (Time Alignment and Clock Correction): Time zone unification and drift correction are performed on the timestamps of each log source. A global timeline is established using anchor events or heartbeat information so that all events can be accurately located to the start and end intervals of the corresponding causal units, thereby providing a reliable basis for the "process first, result later" judgment.

[0070] Step S14 (Causal Unit Segmentation): Based on the target application, the fixed row granularity is divided into one of session, query, fixed time window or instance, and the continuous log is segmented into sample rows accordingly. The primary key boundaries such as unit_id, start_ts, end_ts, etc. of each row are clearly defined to ensure that the events in the row have clear time envelope and causal interpretability.

[0071] Step S15 (Incorporating Target and Processing Variables): Incorporate all target variables into the same table D (e.g., latency quantiles, throughput, error rate, etc.) in the form of O_* columns. At the same time, represent processing events such as configuration changes, script operations, and release rollbacks as binary, rank, or continuous intensity values ​​in T_* columns, clarifying the timing and continuous semantics of the processing, thereby providing a unified entry point for subsequent causal discovery for any O_*.

[0072] Step S16 (Extraction and Semantic Labeling of Heterogeneous and Instrumental Variables): Extract and label observable heterogeneous variables X_ (such as concurrency, resource utilization, data size, execution and plan profiles, etc.) related to performance from the logs and include them in Table D. Register their value range, units, sampling frequency and allowed parent / child dependency constraints in the variable dictionary for semantic verification in the subsequent search and scoring stages.

[0073] Step S17 (Event Alignment and Intensity Encoding): Align the processing events with the time boundaries of the sample rows. For concurrent or continuous processing, determine the overlay or mutual exclusion rules according to the implementation agreement and encode them into the T_* column to ensure that the exposure status within the row is consistent with the real time relationship and avoid deviations in the causal direction.

[0074] Step S18 (Leakage Prevention Generation of Derived Features and Window Aggregation): Without going beyond the time point of the processing, perform window aggregation on resources, load, and execution statistics. Construct pre_* derived features (such as historical mean, quantiles, volatility, lag, and growth rate) based only on observations before the processing occurs, and strictly prohibit the use of information after end_ts to ensure that independence tests and scores are not contaminated by ex-post information.

[0075] Step S19 (Missing, Anomaly, and Denoising Handling): Apply robust handling to missing and outlier values ​​and retain the missing / quality indicator column in the same table. If necessary, use distribution-preserving imputation strategies or anomaly masking strategies to mitigate the impact of data fluctuations on the stability of subsequent structure learning. At the same time, retain the processing strategies and parameters for auditing.

[0076] Step S110 (Functional Dependency and Collinearity Governance): Identify and handle strong functional dependencies and highly collinear relationships. Reduce the test distortion caused by redundancy by selecting normalized representative variables, grouping constraints, or regularization methods, and record dependency grouping information to support penalties and pruning in the scoring process.

[0077] Step S111 (Structural and Semantic Constraint Generation): Based on time sequence, irreversibility and hierarchical dependency, variable black / white lists and functional dependency results, generate a set of constraints and priors (hard / soft constraint set) that can be consumed by the causal discovery algorithm. These constraints are used to prohibit future edges pointing to the past, tighten unreasonable parent-child relationships, and give soft and hard constraint labels to invariant relationships.

[0078] Step S112 (Data Splitting and Version Management): Split D into training sets according to time or instance dimensions. In addition to other sub-sets, the data version, pattern hash, and generation timestamp of this output are recorded to ensure the repeatability and comparability of subsequent MCTS operations and agent training.

[0079] Step S113 (Consistency Verification and Output Consolidation): Perform quality verification on parsing, alignment, missing / abnormal ratio, and constraint satisfaction. If the quality is met, solidify the output of the two-dimensional data table D along with the variable dictionary and constraint description. If the quality is not met, iterate according to the established rollback and reprocessing strategy until it passes, thereby forming a unified data foundation that can be directly input into the causal discovery algorithm.

[0080] Better, refer to Figures 2-4 As shown, the specific implementation of step S2 includes:

[0081] Step S21 (Algorithm Set A and Path Representation Standardization): Without changing the main Monte Carlo tree search process (keeping the control formulas for selection, expansion, simulation, and backpropagation unchanged), establish an algorithm set A consisting of primitives such as independence testing, structure scoring, and local graph operations (this set consists of primitives such as independence testing, structure scoring, and local graph operations, used to generate candidate actions and scoring evidence during the search process), and use gradient boosting trees as the implementation base class for the surrogate scorer; to ensure the consistency of subsequent data construction in S2, the "search path" is uniformly represented: the state-action sequence from the root to a certain expanded node in a search, the incremental changes in the candidate graph, the addition and subtraction of scoring function items and constraint satisfaction, and the association information with the target column O_* are uniformly encoded as path elements. , converging to form path combinations { The above only defines the recording and coding specifications, without touching the selection, extension, simulation, and feedback formulas of MCTS, and maintains consistency with the notation of each component of the original scoring function to ensure that subsequent... and Upon merging, training samples usable for gradient boosting trees can be directly generated.

[0082] Step S22 (Cold start MCTS and path combination acquisition based on historical data): In The MCTS causal discovery process is performed for one or more rounds without surrogate terms using a fixed random seed and hyperparameters. For each target variable O_j, the process is run independently, and action selection, candidate graph state, total score and component gains, constraint satisfaction, and convergence products are recorded throughout the process without interfering with the search strategy. All trajectories are then solidified into path combinations according to the S21 coding standard. This step only produces reproducible verifiable data without performing any parameter learning. It generates records without altering the control logic of the search tree or the calculation method of the scoring function; its output... and These will be used in subsequent step S23 to construct the training samples for the gradient boosting tree, thereby obtaining the surrogate model. The initial version.

[0083] Step S23 (Training Data Construction and Gradient Boosting Tree Training): Based on and{ Construct two-dimensional training samples that can be directly used for gradient boosting tree learning. Combine the evaluated directed edges or local structures with their occurrence frequency, stage position, average score gain, consistency index across instances and load slices, etc., into a feature vector. Use whether it enters the final state candidate graph, whether it meets the identifiability requirement, or the corresponding gain as supervision signals to complete model training and necessary probability calibration, and obtain the surrogate model. After training, subsequent steps are only connected with the scoreable item Score(·) and initialized with π0 and Q0. If not enabled, its weight δ is set to zero, and the main process automatically reverts to the original baseline score without modifying any control logic. The specific implementation details are as follows:

[0084] Step S231: In the initial training phase, generate a set of random path combinations {x} n}, n∈[1,N], in the training dataset Run set A for each path i The causal discovery algorithm a ij Generate a cause-effect graph and calculate the performance score F(x). n ): ;

[0085] In the formula, w1, w2, w3, and w4 are weights, and SHD(x) n ) represents path x n Structural Hamming distance, AUPRC(x) n ) represents path x n Precision recall, TPR(x) n ) represents path x n The true rate of occurrence, FDR(x) n ) represents path x n False discovery rate;

[0086] SHD (Structural Hamming Distance): Measures the number of structural differences between a causal graph and the actual causal graph. It calculates the difference between the edges predicted by the algorithm and the actual edges. The smaller the SHD, the closer the structures of the predicted and actual graphs are.

[0087] FDR (False Discovery Rate): This is used to determine how many causal relationships identified by an algorithm are incorrect. Specifically, it is calculated by dividing the number of incorrect causal relationships by the total number of discoveries. A low FDR means that the algorithm has a low false discovery rate.

[0088] TPR (True Positive Rate): The proportion of actual causal relationships that are correctly identified. A higher TPR indicates a stronger detection capability of the algorithm.

[0089] Precision-Recall (AUPRC): Used to evaluate the overall prediction performance of an algorithm. Precision is the proportion of true causal relationships among the edges of causal relationships, while recall is the proportion of all true causal relationships that are predicted.

[0090] Step S232, for each path x nExtract the feature φ(x) n ), where φ(x) n Includes path structure and algorithm selection. ij and statistical information sets ;

[0091] Step S233, establish the training set {(φ(x)} n ),F(x n ))}, using the training set {(φ(x)} n ),F(x n Training the agent model Proxy model The goal is to minimize the error between the predicted value and the true score, as shown in the formula: (1)

[0092] Among them, when the maximum number of training iterations is reached or the loss converges, the surrogate model Training is over.

[0093] Preferably, step S3 includes:

[0094] Step S31, based on the observation dataset Statistical information set From set A i Randomly select A i (S0) serves as the initial node of the Monte Carlo tree; where, based on the training observation dataset... The dataset type is randomly sampled from the corresponding algorithm set, and the sampled causal discovery algorithm is selected as the initial algorithm node.

[0095] Step S32: Since the number of visits to each node is not determined during the initial training process, a proxy model is needed. Predict the performance of extending the selection of the current path s to candidate node a in a Monte Carlo tree, and obtain the predicted performance score F. b (sa), a∈A i Prioritize exploring nodes with better performance (better exploration performance is reflected in F). b (since the difference between (sa) and F(x) is small), calculate the expected performance Q(s,a) after the current path s is expanded to candidate node a: (2)

[0096] Where Q(s,a) represents the average performance prediction value after the current path s is expanded to candidate node a, X(sa) represents the complete set of paths generated from the expansion of path sa; x represents a complete path generated from sa, and F(x) represents the performance score of the complete path x; Fb (sa) represents the performance value of the path Sa predicted by the surrogate model, used to supplement insufficient real evaluation data, especially in the initial stage; β represents the weighting factor, controlling the impact of the surrogate model's predictions on Q(s,a). A higher weighting factor can be set in the initial stage. As the number of evaluations increases, the value gradually decreases, making Q(s,a) more dependent on the actual evaluation value.

[0097] Step S33: During the training process, after each calculation of Q(s,a), update n(s,a) and n(s), where n(s,a) represents the number of visits to the candidate node a when the current path s is extended, and n(s) represents the number of visits to the current path s.

[0098] Step S34, calculate and update the exploration reward U(s,a) for path sa: (3)

[0099] Where C is a normal number that controls the degree of exploration;

[0100] Step S35: Construct a probabilistic selection strategy π based on the expected performance Q(s,a) and the exploration reward U(s,a): (4) (5)

[0101] Where Score(s,a) represents the selection score for candidate node a. This represents the exponential sum of the scores of all nodes in path s that include the nodes to be expanded by algorithm a (called candidate nodes), ensuring that the selection probability meets the probability distribution requirements and amplifying the difference between high-scoring and low-scoring nodes. A(s) is the set of candidate nodes that can be selected for the current path s.

[0102] Step S36, based on the AlphaGo Zero strategy, the node expansion selection strategy is as follows: (6)

[0103] Once the maximum preset depth is reached, the expansion stops and the current complete causal discovery algorithm path is returned.

[0104] Preferably, step S4 includes:

[0105] Step S41: Run all algorithm nodes on the returned algorithm path and obtain the causal graph G for each node. z * , z∈[1,Z], where Z is the total number of nodes in the Monte Carlo tree; divide each causal graph G z *All causal relationships are processed using a voting method to obtain the final causal graph G. * ;

[0106] Step S42, according to The corresponding true causal graph G evaluates the causal graph G. * , to obtain G * The path x that produces the corresponding result * Overall performance score F(x) * ). The corresponding real causal graph G is the preset data.

[0107] Preferably, step S5 includes:

[0108] Step S51: Calculate the exploration reward U(s,a) of each node in the current complete algorithm path x, and pass it back up the path from the leaf node as the reward value;

[0109] Step S52: For each node sa on path x, increase the number of visits to the node n(sa);

[0110] Step S53; Update the expected performance Q(sa), with the following formula: (7)

[0111] Where F(x) is the performance score of the new path, Q new (sa) represents the updated performance expectation value, Q old (sa) represents the expected performance value before the update; n new (sa) represents the updated number of visits, n old (sa) represents the number of visits before the update;

[0112] Step S54: Repeat steps S52 and S53 to backpropagate U(s,a) and Q(sa) upwards layer by layer until the root node S0 is reached.

[0113] Step S55, use the validation set D vectify Verify the performance of the Monte Carlo tree.

[0114] Preferably, step S6 includes:

[0115] Step S61, for path x * Establish φ(x) * ), and φ(x * ) and F(x * Add to the training set {(φ(x)} n ),F(x n ))}middle;

[0116] Step S62, from the training set {(φ(x)} n ),F(x n Select N1 elements from ))} to generate a path validation set to validate the proxy model. If N1 < N, use the mean squared error (MSE) and coefficient of determination to evaluate the surrogate model's prediction. Record the performance data;

[0117] Step S63: Determine whether the proxy model needs to be updated. Specifically, an update is considered necessary when the obtained loss value is higher than the previous loss value, or when the prediction result of the surrogate model for determining the coefficient of determination exceeds the coefficient of determination threshold. Adjust the proxy model After obtaining the parameters, return to step S62;

[0118] Step S64: When the recorded performance data accumulates to N2, the proxy model is triggered. The update method is to implement the training process of step S2 based on the training set of step S61.

[0119] The present invention provides an apparatus for an adaptive causal discovery method, comprising an algorithm configuration module 21, a surrogate model module 22, a causal discovery algorithm search module 23, and an online algorithm integration module 24.

[0120] Algorithm configuration module 21 is used to integrate different types of causal discovery methods and generate the search space of the corresponding Monte Carlo tree search algorithm;

[0121] The proxy model module 22 is used to assist the Monte Carlo tree search algorithm in selecting the initial node and the expanded node based on historical causal discovery algorithm performance data.

[0122] The causal discovery algorithm search module 23 expands and simulates the Monte Carlo tree search algorithm in the constructed search space to find the optimal combination of causal discovery algorithms.

[0123] The online algorithm integration module 24 uses an online integration strategy to combine superior causal algorithms found based on Monte Carlo tree search to complete the prediction task for a given causal discovery task.

[0124] The implementation of the present invention is illustrated below through an example: During the weekday period from 19:00 to 21:00, the production warehouse experiences a decrease in throughput accompanied by an increase in P95 latency (O_latency_p95) and error rate (O_err_rate); two processes occur between 18:55 and 19:10:

[0125] T_parallel_workers_delta: The parallel limit is increased from 2 to 6 (+4);

[0126] T_work_mem_delta: Working memory is increased from 8MB to 32MB (+24MB);

[0127] Simultaneously, standard operational metrics and execution context were collected, including concurrency (X_concurrency), CPU utilization (X_cpu_util), I / O queue depth (X_io_queue_depth), and execution plan summary (X_plan_sig). The goal is to automatically select and run an optimal combination of causal discovery algorithms (Pipeline) on the data from this time period, outputting a stable complete graph. This provides causal evidence for whether to roll back the parallel configuration and memory configuration.

[0128] Based on the above configuration and the technical solution, the implementation steps for the corresponding example are given.

[0129] First, unify the parsing, time alignment, and standardization of multi-source logs such as query execution, configuration auditing, resource / error monitoring, and release records, organizing them into a two-dimensional table D: each row = 1-minute causal unit; each column is numerical and labeled with a prefix indicating its role: T_ (processing), O_ (result / goal), X_ (observable confounding), Z_ (tool / mediator / blocker), pre_ (derived using only information constructed before the in-row processing occurred). An example column is shown below (non-restrictive):

[0130] unit_id,start_ts,end_ts,instance_id,

[0131] T_parallel_workers_delta,T_work_mem_delta,

[0132] O_latency_p95,O_err_rate,O_throughput,

[0133] X_concurrency,X_cpu_util,X_io_queue_depth,X_plan_sig,

[0134] pre_latency_p50,pre_err_rate,pre_cpu_lag1

[0135] Second, establish an algorithm set A (several causal discovery operators that can be chained / replaced / with hyperparameters). The search state s represents a "partial pipeline" (e.g., Pip={A3} or {A5,A2}), and the action a represents "combining / replacing / adjusting hyperparameters of the pipeline". A leaf node is an executable complete pipeline Pip, which produces the entire causal graph at once after execution. Compared with whole-map level indicators ;

[0136] Third, run MCTS on D_train with a cold start configuration and without proxy items enabled, performing several rounds (e.g., 800 rounds) on both the O_latency_p95 and O_err_rate targets; run the entire pipeline once each time a leaf node is reached and record the overall graph metrics. Path elements Only the "root-to-leaf pipeline sequence, actual evaluation results, time cost, constraint hits, and other process evidence" are saved; no edge-by-edge operations are involved.

[0137] Fourth, {x n The statistics of} (pipeline length, combinatorial diversity, frequency of occurrence, early occurrence rate, consistency across time slices, averaging / variance performance and time cost, etc.) and the statistics of D. (Sample size, number of variables, missing rate, FD groups, relevant summaries, etc.) are concatenated into two-dimensional training samples to train a gradient boosting tree surrogate. And perform probability calibration. Follow-up. Only according to the original formula (2) fused into The estimate (or used for) Initialization); such as turning off or setting weights The system automatically reverts to a baseline without an agent;

[0138] Fifth, from any part of the pipeline status Departure, for candidate actions :

[0139] calculate (Formula (2)): Scoring based on the actual path With (if enabled) agent prediction The fusion yields the "expected overall graph performance of the expanded pipeline";

[0140] calculate (Formula (3)): By access count and constant Exploration rewards are created;

[0141] Sixth, the selected action may be "add an operator to the end of the existing pipeline", "replace the operator in the previous stage or its scoring / verification method", "switch the integration strategy or threshold", etc. If an executable pipeline is formed after expansion, proceed to S5; otherwise, continue expanding in the pipeline space. Constraints (time order / level / blacklist / whitelist / FD) are pruned in real time during candidate generation to mask invalid combinations.

[0142] Seventh, after reaching the leaf node, the entire pipeline is run once to obtain the complete diagram. Compared with whole-map level indicators If both accuracy and efficiency need to be considered simultaneously, a pre-defined method (e.g., normalized weighted average of AUPRC↑ and Time↓) can be used to aggregate the true reward / performance for that round. .

[0143] Eighth, The algorithm iterates back along the path from leaf to root, updating the visit count and node statistics according to the original rules, gradually converging the computational basis of Q, U, Score, and π. If "online integration" is enabled, the graph results from multiple high-confidence pipelines can be used for voting / robust aggregation to maintain a candidate graph pool; simultaneously, high-confidence samples are written as weak labels. The buffer allows for batch fine-tuning after the triggering conditions are met (without changing the main flow control).

[0144] Ninth, after the search converges, the optimal pipeline Pip* and the final complete graph are obtained under the current anomaly window. Example (values ​​are for illustrative purposes only):

[0145] Pip*: {A2(Score=MDL),A3(Independence Test=R),A6(Stability Selection),Ensemble=Weighted Voting};

[0146] Full-scale metrics (validation set): AUPRC 0.76, SHD 5, Time 1.2×baseline;

[0147] Key Relationships (Textual Summary):

[0148] T_parallel_workers_delta increases O_latency_p95 by boosting X_concurrency and X_cpu_util;

[0149] T_work_mem_delta provides a modest improvement over O_latency_p95, but it is insufficient to offset the congestion exacerbated by parallel processes.

[0150] The relationship between X_io_queue_depth and O_err_rate is stable;

[0151] Operations recommendations: Reduce the parallel limit to 2-3 during evening peak hours; retain the increase in work_mem; set a threshold for X_io_queue_depth to link with rate limiting and degradation strategies.

[0152] The following is a specific embodiment to illustrate the application process of the method of the present invention in a database fault diagnosis scenario:

[0153] I. Scene Setting

[0154] An online e-commerce database experienced an increase in both average query latency (O_latency) and error rate (O_error) during peak evening hours (19:00–21:00). Collected logs include execution logs, configuration audit logs, resource monitoring logs, release logs, and error logs.

[0155] Within this time window, the following typical variables were parsed from the logs:

[0156] 1. Processing variables (T_*) — Control behaviors that can lead to changes in the outcome:

[0157] 2. Confounding variables (X_) — Common factors affecting T_ and O_:

[0158] 3. Causal moderating variables (Z_*) — path inhibition or triggering factors:

[0159] 4. Target variable (O_*):

[0160] II. S1: Structured and Unified Representation:

[0161] Through step S1 of this invention, all logs are aligned by time, semantically normalized, and managed with versioning and splitting windows to generate a single table D. A typical row is shown below (only some columns are shown):

[0162] Table D is the direct input to the causal discovery algorithm and does not require additional format conversion.

[0163] III. S2: Training the surrogate model F b (Based on path set {x n})

[0164] The system first performs a cold start search on D, obtaining several pipeline operation paths, for example:

[0165] • Path 1: PC→GES→CAM;

[0166] ·Path 2: Golem→LiNGAM→RL Causal learner;

[0167] ·Path 3: NOTEARS→GES→ANM;

[0168] These paths form the record set {x n The surrogate model Fb is trained together with the statistical information θ(D) and used for subsequent estimation and initialization of Q(s,a).

[0169] IV. S3–S6: Pipeline-level Causal Discovery and Search Optimization

[0170] System integration:

[0171] •Q(s,a) (cumulative performance value);

[0172] ·U(s,a) (confidence boosting term);

[0173] •Score(s,a) (Comprehensive scoring item);

[0174] ·π(a|s) (probability of candidate action);

[0175] The process is executed at the pipeline level: select—expand—simulate—return.

[0176] At each leaf node, the system runs the entire pipeline, resulting in a candidate cause-effect graph, for example:

[0177] ·G¹:max_connections→lock_conflict→O_latency;

[0178] ·G²: index_rebuild→IO_pressure→O_latency;

[0179] ·G³:parallel_workers→checkpoint_status→O_error;

[0180] And record the evaluation metrics (such as SHD / FDR / TPR / AUPRC / Time).

[0181] All candidate graphs are entered into an online integration strategy to generate the final graph G*.

[0182] V. S7: Final causal structure output and root cause location (Key steps: rewritten as required)

[0183] The final output causal graph G* is shown below:

[0184] • T2 (increased work_mem) → Z1 (increased lock contention rate) → O_latency (increased average latency)

[0185] • T4 (index_rebuild) → X2 (IO_pressure increases); → O_error (error rate increases);

[0186] This means that the database failure was caused by two main processing variables, resulting in the abnormal outcome:

[0187] 1. Adjustment of work_mem (T2) triggers lock contention, leading to increased latency;

[0188] 2. Index rebuilding (T4) increases I / O pressure, leading to a higher error rate.

[0189] The system output includes:

[0190] • Optimal piping configuration (Pip*);

[0191] The final causal graph G*;

[0192] • The critical causal link pointing to O_*;

[0193] • Root dependent variables (T2 and T4);

[0194] • Recommended measures (callback to work_mem, pause index rebuilding, temporary rate limiting, etc.);

[0195] This result can be directly translated into operational actions for quickly fixing database anomalies. It can be applied to database maintenance on e-commerce platforms and database performance optimization on logistics platforms.

[0196] According to embodiments disclosed herein, the present invention also provides an electronic device, a readable storage medium, and a computer program product. The electronic device is intended to represent various forms of digital computers, including a computing unit that can perform various appropriate actions and processes based on a computer program stored in a read-only memory (ROM) or a computer program loaded from a storage unit into random access memory (RAM). Various programs and data required for device operation may also be stored in the RAM. The computing unit, ROM, and RAM are interconnected via a bus. Input / output (I / O) interfaces are also connected to the bus.

[0197] Multiple components in the device are connected to the I / O interface, including: input units, output units, storage units, and communication units. The communication unit allows the device to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0198] The computing unit can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities, performing the various methods and processes described above, such as the adaptive causal discovery method based on Monte Carlo trees.

[0199] The above-disclosed embodiments are merely preferred embodiments of the present invention and should not be construed as limiting the scope of the invention. Those skilled in the art will understand that implementing all or part of the above-described embodiments and making equivalent changes in accordance with the claims of the present invention are still within the scope of the invention.

Claims

1. A database fault root cause localization method based on causal discovery, characterized in that, include: Step S1 involves uniformly accessing, parsing, aligning the time, and standardizing the semantics of the multi-source runtime logs of the database system, then organizing them into a two-dimensional data table D={ for direct input into the causal discovery algorithm. The process involves simultaneously generating a variable dictionary and structural or semantic constraints; where the rows and columns of D correspond to causal units and variables after numerical changes, respectively, and variable types include treatment variables, confounding variables, causal regulation variables, outcome variables, and derived features; and simultaneously establishing a statistical information set. ={ }, For a set of elements Statistical information; dividing D into non-overlapping training sets. and verification set ; Step S2: Construct the causal discovery algorithm set A and the gradient boosting tree base class on the training set. The above describes a cold start method without enabling proxy items to perform causal discovery and obtain path combinations. Train to obtain the proxy model ; Step S3: Construct a Monte Carlo tree. After selecting the root node from the causal discovery algorithm set A, utilize the surrogate model. Predict the performance score of the path to be expanded, select child nodes based on the expected performance of the path to the node and the exploration reward, and expand layer by layer to the leaf node; Step S4: Run the Monte Carlo tree and use a voting method to derive the final causal graph G based on all causal relationships in the causal graph derived from each node. * and utilizing the aforementioned proxy model F b Predicting G * The performance score of the path that produces the corresponding result; Step S5: Calculate the exploration reward and performance expectation of each node in the complete algorithm path, and backpropagate the exploration reward and performance expectation from the leaf node to the root node along the path. Step S6: Update the proxy model F based on all paths searched by the Monte Carlo tree. b ; Step S7: Input the two-dimensional data table D1 corresponding to the new database fault root cause localization task into the Monte Carlo tree to obtain the cause-effect graph. ,according to Middle refers to abnormal result variables The causal chain automatically identifies the influence The treatment variables are used as the root cause diagnosis conclusion.

2. The database fault root cause localization method based on causal discovery as described in claim 1, characterized in that, Step S2 includes: Step S21: Construct the causal discovery algorithm set A and define the coding rules for standardized paths; Step S22, under the cold start configuration without enabling the proxy model, use a uniform random seed and hyperparameters in Perform MCTS causal discovery on each target variable column. It runs independently and records the search trajectory in a bypass mode throughout the process, solidifying it into path combinations according to the agreed encoding rules. ; Step S23: After establishing and training the gradient boosting tree model, the surrogate model F is obtained. b The implementation steps include: Step S231, in the training dataset D train Run set A for each path i The causal discovery algorithm a ij Generate a cause-effect graph and calculate the performance score F(x). n ): ; In the formula, w1, w2, w3, and w4 are weights, and SHD(x) n ) represents path x n Structural Hamming distance, AUPRC(x) n ) represents path x n Precision recall, TPR(x) n ) represents path x n The true rate of occurrence, FDR(x) n ) represents path x n False discovery rate; Step S232, for each path x n Extract the feature φ(x) n ), where φ(x) n Includes path structure and algorithm selection. ij and statistical information set θ train ; Step S233, establish the training set {(φ(x)} n ),F(x n ))}, using the training set {(φ(x)} n ),F(x n Train the agent model F b The proxy model F b The goal is to minimize the error between the predicted value and the true score, as shown in the formula: ; Among them, when the maximum number of training iterations is reached or the loss converges, the surrogate model F b Training is over.

3. The database fault root cause localization method based on causal discovery as described in claim 2, characterized in that, Step S3 includes: Step S31, based on the observation dataset D train Statistical information set θ train From set A i Randomly select A i (S0) serves as the initial node of the Monte Carlo tree; Step S32, using the proxy model F b Predict the performance of extending the selection of the current path s to candidate node a in a Monte Carlo tree, and obtain the predicted performance score F. b (sa), a∈A i Calculate the expected performance Q(s,a) after the current path s is expanded to candidate node a: ; Where Q(s,a) represents the average performance prediction value after the current path s is extended to the candidate node a, X(sa) represents the complete set of paths generated from the extension of path sa, x represents a complete path generated from sa, F(x) represents the performance score of the complete path x, and β represents the weighting factor. Step S33: During the training process, after each calculation of Q(s,a), update n(s,a) and n(s), where n(s,a) represents the number of visits to the candidate node a when the current path s is extended, and n(s) represents the number of visits to the current path s. Step S34, calculate and update the exploration reward U(s,a) for path sa: ; Where C is a normal number that controls the degree of exploration; Step S35: Construct a probabilistic selection strategy π based on the expected performance Q(s,a) and the exploration reward U(s,a): ; ; Where Score(s,a) represents the selection score for candidate node a. This represents the exponential sum of the scores of all algorithms a to be extended in path s, where A(s) is the set of candidate nodes that can be selected for the current path s; Step S36, based on the AlphaGo Zero strategy, the node expansion selection strategy is as follows: ; Once the maximum preset depth is reached, the expansion stops and the current complete causal discovery algorithm path is returned.

4. The database fault root cause localization method based on causal discovery as described in claim 3, characterized in that, Step S4 includes: Step S41: Run all algorithm nodes on the returned algorithm path and obtain the causal graph G for each node. z * , z∈[1,Z], where Z is the total number of nodes in the Monte Carlo tree; divide each causal graph G z * All causal relationships are processed using a voting method to derive the final causal graph. ; Step S42, according to D train The corresponding true causal graph G evaluates the causal graph. ,get The path x that produces the corresponding result * Overall performance score F(x) * ).

5. The database fault root cause localization method based on causal discovery as described in claim 4, characterized in that, Step S5 includes: Step S51: Calculate the exploration reward U(s,a) of each node in the current complete algorithm path x, and pass it back up the path from the leaf node as the reward value; Step S52: For each node sa on path x, increase the number of visits to the node n(sa); Step S53; Update the expected performance Q(sa), with the following formula: ; Where F(x) is the performance score of the new path, Q new (sa) represents the updated performance expectation value, Q old (sa) represents the expected performance value before the update; n new (sa) represents the updated number of visits, n old (sa) represents the number of visits before the update; Step S54: Repeat steps S52 and S53 to backpropagate U(s,a) and Q(sa) upwards layer by layer until the root node S0 is reached. Step S55, use the validation set D vectify Verify the performance of the Monte Carlo tree.

6. The database fault root cause localization method based on causal discovery as described in claim 5, characterized in that, Step S6 includes: Step S61, for path x * Establish φ(x) * ), and φ(x * ) and F(x * Add to the training set {(φ(x)} n ),F(x n ))}middle; Step S62, from the training set {(φ(x)} n ),F(x n Select N1 elements from ))} to generate a path validation set to verify the surrogate model F. b If N1 < N, use the mean squared error (MSE) and coefficient of determination to evaluate the surrogate model's prediction of the surrogate model F. b Record the performance data; Step S63: Determine whether the proxy model F needs to be updated. b Specifically, when the obtained Loss value is higher than the previous Loss value, or when the prediction result of the determination coefficient evaluation proxy model exceeds the determination coefficient threshold, it is considered that F needs to be updated. b Adjust the proxy model F b After obtaining the parameters, return to step S62; Step S64: When the recorded performance data accumulates to N2, the agent model F is triggered. b The update is performed by implementing the training process of step S2 based on the training set of step S61.

7. The database fault root cause localization method based on causal discovery as described in claim 6, characterized in that, In step S7, the columns of D1 are subsets of D, and the output of step S7 includes the optimal pipeline configuration Pip* based on the Monte Carlo tree that eventually converges, and the cause-effect graph. ,Depend on The root cause diagnosis conclusions derived from the causal structure and the corresponding recommended measures, among which, It reflects the causal dependencies of all treatment variables, confounding variables, causal regulation variables and outcome variables, identifies one or more treatment variables that have a significant impact on the outcome abnormality, and provides the causal links between each treatment variable with a significant impact and the outcome variable.

8. An electronic device, comprising: At least one processor; And a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.

Citation Information

Cited By

  • A multi-agent collaborative retrieval system and method based on large model causal verification

    CN122262318A

  • A database maintenance slow query positioning repair method, device and medium

    CN122412394A