Task processing method and device, and electronic device

CN122924937APending Publication Date: 2026-10-16LENOVO (BEIJING) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610954131.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-29
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

[0003]相关技术采用自动化注错生成方式,但构造的异常样本整体偏简单,难以覆盖真实场景中多因耦合、级联放大、症状与根因分离等复杂故障特征,生成的归因数据与真实故障分布存在偏差,进而影响归因模型训练效果

Benefits of technology

[0010] It should be understood that the above general description and the following detailed description are merely exemplary and explanatory, and are not intended to limit the technical solutions of this application.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122924937A_ABST
    Figure CN122924937A_ABST
Patent Text Reader

Abstract

The application provides a task processing method and device and electronic equipment. The task processing method comprises: in a current round of multi-round iterative reasoning on a target task based on a multi-agent system, determining a target agent of the current round from at least one reasoning agent participating in reasoning on the target task in a previous round; inputting target fault information of the current round to the target agent of the current round, and controlling the multi-agent system to reason on the target task, outputting a first execution result and a first execution track of the current round; in the case that semantic content represented by the first execution result is different from semantic content represented by a second execution result of the previous round, labeling the first execution track based on an agent identifier of the target agent of the current round and the target fault information of the current round to obtain target attribution data of the current round.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to, but is not limited to, the field of task processing technology, and in particular to a task processing method, apparatus, and electronic device. Background Technology

[0002] Currently, existing multi-agent system anomaly attribution techniques rely heavily on high-quality attribution data. However, anomalies in multi-agent systems typically occur during long trajectories, multi-round interactions, and cross-agent collaborations, exhibiting characteristics such as covert propagation, gradual amplification, and root cause separation. Consequently, obtaining high-quality labeled data is challenging.

[0003] The related technology uses an automated error annotation generation method, but the constructed abnormal samples are generally too simple and cannot cover the complex fault characteristics in real scenarios, such as multi-factor coupling, cascade amplification, and separation of symptoms and root causes. The generated attribution data deviates from the real fault distribution, which in turn affects the training effect of the attribution model. Summary of the Invention

[0004] In view of this, embodiments of this application provide at least one task processing method, apparatus, and electronic device.

[0005] The technical solution of this application embodiment is implemented as follows: In a first aspect, embodiments of this application provide a task processing method, comprising: in the current round of multi-round iterative reasoning of a target task based on a multi-agent system, determining the target agent of the current round from at least one reasoning agent that participated in reasoning the target task in the previous round; inputting the target fault information of the current round to the target agent of the current round, and controlling the multi-agent system to reason about the target task, outputting a first execution result and a first execution trajectory of the current round; the first execution trajectory includes the reasoning process of the multi-agent system in reasoning about the target task in the current round; when the semantic content represented by the first execution result is different from the semantic content represented by the second execution result of the previous round, labeling the first execution trajectory based on the agent identifier of the target agent of the current round and the target fault information of the current round to obtain target attribution data of the current round; wherein, the second execution result is obtained by inputting the target fault information of the previous round to the target agent of the previous round and controlling the multi-agent system to reason about the target task.

[0006] Secondly, embodiments of this application provide a task processing apparatus, comprising: a determining module, configured to determine the target agent of the current round from at least one reasoning agent that participated in reasoning the target task in the previous round during the current round of a multi-agent system performing preset multi-round iterative reasoning on the target task; a reasoning module, configured to input the target fault information of the current round to the target agent of the current round, and control the multi-agent system to reason on the target task, outputting a first execution result and a first execution trajectory of the current round; the first execution trajectory includes the reasoning process of the multi-agent system in reasoning on the target task in the current round; and an annotation module, configured to annotate the first execution trajectory based on the agent identifier of the target agent of the current round and the target fault information of the current round when the semantic content represented by the first execution result is different from the semantic content represented by the second execution result of the previous round, to obtain target attribution data of the current round; wherein the second execution result is obtained by inputting the target fault information of the previous round to the target agent of the previous round and controlling the multi-agent system to reason on the target task.

[0007] Thirdly, embodiments of this application provide an electronic device, including a memory and a processor. The memory stores a computer program that can run on the processor, and the processor executes the program to implement some or all of the steps in the above-described method.

[0008] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements some or all of the steps in the above-described method.

[0009] Fifthly, embodiments of this application provide a computer program product, including a computer program or instructions, which, when executed by a processor, implement some or all of the steps in the above-described method.

[0010] It should be understood that the above general description and the following detailed description are merely exemplary and explanatory, and are not intended to limit the technical solutions of this application. Attached Figure Description

[0011] Figure 1 A schematic diagram illustrating the implementation flow of a task processing method provided in an embodiment of this application; Figure 2 A first schematic diagram of an attribution data annotation method provided in this application; Figure 3 This is a second schematic diagram of an attribution data annotation method provided in this application; Figure 4 This is a schematic diagram of the composition structure of a task processing device provided in an embodiment of this application; Figure 5 This is a schematic diagram of the hardware entity of an electronic device provided in an embodiment of this application.

[0012] It should be noted that the terms "first" and "second" mentioned above are only used to distinguish between different options and do not represent the degree of superiority or inferiority of the options or their priority in the implementation process. Detailed Implementation

[0013] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and embodiments. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0014] In the following description, references to "some embodiments" describe a subset of all possible embodiments. However, it is understood that "some embodiments" may be the same or different subsets of all possible embodiments and may be combined with each other without conflict. The terms "first / second / third" are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first / second / third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.

[0015] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. The terminology used herein is for descriptive purposes only and is not intended to limit the scope of this application.

[0016] Existing attribution techniques for anomalies in multi-agent systems rely heavily on high-quality data. However, anomalies in multi-agent systems typically occur during long trajectories, multi-round interactions, and cross-agent collaborations, exhibiting characteristics such as covert propagation, gradual amplification, and separation of symptoms from root causes. Consequently, obtaining high-quality labeled data is challenging.

[0017] In related technologies, when manually annotating based on real fault trajectories, it is necessary to analyze information such as responsible agents and key steps along the complete execution process, which is costly, inefficient, and has poor scalability, making it difficult to form large-scale usable data. The abnormal samples constructed by existing automated error annotation generation methods are generally too simple and cannot cover the complex fault characteristics in real scenarios, such as multi-factor coupling, cascade amplification, and separation of symptoms and root causes. This causes the generated data to deviate from the real fault distribution, thereby affecting the training effect of the attribution model.

[0018] To address this, this application provides a task processing method. Based on the previous round's inference trajectory, the target agent for the current round is determined. Then, target fault information is injected into the target agent to complete the current round of inference. Finally, the semantic differences between the execution results of adjacent rounds are compared, and execution trajectories with deviations are labeled with faults to generate corresponding target attribution data. By injecting faults progressively into the same task trajectory in multiple rounds, multiple rounds of faults are superimposed, simulating complex fault scenarios of fault cascading propagation and multi-factor coupling in real-world scenarios. In this way, high-quality fault attribution data can be automatically generated without relying on costly manual annotation, reducing the distribution discrepancy between attribution data and real faults, thereby improving the training effect of subsequent fault attribution models.

[0019] Figure 1 This is a schematic diagram illustrating the implementation flow of a task processing method provided in an embodiment of this application. For example... Figure 1 As shown, the method includes the following steps S101 and S103, combining... Figure 1 The steps shown are explained.

[0020] Step S101: In the current round of multi-round iterative reasoning of the target task based on the multi-agent system, determine the target agent of the current round from at least one reasoning agent that participated in the reasoning of the target task in the previous round.

[0021] The intelligent agent includes a large language model, and at least one of the following associated with the large language model: prompt word templates, context information, memory information, tool invocation interface, communication interface, and control logic. The intelligent agent can receive task-related information and, based on the large language model, understand, reason, or generate the task-related information to perform at least one of the following processes: task decomposition, sub-task reasoning, cross-agent interaction, tool invocation, result generation, result summarization, or status feedback. Different intelligent agents can have the same or different functional roles.

[0022] In some embodiments, the multi-round iterative reasoning process means that multiple rounds of fault injection and reasoning operations are performed sequentially on the execution trajectory corresponding to the same target task. Each round of iteration completes the fault injection operation independently, and the fault injection results of adjacent rounds are superimposed.

[0023] In some embodiments, the reasoning agent is an execution unit within a multi-agent system that has the ability to reason independently for sub-tasks and interact across agents, with different reasoning agents each responsible for handling different sub-tasks after the target task has been broken down.

[0024] In some embodiments, the reasoning agents that participated in the reasoning target task in the previous round are all the agents that received fault information, performed sub-task reasoning, and generated the second execution trajectory in the previous round of iteration.

[0025] In some embodiments, each round of iterative reasoning depends on the second execution trajectory output from the previous round. The target agent and injected fault in the current round are determined based on the interaction and reasoning data of the previous round, thereby realizing multi-round progressive fault simulation.

[0026] In some embodiments, the reasoning agents participating in reasoning in two adjacent rounds may be completely or partially overlapping, and the set of agents participating in reasoning in the current round may be dynamically adjusted according to the failure probability of each agent in the previous round.

[0027] For example, the reasoning agents involved in the previous round are agent A, agent B, and agent C. Based on the second execution trajectory of the previous round, a topology graph is constructed to calculate the failure probability of each agent. If agent B has the highest failure probability, then agent B is determined as the target agent for the current round.

[0028] In some embodiments, the number of target agents in the current round is at least one; multiple inference agents can be selected together as target agents in the current round to simulate multi-point coupling faults.

[0029] In some embodiments, the first round of iterative inference is completed based on a reference execution trajectory that meets preset requirements. The first round selects the first target agent based on the reference execution trajectory and the reference agent set that meet preset requirements, completes the first round of fault injection inference, and provides benchmark trajectory data for subsequent multiple rounds of iteration.

[0030] Step S102: Input the target fault information of the current round into the target agent of the current round, and control the multi-agent system to reason about the target task, and output the first execution result and the first execution trajectory of the current round.

[0031] The first execution trajectory includes the reasoning process of the multi-agent system in the current round of reasoning target task.

[0032] In some embodiments, the target fault information includes a fault task identifier and fault content. The fault task identifier is used to match the sub-task to be executed corresponding to the target agent, and the fault content is used to construct prompts that interfere with the reasoning process.

[0033] In some embodiments, when the target agent initiates the inference event corresponding to the subtask to be executed, target fault information is input to the target agent; the fault information is input after the inference event is triggered, so as to avoid the fault interfering with the target agent's processing of other preceding inference tasks.

[0034] In some embodiments, after the fault information is input, the multi-agent system fully executes all reasoning, agent interaction, and tool invocation processes for the current round of target tasks until the current round of reasoning ends.

[0035] In some embodiments, the first execution trajectory includes the input information of each reasoning agent in this round, the reasoning content, cross-agent interaction messages, and tool call records.

[0036] In some embodiments, the first execution result is the execution result or task execution status of the target task output by the multi-agent system after completing all inference in the current round.

[0037] For example, the target task is code writing and testing. The target agent responsible for code writing is given parameter error fault information. The agent performs code reasoning based on the fault prompt words, records the entire process of code generation and testing interaction to form the first execution trajectory, and outputs the code with parameter errors as the first execution result.

[0038] In some embodiments, the target fault information is determined based on the target intelligent agent subtask type and the fault candidate pool. The fault candidate pool stores different types of candidate faults and the occurrence probability of each type of fault. High-probability faults are selected as the target fault information for this round.

[0039] Step S103: If the semantic content represented by the first execution result is different from the semantic content represented by the second execution result of the previous round, the first execution trajectory is labeled based on the agent identifier of the target agent in the current round and the target fault information in the current round to obtain the target attribution data of the current round.

[0040] The second execution result is obtained by inputting the target fault information from the previous round into the target agent of the previous round and controlling the multi-agent system to reason about the target task.

[0041] In some embodiments, the semantic difference between the first execution result and the second execution result means that there is a substantial semantic deviation between them.

[0042] In some embodiments, the semantic difference between the first execution result and the second execution result can be quantified by a semantic similarity algorithm; when the calculated semantic similarity is lower than a preset threshold, it is determined that there is a difference in the semantic content between the two, and the fault injection in this round is deemed effective.

[0043] In some embodiments, the agent identifier is a code, number, or role label that distinguishes each reasoning agent, used to locate the target agent that has experienced a fault interference in the trajectory.

[0044] In some embodiments, the first execution trajectory is labeled based on the agent identifier and the target fault information, and a label is generated on the first execution trajectory. The label includes the target agent identity, fault type, and the subtask position corresponding to the fault injection.

[0045] In some embodiments, the target attribution data is structured trajectory data carrying complete fault labeling information, which can be used for training, benchmark evaluation, and fault propagation pattern analysis of multi-agent fault attribution models.

[0046] In some embodiments, if there is no difference in semantic content between the first execution result and the second execution result, it is determined that the fault injection in this round has no effective impact on task reasoning, and the first execution trajectory of the current round is discarded, and the corresponding target attribution data is not generated.

[0047] For example, after the previous round of fault injection, the output of the second execution result was a correct mathematical calculation conclusion. After the injection of a new fault in this round, the output of the first execution result was an incorrect calculation conclusion. The semantic content of the two is substantially different. The target agent number and the fault content of the operation logic in this round are marked to the complete inference trajectory of this round to generate target attribution data that can be used by the attribution model.

[0048] In some embodiments, after obtaining candidate attribution data, predicted attribution data can be obtained by secondary reasoning of the first execution trajectory through the target model; if there is a substantial difference between the failure causes represented by the candidate attribution data and the predicted attribution data, the candidate attribution data is directly determined as the final target attribution data.

[0049] In this embodiment, firstly, the target agent for the current round is determined based on the previous round's inference trajectory. Then, target fault information is injected into the target agent to complete the current round of inference. Finally, the semantic differences between the execution results of adjacent rounds are compared, and fault annotations are applied to execution trajectories with deviations to generate corresponding target attribution data. By injecting faults in multiple progressive rounds onto the same task trajectory, multiple rounds of faults are superimposed to simulate complex fault scenarios involving cascading propagation and multi-factor coupling in real-world scenarios. Compared to existing automated fault annotation methods that can only generate simple single-point fault samples with limited fault features, this application can restore the evolutionary patterns of real complex faults while improving the multi-dimensional annotation information of trajectory faults. In this way, large-scale, high-quality fault attribution data can be automatically generated without relying on costly manual annotation, reducing the distribution difference between generated data and real fault data, thereby improving the training effect of subsequent fault attribution models.

[0050] In some embodiments, the target fault information of the current round includes a fault task identifier and fault content; the step S102 above, in which the target fault information of the current round is input to the target agent of the current round, includes the following process.

[0051] Step S1021: Determine the sub-task to be executed corresponding to the target agent in the current round based on the fault task identifier.

[0052] Among them, the subtask to be executed is a subtask assigned to the target agent from at least one first subtask; at least one first subtask is obtained after the target task is divided in the previous round.

[0053] In some embodiments, before reasoning about the target task, the multi-agent system first divides the target task into multiple interconnected and ordered sub-tasks based on the functions of each reasoning agent. Different sub-tasks correspond to different task nodes and reasoning logic.

[0054] In some embodiments, the target agent may include multiple subtasks to be executed, and the fault task identifier corresponds to at least one subtask to be executed by the target agent to avoid fault information being incorrectly matched to irrelevant reasoning subtasks.

[0055] Specifically, a fault can be injected into at least one subtask to be executed by the target agent; if there is only one subtask to be executed, a single-point fault injection can be performed on the target agent in the current round; if there are multiple subtasks to be executed, a multi-point fault injection can be performed on the target agent in the current round.

[0056] In some embodiments, the subtask partitioning rules and agent allocation rules of the current round are determined based on the subtask partitioning rules and agent allocation rules of the previous round; this ensures that the subtask partitioning logic remains consistent across multiple iterations and guarantees the effectiveness of fault injection locations in multiple rounds.

[0057] For example, the target task is broken down into three sub-tasks: requirement analysis, code writing, and result testing. If the fault task identifier matches the code writing sub-task, the code writing sub-task to be executed corresponding to the target agent can be accurately located, and fault interference is applied only to the subsequent inference process of that sub-task.

[0058] Step S1022: In response to the reasoning event of the target agent in the current round for the sub-task to be executed, input the first prompt word constructed based on the fault content into the target agent in the current round.

[0059] In some embodiments, a reasoning event refers to the triggering moment when the target agent initiates the corresponding subtask to be executed, begins logical operations, and performs content deduction.

[0060] In some embodiments, the first prompt word is constructed based on preset fault content to interfere with the normal reasoning logic of the target intelligent agent, causing it to output abnormal reasoning content that deviates from the normal reasoning result.

[0061] In some embodiments, the first prompt word only applies to the process of the target agent reasoning the sub-task to be executed in the current round, and does not interfere with the normal reasoning process of the target agent for other preceding or subsequent sub-tasks.

[0062] In some embodiments, different types of fault content correspond to the generation of first prompt words with different formats and different interference intensities, thereby adapting to diverse fault simulation needs.

[0063] For example, the subtask to be executed is data logic verification. An error logic prompt word is constructed based on the fault content of the logic error class. When the target agent starts logic verification reasoning, the subtask to be executed and the first prompt word are input into the target agent to interfere with its normal judgment process and generate an abnormal reasoning trajectory.

[0064] In this embodiment, the subtask to be executed corresponding to the target agent is determined by the fault task identifier. At the node where the agent starts the subtask inference, a first prompt word constructed from the fault content is issued, achieving precise and time-controllable targeted injection of faults. In this way, the fault only interferes with the inference process of the specified subtask, which can accurately reproduce the fault chain caused by the anomaly of a local subtask in the real scene, and improve the consistency of the generated fault trajectory with the real fault distribution pattern.

[0065] In some embodiments, step S101 above includes the following process.

[0066] Step S1011: Construct a topology graph corresponding to the second execution trajectory based on the second execution trajectory of the previous round; the topology graph represents the interaction behavior between at least one reasoning agent participating in the reasoning target task and the reasoning behavior of each reasoning agent.

[0067] In some embodiments, the topology graph uses inference agents as independent nodes to represent the runtime sequence and independent inference operation state of each agent throughout the entire round-robin inference process.

[0068] In some embodiments, the directed edges in the topology graph are used to represent the linkage behaviors such as message passing, instruction interaction, and data transmission between different reasoning agents, reflecting the dependency relationship between agents; each node in the topology graph records the reasoning duration, output content, and interaction triggering time of each reasoning agent; the topology graph enables a visual representation of the reasoning logic of the entire execution trajectory.

[0069] In some embodiments, the topology map can be used to quickly locate abnormal interaction nodes and abnormal inference nodes of the agent, thereby reducing the computational difficulty of subsequent fault probability calculations.

[0070] For example, multiple agents sequentially complete three steps: task decomposition, logical reasoning, and result summarization. The topology graph sequentially generates nodes corresponding to the three agents, and the interaction process is connected by directed edges to demonstrate the order of reasoning and interaction flow of the agents.

[0071] Step S1012: Based on the second execution trajectory and the topology graph corresponding to the second execution trajectory, determine the target agent for the current round from at least one reasoning agent that participated in the reasoning target task in the previous round.

[0072] In some embodiments, the probability of inference failure for each inference agent is quantified by combining the inference data recorded by the second execution trajectory with the agent interaction dependencies represented by the topology graph.

[0073] In some embodiments, the failure probability is used to characterize the probability that the corresponding agent will experience logical anomalies or output deviations during subtask reasoning or cross-agent interaction.

[0074] In some embodiments, reasoning agents with a failure probability higher than a preset probability threshold are selected as target agents for injecting failures in the current round.

[0075] In some embodiments, the filtering rules can be adjusted according to the attribution data generation requirements; if only single-point fault data is required, the single agent with the highest fault probability is selected as the target agent; if coupled faults need to be simulated, multiple high-probability agents are selected as the target agents.

[0076] For example, the topology diagram shows that agent B is the core interaction node of the entire inference chain. Combined with the second execution trajectory, it can be seen that agent B has inference deviations multiple times. The calculation shows that its failure probability is much higher than that of agent A and agent C. Therefore, agent B is determined as the target agent of the current round.

[0077] In some embodiments, agents located at the center of the interaction link in the topology graph and undertaking core sub-task operations have a higher weight in the calculation of the probability of failure and are preferentially selected as target agents, thereby reproducing the working condition of a chain of anomalies caused by the failure of a core node in a real scenario.

[0078] In this embodiment, a topology graph representing the reasoning and interaction relationships of agents is constructed based on the previous execution trajectory. Then, the probability of failure for each agent is calculated by combining the trajectory data and the topology structure, and high-risk agents are selected as the targets for failure injection in this round. The topology graph simplifies trajectory information and intuitively reflects agent dependency links, enabling accurate identification of core high-risk nodes in the reasoning chain. This achieves quantitative automatic screening of target agents, eliminating the need for manual determination of fault risk nodes and improving the efficiency of fault attribution data generation.

[0079] In some embodiments, the topology graph corresponding to the second execution trajectory includes at least one node, and some nodes in the at least one node are connected by at least one directed edge; wherein, a node in the topology graph corresponds to a reasoning agent that participated in the reasoning target task in the previous round and the reasoning task of the corresponding reasoning agent; the directed edge represents the interaction information between the reasoning agents corresponding to the two connected nodes respectively.

[0080] In some embodiments, during the construction of the topology graph, each reasoning agent participating in the reasoning target task is treated as an independent node. The node represents the identifier of the corresponding reasoning agent and the reasoning process of the reasoning agent itself. The nodes corresponding to reasoning agents with interaction processes are connected by directed edges, and the directed edges represent the interaction content and direction between the two reasoning agents.

[0081] In some embodiments, directed edges are generated only between two nodes that have interactive data transmission and task dependencies; no connections are set between nodes that have no interactive relationship.

[0082] In some embodiments, a single node can be bound to both the inference agent identifier and the corresponding subtask information, which can intuitively distinguish the different computational tasks undertaken by the same agent at different inference stages, making it easier to accurately locate the faulty link.

[0083] In some embodiments, each directed edge carries additional information such as interaction timing, transmitted data content, and message sending direction, which can completely restore the order of information transmission and interaction content between intelligent agents.

[0084] For example, the topology graph contains three nodes: agent A, agent B, and agent C. Only agent A transmits inference data to agent B. Therefore, only one directed edge is constructed between node A and node B. Node C has no interaction objects and there is no connected directed edge.

[0085] In some embodiments, the interconnected topology of some nodes can distinguish between independent computing agents and collaborative interaction agents, providing a structured basis for subsequent differentiated calculation of the failure probability of each agent.

[0086] In this embodiment, a topology graph is constructed using the previous round of inference agents and their corresponding subtasks as nodes and the agent interaction relationships as directed edges. Connections are established only between nodes that have data interaction or task dependencies, fully carrying the interaction sequence, transmission content, and other related information. In this way, the topology structure of the graph closely matches the real-world collaboration logic of multiple agents, improving the accuracy and computational efficiency of fault node selection.

[0087] In some embodiments, the target fault information of the current round can be determined in the following manner.

[0088] Based on the type of the subtask to be executed corresponding to the target agent in the current round and the fault candidate pool, the target fault information of the current round is determined; wherein, the fault candidate pool includes multiple candidate faults and the fault probability of each candidate fault.

[0089] In some embodiments, all candidate faults are classified and stored in the fault candidate pool according to the subtask type. Different types of subtasks to be executed are matched with candidate faults of specific categories to avoid mismatch between fault types and inference subtasks.

[0090] The fault candidate pool includes multiple levels of task error types and the probability of occurrence of each fault type. Fault types include: single agent faults, such as tool invocation faults and inference faults; agent interaction faults, such as task flow faults and communication failures; and system-level faults, such as unreasonable multi-agent architectures and task decomposition or orchestration faults.

[0091] In some embodiments, the failure probability of a candidate failure represents the proportion of the frequency of such failures actually occurring in the corresponding subtask. The higher the failure probability, the more frequently the failure occurs in the actual multi-agent operation scenario.

[0092] In some embodiments, when filtering target fault information, candidate faults with higher fault probabilities are selected first, thereby improving the matching degree between the generated fault samples and the real fault distribution.

[0093] In some embodiments, the selection rules can be flexibly adjusted according to the sample generation requirements; if a single fault sample is required, the candidate fault with the highest probability is selected as the target fault information; if a compound fault needs to be simulated, multiple candidate faults of different types are selected and used in combination.

[0094] For example, if the subtask to be executed is logical operation reasoning, and the logical error type of fault has the highest probability in the fault candidate pool, then the logical error type of fault is identified as the target fault information for this round, and interference prompts are constructed based on the fault content and sent to the target intelligent agent.

[0095] In some embodiments, the fault candidate pool supports dynamic updates, which can supplement new fault types and adjust the fault probabilities corresponding to various faults based on fault attribution data generated from multiple historical iterations, thereby continuously optimizing the realism of fault simulation.

[0096] In this embodiment, candidate faults are matched from a pre-classified fault candidate pool based on the type of subtask to be executed by the target intelligent agent, and the optimal fault is selected based on the occurrence probability of each type of fault, thereby determining the target fault information used for interfering with inference in this round. The fault candidate pool stores faults in categories and can be dynamically updated, which can fit the real abnormal scenarios of different inference stages. In this way, the selected fault type is highly adapted to the subtask, and high-probability faults are given priority, making the distribution of generated fault data closer to the real operation situation and improving the authenticity of the attribution data.

[0097] In some embodiments, the multi-agent system includes a routing agent, and the above method further includes the following procedures.

[0098] Step S21: Obtain the splitting rules of the previous round routing agent that divides the target task into at least one first subtask, and the allocation rules that assign at least one first subtask to at least one reasoning agent that participated in the reasoning target task in the previous round. In some embodiments, the routing agent is used for global target task decomposition and subtask distribution. After each iteration, the task decomposition logic and agent binding relationship of this round are fully retained.

[0099] In some embodiments, the splitting rules include the number of subtasks, the execution order of each subtask, task boundaries and dependencies; the allocation rules record the unique inference agent identifier corresponding to each subtask.

[0100] Step S22: Construct a second prompt word based on the splitting and allocation rules; In some embodiments, a second prompt word is obtained by semantically fusing the historical splitting rules and allocation rules; the second prompt word is used to restrict the task processing logic of the routing agent in this round, so as to continue the task structure and division of labor of the previous round.

[0101] In some embodiments, the second prompt word is written in natural language and adapted to the inference input format of the routing agent's large model.

[0102] Step S23: Use the routing agent to process the target task and the second prompt word to obtain at least one second sub-task in the current round and assign the second sub-task to at least one reasoning agent in the current round.

[0103] In this context, at least one reasoning agent in the current round corresponds one-to-one with at least one reasoning agent in the previous round; and the second subtask in the current round corresponds one-to-one with the first subtask in the previous round.

[0104] In some embodiments, the routing agent reads the historical rules within the second prompt word, performs decomposition and allocation on the same target task, and ensures that the number of tasks, execution order, and division of labor of the agents are aligned.

[0105] For example, in the previous round, the routing agent broke down the task into three sub-tasks: requirement analysis, code writing, and result testing, and assigned them to agents A, B, and C. In this round, after being constrained by the second prompt word, the routing agent outputs a second sub-task with the exact same structure, and also breaks down the task into three sub-tasks: requirement analysis, code writing, and result testing, and assigns them to agents A, B, and C.

[0106] In some embodiments, the fixed correspondence between subtasks and agents can ensure that the fault location is uniform and controllable during multi-round progressive fault injection, and avoid the interference of task structure changes with the fault superposition effect.

[0107] In this embodiment, the scheduling logic for the current round of routing agents is constructed based on the task splitting and agent allocation rules of the previous round, constraining the routing agents with second prompt words, thus achieving a one-to-one correspondence between the tasks and inference agents of the preceding and following rounds. By unifying the task architecture and division of labor in multiple rounds of iteration, it ensures that each round of faults is accurately injected into the same inference stage, stably constructing complex fault samples with multi-level superposition and cascading propagation. In this way, the variable interference caused by dynamic task splitting is eliminated, improving the controllability and consistency of multi-round progressive fault simulation and enhancing the training effect of the attribution model.

[0108] In some embodiments, step S103 above further includes the following process.

[0109] Step S1031: Based on the agent identifier of the target agent and the target fault information, the first execution trajectory is labeled to obtain candidate attribution data; the candidate attribution data represents the candidate fault causes that occur when reasoning about the target task based on the first execution trajectory.

[0110] In some embodiments, a label is marked at the inference node position corresponding to the fault within the first execution trajectory. The label content includes the agent identifier of the target agent, the fault type, and the subtask information corresponding to the fault injection.

[0111] In some embodiments, candidate attribution data is stored in structured text or vector form, including full-link information such as fault source, fault-affected link, disturbed inference process, and faulty target agent, to facilitate subsequent model reading and training.

[0112] In some embodiments, the annotation process is performed only on the first execution trajectory that produces substantial semantic deviation. If the execution result of this round does not change the output semantics, no corresponding candidate attribution data is generated.

[0113] For example, if the fault content of the target intelligent agent B in this round is a parameter logic error, the reasoning node of the target intelligent agent B in the first execution trajectory is bound with a corresponding label, and candidate attribution data recording the cause of the fault is generated.

[0114] In some embodiments, the candidate attribution data simultaneously records the superposition relationship between front and rear wheel faults. For coupled faults formed by multi-wheel progressive injection, the sequential action order of multi-layer faults is fully preserved, and the fault cascading propagation link is restored.

[0115] Step S1032: Process the first execution trajectory based on the target model to obtain the prediction attribution data for the first execution trajectory; the prediction attribution data characterizes the predicted fault causes of the fault that occurs when reasoning about the target task based on the first execution trajectory.

[0116] In some embodiments, the target model is a pre-trained multi-agent fault attribution model that can automatically infer potential faulty agents and fault causes based on the input execution trajectory.

[0117] In some embodiments, the first execution trajectory is input into the target model, the model traverses all reasoning and interaction nodes within the trajectory, and outputs the fault location and fault type determined by the model as predictive attribution data.

[0118] In some embodiments, the predicted attribution data and the candidate attribution data are stored in a unified structured format, and the failure causes represented by the two are directly compared to see if there are substantial semantic differences.

[0119] For example, in the first execution trajectory, the candidate fault cause is manually marked as a logical error in the parameters of agent B. After the target model inferences, the output prediction attribution data also points to the logical abnormality of agent B, and the fault causes of the two are consistent.

[0120] Step S1033: When the candidate fault causes represented by the candidate attribution data and the predicted fault causes represented by the predicted attribution data are different, the candidate attribution data is determined as the target attribution data.

[0121] In some embodiments, a semantic similarity algorithm is used to compare the candidate fault causes with the predicted fault causes. When the semantic similarity between the two is lower than a preset threshold, it is determined that there is a substantial difference between the two types of fault causes.

[0122] In some embodiments, if the candidate fault cause is consistent with the predicted fault cause, then the predicted attribution data or the candidate attribution data can be retained as the target attribution data, depending on actual needs.

[0123] For example, if the root cause of the fault in the candidate attribution data is the parameter error of agent B, and the predicted attribution data output by the target model determines that the fault originates from the abnormal interaction of agent A, and there is a significant discrepancy between the two fault causes, then the candidate attribution data corresponding to the manually injected fault is directly used as the final target attribution data.

[0124] In this embodiment, objective and accurate candidate attribution data is generated by annotating the execution trajectory based on actual injected faults. Then, a trained attribution model is used to infer predicted attribution data. The semantic differences between the two attribution data are compared. If the predicted attribution data does not match the actual candidate attribution data, it indicates that the current fault characteristics are complex and difficult for existing models to automatically identify, belonging to high-value and high-difficulty samples. The candidate attribution data is then determined as the final target attribution data. In this way, complex coupled and cascading fault samples that the model cannot accurately trace to can be automatically filtered out, resulting in high-difficulty attribution data.

[0125] In some embodiments, during the first round of inference on the target task based on a multi-agent system, the above method further includes the following process.

[0126] Step S104: Obtain the reference execution result, reference execution trajectory, and at least one reference agent participating in the inference of the multi-agent system's inference target task; the reference execution result meets the preset requirements.

[0127] In some embodiments, the reference execution results and reference execution trajectories are standard data produced by the multi-agent system to ensure the normal operation of the target task without faults, and serve as benchmark comparison samples for fault determination and trajectory labeling.

[0128] In some embodiments, the preset requirements refer to complete output logic, accurate calculation conclusions, no abnormalities in the interaction process of each intelligent agent, and no reasoning deviations or interaction failures.

[0129] Step S105: Determine the target agent for the first round from at least one reference agent.

[0130] In some embodiments, an agent interaction topology graph is constructed based on a standard reference execution trajectory, the fault risk of each reference agent is calculated, and high-risk reference agents are selected as target agents for the first round of fault injection.

[0131] Step S106: Input the target fault information of the first round into the target intelligent agent of the first round, and control the multi-intelligent system to reason about the target task, and output the third execution result and the third execution trajectory of the first round.

[0132] In some embodiments, the first round of target fault information is selected from the fault candidate pool based on the standard sub-task type corresponding to the target agent, and the inference process of the agent is targeted and interfered with by fault prompt words.

[0133] Step S107: When the semantic content represented by the third execution result is different from the semantic content represented by the reference execution result, the third execution trajectory is labeled based on the agent identifier of the target agent in the first round and the target fault information in the first round to obtain the target attribution data in the first round.

[0134] In some embodiments, a semantic similarity algorithm is used to compare the third execution result with the reference execution result. If the similarity is lower than the threshold, the fault injection is deemed to be effective, and fault labels are bound to the third execution trajectory to generate the first round of attribution samples.

[0135] In some embodiments, if there is no significant difference in semantics between the two, it indicates that the fault did not have any abnormal impact, the third execution trajectory of this round is discarded, and no target attribution data is generated.

[0136] In this embodiment, the first round of inference uses the standard reference trajectory and reference results produced during normal operation as a benchmark. After the reference agent injects a fault, the output difference is compared, and the first round of labeled attribution data is generated only when the fault causes a substantial semantic deviation. Using a fault-free standard process as a reference, it can accurately identify whether the first round of faults is effective, generate real and reliable basic fault samples, and provide standardized initial trajectory data for subsequent multi-round progressive superposition and construction of complex coupled fault links.

[0137] The following describes an exemplary application of a task processing method provided in this application in a real-world scenario.

[0138] Existing attribution techniques for anomalies in multi-agent systems rely heavily on high-quality data. However, anomalies in multi-agent systems typically occur during long trajectories, multi-round interactions, and cross-agent collaborations, exhibiting characteristics such as covert propagation, gradual amplification, and separation of symptoms from root causes. Consequently, obtaining high-quality labeled data is challenging.

[0139] In related technology one, manual annotation based on real fault trajectories requires analyzing information such as responsible agents and key steps along the entire execution process, which is costly, inefficient, and lacks scalability, making it difficult to generate large-scale usable data. In related technology two, the abnormal samples constructed by automated error annotation generation are generally too simple and cannot cover the complex fault characteristics in real scenarios, such as multi-factor coupling, cascading amplification, and separation of symptoms from root causes. This leads to a deviation between the generated data and the real fault distribution, thus affecting the training, evaluation, and cross-system generalization effects of the attribution model. Therefore, there is an urgent need for an automated method for collecting, generating, and annotating abnormal attribution data for multi-agent systems.

[0140] Regarding the manual annotation scheme in the first related technology mentioned above, which involves manually annotating the responsible agent, key steps, error type, or root cause information from real failure trajectories, representative works include Who&When, the TRAIL dataset (TRAIL), the AgentFail dataset (AgentFail), and the Agent Error Benchmark (AgentErrorBench). This type of scheme is characterized by authentic data sources, fine-grained annotation, and high-quality labels, making it suitable as benchmark evaluation data. However, it suffers from high acquisition costs and difficulty in scaling up.

[0141] Regarding the automatic generation and labeling schemes in the second related technology mentioned above, which involve constructing abnormal trajectories on successful trajectories through error injection and simultaneously generating attribution labels, representative works include AEGIS, AgentTracer, CORRECT, and Graph-Guided Failure Tracer (GraphTracer). The advantage of this type of scheme is its ability to rapidly scale up data with low manual costs and to combine data construction with model training and evaluation; however, it is highly dependent on the consistency between the generated data and the actual fault distribution.

[0142] Methods with high attribution accuracy in related technologies one and two, such as AgenTracer and GraphTracer, are based on the core idea of ​​data-driven attribution and require large-scale data support. However, they still have technical problems: 1. Low data quality; manual annotation is costly, inefficient, and has poor scalability; automatically injected errors are generally simple and differ from the characteristics of real faults, such as hidden, gradual propagation, and separation of symptoms and root causes. The data authenticity, generalization, and cross-system transferability are insufficient. 2. Difficulty in handling real complex faults; most related technologies still tend to focus on "single point, single cause, single effect" localization, but real multi-agent faults are often multi-cause coupling, cross-step propagation, and cross-agent amplification, and symptoms and root causes are often separated.

[0143] To address the aforementioned issues, this application provides an automatic generation and annotation method for anomaly attribution data in multi-agent systems. This method incorporates four models during error injection: an interaction topology graph, a fault candidate pool, multi-point injection, and adversarial data collection. Compared to existing automatic error annotation methods, the data generated by this approach is no longer limited to simple, isolated single-point faults. Data annotation is also no longer limited to faulty steps and faulty agents, but further covers attribution information such as key fault steps, error types, and propagation relationships. This allows for a more effective characterization of complex anomaly features such as multi-factor coupling, cascading amplification, and anomaly propagation chains. The resulting data is not only of higher quality but also more consistent with the fault types and distribution patterns in real-world scenarios. This constructs an attribution dataset that more closely reflects the anomaly evolution process of real multi-agent systems, improving the effectiveness of subsequent attribution model training, evaluation, and generalization.

[0144] Figure 2 The first schematic diagram of an attribution data annotation method provided in this application includes a first preprocessing stage 201 and a first data generation and annotation stage 202. The first preprocessing stage 201 includes: collecting successful trajectories, trajectory organization, and large model fault injection prompts. The first data generation and annotation stage 202 includes: selecting a target agent for fault injection, performing random single-point injection on the target agent, performing multi-agent system inference replay after fault injection, automatically annotating erroneous steps and the target agent if inference fails, and outputting a dataset; the dataset includes execution trajectories and error labels; if inference succeeds, reselecting a target agent for fault injection.

[0145] The following limitations exist in this scheme: 1. The injection rules are random, and the fault samples are simple; 2. It is biased towards single-point, single-cause, and single-effect faults; 3. The annotation only includes the faulty steps and faulty agents; 4. It is difficult to characterize the abnormal propagation chain.

[0146] Figure 3 This is a second schematic diagram of an attribution data annotation method provided in an embodiment of this application, including a second preprocessing stage 301, a second data generation and annotation stage 302, and an adversarial difficult example screening stage 303. The second preprocessing stage 301 is used to obtain the original successful trajectories of the multi-agent system, extract the agent interaction topology graph, and pre-construct a fault candidate pool; the second data generation and annotation stage 302 is used to complete target agent selection, error injection, and execution replay based on the interaction topology graph and the pre-constructed fault candidate pool; the adversarial difficult example screening stage 303 is used to screen the labeled data to obtain high-difficulty samples.

[0147] The second preprocessing stage 301 includes the following process.

[0148] Step 1: Obtain the original success trajectory and extract the interaction topology graph.

[0149] Obtain the original successful execution trajectory of the multi-agent system on the target task (the execution trajectory in which the execution result of the multi-agent system on the target task is the same as the calibration result). The original successful trajectory includes at least: the multiple agents participating in the task execution, the communication records between the agents, the tool call collaboration records, and the task execution order information.

[0150] Interaction topology graphs are used to structurally model the collaborative relationships in multi-agent systems. Nodes represent individual agents, and edges represent interactions between agents. These interactions characterize relationships such as message passing, task distribution, result feedback, tool invocation, and state influence.

[0151] In some embodiments, multiple agents participating in task execution are first extracted from the original successful trajectory. Then, based on the communication records, calling relationships, and collaboration order in the trajectory, directed interaction edges are established between the agents, thereby forming an agent-level interaction topology graph. This topology graph is used to depict the main pathways and key collaboration links that anomalies may propagate.

[0152] Step 2: Pre-build a fault candidate pool.

[0153] The fault candidate pool is used to provide candidate error types and their distribution constraints (the frequency of occurrence of each candidate fault) for fault injection. The fault candidate pool can be constructed from sources such as real failure cases, historical attribution results, existing benchmark data, and manually summarized high-frequency anomaly patterns (referring to the frequency of occurrence of each candidate fault).

[0154] The fault candidate pool includes multiple levels of fault types and the probability of occurrence for each fault type; among them, fault types include: single agent faults: such as tool call failure, inference error; agent interaction faults: such as task flow error, communication failure; system-level faults: unreasonable multi-agent architecture, task decomposition / orchestration error.

[0155] Each candidate fault item corresponds to at least one injectable anomaly pattern and can be associated with the applicable agent role, applicable task stage, common triggering conditions, and historical frequency of occurrence.

[0156] Furthermore, candidate faults can be weighted based on the actual fault distribution, so that high-frequency real errors have a higher probability of being selected, while retaining low-frequency complex errors, thus balancing realism and coverage.

[0157] The second data generation and annotation stage 302 includes the following process.

[0158] Step 1: Select the target intelligent agent and the fault to be injected.

[0159] Prioritizing the agents' connectivity, centrality, and cross-role bridging roles within the topology, the target agent with the greatest impact on the overall task outcome is selected as the fault application target. This ensures that the injected faults more closely resemble the propagation patterns in real-world multi-agent collaboration.

[0160] During actual injection, the error type that matches the target agent's role attributes, collaborative position, and context state is selected from the fault candidate pool, rather than generating perturbations arbitrarily.

[0161] Step 2: Multi-point injection and replay verification.

[0162] Multi-point injection is used to construct multi-cause, multi-effect faults, but instead of injecting multiple faults at once, it uses a multi-round injection mechanism: only one fault is injected in each round, and after the round is executed, it is determined whether the fault has a fatal impact on the final result; if so, the next round is entered based on the updated trajectory, and the next fault is injected.

[0163] In some embodiments, a target agent is first selected based on the interaction topology graph, and a single-point fault injection is performed in the current round using a fault candidate pool. Subsequently, the injected trajectory is replayed, and the impact of the injection on whether it causes an irreversible deviation from the task outcome or significantly alters the collaborative behavior of subsequent agents is evaluated. If the fault does not have a sufficient impact, the injection is discarded or a new fault type is selected; if the fault is determined to have a fatal impact, it is retained, and the updated abnormal trajectory is used as input for the next round of injection.

[0164] Specifically, the target agent is determined from at least one reasoning agent that participated in the reasoning target task in the previous round based on the trajectory and topology graph; the fault information for the target agent is determined based on the type of reasoning task executed by the target agent in the previous round and the candidate pool; after the target task reasoning is completed, the trajectory and execution result of the current round are output; the execution result is compared with the execution result of the previous round, and if they are inconsistent, it indicates that the fault injection is effective.

[0165] By repeating the above process multiple times, multiple interconnected critical faults can be gradually superimposed on the same trajectory, forming complex anomaly samples with causal cumulative and propagation effects. Since only faults that have a substantial impact on the result are retained in each round, the final multi-point sample is not a simple superposition of several weak perturbations, but a high-value anomaly trajectory formed by the combined effect of multiple critical faults.

[0166] Step 3: Automatically record the injected truth value and generate annotations.

[0167] The truth value should include at least the following: target agent identifier, injection round, injection error type, trajectory status before and after injection (referring to the trajectory of the current round), fatal impact determination result (whether the injection failure affects the result), and failure propagation correlation.

[0168] Based on the injected truth values, corresponding anomaly attribution annotation information is automatically generated. The annotation information includes at least the responsible agent, key failure steps, failure type, and failure propagation chain.

[0169] By automatically recording and generating annotations, abnormal samples with attribution labels can be formed without relying on manual analysis of each original trajectory.

[0170] The adversarial difficult example screening stage 303 is used to collect adversarial data, including automatically screening high-difficulty samples from the generated candidate abnormal trajectories. Its core mechanism is to use an existing large model with strong source closure capability as a discriminator to perform attribution judgment on the abnormal trajectory after fault injection, and to evaluate the sample difficulty based on the consistency between the judgment result and the injected ground truth.

[0171] In some embodiments, the fault trajectory generated in the aforementioned steps is input into a closed-source large model, which outputs the responsible agent, key fault steps, propagation path, or attribution explanation. This output is compared with known injected records. If the large model can stably and accurately complete the attribution, the sample is considered low-difficulty and its retention priority can be reduced. If the large model misjudges, misses cases, only identifies surface symptoms without locating the source, or shows significant inconsistency in attribution explanation, the sample is identified as high-difficulty data and retained with priority.

[0172] Furthermore, these challenging samples can be used in reverse to update the data distribution, for example, to increase the injection probability under certain complex topologies, specific error combinations, or specific role relationships, so as to continuously generate data that can better expose the shortcomings of existing models.

[0173] It should be noted that, in the embodiments of this application, if the above methods are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, or the parts that contribute to related technologies, can be embodied in the form of software products. These software products are stored in a storage medium and include several instructions to cause an electronic device (which may be a personal computer, server, or network device, etc.) to execute all or part of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), magnetic disks, or optical disks. Thus, the embodiments of this application are not limited to any specific hardware, software, or firmware, or any combination of hardware, software, and firmware.

[0174] This application provides an electronic device, including a memory and a processor. The memory stores a computer program that can run on the processor. When the processor executes the program, it implements some or all of the steps in the above-described method.

[0175] This application provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements some or all of the steps in the above-described method. The computer-readable storage medium can be transient or non-transient.

[0176] This application provides a computer program including computer-readable code. When the computer-readable code runs in an electronic device, the processor in the electronic device executes some or all of the steps in the above-described method.

[0177] This application provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program. When the computer program is read and executed by a computer, it implements some or all of the steps in the above-described method. This computer program product can be implemented specifically through hardware, software, or a combination thereof. In some embodiments, the computer program product is specifically embodied as a computer storage medium; in other embodiments, the computer program product is specifically embodied as a software product, such as a software development kit (SDK), etc.

[0178] It should be noted that the descriptions of the various embodiments above tend to emphasize the differences between them, while their similarities or commonalities can be referred to interchangeably. The descriptions of the above embodiments of the device, storage medium, computer program, and computer program product are similar to the descriptions of the above method embodiments and have similar beneficial effects. For technical details not disclosed in the embodiments of the device, storage medium, computer program, and computer program product of this application, please refer to the descriptions of the method embodiments of this application for understanding.

[0179] Figure 4 This is a schematic diagram of the composition structure of a task processing device provided in an embodiment of this application, as shown below. Figure 4 As shown, the task processing device 400 includes: a determination module 401, a reasoning module 402, and an annotation module 403; wherein, the determination module 401 is used to determine the target agent of the current round from at least one reasoning agent that participated in the reasoning of the target task in the previous round in the current round of performing preset multi-round iterative reasoning on the target task based on a multi-agent system; the reasoning module 402 is used to input the target fault information of the current round to the target agent of the current round, and control the multi-agent system to reason on the target task, and output the first execution result and the first execution trajectory of the current round; the first execution trajectory includes the reasoning process of the multi-agent system in reasoning on the target task in the current round; the annotation module 403 is used to annotate the first execution trajectory based on the agent identifier of the target agent of the current round and the target fault information of the current round when the semantic content represented by the first execution result is different from the semantic content represented by the second execution result of the previous round, to obtain the target attribution data of the current round; wherein, the second execution result is obtained by inputting the target fault information of the previous round to the target agent of the previous round and controlling the multi-agent system to reason on the target task.

[0180] In some embodiments, the target fault information of the current round includes a fault task identifier and fault content; the reasoning module 402 is further configured to determine the sub-task to be executed corresponding to the target agent in the current round based on the fault task identifier; the sub-task to be executed is a sub-task assigned to the target agent from at least one first sub-task; the at least one first sub-task was obtained after the target task was divided in the previous round; in response to the reasoning event of the target agent in the current round for the sub-task to be executed, the first prompt word constructed based on the fault content is input to the target agent in the current round.

[0181] In some embodiments, the determining module 401 is further configured to construct a topology graph corresponding to the second execution trajectory based on the second execution trajectory of the previous round; the topology graph represents the interaction behavior between at least one reasoning agent participating in the reasoning target task and the reasoning behavior of each reasoning agent; and determine the target agent of the current round based on the second execution trajectory and the topology graph corresponding to the second execution trajectory.

[0182] In some embodiments, the topology graph corresponding to the second execution trajectory includes at least one node, and some nodes in the at least one node are connected by at least one directed edge; wherein, a node in the topology graph corresponds to a reasoning agent that participated in the reasoning target task in the previous round and the reasoning task of the corresponding reasoning agent; the directed edge represents the interaction information between the reasoning agents corresponding to the two connected nodes respectively.

[0183] In some embodiments, the determining module 401 is further configured to determine the target fault information of the current round based on the type of the subtask to be executed corresponding to the target agent of the current round and the fault candidate pool; wherein the fault candidate pool includes multiple candidate faults and the fault probability of each candidate fault.

[0184] In some embodiments, the multi-agent system includes a routing agent. The determining module 401 is further configured to obtain the splitting rules by which the routing agent in the previous round divided the target task into at least one first sub-task, and the allocation rules for assigning at least one first sub-task to at least one reasoning agent in the previous round that participated in reasoning the target task; construct a second prompt word based on the splitting rules and the allocation rules; process the target task and the second prompt word using the routing agent to obtain at least one second sub-task in the current round and assign the second sub-task to at least one reasoning agent in the current round; wherein, at least one reasoning agent in the current round corresponds one-to-one with at least one reasoning agent in the previous round; and the second sub-task in the current round corresponds one-to-one with the first sub-task in the previous round.

[0185] In some embodiments, the annotation module 403 is further configured to annotate the first execution trajectory based on the agent identifier of the target agent and the target fault information to obtain candidate attribution data; the candidate attribution data represents the candidate fault causes that occur when reasoning about the target task based on the first execution trajectory; the first execution trajectory is processed based on the target model to obtain predicted attribution data for the first execution trajectory; the predicted attribution data represents the predicted fault causes that occur when reasoning about the target task based on the first execution trajectory; and if the candidate fault causes represented by the candidate attribution data and the predicted fault causes represented by the predicted attribution data are different, the candidate attribution data is determined as the target attribution data.

[0186] In some embodiments, during the first round of reasoning for the target task based on a multi-agent system, the annotation module 403 is further configured to obtain the reference execution result, reference execution trajectory, and at least one reference agent participating in the reasoning of the target task by the multi-agent system; the reference execution result meets preset requirements; the target agent for the first round is determined from at least one reference agent; the target fault information for the first round is input to the target agent for the first round, and the multi-agent system is controlled to reason for the target task, outputting the third execution result and the third execution trajectory for the first round; if the semantic content represented by the third execution result is different from the semantic content represented by the reference execution result, the third execution trajectory is annotated based on the agent identifier of the target agent for the first round and the target fault information for the first round to obtain the target attribution data for the first round.

[0187] The descriptions of the apparatus embodiments above are similar to those of the method embodiments above, and have similar beneficial effects. In some embodiments, the functions or modules included in the apparatus provided in this application can be used to perform the methods described in the method embodiments above. For technical details not disclosed in the apparatus embodiments of this application, please refer to the descriptions of the method embodiments of this application for understanding.

[0188] Figure 5 This is a hardware entity diagram of an electronic device provided in an embodiment of this application, such as... Figure 5 As shown, the hardware entity of the electronic device 500 includes: a processor 501 and a memory 502, wherein the memory 502 stores a computer program that can run on the processor 501, and the processor 501 executes the program to implement the steps in the method of any of the above embodiments.

[0189] The memory 502 stores computer programs that can run on the processor. The memory 502 is configured to store instructions and applications that can be executed by the processor 501. It can also cache data to be processed or already processed (e.g., image data, audio data, voice communication data and video communication data) in the processor 501 and various modules in the electronic device 500. It can be implemented by flash memory or random access memory (RAM).

[0190] The processor 501 executes the steps of any of the methods described above when executing the program. The processor 501 typically controls the overall operation of the electronic device 500.

[0191] This application provides a computer storage medium that stores one or more programs, which can be executed by one or more processors to implement the steps of the methods described in any of the above embodiments.

[0192] It should be noted that the descriptions of the storage medium and device embodiments above are similar to the descriptions of the method embodiments above, and have similar beneficial effects. For technical details not disclosed in the storage medium and device embodiments of this application, please refer to the descriptions of the method embodiments of this application for understanding.

[0193] The aforementioned processor can be at least one of the following: Application Specific Integrated Circuit (ASIC), Digital Signal Processor (DSP), Digital Signal Processing Device (DSPD), Programmable Logic Device (PLD), Field Programmable Gate Array (FPGA), Central Processing Unit (CPU), Controller, Microcontroller, and Microprocessor. It is understood that other electronic devices can also implement the functions of the aforementioned processor, and this application does not specifically limit the specific implementation.

[0194] The aforementioned computer storage media / memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), magnetic random access memory (FRAM), flash memory, magnetic surface memory, optical disc, or compact disc read-only memory (CD-ROM), etc.; or it can be various terminals that include one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.

[0195] It should be understood that the phrase "an embodiment" or "one embodiment" throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of this application. Therefore, "in one embodiment" or "one embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. It should be understood that in the various embodiments of this application, the sequence numbers of the above steps / processes do not imply a sequential order of execution; the execution order of each step / process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application. The sequence numbers of the above embodiments of this application are merely descriptive and do not represent the superiority or inferiority of the embodiments.

[0196] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0197] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or units can be electrical, mechanical, or other forms.

[0198] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units. They may be located in one place or distributed across multiple network units. Some or all of the units may be selected to achieve the purpose of this embodiment according to actual needs.

[0199] Furthermore, in the various embodiments of this application, all functional units can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in a combination of hardware and software functional units. Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, read-only memory (ROM), magnetic disks, or optical disks.

[0200] Alternatively, if the integrated units described above are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence or the part that contributes to related technologies, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause an electronic device (which may be a personal computer, server, or network device, etc.) to execute all or part of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROMs, magnetic disks, or optical disks.

[0201] The above are merely embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.

Claims

1. A task processing method, comprising: In the current round of multi-round iterative reasoning of the target task based on a multi-agent system, the target agent for the current round is determined from at least one reasoning agent that participated in the reasoning of the target task in the previous round. The target fault information of the current round is input to the target agent of the current round, and the multi-agent system is controlled to reason about the target task, and the first execution result and the first execution trajectory of the current round are output; the first execution trajectory includes the reasoning process of the multi-agent system in reasoning about the target task in the current round; When the semantic content represented by the first execution result is different from the semantic content represented by the second execution result of the previous round, the first execution trajectory is marked based on the agent identifier of the target agent in the current round and the target fault information in the current round to obtain the target attribution data of the current round. The second execution result is obtained by inputting the target fault information of the previous round into the target agent of the previous round and controlling the multi-agent system to reason about the target task.

2. The method according to claim 1, wherein the target fault information of the current round includes a fault task identifier and fault content; The step of inputting the target fault information of the current round to the target agent of the current round includes: Based on the fault task identifier, the subtask to be executed corresponding to the target agent in the current round is determined; the subtask to be executed is a subtask assigned to the target agent from at least one first subtask; the at least one first subtask was obtained after the target task was divided in the previous round; In response to the reasoning event of the target agent in the current round for the sub-task to be executed, the first prompt word constructed based on the fault content is input to the target agent in the current round.

3. The method according to claim 2, wherein determining the target agent for the current round from at least one reasoning agent that participated in the reasoning target task in the previous round comprises: Construct a topology graph corresponding to the second execution trajectory based on the second execution trajectory of the previous round; The topology graph represents the interaction behavior between at least one reasoning agent participating in the reasoning target task, as well as the reasoning behavior of each reasoning agent. Based on the second execution trajectory and the topology graph corresponding to the second execution trajectory, the target agent for the current round is determined.

4. The method according to claim 3, wherein the topology graph corresponding to the second execution trajectory includes at least one node, and some nodes in the at least one node are connected by at least one directed edge; wherein, In the topology graph, a node corresponds to a reasoning agent that participated in the reasoning target task in the previous round and the reasoning task of the corresponding reasoning agent; the directed edge represents the interaction information between the reasoning agents corresponding to the two connected nodes.

5. The method according to claim 2, further comprising: Based on the type of the subtask to be executed corresponding to the target agent in the current round and the fault candidate pool, determine the target fault information in the current round; The fault candidate pool includes multiple candidate faults and the fault probability of each candidate fault.

6. The method according to claim 2, wherein the multi-agent system includes a routing agent, and the method further includes: Obtain the splitting rules for the routing agent in the previous round to divide the target task into at least one first subtask, and the allocation rules for assigning at least one first subtask to at least one reasoning agent that participated in the reasoning of the target task in the previous round; A second prompt word is constructed based on the splitting rules and the allocation rules; The routing agent processes the target task and the second prompt word to obtain at least one second subtask for the current round and assign the second subtask to at least one reasoning agent for the current round; In this context, at least one reasoning agent in the current round corresponds one-to-one with at least one reasoning agent in the previous round; and the second subtask in the current round corresponds one-to-one with the first subtask in the previous round.

7. The method according to any one of claims 1 to 6, wherein the step of annotating the first execution trajectory based on the agent identifier of the target agent in the current round and the target fault information in the current round to obtain the target attribution data for the current round includes: The first execution trajectory is labeled based on the agent identifier of the target agent and the target fault information to obtain candidate attribution data; The candidate attribution data characterizes the candidate fault causes that occur when reasoning about the target task based on the first execution trajectory. The first execution trajectory is processed based on the target model to obtain predictive attribution data for the first execution trajectory; the predictive attribution data characterizes the predicted causes of failures that occur when reasoning about the target task based on the first execution trajectory. If the candidate fault causes represented by the candidate attribution data are different from the predicted fault causes represented by the predicted attribution data, the candidate attribution data is determined as the target attribution data.

8. The method according to any one of claims 1 to 6, wherein during the first round of inference on the target task based on the multi-agent system, the method further comprises: Obtain the reference execution result, reference execution trajectory, and at least one reference agent participating in the inference of the target task by the multi-agent system; The reference execution result meets the preset requirements; The target agent for the first round is determined from the at least one reference agent; The first round of target fault information is input into the first round of target intelligent agent, and the multi-agent system is controlled to reason about the target task, and output the third execution result and third execution trajectory of the first round; When the semantic content represented by the third execution result is different from the semantic content represented by the reference execution result, the third execution trajectory is labeled based on the agent identifier of the target agent in the first round and the target fault information in the first round to obtain the target attribution data of the first round.

9. A task processing apparatus, comprising: The determination module is used to determine the target agent in the current round from at least one reasoning agent that participated in the reasoning of the target task in the previous round during the current round of performing preset multi-round iterative reasoning on the target task based on a multi-agent system. The inference module is used to input the target fault information of the current round to the target agent of the current round, and control the multi-agent system to infer the target task, and output the first execution result and the first execution trajectory of the current round; the first execution trajectory includes the inference process of the multi-agent system in inferring the target task in the current round; The annotation module is used to annotate the first execution trajectory based on the agent identifier of the target agent in the current round and the target fault information in the current round when the semantic content represented by the first execution result is different from the semantic content represented by the second execution result in the previous round, so as to obtain the target attribution data of the current round; wherein, the second execution result is obtained by inputting the target fault information of the previous round into the target agent in the previous round and controlling the multi-agent system to reason about the target task.

10. An electronic device comprising a memory and a processor, the memory storing a computer program executable on the processor, characterized in that, When the processor executes the program, it performs the following steps: In the current round of a multi-agent system performing preset multi-round iterative reasoning on a target task, the target agent for the current round is determined from at least one reasoning agent that participated in the reasoning of the target task in the previous round. The target fault information of the current round is input to the target agent of the current round, and the multi-agent system is controlled to reason about the target task, and the first execution result and the first execution trajectory of the current round are output; the first execution trajectory includes the reasoning process of the multi-agent system in reasoning about the target task in the current round; When the semantic content represented by the first execution result is different from the semantic content represented by the second execution result of the previous round, the first execution trajectory is marked based on the agent identifier of the target agent in the current round and the target fault information in the current round to obtain the target attribution data of the current round; wherein, the second execution result is obtained by inputting the target fault information of the previous round into the target agent of the previous round and controlling the multi-agent system to reason about the target task.