Fault fallback method, device and equipment in multi-agent cooperative system and medium

By real-time monitoring and locating faulty agents in a multi-agent collaborative system and adopting partial or complete rollback operations, the stability and consistency issues of traditional RPA systems under abnormal conditions are solved, and efficient self-recovery and business continuity are achieved.

CN120704926APending Publication Date: 2025-09-26DATAGRAND TECH INC
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510799945.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-16
Publication Date
2025-09-26

AI Technical Summary

Technical Problem

Traditional RPA systems lack support for task transactions in abnormal situations, making it difficult to achieve accurate recovery or consistency verification at the operation granularity level. Especially when multiple robots collaborate to perform tasks, the system's stability and fault tolerance are relatively weak.

Method used

In a multi-agent collaborative system, the main coordinator identifies multiple target agents, monitors the transaction execution process in real time, locates the faulty agent, and performs partial or complete rollback operations. It adopts a two-phase commit and state snapshot mechanism to support fine-grained rollback operations.

Benefits of technology

It significantly improves the system's self-recovery capability under abnormal circumstances, reduces the cost of manual intervention, ensures the consistency of system status and business continuity, and minimizes the scope of fault impact.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120704926A_ABST
    Figure CN120704926A_ABST
Patent Text Reader

Abstract

The invention discloses a fault fallback method and device in a multi-agent cooperative system, equipment and a medium, and the method comprises the steps: recognizing a plurality of target agents used for jointly executing a target transaction in the multi-agent cooperative system according to a target transaction operation request; the target agent is used for executing one atomic operation in the target transaction; after a transaction submission instruction is sent to each target agent which completes preparation in the preparation stage, whether an execution fault occurs in the execution process of the target transaction is monitored in real time in the submission stage; when the target execution fault is detected, at least one fault agent generating the target execution fault is positioned in the target agents; according to the fault agent, the local or complete rollback operation of the target transaction in the submission stage is executed, and according to the technical scheme of the embodiment of the invention, by monitoring multi-agent transaction execution in real time, accurately positioning the fault node and supporting the local or global rollback operation, the fault-tolerant capability of the system is remarkably improved, and the transaction consistency is also ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence, and in particular to a fault fallback method, device, equipment and medium in a multi-agent collaborative system. Background Art

[0002] With the rapid popularization of artificial intelligence technology and the deepening of digital transformation, multi-agent collaborative systems are taking on increasingly complex tasks in various scenarios.

[0003] Traditional RPA (Robotic Process Automation) systems rely primarily on flowchart-style linear logic and pre-set script instructions to execute tasks. When an exception occurs during system operation, they typically execute a simple branch jump or terminate the process directly, while logging the exception information for subsequent manual investigation.

[0004] In the process of implementing the present invention, the inventors found that traditional RPA lacks support for task transactions and has difficulty in achieving accurate recovery or consistency verification at the operation granularity level. In particular, when multiple robots collaborate to perform tasks, the system's stability and fault tolerance are relatively weak. Summary of the Invention

[0005] The embodiments of the present invention provide a fault fallback method, apparatus, equipment and medium in a multi-agent collaborative system, which can significantly improve the system's fault tolerance and business continuity under abnormal circumstances.

[0006] According to one aspect of an embodiment of the present invention, a fault fallback method in a multi-agent collaborative system is provided, which is executed by a master coordinator in the multi-agent collaborative system. The method includes:

[0007] According to the target transaction operation request, multiple target agents for jointly executing the target transaction are identified in the multi-agent collaborative system; the target agent is used to execute an atomic operation in the target transaction;

[0008] After sending the transaction commit instruction to each target agent that has completed preparation in the preparation phase, the target transaction is monitored in real time during the commit phase to see if any execution failure occurs during the execution process;

[0009] When a target execution failure is detected, locating at least one faulty agent that causes the target execution failure among the target agents;

[0010] Depending on the faulty agent, a partial or complete rollback of the target transaction is performed during the commit phase.

[0011] According to another aspect of an embodiment of the present invention, a fault fallback device in a multi-agent collaborative system is provided, which is configured in a master coordinator in the multi-agent collaborative system, and includes:

[0012] The agent identification module is used to identify multiple target agents for jointly executing the target transaction in the multi-agent collaborative system according to the target transaction operation request; the target agent is used to execute an atomic operation in the target transaction;

[0013] The transaction monitoring module is used to monitor whether there are any execution failures during the execution of the target transaction in real time during the submission phase after sending the transaction submission instruction to each target agent that has completed the preparation in the preparation phase;

[0014] a fault locating module, configured to locate at least one faulty agent causing the target execution fault in each target agent when a target execution fault is detected;

[0015] The rollback execution module is used to perform partial or complete rollback operations of the target transaction in the commit phase according to the faulty agent.

[0016] According to another aspect of an embodiment of the present invention, an electronic device is provided, the electronic device comprising:

[0017] at least one processor; and

[0018] a memory communicatively connected to the at least one processor; wherein,

[0019] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute a fault fallback method in a multi-agent collaborative system described in any embodiment of the present invention.

[0020] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement a fault fallback method in a multi-agent collaborative system described in any embodiment of the present invention when executed.

[0021] According to another aspect of an embodiment of the present invention, a computer program product is provided, comprising computer instructions, which implement the steps of the method according to any embodiment of the present invention when executed by a processor.

[0022] The technical solution of the embodiment of the present invention first identifies multiple target agents for jointly executing the target transaction in the multi-agent collaborative system based on the target transaction operation request, where each target agent is responsible for executing an atomic operation in the target transaction. After sending the transaction submission instruction to the target agent that has completed the preparation phase, the execution process of the target transaction is continuously monitored in the submission phase, and whether an execution failure occurs is detected in real time. When a target execution failure is detected, one or more faulty agents that caused the failure can be accurately located, and accordingly, a partial rollback or full rollback operation of the target transaction in the submission phase is intelligently executed, thereby ensuring the consistency of the system state and the continuity of the business. This new fault rollback method in the multi-agent collaborative system not only greatly improves the self-recovery capability of the system under abnormal conditions, but also significantly reduces the cost of manual intervention. At the same time, the method supports fine-grained local rollback operations, so that key business processes can be quickly restored within the minimum impact range, effectively ensuring business continuity and data consistency in enterprise-level application scenarios.

[0023] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0025] Figure 1 This is a flowchart of a fault fallback method in a multi-agent collaborative system provided according to the first embodiment of the present invention;

[0026] Figure 2 This is a flowchart of another method for failure recovery in a multi-agent collaborative system provided according to the second embodiment of the present invention;

[0027] Figure 3 This is a specific flowchart of a fault fallback method in a multi-agent collaborative system provided according to the third embodiment of the present invention;

[0028] Figure 4 2 is a schematic structural diagram of a fault fallback device in a multi-agent collaborative system according to a fourth embodiment of the present invention;

[0029] Figure 5 It is a structural diagram of an electronic device for implementing a fault fallback method in a multi-agent collaborative system according to an embodiment of the present invention. DETAILED DESCRIPTION

[0030] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0031] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0032] Example 1

[0033] Figure 1 This is a flowchart of a fault fallback method in a multi-agent collaborative system provided in Example 1 of the present invention. This embodiment is applicable to situations where some nodes in the multi-agent system fail or operation is abnormal during the execution of distributed transactions. The method can be executed by a fault fallback device in the multi-agent collaborative system. The device can be implemented in the form of hardware and / or software and can generally be configured in the main coordinator of the multi-agent collaborative system.

[0034] Correspondingly, such as Figure 1 As shown, the method includes:

[0035] S110. According to the target transaction operation request, multiple target agents for jointly executing the target transaction are identified in the multi-agent collaborative system; the target agent is used to execute an atomic operation in the target transaction.

[0036] A multi-agent system can be understood as an intelligent entity that uses RPA technology to automate process execution and incorporates artificial intelligence (such as machine learning, natural language processing, and computer vision) to empower it with environmental awareness, autonomous decision-making, task planning, and interactive collaboration capabilities. It can simulate human operational behaviors in digital systems (such as data entry, system switching, and file processing), while analyzing task scenarios through intelligent algorithms and dynamically adjusting execution strategies to complete complex business processes more flexibly and efficiently. A multi-agent collaborative system can be understood as a system in which multiple RPA-based agents can collaborate and divide responsibilities within complex business scenarios. For example, a "data collection agent" is responsible for fetching data from the system, a "data verification agent" is responsible for verifying data accuracy, and a "report generation agent" is responsible for integrating data and outputting documents, forming an automated task chain.

[0037] Atomic operations can be understood as the smallest execution unit that possesses atomicity (indivisibility), isolation, and consistency. Each operation has clearly defined execution logic and corresponding rollback mechanisms. In this solution, atomic operations serve as the basic unit for fault isolation and precise rollback, ensuring that the system can roll back specific operations without rolling back the entire transaction process.

[0038] Specifically, this solution defines an atomic operation format for agents. Each atomic operation consists of the following elements: operation ID: a globally unique identifier; agent ID: the executing agent identifier; transaction ID: the transaction identifier; operation type: such as data modification or query; resource list: the identifiers of the resources involved; preconditions: the conditions that must be met before the operation is executed; execution content: the specific operation actions and parameters; postconditions: the conditions that must be met after the operation is executed; compensation operation: the reverse operation performed during rollback; timeout: the maximum allowed execution time of the operation; priority: the level of importance of the operation.

[0039] In this embodiment, based on the operation request received from the target transaction, agent resources are dynamically allocated and coordinated in a multi-agent collaborative environment, and multiple target agents that are most suitable for participating in the execution of the current transaction (i.e., the target transaction) are screened out from the agent cluster. Each selected target agent is specifically responsible for processing an atomic operation in the transaction.

[0040] S120: After sending the transaction commit instruction to each target agent that has completed preparation in the preparation phase, monitor in real time during the commit phase whether there is any execution failure during the execution of the target transaction.

[0041] The preparation phase can be understood as the first phase of the two-phase commit protocol for distributed transactions. During this phase, each target agent completes preparatory work such as resource reservation and status verification, but does not perform substantive data changes. The transaction commit instruction can be understood as a formal execution command issued by the master coordinator, triggering each target agent to perform the predetermined atomic operation. At this point, the multi-agent collaborative system enters the data change phase. The commit phase can be understood as the second phase of the two-phase commit protocol. Each target agent actually performs data operations and persists the changes, which is the most critical implementation link of transaction processing.

[0042] In this embodiment, once the master coordinator issues a transaction commit command to each target agent that has completed the preparation phase, it immediately activates a real-time monitoring mechanism, continuously tracking the execution status of the target transaction through multi-dimensional detection methods. This real-time monitoring mechanism continuously tracks the operating status of each target agent, providing high-precision monitoring of the execution process of each atomic operation and immediately initiating a fault handling procedure when an anomaly is detected.

[0043] S130. When a target execution failure is detected, locate at least one faulty agent that causes the target execution failure in each target agent.

[0044] In this embodiment, when an execution failure of a target transaction is detected, a comprehensive analysis of the operating status of each target intelligent agent will be immediately performed. By comparing the differences between the expected execution process and the actual operation results, the specific intelligent agent that caused the failure, that is, the faulty intelligent agent, can be accurately located.

[0045] S140. According to the faulty agent, execute a partial or complete rollback operation of the target transaction in the commit phase.

[0046] In this embodiment, for localized failure scenarios, only the atomic operations related to the failed agent are rolled back, restoring the affected resource states by invoking pre-defined compensation logic. For global failures, a complete transaction rollback process is initiated. The rollback process strictly adheres to the two-phase commit procedure to ensure that all participating agents collaborate to complete the state rollback. After the rollback is complete, a detailed operation log is recorded to provide a basis for subsequent failure analysis and process optimization.

[0047] The technical solution of the embodiment of the present invention first identifies multiple target agents for jointly executing the target transaction in the multi-agent collaborative system based on the target transaction operation request, where each target agent is responsible for executing an atomic operation in the target transaction. After sending the transaction submission instruction to the target agent that has completed the preparation phase, the execution process of the target transaction is continuously monitored in the submission phase, and whether an execution failure occurs is detected in real time. When a target execution failure is detected, one or more faulty agents that caused the failure can be accurately located, and accordingly, a partial rollback or full rollback operation of the target transaction in the submission phase is intelligently executed, thereby ensuring the consistency of the system state and the continuity of the business. This new fault rollback method in the multi-agent collaborative system not only greatly improves the self-recovery capability of the system under abnormal conditions, but also significantly reduces the cost of manual intervention. At the same time, the method supports fine-grained local rollback operations, so that key business processes can be quickly restored within the minimum impact range, effectively ensuring business continuity and data consistency in enterprise-level application scenarios.

[0048] Optionally, based on the above embodiments, real-time monitoring of whether a target transaction encounters an execution failure during execution during the commit phase may include at least one of the following:

[0049] By using timer detection, each target agent is detected in real time to see if there is an operation timeout failure when executing the matching atomic operation;

[0050] By capturing exceptions, it detects in real time whether the target transaction encounters any abnormal execution failures during execution.

[0051] Through heartbeat detection, each target agent is detected in real time to see if there is any unresponsive execution failure during execution.

[0052] By detecting the connection status, it is possible to detect in real time whether each target agent has any execution failure such as agent crash during execution.

[0053] Typically, timer detection monitors the execution time of atomic operations using a preset time threshold. Each target agent starts a dedicated timer at the beginning of an atomic operation, continuously tracking the duration of the operation. If the actual execution time exceeds the preset maximum allowed duration (e.g., 30 seconds), the operation is immediately identified as a timeout failure. This mechanism effectively identifies execution anomalies caused by resource contention or processing bottlenecks.

[0054] Generally speaking, exception handling mechanisms intercept error messages in real time during the execution of atomic operations. By embedding exception handling code within the operation logic, various runtime exceptions, including data format errors and null pointer dereferences, can be accurately captured. Captured exceptions are labeled according to predefined classification criteria, classifying unexpected and severe errors as operation failures while retaining complete error context.

[0055] Generally speaking, heartbeat detection uses a periodic request-response model to maintain communication connections. The master coordinator sends probe requests to each target agent at a preset fixed interval (e.g., every 5 seconds) and records the time of the last successful response. When the number of consecutive unresponsive requests reaches a preset upper limit (e.g., 3), the target agent is considered unresponsive. This lightweight detection method can promptly detect network outages or process blockages.

[0056] Generally speaking, connection status detection identifies serious faults by monitoring the communication link. Based on the persistent connection between the target agent and the master coordinator, TCP (Transmission Control Protocol) connection status changes are tracked in real time. If an abnormal connection loss and repeated reconnection failures are detected, the agent is immediately deemed to have crashed. This detection method is capable of quickly identifying serious faults such as abnormal process terminations.

[0057] Optionally, based on the above embodiments, executing a partial or complete rollback operation of the target transaction at the commit stage according to the faulty agent may specifically include:

[0058] Analyze the completion status of target tasks;

[0059] If the target transaction is determined to meet the simulated commit conditions according to the analysis results, the target transaction is simulated committed;

[0060] If it is determined according to the analysis results that the target transaction does not meet the simulation commit conditions, then a partial or complete rollback operation of the target transaction in the commit phase is performed according to the fault agent.

[0061] Generally speaking, the transaction processing process begins with a comprehensive analysis of the target transaction's completion status. This comprehensive assessment examines multiple dimensions, including the execution status of each agent, resource locking, and operational results. This analysis references a pre-defined submission checklist, including key indicators such as whether all agents have completed preparations and whether resource status is consistent, providing an objective basis for subsequent decision-making.

[0062] When the analysis results indicate that the target transaction meets the simulated commit conditions, the simulated commit phase begins. This phase simulates the actual commit process without actually modifying the data, primarily verifying the integrity and consistency of the transaction. During the simulation, resource status and operation dependencies are rechecked to ensure that all preconditions remain valid. The actual commit process is triggered only after the simulated commit is successful. This dual verification mechanism significantly improves transaction reliability.

[0063] When the target transaction does not meet the simulated commit conditions, a hierarchical rollback mechanism will be initiated based on the failure type.

[0064] Furthermore, for operation-level failures, the state snapshot associated with the failed operation is first obtained, the snapshot is applied to restore to the state before the operation, and the consistency of the rollback result is verified through a verification mechanism. Finally, the rollback result is fed back to the main coordinator. For agent-level failures, all active transactions of the failed agent are first suspended, and an attempt is made to replace it with a backup agent. If the replacement is successful, the state is migrated and the transaction is restored; otherwise, the rollback process is triggered. During rollback, intelligent decisions are made based on the transaction completion status, and simulated commits or partial rollbacks are performed. The compensation logic is strictly followed to ensure state recovery, and a complete rollback log is recorded. This mechanism realizes the precise positioning and hierarchical processing of faults, taking into account both local rollback and global recovery needs.

[0065] Example 2

[0066] Figure 2 The flowchart of another fault fallback method in a multi-agent collaborative system provided in the second embodiment of the present invention is optimized based on the above embodiments. In this embodiment, a fault fallback method in a multi-agent collaborative system is refined, specifically as follows: before sending a transaction commit instruction to each target agent that has completed the preparation operation in the preparation phase, it also includes: sending a preparation request to each target agent respectively, wherein each target agent reports a ready response to the main coordinator after successfully performing resource availability check, locking resources, verifying the preconditions of the atomic operation to be performed, and creating a resource status snapshot according to the received preparation request, and the resource status snapshot created by each target agent is uniformly stored in the status database; if the ready response feedbacked by all target agents is received within the preset preparation phase waiting time, a transaction commit instruction is sent to each target agent; if the ready response feedbacked by all target agents is not received within the preset preparation phase waiting time, a complete rollback operation of the target transaction in the preparation phase is performed.

[0067] Correspondingly, such as Figure 2 As shown, the method may specifically include:

[0068] S210. According to the target transaction operation request, multiple target agents for jointly executing the target transaction are identified in the multi-agent collaborative system; the target agent is used to execute an atomic operation in the target transaction.

[0069] S220. Send a preparation request to each target agent respectively, wherein each target agent reports a ready response to the main coordinator after successfully performing resource availability check, locking resources, verifying the prerequisites of the atomic operations to be performed, and creating a resource status snapshot according to the received preparation request. The resource status snapshots created by each target agent are uniformly stored in the status database.

[0070] Resource locking can be understood as the process whereby, when an agent prepares to execute an atomic operation, it first establishes exclusive control over all resources involved in the operation (such as database records, files, and memory objects), effectively preventing operational conflicts between different agents. Resource state snapshots can be understood as the process whereby, before executing an atomic operation, the agent fully records the current state of all relevant resources, including key information such as data values, configuration parameters, and system variables. The snapshot contains not only the resources directly modified by the operation but also any associated states that may be affected, forming a complete recovery context.

[0071] In this embodiment, the master coordinator sends a preparation request to each target agent, requiring each target agent to complete four key operations: first, perform a resource availability check to confirm that the required resources (such as database connections, file locks, etc.) are available; second, lock the relevant resources to prevent interference from other concurrent operations; then verify the preconditions of the atomic operation to ensure that the prerequisites for the operation execution are met; and finally, create a resource status snapshot to record the system status before the operation. These status snapshots will be stored in a dedicated state database to provide a recovery baseline for possible rollback operations. Only when the agent successfully completes these four operations will it send a ready response to the master coordinator.

[0072] S230. Determine whether a ready response is received from all target agents within the preset preparation phase waiting time. If so, execute S240; if not, execute S250.

[0073] In this embodiment, the main coordinator will continuously collect the readiness responses fed back by each target agent within the preset preparation phase waiting time (usually set to a millisecond timeout threshold). Whether there is a timeout is determined by the principle of unanimous approval: if the readiness responses of all target agents are successfully received during the waiting period, it indicates that the transaction meets the conditions for continued execution and will enter the submission phase; if any agent responds with a timeout or returns a preparation failure, the transaction termination process is immediately triggered. This judgment mechanism strictly follows the atomicity requirements of distributed transactions and fundamentally avoids the risk of data inconsistency caused by the success of some nodes and the failure of some nodes by synchronously confirming the preparation status of all participating nodes. During the decision-making process, the main coordinator will update the transaction state machine in real time and record detailed decision logs to provide the system with auditable transaction lifecycle tracking capabilities.

[0074] S240: Send transaction submission instructions to each target agent.

[0075] In this embodiment, after the main coordinator confirms that all target agents are ready, it will immediately send a transaction submission instruction containing a transaction unique identifier and a submission timestamp to each target agent, triggering each target agent to perform a predetermined atomic operation and complete business logic processing. At the same time, the system will monitor the operation execution status of each target agent in real time, record the operation results through the transaction log and ensure that all operations are ultimately completed correctly. During this process, if it is detected that a target agent fails to complete the submission within the specified time, it will be immediately marked as an abnormal state. This mechanism not only ensures the atomicity requirements of the transaction, but also takes into account the execution efficiency in a distributed environment.

[0076] S250: Execute a complete rollback operation of the target transaction in the preparation phase.

[0077] In this embodiment, if the master coordinator detects that any target agent fails to return a readiness response within a preset time, it immediately initiates a global rollback process in the preparation phase, sending a rollback instruction to all agents that have responded ready. Upon receiving the instruction, each agent executes a rollback operation based on a previously created resource state snapshot, releasing all locked resources and restoring the system state to the reference point before the transaction began. This rollback process strictly adheres to atomicity requirements, ensuring that all participating agents either successfully roll back or eventually complete the rollback through a retry mechanism.

[0078] S260: After sending the transaction commit instruction to each target agent that has completed preparation in the preparation phase, monitor the target transaction in real time during the commit phase to see if any execution failure occurs during the execution process.

[0079] S270. When a target execution failure is detected, locate at least one faulty agent that causes the target execution failure in each target agent.

[0080] S280. According to the faulty agent, execute a partial or complete rollback operation of the target transaction in the commit phase.

[0081] The technical solution of the embodiment of the present invention identifies multiple target intelligent agents based on the target transaction operation request. Each intelligent agent is responsible for executing an atomic operation in the transaction. Then, a preparation request is sent to each intelligent agent, requiring it to complete preparation work such as resource availability check, resource locking, precondition verification, and creation of resource status snapshots, and the status snapshots are uniformly stored in the status database. Then, the system determines whether the ready responses of all intelligent agents are received within the preset preparation phase waiting time. If all are received, a transaction submission instruction is sent to each intelligent agent, otherwise a complete rollback operation is performed. During the submission phase, the system continuously monitors the transaction execution process. Once an execution failure is detected, the faulty intelligent agent is immediately located. Finally, a partial or complete rollback operation is performed according to the failure situation, thereby ensuring the consistency of the system status and the continuity of the business. The solution significantly improves the recovery capability in abnormal situations through standardized preparation processes and status snapshot mechanisms. The combination of two-phase submission and intelligent rollback ensures the atomicity of transactions and avoids the waste of resources caused by full rollback in traditional solutions.

[0082] Optionally, based on the above embodiments, executing a partial or complete rollback operation of the target transaction at the commit stage according to the faulty agent may include:

[0083] Identify all active transactions associated with the faulty agent and suspend each identified active transaction;

[0084] If there is a replacement agent that matches the faulty agent, try to use the replacement agent to replace the faulty agent;

[0085] If the replacement is successful, each valid state in the failed agent is migrated to the replacement agent, and each active transaction is restored;

[0086] If there is no replacement agent that matches the failed agent, or the replacement fails, all target agents are triggered to perform rollback operations on the target transaction.

[0087] Generally speaking, when a faulty agent is detected, all active transactions associated with the faulty agent are first identified. Since a single agent may be involved in multiple transactions simultaneously, the transaction manager quickly scans the transaction log, locates all incomplete transactions involving the faulty agent, and immediately puts them into a suspended state, effectively preventing the fault from spreading.

[0088] Specifically, when an agent failure is detected, a replacement mechanism is prioritized for service recovery. Based on a pre-established agent resource pool, the most suitable backup agent is automatically matched based on functional type, resource configuration, and other factors. The matching process comprehensively considers key factors such as processing power, software components, and network location to ensure that the new agent can seamlessly take over the original task.

[0089] If a replacement agent is successfully matched, the three key steps of state migration are performed: extracting valid state data from the failed agent's latest snapshot, including memory state and session information; securely transferring this data to the new agent; and reestablishing the execution context in the new environment. Once these steps are completed, the suspended transaction process can be safely resumed.

[0090] If a suitable replacement agent cannot be found or the migration fails, a full rollback mechanism is triggered. The master coordinator sends a rollback instruction to all agents participating in the target transaction, executing an atomic rollback based on the saved state snapshot. Even if some target agents have already completed certain operations, they are still forced to roll back to the transaction's initial state to ensure overall consistency. A detailed log is generated throughout the entire process, providing a basis for subsequent analysis and optimization.

[0091] Optionally, based on the above embodiments, migrating each valid state of the faulty agent to the replacement agent may include:

[0092] Get the latest valid state snapshot of the faulty agent;

[0093] Based on the latest valid state snapshot, obtain the valid states and unfinished transactions in the faulty agent, and generate a state migration package based on the obtained valid states and unfinished states;

[0094] After sending the state migration package to the replacement agent, verify the migration result;

[0095] If the migration result is a successful migration, the migration record is updated and the remaining target agents are notified to switch the communication route between the failed agent and the replacement agent.

[0096] Generally speaking, when migrating the valid state of a failed agent to a replacement agent, a standardized migration process is followed. First, the latest valid state snapshot is retrieved from the failed agent's persistent storage. This snapshot contains the agent's complete working state before the failure. Based on this state snapshot, all valid runtime state data and detailed information about outstanding transactions are extracted. This critical information is packaged into a structured state migration package, which includes both the current execution context and the queue of pending transactions.

[0097] Typically, the generated state migration package is transmitted via a dedicated communication channel to a pre-configured replacement agent. After loading the migration package, the receiving agent performs integrity checks and state recovery verification to ensure that all data and transactions are accurately reconstructed. Once the migration is confirmed successful, the transaction coordination record is updated, marking the agent's replacement status. Simultaneously, other collaborating agents in the transaction are notified to update their communication routing tables, automatically redirecting all messages originally destined for the failed agent to the new replacement agent, ensuring that the transaction can continue without interruption.

[0098] Generally speaking, the entire migration process is designed to be atomic. Any exception at any step triggers a rollback mechanism, restoring the state of the relevant agents to the baseline before the migration began. This design ensures migration reliability while avoiding data inconsistencies caused by partial migrations. All migration operations generate detailed audit logs, providing a complete record for subsequent fault analysis and process optimization.

[0099] Optionally, based on the above embodiments, triggering all target agents to perform a rollback operation on the target transaction may include:

[0100] The rollback engine sends a rollback instruction to each target agent. Each target agent is used to obtain the resource state snapshot created in the preparation phase from the state database according to the rollback instruction, and then perform a state rollback operation based on the resource state snapshot. When the rollback result is verified to meet the consistency requirements with the resource state snapshot, the rollback completion response is fed back to the rollback engine.

[0101] When the rollback completion response fed back by all target agents is received through the rollback engine, it is determined that the complete rollback operation of the target transaction in the commit phase is completed.

[0102] Generally speaking, when a transaction rollback is required, the rollback engine will send a standardized rollback instruction to all target agents participating in the transaction. After receiving the instruction, each target agent will immediately access the state database to retrieve the resource state snapshot pre-stored during the preparation phase. Based on this snapshot record, each target agent will perform the state rollback operation step by step, including releasing the currently held resource locks, restoring data to the snapshot state, and other key steps. After completing the rollback operation, the target agent will perform a strict consistency check to ensure that the current system state fully matches the snapshot record. Only after the verification is passed will a rollback completion response be sent to the rollback engine.

[0103] Generally speaking, the rollback engine will continue to monitor the response status of all target agents until it confirms receipt of rollback completion responses from all target agents. During this process, the rollback engine will maintain a real-time updated response status table to record the rollback progress of each target agent. When the last target agent also reports a successful rollback, the rollback engine will officially mark the target transaction as having completed the full rollback operation, update the global transaction status, and generate a detailed operation log. This design ensures that even in a distributed environment, all agents can collaborate to complete atomic state rollback, effectively ensuring data consistency and business continuity. The entire rollback process uses a timeout retry mechanism, which will automatically initiate a retry request for agents that do not respond in time to prevent rollback failures due to temporary communication problems.

[0104] Example 3

[0105] For ease of understanding, the specific application scenarios applicable to each embodiment of the invention are described below. In this specific application scenario, in order to solve the problem of overall transaction interruption or data inconsistency caused by partial node failure during multi-agent collaborative work, the embodiment of the present invention designs a complete fault fallback solution in the multi-agent collaborative system.

[0106] Specifically, such as Figure 3 FIGURE 1 shows a flow chart of a method for failure recovery in a multi-agent collaborative system according to an embodiment of the present invention. Figure 3 As shown, the main coordinator first responds to the target transaction operation request and identifies multiple target agents ( Figure 3 (For example, using Agents A and B, each target agent is responsible for executing an atomic operation within the target transaction.) During the prepare phase, the master coordinator distributes prepare requests to each target agent. Each target agent performs operations such as checking resource availability, locking resources, verifying preconditions, and creating a resource state snapshot, which is then stored in a unified state database. When all target agents respond with a ready response within a preset time, the master coordinator issues a transaction commit command, entering the commit phase. During the commit phase, the master coordinator monitors the execution status in real time: detecting operation timeouts and capturing execution anomalies using a timer, assessing response status using heartbeat detection, and monitoring connection status. If an execution failure is detected, the master coordinator locates the faulty agent and suspends related active transactions. If a matching replacement agent exists, the transaction is resumed by migrating the valid state of the faulty agent to the replacement. Otherwise, a full rollback is triggered, with each agent performing a rollback based on the resource state snapshot from the prepare phase. After verifying that the rollback result is consistent with the snapshot, the agent responds with a rollback completion response, ultimately completing the transaction rollback. The entire process is recorded in the transaction state machine to ensure transaction consistency.

[0107] Furthermore, through the ingenious coordination of the above steps, it is possible to implement fault fallback in a multi-agent collaborative system, achieving the following beneficial effects:

[0108] 1) Through real-time monitoring and intelligent fault location mechanisms, various anomalies during execution can be quickly identified and handled, significantly enhancing the stability and reliability of multi-agent systems in complex environments.

[0109] 2) It adopts a two-phase commit and state snapshot mechanism, supports fine-grained local rollback or global rollback operations, effectively ensures the atomicity and data consistency of distributed transactions, and avoids data inconsistency problems caused by partial failures.

[0110] 3) Automated fault detection, location, and recovery processes significantly reduce reliance on manual operation and maintenance, enabling the system to self-heal, significantly improving operation and maintenance efficiency and reducing operational risks.

[0111] 4) Through the hot replacement and local rollback mechanism of intelligent agents, the scope of the fault impact is minimized, unnecessary global rollbacks are avoided, and normally operating intelligent agents can continue to perform tasks, thereby improving the overall resource utilization efficiency.

[0112] Example 4

[0113] Figure 4 This is a schematic diagram of the structure of a fault fallback device in a multi-agent collaborative system provided by the fourth embodiment of the present invention. Figure 4 As shown, the device includes:

[0114] The agent identification module 410 is used to identify multiple target agents for jointly executing the target transaction in the multi-agent collaborative system according to the target transaction operation request; the target agent is used to execute an atomic operation in the target transaction;

[0115] The transaction monitoring module 420 is used to monitor whether there are any execution failures during the execution of the target transaction in real time during the commit phase after sending the transaction commit instruction to each target agent that has completed preparation in the preparation phase;

[0116] A fault location module 430 is configured to locate at least one faulty agent that caused the target execution failure in each target agent when a target execution failure is detected;

[0117] The rollback execution module 440 is used to execute a partial or complete rollback operation of the target transaction in the commit phase according to the faulty agent.

[0118] The technical solution of the embodiment of the present invention first identifies multiple target agents for jointly executing the target transaction in the multi-agent collaborative system based on the target transaction operation request, where each target agent is responsible for executing an atomic operation in the target transaction. After sending the transaction submission instruction to the target agent that has completed the preparation phase, the execution process of the target transaction is continuously monitored in the submission phase, and whether an execution failure occurs is detected in real time. When a target execution failure is detected, one or more faulty agents that caused the failure can be accurately located, and accordingly, a partial rollback or full rollback operation of the target transaction in the submission phase is intelligently executed, thereby ensuring the consistency of the system state and the continuity of the business. This new fault rollback method in the multi-agent collaborative system not only greatly improves the self-recovery capability of the system under abnormal conditions, but also significantly reduces the cost of manual intervention. At the same time, the method supports fine-grained local rollback operations, so that key business processes can be quickly restored within the minimum impact range, effectively ensuring business continuity and data consistency in enterprise-level application scenarios.

[0119] Furthermore, based on the above embodiments, a fault fallback device in a multi-agent collaborative system may further include: a request preparation module, a submission module, and a fallback module, wherein:

[0120] The preparation request module is used to send a preparation request to each target agent before sending a transaction commit instruction to each target agent that has completed the preparation operation in the preparation phase. After each target agent successfully performs resource availability check, locks resources, verifies the preconditions of the atomic operation to be executed, and creates a resource status snapshot based on the received preparation request, it reports a readiness response to the main coordinator. The resource status snapshot created by each target agent is uniformly stored in the status database;

[0121] The commit module is used to send a transaction commit instruction to each target agent if a ready response is received from all target agents within the preset preparation phase waiting time;

[0122] The rollback module is used to perform a complete rollback operation of the target transaction in the preparation phase if no ready response is received from all target agents within the preset preparation phase waiting time.

[0123] Based on the above embodiments, the transaction monitoring module 420 is specifically configured to perform at least one of the following:

[0124] By using timer detection, each target agent is detected in real time to see if there is an operation timeout failure when executing the matching atomic operation;

[0125] By capturing exceptions, it detects in real time whether the target transaction encounters any abnormal execution failures during execution.

[0126] Through heartbeat detection, each target agent is detected in real time to see if there is any unresponsive execution failure during execution.

[0127] By detecting the connection status, it is possible to detect in real time whether each target agent has any execution failure such as agent crash during execution.

[0128] Furthermore, based on the above embodiments, the rollback execution module 440 may include: a transaction state identification unit, an agent replacement evaluation unit, a state migration unit, and a global rollback unit, wherein:

[0129] A transaction state identification unit, configured to identify all active transactions associated with the faulty agent and suspend each identified active transaction;

[0130] an agent replacement evaluation unit for attempting to replace the faulty agent with the replacement agent if there is a replacement agent that matches the faulty agent;

[0131] a state migration unit, configured to migrate each valid state in the failed intelligent agent to the replacement intelligent agent if the replacement is successful, and then resume each active transaction;

[0132] The global rollback unit is used to trigger all target agents to perform a rollback operation on the target transaction if there is no replacement agent that matches the faulty agent or the replacement fails.

[0133] Furthermore, based on the above embodiments, the state transition unit is specifically configured to:

[0134] Get the latest valid state snapshot of the faulty agent;

[0135] Based on the latest valid state snapshot, obtain the valid states and unfinished transactions in the faulty agent, and generate a state migration package based on the obtained valid states and unfinished states;

[0136] After sending the state migration package to the replacement agent, verify the migration result;

[0137] If the migration result is a successful migration, the migration record is updated and the remaining target agents are notified to switch the communication route between the failed agent and the replacement agent.

[0138] Furthermore, based on the above embodiments, the global rollback unit is specifically configured to:

[0139] The rollback engine sends a rollback instruction to each target agent. Each target agent is used to obtain the resource state snapshot created in the preparation phase from the state database according to the rollback instruction, and then perform a state rollback operation based on the resource state snapshot. When the rollback result is verified to meet the consistency requirements with the resource state snapshot, the rollback completion response is fed back to the rollback engine.

[0140] When the rollback completion response fed back by all target agents is received through the rollback engine, it is determined that the complete rollback operation of the target transaction in the commit phase is completed.

[0141] Furthermore, based on the above embodiments, the rollback execution module 440 is specifically configured to:

[0142] Analyze the completion status of target tasks;

[0143] If the target transaction is determined to meet the simulated commit conditions according to the analysis results, the target transaction is simulated committed;

[0144] If it is determined according to the analysis results that the target transaction does not meet the simulation commit conditions, then a partial or complete rollback operation of the target transaction in the commit phase is performed according to the fault agent.

[0145] The fault fallback device in the multi-agent collaborative system provided by the embodiment of the present invention can execute the fault fallback method in the multi-agent collaborative system provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0146] In the technical solutions disclosed herein, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0147] Example 5

[0148] Figure 5 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.

[0149] like Figure 5As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0150] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0151] The processor 11 may be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a fault fallback method in a multi-agent collaborative system, namely:

[0152] According to the target transaction operation request, multiple target agents for jointly executing the target transaction are identified in the multi-agent collaborative system; the target agent is used to execute an atomic operation in the target transaction;

[0153] After sending the transaction commit instruction to each target agent that has completed preparation in the preparation phase, the target transaction is monitored in real time during the commit phase to see if any execution failure occurs during the execution process;

[0154] When a target execution failure is detected, locating at least one faulty agent that causes the target execution failure among the target agents;

[0155] Depending on the faulty agent, a partial or complete rollback of the target transaction is performed during the commit phase.

[0156] In some embodiments, a fault fallback method in a multi-agent collaborative system may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the fault fallback method in a multi-agent collaborative system described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute a fault fallback method in a multi-agent collaborative system in any other appropriate manner (for example, by means of firmware).

[0157] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system comprising at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0158] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0159] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0160] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0161] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0162] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.

[0163] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.

[0164] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.

Claims

1. A fault fallback method in a multi-agent collaborative system, characterized in that: Executed by a master coordinator in a multi-agent collaborative system, the method includes: According to the target transaction operation request, multiple target agents for jointly executing the target transaction are identified in the multi-agent collaborative system; the target agent is used to execute an atomic operation in the target transaction; After sending the transaction commit instruction to each target agent that has completed preparation in the preparation phase, the target transaction is monitored in real time during the commit phase to see if any execution failure occurs during the execution process; When a target execution failure is detected, locating at least one faulty agent that causes the target execution failure among the target agents; Depending on the faulty agent, a partial or complete rollback of the target transaction is performed during the commit phase.

2. The method according to claim 1, characterized in that Before sending the transaction commit instruction to each target agent that has completed the preparation operation in the preparation phase, it also includes: Send a preparation request to each target agent. After each target agent successfully performs resource availability checks, locks resources, verifies the preconditions of the atomic operations to be performed, and creates a resource status snapshot based on the received preparation request, it reports a readiness response to the master coordinator. The resource status snapshots created by each target agent are uniformly stored in the state database. If the ready response is received from all target agents within the preset preparation phase waiting time, a transaction commit instruction is sent to each target agent; If no ready responses are received from all target agents within the preset preparation phase waiting time, a complete rollback operation of the target transaction in the preparation phase will be performed.

3. The method according to claim 1, characterized in that During the commit phase, real-time monitoring is performed to determine whether the target transaction encounters any execution failures, including at least one of the following: By using timer detection, each target agent is detected in real time to see if there is an operation timeout failure when executing the matching atomic operation; By capturing exceptions, it detects in real time whether the target transaction encounters any abnormal execution failures during execution. Through heartbeat detection, each target agent is detected in real time to see if there is any unresponsive execution failure during execution. By detecting the connection status, it is possible to detect in real time whether each target agent has any execution failure such as agent crash during execution.

4. The method according to claim 2, characterized in that Based on the faulty agent, perform partial or complete rollback of the target transaction at the commit stage, including: Identify all active transactions associated with the faulty agent and suspend each identified active transaction; If there is a replacement agent that matches the faulty agent, try to use the replacement agent to replace the faulty agent; If the replacement is successful, each valid state in the failed agent is migrated to the replacement agent, and each active transaction is restored; If there is no replacement agent that matches the failed agent, or the replacement fails, all target agents are triggered to perform rollback operations on the target transaction.

5. The method according to claim 4, characterized in that Migrate all valid states from the failed agent to the replacement agent, including: Get the latest valid state snapshot of the faulty agent; Based on the latest valid state snapshot, obtain the valid states and unfinished transactions in the faulty agent, and generate a state migration package based on the obtained valid states and unfinished states; After sending the state migration package to the replacement agent, verify the migration result; If the migration result is a successful migration, the migration record is updated and the remaining target agents are notified to switch the communication route between the failed agent and the replacement agent.

6. The method according to claim 4, characterized in that Trigger all target agents to perform rollback operations on the target transaction, including: The rollback engine sends a rollback instruction to each target agent. Each target agent is used to obtain the resource state snapshot created in the preparation phase from the state database according to the rollback instruction, and then perform a state rollback operation based on the resource state snapshot. When the rollback result is verified to meet the consistency requirements with the resource state snapshot, the rollback completion response is fed back to the rollback engine. When the rollback completion response fed back by all target agents is received through the rollback engine, it is determined that the complete rollback operation of the target transaction in the commit phase is completed.

7. The method according to any one of claims 1 to 6, characterized in that Based on the faulty agent, perform partial or complete rollback of the target transaction at the commit stage, including: Analyze the completion status of target tasks; If the target transaction is determined to meet the simulated commit conditions according to the analysis results, the target transaction is simulated committed; If it is determined according to the analysis results that the target transaction does not meet the simulation commit conditions, then a partial or complete rollback operation of the target transaction in the commit phase is performed according to the fault agent.

8. A fault fallback device in a multi-agent collaborative system, characterized in that: The device is configured in a master coordinator in a multi-agent collaborative system, and includes: The agent identification module is used to identify multiple target agents for jointly executing the target transaction in the multi-agent collaborative system according to the target transaction operation request; the target agent is used to execute an atomic operation in the target transaction; The transaction monitoring module is used to monitor whether there are any execution failures during the execution of the target transaction in real time during the submission phase after sending the transaction submission instruction to each target agent that has completed the preparation in the preparation phase; a fault locating module, configured to locate at least one faulty agent causing the target execution fault in each target agent when a target execution fault is detected; The rollback execution module is used to perform partial or complete rollback operations of the target transaction in the commit phase according to the faulty agent.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute a fault fallback method in a multi-agent collaborative system as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement a fault fallback method in a multi-agent collaborative system according to any one of claims 1 to 7 when executed.

Citation Information

Cited By

  • Cross-system data maintenance method and device, equipment and storage medium

    CN120872979A

  • An agent development platform based on distributed task queue and light-weight sandbox

    CN122711340A