Data processing method and apparatus

By constructing a hierarchical structure diagram and using multi-dimensional fault detection, the problem of low efficiency in troubleshooting multi-agent systems is solved, enabling rapid and accurate location of root causes and reducing operation and maintenance costs.

CN123178133APending Publication Date: 2026-11-27ALIBABA (CHINA) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611084690.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-21
Publication Date
2026-11-27

Smart Images

  • Figure CN123178133A_ABST
    Figure CN123178133A_ABST
Patent Text Reader

Abstract

Embodiments of the present specification provide a data processing method and device, the method comprising: obtaining a target execution track of a target task and task information corresponding to the target task, the target execution track being obtained by processing the target task through a multi-agent system, and a task processing result of the target task being a failure, the target execution track comprising a plurality of execution steps; constructing a hierarchical structure diagram according to the target execution track and the task information; inputting the hierarchical structure diagram, the target execution track, and detection prompt texts corresponding to each fault detection unit into corresponding fault detection units, obtaining a fault step set according to fault information output by each fault detection unit; determining a target root cause step in the fault step set according to a dependency graph constructed based on the plurality of execution steps; and distinguishing between surface abnormalities and root causes according to a dependency relationship between the execution steps, thereby avoiding misjudgment of derivative errors as root causes, and improving positioning accuracy and explainability of the target root cause step.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of computer technology, and in particular to a data processing method. One or more embodiments of this specification also relate to a data processing apparatus, a computing device, a computer-readable storage medium, and a computer program product. Background Technology

[0002] As multi-agent systems are increasingly used in complex tasks such as R&D assistance, operation and maintenance diagnosis, data analysis, and information retrieval, the scale of system calls and user coverage are constantly expanding. However, once a multi-agent system gives an incorrect result, users can usually only perceive that the task has failed, but cannot know where the problem lies.

[0003] Existing troubleshooting methods heavily rely on manual intervention. Specifically, the execution trajectories of multi-agent systems often involve multiple rounds of collaboration, multiple roles, tool calls, and lengthy contextual information. When an operations engineer receives feedback of a task failure, they need to manually read the entire trajectory, analyze the logic step by step, check role behavior, verify tool inputs and outputs, and then deduce the root cause. Determining the root cause of a single execution trajectory typically takes about 30 minutes. As the system's workload and the number of failed tasks increase, this manual troubleshooting model cannot support large-scale operations and maintenance. It is not only slow to respond but also severely consumes expert manpower, resulting in high operational efficiency and costs. Summary of the Invention

[0004] In view of the above, embodiments of this specification provide a data processing method. One or more embodiments of this specification also relate to a data processing apparatus, a computing device, a computer-readable storage medium, and a computer program product, to address the technical deficiencies existing in the prior art.

[0005] According to a first aspect of the embodiments of this specification, a data processing method is provided, comprising: Obtain the target execution trajectory of the target task and the task information corresponding to the target task, wherein the target execution trajectory is obtained by processing the target task through a multi-agent system, and the task processing result of the target task is failure, and the target execution trajectory contains multiple execution steps; Construct a hierarchical structure diagram based on the target execution trajectory and the task information; The hierarchical structure diagram, the target execution trajectory, and the detection prompt text corresponding to each fault detection unit are input into the corresponding fault detection unit. Based on the fault information output by each fault detection unit, a set of fault steps is obtained. Based on the dependency graph constructed from the multiple execution steps, the target root cause step is determined in the set of failure steps.

[0006] According to a second aspect of the embodiments of this specification, a data processing apparatus is provided, comprising: The acquisition module is configured to acquire the target execution trajectory of the target task and the task information corresponding to the target task, wherein the target execution trajectory is obtained by processing the target task through a multi-agent system, and the task processing result of the target task is failure, and the target execution trajectory contains multiple execution steps; The construction module is configured to construct a hierarchical structure diagram based on the target execution trajectory and the task information; The detection module is configured to input the hierarchical structure diagram, the target execution trajectory, and the detection prompt text corresponding to each fault detection unit into the corresponding fault detection unit, and obtain a set of fault steps based on the fault information output by each fault detection unit. The determination module is configured to identify the target root cause step in the set of failure steps based on the dependency graph constructed from the plurality of execution steps.

[0007] According to a third aspect of the embodiments of this specification, a computing device is provided, comprising: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions, which, when executed by the processor, implement the steps of the above-described data processing method.

[0008] According to a fourth aspect of the embodiments of this specification, a computer-readable storage medium is provided that stores a computer program / instructions that, when executed by a processor, implement the steps of the data processing method described above.

[0009] According to a fifth aspect of the embodiments of this specification, a computer program product is provided, including a computer program / instructions that, when executed by a processor, implement the steps of the above-described data processing method.

[0010] This specification provides a data processing method in one embodiment that constructs a hierarchical structure diagram by using the target execution trajectory of the target task and the corresponding task information. This hierarchical structure diagram transforms the lengthy and complex execution trajectory into a structure diagram with hierarchical relationships. By inputting the hierarchical structure diagram, the execution trajectory, and the detection prompt text corresponding to each fault detection unit into the corresponding fault detection unit, multi-dimensional fault detection of each execution step is achieved. This method can directly replace the original process of engineers manually reasoning step by step. By using a dependency graph to determine the target root cause step in the set of fault steps, it can distinguish between surface anomalies and root causes based on the dependency relationships between execution steps, avoiding the situation where derivative errors are misjudged as root causes, and improving the accuracy and interpretability of locating the target root cause step. Attached Figure Description

[0011] Figure 1 This is a schematic diagram illustrating a data processing method provided in one embodiment of this specification; Figure 2 This is a flowchart illustrating a data processing method provided in one embodiment of this specification; Figure 3 This is a flowchart illustrating the processing procedure of a data processing method provided in one embodiment of this specification. Figure 4 This is a schematic diagram of the structure of a data processing device provided in one embodiment of this specification; Figure 5 This is a structural block diagram of a computing device provided in one embodiment of this specification. Detailed Implementation

[0012] Many specific details are set forth in the following description to provide a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this specification. Therefore, this specification is not limited to the specific implementations disclosed below.

[0013] The terminology used in one or more embodiments of this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of this specification. The singular forms “a,” “described,” and “the” as used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.

[0014] It should be understood that although the terms first, second, etc., may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second without departing from the scope of one or more embodiments of this specification, and similarly, second may also be referred to as first. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."

[0015] Furthermore, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties. Moreover, the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.

[0016] First, the terms and concepts used in one or more embodiments of this specification will be explained.

[0017] MAS: Multi-Agent System.

[0018] Execution trajectory: The trajectory generated during the execution of a multi-agent system, including the output of each agent at each step.

[0019] HCG: Hierarchical Cognitive Graph.

[0020] As multi-agent systems are increasingly used for complex tasks such as R&D assistance, operational diagnostics, data analysis, and information retrieval, the scale of system calls and user coverage are constantly expanding. Once an error is output, users directly perceive the task failure, but the backend R&D and operations teams struggle to quickly determine which agent, which execution step, whether the problem stems from a prompt word issue, a tool call problem, or a contextual error. This contradiction of "projects are online, but faults are difficult to locate" has become a core pain point hindering the continued large-scale use of multi-agent systems.

[0021] Existing technologies have significant shortcomings in fault attribution for multi-agent systems, specifically in the following aspects: First, manual troubleshooting is extremely inefficient and cannot support production-scale operations. Current fault diagnosis in multi-agent systems heavily relies on operations engineers manually reading the complete execution path and analyzing role behavior, tool calls, and contextual logic step by step. Attributing the cause of a single failure takes approximately 30 minutes. As the workload and number of failures surge, this approach not only becomes slow but also severely strains expert manpower, becoming a clear cost bottleneck and an obstacle to large-scale operations.

[0022] Second, traditional cloud-native observability tools cannot adapt to the semantic-level fault characteristics of multi-agent systems. Errors in multi-agent systems often do not manifest as structured indicators such as processor issues, latency, or call failures, but rather as semantic misunderstandings, logical inconsistencies, and contextual forgetting hidden within the natural language interaction trajectory. Subtle deviations in upstream steps may be continuously propagated as correct premises by subsequent steps, eventually erupting into obvious errors downstream. Due to the lack of a fixed topology and standardized fault signatures similar to a distributed call chain, existing operation and maintenance tools struggle to identify such implicit cascading errors that propagate across semantic boundaries.

[0023] Third, the integrated evaluation method is unreliable in real-world scenarios. If the entire trajectory is input into a large model for end-to-end evaluation, it is easy to attribute the responsibility to the step closest to the final error while ignoring the real upstream root cause. When faced with various heterogeneous faults such as constraint violation, illusion, infinite loop, and context forgetting, type confusion often occurs. More seriously, when structural constraints are lacking, the large model may generate explanations that "sound reasonable but do not exist in the trajectory," which not only fails to support online decision-making but may also mislead the repair direction and increase the cost of secondary troubleshooting.

[0024] Fourth, there is a lack of reusable capabilities for fault analysis in multi-agent systems. As multi-agent applications gradually enter production, the issue is no longer just "whether results can be produced," but "whether correct results can be consistently and reliably provided." Especially with the continuous evolution of system architecture and the constant integration of new roles and tools, fault analysis methods relying on human experience are difficult to distill into general capabilities and cannot be quickly replicated to more project scenarios. Therefore, it is necessary to build a standardized, automated, and scalable fault attribution capability to distill expert experience into system capabilities and reduce operational costs.

[0025] Therefore, this embodiment provides a data processing method that can automatically reconstruct the execution trajectory, identify the error propagation chain, and accurately locate the root cause, thereby achieving efficient and reliable fault attribution capabilities.

[0026] This specification provides a data processing method, and also relates to a data processing apparatus, a computing device, a computer-readable storage medium, and a computer program product, which will be described in detail in the following embodiments.

[0027] See Figure 1 , Figure 1 This diagram illustrates a scenario of a data processing method provided in one embodiment of this specification.

[0028] Specifically, this data processing method is implemented through the end-side device 102 and the server 104. The end-side device 102 is used to send a fault analysis request for the failure of the target task to the server 104. In fact, if the user processes the target task through the target platform, the user can trigger a fault analysis request on the target platform if the target task processing fails; or the operation and maintenance end can trigger a fault analysis request based on the collected target tasks that have failed to process, which is not limited here.

[0029] Upon receiving a fault analysis request from the end-side device 102, the server 104 obtains the target execution trajectory of the target task and the corresponding task information. The target execution trajectory is obtained by processing the target task through a multi-agent system, and the task processing result is failure. The target execution trajectory contains multiple execution steps. A hierarchical structure diagram is constructed based on the target execution trajectory and the task information. The hierarchical structure diagram, the target execution trajectory, and the detection prompt text corresponding to each fault detection unit are input into the corresponding fault detection unit. Based on the fault information output by each fault detection unit, a set of fault steps is obtained. Based on the dependency graph constructed from the multiple execution steps, the target root cause step is determined in the set of fault steps, and the target root cause step is returned to the end-side device 102, the target platform, or the maintenance terminal used for fault operation and maintenance, without limitation.

[0030] The edge device 102 may include a browser, an app (application), or a web application such as an H5 (Hypertext Markup Language 5) application, a lightweight application (also known as a mini-program), or a cloud application. The edge device can be developed based on a software development kit (SDK) provided by the server, such as a real-time communication (RTC) SDK. The edge device can be deployed in an electronic device and depends on the device's operation or certain apps within the device to run. The electronic device may have a display screen and support information browsing, such as a personal mobile terminal like a mobile phone, tablet, or personal computer. Various other types of applications can also be configured in the electronic device, such as human-computer interaction applications, model training applications, data processing applications, web browser applications, shopping applications, search applications, instant messaging tools, email clients, and social media platform software.

[0031] Server 104 can be understood as a server providing various services, including physical servers and cloud servers. Examples include servers providing communication services to multiple clients, servers supporting backend training of models used on clients, and servers processing data sent by clients. It's important to note that Server 104 can be implemented as a distributed server cluster composed of multiple servers, or as a single server. Server 104 can also be a server in a distributed system, or a server integrated with blockchain. Server 104 can also be a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology.

[0032] See Figure 2 , Figure 2 A flowchart of a data processing method provided in one embodiment of this specification is shown, which specifically includes the following steps.

[0033] Step 202: Obtain the target execution trajectory of the target task and the task information corresponding to the target task. The target execution trajectory is obtained by processing the target task through a multi-agent system, and the task processing result of the target task is failure. The target execution trajectory contains multiple execution steps.

[0034] The target execution trajectory can be understood as a complete sequence of actions, intermediate outputs, and interaction messages executed by each agent in chronological order during the processing of a target task by a multi-agent system. This sequence consists of multiple sequentially occurring execution steps, each of which includes at least a step index, the corresponding agent, and the execution content (a natural language description or tool call content for the current execution step). In practice, each execution step may also include tool call parameters, tool return values, status codes, the number of terms, and the index of the referenced upstream step.

[0035] Task information can be understood as static information related to the execution of the target task in a multi-agent system. In this embodiment, task information includes task description (a natural language description of the target task objectives, constraints and expected outputs), system prompt text for each agent, and tool registry.

[0036] A multi-agent system can be understood as a system composed of multiple agents with different functions (such as coders, searchers, etc.) collaborating to complete the tasks assigned by the user, based on system prompts (including their own role definitions). A task failure can be understood as the multi-agent system's final output failing user acceptance, failing to meet task hard constraints, generating clearly erroneous conclusions, or abnormally terminating during execution. For target tasks with failed task results, fault attribution analysis can be triggered.

[0037] Specifically, in a real-world production environment, if a multi-agent system processes a target task and the task processing result is a failure, a fault attribution analysis for that target task can be triggered. In this embodiment, in order to perform structured analysis and root cause localization of the failure reasons, the execution trajectory and task-level information corresponding to the target task are extracted and standardized.

[0038] Task information provides static information that can be determined by the multi-agent system before it executes the target task, including task description, system prompt text for each agent, and tool registry; target execution trajectory provides the execution steps of each agent when the multi-agent system processes the target task.

[0039] For example, in one application scenario, a user submits a complex task to a multi-agent system: "Please analyze the JVM state of an application 30 minutes before a specified time and provide a reason for the error." Within the multi-agent system, the understanding agent is responsible for understanding the requirements, the orchestration agent is responsible for task orchestration, the log analysis agent is responsible for retrieving metrics and logs, the coding agent is responsible for generating analysis code, and the checking agent is responsible for verifying the conclusion. After multiple rounds of collaboration, the system finally outputs an incorrect conclusion.

[0040] At this point, the user can click the "Result Error" feedback button on the target platform. The target platform will then automatically retrieve the complete execution trajectory of this execution based on the task identifier, and extract the relevant task description, system prompt text for each agent, and tool registry entries.

[0041] Step 204: Construct a hierarchical structure diagram based on the target execution trajectory and the task information.

[0042] The hierarchical structure graph can be understood as a directed graph data structure containing a static attribute layer and a dynamic execution layer. It is used to explicitly model the target task, the role definitions of each agent, the invocation of tools, and the various semantic relationships between execution steps. The static attribute layer can be understood as the node hierarchy in the hierarchical structure graph that does not change with the processing of the multi-agent system. This static attribute layer contains task nodes, role nodes, and tool nodes. The dynamic execution layer can be understood as the node hierarchy in the hierarchical structure graph that represents the intent and actual actions of each step in the processing of the multi-agent system. It contains intent nodes and action nodes.

[0043] Intent nodes can be understood as semantic nodes used to represent what an execution step "wants to do" or "expected goal," and are used to capture the reasoning intent of the execution step; action nodes can be understood as semantic nodes used to represent what an execution step "actually does," and are used to describe the specific execution behavior of the execution step. Action types include, but are not limited to, tool invocation, code execution, response generation, and planning decisions.

[0044] Specifically, during the execution of a multi-agent system, the execution trajectory exists in the form of a natural language text sequence. Information such as the dependencies between steps, the correspondence with the task objective, and the adherence to role boundaries are all implicit in the natural language text sequence and are not explicitly expressed.

[0045] In this embodiment, the original unstructured natural language text sequence is parsed in a structured manner, transforming it into a hierarchical structure graph suitable for subsequent processing. Specifically, through structured parsing and semantic extraction, the target task is broken down into independently verifiable atomic sub-goals and hard constraints. Role definitions, capability ranges, and behavioral constraints are extracted from the system prompts of each agent. Tool names, affiliated agents, parameter requirements, output descriptions, and error message formats are extracted from the tool registry. Intent and actions are separated from each execution step of the execution trajectory.

[0046] In one or more embodiments of this specification, static attribute nodes are constructed based on the obtained task information, forming a static cognitive layer. Dynamic execution nodes are constructed based on multiple execution steps of the target execution trajectory, forming a dynamic execution layer. Connection edges are generated through the relationships between nodes, ultimately forming a complete graph structure. Specific implementation methods are described below: The step of constructing a hierarchical structure diagram based on the target execution trajectory and the task information includes: Static attribute nodes are constructed based on the task information, and dynamic execution nodes are constructed based on multiple execution steps of the target execution trajectory. The task information includes a task description, system prompt text, and a tool registry. The static attribute nodes include task nodes, role nodes, and tool nodes. The dynamic execution nodes include intent nodes and action nodes. Connecting nodes by establishing relationships between them generates connection edges. The hierarchical structure graph is constructed based on the static attribute nodes, the dynamic execution nodes, and the connecting edges between the nodes.

[0047] The nodes in the hierarchical structure diagram include static attribute nodes and dynamic execution nodes, and the nodes are connected by corresponding edges.

[0048] Static attribute nodes can be understood as a set of nodes in a hierarchical diagram that represent task objectives, role definitions, and tool configurations that do not change during execution. These nodes remain stable throughout the multi-agent system's processing of the target task. Task nodes can be understood as nodes representing the atomic subtasks and hard constraints of the target task, broken down according to the task description. Role nodes can be understood as nodes representing the role definitions, capabilities, and behavioral constraints of each participating agent, defining the role boundaries of each agent. Tool nodes can be understood as nodes representing external tools or interfaces that agents can call, containing information such as the tool's name, the agent it belongs to, parameter requirements, output descriptions, and error message formats.

[0049] Dynamic execution nodes can be understood as a set of nodes in a hierarchical structure diagram that express the intent and actions of each step in the execution trajectory. The nodes in this set correspond one-to-one with the execution steps. Intent nodes can be understood as nodes that carry the reasoning goal or expected intent of a certain execution step. Action nodes can be understood as nodes that represent the actual behavior or operation performed by a certain execution step.

[0050] A connecting edge can be understood as an edge used to connect two nodes to express a specific semantic relationship between them. Different types of edges correspond to different types of semantic relationships.

[0051] Specifically, at the static attribute layer, the task description in the task information is structured and parsed, and the target task is decomposed into multiple independently verifiable atomic subtasks and hard constraints. Each atomic subtask or hard constraint corresponds to a task node. That is, when a task node corresponds to an atomic subtask, the task node contains the task objective corresponding to the atomic subtask. When a task node corresponds to a hard constraint, the task node contains the hard constraints that the target task needs to comply with.

[0052] For example, the objective task of "querying the current price of product A on 2026-05-01 and providing the basis" can be broken down into three atomic subtasks: "querying the price on the target date", "verifying the source of the result", and "outputting the final conclusion", as well as task nodes with hard constraints such as "the date is correct" and "providing evidence".

[0053] Based on the system prompt text for each agent, the role definition, allowed capabilities, and behavioral constraints of each agent are determined. Each agent corresponds to a role node. For example, the semantic information of the role node corresponding to a verification agent is "responsible for evidence verification and should not confirm the result on its own when there is no new evidence".

[0054] Based on the tool registry, the tool name, associated agent, parameter requirements, output description, and error message format of each tool are parsed out. The corresponding tool node is constructed based on the parsed content, with one tool node for each tool. It should be noted that if a specific tool call occurs in the target execution trajectory, the parameters of the most recent call and the tool return result can be added to the corresponding tool node.

[0055] In the dynamic execution layer, the structured results are generated for each execution step in the target execution trajectory. The "goal to be achieved" (i.e., intent information) and "operation actually performed" (i.e. execution action) of the execution step are extracted respectively. An intent node is generated based on the intent information of the execution step, and an action node is generated based on the execution action of the execution step.

[0056] After constructing all nodes, connection edges need to be established based on the semantic relationships between nodes. In this embodiment, execution order edges are added between action nodes of adjacent execution steps to express the time sequence; local dependency edges are added between intent nodes and action nodes of the same execution step; task alignment edges are added between dynamic execution nodes and the task nodes they serve or support; role compliance edges are added between dynamic execution nodes and the role nodes they should follow; tool call edges are added between action nodes that actually have tool calls and their corresponding tool nodes; for execution steps in the execution trajectory where no tool call occurs, no tool call edges are established. All static attribute nodes, dynamic execution nodes, and various connection edges between nodes together constitute a hierarchical structure graph.

[0057] In the embodiments of this specification, the target execution trajectory and task information related to the target task are mapped to nodes of the corresponding type in the hierarchical structure graph, and these nodes are organized into a graph structure with rich semantic associations through connecting edges.

[0058] For example, continuing with the previous example, if the objective task is "to query the current price of product A on 2026-05-01 and provide the basis", we obtain task nodes for three atomic subtasks: "query the price on the target date", "verify the source of the result", and "output the final conclusion", as well as task nodes for hard constraints such as "the date is correct" and "provide evidence".

[0059] The role parser extracts the role constraint "responsible for evidence verification, and should not confirm the result without new evidence" from the system prompt text of the verification agent, and generates the corresponding role node; the tool parser parses the name, agent, parameter requirements and output description of the price query tool from the tool registry, and generates the tool node; the execution step parser performs structured parsing on each execution step in the execution trajectory, and generates the corresponding intent node and action node. For example, if an execution step outputs "confirm price is 100 yuan" to the verification agent, the intent node "verify price accuracy" and the action node "output verification conclusion" are extracted based on this execution step.

[0060] Establish connection edges according to the relationships between nodes. For example, add an execution order edge between two action nodes with adjacent execution order, connect the intent node of the verification agent corresponding to the execution step to its corresponding role node to establish a role compliance edge, and connect the action node to the tool node to establish a tool call edge.

[0061] In fact, constructing a hierarchical structure graph by using static attribute nodes, dynamic execution nodes, and corresponding connecting edges enables factual analysis during subsequent fault analysis, reducing the illusion phenomenon. For example, if a certain execution step in the execution trajectory actually performs a code generation operation, but the intent information corresponding to the intent node of that execution step is "analyze existing code logic," then although there is a connecting edge between the intent node and the action node, the semantic difference between the two will be detected by the subsequent fault analysis process, achieving the detection and judgment of "intent-action inconsistency."

[0062] The data processing method provided in the embodiments of this specification maps static configuration information from task descriptions, system prompt texts, and tool registry into task nodes, role nodes, and tool nodes, respectively. It also maps each execution step of the execution trajectory into intent nodes and action nodes. Furthermore, it establishes semantic relationships between nodes through multiple types of connection edges. This unifies and integrates information that was originally scattered and implicit in different sources into a hierarchical structure graph with a clear structure and explicit relationships. This provides a structured semantic foundation for subsequent fault analysis and can effectively reduce the risk of illusion caused by directly performing fault analysis on long execution trajectories.

[0063] In the embodiments of this specification, the connection edges between different nodes include execution order edges, local dependency edges, task alignment edges, role compliance edges, and tool invocation edges. The specific implementation method is as follows: The step of connecting corresponding nodes through the association relationship between nodes to generate connection edges includes: Based on the sequential connection relationship between action nodes, connect adjacent action nodes that are executed sequentially to generate execution order edges; Based on the dependency relationship between the current action node and the corresponding intention node, or between the current intention node and the previous action node, connect the current action node and the corresponding intention node, or between the current intention node and the previous action node, to generate local dependency edges; Based on the alignment relationship between the dynamic execution node and the corresponding task node, connect the aligned dynamic execution node and task node to generate a task alignment edge; Based on the conformity relationship between the intent node and the corresponding role node, connect the intent node and the corresponding role node to generate a role conformity edge; Based on the calling relationship between action nodes and their corresponding tool nodes, connect the action nodes and their corresponding tool nodes to generate tool call edges.

[0064] Among them, execution order edges are used to connect adjacent action nodes to express the temporal sequence relationship; local dependency edges are used to connect intent nodes and action nodes to express the correspondence of "intent-driven action"; task alignment edges are used to connect dynamic execution nodes and task nodes to express the alignment relationship between execution steps and atomic subtasks; role follow edges are used to connect dynamic execution nodes and role nodes to express the matching or deviation relationship between behavior and role boundaries; and tool invocation edges are used to connect action nodes and tool nodes to express that the action invokes the corresponding tool.

[0065] In the process of constructing the structure graph, given the nodes, the corresponding nodes are connected according to the semantic relationships between them. Different types of connection edges correspond to different semantic relationships between nodes.

[0066] For example, a multi-agent system processes a data analysis task, and the target execution trajectory corresponding to this data analysis task has a total of 5 execution steps. Execution sequence edges are generated according to the execution order between the action nodes of step 1 and step 2, step 2 and step 3, step 3 and step 4, and step 4 and step 5, forming a complete temporal chain that clearly records the order in which each execution step occurs.

[0067] Regarding local dependencies, if the intent node in step 3 is "verify price accuracy" and the action node is "call verification tool to output verification report", there is an "intent-driven action" correspondence between the two. Therefore, a local dependency edge is established between the intent node and the action node. Furthermore, if the intent node in step 4 is "write final conclusion based on verification results", this intent depends on the verification report output by the action node in step 3. Therefore, a step-crossing local dependency edge is established between the action node in step 3 and the intent node in step 4.

[0068] Regarding task alignment, the first step action node "call the query tool to get the current price of product A on 2026-05-01" is aligned with the task node "query the price on the target date", so task alignment edges can be established. Furthermore, the fifth step action node "output the final answer including price and source" is aligned with the task node "output the final conclusion" and the constraint node "provide evidence" to express that the execution step simultaneously serves the task objective and satisfies the hard constraint conditions.

[0069] Regarding role compliance, a role compliance edge is established between the agent's intent node "verify whether the analysis conclusion is based on evidence" in step 4 and the agent's role node "responsible for evidence verification, and should not confirm the result on its own when there is no new evidence". This indicates that the intent should be checked within the role boundary.

[0070] Regarding tool invocation, establish a tool invocation edge between the first step action node "Invoke Price Inquiry Tool" and the corresponding tool node, and establish a tool invocation edge between the third step action node "Invoke Verification Tool" and the corresponding tool node.

[0071] The data processing method provided in this specification constructs corresponding connection edges based on the semantic relationships between nodes, organizing the originally isolated static attribute nodes and dynamic execution nodes in the hierarchical structure graph into a directed graph structure with rich semantic relationships. Through various types of connection edges, information such as temporal relationships, dependencies, task affiliation, role constraints, and tool associations that were originally implicit in natural language text are transformed into an explicit graph structure, providing structured data support for the subsequent fault detection unit.

[0072] Step 206: Input the hierarchical structure diagram, the target execution trajectory, and the detection prompt text corresponding to each fault detection unit into the corresponding fault detection unit, and obtain the fault step set based on the fault information output by each fault detection unit.

[0073] The fault detection unit can be understood as an independent judgment module designed for a specific fault type. Each fault detection unit has its own detection target and judgment logic. In this embodiment, the fault detection unit can be implemented by an intelligent agent. Different fault detection units are independent of each other and can be executed in parallel.

[0074] The detection prompt text can be understood as the prompt text designed for the detection targets and judgment logic of each fault detection unit, used to guide the fault detection unit to detect abnormal situations of specific fault types; the fault information can be understood as the judgment result output by the fault detection unit, which includes, but is not limited to, the step index of the fault step, the fault type, the fault description, the source of evidence, and the confidence level. The fault step set can be understood as the set of execution steps that may have faults in the target execution trajectory corresponding to the target task, obtained by integrating the fault steps output by each fault detection unit. The fault steps are the execution steps marked as faulty, used to indicate that there are unexpected abnormal situations in the execution steps.

[0075] Specifically, the execution process of a multi-agent system may encounter different types of anomalies at different execution steps. Therefore, in this embodiment, multiple fault detection units are used to detect faults in the target execution trajectory from different dimensions. Each fault detection unit executes independent evaluation logic and focuses on the fault type it is responsible for. This avoids the problems of type confusion, illusion and low computational efficiency caused by using a single fault detection unit to detect faults in a long execution trajectory.

[0076] In practice, a corresponding detection prompt text is configured for each fault detection unit. This prompt text clearly indicates the node types, edge types, and judgment rules that the fault detection unit needs to focus on. Each fault detection unit receives the same hierarchical structure diagram and target execution trajectory, and receives its own corresponding detection prompt text as guidance text. It then independently performs fault detection and outputs structured fault information.

[0077] The fault information output by each fault detection unit is summarized to obtain the final fault step set. Each fault step in the fault step set carries information such as the corresponding step index, fault type, and fault description, providing candidates for subsequent root cause tracing.

[0078] It should be noted that multiple independent fault detection units can perform parallel detection, enabling various types of faults to be identified in their corresponding dimensions.

[0079] In one or more embodiments of this specification, before inputting the hierarchical structure diagram, target execution trajectory, and detection prompt text into the fault detection unit, it is necessary to pre-determine the corresponding detection prompt text for each fault detection unit. After each fault detection unit independently outputs fault information, multiple fault information entries are merged and deduplicated to form a unified set of fault steps. Specific implementation methods are as follows: The process involves inputting the hierarchical structure diagram, the target execution trajectory, and the detection prompt text corresponding to each fault detection unit into the corresponding fault detection unit. Based on the fault information output by each fault detection unit, a set of fault steps is obtained, including: Determine the detection prompt text corresponding to each fault detection unit. Different fault detection units are used to detect fault steps of different fault types, and the detection prompt text is a prompt text related to the corresponding fault type. The hierarchical structure diagram, the target execution trajectory, and the detection prompt text corresponding to each fault detection unit are input into the corresponding fault detection unit to obtain the fault information output by each fault detection unit. The fault information includes a set of candidate steps, the fault type of each candidate step, and the fault description of each candidate step. The candidate step sets output by each fault detection unit are merged and deduplicated to obtain the fault step set. The fault type of each fault step in the fault step set is determined according to the fault type of the corresponding candidate step, and the fault description of each fault step is determined according to the fault description of the corresponding candidate step.

[0080] The candidate step set can be understood as the set of execution steps that may have faults, output by a single fault detection unit after performing fault analysis based on the hierarchical structure diagram and the target execution trajectory. The fault type can be understood as the classification label obtained by classifying the abnormal situations that occur in the execution step. Different types of faults reflect different dimensions of abnormality. For example, fault types include, but are not limited to, violation of task constraints, violation of role boundaries, hallucination, logical conflict, overconfidence, step loop execution, premature termination, tool error, unclear communication, and context ignoring. The fault description can be understood as a natural language description of the specific abnormal phenomena in the execution step, used to explain in detail why the execution step was judged as a faulty step and the specific abnormal manifestations.

[0081] Specifically, since different fault detection units focus on different dimensions of fault types, each fault detection unit needs to receive judgment rules that match its detection target to ensure that each fault detection unit can make accurate judgments on its corresponding detection dimension. In practice, corresponding detection prompt text is pre-configured according to the detection target of each fault detection unit. This detection prompt text can specify information such as the node type, edge type, judgment criteria, and output format that the unit needs to check for fault detection.

[0082] Because different fault detection units may detect the same type of fault for the same execution step, or they may detect different types of faults for the same execution step, the fault information output by each fault detection unit is summarized. Specifically, the candidate step sets from different fault detection units are merged and summarized, and the summarized candidate steps are deduplicated and supplemented. That is, for multiple fault records of the same execution step, they are merged into one fault record, and this candidate step is added as a fault step to the fault step set. The fault type corresponding to this fault step is determined by the fault types of one or more corresponding candidate steps, so the fault type can be one or more types; similarly, the fault description of the fault step is determined by the fault descriptions of one or more corresponding candidate steps.

[0083] For example, in this embodiment, four fault detection units and their corresponding detection prompt texts are configured. If, during the diagnosis of a JVM (Java Virtual Machine) state analysis task, the compliance detection unit used for compliance fault detection determines that the verification agent outputs a definitive conclusion in step 8 without any new evidence, it is considered a role deviation. The output is candidate step 8, fault type "role deviation", fault description "verification agent confirms result without new evidence", and confidence level 0.92.

[0084] The logic detection unit for logic fault detection determines that step 6 references non-existent evidence, which is considered an illusion. The output is candidate step 6, fault type "illusion", fault description "references non-existent memory leak evidence", and confidence level 0.95. The process detection unit for process fault detection determines that step 3 is a tool error because the tool returns an error code but it is not processed. The output is candidate step 3, fault type "tool error", and confidence level 0.88. The context detection unit for context fault detection determines that step 5 ignores the user-specified time window, which is considered context neglect. The output is candidate step 5, fault type "context neglect", and confidence level 0.85.

[0085] The fault information from the four fault detection units is summarized and deduplicated to obtain a fault step set containing four fault steps. In another application scenario, if both the compliance detection unit and the logic detection unit determine step 7 as a "logic conflict," the system identifies duplicate records of the same step and fault type, merging them into a single fault record. Therefore, for step 7, the fault description is integrated as "Both the compliance and logic fault detection units determine it as a logical conflict." The confidence level corresponding to this fault step is the higher of the two values ​​according to preset rules, or a weighted fusion is used for output.

[0086] The data processing method provided in the embodiments of this specification enables each fault detection unit to perform fault detection in the corresponding fault analysis dimension by configuring corresponding detection prompt text for each fault detection unit. By merging and deduplicating multiple fault information, the duplicate recording of the same fault step by different fault detection units is eliminated, and multiple fault types that may exist in the same execution step are retained. Based on the fault step set formed after merging, the redundancy interference in the subsequent root cause tracing process is effectively reduced.

[0087] In one or more embodiments of this specification, the fault detection unit includes a compliance detection unit, a logic detection unit, a process detection unit, and a context detection unit. Specifically, the compliance detection unit receives detection prompts that explicitly require it to check whether dynamic execution nodes violate task constraints or role boundaries. The key node types to focus on are task nodes, role nodes, intent nodes, and action nodes, and the key edge types are task alignment edges and role compliance edges. The logic detection unit receives detection prompts that require it to check for illusions, logical conflicts, and overconfidence. The key node types to focus on are intent nodes and action nodes, and the key edge types are local dependency edges. The process detection unit receives detection prompts that require it to check for step loops, premature termination, and tool errors. The key node types to focus on are action nodes and tool nodes, and the key edge types are execution order edges and tool call edges. The context detection unit receives detection prompts that require it to check for unclear propagation and context ignoring. The key node types to focus on are intent nodes and action nodes, and the key focus is on cross-step dependencies. The specific implementation methods for each fault detection unit are described in detail below: The implementation method of the fault detection corresponding to the compliance detection unit is as follows: The step of inputting the hierarchical structure diagram, the target execution trajectory, and the detection prompt text corresponding to each fault detection unit into the corresponding fault detection unit to obtain the fault information output by each fault detection unit includes: Input the hierarchical structure diagram, the target execution trajectory, and the compliance prompt text corresponding to the compliance detection unit into the compliance detection unit; The compliance detection unit performs compliance checks on the task nodes, role nodes, dynamic execution nodes, and the connection edges between corresponding nodes in the hierarchical structure diagram to obtain fault information output by the compliance detection unit. The compliance detection unit is used to detect whether the dynamic execution node violates task constraints and / or role boundaries.

[0088] The compliance detection unit can be understood as a fault detection unit responsible for checking whether the execution steps violate task constraints or role boundaries. Its input includes a hierarchical structure diagram, the target execution trajectory, and specially configured compliance prompt text. Its detection scope covers task nodes, role nodes, dynamic execution nodes, and connecting edges such as task alignment edges and role compliance edges. Task constraints can be understood as the task objectives corresponding to the target task and the hard restrictions that must be followed. It is the main basis for judging whether the execution steps deviate from the target task. Role boundaries can be understood as the scope of responsibilities, allowed capabilities, and behavioral constraints defined in the system prompt text of the intelligent agent. It is the main basis for judging whether the intelligent agent's behavior exceeds its authority.

[0089] Specifically, based on the guidance of the compliance prompt text, the compliance detection unit focuses on traversing the task nodes, role nodes, intent nodes, and action nodes in the hierarchical structure diagram, as well as the task alignment edges and role compliance edges. It checks whether each dynamic execution node matches the associated task objectives, constraints, and role responsibilities. If an action node deviates from the task objective or violates hard constraints, it is marked as violating task constraints. If an action node performs an action outside the definition of the corresponding agent role or ignores role restrictions, it is marked as violating role boundaries.

[0090] The implementation method of the fault detection corresponding to the logic detection unit is as follows: The step of inputting the hierarchical structure diagram, the target execution trajectory, and the detection prompt text corresponding to each fault detection unit into the corresponding fault detection unit to obtain the fault information output by each fault detection unit includes: Input the hierarchical structure diagram, the target execution trajectory, and the logical prompt text corresponding to the logical detection unit into the logical detection unit; Based on the logic detection unit, the dynamic execution node and the connection edges between the corresponding nodes in the hierarchical structure diagram are logically checked to obtain the fault information output by the logic detection unit. The logic detection unit is used to detect whether the dynamic execution node has illusions and / or logical conflicts.

[0091] The logic detection unit can be understood as a fault detection unit responsible for checking whether there are fault types such as illusion, logical conflict, and overconfidence in the execution steps. Its detection scope covers dynamic execution nodes and their corresponding local dependency edges. Illusion can be understood as the phenomenon that the execution step references facts, data, or tool return results that do not exist in the execution trajectory. Logical conflict can be understood as the phenomenon that there is a contradiction between the output or reasoning of the current execution step and the previously confirmed facts, conclusions, or reasoning results. Overconfidence can be understood as the phenomenon that the current execution step outputs a definitive conclusion based on insufficiently certain evidence.

[0092] Specifically, based on the guidance of the logical prompt text, the logic detection unit focuses on traversing the dynamic execution nodes and the nodes connected by local dependency edges, checking whether the current execution step references facts or tool results that do not exist in the execution trajectory, whether the current action node contradicts previously determined facts, and whether it gives a definitive conclusion when the evidence is insufficient, thereby realizing the determination of three types of faults: illusion, logical conflict, and overconfidence.

[0093] The implementation method of fault detection corresponding to the process detection unit is as follows: The step of inputting the hierarchical structure diagram, the target execution trajectory, and the detection prompt text corresponding to each fault detection unit into the corresponding fault detection unit to obtain the fault information output by each fault detection unit includes: Input the hierarchical structure diagram, the target execution trajectory, and the process prompt text corresponding to the process detection unit into the process detection unit; Based on the process detection unit, the dynamic execution node, the tool node, and the connection edges between the corresponding nodes in the hierarchical structure diagram are checked to obtain the fault information output by the process detection unit. The process detection unit is used to detect whether the dynamic execution node has step loops, premature termination, and / or tool errors.

[0094] The process detection unit can be understood as a fault detection unit responsible for checking whether there are fault types such as step loop execution, premature termination, and tool errors in the execution steps. Its detection scope covers dynamic execution nodes, tool nodes, and connection edges such as execution sequence edges and tool call edges. Step loop execution can be understood as the phenomenon that multiple consecutive execution steps exhibit repetitive actions or invalid iterations. Premature termination can be understood as the phenomenon that the execution process is declared to end before the task objective is achieved. Tool errors can be understood as the phenomenon that the tool call parameters are incorrect, the return value is handled incorrectly, or the tool failure status is ignored.

[0095] Specifically, based on the guidance of the process prompt text, the process detection unit focuses on traversing dynamic execution nodes, tool nodes, execution sequence edges, and tool call edges to check whether there are multiple consecutive steps that are repetitive actions or invalid iterations, whether the task is declared over before the goal is achieved, whether the tool call parameters are correct, and whether the return value is correctly processed or whether the tool failure status is ignored. This enables the determination of three types of faults: step loop execution, premature termination, and tool error.

[0096] The implementation method of the fault detection corresponding to the context detection unit is as follows: The step of inputting the hierarchical structure diagram, the target execution trajectory, and the detection prompt text corresponding to each fault detection unit into the corresponding fault detection unit to obtain the fault information output by each fault detection unit includes: Input the hierarchical structure diagram, the target execution trajectory, and the context prompt text corresponding to the context detection unit into the context detection unit; The context detection unit and the hierarchical structure diagram are used to perform context checks on the target execution trajectory to obtain fault information output by the context detection unit. The context detection unit is used to detect whether there is unclear transmission and / or context ignoring in the target execution trajectory.

[0097] The context detection unit can be understood as a fault detection unit responsible for checking whether there are fault types related to step collaboration, such as ambiguity in information transmission or context ignoring, in the target execution trajectory. Its detection scope covers the step dependencies and context history of the entire execution trajectory. Unclear transmission can be understood as the phenomenon that key upstream information is blurred, omitted, or mistransmitted in the process of being transmitted to downstream steps. Context ignoring can be understood as the phenomenon that downstream steps ignore confirmed important historical information or user correction instructions.

[0098] Specifically, the context detection unit, guided by contextual prompts, uses the nodes recorded in the hierarchical structure diagram and the connecting edges between them to perform a global contextual consistency check on the target execution trajectory. It determines whether upstream key information has been obscured or mistransmitted during transmission, and whether downstream steps have ignored important historical context information or user correction instructions, thus enabling the determination of two types of faults: unclear transmission and context ignoring.

[0099] It should be noted that after each fault detection unit completes its independent judgment, the output fault information adopts a unified format, including candidate step index, fault type, fault description, evidence source and confidence level, so as to facilitate subsequent merging and deduplication processing.

[0100] In this embodiment, after obtaining the fault information output by each fault detection unit, the (step index, fault type) double key is used to remove duplicates. That is, if multiple fault detection units find the same fault type in the same execution step, they are merged into one fault record, and finally a unified set of fault steps is obtained.

[0101] For specific examples, please refer to the above embodiments, which will not be repeated here.

[0102] The data processing method provided in the embodiments of this specification performs parallel checks on the execution trajectory of the same target from four dimensions: constraint compliance, reasoning logic, process execution, and context collaboration, through a compliance detection unit, a logic detection unit, a process detection unit, and a context detection unit. Each fault detection unit performs reasoning based on explicit nodes and connecting edges in the hierarchical structure graph, so that the output fault information contains clear evidence sources. Moreover, the four fault detection units are independent of each other and can be executed in complete parallel, effectively controlling the overall detection latency.

[0103] Step 208: Based on the dependency graph constructed from the multiple execution steps, determine the target root cause step in the set of failure steps.

[0104] In this context, a dependency graph can be understood as a directed graph data structure with action nodes of each execution step as nodes and dependency relationships between execution steps as connecting edges, used to explicitly express the dependency relationships between execution steps; a dependency relationship can be understood as a causal relationship in which the execution or output of a subsequent step depends on the execution result, conclusion, or state of the previous step, including sequential dependencies between adjacent steps and long-range dependencies between steps; a root cause step can be understood as a fault step that is upstream in the fault propagation chain and whose own fault is not caused by other fault steps, i.e., the initial source of the fault.

[0105] Specifically, after obtaining the set of faulty steps, it is necessary to identify the true root cause step from the multiple execution steps marked as faulty, and perform anomaly repair processing on the root cause step. In this way, when the anomaly corresponding to the root cause step is resolved, the fault caused by the root cause step can be automatically repaired without having to handle them one by one, thus achieving efficient operation and maintenance.

[0106] In specific implementation, determining the target root cause step from the set of failure steps based on the dependency graph constructed from the multiple execution steps includes: Action nodes are generated based on multiple execution steps, and connection edges between action nodes are generated based on the dependencies between multiple action nodes. The dependency graph is constructed based on the action nodes and the connection edges between action nodes. The connection edges include step dependency edges, which are used to connect non-adjacent action nodes. In the two action nodes connected by the step dependency edge, the latter action node uses the output result of the former action node. Based on the target fault step in the set of fault steps, the dependency graph is traced back to determine the target root cause step corresponding to the target fault step.

[0107] Among them, the step-dependent edge can be understood as a directed edge used to connect non-adjacent action nodes. The condition for establishing this edge is that the subsequent action node explicitly uses the output result of the previous action node during the execution process, and there is at least one execution step between the two action nodes. The output result can be understood as the data, conclusion or state produced by the action node after the execution is completed, which can be identified and referenced by subsequent steps.

[0108] Reverse tracing can be understood as starting from the action node corresponding to the target failure step and traversing all directly or indirectly dependent upstream action nodes in the opposite direction of the connecting edges; the target failure step can be understood as the execution step that ultimately appears as a failure in the execution trajectory, which is the final external manifestation of the failure of the multi-agent system. This execution step is usually the step in the final output that is visible to the user, the failure endpoint step marked by the platform, or the step in the execution process that explicitly declares the completion of the task.

[0109] Specifically, an action-level dependency graph is constructed based on the execution steps of the target execution trajectory. The nodes of this dependency graph are the action nodes corresponding to each execution step, and the connecting edges of the dependency graph represent the dependency relationship of the subsequent step on the result of the previous step. After the dependency graph is constructed, the dependency relationship corresponding to each fault step in the fault step set can be determined based on the dependency relationship corresponding to each fault step. Thus, based on the dependency relationship corresponding to each fault step, the target root cause step in the upstream of the fault propagation chain can be traced back from multiple fault steps.

[0110] In fact, during multi-agent collaboration, the next execution step may directly reference the output of a previous execution step. Therefore, for any two execution steps, we need to check whether there is an explicit reference to the output of the previous action node in the content of the next action node. Only when there is clear evidence of reference in the execution trajectory, indicating that the next action node references the specific result of the previous node, can a connection edge be established.

[0111] In this embodiment, the sources of the connection edges include two types: the first type is execution order edges, which are sequential connections between adjacent execution steps, expressing the temporal order; the second type is step dependency edges, which are dependency edges established by identifying whether the subsequent step explicitly uses the specific output result of the previous step for any two non-adjacent execution steps. The establishment of this type requires clear trajectory evidence to support it, and speculative connections without basis are prohibited.

[0112] That is, for any step pair where t'<t, check whether the execution of step t explicitly uses the output result of execution step t'. For example, when t is 3, the step pairs include (s1, s3) and (s2, s3). If the execution of step s3 references the output result of execution step s1, a cross-step dependency edge can be generated between the action node 3 corresponding to execution step s3 and the action node 1 corresponding to execution step s1. If the execution of step s3 references the output result of execution step s2, a direct dependency edge (i.e., execution order edge) can be generated between the action node 3 corresponding to execution step s3 and the action node 2 corresponding to execution step s2.

[0113] After the dependency graph is constructed, starting from the target fault step in the fault step set, traverse in the reverse direction of the connecting edges in the dependency graph. During the reverse traversal, trace the target root cause step corresponding to the target fault step based on the direct dependency edges and cross-step dependency edges.

[0114] For example, the execution trajectory of a target task includes 12 steps, and the fault step set includes step 6, step 8, and step 12. When the system constructs the dependency graph, it determines that the conclusion of step 12 explicitly references the output of step 8, and the conclusion of step 8 references the retrieval result of step 6. Therefore, cross-step dependency edges are established from step 6 to step 8, and from step 8 to step 12, respectively.

[0115] Taking step 12 as the target fault step and performing reverse tracing on the dependency graph, the upstream fault steps traced to step 12 include step 6 and step 8. If it is found that there are no other fault steps upstream of step 6, while there is a fault step (step 6) upstream of step 8, step 6 is determined as the target root cause step.

[0116] In practical applications, the construction of the dependency graph can reuse the existing action nodes and execution order edges in the hierarchical structure graph, and only needs to supplement the cross-step dependency edges.

[0117] The data processing method provided by the embodiments of this specification constructs a complete dependency graph including cross-step dependency edges, so that cross-step causal dependency relationships can be explicitly displayed. The establishment of cross-step dependency edges requires clear trajectory evidence support, which reduces attribution bias. Moreover, by performing reverse tracing on the dependency graph based on explicit connecting edges and determined graph algorithms, the probability of root cause misjudgment is reduced, and the certainty of root cause localization is improved.

[0118] In one or more embodiments of this specification, after the dependency graph is constructed and the fault step set is obtained, the pre-dependency step set corresponding to the target fault step can be obtained through reverse tracing on the dependency graph, and then the candidate root cause set is screened. Finally, one or more target root cause steps are determined from the candidate root cause set through priority sorting. The specific implementation manner is as follows: The step of tracing back the dependency graph based on the target fault step in the set of fault steps to determine the target root cause step corresponding to the target fault step includes: Determine the target fault step from the set of fault steps; Based on the dependency graph, determine the set of preceding dependent steps corresponding to the target failure step, and based on the failure step set and the set of preceding dependent steps, determine the set of candidate root causes corresponding to the target failure step. The candidate root cause steps in the candidate root cause set are prioritized and sorted to obtain a sorting result. The target root cause step is determined based on the sorting result, wherein the target root cause step is one or more.

[0119] In fact, since the failure of a complex task may be caused by a combination of multiple failure types, the target failure step can be a final failure step that includes different failure types. Correspondingly, the target root cause step can be the root cause of each failure type.

[0120] The set of preceding dependent steps can be understood as the set of execution steps corresponding to all upstream action nodes in the dependency graph that can reach the target fault step through directed edges, that is, all steps that are directly or indirectly dependent on by the target fault step; the set of candidate root causes can be understood as the set of fault steps that do not have upstream steps in the intersection of the set of preceding dependent steps and the set of fault steps, that is, all possible candidate sources of fault.

[0121] Priority ranking can be understood as the process of quantifying and ranking each execution step in the candidate root cause set according to a preset scoring rule, which is used to determine the root cause priority of each root cause when multiple root causes coexist; target root cause step can be understood as one or more root cause steps determined after priority ranking.

[0122] Specifically, in complex multi-agent collaborative tasks, a single task failure is often not caused by a single type of fault, but rather by the combined effect of multiple heterogeneous faults. For example, one source of failure might be a logical illusion leading to upstream analysis errors, while another might be a tool call error resulting in missing data. These two sources may propagate along different dependency paths, ultimately converging at the same output step and jointly causing task failure. Therefore, for final-state failure steps containing different fault types, their respective root causes can be traced to identify one or more target root cause steps.

[0123] In the specific implementation, the target fault step is determined from the set of fault steps. The target fault step is usually the fault step in the execution trajectory that ultimately outputs an incorrect result. The fault step may correspond to one or more fault types. After determining the target fault step, the dependency graph is traversed in reverse from the target fault step as the starting point, and the set of preceding dependent steps is obtained based on the direct dependency edges and the step dependency edges.

[0124] The intersection of the set of dependent steps and the set of faulty steps is defined as the fault ancestor set. This fault ancestor set can be understood as faulty steps in the set of dependent steps that also exist in the set of faulty steps. Faulty steps without upstream steps of the same fault type are further selected from the fault ancestor set to form a candidate root cause set. If the candidate root cause set contains multiple candidate root cause steps, it means that there are multiple independent fault sources. The candidate root cause steps are prioritized according to a preset scoring rule. In this embodiment, the scoring rule comprehensively considers factors such as the fault severity and confidence level of the candidate root cause step itself, as well as the propagation chain distance to the target faulty step. Finally, one or more target root cause steps are determined based on the ranking result.

[0125] In practical applications, we cannot simply consider all faulty steps in the fault ancestor set as root cause candidates. This is because although a faulty step exists on a dependency path (i.e., belongs to the set of preceding dependent steps), there may be another faulty step upstream that is the cause of the fault. In this case, the faulty step should be considered a secondary fault rather than a root cause step. Therefore, it is necessary to check whether there are other faulty steps upstream of each faulty step in the fault ancestor set. If so, the faulty step is excluded from the candidate root cause set.

[0126] In fact, this filtering logic also implicitly considers the case where upstream faults are corrected. Specifically, if a faulty step has other faulty nodes upstream of its dependency path (determined by the connecting edges in the dependency graph), but these upstream faults are corrected before propagating to the current faulty step, it means that their erroneous effects failed to reach the current faulty node. Therefore, even if there is an upstream fault, the current faulty step may not be its direct consequence. In this case, when the system checks whether there are other faulty nodes among the upstream ancestors of the current faulty node, it needs to further determine whether the upstream fault truly has a substantial impact on the current faulty step. If the correction of the upstream fault occurred before the critical output on which the current faulty node depends was generated, then there is no effective causal propagation between the upstream fault and the current faulty step. The current faulty step should be considered an independent source of fault and retained in the candidate root cause set.

[0127] For example, the execution trajectory contains 12 steps, and the set of faulty steps includes steps 3, 7, 9, 11, and 12. Step 12 is the user-visible final output step, and since the output conclusion is incorrect, the system identifies it as the target faulty step. Starting from step 12, the system traces backward along the dependency graph to obtain the set of preceding dependent steps, which is {5, 6, 9, 11}. Based on this set of preceding dependent steps and the set of faulty steps, the intersection is determined to be steps 9 and 11. Step 9 is a logical illusion leading to incorrect reasoning, and step 11 is an error in data caused by a tool call error. Further examination reveals no other faulty steps of the same fault type in the upstream ancestors of step 9, and no other faulty steps of the same fault type in the upstream ancestors of step 11. Therefore, both steps 9 and 11 are identified as candidate root cause steps.

[0128] The two candidate root cause steps are then ranked according to a preset scoring rule. Step 9 receives higher priority due to its longer propagation chain and wider impact, while step 11 is retained as a secondary root cause. Finally, the system outputs the two target root cause steps and labels their priority order.

[0129] In practical applications, since the failure of a task may be caused by multiple fault types, the system can also determine the corresponding target fault step according to each fault type. For example, the final state of a hallucination fault may be reflected in one fault step, while the final state of a context-ignoring fault may be reflected in another step. The above tracing process is executed for each fault type, thereby outputting the target root cause step corresponding to each fault type to achieve fault analysis of complex tasks. No limitation is made here.

[0130] The data processing method provided in the embodiments of this specification uses dependency graphs to trace back, so that the root cause localization process is determined based on verifiable causal paths. By prioritizing the candidate root cause set, it can effectively distinguish between primary and secondary faults in complex scenarios with multiple root causes, providing clear guidance on repair priorities for maintenance personnel.

[0131] In one or more embodiments of this specification, for a candidate root cause set containing multiple candidate root cause steps, a priority value is obtained by comprehensively calculating the severity of each candidate root cause step's own failure, the scope of its impact on downstream failures, and the propagation depth, and then the steps are sorted based on the priority value. Specific implementation methods are described below: The step of prioritizing each candidate root cause step in the candidate root cause set to obtain a ranking result includes: Based on the failure confidence of each candidate root cause step, the failure weight of the corresponding failure type of each candidate root cause step, and the propagation chain from each candidate root cause step to the target failure step, the priority value corresponding to each candidate root cause step is determined. The candidate root cause steps are prioritized according to their respective priority values ​​to obtain the ranking result.

[0132] Among them, the fault confidence can be understood as a quantitative representation of the degree of certainty of the fault detection unit regarding the determination result of the candidate root cause step. The value range is usually from 0 to 1. The higher the confidence, the higher the credibility that the step does indeed have a fault. The fault weight can be understood as a quantitative coefficient of the severity of different fault types, used to express the difference in the degree of impact of various faults on task failure. Different types of faults have different fault weights. The fault weight can be set according to the actual situation, which will not be elaborated here.

[0133] A propagation chain can be understood as one or more directed paths traversed on a dependency graph from a candidate root cause step to the target failure step. The sequence of nodes on the path fully reflects the entire process of an error propagating from its source to its final failure. The path may contain multiple intermediate steps, some of which are failure steps and some of which are propagation steps. Priority value can be understood as a quantitative score that comprehensively measures the importance of candidate root cause steps, used to compare the priorities among candidate root causes. The ranking result can be understood as the sequence obtained by arranging the steps in the candidate root cause set from high to low priority value. This ranking result can be used as a ranking result for repair priority or as a ranking result for the degree of root cause certainty, without limitation here.

[0134] Specifically, when multiple candidate root cause steps exist in the candidate root cause set, it is necessary to determine which candidate root cause step should be prioritized for repair. In this implementation, a comprehensive scoring formula is used to calculate the priority value of each candidate root cause step: ,in, For candidate root cause steps, The fault type corresponding to this candidate root cause step. The fault weights corresponding to the fault types. The failure confidence level corresponding to the candidate root cause step. Indicates from The path to the target failure step T is the other failure steps that can be reached on the dependent path, and pathlen represents the path distance.

[0135] This item measures the severity of the candidate root cause step itself. It is represented by the product of the failure weight and the failure confidence of the candidate root cause step. The higher the failure weight and the higher the confidence, the greater the certainty of failure of the candidate root cause step itself. This measure is used to assess the scope and depth of the influence of the candidate root cause step on downstream faults. Specifically, it is the weighted contribution of all other reachable fault steps in the propagation chain from the candidate root cause step to the target fault step. The contribution of each downstream fault step is obtained by dividing the product of its fault weight and fault confidence by the propagation distance from the step to the candidate root cause. The closer the distance, the greater the influence.

[0136] After the priority values ​​of all candidate root cause steps are calculated, they are sorted from highest to lowest to obtain the ranking results. The higher the ranking of a candidate root cause step, the higher the confidence of its own fault, and it should be identified as the target root cause step first. Alternatively, if multiple candidate root cause steps are identified as target root cause steps, the higher the ranking of the candidate root cause step, the more severe its own fault, and it should be repaired first.

[0137] For example, the candidate root cause set includes two candidate root cause steps: step 9 and step 11. Step 9 has a fault type of "violation of role constraints," a fault weight of 0.7, and a confidence level of 0.92. Its propagation chain to the target fault step, step 15, includes a fault step, step 11. Step 11 has a fault type of "tool error," a fault weight of 0.8, and a confidence level of 0.88. Its propagation chain to the target fault step, step 15, includes a fault step, step 12. The system calculates the priority values ​​of the two candidate root cause steps. If, after sorting, the priority value of step 9 is higher than that of step 11, then step 9 is determined as the target root cause step.

[0138] In practical applications, a preset number (e.g., 3) of candidate root cause steps can be selected as target root cause steps from the sorting results. For example, if the candidate root cause set contains 10 candidate root cause steps, after sorting them according to their respective priority values, the top 3 candidate root cause steps are determined as target root cause steps, and the top target root cause step is given priority for repair analysis and processing.

[0139] The data processing method provided in the embodiments of this specification introduces a decay factor for the propagation chain distance, which makes the contribution of the fault step closer to the target fault step greater to the priority value, reflecting the difference between the direct and indirect effects in the error propagation process; this scoring mechanism supports flexible configuration of fault weights, enabling the system to dynamically adjust the severity assessment criteria of different fault types according to the actual operation and maintenance strategy, thereby improving the practicality of the ranking results.

[0140] In one or more embodiments of this specification, after determining the target root cause step, it is necessary to determine the propagation chain from the target root cause step to the target failure step, identify the execution steps on the path that are not marked as failures as propagation steps, and generate a detection report corresponding to the target execution trajectory. Specific implementation methods are as follows: The dependency graph constructed based on the multiple execution steps, after determining the target root cause step in the set of failure steps, further includes: Determine the propagation chain from the target root cause step to the target failure step, and mark the execution steps on the propagation chain that are not in the set of failure steps as propagation steps; The executing agent corresponding to the target root cause step is determined, and a detection report is generated. The detection report includes at least one of the target fault step, the target root cause step, the executing agent, the fault type corresponding to the target root cause step, the propagation step, and optimization suggestions.

[0141] In this context, a propagation step can be understood as an execution step located on the propagation chain from the target root cause step to the target fault step, but which is not marked as faulty by the fault detection unit. These steps themselves are not abnormal, but during error propagation, they perform the function of transmitting upstream erroneous premises, erroneous data, or erroneous conclusions to downstream steps. An execution agent can be understood as an agent that executes the action corresponding to the target root cause step. By identifying the execution agent, the specific agent component that needs adjustment or repair can be located. Optimization suggestions can be understood as repair directions or adjustment recommendations proposed based on the fault type and specific manifestations of the target root cause step, used to guide operations personnel or developers in fixing the problem.

[0142] Specifically, given the target root cause step, a forward traversal is performed on the dependency graph starting from the action node of the target root cause step, along the connecting edges, to search for the propagation chain leading to the action node corresponding to the target fault step. The execution steps on the propagation chain may include three types: first, fault steps that have already been marked as faults, which can be used as secondary fault steps; second, execution steps that have not been marked as faults, which are marked as propagation steps; and third, the target root cause step itself and the target fault step.

[0143] In this embodiment, execution steps not included in the fault step set on the propagation chain are marked as propagation steps, indicating that these execution steps are logically correct and compliant in their behavior, but they received incorrect input and continued to propagate the error downstream. Given that each execution step has a corresponding step index and associated agent, the agent associated with the target root cause step can be determined as the executing agent, and a structured detection report can be generated. The report content can include the target fault step, the target root cause step and its corresponding executing agent and fault type, the propagation chain, propagation steps, secondary fault steps, fault descriptions and confidence levels of each fault step, and optimization suggestions for the target root cause step. These optimization suggestions are generated based on the fault type; for example, for hallucination-related faults, it is recommended to add a fact-checking mechanism or adjust the model inference parameters; for faults violating role constraints, it is recommended to modify the role constraint description in the system prompt text.

[0144] For example, if the execution trajectory contains 12 execution steps, and the target root cause step is determined to be step 6 and the target fault step is step 12, traversing the dependency graph forward from step 6 reveals the following propagation chain: Step 6 (target root cause step, fault type "logical illusion", belonging to the first agent) → Step 8 (fault, fault type "violation of role boundary") → Step 10 (data processing step, not marked as fault) → Step 12. Step 10 itself is logically correct; it simply formats the verification result from step 8 and passes it to step 12. It has no inherent anomalies, therefore the system marks step 10 as a propagation step.

[0145] The generated detection report includes: the target fault step is step 12, the target root cause step is step 6 and the corresponding executing agent is the first agent, the fault type is "logic illusion", the error propagation chain is "step 6 (root cause) → step 8 (fault) → step 10 (propagation) → step 12 (fault)", and the optimization suggestion is "it is recommended to correct the parsing logic of the first agent".

[0146] In practical applications, the detection report can provide different levels of detail depending on the user role. Ordinary users can view a simplified summary, which includes the target root cause steps, the corresponding executing agent, and optimization suggestions; operations engineers can view the full report, which includes specific evidence and status of each step in the propagation chain, without any restrictions on the specific user role.

[0147] The data processing method provided in the embodiments of this specification determines the propagation chain and identifies execution steps not marked as faults on the propagation chain as transmission steps, enabling the complete error propagation chain to be explicitly reconstructed. This effectively distinguishes between the target root cause step that introduces the error and the transmission steps that propagate the error, avoiding the problem of misjudging intermediate transmission steps as fault sources or ignoring error propagation paths. By generating a structured detection report containing the target root cause step, the executing agent, the fault type, the propagation chain, and optimization suggestions, it provides users with complete information from problem location to repair guidance, significantly reducing the time cost of fault diagnosis and repair.

[0148] See Figure 3 , Figure 3 A flowchart illustrating the processing procedure of a data processing method according to an embodiment of this specification is shown, specifically including the following steps.

[0149] To address the challenges of troubleshooting in multi-agent systems, the industry typically uses the following methods to determine the root cause of failures. However, these methods have significant limitations in real-world production environments and cannot directly support the attribution requirements of multi-agent systems.

[0150] The first category is attribution methods based on pattern or spectral analysis. The core idea is to mine reusable failure patterns from a large number of execution trajectories and infer the source of the failure through statistical signals or trajectory similarities. The problem with this type of method is that it heavily relies on the recurrence of failure patterns and the stability of statistical regularities. However, the execution paths of large-scale multi-agent systems exhibit significant non-determinism; the same type of failure in different contexts may not necessarily manifest as a stable, recurring trajectory pattern. Therefore, it has poor generalization ability, is insensitive to novel failures, and struggles to cover the large number of low-frequency but high-impact first-time failures in production environments.

[0151] The second category is debugging methods based on intervention, replay, or re-execution. Specifically, root causes are verified by modifying intermediate states or re-executing from a certain step, which theoretically has strong causal verification capabilities. However, re-executing multi-agent tasks is costly, involves multiple rounds of agent processing and tool calls, and the randomness of large model outputs leads to unstable verification. In addition, it may introduce side effects to tasks that depend on the external environment, making it difficult to implement in production scenarios where cost, stability, and online security are sensitive.

[0152] The third category is root cause determination methods based on large model inference, which have the advantage of being able to directly process natural language trajectories. However, the problem is that most of these methods rely on large models to analyze the entire trajectory, lacking explicit structural constraints. When faced with long trajectories and cross-step propagation, they are prone to attributing responsibility errors to the nearest step instead of identifying the true upstream root cause. Furthermore, they are prone to type confusion when judging multiple heterogeneous faults. The lack of structural support also leads to large models frequently producing "reasonable but unsupported" illusory attribution explanations, resulting in unstable accuracy and unreliable explanations in long-link fault scenarios.

[0153] The fourth category relies on supervised training or model fine-tuning, which trains specialized models using labeled data to achieve higher accuracy. However, these methods are highly dependent on high-quality labeled data and stable task boundaries. In production environments, multi-agent systems are constantly evolving, with new agents, tools, and policies being added, causing training data to quickly become outdated. Furthermore, the labeling cost of fault attribution is extremely high, making it difficult to develop a low-cost, sustainable, and iterative general solution.

[0154] In summary, existing solutions either rely on statistical models, making them difficult to adapt to dynamic situations; rely on invasive re-runs, rendering them unusable online; lack structural constraints, leading to illusory attributions; or rely on expensive annotations, hindering continuous evolution. Therefore, a method is needed that directly handles unstructured execution trajectories, explicitly recovers step dependencies, and identifies root cause steps without relying on retraining or intruding on multi-agent systems.

[0155] The data processing method provided in the embodiments of this specification can automatically identify the root cause agent, root cause step, fault type and error propagation chain based on the failed execution trajectory and runtime configuration information without replaying execution or relying on special training, and output a diagnostic report that can directly guide the repair.

[0156] Specifically, this data processing method is applied to a data processing system, which consists of an input adaptation and preprocessing module, a hierarchical structure diagram construction module, a multi-expert fault detection module, a dependency modeling and reverse attribution module, and a result sorting and report generation module.

[0157] The input adaptation and preprocessing module receives four types of raw data: task description, system prompts for each agent in the multi-agent system, tool registry entries, and execution trajectories. The execution trajectory consists of multiple execution steps, each containing at least a step index, the executing agent, and the original content. Additionally, execution steps may include tool call parameters, tool return values, status codes, and referenced upstream steps. All inputs are uniformly converted to a standard internal format before proceeding to subsequent processes.

[0158] The hierarchical structure graph construction module is used to construct the hierarchical structure graph (HCG). The system extracts task sub-goals and constraints from the task description, role definitions, capabilities, and behavioral constraints from the system prompt text corresponding to the agent, tool interface specifications from the tool registry, and then progressively extracts the intent and actions of each step from the execution trajectory. The system organizes this information into a directed graph, i.e., the HCG.

[0159] The hierarchical structure diagram is divided into a static cognitive layer (i.e., the static attribute layer in the above embodiment) and a dynamic execution layer. The static cognitive layer stores task nodes, role nodes, and tool nodes; the dynamic execution layer stores the intent nodes and action nodes for each execution step. Nodes are connected by various types of edges, including execution order edges, intent dependency edges, task alignment edges, role compliance edges, and tool invocation edges.

[0160] The multi-expert fault detection module launches four independent fault detection units in parallel: the compliance agent (compliance detection unit in the above embodiment), the logic agent (logic detection unit in the above embodiment), the process agent (process detection unit in the above embodiment), and the context agent (context detection unit in the above embodiment). Each fault detection unit reads the HCG and the original execution trajectory, but focuses on different nodes and edges.

[0161] Specifically, each fault detection unit is independent of others and can be executed concurrently. The input of the compliance detection unit is the task node, role node, and intent node and action node of the dynamic execution layer. Its responsibility is to check whether each step violates the task constraints or role boundaries. If the action deviates directly from the task goal or violates the hard constraints, it is marked as task constraint deviation (i.e., violation of task constraints). If the agent executes an action outside the role definition or ignores the role restrictions, it is marked as role deviation (i.e., violation of role boundaries).

[0162] The input to the logic detection unit is the dynamic execution node and its local dependency edges. Its responsibility is to identify illusions, logical conflicts, and overconfidence. If an action references facts or tool results that do not exist in the execution trajectory, it is marked as an illusion. If the current output contradicts previously confirmed facts, it is marked as a logical conflict. If a definitive conclusion is given when the evidence is insufficient, it is marked as overconfidence.

[0163] The process detection unit takes dynamic execution nodes, execution sequence edges, and tool nodes as inputs. Its responsibilities are to identify loop execution, premature termination, and tool errors. If multiple consecutive steps exhibit repetitive actions or invalid iterations, it is marked as loop execution. If the task ends before the objective is achieved, it is marked as premature termination. If the tool call parameters are incorrect, the return value is handled incorrectly, or the tool failure status is ignored, it is marked as a tool error.

[0164] The context detection unit takes HCG and the original execution trajectory as input and is responsible for identifying collaboration and context issues. If key upstream information is obscured, omitted, or mistransmitted during transmission, it is marked as unclear communication. If downstream steps ignore confirmed important historical information or user corrections, it is marked as context ignoring.

[0165] Each fault detection unit outputs multiple candidate steps. The record items corresponding to each candidate step include step index, fault type, fault description, evidence source, and confidence level. After each fault detection unit outputs its data, the system performs deduplication using the (step index, fault type) double key. If multiple fault detection units find the same type of fault in the same execution step, they are merged into one record. The fault description and evidence source retain the fault description and evidence source corresponding to one or more fault detection units. The fault confidence level is taken as the larger value or fused according to weights, ultimately forming a unified fault set (i.e., the fault step set in the above embodiment).

[0166] The dependency modeling and reverse attribution module constructs an action-level dependency graph based on the dynamic execution layer and unified fault set of HCG. Nodes in the dependency graph represent action nodes for each execution step, and edges indicate that "the subsequent step explicitly depends on the result of the previous step." Dependency edges originate from two sources: first, direct dependency edges already present in HCG, such as adjacent execution order edges and local dependency edges; second, cross-step dependency edges identified through an additional long-range dependency extraction process, such as subsequent conclusions referencing earlier search results, or downstream code building upon incorrect upstream assumptions.

[0167] After the dependency graph is constructed, starting from the final failure step T (i.e. the target failure step in the above embodiment, usually the execution step that is visible to the user at the end, or the failure step marked by the platform, or the step that is clearly "declared as completed" in the execution trajectory), find all ancestors Anc(T) on the dependency graph (i.e. the set of preceding dependency steps in the above implementation). Filter out the nodes that appear in the unified failure set in Anc(T) to obtain the failure ancestor set (i.e. the intersection of the set of preceding dependency steps and the set of failure steps).

[0168] If an execution step in a set of fault ancestors has no other faulty steps among its upstream steps, then that execution step is a candidate root cause step, thus forming a candidate root cause set. The candidate root cause steps in the candidate root cause set are prioritized, and one or more target root cause steps are determined based on the prioritization result.

[0169] When determining the propagation chain, for each target root cause step, the shortest path between the target root cause step and the target failure step is determined as the propagation chain. Execution steps on the propagation chain that are not in the unified failure set are marked as propagation steps. That is, these steps themselves are not marked as failures, but they pass the upstream error to the downstream as is.

[0170] The results ranking and report generation module comprehensively scores each candidate root cause step in the candidate root cause set based on its own severity, impact on downstream faults, and propagation depth, and outputs the final detection report after ranking. The detection report includes the target task's task identifier, target root cause step, root cause agent (the agent to which the target root cause step belongs), fault type, propagation chain, transmission steps, secondary fault steps, and repair priority suggestions. The data processing system provided in this embodiment offers two modes: single-trajectory on-demand analysis and batch diagnosis.

[0171] For example, a user submits a complex task: "Analyze the JVM state of an application 30 minutes before a specified time and provide a reason for the error." Multiple agents within the system collaborate to execute this task: a clarifying agent understands the requirements, a leading agent orchestrates the task, a network search or log analysis agent retrieves metrics and logs, a code generation agent generates the analysis code, and a verification agent verifies the final conclusion. Ultimately, the system outputs the reason for the error, and the user clicks "Error Result" on the platform.

[0172] The platform retrieves the complete execution trajectory of the failed task based on the task identifier, and also reads the relevant task description, system prompt text of each participating agent, and tool registry.

[0173] The fault attribution system (i.e., the data processing system in this embodiment) standardizes the input. The task description is parsed into multiple atomic sub-objectives, such as "analyze the JVM state within a specified time window," "identify event characteristics," and "provide cause suggestions," as well as hard constraints, such as "the time window must be correct" and "the conclusion must be based on observational evidence." The system extracts role definitions from the system prompt text of each agent; for example, the log analysis agent is only responsible for log pattern extraction, and the verification agent must confirm based on evidence. The tool registry is converted into tool nodes. Each execution step in the execution trajectory is parsed into intent and action and constructed into a hierarchical structure graph.

[0174] Four fault detection units perform detection in parallel. The compliance detection unit may find that an analytical agent uses conclusive expressions beyond its scope of responsibility; the logic detection unit may find that a step writes non-existent "memory leak evidence" into the conclusion; the process detection unit may find that a tool returns an error but fails to handle it; and the context detection unit may find that an intermediate step ignores the user-specified time window. All detection results are merged into a unified fault set.

[0175] A dependency graph is constructed around the final erroneous conclusion. For example, the final output references the conclusion of the verification agent, which depends on a log analysis result, which in turn depends on an earlier erroneous clustering or erroneous indicator interpretation. At this point, the system will recover the complete path from upstream erroneous analysis to the final erroneous conclusion. Some intermediate steps, although they do not generate new errors themselves, faithfully transmit the erroneous premises and are therefore marked as propagation steps.

[0176] Perform reverse tracing on the dependency graph to identify the target root cause step. If the error originates from a log analysis agent that categorizes abnormal log errors as normal, this execution step is identified as the target root cause step. Subsequent metric analysis and final summarization may then be marked as propagation steps or secondary failure steps, respectively. A scoring mechanism is then used to determine whether this target root cause step is the primary target for remediation.

[0177] A diagnostic report is generated. Users can see a simplified summary, such as "The root cause occurred in step 8 of the log analysis phase; the fault type is logical misjudgment; the error continues to propagate through steps 10 and 12 to the final conclusion; it is recommended to prioritize fixing the log clustering rules or the corresponding agent's system prompt text." Operations engineers can view the full report, including evidence for each execution step, dependency paths, and remediation recommendations. Users can modify the task description and retry accordingly, while engineers can adjust the system prompt text or tool definitions.

[0178] The data processing method provided in this specification, compared to methods relying on statistical pattern mining, does not require the recurrence of failure patterns and can adapt to production environments with dynamically changing execution paths and uncertain fault morphologies in multi-agent systems. Compared to debugging methods relying on invasive re-execution, it can directly perform offline analysis based on recorded failure execution trajectories without re-executing tasks or injecting external intervention, avoiding additional inference costs, random interference, and online side effects. Compared to methods that rely on a single model for overall inference of the entire trajectory, this embodiment explicitly restores the dependencies between tasks, roles, tools, and steps through a hierarchical structure graph, and uses multiple fault detection units to detect different types of faults in parallel. Finally, the root cause localization is constrained to the reverse tracing of verified dependency paths, effectively reducing cascading misjudgments, type confusion, and hallucination interpretation problems. Compared to methods relying on labeled data and model fine-tuning, this embodiment does not require expensive training and continuous retraining, can adapt to environments where agent roles, tools, and orchestration strategies continuously evolve, and has stronger deployability and scalability.

[0179] The data processing method provided in the embodiments of this specification can recover computable step dependencies on unstructured natural language trajectories, significantly improving the root cause localization capability in cross-agent and cross-step error propagation scenarios; it can finely distinguish between constraint violations, hallucinations, logical conflicts, process anomalies, and contextual problems through different fault detection units, thereby improving the accuracy of fault classification and step-level attribution; it can restore the complete error propagation chain through reverse tracing of transmission perception, distinguishing intermediate propagation steps from the true root cause and avoiding misjudgments based on the final symptoms; and it can reduce the space for free generation of large models and improve the evidence support, interpretability, and credibility of diagnostic results by converting key attribution processes into deterministic graph traversal and sorting.

[0180] In practice, this data processing method can reduce the average fault attribution time to less than 1 minute, and achieve an accuracy improvement of at least 15% and 13.3% at the agent level and step level, respectively. It achieves a good balance between accuracy, efficiency, interpretability, non-intrusiveness and feasibility, and can provide a set of efficient, reliable and scalable fault attribution capabilities for production-grade multi-agent systems.

[0181] Corresponding to the above method embodiments, this specification also provides data processing apparatus embodiments. Figure 4 A schematic diagram of the structure of a data processing apparatus according to one embodiment of this specification is shown. Figure 4 As shown, the device includes: The acquisition module 402 is configured to acquire the target execution trajectory of the target task and the task information corresponding to the target task, wherein the target execution trajectory is obtained by processing the target task through a multi-agent system, and the task processing result of the target task is failure, and the target execution trajectory contains multiple execution steps; Module 404 is configured to construct a hierarchical structure diagram based on the target execution trajectory and the task information; The detection module 406 is configured to input the hierarchical structure diagram, the target execution trajectory, and the detection prompt text corresponding to each fault detection unit into the corresponding fault detection unit, and obtain a set of fault steps based on the fault information output by each fault detection unit. The determination module 408 is configured to determine the target root cause step in the set of failure steps based on the dependency graph constructed from the plurality of execution steps.

[0182] Optionally, the building module 404 is further configured to: Static attribute nodes are constructed based on the task information, and dynamic execution nodes are constructed based on multiple execution steps of the target execution trajectory. The task information includes a task description, system prompt text, and a tool registry. The static attribute nodes include task nodes, role nodes, and tool nodes. The dynamic execution nodes include intent nodes and action nodes. Connecting nodes by establishing relationships between them generates connection edges. The hierarchical structure graph is constructed based on the static attribute nodes, the dynamic execution nodes, and the connecting edges between the nodes.

[0183] Optionally, the detection module 406 is further configured to: Determine the detection prompt text corresponding to each fault detection unit. Different fault detection units are used to detect fault steps of different fault types, and the detection prompt text is a prompt text related to the corresponding fault type. The hierarchical structure diagram, the target execution trajectory, and the detection prompt text corresponding to each fault detection unit are input into the corresponding fault detection unit to obtain the fault information output by each fault detection unit. The fault information includes a set of candidate steps, the fault type of each candidate step, and the fault description of each candidate step. The candidate step sets output by each fault detection unit are merged and deduplicated to obtain the fault step set. The fault type of each fault step in the fault step set is determined according to the fault type of the corresponding candidate step, and the fault description of each fault step is determined according to the fault description of the corresponding candidate step.

[0184] Optionally, the detection module 406 is further configured to: Input the hierarchical structure diagram, the target execution trajectory, and the compliance prompt text corresponding to the compliance detection unit into the compliance detection unit; The compliance detection unit performs compliance checks on the task nodes, role nodes, dynamic execution nodes, and the connection edges between corresponding nodes in the hierarchical structure diagram to obtain fault information output by the compliance detection unit. The compliance detection unit is used to detect whether the dynamic execution node violates task constraints and / or role boundaries.

[0185] Optionally, the detection module 406 is further configured to: Input the hierarchical structure diagram, the target execution trajectory, and the logical prompt text corresponding to the logical detection unit into the logical detection unit; Based on the logic detection unit, the dynamic execution node and the connection edges between the corresponding nodes in the hierarchical structure diagram are logically checked to obtain the fault information output by the logic detection unit. The logic detection unit is used to detect whether the dynamic execution node has illusions and / or logical conflicts.

[0186] Optionally, the detection module 406 is further configured to: Input the hierarchical structure diagram, the target execution trajectory, and the process prompt text corresponding to the process detection unit into the process detection unit; Based on the process detection unit, the dynamic execution node, the tool node, and the connection edges between the corresponding nodes in the hierarchical structure diagram are checked to obtain the fault information output by the process detection unit. The process detection unit is used to detect whether the dynamic execution node has step loops, premature termination, and / or tool errors.

[0187] Optionally, the detection module 406 is further configured to: Input the hierarchical structure diagram, the target execution trajectory, and the context prompt text corresponding to the context detection unit into the context detection unit; The context detection unit and the hierarchical structure diagram are used to perform context checks on the target execution trajectory to obtain fault information output by the context detection unit. The context detection unit is used to detect whether there is unclear transmission and / or context ignoring in the target execution trajectory.

[0188] Optionally, the determining module 408 is further configured to: Action nodes are generated based on multiple execution steps, and connection edges between action nodes are generated based on the dependencies between multiple action nodes. The dependency graph is constructed based on the action nodes and the connection edges between action nodes. The connection edges include step dependency edges, which are used to connect non-adjacent action nodes. In the two action nodes connected by the step dependency edge, the latter action node uses the output result of the former action node. Based on the target fault step in the set of fault steps, the dependency graph is traced back to determine the target root cause step corresponding to the target fault step.

[0189] Optionally, the determining module 408 is further configured to: Determine the target fault step from the set of fault steps; Based on the dependency graph, determine the set of preceding dependent steps corresponding to the target failure step; based on the failure step set and the set of preceding dependent steps, determine the set of candidate root causes corresponding to the target failure step. The candidate root cause steps in the candidate root cause set are prioritized and sorted to obtain a sorting result. The target root cause step is determined based on the sorting result, wherein the target root cause step is one or more.

[0190] Optionally, the determining module 408 is further configured to: Based on the failure confidence of each candidate root cause step, the failure weight of the corresponding failure type of each candidate root cause step, and the propagation chain from each candidate root cause step to the target failure step, the priority value corresponding to each candidate root cause step is determined. The candidate root cause steps are prioritized according to their respective priority values ​​to obtain the ranking result.

[0191] Optionally, the determining module 408 is further configured to: Determine the propagation chain from the target root cause step to the target failure step, and mark the execution steps on the propagation chain that are not in the set of failure steps as propagation steps; The executing agent corresponding to the target root cause step is determined, and a detection report is generated. The detection report includes at least one of the target fault step, the target root cause step, the executing agent, the fault type corresponding to the target root cause step, the propagation step, and optimization suggestions.

[0192] The above is an illustrative scheme of a data processing apparatus according to this embodiment. It should be noted that the technical solution of this data processing apparatus and the technical solution of the data processing method described above belong to the same concept. For details not described in detail in the technical solution of the data processing apparatus, please refer to the description of the technical solution of the data processing method described above.

[0193] Figure 5 A structural block diagram of a computing device 500 according to one embodiment of this specification is shown. The components of the computing device 500 include, but are not limited to, a memory 510 and a processor 520. The processor 520 is connected to the memory 510 via a bus 530, and a database 550 is used to store data.

[0194] The computing device 500 also includes an access device 540, which enables the computing device 500 to communicate via one or more networks 560. Examples of these networks include Public Switched Telephone Network (PSTN), Local Area Network (LAN), Wide Area Network (WAN), Personal Area Network (PAN), or combinations of communication networks such as the Internet. The access device 540 may include one or more of any type of wired or wireless network interface (e.g., a network interface card (NIC)), such as an IEEE 802.11 Wireless Local Area Network (WLAN) wireless interface, a Wi-MAX (Worldwide Interoperability for Microwave Access) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, or a Near Field Communication (NFC) interface.

[0195] In one embodiment of this specification, the above-described components of the computing device 500 and Figure 5 Other components, not shown, can also be connected to each other, for example, via a bus. It should be understood that... Figure 5 The block diagram of the computing device shown is for illustrative purposes only and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.

[0196] The computing device 500 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or personal computers (PCs). The computing device 500 can also be a mobile or stationary server.

[0197] The processor 520 is used to execute the following computer program / instructions, which, when executed by the processor, implement the steps of the above-described data processing method.

[0198] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the computing device embodiments are basically similar to the data processing method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the data processing method embodiments.

[0199] An embodiment of this specification also provides a computer-readable storage medium storing a computer program / instructions that, when executed by a processor, implement the steps of the above-described data processing method.

[0200] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the computer-readable storage medium embodiments are basically similar to the data processing method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the data processing method embodiments.

[0201] An embodiment of this specification also provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of the above-described data processing method.

[0202] The above is an illustrative scheme of a computer program product according to this embodiment. It should be noted that the technical solution of this computer program product and the technical solution of the data processing method described above belong to the same concept. For details not described in detail in the technical solution of the computer program product, please refer to the description of the technical solution of the data processing method described above.

[0203] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0204] The computer instructions include computer program code, which may be in the form of source code, object code, executable file, or certain intermediate forms. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium may be appropriately added or removed according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media may not include electrical carrier signals and telecommunication signals.

[0205] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments in this specification are not limited to the described order of actions, because according to the embodiments in this specification, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the embodiments in this specification.

[0206] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0207] The preferred embodiments disclosed above are merely illustrative of this specification. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the embodiments described herein. These embodiments are selected and specifically described in this specification to better explain the principles and practical applications of the embodiments, thereby enabling those skilled in the art to better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.

Claims

1. A data processing method, comprising: Obtain the target execution trajectory of the target task and the task information corresponding to the target task, wherein the target execution trajectory is obtained by processing the target task through a multi-agent system, and the task processing result of the target task is failure, and the target execution trajectory contains multiple execution steps; Construct a hierarchical structure diagram based on the target execution trajectory and the task information; The hierarchical structure diagram, the target execution trajectory, and the detection prompt text corresponding to each fault detection unit are input into the corresponding fault detection unit. Based on the fault information output by each fault detection unit, a set of fault steps is obtained. Based on the dependency graph constructed from the multiple execution steps, the target root cause step is determined in the set of failure steps.

2. The method as described in claim 1, wherein constructing a hierarchical structure diagram based on the target execution trajectory and the task information includes: Static attribute nodes are constructed based on the task information, and dynamic execution nodes are constructed based on multiple execution steps of the target execution trajectory. The task information includes a task description, system prompt text, and a tool registry. The static attribute nodes include task nodes, role nodes, and tool nodes. The dynamic execution nodes include intent nodes and action nodes. Connecting nodes by establishing relationships between them generates connection edges. The hierarchical structure graph is constructed based on the static attribute nodes, the dynamic execution nodes, and the connecting edges between the nodes.

3. The method as described in claim 2, wherein inputting the hierarchical structure diagram, the target execution trajectory, and the detection prompt text corresponding to each fault detection unit into the corresponding fault detection unit, and obtaining a set of fault steps based on the fault information output by each fault detection unit, includes: Determine the detection prompt text corresponding to each fault detection unit. Different fault detection units are used to detect fault steps of different fault types, and the detection prompt text is a prompt text related to the corresponding fault type. The hierarchical structure diagram, the target execution trajectory, and the detection prompt text corresponding to each fault detection unit are input into the corresponding fault detection unit to obtain the fault information output by each fault detection unit. The fault information includes a set of candidate steps, the fault type of each candidate step, and the fault description of each candidate step. The candidate step sets output by each fault detection unit are merged and deduplicated to obtain the fault step set. The fault type of each fault step in the fault step set is determined according to the fault type of the corresponding candidate step, and the fault description of each fault step is determined according to the fault description of the corresponding candidate step.

4. The method as described in claim 3, wherein the fault detection unit includes a compliance detection unit; The step of inputting the hierarchical structure diagram, the target execution trajectory, and the detection prompt text corresponding to each fault detection unit into the corresponding fault detection unit to obtain the fault information output by each fault detection unit includes: Input the hierarchical structure diagram, the target execution trajectory, and the compliance prompt text corresponding to the compliance detection unit into the compliance detection unit; The compliance detection unit performs compliance checks on the task nodes, role nodes, dynamic execution nodes, and the connection edges between corresponding nodes in the hierarchical structure diagram to obtain fault information output by the compliance detection unit. The compliance detection unit is used to detect whether the dynamic execution node violates task constraints and / or role boundaries.

5. The method as described in claim 3, wherein the fault detection unit includes a logic detection unit; The step of inputting the hierarchical structure diagram, the target execution trajectory, and the detection prompt text corresponding to each fault detection unit into the corresponding fault detection unit to obtain the fault information output by each fault detection unit includes: Input the hierarchical structure diagram, the target execution trajectory, and the logical prompt text corresponding to the logical detection unit into the logical detection unit; Based on the logic detection unit, the dynamic execution node and the connection edges between the corresponding nodes in the hierarchical structure diagram are logically checked to obtain the fault information output by the logic detection unit. The logic detection unit is used to detect whether the dynamic execution node has illusions and / or logical conflicts.

6. The method as described in claim 3, wherein the fault detection unit includes a process detection unit; The step of inputting the hierarchical structure diagram, the target execution trajectory, and the detection prompt text corresponding to each fault detection unit into the corresponding fault detection unit to obtain the fault information output by each fault detection unit includes: Input the hierarchical structure diagram, the target execution trajectory, and the process prompt text corresponding to the process detection unit into the process detection unit; Based on the process detection unit, the dynamic execution node, the tool node, and the connection edges between the corresponding nodes in the hierarchical structure diagram are checked to obtain the fault information output by the process detection unit. The process detection unit is used to detect whether the dynamic execution node has step loops, premature termination, and / or tool errors.

7. The method of claim 3, wherein the fault detection unit includes a context detection unit; The step of inputting the hierarchical structure diagram, the target execution trajectory, and the detection prompt text corresponding to each fault detection unit into the corresponding fault detection unit to obtain the fault information output by each fault detection unit includes: Input the hierarchical structure diagram, the target execution trajectory, and the context prompt text corresponding to the context detection unit into the context detection unit; The context detection unit and the hierarchical structure diagram are used to perform context checks on the target execution trajectory to obtain fault information output by the context detection unit. The context detection unit is used to detect whether there is unclear transmission and / or context ignoring in the target execution trajectory.

8. The method of claim 1, wherein determining the target root cause step in the set of failure steps based on the dependency graph constructed from the plurality of execution steps comprises: Action nodes are generated based on multiple execution steps, and connection edges between action nodes are generated based on the dependencies between multiple action nodes. The dependency graph is constructed based on the action nodes and the connection edges between action nodes. The connection edges include step dependency edges, which are used to connect non-adjacent action nodes. In the two action nodes connected by the step dependency edge, the latter action node uses the output result of the former action node. Based on the target fault step in the set of fault steps, the dependency graph is traced back to determine the target root cause step corresponding to the target fault step.

9. The method of claim 8, wherein the step of tracing back the dependency graph based on the target fault step in the set of fault steps to determine the target root cause step corresponding to the target fault step includes: Determine the target fault step from the set of fault steps; Based on the dependency graph, determine the set of preceding dependent steps corresponding to the target failure step, and based on the failure step set and the set of preceding dependent steps, determine the set of candidate root causes corresponding to the target failure step. The candidate root cause steps in the candidate root cause set are prioritized and sorted to obtain a sorting result. The target root cause step is determined based on the sorting result, wherein the target root cause step is one or more.

10. The method of claim 9, wherein the step of prioritizing each candidate root cause in the candidate root cause set to obtain a ranking result includes: Based on the failure confidence of each candidate root cause step, the failure weight of the corresponding failure type of each candidate root cause step, and the propagation chain from each candidate root cause step to the target failure step, the priority value corresponding to each candidate root cause step is determined. The candidate root cause steps are prioritized according to their respective priority values ​​to obtain the ranking result.

11. The method of claim 8, further comprising, after determining the target root cause step in the set of failure steps based on the dependency graph constructed from the plurality of execution steps: Determine the propagation chain from the target root cause step to the target failure step, and mark the execution steps on the propagation chain that are not in the set of failure steps as propagation steps; The executing agent corresponding to the target root cause step is determined, and a detection report is generated. The detection report includes at least one of the target fault step, the target root cause step, the executing agent, the fault type corresponding to the target root cause step, the propagation step, and optimization suggestions.

12. A data processing apparatus, comprising: The acquisition module is configured to acquire the target execution trajectory of the target task and the task information corresponding to the target task, wherein the target execution trajectory is acquired by processing the target task through a multi-agent system, and the task processing result of the target task is failure, and the target execution trajectory contains multiple execution steps; The construction module is configured to construct a hierarchical structure diagram based on the target execution trajectory and the task information; The detection module is configured to input the hierarchical structure diagram, the target execution trajectory, and the detection prompt text corresponding to each fault detection unit into the corresponding fault detection unit, and obtain a set of fault steps based on the fault information output by each fault detection unit. The determination module is configured to identify the target root cause step in the set of failure steps based on the dependency graph constructed from the plurality of execution steps.

13. A computing device, comprising: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions, which, when executed by the processor, implement the steps of the method according to any one of claims 1 to 11.

14. A computer-readable storage medium storing a computer program / instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1 to 11.

15. A computer program product comprising a computer program / instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1 to 11.