CN-121636241-B - State management and exception backtracking method and system for multi-agent cooperative task
Abstract
The invention provides a state management and anomaly backtracking method and system of multi-agent cooperative tasks, which relate to the technical field of artificial intelligence and comprise the steps of constructing an initial task knowledge graph based on an ontology model by acquiring interaction data, state data and an execution log, and establishing a bidirectional causal chain by using a Bayesian network to form a dynamic knowledge graph, analyzing a state migration rule when an abnormality is detected, identifying propagation nodes, constructing an abnormal propagation subgraph, generating an influence chain, determining a recovery priority and triggering state rollback. The method can quickly trace back the abnormal source, effectively control the abnormal diffusion and improve the robustness of the system and the task recovery efficiency.
Inventors
- ZHAO LEIZHEN
- SUN SHUMENG
- Jia Songrui
Assignees
- 北京亦庄智能城市研究院集团有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20260203
Claims (9)
- 1. The state management and anomaly backtracking method of the multi-agent cooperative task is characterized by comprising the following steps: acquiring interaction data, state data and task execution logs generated by a plurality of agents in the process of executing collaborative tasks; Carrying out semantic analysis on the interaction data, the state data and the task execution log based on a predefined ontology model, and constructing an initial task knowledge graph; Establishing a bidirectional causal link for each relation edge in the initial task knowledge graph based on a Bayesian network algorithm, and taking a historical behavior sequence and task dependency depth of an agent as the state transition probability of an input calculation edge to form a dynamic knowledge graph; when detecting that the intelligent agents are abnormal in execution, constructing a historical state sequence, analyzing a state transition rule among the intelligent agents based on the historical state sequence, and identifying a propagation node of an abnormal state; Determining the scope of the influence of the abnormality according to the position information of the propagation node and the task association information, and constructing a local subgraph reflecting the abnormal propagation trend, wherein the method comprises the following steps: Analyzing state transition tracks of the intelligent entities in the historical state sequence at adjacent moments, counting transition frequencies of each state transition in the state transition tracks, marking transition directions of each state transition, and mapping the transition frequencies and the transition directions into state transition rules among the intelligent entities; according to the state transition rule, tracing back a propagation path of an abnormal state along a reverse chain in the dynamic knowledge graph, acquiring state transition probability of each precursor node on the propagation path, and fusing the state transition probability and the transition frequency to quantify contribution degree weight of each precursor node; judging the size relation between the contribution degree weight of each precursor node and the dynamic threshold value, screening precursor nodes with the contribution degree weight exceeding the dynamic threshold value, marking the precursor nodes as propagation nodes, and recording the topological position information of the propagation nodes in the dynamic knowledge graph; Inquiring task entities associated with the propagation nodes in the dynamic knowledge graph, acquiring task associated information of the task entities, defining a sweep range of abnormal influence according to the topological position information and the task associated information, extracting entity nodes and relationship edges in the sweep range by taking the propagation nodes as central nodes, and organizing the entity nodes and the relationship edges into local subgraphs reflecting abnormal propagation trends; Analyzing an abnormal propagation influence range based on the local subgraph, generating an abnormal influence chain, and determining a task recovery priority sequence according to the propagation depth in the abnormal influence chain; and triggering state rollback operation of the intelligent agent step by step according to the sequence of the task recovery priority sequence, updating the state rollback result of each stage into the dynamic knowledge graph, and recalculating task state transition probability after all rollback operations are completed.
- 2. The method of claim 1, wherein semantically parsing the interaction data, the state data, and the task execution log based on a predefined ontology model, constructing an initial task knowledge graph comprises: Extracting entity type definition and attribute constraint rules from a predefined ontology model, carrying out multi-source data fusion on the interaction data, the state data and the task execution log based on the entity type definition, identifying an intelligent entity, a task entity and a resource entity, carrying out semantic consistency verification on the identified entity according to the attribute constraint rules, and labeling the entity passing the verification with a unique identifier; According to the relation mode definition in the predefined ontology model, analyzing the state dependency relationship between the collaboration mode in the interaction data and the state data, and establishing an initial relation edge among the intelligent entity, the task entity and the resource entity; Extracting an event sequence and a state conversion record from the task execution log, performing association analysis on timestamp information in the event sequence and triggering conditions in the state conversion record, identifying an event pair with causal transfer characteristics, and assigning time sequence weight and causal strength identification to the initial relationship side based on the event pair; and taking the intelligent entity, the task entity and the resource entity marked with the unique identifier as entity nodes, connecting the initial relation edges endowed with the time sequence weight and the causal strength identifier with the corresponding entity nodes, and constructing an initial task knowledge graph.
- 3. The method of claim 1, wherein establishing a bi-directional causal link for each relationship edge in the initial task knowledge graph based on a bayesian network algorithm, calculating a state transition probability for an edge using a historical behavior sequence and task dependency depth of an agent as inputs, and forming a dynamic knowledge graph comprises: Extracting a dependency relationship between task entities and a historical behavior sequence of an agent entity from the initial task knowledge graph, establishing a forward chain for each relationship side based on the directionality of the dependency relationship, and establishing a reverse chain for each relationship side based on a state change propagation mode in the historical behavior sequence to form a bidirectional causal chain structure; Calculating the dependency depth of each task entity in the initial task knowledge graph in the forward chain, taking the dependency depth as a task complexity characteristic, and simultaneously counting the state conversion frequency of the intelligent entity in the historical behavior sequence on the reverse chain; Constructing the dependence depth and the state transition frequency as a condition variable pair, calculating the conditional probability of the state transition of the subsequent node under the condition of the given dependence depth of the precursor node based on a Bayesian network algorithm, and taking the conditional probability as the state transition probability of the corresponding relation edge in the bidirectional causal link structure; And marking the state transition probabilities to corresponding relation edges in the forward chain and the reverse chain respectively to form a dynamic knowledge graph.
- 4. A method according to claim 3, wherein establishing a forward chain for each relationship edge based on the directionality of the dependency, establishing a reverse chain for each relationship edge based on state change propagation modes in the historical behavior sequence, forming a bi-directional causal chain structure comprises: Analyzing the dependency relationship among task entities in an initial task knowledge graph, extracting directional characteristics of the dependency relationship, determining the execution sequence among the task entities according to the directional characteristics, establishing a forward chain for each relationship side along the execution sequence, and labeling a dependency level identifier for each relationship side in the forward chain; extracting state records of the intelligent entity at different moments from the historical behavior sequence, calculating state change amounts of the intelligent entity at adjacent moments, and identifying state transition events of which the state change amounts exceed a preset change threshold; Analyzing the propagation paths of the corresponding relation sides of the state transition event in the initial task knowledge graph, establishing a reverse link for each relation side based on the reverse tracing direction of the propagation paths, and marking the propagation delay identification for each relation side in the reverse link according to the triggering time sequence of the state transition event; And correlating the forward chain marked with the dependence level identification and the reverse chain marked with the propagation delay identification to the same relation edge in the initial task knowledge graph to form a bidirectional causal link structure.
- 5. The method of claim 1, wherein analyzing an anomaly propagation impact range based on the local subgraph, generating an anomaly impact chain, determining a task restoration priority sequence from a propagation depth in the anomaly impact chain comprises: Analyzing a relation edge in the local subgraph, describing a diffusion track of an abnormal state from a propagation node to a subsequent node along the propagation direction of the relation edge, forming a physical node time sequence chain through which the diffusion track passes, calculating a propagation level from the propagation node to each subsequent node in the diffusion track, and constructing an abnormal influence topological structure based on the physical node time sequence chain and the propagation level; Mapping attribute information of an agent entity and a task entity associated with each entity node in the abnormal influence topological structure, fusing the associated characteristics of the attribute information and the propagation levels, setting corresponding recovery priorities for entity nodes of different propagation levels, and recombining the entity nodes in the abnormal influence topological structure according to the quantization indexes of the recovery priorities to generate a multi-level task recovery sequence.
- 6. The method of claim 5, wherein mapping attribute information of an agent entity and a task entity associated with each entity node in the anomaly-affected topology, fusing associated features of the attribute information and the propagation levels, and setting corresponding recovery priorities for entity nodes of different propagation levels comprises: acquiring each entity node in the abnormal influence topological structure, and mapping attribute information of a corresponding entity and task entity based on the association relation of the entity node; And carrying out feature fusion on the attribute information and the propagation levels of the entity nodes to form a node level association matrix, describing the influence degree of the nodes of different levels based on the node level association matrix, and setting recovery priority for the entity nodes of different propagation levels according to the influence degree.
- 7. A multi-agent collaborative task state management and anomaly backtracking system for implementing the method of any one of the preceding claims 1-6, comprising: the first unit is used for acquiring interaction data, state data and task execution logs generated by a plurality of intelligent agents in the process of executing collaborative tasks; Carrying out semantic analysis on the interaction data, the state data and the task execution log based on a predefined ontology model, and constructing an initial task knowledge graph; The second unit is used for establishing a bidirectional causal link for each relation edge in the initial task knowledge graph based on a Bayesian network algorithm, and taking the historical behavior sequence and task dependency depth of the intelligent agent as the state transition probability of the input calculation edge to form a dynamic knowledge graph; A third unit, configured to construct a historical state sequence when detecting that an agent is abnormal, analyze a state transition rule between agents based on the historical state sequence, and identify a propagation node of an abnormal state; Determining the scope of the abnormal influence according to the position information of the propagation node and the task association information, and constructing a local subgraph reflecting the abnormal propagation trend; a fourth unit, configured to analyze an abnormal propagation influence range based on the local subgraph, generate an abnormal influence chain, and determine a task recovery priority sequence according to a propagation depth in the abnormal influence chain; and triggering state rollback operation of the intelligent agent step by step according to the sequence of the task recovery priority sequence, updating the state rollback result of each stage into the dynamic knowledge graph, and recalculating task state transition probability after all rollback operations are completed.
- 8. An electronic device, comprising: A processor; A memory for storing processor-executable instructions; Wherein the processor is configured to invoke the instructions stored in the memory to perform the method of any of claims 1 to 6.
- 9. A computer readable storage medium having stored thereon computer program instructions, which when executed by a processor, implement the method of any of claims 1 to 6.
Description
State management and exception backtracking method and system for multi-agent cooperative task Technical Field The invention relates to an artificial intelligence technology, in particular to a state management and anomaly backtracking method and system for multi-agent cooperative tasks. Background With the rapid development of artificial intelligence technology, multi-agent systems are widely used in the fields of industrial manufacturing, intelligent transportation, unmanned aerial vehicle clustering, distributed computing and the like. The multi-agent collaborative task system refers to a system in which a plurality of agents jointly complete complex tasks through information interaction and behavior coordination. In such systems, each agent possesses a certain autonomous decision-making capability and interacts with other agents according to a preset protocol or rule. As task complexity increases and the number of agents increases, the synergistic relationship between agents becomes more complex, and management of system states and exception handling become particularly important. State management of multi-agent systems relies primarily on centralized monitoring systems or distributed state sharing mechanisms. In the process of executing the collaborative tasks, the intelligent agent continuously generates interaction data, state update and task execution records, and the information together form the running state of the system. When an anomaly occurs in a certain agent in the system, how to quickly locate the anomaly source, evaluate the influence range and effectively restore the system becomes a key challenge in multi-agent cooperative task. The prior art lacks deep semantic understanding capability for multi-agent interaction data and state information, and is difficult to construct a complete knowledge structure reflecting the agent cooperative relationship. Most systems only stay at the data collection and simple analysis level, and cannot accurately model complex agent cooperative behaviors, so that dependency relationships and influence mechanisms among agents are difficult to understand when facing complex task scenes. Disclosure of Invention The embodiment of the invention provides a state management and anomaly backtracking method and system for multi-agent cooperative tasks, which can solve the problems in the prior art. In a first aspect of the embodiments of the present invention, a method for state management and exception backtracking of a multi-agent collaborative task is provided, including: the method comprises the steps of acquiring interaction data, state data and task execution logs generated by a plurality of agents in the process of executing collaborative tasks, carrying out semantic analysis on the interaction data, the state data and the task execution logs based on a predefined ontology model, and constructing an initial task knowledge graph; Establishing a bidirectional causal link for each relation edge in the initial task knowledge graph based on a Bayesian network algorithm, and taking a historical behavior sequence and task dependency depth of an agent as the state transition probability of an input calculation edge to form a dynamic knowledge graph; when detecting that the intelligent agents execute abnormally, constructing a historical state sequence, analyzing a state transition rule among the intelligent agents based on the historical state sequence, and identifying a propagation node in an abnormal state; And triggering state rollback operation of the intelligent agent step by step according to the sequence of the task recovery priority sequence, updating the state rollback result of each stage into the dynamic knowledge graph, and recalculating task state transition probability after finishing all rollback operations. Performing semantic analysis on the interaction data, the state data and the task execution log based on a predefined ontology model, and constructing an initial task knowledge graph comprises: Extracting entity type definition and attribute constraint rules from a predefined ontology model, carrying out multi-source data fusion on the interaction data, the state data and the task execution log based on the entity type definition, identifying an intelligent entity, a task entity and a resource entity, carrying out semantic consistency verification on the identified entity according to the attribute constraint rules, and labeling the entity passing the verification with a unique identifier; According to the relation mode definition in the predefined ontology model, analyzing the state dependency relationship between the collaboration mode in the interaction data and the state data, and establishing an initial relation edge among the intelligent entity, the task entity and the resource entity; Extracting an event sequence and a state conversion record from the task execution log, performing association analysis on timestamp information in the event seq