Dynamic width sampling enhanced multi-agent microservice root cause analysis method and device
The multi-agent microservice root cause analysis method enhanced by dynamic width sampling solves the problems of high computational overhead and low diagnostic accuracy in multi-agent collaboration mode in microservice environment, realizes efficient and accurate fault root cause analysis, and improves operation and maintenance diagnosis efficiency.
Patent Information
- Application Number
- CN202611006597.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-07
- Publication Date
- 2026-11-27
AI Technical Summary
Existing multi-agent collaboration models are difficult to adapt to nondeterministic faults in microservice environments, resulting in high computational overhead and low diagnostic accuracy. Furthermore, traditional root cause analysis methods have poor generalization ability when dealing with massive heterogeneous data and are difficult to handle unstructured data.
A multi-agent microservice root cause analysis method with dynamic width sampling enhancement is adopted. Through the process of generating candidate reasoning steps in multiple directions, semantic clustering calibration, candidate reasoning trajectory construction, and trajectory scoring and selection, logically consistent reasoning steps are integrated to eliminate noise interference and computational overhead, thereby achieving efficient and accurate root cause analysis.
It significantly improves the efficiency and reliability of microservice system operation and maintenance diagnosis, realizes the automation and high accuracy of root cause analysis, and reduces noise interference and computational overhead in the reasoning process.
Smart Images

Figure CN123178131A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of microservice fault diagnosis technology, and in particular to a multi-agent microservice root cause analysis method and apparatus with dynamic width sampling enhancement. Background Technology
[0002] With the rapid evolution of cloud computing and containerization technologies, microservice architecture has become the mainstream paradigm for supporting large-scale IoT applications. In this highly decoupled system, extremely complex and dynamic call dependencies exist between services, making it easy for even minor failures in a single node to trigger a chain reaction, leading to large-scale service avalanche. Therefore, Root Cause Analysis (RCA) for intelligent operations and maintenance in microservice environments has become crucial for ensuring high system availability.
[0003] In related technologies, traditional root cause analysis methods are usually based on predefined expert rules or deep learning models. However, when faced with massive amounts of heterogeneous multimodal observation data such as metrics, logs, and call chains, they often exhibit limitations such as poor generalization and difficulty in handling unstructured data. Summary of the Invention
[0004] This invention provides a dynamic width sampling enhanced multi-agent microservice root cause analysis method and apparatus. Through a complete process of multi-directional candidate inference step generation, semantic clustering calibration, candidate inference trajectory construction, trajectory scoring and selection, and final root cause output, it comprehensively covers all dimensions of fault diagnosis. By integrating and simplifying semantically similar and logically consistent inference steps, it effectively reduces noise interference and computational overhead in subsequent inference processes, ultimately achieving automation, efficiency, and high accuracy in microservice fault root cause analysis, significantly improving the efficiency and reliability of microservice system operation and maintenance diagnosis.
[0005] This invention provides a multi-agent microservice root cause analysis method with dynamic width sampling enhancement, comprising the following steps: Based on the alarm data of the microservice system, generate candidate reasoning steps with multiple different reasoning directions for troubleshooting; Semantic clustering is performed on the multiple candidate reasoning steps to obtain calibrated candidate reasoning steps; For each of the calibrated candidate inference steps, a corresponding candidate inference trajectory is generated. The optimal inference trajectory is determined based on the scores of each candidate inference trajectory. Based on the optimal reasoning trajectory, the root cause analysis results of the microservice system failure are output.
[0006] According to the present invention, a multi-agent microservice root cause analysis method with dynamic width sampling enhancement is provided, wherein semantic clustering is performed on the plurality of candidate inference steps to obtain calibrated candidate inference steps, including: The candidate reasoning steps are clustered, and the candidate reasoning steps within the same cluster are deduplicated, summarized, and conflict-checked to obtain the calibrated candidate reasoning steps.
[0007] According to the multi-agent microservice root cause analysis method with dynamic width sampling enhancement provided by the present invention, after obtaining the calibrated candidate inference step, the method further includes: For any cluster category, the number of candidate inference steps is calibrated based on the comparison between the number of candidate inference steps within the cluster category and a preset density compensation threshold.
[0008] According to the present invention, a multi-agent microservice root cause analysis method with dynamic width sampling enhancement is provided, wherein the step of calibrating the number of candidate inference steps after calibration based on the comparison result of the number of candidate inference steps within the cluster category and a preset density compensation threshold includes: If the number of candidate inference steps within the cluster category is greater than or equal to the preset density compensation threshold, the number of calibrated candidate inference steps corresponding to the cluster category is equal to the preset density compensation threshold. If the number of candidate inference steps within a cluster category is less than the preset density compensation threshold, the cluster category corresponds to only one calibrated candidate inference step.
[0009] According to the present invention, a multi-agent microservice root cause analysis method with dynamic width sampling enhancement is provided, wherein generating corresponding candidate inference trajectories for each of the calibrated candidate inference steps includes: Based on the calibrated candidate inference steps, multi-step prospective inference is performed to generate the candidate inference trajectory.
[0010] According to the present invention, a multi-agent microservice root cause analysis method with dynamic width sampling enhancement is provided, wherein determining the optimal inference trajectory based on the scores of each candidate inference trajectory includes: The scores for each candidate reasoning trajectory are determined based on their logical consistency, evidence completeness, and matching degree with alarm data. The candidate inference trajectory with the highest score is selected as the optimal inference trajectory.
[0011] According to the present invention, a multi-agent microservice root cause analysis method with dynamic width sampling enhancement is provided, wherein the semantic clustering of the plurality of candidate inference steps includes: Based on a pre-defined clustering model, the candidate inference steps are clustered; wherein, the clustering model is trained in the following manner: The historical reasoning steps are converted into semantic vectors and then dimensionality reduction is performed. An adaptive density clustering method is used to cluster the dimensionality-reduced semantic vectors to generate pseudo-labels; The classification model is trained using the generalized cross-entropy loss based on the pseudo-labels, and the clustering model is obtained.
[0012] According to the dynamic width sampling enhanced multi-agent microservice root cause analysis method provided by the present invention, the root cause analysis results of the microservice system failure include at least one of the following: Root cause component, fault type, fault location, fault cause description, and fault handling suggestions.
[0013] The present invention also provides a multi-agent microservice root cause analysis device with dynamic width sampling enhancement, comprising the following modules: The generation module is used to generate candidate reasoning steps for troubleshooting in multiple different reasoning directions based on the alarm data of the microservice system. The clustering module is used to perform semantic clustering on the multiple candidate reasoning steps to obtain calibrated candidate reasoning steps. The processing module is used to generate corresponding candidate inference trajectories for each of the calibrated candidate inference steps. The scoring module is used to determine the optimal inference trajectory based on the scores of each candidate inference trajectory; The analysis module is used to output the root cause analysis results of the microservice system failure based on the optimal inference trajectory.
[0014] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the dynamic width sampling enhanced multi-agent microservice root cause analysis method as described above.
[0015] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the dynamic width sampling enhanced multi-agent microservice root cause analysis method as described above.
[0016] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the dynamic width sampling enhanced multi-agent microservice root cause analysis method as described above.
[0017] The dynamic width sampling enhanced multi-agent microservice root cause analysis method and apparatus provided by this invention comprehensively covers all dimensions of fault diagnosis through a complete process of multi-directional candidate inference step generation, semantic clustering calibration, candidate inference trajectory construction, trajectory scoring and selection, and final root cause output. By integrating and simplifying semantically similar and logically consistent inference steps, it effectively reduces noise interference and computational overhead in subsequent inference processes, ultimately achieving automation, efficiency, and high accuracy of microservice fault root cause analysis, significantly improving the efficiency and reliability of microservice system operation and maintenance diagnosis. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0019] Figure 1 This is a flowchart illustrating the dynamic width sampling enhanced multi-agent microservice root cause analysis method provided by the present invention.
[0020] Figure 2 This is a schematic diagram of the structure of the dynamic width sampling enhanced multi-agent microservice root cause analysis device provided by the present invention.
[0021] Figure 3 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0023] The following is combined with Figures 1 to 3 This invention describes a dynamic width sampling enhanced multi-agent microservice root cause analysis method and apparatus.
[0024] To facilitate a clearer understanding of the technical solutions of the various embodiments of this application, some technical content related to the various embodiments of this application will be introduced first.
[0025] In recent years, Large Language Models (LLMs) have been widely used in automated fault diagnosis tasks due to their superior logical reasoning and planning capabilities. However, existing single-agent-based methods have significant drawbacks when dealing with long-chain complex faults: on the one hand, the massive amounts of runtime data generated by microservice systems far exceed the context window capacity of a single agent, easily leading to the truncation and loss of key contextual information; on the other hand, single agents lack effective self-correction mechanisms, and noise and errors in the reasoning chain accumulate with each step, ultimately resulting in insufficient robustness of the diagnostic results.
[0026] To overcome the performance bottleneck of single-agent systems, introducing multi-agent collaborative frameworks for root cause analysis has become a trend. Through role differentiation and interactive collaboration, multi-agent systems can significantly reduce the load on individual perception and enhance the system's fault tolerance. Although multi-agent frameworks have theoretical advantages, they still face significant challenges in practical applications. Most existing collaborative models rely on static standard operating procedures (SOPs) or rigid voting mechanisms, making it difficult for models to adapt to nondeterministic out-of-distribution (OOD) failures in microservice environments.
[0027] A more critical issue lies in the fact that existing multi-agent inference sampling mechanisms generally employ static sampling widths. This means that regardless of the complexity of the fault, the system executes a fixed number of inference paths in parallel. This mechanism not only generates a large amount of redundant inference computation in simple fault scenarios, causing significant computational overhead and latency, but also, due to the lack of real-time intermediate state aggregation, erroneous inference paths cannot be intercepted in time, leading to the continuous propagation of noise in multi-turn dialogues, severely impacting the accuracy and efficiency of diagnosis. Therefore, how to maintain diagnostic depth while dynamically adjusting the width of the inference trajectory to eliminate redundant noise and optimize computational overhead has become a pressing technical challenge in the field of microservice intelligent root cause analysis.
[0028] With the rapid development of cloud computing, microservices, and containerization technologies, microservice architecture has become a core paradigm supporting large-scale IoT applications. By decoupling complex monolithic applications into fine-grained services with high cohesion and low coupling, microservices greatly improve the flexibility and scalability of system development. However, this highly distributed architecture also brings an exponential increase in operational complexity. Faced with massive amounts of multimodal observation data such as metrics, logs, and distributed call chains, field reliability engineers (SREs) must complete the decision-making process from anomaly detection to root cause analysis (RCA) within a tight time window, which poses a significant challenge to the accuracy and timeliness of automated operations and maintenance (AIOps).
[0029] Currently, LLM-based agents demonstrate powerful logical reasoning and planning capabilities in the RCA (Relational Computational Analysis) domain. However, existing technologies still have shortcomings in handling microservice fault analysis. Existing multi-agent collaboration mechanisms are mostly based on greedy strategies or rigid voting, which are prone to accumulating noise or getting stuck in infinite loops in complex reasoning chains, making it impossible to achieve high-confidence consensus within a limited number of reasoning steps. In addition, traditional thought chain sampling methods (such as CoT-SC and ToT) use fixed sampling widths, which cannot dynamically adjust computing power according to the difficulty of fault diagnosis, resulting in a large amount of redundant overhead when handling simple faults.
[0030] Figure 1 This is one of the flowcharts illustrating the dynamic width sampling enhanced multi-agent microservice root cause analysis method provided by the present invention, such as... Figure 1 As shown, the method includes the following: Step 101: Based on the alarm data of the microservice system, generate candidate inference steps for multiple different inference directions for troubleshooting.
[0031] Specifically, this application takes alarm data generated by microservice operation as input, and generates multiple reasoning steps pointing to different fault investigation directions based on alarm information, thereby effectively covering multi-dimensional and multi-path fault investigation possibilities, breaking through the limitations of a single reasoning direction, comprehensively covering potential fault causes, and avoiding root cause omissions due to a single reasoning path.
[0032] Step 102: Perform semantic clustering on multiple candidate reasoning steps to obtain calibrated candidate reasoning steps.
[0033] Specifically, after generating multiple candidate reasoning steps for fault diagnosis based on alarm data from the microservice system, this application can perform semantic-level clustering on the generated multi-directional candidate reasoning steps to identify semantically similar, redundant, or conflicting reasoning steps, complete deduplication, induction, and conflict verification, and output calibrated reasoning steps. This effectively eliminates redundant and contradictory reasoning steps, simplifies the reasoning set, unifies similar reasoning logic, reduces interference from invalid reasoning, and improves the efficiency and accuracy of subsequent reasoning trajectory generation.
[0034] Step 103: For each calibrated candidate inference step, generate the corresponding candidate inference trajectory.
[0035] Specifically, after semantically clustering multiple candidate reasoning steps to obtain calibrated candidate reasoning steps, this application can use each calibrated candidate reasoning step as a starting point to expand a single-point reasoning step into a complete reasoning chain, forming multiple independent candidate reasoning trajectories.
[0036] Step 104: Determine the optimal reasoning trajectory based on the scores of each candidate reasoning trajectory.
[0037] Specifically, after generating corresponding candidate inference trajectories for each calibrated candidate inference step, each candidate inference trajectory can be scored according to a preset scoring rule. Based on the scoring results, the inference trajectory with the highest score is selected as the optimal trajectory, thereby effectively improving the accuracy of root cause localization.
[0038] Step 105: Based on the optimal inference trajectory, output the root cause analysis results of the microservice system failure.
[0039] Specifically, after determining the optimal inference trajectory based on the scores of each candidate inference trajectory, this application can derive and output the root cause analysis results of microservice system failures based on the selected optimal inference trajectory, providing an accurate basis for microservice failure repair and operation and maintenance, and realizing automated and efficient root cause analysis of failures.
[0040] For example, this application provides a multi-agent collaborative root cause analysis framework for microservice scenarios, consisting of 7 agents. Through arbitration evaluation and inference path merging, it efficiently achieves automated root cause analysis from original alarms to solution generation in microservice scenarios. The framework's workflow is as follows: (1) Alarm preprocessing stage: The alarm management agent serves as the entry point of the process, and is responsible for aggregating the original alarms generated by the microservice system, and completing the priority evaluation based on the characteristics such as type, duration and scope of impact, and storing the structured event report in the queue to be analyzed.
[0041] (2) Task orchestration and scheduling stage: The task planning agent extracts tasks from the queue, acts as the control center, uses the ReAct paradigm to drive the entire analysis process, and issues instructions to the underlying expert agents as needed.
[0042] (3) Multidimensional expert analysis stage: In this stage, the Metric Analyst, Log Analyst and Trace Analyst receive planning instructions, call specific data crawling tools to extract abnormal features in heterogeneous data, and convert them into text summaries to return to the planning layer.
[0043] (4) Inference Trajectory Optimization Stage: To improve analysis efficiency, the system optimizes the inference trajectory. In this stage, the arbitration agent uses CoT to quantitatively score the candidate inference trajectories generated by expert feedback. By evaluating logical consistency and conflict indicators, the optimal trajectory is selected and incorporated into the context of the task planning agent, achieving dynamic correction and redundancy removal of the inference path. Steps (2), (3), and (4) are repeated until the task planning agent determines that root cause localization has been completed.
[0044] (5) Conclusion and solution generation stage: After the task planning agent completes the root cause localization, the solution advisor integrates all contextual reasoning evidence and outputs the final root cause analysis conclusion and corresponding solution suggestions.
[0045] The method described above comprehensively covers all dimensions of fault diagnosis through a complete process of generating multi-directional candidate inference steps, semantic clustering calibration, candidate inference trajectory construction, trajectory scoring and selection, and final root cause output. By integrating and simplifying inference steps with similar semantics and consistent logic, it effectively reduces noise interference and computational overhead in subsequent inference processes, ultimately achieving automation, efficiency, and high accuracy in microservice fault root cause analysis, and significantly improving the efficiency and reliability of microservice system operation and maintenance diagnosis.
[0046] In some embodiments, semantic clustering is performed on multiple candidate reasoning steps to obtain calibrated candidate reasoning steps, including: The candidate reasoning steps are clustered, and the candidate reasoning steps within the same cluster are deduplicated, summarized, and conflict checked to obtain the calibrated candidate reasoning steps.
[0047] Specifically, after generating multiple candidate inference steps with different inference directions for fault diagnosis based on alarm data from the microservice system, this application can further perform semantic clustering on the candidate inference steps. Optionally, the candidate inference steps can first be divided into the same cluster category according to semantic similarity, and then deduplication, induction, and conflict verification can be performed on the inference steps within each category in sequence to finally obtain calibrated candidate inference steps. This effectively unifies the logic of similar inferences, standardizes the inference criteria, significantly improves the logic, consistency, and simplicity of candidate inference steps, reduces inference noise and invalid calculations, and thus can accurately generate high-quality inference trajectories and improve the accuracy of root cause analysis.
[0048] For example, in the inference trajectory optimization stage, this application guides the reasoning and invocation behavior of the task planning agent through semantic clustering and trajectory evaluation, balancing the inference depth and computational overhead in complex root cause analysis tasks. Optionally, this application models the inference process of the task planning agent as a Markov decision process. Definition This represents the historical inference trajectory up to time t. To capture the complete context of the decision, each inference step... Defined as a semantic triple: in, The internal thought process of the task planning agent. This represents the action instructions it issues to a specific expert agent. A summary of feedback from the expert agent. The historical trajectory is represented as: exist At any given moment, in order to break free from the limitations of a single reasoning path, the task planning agent is based on... Perform k random samplings in parallel to generate a set of candidate inference steps. Because the original text is highly sparsity, directly deduplicating it in the text space would result in the loss of semantic relationships. Therefore, this application first projects the discrete text sequence into a high-dimensional latent space. Utilizing pre-trained embedding models Extract the feature vector of each candidate step : Subsequently, a reasoning trajectory clusterer was used. Logical clustering is performed on semantic vectors. The purpose of this step is to group semantically similar reasoning paths that are redundant only in their expression into the same logical category. : After obtaining the category division, for subsets belonging to the same logical category c This application utilizes the inductive power of LLM for conflict review and knowledge extraction. This process synthesizes a more representative and concise candidate step by eliminating logical contradictions between different sampling branches. : , This effectively unifies the logic of similar reasoning, significantly improves the logic, consistency and simplicity of candidate reasoning steps, and reduces reasoning noise and invalid calculations.
[0049] The method described above clusters candidate inference steps, performs deduplication, summarization, and conflict verification on candidate inference steps within the same cluster category, and obtains calibrated candidate inference steps. This effectively eliminates repetitive, contradictory, and redundant statements, unifies inference logic and standards, significantly reduces inference noise and redundant computational overhead, and provides a stable and reliable basis for generating high-quality inference trajectories and accurately locating the root causes of faults. It effectively balances the inference depth and computational efficiency of microservice root cause analysis.
[0050] In some embodiments, after obtaining the calibrated candidate inference steps, the method further includes: For any cluster category, the number of candidate inference steps is calibrated based on the comparison between the number of candidate inference steps within the cluster category and the preset density compensation threshold.
[0051] Specifically, this application clusters candidate inference steps, performs deduplication, summarization, and conflict verification on candidate inference steps within the same cluster category, and obtains calibrated candidate inference steps. Further, for each cluster category, the number of original candidate inference steps within that category is compared with a preset density compensation threshold, and the number of calibrated candidate inference steps is calibrated based on the comparison results. In other words, this application calibrates the number of inference steps by introducing a density compensation mechanism. This ensures the diversity of inference directions while effectively balancing the sampling probability and weight distribution of different inference paths, avoiding search bias due to an excessive number of inference steps of a certain type, or being ignored due to an insufficient number. This improves the rationality and robustness of subsequent inference trajectory generation, further enhancing the reliability of root cause analysis results.
[0052] In some embodiments, the number of candidate inference steps is calibrated based on a comparison between the number of candidate inference steps within a cluster category and a preset density compensation threshold, including: If the number of candidate inference steps within a cluster category is greater than or equal to the preset density compensation threshold, the number of calibrated candidate inference steps corresponding to the cluster category is equal to the preset density compensation threshold. If the number of candidate inference steps within a cluster category is less than the preset density compensation threshold, the cluster category corresponds to only one calibrated candidate inference step.
[0053] Specifically, in this embodiment, if the number of original candidate inference steps within a cluster category is greater than a preset density compensation threshold, the number of calibrated candidate inference steps for that category is limited to be equal to the density compensation threshold. Optionally, if the number of original candidate inference steps within a cluster category is less than the preset density compensation threshold, only one calibrated candidate inference step is retained for that category. This achieves reasonable retention of high-consensus inference directions and simplification of low-frequency inference directions, effectively avoiding computational waste caused by excessive redundancy of high-frequency inference directions and preventing the omission of low-frequency but crucial inference directions. It achieves an optimal balance between inference coverage and computational efficiency, significantly improving the stability of the inference process and the credibility of root cause analysis results.
[0054] For example, this application considers that simply performing semantic clustering on candidate inference steps would erase frequency information from the original samples, thus weakening the weight of the "majority" opinion. To calibrate the distribution balance of inference weights, this application introduces a density compensation threshold. If the original subset size within the cluster category Exceed This indicates that the reasoning direction has a high degree of consensus, and this application uses redundant replication to lock its proportion in subsequent searches. Conversely, a single sample is retained. The final calibration candidate set is generated. as follows: The method described above, through a quantization calibration rule based on a density compensation threshold, effectively restores and balances the frequency distribution and weight ratio of the original inference steps while preserving the semantic consistency of inference. It reasonably strengthens inference directions with high consensus and high confidence while retaining inference directions with low frequency and potential criticality, avoiding inference weight imbalance and loss of effective information. This further enhances the diversity, rationality, and robustness of inference paths, optimizes inference sampling efficiency, and thus generates more reliable inference trajectories, improving the accuracy of microservice failure root cause analysis.
[0055] In some embodiments, for each calibrated candidate inference step, a corresponding candidate inference trajectory is generated, including: Based on the calibrated candidate inference steps, perform multi-step prospective inference to generate candidate inference trajectories.
[0056] Specifically, after semantically clustering multiple candidate reasoning steps to obtain calibrated candidate reasoning steps, this application can use each calibrated candidate reasoning step as a starting point to perform multiple forward-looking reasoning steps, extending to form a complete reasoning chain, and finally generating the corresponding candidate reasoning trajectory, thereby improving the completeness and logic of the reasoning trajectory.
[0057] For example, this application aims to assess the long-term effectiveness of current decisions. Each candidate branch in the process performs a forward-looking exploration. The task planning agent starts from... Starting from there, continue reasoning downwards for n steps until the preset maximum search depth N is reached or a termination symbol is triggered. This step generates a set of candidate trajectories. : This kind of exploration can effectively identify pseudo-paths that "seem reasonable in the short term but lead to a dead end in the long term".
[0058] The method described in the above embodiments extends single-point reasoning into a complete and coherent reasoning chain by performing multi-step forward-looking reasoning and deep exploration starting from the calibrated candidate reasoning steps. This not only improves the completeness and logic of the candidate reasoning trajectory, but also identifies and eliminates pseudo-paths that are reasonable in the short term but ineffective in the long term in advance, avoiding reasoning from getting stuck in a dead end or local optimum, and greatly enhancing the reliability and predictability of the reasoning process.
[0059] In some embodiments, determining the optimal inference trajectory based on the scores of each candidate inference trajectory includes: The scores for each candidate reasoning trajectory are determined based on its logical consistency, completeness of evidence, and matching degree with alarm data. The candidate inference trajectory with the highest score is selected as the optimal inference trajectory.
[0060] Specifically, this application generates corresponding candidate inference trajectories for each calibrated candidate inference step. Each candidate inference trajectory is then comprehensively scored across three dimensions: logical consistency, completeness of evidence, and matching degree with alarm data. The candidate inference trajectory with the highest score is determined as the optimal inference trajectory. In other words, this application employs a multi-dimensional quantitative scoring mechanism to objectively evaluate the inference trajectory, ensuring that the selection of the optimal trajectory is based on sufficient evidence and standardized criteria. This effectively improves the rigor and credibility of fault reasoning, avoids biases caused by subjective judgment, and ultimately outputs accurate and reliable root cause analysis results.
[0061] For example, in this embodiment of the application, the arbitration agent acts as a global observer, evaluating the set based on content consistency and the logicality of the evidence chain. The trajectory in the data is scored. Scoring function. The system comprehensively considers whether the reasoning steps are consistent with the logic of the original alarm evidence, with a scoring range of (0,1). The system selects the candidate reasoning trajectory with the highest score. , and join the historical trajectory.
[0062] After updating the historical trajectory, the dynamic sampling loop is repeated until the planning agent selects an inference trajectory with a final state of 'Finish'.
[0063] The method described above determines the optimal reasoning trajectory by quantifying and scoring from three dimensions: logical consistency, evidence completeness, and alarm matching degree. This effectively avoids bias caused by subjective judgment, improves the accuracy of root cause localization, and outputs accurate and reliable root cause analysis results.
[0064] In some embodiments, semantic clustering of multiple candidate reasoning steps includes: Based on a pre-defined clustering model, candidate inference steps are clustered; the clustering model is trained in the following manner: The historical reasoning steps are converted into semantic vectors and then dimensionality reduction is performed. An adaptive density clustering method is used to cluster the dimensionality-reduced semantic vectors to generate pseudo-labels; The classification model is trained using generalized cross-entropy loss based on pseudo-labels, resulting in a clustering model.
[0065] Specifically, in this embodiment, a pre-trained clustering model is used to perform semantic clustering of candidate inference steps. Optionally, during the training of the clustering model, this application first converts historical inference steps into high-dimensional semantic vectors through a pre-trained embedding model, transforming the originally discrete and sparse text into a computable vector representation. Then, the high-dimensional semantic vectors are dimensionality-reduced, preserving core semantic features while reducing vector space complexity, avoiding the curse of dimensionality, and improving the efficiency and stability of subsequent clustering. Next, adaptive density clustering is used to cluster the dimensionality-reduced semantic vectors to generate pseudo-labels. That is, adaptive density clustering automatically groups semantic vectors, classifying semantically similar inference steps into the same category, and automatically generating corresponding pseudo-labels for each category. This process obtains high-quality training data without manual annotation, significantly reducing annotation costs and domain knowledge dependence. Finally, the automatically generated pseudo-labels are used to train the classification model, and generalized cross-entropy loss is used instead of the traditional loss function, enabling the model to train stably even in the presence of noisy pseudo-labels, improving the classifier's anti-interference ability and generalization, and ensuring more accurate and reliable semantic clustering of inference steps.
[0066] For example, in this embodiment, the performance of the inference trajectory clusterer directly affects the accuracy of inference path merging. Although supervised learning-based classification methods perform well in handling semantic similarity, for the specific domain of microservice root cause analysis, the construction of a large-scale manually labeled dataset faces extremely high cognitive load and labeling costs due to the complex professional knowledge and long logical chains contained in the inference text. To address this, this application employs an unsupervised label generation method based on "clustering-mapping" to train a multilayer perceptron (MLP) to perform inference path clustering.
[0067] Optionally, in order to obtain domain-specific supervision signals without human intervention, this application employs the following process to construct the training set: (1) Generating the initial corpus: First, the event report output by the alarm management agent is used as the initial input. The task planning agent generates a complete inference trajectory through the ReAct paradigm under a greedy sampling strategy. This invention uses each triplet inference step in the trajectory as the initial input. Treating each text unit as an independent text unit, it is encoded into a high-dimensional semantic vector using a pre-trained embedding model.
[0068] (2) Manifold Alignment and Dimensionality Reduction: High-dimensional semantic spaces often exhibit severe sparsity, and direct clustering is susceptible to the "curse of dimensionality." This invention first performs manifold alignment and dimensionality reduction on semantic vectors. Normalization is applied to eliminate modulus interference, followed by the introduction of the Unified Manifold Approximation and Projection (UMAP) method. UMAP, based on manifold learning theory, constructs a topological graph structure to project high-dimensional features into a low-dimensional space. At the same time, it can effectively preserve the local domain structure and global topological features of the original semantic distribution.
[0069] (3) Adaptive density clustering: Given that the vector distribution of unstructured text is difficult to predict, this invention uses the HDBSCAN algorithm for clustering. This method balances the clustering depth by measuring the stability of clusters at different density scales, thereby adaptively determining the number of clusters C without pre-setting cluster centers.
[0070] Optionally, for vectors that meet the density requirements, they are associated with the corresponding cluster index number; for outliers that cannot be classified, they are uniformly classified into the "noise" category to enhance the discriminative boundary of the classifier, resulting in a final "feature-cluster number" pair. As pseudo-labels, they provide supervision signals for subsequent MLP training.
[0071] Optionally, since UMAP inevitably suffers from information compression loss during dimensionality reduction, and clustering algorithms may introduce inaccurate pseudo-labels, the training set will inevitably contain some labeling noise. To improve the classifier's tolerance to noisy data, this application abandons the traditional cross-entropy loss and instead uses the Generalized CrossEntropy (GCE) loss function to train the MLP model: Where C is the total number of logical categories determined by clustering. The one-hot encoded vector of the pseudo-label. This represents the predicted probability distribution of the model after Softmax activation. To adjust the hyperparameters.
[0072] The method described above can accurately identify semantic similarities between inference steps without manual annotation or reliance on prior domain knowledge. It effectively resists noise interference in training data, significantly improves the accuracy and stability of inference step clustering, and greatly reduces the data annotation cost and model training difficulty in microservice root cause analysis scenarios. It provides efficient and reliable semantic support for subsequent inference step calibration, trajectory generation, and optimal path selection, effectively improving the overall operating efficiency of the root cause analysis system.
[0073] In some embodiments, the root cause analysis results of microservice system failures include at least one of the following: Root cause component, fault type, fault location, fault cause description, and fault handling suggestions.
[0074] Specifically, this application outputs root cause analysis results of microservice system failures based on the optimal inference trajectory. These results include at least one of the following: root cause component, failure type, failure location, failure cause description, and failure handling suggestions. In other words, through multi-dimensional and structured root cause analysis results, the failure information can be fully presented from multiple levels, including failure location, cause characterization, location location, cause explanation, and handling guidance. This provides clear and actionable fault handling basis for operations and maintenance personnel without the need for additional inference and supplementary analysis, thereby further improving fault handling efficiency and reducing the difficulty of microservice operations and maintenance and fault recovery.
[0075] For example, to verify the effectiveness of the dynamic width sampling enhanced multi-agent microservice root cause analysis method of this application, the following comparative experiment was conducted: (1) Experimental setup Regarding datasets: This application utilizes the open-source 2025 AIOps Challenge dataset and the RE-2 OnlineBoutique (OB) dataset from the RCAEval benchmark. The 2025 AIOps International Challenge dataset aims to discover alert events and their root causes in microservice applications, containing 400 real-world failure cases covering 15 failure types across three layers: node, pod, and service. The RE-2 dataset includes 90 injection failure scenarios, covering 5 services and 6 failure types.
[0076] Regarding model settings: This application uses the open-source Qwen3-8B and Llama-3.1-8B-Instruct, as well as the closed-source GPT-4o-mini. The temperature values for all models are set to 0.5 to ensure the stability of language representation while allowing for divergent exploration. For the text embedding model, the open-source Qwen3-Embedding-8B is used, and the dimension of the output vector is set to 1024.
[0077] Comparison Benchmarks: This application selects SC, beam-sampled ToT, and mABC as comparison benchmarks to compare the method proposed in this invention. The aggregation process of SC and ToT, and the evaluation process of ToT are completed by the arbitration agent.
[0078] Hyperparameter settings: For dynamic width sampling, the random sampling width was set to 10, the density compensation threshold λ was set to 3, and the maximum search depth N for prospective exploration was set to 5. For training dataset construction, the number of nearest neighbors (n_neighbors) in UMAP was set to 15, the minimum distance (min_dist) was set to 0.1, and the target dimension was set to 10; the minimum cluster size in HDBSCAN was set to 5, and the minimum number of sample points was set to 10. For the loss function, the q-value was set to 0.7. For the Basline, the sampling widths for SC and beam-search were both set to 10, and the beam sampling beam width was set to 5.
[0079] Evaluation metrics: The following two metrics were used to evaluate the effectiveness of the proposed method and the baseline comparison: Accuracy: Measures whether the generated root cause components are exactly the same as the ground truth component set. Any mismatch, whether it's fewer or more components than the ground truth, will result in a score of 0.
[0080] Top-k: Measures whether the ground truth components are fully included in the top-k (k=3, 5) of the most likely root cause components generated by the model. For this metric, we suggest the model to generate the k most likely root cause components.
[0081] (2) Main results Table 1 Performance Test Results
[0082] As shown in Table 1, on the 2025 AIOps benchmark dataset, the proposed method driven by GPT-4o-mini demonstrates a significant advantage, achieving an accuracy of 64.25%, a 6.5 percentage point improvement over the mABC benchmark model. In the RE2-OB dataset evaluation, the proposed method also performs excellently, with an accuracy of 46.67%, outperforming the ToT method by 4.45 percentage points. Furthermore, the proposed method achieves state-of-the-art performance on all evaluation metrics of the RE2-OB dataset, with accuracy gains ranging from 4.45% to 10.00% compared to various benchmark models. In contrast, the SC method shows the weakest performance, achieving accuracies of only 47.75% and 36.67% on the two datasets, respectively.
[0083] The failure of the SC method is attributed to its lack of a verification mechanism for the inference path, which makes the sampled inference branches highly susceptible to introducing unavoidable noise, thus causing the overall prediction to deviate from the true result. Although ToT and mABC introduce evaluation mechanisms, due to insufficient foresight, they are limited to local evaluation of single-step inference and lack global control over the multi-step search space when dealing with complex tasks, making them prone to getting trapped in local optima. In contrast, this invention ensures effective coverage of high-value paths during root cause localization by dynamically optimizing the timing of review and the size of the look-ahead inference step, and fundamentally avoids the risk of losing the global optimal solution due to premature pruning.
[0084] (2) Ablation test Table 2 Ablation Experiment Results
[0085] As shown in Table 2, the complete form of this application demonstrates the best performance across all metrics in both datasets, proving the necessity of all components.
[0086] Restricting the framework to a single agent significantly reduces performance by 25.00%, demonstrating its crucial role in this invention. Removing the tool turns the model into pure contextual reasoning, introducing a large amount of irrelevant data, resulting in the lowest performance at only 17.25%. Removing the dynamic sampling mechanism also reduces performance, although not as severely as the previous two, highlighting its role in raising the performance ceiling of root cause analysis.
[0087] (3) Efficiency Analysis In terms of time efficiency, SC exhibits the lowest average latency, at 312s and 248s on the AIOps and RE2-OB datasets, respectively. This efficiency is primarily attributed to the simplicity of its architecture, involving only a single aggregation throughout the entire root cause analysis process. In contrast, ToT exhibits the most significant latency (468s and 343s), stemming from its stepwise validation mechanism requiring the LLM to evaluate multiple branches at each inference step. This invention successfully reduces the latency to 359s and 208s by lowering the validation frequency. Although its latency is slightly higher than SC, this invention achieves a qualitative leap in performance gain, striking a better balance between inference speed and accuracy.
[0088] Regarding token overhead, mABC incurs high computational costs due to its collective agent review mechanism, with average fault diagnosis costs of 10.73k and 10.09k tokens on the two datasets, respectively. ToT, on the other hand, suffers from the highest resource consumption (17.89k and 14.70k tokens) due to its fixed-width parallel sampling and frequent evaluation operations. In stark contrast, this invention effectively integrates redundant inference paths after the sampling phase. Therefore, token consumption is reduced to 9.44k and 7.64k tokens, a reduction of 14.5% on average compared to mABC. This method significantly improves resource utilization by suppressing redundant paths and periodically verifying them.
[0089] In summary, this application constructs an intelligent agent cluster architecture with clearly defined responsibilities, including task planning, multi-dimensional expert analysis, and arbitration evaluation. By modeling inference steps as semantic triples and projecting them onto a high-dimensional latent space, a lightweight multilayer perceptron (MLP) classifier is trained using pseudo-labels generated based on Unified Manifold Approximation and Projection (UMAP) and Adaptive Density Clustering (HDBSCAN), enabling real-time identification and dynamic merging of similar inference paths. Simultaneously, this application introduces a density compensation mechanism and a forward-looking exploration strategy. While ensuring the diversity of inference directions, the arbitrating agent performs logical consistency scoring on candidate trajectories, thereby achieving adaptive adjustment of the inference sampling width and redundancy removal. This application aims to significantly reduce computational costs and inference latency while ensuring root cause localization accuracy through multi-agent collaboration and dynamic sampling mechanisms, meeting the deterministic operation and maintenance requirements of large-scale microservice systems.
[0090] Furthermore, it should be noted that this invention constructs a collaborative system composed of task planning, multi-dimensional data experts, and arbitration evaluation agents. By decoupling complex operation and maintenance tasks into a cluster of agents with single responsibilities, this architecture can efficiently process heterogeneous multimodal observation data in microservice scenarios. Through the refined extraction and summarization of abnormal features by each expert agent, the system's root cause localization capability in dynamic microservice environments is significantly enhanced. Moreover, this application breaks the rigid or linear reasoning mode in traditional methods by introducing dynamic sampling of inference trajectories and prospective search. The arbitration agent uses prospective exploration to identify pseudo-paths that are "reasonable in the short term but misleading in the long term" and selects the optimal trajectory through logical consistency scoring. This dynamic programming method effectively covers the high-value search space, avoiding premature pruning that could lead to the loss of the global optimal solution, while enhancing the self-correction capability of the inference process. This application also addresses the pain point of extremely high manual annotation costs in microservice root cause analysis by innovatively proposing an automated label generation scheme of "clustering-mapping," which automatically extracts discriminative features from the original operation and maintenance corpus and generates high-quality pseudo-labels. Combined with the optimization of the robustness of the generalized cross-entropy (GCE) loss function to label noise, this mechanism ensures that the classifier can accurately capture the underlying logical patterns in microservice fault reasoning with extremely low human cost, and significantly improves the efficiency of path deduplication and aggregation in the multi-agent collaboration process.
[0091] The following describes the dynamic width sampling enhanced multi-agent microservice root cause analysis apparatus provided by the present invention. The dynamic width sampling enhanced multi-agent microservice root cause analysis apparatus described below can be referred to in correspondence with the dynamic width sampling enhanced multi-agent microservice root cause analysis method described above. For example, as shown... Figure 2 As shown, the dynamic width sampling enhanced multi-agent microservice root cause analysis apparatus of this application includes: The generation module 210 is used to generate candidate reasoning steps for troubleshooting in multiple different reasoning directions based on the alarm data of the microservice system. Clustering module 220 is used to perform semantic clustering on multiple candidate reasoning steps to obtain calibrated candidate reasoning steps; Processing module 230 is used to generate corresponding candidate inference trajectories for each calibrated candidate inference step; The scoring module 240 is used to determine the optimal inference trajectory based on the scores of each candidate inference trajectory; Analysis module 250 is used to output the root cause analysis results of microservice system failures based on the optimal inference trajectory.
[0092] Figure 3 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 3As shown, the electronic device may include a processor 310, a communications interface 320, a memory 330, and a communication bus 340, wherein the processor 310, communications interface 320, and memory 330 communicate with each other via the communication bus 340. The processor 310 can call logical instructions in the memory 330 to execute a dynamic width sampling enhanced multi-agent microservice root cause analysis method. This method includes: generating multiple candidate inference steps with different inference directions for fault diagnosis based on alarm data from the microservice system; performing semantic clustering on the multiple candidate inference steps to obtain calibrated candidate inference steps; generating corresponding candidate inference trajectories for each calibrated candidate inference step; determining the optimal inference trajectory based on the scores of each candidate inference trajectory; and outputting the root cause analysis results of the microservice system fault based on the optimal inference trajectory.
[0093] Furthermore, the logical instructions in the aforementioned memory 330 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0094] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the dynamic width sampling enhanced multi-agent microservice root cause analysis method provided by the above methods. The method includes: generating multiple candidate inference steps with different inference directions for fault diagnosis based on alarm data of the microservice system; performing semantic clustering on the multiple candidate inference steps to obtain calibrated candidate inference steps; generating corresponding candidate inference trajectories for each calibrated candidate inference step; determining the optimal inference trajectory based on the score of each candidate inference trajectory; and outputting the root cause analysis result of the microservice system fault based on the optimal inference trajectory.
[0095] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements a dynamic width sampling enhanced multi-agent microservice root cause analysis method provided by the methods described above. The method includes: generating multiple candidate inference steps with different inference directions for fault diagnosis based on alarm data of the microservice system; performing semantic clustering on the multiple candidate inference steps to obtain calibrated candidate inference steps; generating corresponding candidate inference trajectories for each calibrated candidate inference step; determining the optimal inference trajectory based on the scores of each candidate inference trajectory; and outputting the root cause analysis results of the microservice system fault based on the optimal inference trajectory.
[0096] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0097] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0098] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A multi-agent microservice root cause analysis method with dynamic width sampling enhancement, characterized in that, include: Based on the alarm data of the microservice system, generate candidate reasoning steps with multiple different reasoning directions for troubleshooting; Semantic clustering is performed on the multiple candidate reasoning steps to obtain calibrated candidate reasoning steps; For each of the calibrated candidate inference steps, a corresponding candidate inference trajectory is generated. The optimal inference trajectory is determined based on the scores of each candidate inference trajectory. Based on the optimal reasoning trajectory, the root cause analysis results of the microservice system failure are output.
2. The method according to claim 1, characterized in that, The step of semantically clustering the multiple candidate reasoning steps to obtain calibrated candidate reasoning steps includes: The candidate reasoning steps are clustered, and the candidate reasoning steps within the same cluster are deduplicated, summarized, and conflict-checked to obtain the calibrated candidate reasoning steps.
3. The method according to claim 2, characterized in that, After obtaining the calibrated candidate inference step, the method further includes: For any cluster category, the number of candidate inference steps is calibrated based on the comparison between the number of candidate inference steps within the cluster category and a preset density compensation threshold.
4. The method according to claim 3, characterized in that, The step of calibrating the number of candidate inference steps based on the comparison result between the number of candidate inference steps within the cluster category and the preset density compensation threshold includes: If the number of candidate inference steps within the cluster category is greater than or equal to the preset density compensation threshold, the number of calibrated candidate inference steps corresponding to the cluster category is equal to the preset density compensation threshold. If the number of candidate inference steps within a cluster category is less than the preset density compensation threshold, the cluster category corresponds to only one calibrated candidate inference step.
5. The method according to any one of claims 1-4, characterized in that, For each of the calibrated candidate inference steps, a corresponding candidate inference trajectory is generated, including: Based on the calibrated candidate inference steps, multi-step prospective inference is performed to generate the candidate inference trajectory.
6. The method according to any one of claims 1-4, characterized in that, The step of determining the optimal inference trajectory based on the scores of each candidate inference trajectory includes: The scores for each candidate reasoning trajectory are determined based on their logical consistency, evidence completeness, and matching degree with alarm data. The candidate inference trajectory with the highest score is selected as the optimal inference trajectory.
7. The method according to any one of claims 1-4, characterized in that, The semantic clustering of the multiple candidate reasoning steps includes: Based on a pre-defined clustering model, the candidate inference steps are clustered; wherein, the clustering model is trained in the following manner: The historical reasoning steps are converted into semantic vectors and then dimensionality reduction is performed. An adaptive density clustering method is used to cluster the dimensionality-reduced semantic vectors to generate pseudo-labels; The classification model is trained using the generalized cross-entropy loss based on the pseudo-labels, and the clustering model is obtained.
8. The method according to any one of claims 1-4, characterized in that, The root cause analysis results of the microservice system failure include at least one of the following: Root cause component, fault type, fault location, fault cause description, and fault handling suggestions.
9. A multi-agent microservice root cause analysis device with dynamic width sampling enhancement, characterized in that, include: The generation module is used to generate candidate reasoning steps for troubleshooting in multiple different reasoning directions based on the alarm data of the microservice system. The clustering module is used to perform semantic clustering on the multiple candidate reasoning steps to obtain calibrated candidate reasoning steps. The processing module is used to generate corresponding candidate inference trajectories for each of the calibrated candidate inference steps. The scoring module is used to determine the optimal inference trajectory based on the scores of each candidate inference trajectory; The analysis module is used to output the root cause analysis results of the microservice system failure based on the optimal inference trajectory.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the dynamic width sampling enhanced multi-agent microservice root cause analysis method as described in any one of claims 1 to 8.
