Fault root cause diagnosis method and apparatus
By introducing deterministic verification logic into the conclusion submission tool to perform consistency verification on the candidate root cause conclusions generated by the large language model, the problem of deviation between the generated results of the large language model and the actual state is solved, and the reliability and accuracy of fault root cause diagnosis are improved.
Patent Information
- Application Number
- CN202611341084.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-31
- Publication Date
- 2026-11-20
AI Technical Summary
The root cause diagnosis results generated by the large language model deviate from the actual operating status of the service, affecting the reliability of the root cause diagnosis results.
By setting up deterministic verification logic in the conclusion submission tool, the candidate root cause conclusions generated by the large language model are checked for consistency with the structured evidence information. This ensures that the candidate root cause conclusions undergo consistency constraints before being determined as root cause diagnostic results, and generates verification feedback to continue the diagnosis.
This reduces logical inconsistencies between root cause diagnosis results and obtained diagnostic evidence, improving the reliability and accuracy of root cause diagnosis results.
Smart Images

Figure CN123137997A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer data processing technology, and in particular to a method, apparatus, computer equipment, computer-readable storage medium, and computer program product for diagnosing root causes of faults. Background Technology
[0002] With the development of computer systems and network services, service anomalies can be diagnosed using operational data such as monitoring metrics and service call information. In some processing methods, large language models can be used to process service operational data to generate root cause diagnosis results. However, due to the diverse sources and dynamic changes in the state of service operational data, the root cause diagnosis results generated by large language models may deviate from the actual operational state of the service, thus affecting the reliability of the root cause diagnosis results. Therefore, improving the matching degree between automatic root cause diagnosis results and the actual service operational state has become one of the technical problems that needs to be solved or mitigated.
[0003] It should be noted that the above content is not necessarily prior art, nor is it intended to limit the scope of patent protection of this application. Summary of the Invention
[0004] This application provides a method, apparatus, computer device, computer-readable storage medium, and computer program product for diagnosing root causes of faults, in order to solve or alleviate one or more of the technical problems mentioned above.
[0005] One aspect of this application provides a method for diagnosing the root cause of a fault, the method comprising: Obtain the candidate root cause conclusions submitted by the large language model for the target service link through the conclusion submission tool, as well as the structured evidence information corresponding to the candidate root cause conclusions; By setting deterministic verification logic on the call chain of the conclusion submission tool, the consistency verification between the candidate root cause conclusion and the structured evidence information is performed based on preset consistency constraints. In response to the failure of the consistency check, a check feedback is generated, and the large language model is called to perform fault diagnosis based on the check feedback; in response to the success of the consistency check, the root cause diagnosis result of the target service link is determined based on the candidate root cause conclusion.
[0006] Another aspect of this application provides a fault root cause diagnosis device, the device comprising: The acquisition module is used to acquire the candidate root cause conclusions submitted by the large language model for the target service link through the conclusion submission tool, as well as the structured evidence information corresponding to the candidate root cause conclusions. The verification module is used to verify the consistency between the candidate root cause conclusion and the structured evidence information based on preset consistency constraints through deterministic verification logic set on the call chain of the conclusion submission tool. The processing module is configured to generate verification feedback in response to the failure of the consistency check, and continue to call the large language model to perform fault diagnosis based on the verification feedback; and to determine the root cause diagnosis result of the target service link based on the candidate root cause conclusion in response to the success of the consistency check.
[0007] Another aspect of this application provides a computer device, including: At least one processor; and A memory that is communicatively connected to the at least one processor; Wherein: the memory stores instructions that can be executed by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method as described above.
[0008] Another aspect of this application provides a computer-readable storage medium storing computer instructions that, when executed by a processor, implement the method described above.
[0009] Another aspect of this application provides a computer program product including a computer program that, when executed by a processor, implements the method described above.
[0010] The embodiments of this application employing the above technical solution may include the following advantages: by enabling the large language model to simultaneously provide structured evidence information corresponding to the candidate root cause conclusions when submitting them, and by using deterministic verification logic set on the conclusion submission tool call chain to perform consistency verification between the two, the candidate root cause conclusions undergo computer-executable consistency constraints before being determined as root cause diagnosis results; when a preset logical conflict is detected between the candidate root cause conclusions and the structured evidence information, the fault diagnosis continues to be executed through verification feedback, instead of directly determining the logically conflicting candidate root cause conclusions as root cause diagnosis results, thereby reducing the logical inconsistency between the root cause diagnosis results and the obtained diagnostic evidence. Attached Figure Description
[0011] The accompanying drawings exemplify embodiments and form part of the specification, serving together with the textual description to explain exemplary implementations of the embodiments. The illustrated embodiments are for illustrative purposes only and do not limit the scope of the claims. Throughout the drawings, the same reference numerals refer to similar but not necessarily identical elements.
[0012] Figure 1The diagram illustrates the operating environment of the fault root cause diagnosis method according to Embodiment 1 of this application. Figure 2A The overall architecture of the fault root cause diagnosis system according to Embodiment 1 of this application is illustrated schematically; Figure 2B The schematic diagram illustrates the overall diagnostic flowchart according to Embodiment 1 of this application; Figure 3 This illustration schematically shows a single-link failure root cause diagnosis process according to Embodiment 1 of this application; Figure 4 This schematically illustrates the overall process flow chart for fault root cause diagnosis according to Embodiment 1 of this application; Figure 5 This schematically illustrates a flowchart of the evidence gate consistency verification process according to Embodiment 1 of this application; Figure 6 This schematic diagram illustrates the verification boundary diagram of the consistency verification according to Embodiment 1 of this application; Figure 7 A schematic diagram illustrating a detailed flowchart of single-link diagnosis according to Embodiment 1 of this application is shown. Figure 8 The flowchart illustrating the query object verification process according to Embodiment 1 of this application is shown in the schematic diagram. Figure 9 This schematic diagram illustrates a three-dimensional structure of a diagnostic capability unit according to Embodiment 1 of this application; Figure 10 This illustration schematically shows a diagnostic capability assembly diagram according to Embodiment 1 of this application; Figure 11 This schematically illustrates a single-step loop diagram of ReAct according to Embodiment 1 of this application; Figure 12 This illustration shows a flowchart of diagnostic rounds and tool call types according to Embodiment 1 of this application; Figure 13 A schematic diagram illustrating the multi-link parallel diagnosis and summarization flowchart according to Embodiment 1 of this application is shown. Figure 14 A block diagram of a fault root cause diagnosis device according to Embodiment 2 of this application is schematically shown; and Figure 15 A schematic diagram of the hardware architecture of a computer device according to Embodiment 3 of this application is shown. Detailed Implementation
[0013] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.
[0014] It should be noted that the descriptions involving "first," "second," etc., in the embodiments of this application are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of that feature. Furthermore, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. If the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed in this application.
[0015] It should be noted that, in any stage of this application involving the collection, storage, use, transmission, and processing of data, each stage strictly adheres to the laws, regulations, industry standards, and regulatory requirements of the data source, usage location, and relevant countries and regions to ensure the legality and compliance of data activities. In the collection stage, the purpose, method, and scope of collection are clearly communicated to the data subject in a prominent manner. Collection is conducted only after obtaining the data subject's legal authorization, ensuring that the collection process follows the "minimum necessary" principle and does not exceed the scope of data collection. In the storage stage, storage periods are limited, and data is promptly deleted or anonymized / encrypted after the storage purpose is achieved. In the usage stage, a strict data security protection mechanism is implemented, using field-level desensitization technology and processing the original data according to preset desensitization rules. For different types of data, multiple desensitization strategies, such as data generalization, data anonymization, and data encryption, are employed to effectively mitigate the risk of sensitive information leakage and ensure that all data used is securely processed and desensitized, comprehensively protecting the rights and interests of data subjects and data security. In the transmission and processing stages, the confidentiality and security of data are ensured during transmission and processing.
[0016] In the description of this application, it should be understood that the numerical labels before the steps do not indicate the order of the steps, but are only used to facilitate the description of this application and to distinguish each step, and therefore should not be construed as a limitation of this application.
[0017] First, an explanation of the terminology used in this application is provided.
[0018] A large language model can refer to a generative model with natural language understanding, information organization, and reasoning processing capabilities. This application does not limit the specific model name, provider, or specific model structure of the large language model, nor does it require performing specific model fine-tuning on the large language model for the target service link as a necessary condition for implementing the technical solution of this application.
[0019] The ReAct loop can refer to an iterative processing method in which a large language model alternately performs inference, tool invocation, and tool result observation, and continues inference based on newly added tool results. In the formal method steps of this application, this process can also be referred to as iterative diagnosis.
[0020] Tool invocation, or function calling, refers to the external processing capabilities that a large language model can invoke through a structured interface. A tool can have a tool name, input parameter structure, and return value. A tool invocation request can include the tool name and the structured tool input parameters corresponding to that name.
[0021] Context engineering can refer to the information processing process in which deterministic processing logic organizes, processes, and injects the input context of a large language model. Diagnostic context can include at least one of the following: system prompts, diagnostic task information, diagnostic method information, diagnostic hints, topology diagnostic information, historical interaction information, and tool return results.
[0022] Service level objectives can refer to the indicator conditions used to characterize the quality of service operation, such as the target conditions corresponding to latency indicators or error rate indicators.
[0023] Service topology can refer to service structure information with service communication endpoints and message queue topics as nodes and data flow relationships and / or task flow relationships as directed edges.
[0024] A root cause node can be a node that forms the source of an anomaly in the fault propagation chain. An affected node can be a node that exhibits abnormal indicators due to the abnormal propagation of other nodes, but has not been identified as the source of the anomaly itself.
[0025] Three-anchor-point relative comparison can refer to comparing the target indicators during the fault period with the same period one hour earlier, the same period the previous day, and the same period the previous week to obtain multiple relative multiples.
[0026] Structured evidence information can refer to a set of fields that correspond to candidate root cause conclusions and can be read by deterministic procedures and used to perform consistency checks.
[0027] Topology diagnostic information can be information obtained after performing deterministic processing on the service topology for fault diagnosis. It can include node relationships organized along the data flow direction and / or task flow direction, node queryable indicators, and node attributes. In one engineering implementation, topology diagnostic information can also be referred to as a battle map.
[0028] A diagnostic capability unit can refer to a processing unit that organizes the query capability, evidence structure, and diagnostic prompts related to a query indicator in the same configurable unit.
[0029] The conclusion submission tool can be a structured tool for large language models to submit candidate root cause conclusions and corresponding structured evidence information. Calling the conclusion submission tool does not mean that the submitted candidate root cause conclusions have become valid root cause diagnostic results; the fault diagnosis equipment can first perform a deterministic consistency check on the corresponding candidate root cause conclusions.
[0030] Deterministic validation logic refers to computer processing logic that is set up on the call chain of a conclusion submission tool or indicator query tool and performs repeatable validation on structured input according to preset processing conditions. The determinism mentioned here mainly refers to the generative reasoning of large language models; that is, under the same structured input and the same preset constraints, the validation logic forms a corresponding validation result according to predetermined processing conditions. Deterministic validation logic does not replace the large language model's generation of root cause conclusions with fixed rules. In one engineering implementation, deterministic validation logic can be implemented using a specific validation function, the name of which is not limited.
[0031] Candidate root cause conclusions refer to root cause determinations formed during the iterative diagnostic process of the large language model, submitted through the conclusion submission tool, but not yet accepted as root cause diagnostic results. Candidate root cause conclusions can include at least one of the following: root cause type, root cause node, affected node, and checked normal node. Candidate root cause conclusions are determined as root cause diagnostic results after passing consistency checks; otherwise, they are not written into valid diagnostic results.
[0032] Diagnostic evidence refers to objective indicator information organized by a diagnostic capability unit based on indicator data obtained from indicator data sources and according to a corresponding evidence structure. Diagnostic evidence can be used as a tool to return results to a large language model, providing corresponding evidentiary support for candidate root cause conclusions during subsequent consistency checks. Diagnostic evidence primarily expresses what the corresponding data is, without requiring a final judgment on whether the data belongs to a root cause.
[0033] Delay signal reliability can refer to a criterion field that characterizes whether delay statistics are suitable as a basis for delay-related diagnostics under corresponding request volume conditions. Delay signal reliability can be pre-formed by deterministic processing logic based on the request volume and threshold of the corresponding indicator, and can be represented by a Boolean value. For example, a delay signal reliability of true indicates that the request volume of the corresponding delay indicator meets the delay signal reliability requirements.
[0034] Steady-state state refers to a criterion field characterizing whether the target indicator during the fault period is in a relatively stable state relative to multiple historical periods. The steady-state state can be determined based on whether multiple relative multiples obtained by comparing the fault period with multiple historical anchor points are all within the steady-state range. It is used to characterize that there is no significant change between the fault period and multiple historical references that supports the explanation of this fault mutation, and is not equivalent to a low absolute value of the target indicator.
[0035] A conclusion collector can refer to a data structure used to store valid diagnostic judgments that have passed consistency checks in a single-link diagnostic task. When a fault diagnosis task corresponds to multiple service links, a mutually isolated conclusion collector can be configured for each single-link diagnostic task, so that the conclusion collection status of one single-link diagnostic task does not overwrite the corresponding status of other single-link diagnostic tasks.
[0036] Deterministic aggregation refers to the processing logic of classifying service links according to the diagnostic results generated by each single-link diagnostic task after multiple single-link diagnostic tasks have been completed, without reinterpreting or overriding the diagnostic judgments already formed by each single-link diagnostic task through a second language model. Deterministic aggregation can classify service links where diagnostic execution errors occur as failed, service links that are diagnosed as normal as healthy, service links with traffic surges and / or root causes as affected, and service links that have not submitted valid diagnostic judgments as incomplete diagnostics rather than healthy.
[0037] Secondly, to facilitate those skilled in the art to understand the technical solutions provided in the embodiments of this application, the relevant processing methods are described below.
[0038] With the growth of computer systems and network services, operational anomalies can be diagnosed using data such as monitoring metrics and service call information. In some approaches, anomaly detection can be performed on the monitoring metrics of each service node based on preset rules or fixed thresholds. However, fixed thresholds do not carry causal information about nodes within the service topology, making it difficult to distinguish between the root cause node (the source of the fault) and affected nodes impacted by fault propagation. Furthermore, manual readjustment of rules is required when the link structure or metric baseline changes, resulting in high maintenance costs. In other approaches, service topology and metric data can be directly provided to a large language model, which then autonomously performs root cause inference. However, the behavior of the large language model is primarily guided by soft, contextualized natural language prompts; the interpretation rules within these prompts do not have a binding force on the large language model. In engineering practice, relying solely on large language models for autonomous diagnosis can easily lead to the following failure modes: First, the large language model may generate query requests for indicators that do not exist in the current service link, resulting in failed evidence collection and inference deviations. Second, the large language model tends to output root cause conclusions, potentially interpreting statistical noise under low traffic conditions or long-standing high-water level indicators as root causes of failures. Even with added interpretation rules in the prompts, the large language model may still bypass these rules and output root cause conclusions that are logically inconsistent with the obtained diagnostic evidence. Third, when information is lacking, the large language model may repeatedly request context without advancing the diagnosis, resulting in idle processing. In scenarios involving parallel diagnosis of multiple links, service links that have not actually completed evidence collection may be mistakenly identified as healthy, leading to missed reports.
[0039] Therefore, this application provides a root cause diagnosis technical solution. In this technical solution, (1) by combining the node role represented by the indicator source and the causal direction in the service topology, the large language model 4 can distinguish the source of the anomaly from the affected node when multiple nodes exhibit anomalies at the same time, rather than determining the root cause solely based on the absolute index of a single node, thus improving the accuracy of root cause node location; (2) the topology structure focuses on preserving relatively stable causal relationships and query capability mappings between services, reducing maintenance costs caused by frequently changing operational information being fixed in the topology structure, and improving the maintainability of the service topology; (3) when a new target service link is added, the corresponding service topology configuration can be added or updated; when a new diagnostic indicator is added, the corresponding... The diagnostic capability unit allows for the expansion of service topology and diagnostic indicator capabilities; (4) Continuous error counting is used instead of terminating after a single illegal query, which not only preserves the processing opportunity for the large language model 4 to self-correct based on the correction feedback, but also sets a boundary for the continuous generation of illegal query objects, thus improving the convergence of the iterative diagnostic process; (5) Pre-binding the topology information acquisition tool to the current target service link and using the link identifier as the calling intent field can improve the structural stability of the tool calling interface and the degree of isolation of topology information between different service links, reduce the diagnostic idle time caused by repeated topology information requests, and improve the convergence efficiency of the diagnostic task. See the following text for details.
[0040] Finally, for ease of understanding, an exemplary runtime environment is provided below. For example... Figure 1 As shown, the operating environment may include fault diagnosis device 2, large language model 4, and indicator data source 6. Fault diagnosis device 2 can call large language model 4 and obtain indicator data corresponding to the target service link from indicator data source 6 through indicator query interface.
[0041] The fault diagnosis device 2 can be a single server, a server cluster, a distributed computing node, or other computing device capable of performing the fault root cause diagnosis method of this application.
[0042] The large language model 4 can be deployed in the fault diagnosis device 2 or in a computing device that is connected to the fault diagnosis device 2, and can be called by the fault diagnosis device 2 through the model call interface.
[0043] Metric data source 6 can be used to provide service operation metrics, message queue metrics, device operation metrics, traffic metrics, or other diagnostic metrics. Metric data source 6 can be provided by a single data system or jointly by multiple data systems.
[0044] It should be noted that the above-mentioned equipment, systems and their quantities are only examples, and can be added, removed, split, merged or replaced according to actual needs in different embodiments.
[0045] Figure 2A The schematic diagram illustrates the overall architecture of a fault root cause diagnosis system according to Embodiment 1 of this application. In some embodiments, the fault root cause diagnosis system may include a topology base, a trigger layer, a diagnostic kernel, a diagnostic capability unit layer, and a set of prompting information.
[0046] The topology base can store manually curated service topologies for fault tracing aimed at service level targets. Manual curation can filter the topology structure based on actual service communication relationships, ensuring that the service topology prioritizes communication nodes and corresponding data flow or task flow relationships that can form high signal-to-noise ratio diagnostic evidence, rather than indiscriminately constructing all components involved in the service operation as independent nodes.
[0047] The trigger layer can generate fault diagnosis tasks in response to scheduled inspections, service level target anomalies, or manual operations, and organize fault diagnosis tasks generated from different trigger sources into a unified task input that the diagnostic kernel can process.
[0048] The diagnostic kernel can organize the large language model 4 to perform iterative diagnostics, and invoke at least one of the topology information acquisition tool, indicator query tool, and conclusion submission tool according to the tool call request generated by the large language model 4.
[0049] The diagnostic capability unit layer can include multiple pluggable diagnostic capability units, each of which can encapsulate the corresponding indicator query capability, evidence structure, and diagnostic prompt information.
[0050] The set of prompt information may include at least one of the following: system prompt information, diagnostic method information, scenario information, task information, and output format information.
[0051] In some embodiments, the diagnostic kernel can also perform context engineering. For example, it can convert the service topology into topology diagnostic information that can be read by the large language model 4, assemble corresponding diagnostic capability units according to the current node to be diagnosed, inject diagnostic prompts corresponding to each diagnostic capability unit into the diagnostic context, and perform summary compression on the historical diagnostic context.
[0052] The summary compression method can convert long historical interaction information into shorter information representations for use in subsequent diagnostic rounds, thereby controlling the growth of context length during iterative diagnostics. This application does not limit the specific algorithm used for summary compression.
[0053] In some embodiments, the thresholds used in the diagnostic process can serve different technical roles. One type of threshold can serve as an interpretation reference in diagnostic prompts, providing reference conditions for the large language model 4 to interpret the corresponding diagnostic evidence; another type of threshold can serve as an objective criterion threshold executed by deterministic processing logic, for example, used to form criteria corresponding to delayed signal credibility, steady-state state, or tool call constraints. The aforementioned thresholds themselves do not directly replace the large language model 4 in generating root cause determinations.
[0054] In practice, after loading the topology configuration of the target service link, threshold configurations associated with the corresponding diagnostic process can also be obtained. The specific usage of different thresholds can be determined by their corresponding deterministic processing logic or diagnostic capability unit.
[0055] When assembling a diagnostic kernel for a target service link, a toolset and corresponding diagnostic context can be formed for use by the Large Language Model 4. The toolset may include a topology information acquisition tool, an indicator query tool corresponding to the diagnostic capability units required for the current target service link, and a conclusion submission tool. The diagnostic context may include system prompts, diagnostic method information, diagnostic prompts corresponding to currently queryable indicators, and the current fault diagnosis task.
[0056] Root cause determination can still be formed by the large language model 4 based on the obtained topological information and diagnostic evidence. The deterministic processing logic is mainly used to execute the authenticity constraints of the query object, the consistency constraints between the candidate root cause conclusions and the structured evidence information, and the diagnostic completion status constraints, rather than replacing the root cause reasoning process of the large language model 4 with fixed rules as a whole.
[0057] The technical solution of this application will be described below using fault diagnosis device 2 as the implementing entity, through multiple embodiments. First, as... Figure 2B As shown, the overall diagnostic process of the fault root cause diagnosis method in Embodiment 1 of this application is as follows: the trigger layer responds to timed inspections, SLO triggers, or manual triggers, producing unified input parameters (link, time window, triggering cause); the diagnostic kernel organizes single-step diagnosis according to the ReAct loop, namely, thinking with a large language model, calling tools for evidence collection, observing the tool's return results, and rethinking; context engineering processes and merges the topology to form a battle map, injects diagnostic prompt information, and summarizes and compresses historical interactions, connecting downwards to the topology base and the prompt information set; the Harness evidence collection tool adopts a three-in-one structure, namely, the indicator query capability is exposed as a tool, the evidence package is used as the tool's return value, and the diagnostic prompt information is injected into the context, connecting downwards to the indicator platform or its simulation implementation; the tool layer enforces constraints throughout the evidence collection and convergence stages, including query object verification (NodeGuard), evidence gate, and strong convergence defense line, ultimately producing root cause determination, inference chain, and topology map location results with confidence.
[0058] Secondly, to facilitate understanding of the technical solutions provided in the embodiments of this application by those skilled in the art, the relevant technologies are described below: Example 1 Figure 3 The schematic diagram illustrates a single-link fault root cause diagnosis process according to Embodiment 1 of this application.
[0059] like Figure 3 As shown, the root cause diagnosis method may include steps S300 to S304, wherein: Step S300: Obtain the candidate root cause conclusions submitted by the large language model for the target service link through the conclusion submission tool, as well as the structured evidence information corresponding to the candidate root cause conclusions.
[0060] Step S302: Through deterministic verification logic set on the call chain of the conclusion submission tool, the consistency verification of the candidate root cause conclusion and the structured evidence information is performed based on preset consistency constraints.
[0061] Step S304: In response to the failure of the consistency check, a check feedback is generated, and the large language model is called to perform fault diagnosis based on the check feedback; in response to the success of the consistency check, the root cause diagnosis result of the target service link is determined based on the candidate root cause conclusion.
[0062] In this embodiment, the large language model 4 is responsible for forming candidate root cause conclusions based on the diagnostic evidence obtained during the diagnostic process. Deterministic verification logic is set in the call chain of the conclusion submission tool, enabling a machine-executable consistency check between the candidate root cause conclusions and the corresponding structured evidence information before they are accepted as root cause diagnostic results. If the consistency check fails, the candidate root cause conclusions in this round may not be written into the valid diagnostic results, and the fault diagnosis device 2 will add the corresponding verification feedback to the subsequent diagnostic context and call the large language model 4 again. If the consistency check passes, the fault diagnosis device 2 can write the corresponding candidate root cause conclusions into the valid diagnostic results or the conclusion collector. Through the above processing, a logical consistency constraint step executed by a deterministic computer program can be added to the candidate root cause conclusions before they become root cause diagnostic results. When there is a preset logical conflict between the candidate root cause conclusions and the structured evidence information, the corresponding candidate root cause conclusions can re-enter the diagnostic loop, thereby reducing the number of candidate root cause conclusions that are inconsistent with the already obtained diagnostic evidence being directly used as root cause diagnostic results, and improving the logical consistency between the root cause diagnostic results and the diagnostic evidence.
[0063] like Figure 4As shown, the overall processing flow of the single-link fault root cause diagnosis method in Embodiment 1 of this application is as follows: After creating a single-link diagnosis task, an initial diagnosis context is generated and a set of callable tools is assembled; then, a large language model is called to perform the diagnosis. The large language model obtains topology diagnosis information and / or node indicator diagnosis evidence through tool calls. The tool return results are added to the diagnosis context and the large language model is called again; when the large language model calls the conclusion submission tool, candidate root cause conclusions and structured evidence information are formed; then, a consistency check is performed. If the check fails, a check feedback is generated, the check feedback is added to the diagnosis context, and fault diagnosis continues; if the check passes, the root cause diagnosis result is determined.
[0064] The following combination Figures 3 to 8 The steps S300 to S304 and other optional steps are described in detail.
[0065] Step S300 The large language model obtains the candidate root cause conclusions submitted by the conclusion submission tool for the target service link, as well as the structured evidence information corresponding to the candidate root cause conclusions.
[0066] Specifically, after the large language model 4 has undergone one or more diagnostic rounds, the fault diagnosis device 2 can receive a structured tool call request generated by the large language model 4 for the conclusion submission tool. The tool call request can carry candidate root cause conclusions and structured evidence information corresponding to the candidate root cause conclusions.
[0067] The conclusion submission tool can use a predefined input parameter structure to enable the Large Language Model 4 to submit root cause determinations and corresponding evidence according to a data structure that a computer program can read. This allows subsequent deterministic verification logic to directly perform consistency processing on explicit structured fields without having to parse free text again.
[0068] In some embodiments, the candidate root cause conclusion includes at least one of root cause type, root cause node, affected node, and checked normal node; for each root cause node identified as a root cause, the structured evidence information includes at least one of indicator source, indicator, delayed signal credibility, steady-state state, and maximum relative multiple. Specifically, the root cause type can characterize the anomaly category corresponding to the candidate root cause. The root cause node can identify the node judged as the source of the fault by the large language model 4. The affected node can identify the node that exhibits abnormal indicator performance due to the influence of fault propagation from other nodes, but is not itself identified as the source of the anomaly. The checked normal node can record the node that has obtained corresponding diagnostic evidence and has been identified as normal.
[0069] A metric source can characterize the source of the metrics used to form a root cause determination. For example, a metric source can be a server-side metric source generated when the target node itself processes a request as a server, a client-side metric source generated when the target node calls a downstream node as a client, or a message queue metric source.
[0070] Metrics can be used to identify the type of metric used as the root cause by the Big Language Model 4, such as P99 latency, error rate, or message backlog.
[0071] The reliability of delay signals can be used to characterize whether delay statistics are suitable as a basis for delay-related diagnostics under corresponding request volume conditions. Steady-state status can be used to characterize whether the fault period is relatively stable relative to multiple historical periods. Maximum relative multiple can be used to characterize the maximum relative change among multiple historical comparison results.
[0072] In some embodiments, the reliability of the delay signal and the steady-state state can be represented by Boolean values. For example, a true reliability of the delay signal can indicate that the request volume of the corresponding delay indicator meets the reliability requirements of the delay signal; a true steady-state state can indicate that the comparison results between the target indicator during the fault period and multiple historical anchor points meet the steady-state conditions.
[0073] In practice, the reliability and steady-state of the delayed signal can be pre-formed by the deterministic processing logic based on the corresponding indicator data, and provided as fields in the diagnostic evidence to the large language model 4. When submitting the structured evidence information of the corresponding root cause node, the large language model 4 can use the aforementioned fields so that the conclusion submission tool can obtain field values that can be directly processed by the subsequent consistency verification logic.
[0074] In this way, the candidate root cause conclusions submitted by the large language model 4 can form a structured correspondence with the indicator sources, indicators and objective criteria on which the conclusions are formed, providing a data foundation that can be directly processed by the machine for subsequent deterministic consistency verification, and improving the stability and efficiency of fault root cause diagnosis.
[0075] In an optional embodiment, the method further includes: Step S400: Obtain diagnostic evidence corresponding to the candidate root cause conclusion, wherein the diagnostic evidence is formed based on indicator data obtained from the indicator data source; Step S402: Determine the reliability of the delayed signal and the steady-state state based on the index data corresponding to the diagnostic evidence; Step S404: Obtain the relative multiples of the target index during the fault period relative to the period before the first time interval, the period before the second time interval, and the period before the third time interval, and determine the maximum value among the multiple relative multiples as the maximum relative multiple; Step S406: The reliability of the delayed signal, the steady-state state, and the maximum relative multiple are provided to the large language model along with the diagnostic evidence; The reliability of the delayed signal is determined based on the request volume and request volume threshold of the corresponding indicator, and the steady state is determined based on whether the multiple relative multiples are within the steady state range.
[0076] Specifically, in step S400, the fault diagnosis device 2, in response to the large language model 4's call to the indicator query tool, can have its corresponding diagnostic capability unit obtain indicator data for the fault period and corresponding historical periods from the indicator data source 6, and organize the obtained indicator data into diagnostic evidence according to the evidence structure corresponding to the diagnostic capability unit. The obtained diagnostic evidence can be used to provide corresponding evidentiary support for candidate root cause conclusions in subsequent consistency verification.
[0077] In step S402, the diagnostic capability unit or other deterministic indicator processing logic can form basic criteria based on the corresponding indicator data, rather than requiring the large language model 4 to reconstruct the basic criteria based on the original indicator values. For example, when the request volume reaches a corresponding request volume threshold, a delay signal credibility characteristic of the delay signal can be formed; when the request volume is insufficient, a delay signal credibility characteristic of the delay signal being unreliable can be formed. The request volume threshold can be configured according to the corresponding indicator statistical conditions.
[0078] In step S404, three historical comparison results can be generated for the same target indicator. The three historical anchor points correspond to the same period before the first time interval (e.g., one hour), the second time interval (e.g., one day), and the third time interval (e.g., one week), respectively, so that the diagnostic process can obtain the relative changes of the target indicator from three time references: short-term history, daily cycle history, and weekly cycle history.
[0079] Steady-state conditions can be determined based on whether multiple relative comparison results all fall within the corresponding steady-state intervals. Here, steady-state is used to characterize the absence of significant changes between the fault period and multiple historical references that support an explanation for the current fault mutation, and is not equivalent to a low absolute value of the target indicator.
[0080] In step S406, the basic criteria formed by the deterministic processing logic can be provided to the large language model 4 as part of the diagnostic evidence along with the results returned by the tool, so that the large language model 4 can obtain the corresponding objective criteria information at the same time when forming candidate root cause conclusions.
[0081] This optional embodiment separates the formation process of basic statistical criteria from the root cause reasoning process of the large language model 4. This allows the reliability, stability, and relative change information corresponding to the same indicator to be formed by deterministic processing logic, reducing the fluctuation of diagnostic results caused by inconsistent interpretation criteria for the same basic indicator in different diagnostic rounds, and enhancing the stability and reproducibility of diagnostic results.
[0082] Step S302 By setting deterministic verification logic on the call chain of the conclusion submission tool, the consistency verification between the candidate root cause conclusion and the structured evidence information is performed based on preset consistency constraints.
[0083] Specifically, after the large language model 4 calls the conclusion submission tool, the fault diagnosis device 2 can first provide the candidate root cause conclusions and structured evidence information from this tool call to the deterministic verification logic.
[0084] Deterministic verification logic can be implemented by program judgment, condition matching, or other computer processing logic capable of deterministic execution. The determinism here mainly refers to generative reasoning in the Large Language Model 4, meaning that under the same structured input and the same preset consistency constraints, the corresponding verification logic forms the corresponding verification result according to predetermined processing conditions.
[0085] In practice, the deterministic verification logic can be implemented by an independent verification function. For example, a specific verification function can receive candidate root cause conclusions and structured evidence information from the conclusion submission tool, and generate a verification pass result or corresponding conflict feedback based on preset consistency constraints. The function name is not intended to be limiting.
[0086] In an optional embodiment, the consistency check is determined to have failed in response to any of the following conditions: The candidate root cause conclusions are based on delay anomalies, and the credibility of the corresponding delay signal indicates that the delay signal is unreliable. The candidate root cause conclusions are based on delayed anomalies, and the corresponding steady-state state characterization indicators are in a steady state. The candidate root cause conclusion uses the delay anomaly as the root cause basis, the corresponding delay signal credibility characterizes the delay signal credibility, the corresponding steady state characterizes the target index as unsteady, and the maximum relative multiple is less than a preset threshold.
[0087] Specifically, the first type of consistency constraint can address the reliability of latency statistics under low request volume conditions. When the large language model 4 uses latency anomalies as the root cause, but the structured evidence information has already characterized the corresponding latency signal as unreliable, it can be determined that there is a logical conflict between the candidate root cause conclusion and the structured evidence information.
[0088] The second type of consistency constraint can be applied to situations where the fault period remains relatively stable relative to multiple historical periods. When multiple historical comparisons indicate that the fault period is in a stable state relative to multiple historical anchor points, but the Large Language Model 4 still interprets this delay as the root cause of the current fault, it can be determined that there is a logical conflict between the candidate root cause conclusion and the stable state criterion.
[0089] The third type of consistency constraint can be applied to situations where the delayed signal is reliable and the index is not in a steady state, but the relative change amplitude is still insufficient. In specific implementation, when the maximum relative multiple is less than a preset threshold (such as 2), it can be determined that the corresponding candidate root cause conclusion has not passed the consistency check.
[0090] Through the above three types of consistency constraints, the basis for delay-type root causes can be verified from the perspectives of delay statistical reliability, time stability, and relative change degree, thereby reducing the situation where large language model 4 uses low-flow statistical noise, long-term existing high water level, or insufficient change amplitude delay indicators to support candidate root cause conclusions, and improving the reliability of delay-type root cause conclusions.
[0091] In some embodiments, it can be first determined whether the consistency constraints set for node root causes are applicable based on the root cause type of the candidate root cause conclusion. When the candidate root cause conclusion belongs to a node root cause, consistency checks set for the reliability of the delayed signal, the steady-state state, and the maximum relative multiple can be further performed.
[0092] When the candidate root cause conclusion belongs to non-node root cause types such as traffic surge or unidentified root cause, it can be exempted from the three types of consistency rules set for node delay root causes. This allows different root cause types to use verification paths that match their evidentiary semantics.
[0093] like Figure 5As shown, when the large language model calls the conclusion submission tool to submit root causes, it must copy the evidence fields one by one, including source, metric, latency_reliable, stable state, and maximum relative ratio. The deterministic verification logic first determines whether the candidate root cause conclusion is classified as a node root cause: if not (e.g., traffic surge or unidentified), it is directly written to the conclusion collector and a report is generated; if so, it checks whether the conclusion and the self-reported evidence are logically consistent, specifically including three rules: Rule 1: using latency anomaly as the root cause basis and latency_reliable as false indicates that low traffic latency is statistical noise; Rule 2: stable state is true but is used as the root cause of this fault, indicating that the stable state has a water level and there is no change within the fault window; Rule 3: using latency anomaly as the root cause basis, latency_reliable as true, stable state is false but maximum relative ratio is less than 2, indicating that the normal fluctuation amplitude is insufficient. If any rule is hit, a contradiction is determined, and the action is reversed: the explanation and reasoning are returned in natural language, but not written into the conclusion, and the ReAct loop is used to re-reason; if all rules pass, the system is self-consistent, and the conclusion is written into the conclusion collector and a report is generated.
[0094] In an optional embodiment, the consistency check includes: Step S500: Perform a logical consistency check based on the candidate root cause conclusion and the structured evidence information. When performing the logical consistency check, do not re-obtain the indicator data used to form the structured evidence information from the indicator data source, and do not generate a root cause conclusion to replace the candidate root cause conclusion based on the indicator data. In step S502, in response to the failure of the consistency check, the candidate root cause conclusion is not written into the valid diagnostic result, and a corresponding check feedback is generated.
[0095] Specifically, the deterministic verification logic can use the candidate root cause conclusions and structured evidence information submitted by the Big Language Model 4 as the direct verification objects, without re-executing a complete indicator query or regenerating another root cause judgment.
[0096] In some embodiments, the diagnostic evidence already provided to the large language model 4 remains unchanged, and the deterministic verification logic does not make the candidate root cause conclusions satisfy the corresponding consistency constraints by hiding or deleting diagnostic evidence.
[0097] The verification feedback may include the type of consistency conflict triggered and the corresponding explanatory information. The verification feedback can employ line-by-line explanations that the Large Language Model 4 can directly process, enabling the Large Language Model 4 to obtain the cause of the conflict between the current candidate root cause conclusion and the structured evidence information in the next diagnostic round.
[0098] In this optional embodiment, through the above processing, the deterministic verification logic assumes the logical consistency constraint between the candidate root cause conclusion and the structured evidence information, rather than generating new root causes by replacing the large language model 4 with fixed rules. This enables generative root cause reasoning and deterministic verification to form mutually separate processing responsibilities, improving the determinism and reproducibility of the verification process without repeatedly accessing the indicator data source.
[0099] like Figure 6 As shown, after the large language model calls the conclusion submission tool, its submitted candidate root cause conclusions and structured evidence information are sent to the deterministic verification logic, which performs deterministic logic verification based on preset consistency constraints. The rule inputs for the preset consistency constraints include delay-type consistency constraints, delay signal credibility, steady-state state, and maximum relative multiple. The verification process has clear verification boundaries: the verification logic does not reacquire indicator data, nor does it generate alternative root cause conclusions. When the verification passes, the candidate root cause conclusion is written into the valid diagnostic results or conclusion collector; when the verification fails, it is not written into the valid diagnostic results and a conflict cause feedback is generated. The verification feedback is added to the diagnostic context, and the large language model is called again for re-diagnosis.
[0100] In an optional embodiment, the preset consistency constraint is set for candidate root cause conclusions based on latency indicators; in response to the candidate root cause conclusions being based on error rate or message backlog, the preset consistency constraint set for the latency indicators is not used to reject the candidate root cause conclusions.
[0101] Specifically, low request volume may affect the representativeness of latency statistics such as P99, while error rate or message backlog have different statistical and fault characterization methods. Therefore, the consistency constraints set for the reliability of latency signals, steady-state state, and maximum relative multiples are not mechanically extended to uniform negation conditions for all indicator types.
[0102] In optional embodiments, by matching consistency constraints with the data characteristics of the corresponding indicators, it is possible to reduce the false interception of evidence caused by applying constraints that are only applicable to delay indicators to error rates or message backlog, thereby improving the targeting of preset consistency constraints and reducing the false interception rate of root cause conclusions such as error rate and message backlog.
[0103] Step S304 In response to the failure of the consistency check, a check feedback is generated, and the large language model is called to perform fault diagnosis based on the check feedback; in response to the success of the consistency check, the root cause diagnosis result of the target service link is determined based on the candidate root cause conclusion.
[0104] Specifically, when the consistency check fails, the conclusion submission tool can return corresponding verification feedback. The fault diagnosis device 2 can add the verification feedback to the subsequent diagnosis context and call the large language model 4 again based on the updated diagnosis context. When the consistency check passes, the candidate root cause conclusion can be written into the valid diagnosis result or conclusion collector corresponding to the current target service link. The root cause diagnosis result may include the root cause node, and may also include at least one of the following: root cause type, affected nodes, checked normal nodes, and corresponding diagnostic evidence. By adopting the processing method of providing feedback and continuing diagnosis when the check fails, and accepting the candidate root cause conclusion after the check passes, the conclusion submission process itself can become a processing link in the iterative diagnosis closed loop.
[0105] like Figure 7 As shown, the complete processing flow for single-link diagnosis is as follows: The diagnosis request carries the link identifier (chain), time window (start time and end time), and triggering reason into the processing flow; the link topology configuration (such as YAML) is loaded and a topology object (Topology) is constructed, deriving the legal node set, consumer group, threshold, and battle map text; then the diagnosis kernel is assembled, and the toolset (tools) includes a topology information acquisition tool (get_battlemap), query tools corresponding to each diagnostic capability unit (Harness), and a conclusion submission tool (submit_diagnosis), and system prompts (prompt), diagnostic methodology, and indicator interpretation prompts are injected into the diagnosis context; then a single-step ReAct loop is entered (the maximum number of iterations has an upper bound), and each round sequentially executes large language model thinking, calls tools once, adds evidence, and observes. Within the loop, the query object verification logic (NodeGuard) verifies the authenticity of nodes and consumer groups, triggering a strong stop when consecutive errors exceed a threshold. When the large language model calls the conclusion submission tool, the evidence gate (validateClaims) verification logic checks whether the conclusion is consistent with its self-reported evidence; if there is a contradiction, it is pushed back for resubmission. After the verification passes, the conclusion submission tool submits a structured judgment (including root cause type root_cause_type, root cause node root_causes, affected nodes involved, and checked normal nodes checked_ok), ultimately generating a single-link report, including a topology coloring graph (such as SVG format) and an inference chain (COT).
[0106] In an optional embodiment, the method further includes: Step S600: Obtain the service topology corresponding to the target service link, and determine the legitimate query object based on the service topology; Step S602: Obtain the index query request generated by the large language model; Step S604: Before executing the indicator query request, the query object in the indicator query request is verified according to the valid query object; Step S606: In response to the successful verification of the query object, execute the indicator query request; In step S608, in response to the failure of the query object verification, the indicator query for the query object is not executed, and the corresponding correction feedback is encapsulated as the normal tool return result of the indicator query request and provided to the large language model.
[0107] Specifically, the above-mentioned query object verification mechanism can be used as an entry constraint (NodeGuard) for the indicator query tool.
[0108] In step S600, the actual service nodes, message queue topics, and corresponding object relationships can be extracted from the service topology of the current target service link to form the range of legal query objects corresponding to the current target service link.
[0109] In step S604, the fault diagnosis device 2 can perform query object verification before actually accessing the indicator data source 6, so that the query object generated by the large language model 4 will not be directly applied to the external indicator data source 6 without verification.
[0110] In step S608, if the query object verification fails, the process of abnormally exiting the entire tool call can be avoided. Instead, the corrective feedback can be encapsulated into a normal tool return result that conforms to the return structure of the indicator query tool, allowing this normal tool return result to continue entering the diagnostic context of the large language model 4. Specifically, in addition to indicating that the current query object does not exist in the target service link, the corrective feedback can also carry a set of legitimate query objects in the current target service link. For example, the corrective feedback can indicate that node X does not exist and list one or more legitimate node identifiers, enabling the large language model 4 to reselect the next verification object from the truly existing query objects.
[0111] In one verification process, without the aforementioned query object verification mechanism, the query requests generated by the large language model 4 contained many objects that did not exist in the current target service link. After introducing the query object verification mechanism, illegal queries can be intercepted before accessing the indicator data source 6, and the results returned by normal tools provide a range of legal objects, so that subsequent tool calls will focus more on objects that actually exist in the current target service link.
[0112] In this way, without interrupting the entire iterative diagnostic process due to an invalid query, the large language model 4 can obtain the legal object information for correcting the next tool call, reduce invalid index access to non-existent query objects, and improve the efficiency of index query requests.
[0113] In an optional embodiment, the method further includes: Step S620: Record the number of times the query object verification fails consecutively; Step S622: In response to the query object passing the verification, the count is cleared to zero; Step S624: In response to the query object failing the verification, the number of times is incremented; Step S626: In response to the number of times reaching a preset threshold, a stop feedback is generated to indicate the cessation of further index queries and the formation of a diagnostic conclusion based on the obtained diagnostic evidence.
[0114] Specifically, the number of consecutive errors can be used to distinguish between an occasional illegal query and a situation where the large language model 4 continuously loops around a non-existent object.
[0115] If a subsequently generated query object matches a valid query object in the current target service link, fault diagnosis device 2 can reset the consecutive error count to zero. If the large language model 4 continues to generate invalid query objects, the consecutive error count will be incremented.
[0116] For example, the default value of the preset number of errors threshold can be 2, and it can be adjusted according to the actual diagnostic configuration. When the number of consecutive errors reaches 2, a strong stop feedback can be returned to the large language model 4, indicating that the indicator query tool should be stopped, and a diagnostic conclusion that can be supported at present should be formed based on the real diagnostic evidence that has been obtained.
[0117] By using continuous error counting instead of terminating after a single illegal query, the large language model 4 can retain the opportunity to self-correct based on correction feedback, while setting boundaries for the continuous generation of illegal query objects, thus improving the convergence of the iterative diagnostic process.
[0118] In an optional embodiment, when the query object includes a message queue topic and a consumer group, the step of validating the query object based on the valid query object includes: Step S640: Determine whether the message queue topic belongs to the target service link; Step S642: Obtain the registered consumer groups corresponding to the message queue topic; Step S644: Verify the consumer group in the indicator query request based on the registered consumer group; Step S646: In response to the failure of the consumer group verification, a corrective feedback is generated to distinguish the consumer group from the downstream service identifier that consumes the message queue topic.
[0119] A message queue topic can correspond to one or more registered consumer groups. When Big Language Model 4 constructs metric query requests based on service topology semantics, it may incorrectly use the downstream service identifier consuming the message queue topic as the consumer group identifier.
[0120] Therefore, query object validation can further examine the registration relationship between message queue topics and consumer groups. In response to a failed consumer group validation, corrective feedback can clearly indicate that the consumer group and the downstream service identifier are not the same semantic object. For example, an appid can be one implementation of a downstream service identifier, but it does not directly constitute the consumer group (consumer_group) corresponding to a message queue topic simply because the downstream service consumes that topic.
[0121] In this optional embodiment, by simultaneously verifying the authenticity of the message queue topic and the registration relationship of the consumer group, the object authenticity constraint can be further extended from general service nodes to the parameter semantic relationship within the message queue, reducing continuous invalid queries caused by confusion between consumer group and downstream service identifiers, and improving the accuracy of message queue-type indicator queries.
[0122] like Figure 8 As shown, the processing flow for query object verification is as follows: After the large language model requests a query for node X, it first determines whether X is within the set of valid nodes in the current link. If so, the consecutive error count is cleared and data retrieval is performed. For message queue metrics (topic), the consumer group (consumer_group) is also checked to correct the error of confusing the consumer group with the downstream service identifier (such as appid). If not, the consecutive error count is incremented by one, and it is determined whether the count exceeds the threshold (default value is 2). If the threshold is not reached, the tool returns a correction feedback of "node X does not exist, valid node is [...]" in the form of normal return. If the threshold is reached, a strong stop command is returned, indicating that the query object has been fabricated N times in a row. Please stop calling the tool immediately and give a conclusion based on the existing evidence.
[0123] In an optional embodiment, the method further includes: Obtain the service topology constructed for fault tracing based on service level targets; wherein, the service topology includes multiple nodes and directed edges connecting the nodes, the nodes include service communication endpoints and message queue topics, and the direction of the directed edges represents the data flow direction and / or task flow direction; object storage, cache, database and / or local computing are node attributes of the corresponding nodes, and not as independent nodes in the service topology.
[0124] Specifically, the service topology can be formed manually, that is, nodes with relatively independent observable indicators related to the service level target fault tracing are retained based on the actual communication relationships in the target service link, rather than indiscriminately establishing all running components as independent nodes. Service communication endpoints can include gRPC service communication endpoints and HTTP service communication endpoints, and message queue topics can be nodes for asynchronous data or task flow. Object storage, cache, database, and local computing objects can be recorded as node attributes of corresponding service nodes, so that the relevant information of these objects can still participate in fault diagnosis when needed, but they do not automatically form independent topology nodes just because they are internal service dependent components. Communication endpoints usually have observable indicators corresponding to the service communication process, enabling the service caller and service processor to form relatively clear diagnostic evidence. For internal components that are difficult to form independent and stable node-level diagnostic evidence, they can be saved as attributes of corresponding service nodes to reduce the interference of low signal-to-noise ratio nodes on the service topology fault tracing process. The direction of the directed edges can be determined according to the actual data propagation direction and / or the actual task propagation direction, rather than simply according to the direction of the call action in the program. For example, in a push relationship, the abnormal impact of an upstream node failure can propagate to downstream nodes along the data flow direction; in a pull relationship, an upstream node failure may cause downstream nodes to be unable to obtain the data or tasks they depend on, so that the abnormal impact is manifested in downstream nodes along the corresponding dependency relationship.
[0125] In some embodiments, the service topology can be stored using structured configurations such as YAML. The fault diagnosis device 2 can load the YAML configuration corresponding to the current target service link and parse the YAML configuration into a program-processable topology object. Based on the obtained topology object, a set of valid query objects corresponding to the current target service link, the correspondence between message queue topics and consumer groups, topology diagnosis information, and configuration information associated with the diagnosis process can be formed.
[0126] Nodes in the service topology can primarily store relatively stable structural facts, without requiring continuous storage of all runtime dynamic values. For example, runtime information such as device model, number of instances, and current configuration can be queried as needed by the corresponding diagnostic capability unit during the diagnostic process.
[0127] This optional embodiment allows the topology to preserve relatively stable causal relationships and query capability mappings between services, reducing the maintenance impact caused by frequently changing operational information being directly fixed in the topology, and improving the maintainability of the service topology.
[0128] In an optional embodiment, the method further includes: Step S700: Generate topology diagnostic information based on the service topology; The topology diagnostic information includes data flow relationships and / or task flow relationships between nodes, queryable indicators determined based on node attributes, and node attributes. The data flow relationships and / or task flow relationships include push relationships and / or pull relationships. Step S702: In response to the target node being a service node, determine the gRPC metrics and / or HTTP metrics corresponding to the target node based on the node attributes of the target node; Step S704: In response to the target node being a message queue topic node, determine the message backlog indicator and / or message delivery delay indicator corresponding to the target node.
[0129] Specifically, the original service topology does not need to be provided directly to the large language model 4 with the original configuration or a large list of edges. The fault diagnosis device 2 can convert the service topology into topology diagnosis information suitable for fault diagnosis through deterministic processing logic.
[0130] For each node, topology diagnostic information may include associated nodes organized according to data flow direction and / or task flow direction, push relationships and / or pull relationships, queryable metrics determined based on node attributes, and corresponding node attributes.
[0131] For service nodes, corresponding gRPC and / or HTTP metrics can be determined based on the communication types supported by the node and the node's attributes. In practice, the set of gRPC / HTTP metrics for a service node can be organized according to three metric elements. For message queue topic nodes, message backlog metrics and / or message delivery delay metrics can be determined.
[0132] In this optional embodiment, by performing deterministic processing before providing the service topology to the large language model 4, the causal relationships between nodes, node attributes, and queryable indicators can be formed into relatively clear text or structured representations. This reduces the situation where the large language model 4 infers the node indicator capabilities on its own based on the original configuration, thereby improving the accuracy of topology diagnostic information and the efficiency of the large language model in utilizing the service topology.
[0133] In an optional embodiment, the method further includes: Step S720: Based on the topology diagnostic information and the diagnostic evidence corresponding to the target node, the large language model is invoked to obtain the node diagnostic result; Step S722: In response to the node diagnosis result indicating that the target node is calling downstream nodes as a client and the indicators are abnormal, determine the downstream nodes to be further diagnosed according to the service topology. Step S724: In response to the node diagnosis result indicating that the target node is an abnormal indicator processed by the server itself, the target node is identified as a candidate root cause node.
[0134] Specifically, the target node's metrics can be categorized into call-side metrics generated when the target node acts as a client to call downstream nodes, and service-side metrics generated when the target node itself acts as a server to process requests. If the call-side metrics are abnormal, the abnormality may originate from a downstream node and propagate to the caller; the corresponding downstream node can then be queried along the service topology. If the target node's own server-side processing metrics are abnormal, the target node can become a candidate root cause node, which will be further assessed by the Large Language Model 4 in conjunction with other diagnostic evidence.
[0135] For message queue chains, the direction of fault propagation can be determined by combining push or pull relationships. For example, downstream consumption may stop, leading to an increase in message backlog, while message delivery delays may remain within the corresponding threshold range.
[0136] In this optional embodiment, by combining the node roles represented by the indicator source with the causal direction in the service topology, the large language model 4 can further distinguish the source of the anomaly from the affected nodes when multiple nodes exhibit anomalies simultaneously, rather than determining the root cause solely based on the absolute index level of a single node, thereby improving the accuracy of root cause node location.
[0137] In an optional embodiment, topology diagnostic information is generated through the service topology; the method further includes: Step S740: Configure the topology diagnostic information as a return object of the topology information acquisition tool; Step S742: Obtain the tool invocation request generated by the large language model for the topology information acquisition tool, wherein the tool invocation request includes a link identifier for characterizing the invocation intent of the link to be diagnosed; Step S744: In response to the tool call request, determine the topology diagnostic information to be returned based on the current target service link pre-bound to the topology information acquisition tool, without switching to the topology diagnostic information of other service links based on the link identifier.
[0138] Specifically, topology diagnostic information can be persistently injected into the system context. However, when using tool-invoking diagnostics, Big Language Model 4 may still repeatedly generate requests for topology information when it believes that topology information is missing, causing the diagnostic process to stop at repeatedly requesting information and not continue with subsequent evidence collection.
[0139] In one verification scenario, when topology diagnostic information was kept in the system context without configuring a topology information acquisition tool, the phenomenon of repeatedly requesting topology information and then idling occurred in almost all corresponding diagnostic tasks.
[0140] Therefore, the topology diagnostic information can be configured as a return object of the topology information acquisition tool that the large language model 4 can actively invoke, making topology acquisition a legitimate tool action in the iterative diagnostic process.
[0141] In practical implementation, topology acquisition requirements can be set in both the basic task configuration of the diagnostic system and the task description corresponding to the current target service link. This allows the large language model 4 to prioritize calling the topology information acquisition tool when starting single-link diagnosis. After obtaining the topology diagnostic information corresponding to the current target service link through the topology information acquisition tool, the large language model 4 can then select subsequent indicator query tools based on the topology diagnostic information.
[0142] The link identifier parameter can be used to enable the Large Language Model 4 to explicitly express the service link to be diagnosed. However, the actual returned topology diagnostic information can be determined by the current target service link pre-bound when the corresponding topology information acquisition tool is created. Therefore, even if the Large Language Model 4 fills in a link identifier that is inconsistent with the current task in the tool input parameters, it will not switch to the topology diagnostic information corresponding to other service links.
[0143] In practical implementation, non-empty input parameter structures can be configured for topology information acquisition tools, such as link identifier fields. For some structured tool calls, purely parameterless tools may generate empty string input parameters, leading to structured parameter parsing failures; by setting explicit tool input parameter fields, the abnormality of such tool call interfaces can be reduced.
[0144] By pre-binding the topology information acquisition tool to the current target service link and using the link identifier as the call intent field, the structural stability of the tool's call interface and the degree of isolation of topology information between different service links can be improved simultaneously. This reduces diagnostic idle time caused by repeated requests for topology information and improves the convergence efficiency of diagnostic tasks.
[0145] In an optional embodiment, the method further includes: Step S760: Configure diagnostic capability units for different query indicators. Each diagnostic capability unit includes indicator query capability, evidence structure, and diagnostic prompt information matching the evidence structure. Step S762: Configure the indicator query capability as an indicator query tool for the large language model to call; Step S764: In response to the large language model calling the indicator query tool, the diagnostic evidence formed based on the evidence structure is returned as a result by the tool and provided to the large language model. Step S766: Add the diagnostic prompt information to the diagnostic context used to invoke the large language model via a path different from the result returned by the tool.
[0146] A diagnostic capability unit can organize how to query the corresponding indicators, what evidence structure to use to organize the corresponding indicator data, and how the large language model 4 interprets the diagnostic prompts for this type of evidence in the same configurable unit.
[0147] The indicator query capability can be represented as a standard tool for the large language model 4; the diagnostic evidence generated after the indicator query tool is executed can be returned as a tool result and entered into the large language model 4; the diagnostic prompt information corresponding to the indicator can be added to the diagnostic context by the diagnostic kernel through another context injection path, without being mixed into the tool return result.
[0148] Diagnostic evidence primarily serves to express what the corresponding data is, without requiring the diagnostic capability unit to directly output a final judgment on whether the data belongs to the root cause. For example, the diagnostic capability unit can provide objective information such as "relative change of 9.2 times" or "load of a certain device instance is 98%", but whether it constitutes an anomaly and whether it belongs to the root cause can still be judged by the large language model 4 in combination with other evidence and service topology.
[0149] Different diagnostic capability units are not required to use a uniform evidence data structure. Each indicator can be configured with a suitable data structure and processing logic based on its own statistical characteristics.
[0150] Furthermore, when adding a new diagnostic indicator, a corresponding diagnostic capability unit can be added. This new diagnostic capability unit will independently provide indicator query capabilities, evidence structure, and diagnostic prompts. In this case, other existing diagnostic capability units, the basic iterative process of the diagnostic kernel, and the global diagnostic prompt configuration can remain unchanged.
[0151] Through the aforementioned three-in-one diagnostic capability unit, the indicator query capability, evidence structure, and corresponding diagnostic prompt information can maintain a configuration correspondence, reducing the possibility of mismatch between different configurations when adding or modifying diagnostic indicators, and improving the independence of diagnostic capability expansion.
[0152] like Figure 9As shown, a diagnostic capability unit, or a self-contained diagnostic capability unit for a single indicator, comprises three parts: ① Indicator query, defining what to query and how to query (e.g., PromQL, query interface, or mock implementation), exposed externally as a tool (function call) for the large language model; ② Evidence package, carrying the sample data of the indicator, its structure is private and varies depending on the indicator, provided to the large language model as the tool's return value; ③ Diagnostic prompt information, explaining how to interpret the evidence without directly giving an "abnormal" conclusion, injected into the context by the kernel without going through the tool return path. The large language model maintains complete judgment, forming root cause inferences solely based on the tool's return value and the injected prompt information.
[0153] In an optional embodiment, the diagnostic capability units corresponding to different query indicators are configured with evidence structures and indicator processing methods that match the corresponding indicators. The diagnostic capability units form objective indicator information based on the corresponding indicator processing methods, but do not generate root cause determinations on whether the corresponding indicators are abnormal based on the objective indicator information. The indicator processing methods include at least one of the following: forming relative change information of service indicators based on multiple historical time periods, forming device load information based on the load distribution of multiple device instances, forming message queue backlog information based on message backlog, and forming traffic information based on the relative change between current traffic and historical traffic.
[0154] Specifically, different indicators have different statistical semantics, so each diagnostic capability unit can adopt different evidence structures or terminal calculation methods. For example, service indicators can use three historical anchor points—one hour ago, the same time period the previous day, and the same time period the previous week—to form relative change information; device load indicators can form device load aggregation information based on the load distribution among multiple device instances; message queue backlog indicators can form the absolute amount of current message backlog and combine it with empirical references in the corresponding diagnostic prompts for processing by the large language model 4; traffic indicators can form information on the change in current traffic relative to traffic one hour ago.
[0155] By allowing different indicators to adopt processing methods that match their respective data characteristics, the loss of indicator semantics in order to forcibly unify the evidence data structure can be reduced, and the ability of the large language model 4 to perform comprehensive root cause reasoning on heterogeneous diagnostic evidence can be maintained, thereby improving the semantic integrity of diagnostic evidence and the quality of comprehensive root cause reasoning.
[0156] In an optional embodiment, the method further includes: Step S780: Obtain topology diagnostic information generated based on the service topology of the target service link; Step S782: For the node to be diagnosed in the target service link, determine the first set of diagnostic capability units based on the node attributes of the node to be diagnosed. Step S784: Determine the second set of diagnostic capability units based on the diagnostic capability declaration in the topology diagnostic information; Step S786: Merge and deduplicate the first set of diagnostic capability units and the second set of diagnostic capability units to obtain the set of diagnostic capability units corresponding to the node to be diagnosed. Step S788: In response to the fact that the diagnostic capability declaration cannot be mapped to a configured diagnostic capability unit, a configuration failure message is generated; The diagnostic capability unit can also be configured to acquire at least one of the following extended diagnostic information: change records, system logs, device load aggregation information, and object storage jitter information.
[0157] Specifically, node attributes can determine the general diagnostic capabilities applicable to this type of node, and the diagnostic capability declarations in the topology diagnostic information can further supplement the diagnostic dimensions specific to the target service link.
[0158] By merging and deduplicating the two sets of diagnostic capability units from node attributes and topology diagnostic information, we can obtain the set of tool capabilities actually equipped for the current node to be diagnosed.
[0159] If the topology diagnostic information declares a diagnostic capability unit that is not currently configured, configuration failure information can be generated so that configuration problems are exposed before actual diagnosis or during the corresponding capability assembly process, rather than being silently ignored during operation.
[0160] The diagnostic capability unit can also be expanded to obtain other diagnostic information such as change records, system logs, device load aggregation information, and object storage jitter information.
[0161] By assembling diagnostic capability units on a node-by-node basis based on service topology, the number of metric query tools unrelated to the current node entering the model's callable tool set can be reduced, and new diagnostic dimensions can be expanded by adding diagnostic capability units and corresponding configurations. This improves the targeting of diagnostic capability assembly and reduces the interference of irrelevant tools on the large language model 4.
[0162] like Figure 10As shown, the diagnostic capability assembly process is as follows: The node attributes of the node to be diagnosed and the diagnostic capability declarations from the topology diagnostic information are input into the diagnostic capability assembly logic. After merging and deduplication, a set of diagnostic capability units corresponding to the node to be diagnosed is obtained. If the diagnostic capability declaration cannot match the configured capabilities, a configuration failure message is generated. The set of diagnostic capability units can also be extended with access to change records, system logs, device load aggregation, and object storage jitter, among other extended diagnostic information. Each diagnostic capability unit includes an indicator query capability, an evidence structure, and diagnostic prompt information. The indicator query capability is configured as an indicator query tool. After the large language model initiates a tool call request, the diagnostic capability unit queries the indicator data source for indicator data, forms objective diagnostic evidence according to the evidence structure, and provides it to the large language model as the tool's return result. The diagnostic prompt information is injected into the diagnostic context via an independent path and provided to the large language model as call input.
[0163] In an optional embodiment, invoking the large language model to perform fault diagnosis includes: Step S800: In each diagnostic round, obtain a tool call request generated by the large language model. The tool call request is used to obtain diagnostic evidence corresponding to an indicator of a node to be diagnosed or to obtain topology diagnostic information corresponding to the target service link. Step S802: Execute the tool invocation request and add the corresponding tool return result to the diagnostic context; Step S804: Invoke the large language model again based on the updated diagnostic context; Step S806: If no tool call request for the conclusion submission tool is obtained and the number of iteration steps has not reached the maximum number of iteration steps, continue to execute the next diagnostic round, and stop initiating diagnostic tool calls when the number of iteration steps reaches the maximum number of iteration steps.
[0164] In some embodiments, an initial diagnostic context may be generated before initiating iterative diagnostics of a target service link. The initial diagnostic context may include system prompts, diagnostic method information, diagnostic prompts corresponding to the current diagnostic capability unit, and the current fault diagnosis task.
[0165] In a diagnostic round, Big Language Model 4 can generate only one tool call request to query an indicator of a node to be diagnosed or to obtain topology diagnostic information of the current target service link.
[0166] After a tool is invoked, the corresponding tool return result can be appended to the diagnostic context. The large language model 4 observes the return result of the newly added tool and then decides on the tool to be invoked in the next diagnostic round.
[0167] Therefore, the Big Language Model 4 does not need to generate a complete list of indicator queries all at once in the initial stage, but can gradually determine the subsequent evidence collection targets based on the actual diagnostic evidence obtained at each step.
[0168] like Figure 11 As shown, iterative diagnosis starts with an initial context, which includes system prompts, diagnostic methodology, indicator interpretation prompts, and the current task. It then enters a single-step loop: ① The large language model performs reasoning (COT inference); ② A tool is invoked once to query a single indicator of a single node or obtain topological diagnostic information (get_battlemap); ③ Evidence is appended to the context and observed by the large language model, after which the next single-step loop continues. When the large language model invokes the conclusion submission tool (submit_diagnosis), the diagnosis converges and outputs the root cause determination, inference chain, and topological location results; the loop ends when convergence or the upper bound of the iteration is reached.
[0169] In response to the fact that diagnostic evidence supporting the candidate root cause conclusion has been formed in the previous few diagnostic rounds, the Big Language Model 4 can call the conclusion submission tool in advance; in response to the fact that no candidate root cause conclusion has been formed, the upper bound of the execution of the tool call process can be limited by the maximum number of iteration steps.
[0170] The maximum number of iteration steps can be configured according to the diagnostic scale of the target service link (e.g., the maximum number of iteration steps can be the same as the diagnostic scale of the target service link). This application does not limit the specific value of the maximum number of iteration steps.
[0171] By using single-step tool calls, a relatively clear data relationship can be formed between each round of newly added diagnostic evidence and the next round of tool calls. This allows the diagnostic path to unfold step by step along the service topology and reduces unnecessary subsequent indicator queries when effective root cause evidence is obtained earlier. This enhances the traceability of the diagnostic reasoning chain and reduces diagnostic costs.
[0172] like Figure 12 As shown, the initial diagnostic context (including system prompts, diagnostic method information, diagnostic hints, and fault diagnosis tasks) is used to invoke the large language model. After generating a tool call request in the current diagnostic round, it is processed according to the tool call type: topology-related requests enter the topology information acquisition tool, indicator-related requests enter an indicator query tool for a node to be diagnosed, and conclusion-related requests enter the conclusion submission tool and are transferred to the consistency verification process. After topology-related and indicator-related requests execute the tool call and obtain the tool return results, the tool return results are added to the diagnostic context. If no conclusion is submitted, it is determined whether the maximum number of iterations has been reached: if not, the next diagnostic round continues to invoke the large language model; if the maximum number of iterations has been reached, the initiation of diagnostic tool calls is stopped.
[0173] In an optional embodiment, when the fault diagnosis task corresponds to multiple service links, the method further includes: Step S820: Determine the service link to be diagnosed based on the explicit link information, service domain information and trigger cause information in the fault diagnosis task. The service link is determined first by using explicit link information, and secondly by using service domain information. If the service link to be diagnosed is not determined based on the explicit link information and the service domain information, the large language model is called to classify the trigger cause information to determine the service link to be diagnosed. Step S822: Create single-link diagnostic tasks for multiple service links to be diagnosed, and maintain independent diagnostic context, query object verification status and diagnostic results for each single-link diagnostic task. Step S824: Execute multiple single-link diagnostic tasks in parallel, wherein failure of one single-link diagnostic task does not terminate the other single-link diagnostic tasks.
[0174] Specifically, the fault diagnosis task may carry at least one of explicit link information, service domain information, and trigger cause information.
[0175] When explicit link information is available, the service link to be diagnosed can be determined based on the explicit link information. When there is no explicit link information, one or more service links to be diagnosed can be determined based on the service domain information. When the aforementioned information cannot determine the service link to be diagnosed, the Large Language Model 4 can be called to classify the triggering cause information.
[0176] Multiple single-link diagnostic tasks can be executed in parallel in execution units that are isolated from each other.
[0177] In some embodiments, each single-link diagnostic task can be executed by an independent thread, and the query object verification status, conclusion collector, and diagnostic context corresponding to that service link can be configured separately.
[0178] The query object verification status can save the valid query objects and the number of consecutive errors in the current service link; the conclusion collector can save the valid diagnostic judgments that have passed the corresponding consistency checks in the current service link; the diagnostic context can save the model inputs and tool return results of each diagnostic round in the current service link.
[0179] Because the above states are isolated from each other according to the service link, an error in the execution of a single-link diagnostic task, continuous illegal queries, or the status of conclusion collection will not directly cover the corresponding status of other single-link diagnostic tasks.
[0180] By prioritizing explicit link information and service domain information with higher determinism, and then using the Large Language Model 4 to classify the triggering cause information when the corresponding information is insufficient, unnecessary model classification processing can be reduced. Through multi-link state isolation and parallel execution, the impact of a single service link diagnosis failure on the diagnosis process of other service links can be reduced, thereby improving the overall success rate of multi-link fault diagnosis and the efficiency of parallel processing.
[0181] In an optional embodiment, the method further includes: Step S840: When a fault diagnosis task corresponds to multiple service links, create a single-link diagnosis task for each of the multiple service links to be diagnosed; execute the multiple single-link diagnosis tasks to obtain the diagnosis results of the multiple single-link diagnosis tasks. Step S842: Classify the diagnostic results of multiple single-link diagnostic tasks through deterministic aggregation processing; Step S844: Determine the service link where the diagnostic execution error occurred as a failed state, determine the service link that was determined to be normal after diagnosis as a healthy state, and determine the service link that was determined to have a traffic surge and / or node root cause as an affected state. Step S846: In response to the service link not submitting a valid diagnostic judgment, the service link is determined to be in an incomplete diagnostic state, instead of being determined to be in a healthy state. Step S848: In response to the existence of a service link in the incomplete diagnosis state, generate status information representing the incomplete part of the diagnosis in the overall diagnosis result.
[0182] Specifically, after multiple single-link diagnostic tasks are completed, the service links can be classified according to the results formed by each single-link diagnostic task through deterministic aggregation logic, without reinterpreting or overriding the diagnostic judgments formed by each single-link diagnostic task through the second major language model.
[0183] Failure status corresponds to a program error occurring during diagnostic execution. Health status corresponds to a completed diagnostic and a normal assessment. Affected status corresponds to a confirmed traffic surge or node root cause. Incomplete diagnostic status corresponds to a service link that has not submitted any valid diagnostic assessment, such as a service link that has ended while idle or has terminated before completing valid evidence collection.
[0184] The incomplete diagnosis status is distinct from the healthy status; the absence of a valid diagnostic determination is not equivalent to a normal examination result.
[0185] Therefore, when there is at least one service link in a state of incomplete diagnosis among multiple target service links, status information representing the incomplete diagnosis can be added to the overall diagnosis result.
[0186] By using the above-mentioned deterministic status classification, we can reduce the false health results caused by misclassifying service links that "have not formed an effective diagnostic judgment" as healthy status, and enable the overall diagnostic results to reflect the actual diagnostic coverage status of each individual link, thereby enhancing the credibility of the overall diagnostic results.
[0187] In an optional embodiment, the method further includes: Step S860: Obtain the root cause nodes corresponding to the multiple service links in the affected state; Step S862: Based on the root cause node, perform cross-link association on multiple service links to determine the root cause node shared by multiple service links.
[0188] Specifically, if the single-link diagnostic results of two or more service links point to the same root cause node, a shared root cause association between the service links can be established during the deterministic aggregation phase.
[0189] The cross-link association does not change the root cause determination of each individual link, but forms incident-level association information at the aggregation layer.
[0190] In some embodiments, after multiple single-link diagnostic tasks have completed deterministic aggregation, an incident-level summary report can also be generated. The incident-level summary report may include comparative information on diagnostic results between multiple service links, and may establish sub-report links pointing to each single-link diagnostic report.
[0191] Through the sub-report links, the root cause determination, diagnostic reasoning chain, supporting evidence, and diagnostic coverage of the corresponding target service link can be further located from the incident-level summary report. While retaining the overall cross-link correlation information, the traceability of the diagnostic process of each individual link is preserved, which improves the efficiency of identifying shared root causes across links and the efficiency of locating incident-level faults.
[0192] like Figure 13As shown, the multi-link diagnostic process is as follows: the fault input parameters carry the link set, business domain, or triggering cause. The link to be diagnosed is determined through intent routing, with priority given to explicit link information, followed by business domain information, and finally classification by a large language model based on the cause text. Subsequently, the diagnosis is executed in parallel, with each link running in an independent execution unit (goroutine) and configured with an independent query object guard, conclusion collector, and diagnostic context, forming single-link diagnosis A, single-link diagnosis B, up to single-link diagnosis N. The failure of any single link does not interrupt other sibling links. After each single-link diagnosis is completed, deterministic aggregation logic (without introducing a second large language model) performs classification and cross-link association (identifying shared root causes), dividing each link into four states: Affected, Health, Inconclusive, and Failed. The Inconclusive state reflects the false health defense line—not submitting a diagnostic judgment does not equal health. Finally, an incident-level general report is generated, which includes cross-link comparisons and links to sub-reports of each single link.
[0193] In an optional embodiment, the fault diagnosis task is triggered by any one of the following methods: scheduled inspection, service level target anomaly, or manual operation; the fault diagnosis tasks generated by different triggering methods include the link to be diagnosed, the diagnosis time window, and the triggering reason, and are processed through the same fault diagnosis processing flow.
[0194] Specifically, scheduled inspections can generate fault diagnosis tasks according to a predetermined time; service level target anomaly triggers can generate fault diagnosis tasks when the corresponding service level target conditions are triggered; manual operation can generate fault diagnosis tasks for a specified service link.
[0195] The difference between different triggering methods can be mainly reflected in the source of the fault diagnosis task, rather than requiring different diagnostic kernels to be implemented for each triggering method.
[0196] In some embodiments, the diagnostic time window can be represented by both the start and end times. For example, the start and end positions of the time window corresponding to this fault diagnosis can be recorded using the start and end fields, respectively.
[0197] The fault diagnosis device 2 can organize the link information to be diagnosed, start time, end time and triggering reason into a unified task input, so that fault diagnosis tasks generated by different triggering sources can enter the same fault diagnosis processing flow.
[0198] By using a unified task input, the redundant configuration of diagnostic capabilities caused by maintaining different diagnostic processing links for different trigger sources can be reduced, and the same diagnostic kernel can be applied to timed, abnormal triggering, and manual diagnostic scenarios, thereby improving the reusability of the diagnostic kernel and the access efficiency of new triggering methods.
[0199] In an optional embodiment, the method further includes: Step S900: For each diagnostic round of the large language model, record a snapshot of the complete diagnostic context corresponding to the call to the large language model; The complete diagnostic context snapshot includes at least one of system prompts, historical interaction information, and tool return results.
[0200] Specifically, before each call to the large language model 4, the diagnostic context actually provided to the large language model 4 in that diagnostic round can be recorded, instead of only recording the diagnostic results finally output by the large language model 4.
[0201] The complete diagnostic context snapshot may also include at least one of the following: topology diagnostic information, indicator diagnostic evidence, query object verification feedback, and consistency verification feedback.
[0202] By saving complete diagnostic context snapshots for each diagnostic round, a correspondence can be established between the diagnostic behavior of the Large Language Model 4 and the information actually obtained in that diagnostic round.
[0203] For example, in cases of repeated requests for topology information or abnormal diagnostic paths, the context snapshot of the corresponding diagnostic round can be read to confirm whether the large language model 4 has actually received the corresponding topology diagnostic information, indicator evidence, or constraint feedback.
[0204] The above methods can improve the reproducibility of the automatic fault diagnosis process and the problem localization capability of the diagnostic kernel itself.
[0205] In an optional embodiment, the method further includes: Step S920: Before determining the root cause diagnosis result, the reflective model is invoked to process the diagnostic reasoning information that has been formed based on the current diagnostic context to obtain review suggestions; Step S922: Add the review suggestion to the diagnostic context; Step S924: Based on the diagnostic context with the added review recommendations, continue to invoke the large language model to perform fault diagnosis.
[0206] Specifically, the reflective model can serve as an advisory processing unit outside the main diagnostic model, generating review suggestions to determine whether there are omissions or obvious inconsistencies in the currently formed diagnostic reasoning information.
[0207] The reflective model itself does not directly cover the root cause determinations that have been formed or subsequently formed by the primary diagnostic model. The primary diagnostic model can continue to perform the diagnosis based on the current diagnostic evidence and review recommendations, and decide whether to adopt the review recommendations.
[0208] In this optional embodiment, by using the reflection results as additional diagnostic context rather than the final decision, additional reasoning and verification paths can be provided, while retaining the main diagnostic model's ability to form final candidate root cause conclusions. This enhances the completeness of the diagnostic reasoning process and improves the reliability of the final root cause conclusions.
[0209] In an optional embodiment, the fault diagnosis device abstractly calls the indicator platform that provides indicator data through the indicator query interface, so that the indicator platform can be replaced while keeping the calling method of the diagnostic capability unit unchanged; the fault diagnosis device calls the large language model through the large language model call abstract interface, and obtains the tool call request generated by the large language model through the structured tool call interface.
[0210] Specifically, the diagnostic capability unit does not need to be directly bound to a specific indicator platform, but can be oriented towards a unified indicator query interface.
[0211] The underlying indicator query interface can connect to an actual indicator data source (6), or it can be implemented using a simulation in a test environment. In response to a change in the indicator data source, the specific implementation of the underlying indicator query interface can be replaced, while keeping the way the diagnostic capability unit calls the indicator query capability unchanged.
[0212] Similarly, the large language model 4 can be accessed through the abstract interface called by the general model, as long as the corresponding model supports the structured tool calling capability that matches the tool calling process of this application.
[0213] For example, the abstract interface for calling large language models can be connected to different large language model implementations in the form of a dialogue model, and the tool name, tool input parameters and corresponding tool call requests can be obtained through function calls.
[0214] By adopting the above approach, the fault diagnosis kernel can reduce the coupling to specific indicator platforms, specific model names, or specific model providers, so that the main diagnostic processing links remain relatively stable when the underlying basic capabilities are replaced, thereby improving the portability of the fault diagnosis system and the replacement efficiency of underlying components.
[0215] In some embodiments, fault diagnosis results may be output as a combination of topology diagrams and text reports.
[0216] Topology graphs can use different display attributes to distinguish root cause nodes, affected nodes, checked normal nodes, and unchecked nodes.
[0217] For example, red, orange, green, and light gray can be used to represent root cause nodes, affected nodes, checked normal nodes, and unchecked nodes, respectively. The colors mentioned above are only used to illustrate one result display method; in other implementations, different line styles, fill methods, or other status markers can be used to distinguish different node states.
[0218] In some embodiments, topology diagnostic results can be output in vector form. For example, a topology state diagram in a specific format (such as SVG) can be generated based on the display attributes corresponding to the root cause node, affected nodes, checked normal nodes, and unchecked nodes, and the topology state diagram can be associated with and output with root cause determination and diagnostic reasoning information.
[0219] Written reports may include at least one of the following: root cause determination, diagnostic reasoning chain, supporting evidence, and uncovered dimensions.
[0220] The confidence level of root cause determination can be represented by discrete levels such as high, medium, and low, without having to output high-precision confidence values that lack corresponding statistical basis.
[0221] Uncovered dimensions can be used to record nodes or metrics that were not actually queried in this diagnosis, enabling the result reader to distinguish between objects that have been checked and those that have not yet been checked.
[0222] By simultaneously presenting node status, root cause determination, supporting evidence, and uncovered dimensions in the output, a correspondence can be established between the fault diagnosis results and the actual evidence coverage, thereby improving the traceability of the diagnosis results.
[0223] To make this application easier to understand, the following is combined with Figures 2A to 8 Several exemplary applications are provided.
[0224] Example Application 1: Handling Low Traffic Latency Misjudgments.
[0225] S1, Fault diagnosis device 2 starts a fault diagnosis task for a target service link. The large language model 4 first obtains the topology diagnosis information of the current target service link through the topology information acquisition tool, and queries the relevant node indicators in a single-step iterative manner.
[0226] In S2, a low-traffic gRPC node, the number of diagnostic evidence characterization requests is approximately 6.5 times / second. The P99 latency may fluctuate due to a small number of slow requests. The maximum relative multiple of the fault period relative to multiple historical anchors is approximately 1.2.
[0227] S3, the deterministic processing logic corresponding to the indicator query tool forms the reliability of the delayed signal, steady state and maximum relative multiple based on the request volume and the relative comparison results of the three anchor points, and provides it to the large language model 4 along with diagnostic evidence.
[0228] S4, in one verification process, tried to limit the misjudgment of low traffic latency by continuously adding judgment rules to the diagnostic prompt information. However, even after adding or adjusting the corresponding prompt rules four times in a row, the large language model 4 may still continue to use the latency index corresponding to the low traffic node as the root cause.
[0229] S5, the large language model 4 may also interpret the situation where the fault period and multiple historical anchor points are at similar high levels as the delay index being consistently high, and continue to form candidate root cause conclusions based on this index.
[0230] S6, after introducing a deterministic consistency check set on the conclusion submission tool call chain, the large language model 4 submits candidate root cause conclusions and structured evidence information through the conclusion submission tool. The deterministic check logic checks the logical consistency between the candidate root cause conclusions and the reliability of the delayed signal, the steady state, and the maximum relative multiple.
[0231] S7. In response to the candidate root cause conclusion not meeting the preset consistency constraint, the candidate root cause conclusion in this round will not be written into the valid diagnostic results, but the corresponding conflict reason will be added as a verification feedback to the subsequent diagnostic loop.
[0232] S8, the large language model 4 re-executes the diagnosis based on the verification feedback. In the corresponding verification, the aforementioned low-traffic nodes are ultimately excluded, and the root cause diagnosis result can be "not located"; the diagnostic direction obtained when executing the corresponding verification multiple times remains consistent.
[0233] This example demonstrates that the consistency verification mechanism does not replace the selection of new root causes by fixed rules in the large language model 4. Instead, it prevents the corresponding candidate root cause conclusions from becoming valid root cause diagnostic results without processing when there is a pre-defined logical conflict between the candidate root cause conclusions generated by the large language model 4 and its structured evidence information.
[0234] Example Application 2: Traffic Surge Link.
[0235] S1, Fault diagnosis device 2 performs evidence collection node by node based on the topology diagnosis information corresponding to the target service link.
[0236] S2, the diagnostic capability unit acquires traffic information and forms information on the relative change of current traffic compared to the traffic one hour ago.
[0237] In a validation example, S3 showed that audio processing traffic in the target service link increased by approximately 3.33 times compared to an hour earlier.
[0238] S4, the large language model 4, combines traffic changes, service node indicators, and service topology relationships to continue performing causal diagnosis, enabling the diagnosis of service node resource anomalies based solely on service node load performance to be further distinguished from the diagnosis of service node overload caused by traffic surges.
[0239] S5, the final root cause diagnosis results can record the corresponding root cause determination, diagnostic reasoning chain and supporting evidence.
[0240] This example demonstrates how service topology relationships and heterogeneous diagnostic capabilities enable evidence of traffic changes to be used in the same diagnostic process as evidence of service node operation, reducing the risk of root cause bias caused by observing only a single absolute load metric.
[0241] Example Application 3: Degraded Message Queue Consumption Link.
[0242] S1, the fault diagnosis device 2 obtains the target service link topology containing the message queue topic, and confirms that the message queue topic and the corresponding consumer group belong to the current target service link through the query object verification mechanism.
[0243] S2, the large language model 4 queries the message backlog index and message delivery delay index according to the single-step iterative diagnostic process.
[0244] S3, in a verification example, the corresponding service chain converged after 38 diagnostic steps. The message backlog of one of the consumer groups reached approximately 26.2 times the corresponding reference threshold, while the message delivery delay was still within the corresponding threshold range.
[0245] S4, the Big Language Model 4, combines message queue diagnostic evidence, consumer group relationships, and service topology causal relationships to direct the diagnostic direction towards downstream consumption stagnation, rather than directly identifying the message queue itself or upstream service nodes as the root cause. It can also combine traffic diagnostic evidence to rule out traffic surges.
[0246] S5 responds to other service links associated with the same incident. The diagnostic results of each single link can be classified by deterministic aggregation logic, and further cross-link associations can be established based on the same root cause node.
[0247] This example demonstrates how message backlog, message delivery delay, and consumption relationships in the service topology can be used to distinguish different processing stages such as message generation, message queue transmission, and downstream consumption, allowing the determination of root cause nodes and affected nodes to further correspond to actual data flow relationships.
[0248] In some embodiments, the fault root cause diagnosis method of this application may not rely on performing specialized model fine-tuning on the large language model 4 for the current target service link, but instead organize the diagnosis process through deterministic processing logic of manually curated service topology, context engineering, diagnostic capability units and tool call layer.
[0249] When a new target service link is added, the corresponding service topology configuration can be added or updated; when a new diagnostic indicator is added, the corresponding diagnostic capability unit can be added, thereby enabling the service topology and diagnostic indicator capabilities to be expanded separately.
[0250] It should be noted that the request volume, relative multiple, iteration steps and other specific data in the above application examples are all from exemplary diagnostic scenarios and are only used to illustrate the corresponding implementation process. They do not constitute a limitation on the parameter range, threshold or number of diagnostic steps in other implementations.
[0251] Example 2 Figure 14 The diagram schematically illustrates a fault root cause diagnosis device according to Embodiment 2 of this application. This device can be divided into one or more program modules. One or more program modules are stored in a storage medium and executed by one or more processors to complete the embodiment of this application. The program module referred to in this embodiment is a series of computer program instruction segments capable of performing a specific function. The following description will specifically introduce the function of each program module in this embodiment. For example... Figure 14 As shown, the device 1000 may include: an acquisition module 1100, a verification module 1200, and a processing module 1300, wherein: The acquisition module 1100 is used to acquire the candidate root cause conclusions submitted by the large language model for the target service link through the conclusion submission tool, as well as the structured evidence information corresponding to the candidate root cause conclusions. The verification module 1200 is used to perform consistency verification on the candidate root cause conclusion and the structured evidence information based on preset consistency constraints through deterministic verification logic set on the call chain of the conclusion submission tool. The processing module 1300 is configured to generate verification feedback in response to the failure of the consistency check, and continue to call the large language model to perform fault diagnosis based on the verification feedback; and to determine the root cause diagnosis result of the target service link based on the candidate root cause conclusion in response to the success of the consistency check.
[0252] Each module and optional extension module in the above embodiment 2 corresponds one-to-one with the steps in the aforementioned embodiment 1. For details, please refer to the corresponding method embodiment.
[0253] Example 3 Figure 15This illustration schematically shows a hardware architecture diagram of a computer device 10000 suitable for implementing a root cause diagnosis method according to Embodiment 3 of this application. In some embodiments, the computer device 10000 may be a terminal device such as a smartphone, wearable device, tablet computer, personal computer, in-vehicle terminal, game console, virtual device, workbench, digital assistant, set-top box, robot, etc. In other embodiments, the computer device 10000 may be a rack server, blade server, tower server, or cabinet server (including standalone servers or server clusters composed of multiple servers), etc. Figure 15 As shown, the computer device 10000 includes, but is not limited to: a memory 10010, a processor 10020, and a network interface 10030 that can communicate and be linked with each other via a system bus. Wherein: The memory 10010 includes at least one type of computer-readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 10010 may be an internal storage module of a computer device 10000, such as the hard disk or memory of the computer device 10000. In other embodiments, the memory 10010 may also be an external storage device of the computer device 10000, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device 10000. Of course, the memory 10010 may also include both the internal storage module and the external storage device of the computer device 10000. In this embodiment, the memory 10010 is typically used to store the operating system and various application software installed on the computer device 10000, such as program code for root cause diagnosis methods. In addition, the memory 10010 can also be used to temporarily store various types of data that have been output or will be output.
[0254] In some embodiments, processor 10020 may be a central processing unit (CPU), controller, microcontroller, microprocessor, or other chip. Processor 10020 is typically used to control the overall operation of computer device 10000, such as performing control and processing related to data interaction or communication with computer device 10000. In this embodiment, processor 10020 is used to run program code stored in memory 10010 or process data.
[0255] Network interface 10030 may include a wireless network interface or a wired network interface, which is typically used to establish a communication link between computer device 10000 and other computer devices. For example, network interface 10030 is used to connect computer device 10000 to an external terminal via a network, establishing a data transmission channel and communication link between computer device 10000 and the external terminal. The network may be an intranet, the Internet, Global System for Mobile Communication (GSM), Wideband Code Division Multiple Access (WCDMA), 4G network, 5G network, Bluetooth, Wi-Fi, or other wireless or wired networks.
[0256] It should be pointed out that, Figure 15 Only computer devices with components 10010-10030 are shown; however, it should be understood that it is not required to implement all of the shown components, and more or fewer components may be implemented instead.
[0257] In this embodiment, the fault root cause diagnosis method stored in memory 10010 can also be divided into one or more program modules and executed by one or more processors (such as processor 10020) to complete the embodiment of this application.
[0258] Example 4 This application also provides a computer-readable storage medium storing a computer program thereon, wherein the computer program, when executed by a processor, implements the steps of the fault root cause diagnosis method in the embodiments.
[0259] In this embodiment, the computer-readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the computer-readable storage medium can be an internal storage unit of a computer device, such as the hard disk or memory of the computer device. In other embodiments, the computer-readable storage medium can also be an external storage device of the computer device, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device. Of course, the computer-readable storage medium can also include both the internal storage unit and the external storage device of the computer device. In this embodiment, the computer-readable storage medium is typically used to store the operating system and various application software installed on the computer device, such as the program code of the fault root cause diagnosis method in the embodiment. In addition, the computer-readable storage medium can also be used to temporarily store various types of data that have been output or will be output.
[0260] Example 5 This application also provides a computer program product, including a computer program that, when executed by a processor, implements the methods described in the above embodiments.
[0261] Obviously, those skilled in the art should understand that the modules or steps of the embodiments of this application described above can be implemented using general-purpose computer devices. They can be centralized on a single computer device or distributed across a network of multiple computer devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computer device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the embodiments of this application are not limited to any particular combination of hardware and software.
[0262] It should be noted that the above are merely preferred embodiments of this application and do not limit the scope of patent protection of this application. Any equivalent structural or procedural changes made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of this application.
Claims
1. A method for diagnosing the root cause of a fault, characterized in that, The method includes: Obtain the candidate root cause conclusions submitted by the large language model for the target service link through the conclusion submission tool, as well as the structured evidence information corresponding to the candidate root cause conclusions; By setting deterministic verification logic on the call chain of the conclusion submission tool, the consistency verification between the candidate root cause conclusion and the structured evidence information is performed based on preset consistency constraints. In response to the failure of the consistency check, a check feedback is generated, and the large language model is called to perform fault diagnosis based on the check feedback; in response to the success of the consistency check, the root cause diagnosis result of the target service link is determined based on the candidate root cause conclusion.
2. The method according to claim 1, characterized in that, The candidate root cause conclusions include root cause nodes; for each root cause node identified as a root cause, the structured evidence information includes at least one of indicator source, indicator, reliability of delayed signal, steady-state state, and maximum relative multiple; the consistency check is determined to have failed in response to any of the following conditions: The candidate root cause conclusions are based on delay anomalies, and the credibility of the corresponding delay signal indicates that the delay signal is unreliable. The candidate root cause conclusions are based on delayed anomalies, and the corresponding steady-state state characterization indicators are in a steady state. The candidate root cause conclusion uses the delay anomaly as the root cause basis, the corresponding delay signal credibility characterizes the delay signal credibility, the corresponding steady state characterizes the target index as unsteady, and the maximum relative multiple is less than a preset threshold.
3. The method according to claim 1, characterized in that, The method further includes: Obtain the service topology corresponding to the target service link, and determine the legitimate query object based on the service topology; Obtain the index query request generated by the large language model; Before executing the indicator query request, the query object in the indicator query request is verified according to the valid query object; In response to the successful verification of the queried object, the indicator query request is executed; In response to the failure of the query object verification, the indicator query for the query object is not executed, and the corresponding correction feedback is encapsulated as the normal tool return result of the indicator query request and provided to the large language model.
4. The method according to claim 1, characterized in that, The method further includes: Obtain the service topology constructed for fault source tracing based on service level objectives; The service topology includes multiple nodes and directed edges connecting the nodes. Each node includes a service communication endpoint and a message queue topic. The direction of the directed edge represents the data flow direction and / or task flow direction. Object storage, cache, database, and / or local computation are treated as node attributes of the corresponding node, rather than as independent nodes in the service topology.
5. The method according to claim 4, characterized in that, The method further includes: Generate topology diagnostic information based on the service topology; Configure the topology diagnostic information as a return object of the topology information acquisition tool; Obtain the tool invocation request generated by the large language model for the topology information acquisition tool, wherein the tool invocation request includes a link identifier used to characterize the invocation intent of the link to be diagnosed; In response to the tool call request, the topology diagnostic information to be returned is determined based on the current target service link pre-bound to the topology information acquisition tool, without switching to the topology diagnostic information of other service links based on the link identifier.
6. The method according to claim 1, characterized in that, The method further includes: Diagnostic capability units are configured for different query indicators. Each diagnostic capability unit includes indicator query capability, evidence structure, and diagnostic prompt information matching the evidence structure. Configure the indicator query capability as an indicator query tool that can be called by the large language model; In response to the large language model calling the indicator query tool, the diagnostic evidence formed based on the evidence structure is returned as the result by the tool and provided to the large language model; The diagnostic prompts are added to the diagnostic context used to invoke the large language model via a path different from the results returned by the tool.
7. The method according to claim 1, characterized in that, The method further includes: When a fault diagnosis task corresponds to multiple service links, a single-link diagnosis task is created for each of the multiple service links to be diagnosed; the multiple single-link diagnosis tasks are executed to obtain the diagnosis results of the multiple single-link diagnosis tasks. The diagnostic results of multiple single-link diagnostic tasks are classified through deterministic aggregation processing; Service links where diagnostic errors occur are identified as failed; service links that are identified as normal after diagnosis are identified as healthy; and service links that are identified as having traffic spikes and / or root causes are identified as affected. In response to a service link failing to submit a valid diagnostic assessment, the service link is determined to be in an incomplete diagnostic state, rather than being determined to be in a healthy state. In response to the existence of a service link in the incomplete diagnosis state, status information representing the incompleteness of a partial diagnosis is generated in the overall diagnosis result.
8. A root cause diagnosis device for faults, characterized in that, The device includes: The acquisition module is used to acquire the candidate root cause conclusions submitted by the large language model for the target service link through the conclusion submission tool, as well as the structured evidence information corresponding to the candidate root cause conclusions. The verification module is used to verify the consistency between the candidate root cause conclusion and the structured evidence information based on preset consistency constraints through deterministic verification logic set on the call chain of the conclusion submission tool. The processing module is configured to generate verification feedback in response to the failure of the consistency check, and continue to call the large language model to perform fault diagnosis based on the verification feedback; and to determine the root cause diagnosis result of the target service link based on the candidate root cause conclusion in response to the success of the consistency check.
9. A computer device, characterized in that, include: At least one processor; and A memory communicatively connected to the at least one processor; wherein: The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the method as described in any one of claims 1 to 7.
11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.
