Method for automatically decomposing and executing complex tasks of enterprises based on multi-agent cooperation
By constructing a self-healing system for real-time monitoring and adaptive replanning, the problem of logical deviations in the execution process in the multi-agent collaborative architecture was solved, achieving accuracy and consistency of task results and optimizing resource utilization and storage efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NANJING JIANHAO INTELLIGENT TECH CO LTD
- Filing Date
- 2026-03-16
- Publication Date
- 2026-06-16
AI Technical Summary
In large-scale microservice architectures and cloud-native environments, the execution process of multi-agent collaborative architectures is susceptible to external constraints and disturbances such as container scaling delays, network jitter, and API rate limiting, leading to execution flow deadlocks or intermediate variable pollution, making it difficult to achieve accurate consistency of transaction states in the full-chain scheduling of business instruction flow and underlying execution stack.
By constructing a self-healing system based on semantic boundary awareness, stack instruction mapping, and subgraph idempotent reconstruction, and utilizing constraint-guided graphs and state checkpoints, execution deviations are monitored in real time and adaptive replanning is performed to ensure the logical consistency of the task chain and the accuracy of the results.
It enables real-time monitoring and adaptive correction of execution deviations, solves the problem of untimely and inaccurate identification of logical offsets in distributed execution, ensures the integrity and consistency of task results, reduces storage overhead and optimizes resource utilization.
Smart Images

Figure CN121836641B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, specifically to a method for automatically decomposing and executing complex enterprise tasks based on multi-agent collaboration. Background Technology
[0002] In the evolution of large-scale microservice architectures and cloud-native environments, multi-agent collaborative architectures are often used to handle automated operation and maintenance and continuous delivery across clusters. As the central hub for task control, the system needs to accurately decompose complex deployment instructions. However, in practical applications, external constraints such as container scaling latency, network jitter, and API rate limiting can easily lead to execution flow deadlocks or intermediate variable pollution in the backend execution module. Currently, the system lacks a real-time execution stack self-calibration mechanism. If logical deviations occur during the decomposition and initialization phase of the program flow, it will lead to the breakage of distributed transaction logic in long-chain asynchronous calls. Especially when dynamic orchestration involves multiple dependent services, the execution failure of local nodes is difficult to report to the global scheduler in a timely manner. Relying solely on traditional timeout retry mechanisms incurs huge overhead and cannot meet the stringent requirements of execution determinism in software-defined production.
[0003] In summary, how to implement a multi-agent state machine-guided orchestration and automatic execution method that can ensure the precise consistency of the transaction state between the business instruction flow and the underlying execution stack throughout the entire chain of scheduling is a technical problem that urgently needs to be solved in the field of distributed computing task processing.
[0004] To address this, a method for automatically decomposing and executing complex enterprise tasks based on multi-agent collaboration is proposed. Summary of the Invention
[0005] The purpose of this invention is to provide an automatic decomposition and execution method for complex enterprise tasks based on multi-agent collaboration. By constructing a self-healing system based on semantic boundary awareness, stack instruction mapping and subgraph idempotent reconstruction, it solves the problem of unreliable task chains caused by logical soft faults in complex semantic tasks by distributed entities.
[0006] To achieve the above objectives, the present invention provides the following technical solution:
[0007] A method for automatically decomposing and executing complex enterprise tasks based on multi-agent collaboration includes:
[0008] Receive the original distributed scheduling instructions, generate a task topology flow through semantic parsing; use constraint operators to inject runtime assertions containing preset feature dimension thresholds into each node of the task topology flow according to business rules, define the multi-dimensional logical execution boundary of each execution node, and output a constraint guidance graph.
[0009] The constraint guidance graph is input into the asynchronous engine to drive each execution node to produce service call responses; when the execution node completes the signal, the process-level variable snapshot of the current agent and the global transaction context are captured, and stored in persistent memory to generate a state checkpoint with logical replay capability;
[0010] The service call response is captured in real time and logically compared with the running state assertion; if the comparison result shows that the data offset is out of bounds, the corresponding state checkpoint is extracted from the persistent memory as the replanning benchmark, and the constraint guidance graph is reconstructed by combining the collected environmental disturbance characteristics, the compensation path flow is calculated and sent to the asynchronous engine, and the dynamic self-healing of the chain is executed.
[0011] The alignment signals fed back from each execution node are aggregated, and after confirming that the execution process conforms to the logic of the constraint guidance graph, the task result package is encapsulated and output.
[0012] Preferably, the process of outputting the constraint guidance graph includes: extracting task target parameters and dependencies from the original distributed scheduling instructions; performing topological sorting of the task target parameters according to the dependencies through semantic parsing to generate the task topology flow with a directed acyclic graph structure; extracting logical dependency conditions from business rules, converting them into decision functions recognizable by the constraint operators, and encapsulating them into runtime assertions; injecting the runtime assertions into the corresponding execution nodes of the task topology flow to construct the constraint guidance graph with a two-layer topology structure containing execution logic dimensions and state constraint dimensions; the process of injecting runtime assertions refers to extracting semantic feature vectors of the execution output of each execution node using the logical consistency of service call responses between adjacent execution nodes as a feature dimension; calculating the cosine similarity offset of the output vectors of adjacent agents in the feature description space and comparing it with the preset feature dimension threshold; if the cosine similarity offset exceeds the threshold, it is determined that the multidimensional logical execution boundary has exceeded the limit.
[0013] Preferably, the process of determining the multidimensional logical execution boundary includes: acquiring in real time the logical link execution depth data and computational resource consumption data of each agent when executing task branches, and using them as inputs for the spatiotemporal complexity feature dimension; calculating the logical convergence speed gradient of the execution node in combination with the global transaction context; and setting real-time boundary limits for the execution state of each execution node in the constraint guidance graph by comparing the logical convergence speed gradient with a dynamically adjusted convergence speed threshold.
[0014] Preferably, the process of capturing the process-level variable snapshot includes: obtaining the runtime stack image of the agent at the current execution node through kernel-mode interception; extracting the state embedding vector corresponding to the current decision sequence in user mode and pushing it into the call register so that the kernel-mode interception can synchronously associate the state embedding vector; and mapping and associating the runtime stack image with the state embedding vector to form the process-level variable snapshot.
[0015] Preferably, the state checkpoint with logical replay capability is specifically used for: after subgraph reconstruction, using the process-level variable snapshot to re-simulate the logical execution process, obtaining the deviation value by comparing the deviation between the re-simulation output and the original service call response, and determining whether to update the compensation path based on the deviation value.
[0016] Preferably, the process of associating the data to persistent storage includes: the persistent storage adopts an incremental storage structure based on content addressing; when generating the state checkpoint, the incremental data of the difference variable features of the current execution node data relative to the previous execution node data and the global transaction context are calculated and hash-associative storage is performed to construct a multi-branch version concurrent traceability mapping relationship across the agent chain during the self-healing process.
[0017] Preferably, the constraint guidance graph is reconstructed into a subgraph, which includes: obtaining the execution state deviation value between the service call response and the runtime assertion; identifying the program logic associated subset affected by logic in the constraint guidance graph based on the execution state deviation value; the subgraph reconstruction only performs local instruction topology pruning and execution node reordering on the program logic associated subset, that is, by recursively searching the execution node dependencies in the program logic associated subset, the boundary of the replanning search space that adaptively shrinks at the program logic level is established.
[0018] Preferably, the process of calculating the compensation path flow includes: taking the state checkpoint as the execution starting point, extracting the execution site data stored therein; converting the environmental disturbance features into execution cost factors and injecting them into the replanning benchmark; in the reconstructed subgraph, calculating the instruction evolution sequence from the execution starting point to the endpoint target of the constraint guidance graph through a search algorithm, and encapsulating the instruction evolution sequence into an idempotent control instruction flow; inserting a preset idempotent operator into the instruction flow according to the operation type of the execution entity on different resources, and outputting the compensation path flow that is equivalent to the execution result of the original failed path but has a different logical path.
[0019] Preferably, the dynamic self-healing further includes a global constraint consistency verification process: before issuing the compensation path flow, the global transaction context in the state checkpoint is retrieved, and the expected output value of the compensation path flow in the expected completion state is calculated; the expected output value is verified to meet the final target state boundary defined by the constraint guidance graph. If the verification fails, the current subgraph reconstruction scheme is abandoned and multi-level backtracking is triggered, and the state checkpoint of the earlier sequence position is extracted to restart the replanning.
[0020] Preferably, the process of confirming that the execution process conforms to the constraint guidance graph logic includes: using the alignment signal to trace the causal chain of the service call responses produced by each execution node; verifying the consistency of global task execution by comparing the logical structure topology similarity between the actual execution trajectory of each execution node and the preset logical path in the constraint guidance graph; if an unexpected logical branch is detected due to the distribution of compensation path flow, the state checkpoint is invoked to perform data integrity cleaning and conflict elimination on the task result package, and by eliminating redundant write operations generated by the unexpected logical branch, the task result package aligned with the global final state target parameters of the constraint guidance graph is output.
[0021] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0022] 1. By injecting runtime assertions containing preset feature dimension thresholds, traditional static business rules are transformed into real-time monitoring logic in a two-layer topology structure. Utilizing cosine similarity comparison of semantic feature vectors and monitoring of logical convergence speed gradients, execution deviations can be accurately captured from both semantic and spatiotemporal complexity dimensions, solving the problem of untimely and inaccurate identification of deep logical offsets in traditional monitoring solutions.
[0023] 2. By intercepting the stack image in kernel mode and using hardware registers to synchronize and associate it with the user-mode state embedding vector, the alignment of process-level variable snapshots on the timeline is ensured. Compared to application-layer snapshots, this invention provides on-site data with logic replay capabilities without intruding on business code, laying the foundation for subsequent high-precision logic re-simulation.
[0024] 3. An incremental storage structure based on content addressing is adopted, which uses differential variable calculation and hash association storage to record only the changed parts in the logical chain. This not only greatly reduces the space overhead of persistent storage, but also uses the hash chain to build a clear multi-branch version concurrent traceability relationship, ensuring that the logical state is not lost or conflicted during multi-path replanning.
[0025] 4. During subgraph reconstruction, by identifying the logically related subsets of programs affected by the logic, the replanning space is confined to the local instruction topology, avoiding cascading rollbacks caused by global resets. Combined with the execution cost factor of environmental disturbance feature mapping and idempotent instruction flow encapsulation, the compensation path not only avoids environmental risks but also possesses the security of distributed execution, ensuring equivalent results and optimal paths.
[0026] 5. This invention employs a closed-loop mechanism of "pre-verification, execution, and cleansing." Before self-healing is deployed, it performs global consistency verification of the expected output value. After execution, it traces the causal chain through logical structure topological similarity. Finally, it uses state checkpoints to perform data integrity cleansing and conflict elimination on the result package, solving the problems of redundant branches, intermediate state residues, and dirty data caused by self-healing actions in distributed asynchronous execution, and ensuring the alignment of the delivered task result package with the original global target parameters. Attached Figure Description
[0027] Figure 1 This is an overall flowchart of the method for automatically decomposing and executing complex enterprise tasks based on multi-agent collaboration according to the present invention;
[0028] Figure 2 This is a flowchart of the process-level variable snapshot capture process of the present invention;
[0029] Figure 3 This is a flowchart illustrating the process of associating storage to persistent memory according to the present invention;
[0030] Figure 4 This is a flowchart of the global constraint consistency verification process of the present invention. Detailed Implementation
[0031] To more thoroughly explain the inventive objectives, technical solutions, and advantages of this invention, a detailed description of the invention will be provided below in conjunction with the accompanying drawings and specific implementation scenarios. It should be understood that the embodiments specifically described herein are merely illustrative explanations of the inventive concept, intended to guide those skilled in the art in understanding the invention, and not an exhaustive list of all embodiments of the invention. All other implementation schemes that can be conceived by those skilled in the art without inventive effort based on the logic disclosed in this invention are covered by the patent protection of this invention.
[0032] Please see Figures 1 to 4 This invention provides a method for automatically decomposing and executing complex enterprise tasks based on multi-agent collaboration. The technical solution is as follows:
[0033] A method for automatically decomposing and executing complex enterprise tasks based on multi-agent collaboration includes:
[0034] Receive the original distributed scheduling instructions, generate a task topology flow through semantic parsing; use constraint operators to inject runtime assertions containing preset feature dimension thresholds into each node of the task topology flow according to business rules, define the multi-dimensional logical execution boundary of each execution node, and output a constraint guidance graph.
[0035] The constraint guidance graph is input into the asynchronous engine to drive each execution node to produce service call responses; when the execution node completes the signal, the process-level variable snapshot of the current agent and the global transaction context are captured, and stored in persistent memory to generate a state checkpoint with logical replay capability;
[0036] The service call response is captured in real time and logically compared with the running state assertion; if the comparison result shows that the data offset is out of bounds, the corresponding state checkpoint is extracted from the persistent memory as the replanning benchmark, and the constraint guidance graph is reconstructed by combining the collected environmental disturbance characteristics, the compensation path flow is calculated and sent to the asynchronous engine, and the dynamic self-healing of the chain is executed.
[0037] The alignment signals fed back from each execution node are aggregated, and after confirming that the execution process conforms to the logic of the constraint guidance graph, the task result package is encapsulated and output.
[0038] Example 1:
[0039] This embodiment focuses on the automated orchestration and fault-tolerant processing of interbank clearing tasks in a large-scale financial payment environment. Under the distributed architecture of financial microservices, the task scheduling center needs to handle multiple highly dependent sub-tasks, including "interbank fund transfer," "cascading fee calculation," and "anti-money laundering list comparison."
[0040] In this embodiment of the invention, an intelligent agent refers to the smallest collaborative unit in a distributed architecture with independent execution logic and computing resources, physically manifested as an independent process or container instance. Its relationship with execution nodes and service responses is as follows: the intelligent agent is the physical execution entity, the execution node is the logical orchestration unit, and the service response is its task output. In this invention, eBPF probe mounting, stack image interception, and variable snapshot capture all use the operating system process corresponding to the intelligent agent as the smallest operational granularity. The execution environment must support eBPF extended features (such as Linux Kernel 4.18 and above) to ensure kernel-mode access security. If the intelligent agent is a container instance, the physical host process is synchronously located through the container's namespace identifier, thereby accurately obtaining runtime snapshots.
[0041] First, the process of outputting the constraint guidance graph includes: extracting task target parameters and dependencies from the original distributed scheduling instructions; performing topological sorting of the task target parameters according to the dependencies through semantic parsing to generate the task topology flow with a directed acyclic graph structure; extracting logical dependency conditions from business rules, converting them into decision functions recognizable by the constraint operators, and encapsulating them into runtime assertions; injecting the runtime assertions into the corresponding execution nodes of the task topology flow to construct the constraint guidance graph with a two-layer topology structure containing execution logic dimensions and state constraint dimensions; the process of injecting runtime assertions refers to extracting semantic feature vectors of the execution output of each execution node using the logical consistency of service call responses between adjacent execution nodes as the feature dimension; calculating the cosine similarity offset of the output vectors of adjacent agents in the feature description space and comparing it with the preset feature dimension threshold; if the cosine similarity offset exceeds the threshold, it is determined that the multidimensional logical execution boundary has exceeded the limit.
[0042] Specifically, a semantic parsing engine deployed on a cloud computing center (a server cluster equipped with high-frequency multi-core processors and large-capacity high-speed memory) receives raw distributed scheduling instructions. These raw distributed scheduling instructions are encapsulated in a standard object-oriented data exchange format, containing business logic descriptions and resource constraint parameters. The semantic parsing engine first extracts the task target parameters (such as transfer amount, currency, and target account identifier) and dependencies (such as the requirement that the "funds transfer operator" can only be triggered after the "anti-money laundering comparison operator" returns a pass signal) from the instructions. The semantic analysis algorithm maps the above task target parameters to corresponding execution operators. The topology sorting module sorts the execution operators according to the extracted dependencies, uses a loop detection algorithm to determine whether there are logical loops in the instruction stream, generates a task topology flow with a directed acyclic graph structure, and determines the execution order of each subtask on the logical timeline.
[0043] After the task topology flow is generated, the constraint scheduler starts and retrieves preset business rules from the cache or database (e.g., "the interface response delay for a single cross-line transfer must be less than 300 milliseconds" or "the logical branch of a core transaction commit must satisfy atomic constraints"). The constraint scheduler uses constraint operators to transform these business rules into recognizable decision functions and further encapsulates them into runtime assertions. The transformation process is based on a preset conditional expression syntax template, matching the logical keywords in the business rules to standard logical operators in the predicate logic library using regular expressions. For example, "delay" is mapped to a timestamp difference calculation script, "atomic constraint" is mapped to a state consistency verification callback function of a distributed transaction manager (such as Seata), and unstructured rules are transformed into specific monitoring code. Subsequently, the constraint scheduler injects these runtime assertions one by one into the corresponding execution nodes of the task topology flow. At the data structure level, the original single task path is expanded into a two-layer topology structure that includes the execution logic dimension (task flow) and the state constraint dimension (node determination criteria), forming a complete constraint guidance graph; each execution node is monitored in real time by the corresponding running state assertion before startup, during operation and after completion.
[0044] During the operation of each execution node driven by the distributed asynchronous engine, execution consistency is monitored by establishing logical association constraints across nodes. Specifically, the logical consistency of service call responses between adjacent execution nodes (e.g., the "front-end gateway node" and the "back-end billing node") is used as a feature dimension. The response messages output by each execution node are captured in real time, and their status representation data is extracted. A feature extraction algorithm is used to transform the execution results of each execution node into a 256-dimensional semantic feature vector. This feature extraction algorithm performs a weighted mapping on the status code, interface identifier, and resource consumption value in the response message using a preset word embedding operator, outputting a fixed-length numerical vector. The weighted mapping process involves splitting the response message into discrete and numerical dimensions by field, and performing a MurmurHash algorithm-based extraction on the discrete status code and interface identifier. The modulus is expanded bitwise to form a high-dimensional sparse feature, and linear probing compensation is performed to correct the mapping when a collision is detected. Normalization processing based on linear scaling is performed on numerical resource consumption data. Through a preset dimension alignment mapping, the above features are filled into a 256-dimensional zero vector space in a preset order and with a preset bit width. In this embodiment, the vector bit intervals are allocated as follows: status code features occupy 1-64 bits, interface identifier hash features occupy 65-192 bits, and resource consumption normalization features occupy 193-256 bits. To prevent high-dimensional sparse features from numerically overwhelming low-dimensional continuous features, a preset gain compensation (such as multiplying by a weighting coefficient of 1.5) is performed on the resource consumption normalization features during the filling process, thereby constructing a 256-dimensional linear representation vector with a deterministic structural distribution and balanced feature energy.
[0045] The system calculates the cosine similarity offset of the output vectors produced by adjacent execution nodes in the feature description space in real time. Specifically, it calculates the cosine value of the angle between two vectors, and the cosine similarity offset is obtained by subtracting the cosine value of the angle from the value 1. The calculation result is compared with a preset feature dimension threshold (e.g., set to 0.10). The threshold of 0.10 is determined based on the confidence interval of the logical consistency distribution in the 256-dimensional vector space and is used to characterize the logical deviation threshold of the vector angle in the spatial distribution. That is, when the offset of the cosine value of the vector angle exceeds 10%, it is determined that the semantic distribution of the current execution result deviates from the preset logical envelope. If the calculated cosine similarity offset exceeds 0.10, it is automatically determined that the execution of the current execution node exceeds the multi-dimensional logical execution boundary. At this time, the determination result will trigger the subsequent subgraph reconstruction module. The monitoring thread deployed on each execution node completes the calculation by reading the feature vector snapshot uploaded by the adjacent node through accessing the high-speed distributed global cache (such as Redis cluster) in the cluster or the memory address mapping area based on remote direct memory access.
[0046] This invention decouples execution logic from state constraints by deeply deconstructing business rules into a constraint guidance graph with a two-layer topology. By using high-dimensional semantic feature vector mapping and cosine similarity offset calculation, it transforms abstract logical consistency into quantifiable numerical comparison. Combined with preset dimension thresholds, it improves the sensitivity to identify deep logical deviations between execution nodes, effectively defining the boundaries of multi-dimensional logical execution and providing a reliable triggering benchmark for subsequent task self-healing.
[0047] Furthermore, the process of determining the multidimensional logical execution boundary includes: acquiring in real time the logical link execution depth data and computational resource consumption data of each agent when executing task branches, and using them as inputs for the spatiotemporal complexity feature dimension; calculating the logical convergence speed gradient of the execution node in combination with the global transaction context; and performing real-time boundary constraints on the execution state of each execution node in the constraint guidance graph by comparing the logical convergence speed gradient with the dynamically adjusted convergence speed threshold.
[0048] In this embodiment of the invention, the logic convergence speed gradient refers to a comprehensive index used to quantitatively evaluate the logic advancement efficiency of an execution node under specific resource and time input. Its technical definition is: the efficiency slope determined by the ratio of the normalized execution depth increment as the numerator and the product of the normalized comprehensive resource consumption scalar increment and the sampling time period as the denominator; wherein, the comprehensive resource consumption scalar is a dimensionless value generated by linearly weighting and summing multiple heterogeneous resource indicators (including but not limited to CPU utilization, memory resident volume, and disk I / O throughput), and the sum of the weight coefficients corresponding to each resource indicator is 1. The magnitude of this gradient value directly characterizes the health of task execution: the larger the gradient value, the more efficient the logic advancement; a significant decrease in the gradient value or approaching zero indicates that the system has entered an abnormal state of logic oscillation, invalid recursion, or deadlock.
[0049] Specifically, by tracking the current function call stack or recursion counter of the execution node, the logical levels that the current task branch has penetrated can be identified; for example, in the "cross-bank clearing" task, if the execution node is currently in the "third-level nested sub-transaction: off-site database capacity check", the execution depth is recorded as 3; by polling the server kernel's control group interface, the CPU core utilization, memory page resident amount, and disk I / O throughput of the processes associated with each execution node are extracted at millisecond intervals; for example, the CPU utilization of the current node is recorded as 65%, and the memory allocation is 2.4GB.
[0050] Using the aforementioned execution depth and resource consumption data as input to the spatiotemporal complexity feature dimension, and combining it with the global transaction context extracted from an in-memory database (such as a Redis cluster), the logical convergence speed gradient of the execution node is calculated. Before the calculation, the heterogeneous spatiotemporal complexity data is first normalized: the execution depth is mapped to a proportion relative to the total task depth, and various indicators such as CPU, memory, and disk input / output are weighted and summed according to preset weights (e.g., CPU accounts for 0.5, memory and input / output each account for 0.25), transforming them into a comprehensive resource consumption scalar ranging from 0 to 1; if the resource consumption increment is 0, a small offset is preset (e.g., ... The denominator is adjusted to ensure computational stability. The global transaction context includes the expected completion delay range and historical execution path reference values for the liquidation transaction. In the specific calculation process, the efficiency slope of task execution is characterized by calculating the comprehensive ratio of the execution depth increment to the resource consumption increment and time change per unit time. Specifically, the normalized execution depth difference is used as the numerator, and the product of the change in the comprehensive resource consumption scalar and the sampling time period in seconds is used as the denominator. The current logical convergence speed gradient is determined by the ratio of the two. For example, if the execution depth advances from level 3 to level 4 (the normalized depth increment is converted to 0.01), the comprehensive resource consumption scalar increases sharply from 0.2 to 0.8 (an increment of 0.6), and the sampling time is 0.2 seconds, then due to the sharp increase in resource and time costs at the denominator and the extremely small progress increment at the numerator, the obtained convergence speed gradient shows a significant downward trend. The gradient value is output through numerical processing to characterize whether the node is at risk of falling into logical oscillation, invalid recursion, or deadlock.
[0051] The logical convergence speed gradient is received and compared with a dynamically adjusted convergence speed threshold. The dynamically adjusted convergence speed threshold is issued in real time by the global resource scheduler based on the overall business load of the current clearing system. For example, during peak transaction periods (such as when the system processes more than 10,000 transactions per second), the global resource scheduler increases the convergence speed threshold from the initial value of 0.05 to 0.12 to improve the sensitivity to eliminate inefficient logical branches. If it is determined that the logical convergence speed gradient of the current execution node is lower than the dynamic threshold, the execution state of the corresponding execution node in the constraint guidance graph is immediately subject to real-time boundary constraints. The real-time boundary constraints are implemented by sending a resource quota capping instruction or a logical execution suspension signal to the asynchronous engine. For example, the CPU usage of the execution node is forcibly limited to no more than 10%, and the node is marked as "logical offset state" in the constraint guidance graph, thereby restricting the invalid execution behavior of the node.
[0052] This invention introduces a convergence speed gradient evaluation mechanism by coupling execution depth and resource consumption. This mechanism can more sensitively identify risks such as logic oscillation or deadlock, and combines dynamic thresholds to limit abnormal nodes in real time. This, to a certain extent, avoids the invalid occupation of system resources by invalid logic branches and improves the running stability of complex tasks under different loads.
[0053] Furthermore, such as Figure 2As shown, the process of capturing the process-level variable snapshot includes: obtaining the runtime stack image of the agent at the current execution node through kernel-mode interception; extracting the state embedding vector corresponding to the current decision sequence in user mode and pushing it into the call register so that the kernel-mode interception can synchronously associate the state embedding vector; and mapping and associating the runtime stack image with the state embedding vector to form the process-level variable snapshot.
[0054] Specifically, when the asynchronous engine detects the completion signal of the execution node, this embodiment uses an extended Berkeley packet filter, i.e., a kernel tracing program written in eBPF technology, to intercept the execution process of the current agent in kernel mode; by calling the kernel application programming interface (i.e., API, such as the copy_from_user interface of the Linux kernel or the task register structure task_pt_regs interface), the runtime stack image of the process on the physical core of the central processing unit is captured in real time; the runtime stack image includes the current function call chain, local variable address space, and active handle state.
[0055] Meanwhile, the state embedding vector corresponding to the current task decision sequence is extracted in user space; the state embedding vector is a dense numerical representation of the decision weights and logical states of the agent under the current execution path; in this embodiment, the state embedding vector adopts a fixed-step floating-point array structure of a preset length (e.g., 1024 bytes) and is stored in a contiguous user space memory; in order to achieve atomic synchronization between the kernel-mode image and the user-mode state, before triggering the completion signal, the memory starting address of the state embedding vector is pushed into a specific general-purpose call register through assembly instructions; in this embodiment, if a complex instruction set (x86_64) architecture is used, the R15 register is used; if a reduced instruction set architecture is used, the X19 register is used.
[0056] Specifically, the 1024-byte state embedding vector follows a preset logical segment mapping protocol: bytes 1-512 are defined as the decision weight area, which stores the hidden layer parameters of the neural network activated by the agent at the current execution node. During re-simulation, these parameters are mapped to the inference engine weight memory area of the sandbox process; bytes 513-800 are defined as the logical state area, which uses fixed-width floating-point numbers to represent the finite state machine number and key state bits of the current business logic; bytes 801-1024 are defined as the context index area, which stores the hash digest of the global transaction context and is used for cross-node logical verification during re-simulation.
[0057] Since the kernel tracer has direct read access to the CPU register context at the moment of interception, it simultaneously extracts the memory start address from the specific general-purpose call register while capturing the stack image, and uses this address to access user-mode memory to obtain a complete state embedding vector; it then maps and associates the runtime stack image (binary data stream) with the extracted state embedding vector (numerical matrix) using key-value pairs to form a complete process-level variable snapshot.
[0058] This invention achieves complete capture of the execution context through a cross-level synchronization mechanism: it uses the eBPF kernel tracer to intercept the agent process, captures the kernel-mode stack image containing function call chains and variable addresses in real time, and pushes the state embedding vector address of the user-mode decision sequence into the hardware register through assembly instructions, so that the kernel probe can synchronously retrieve user-mode memory data when reading the register context, and perform key-value pair mapping association to generate process-level variable snapshots.
[0059] This invention achieves deep association between kernel-mode stack and user-mode state through eBPF technology and hardware register relay. By using specific registers as synchronization anchors, it effectively solves the alignment problem between the underlying context and upper-level logic in a non-intrusive environment, reduces data inconsistencies, and provides a more deterministic snapshot benchmark for logic backtracking.
[0060] Furthermore, the state checkpoint with logical replay capability is specifically used for: after subgraph reconstruction, using the process-level variable snapshot to re-simulate the logical execution process, obtaining the deviation value by comparing the deviation between the re-simulation output and the original service call response, and determining whether to update the compensation path based on the deviation value.
[0061] Specifically, when an execution out-of-bounds error is detected and subgraph reconstruction is triggered, the state checkpoint corresponding to the abnormal node is retrieved from persistent storage; the runtime stack image in the snapshot is extracted, and the process context of the agent is reconstructed in an isolated sandbox environment, with the associated state embedding vector injected synchronously; the sandbox environment is pre-installed with a dynamic link library image consistent with the original execution node, and the file handles and environment variables recorded in the snapshot are mapped through virtualization technology; subsequently, using the process-level variable snapshot as initial input, the business logic of the node is re-executed in the sandbox environment; during the re-simulation process, real-time disturbances in the external environment (such as network jitter or database concurrency lock waiting) are shielded, and pure logical operations are performed only based on the variable states in the snapshot; after the re-simulation is completed, the predicted message output by the re-simulation is captured and compared with... The original service call response messages recorded earlier are compared bit by bit. The difference between the two in key business fields (such as settlement amount, handling fee accuracy, and account status bits) is calculated to obtain the deviation value. For example, if the re-simulated output shows that the settlement amount should be 100.00 yuan, while the original response message shows 99.98 yuan, a business logic deviation of 0.02 yuan is calculated. The deviation value is compared with the preset update threshold. If the deviation value exceeds the update threshold (for example, the deviation ratio is greater than 0.01%), it is determined that the out-of-bounds behavior in the original execution process is caused by the underlying program logic defect rather than the instantaneous environmental disturbance. At this time, the compensation path is automatically adjusted for the reconstructed subgraph, and a logic correction operator (such as adding an additional amount verification step) is added to the path. The updated compensation path flow is then sent to the asynchronous engine.
[0062] This invention achieves deep identification of the root causes of deviations by resimulating snapshot execution in an isolated sandbox. By shielding external interference and comparing differences in logic output, it can accurately determine program defects or environmental disturbances, thereby dynamically adjusting compensation paths and implanting correction operators. This process reduces the blindness of self-healing and improves the accuracy of path repair.
[0063] Furthermore, such as Figure 3 As shown, the process of storing the associated data to the persistent memory includes: the persistent memory adopts an incremental storage structure based on content addressing; when generating the state checkpoint, the difference variable features of the current execution node data relative to the previous execution node data and the incremental data of the global transaction context are calculated and hash-associated storage is performed to construct a multi-branch version concurrent traceability mapping relationship across the agent chain during the self-healing process.
[0064] Specifically, after the execution node produces a status checkpoint, a full backup is not performed for physical storage. Instead, the checkpoint data is parsed into multiple data blocks consisting of runtime stacks, variable snapshots, and transaction contexts. The persistent storage uses content-addressed storage technology to generate a globally unique hash index for each independent data block. During storage, only the characteristics of the differential variables that have changed in the current execution node (e.g., only recording the modified "account balance" field and its stack offset in the liquidation task) and the incremental data of the global transaction context (e.g., the newly generated "liquidation serial number") are written. For data blocks that have not changed (such as shared data blocks), no changes are made. (Business rule configuration or repeated logical assertion code), persistent storage only references existing hash indexes in the current version's directory structure; subsequently, through hash association technology, the differential hash value of the current node is chained with the parent hash value of the predecessor node; when multi-path concurrent scheduling occurs or multiple subgraph reconstructions are triggered due to environmental disturbances, persistent storage constructs multi-branch version concurrent traceability mapping relationships based on these hash association relationships; for example, when the "cross-bank clearing" task generates branch A (main path) and branch B (self-healing compensation path) due to timeout replanning, each branch has an independent hash pointing chain that can be traced back to its common initial state node.
[0065] This invention achieves efficient management of task status by constructing a hash-chain-related incremental storage system: the status checkpoint is parsed into multiple independent data blocks, and a global hash index is generated for each data block using content addressing technology. During persistence, only the changed difference variable features and transaction context increments in the current node are written, while the unchanged parts are replaced by referencing the historical hash index. Hash association technology is used to chain the difference index of the current node with the parent hash of the previous node, thereby establishing a corresponding version traceability mapping relationship in multi-branch concurrent scheduling scenarios.
[0066] This invention, through content addressing and incremental storage, records only the differences between execution nodes and transaction increments, effectively alleviating the storage pressure caused by frequent snapshots. By leveraging a multi-branch tracing mapping constructed using hash chain binding, it ensures relatively accurate location and replay of historical branch states in complex subgraph reconstruction scenarios, effectively avoiding version overwrite conflicts and improving logical tracing capabilities under multi-path concurrent scheduling.
[0067] Furthermore, the constraint-guided graph is reconstructed into a subgraph, including: obtaining the execution state deviation value between the service call response and the runtime assertion; identifying the program logic associated subset affected by logic in the constraint-guided graph based on the execution state deviation value; the subgraph reconstruction only performs local instruction topology pruning and execution node reordering on the program logic associated subset, that is, by recursively searching the execution node dependencies in the program logic associated subset, establishing the boundary of the replanning search space that adaptively shrinks at the program logic level.
[0068] Specifically, after outputting the execution status deviation value (e.g., the aforementioned business logic deviation of 0.02 yuan), firstly, using the dependency tracking algorithm, with the current execution node that has exceeded the limit as the root node, all execution nodes with direct or indirect data dependencies are retrieved backward in the constraint guidance graph. For example, in the "interbank clearing" task, if the "handling fee calculation node" has a deviation, only the "net amount netting node" and "bill generation node" that depend on the handling fee result are identified as the program logic associated subset affected by the logic; while the "anti-money laundering compliance verification node" that runs parallel to it is not included in the subset because it is unrelated to the handling fee result in the data flow.
[0069] Subsequently, the refactoring module performs local instruction topology pruning on the logically related subset of the program; specifically, it cuts off the logical connections between the subset nodes and the undamaged nodes in the original topology flow, and only re-evaluates the order of execution nodes within the subset; for example, if the deviation causes the original parallel execution conditions to fail, the damaged nodes are reordered into serial verification mode.
[0070] By recursively searching the dependency depth within this subset, an adaptively convergent replanning search space boundary is established. The recursive search uses the topological hierarchy of the execution node as the step size and calculates the mutual information gain of each successor node relative to the deviation node in real time. Simultaneously, the average background association entropy of the current task flow in the initial silent state is retrieved as the judgment criterion. When the decay level of the mutual information gain converges to the confidence interval of the background association entropy, the judgment logic coupling has been decoupled and the recursive search is automatically terminated. The search space boundary is established using this dynamic criterion based on background entropy self-calibration.
[0071] This invention identifies damaged logical subsets using a dependency tracking algorithm, enabling targeted local instruction topology pruning and reordering. This approach establishes an adaptively shrinking search space boundary, avoiding global cascading rollbacks. While ensuring the self-repair of execution logic, it significantly reduces system overhead and recomputation latency during the self-healing process, thereby improving the self-healing efficiency of complex task flows.
[0072] Further, the process of calculating the compensation path flow includes: taking the state checkpoint as the execution starting point, extracting the execution site data stored therein; converting the environmental disturbance features into execution cost factors and injecting them into the replanning benchmark; in the reconstructed subgraph, calculating the instruction evolution sequence from the execution starting point to the endpoint target of the constraint guidance graph through a search algorithm, and encapsulating the instruction evolution sequence into an idempotent control instruction flow; inserting a preset idempotent operator into the instruction flow according to the operation type of the execution entity on different resources, and outputting the compensation path flow that is equivalent to the execution result of the original failed path but has a different logical path.
[0073] Preferably, in this embodiment of the invention, the environmental disturbance features refer to a set of external variables that affect the execution stability of the distributed system, including numerical time-series indicators (such as network round-trip latency, CPU utilization, memory page swapping rate, and disk I / O throughput) and discrete event indicators (such as circuit breaker alarms, rate limiting signals, and database connection pool overflow flags). The environmental disturbance features are collected in real time by monitoring agents deployed on the execution nodes and uniformly organized into environmental disturbance feature vectors. Various features are normalized according to preset rules. For example, latency and throughput are linearly scaled and mapped to the [0, 1] interval, and discrete events are converted into Boolean vectors through one-hot encoding. The processed environmental disturbance feature vectors are input into a preset risk weight model, and the execution cost factor is calculated by weighted summation, which serves as the edge weight reference value for the heuristic search algorithm in subgraph reconstruction, thereby achieving path planning that avoids high-risk paths.
[0074] Specifically, after determining the boundary of the replanning search space, the state checkpoint in persistent memory is used as the logical starting point to restore the register variables, intermediate computation states, and completed transaction identifiers of the node. Simultaneously, collected environmental disturbance features (such as a 500ms increase in the average latency of the current interbank gateway and / or the target database connection pool level reaching 90%) are mapped into numerical execution cost factors. The specific mapping process is as follows: a linear regression model of environmental disturbance features and cost scores is preset; the deviation ratio of the gateway latency increment relative to the standard latency and the overflow ratio of the current connection pool level relative to the safety threshold are weighted and summed to calculate the comprehensive cost value representing the node's risk weight. The execution cost factor is injected into the replanning benchmark as a weight parameter for heuristic search algorithms (such as the A* algorithm or Dijkstra's algorithm). In the reconstructed subgraph, the search algorithm avoids high-cost paths in real time (e.g., avoiding high-latency gateway interfaces) and replans the optimal instruction evolution sequence from the current execution starting point to the task endpoint (e.g., "complete fund clearing receipt").
[0075] To ensure that compensation paths are repeatedly issued in a distributed environment without causing business conflicts, the instruction evolution sequence is encapsulated into an idempotent control instruction stream. Idempotent operators are dynamically inserted into the instruction stream based on the type of operation performed by the executing entity on different resources. For example, for non-idempotent resource operations such as "account balance deduction", a judgment operator based on a distributed unique key is inserted to ensure that a clearing request with the same serial number is processed only once during the retry process. For inherently idempotent operations such as "status query", a no-operation operator is inserted to optimize performance. Although the compensation path stream generated in this way differs from the original failed path in terms of specific physical call chain or execution order (e.g., from the original "asynchronous cascading execution" to "synchronous execution with feedback"), the final business execution result is completely equivalent to the expected goal.
[0076] This invention maps environmental disturbances to execution cost factors and utilizes a search algorithm to replan instruction sequences that avoid risky paths. Combined with dynamic injection of idempotent operators, it ensures the safety of repeated execution of compensation paths in a distributed environment, achieving equivalent results under path changes. This approach can smoothly cope with environmental fluctuations, ensuring the closed loop of business logic while reducing the risk of execution interruption due to task failures.
[0077] Furthermore, such as Figure 4 As shown, the dynamic self-healing also includes a global constraint consistency verification process: before issuing the compensation path flow, the global transaction context in the state checkpoint is retrieved, and the expected output value of the compensation path flow in the expected completion state is calculated; the expected output value is verified to satisfy the final target state boundary defined by the constraint guidance graph. If the verification fails, the current subgraph reconstruction scheme is abandoned and multi-level backtracking is triggered to extract the state checkpoint of the earlier sequence position and restart the replanning.
[0078] Specifically, before formally issuing the compensation path flow to the asynchronous engine for execution, a global risk pre-verification of the scheme is first performed at the logical level; the global transaction context is extracted from the state checkpoint, which includes the original business objective of the task (such as "ensuring that the total balance of all sub-accounts remains constant") and the allowed logical deviation threshold; the evolution process of the compensation path flow in the reconstruction subgraph is simulated using symbolic execution techniques or simulation models, and its expected output value under ideal completion is estimated in combination with the current environmental cost factor; in "interbank clearing", if the compensation path plan bypasses the damaged gateway by adding an "intermediate temporary transfer account", it is pre-calculated whether the final aggregated clearing amount and clearing timestamp after the path is executed are still within the target state boundary defined by the constraint guidance graph (e.g., the total clearing error must be less than...). And the final completion time must not be later than the business cut-off point.
[0079] If the verification result shows that the expected output value exceeds the target state boundary (for example, the cumulative delay caused by intermediate transfer will cause the entire clearing transaction to violate regulatory time constraints), then the current subgraph reconstruction scheme is determined to be an "invalid repair scheme". At this time, a multi-level backtracking mechanism is immediately executed, abandoning the replanning attempt of the current node, and instead searching upstream for the state checkpoint of an earlier sequence position. For example, if the reconstruction triggered from the "fee calculation node" cannot satisfy global consistency, it will backtrack to the checkpoint corresponding to the previous "anti-money laundering comparison node". By extracting earlier stack images and state vectors, the coverage of replanning is expanded, and an attempt is made to rebuild a completely new constraint-guided graph from the upstream business logic entry point.
[0080] This invention achieves proactive risk control for replanning schemes by introducing global consistency verification and expected output pre-verification. Combined with a multi-level backtracking mechanism, it can effectively identify and intercept invalid schemes that fail to meet the final state objective, thus avoiding secondary risks caused by error self-healing to a certain extent and ensuring the compliance and target achievement rate of task path search under extreme conditions.
[0081] Furthermore, the process of confirming that the execution process conforms to the constraint guidance graph logic includes: using the alignment signal to trace the causal chain of the service call responses produced by each execution node; verifying the consistency of global task execution by comparing the logical structure topology similarity between the actual execution trajectory of each execution node and the preset logical path in the constraint guidance graph; if an unexpected logical branch is detected due to the distribution of compensation path flow, the state checkpoint is invoked to perform data integrity cleaning and conflict elimination on the task result package, and by eliminating redundant write operations generated by the unexpected logical branch, the task result package aligned with the global final state target parameters of the constraint guidance graph is output.
[0082] Specifically, as the task nears its final state, alignment signals from each execution node are aggregated. Each alignment signal contains a logical stamp and a data fingerprint from the node's execution. The logical stamp is used for initial temporal sorting, and the pre-stored preceding operator state summary execution feature is extracted from the data fingerprint for anchoring. A chained index between execution nodes is established by matching transaction serial numbers, and the actual execution trajectory is reconstructed in memory.
[0083] Subsequently, the actual execution trajectory is compared with the original logical path preset in the constraint guidance graph for logical structure topological similarity. Since compensation path flows may be issued during execution, the actual execution trajectory may locally manifest as a variant of the original path. By calculating the graph editing distance between the two directed acyclic graphs, the operational cost of the actual execution path deviating from the preset logical template is characterized, and it is verified whether the global task execution still maintains consistency in logical semantics.
[0084] If the comparison reveals unexpected logical branches triggered by the compensation path flow in the actual execution trajectory (e.g., duplicate billing instructions due to network retries, or unrevoked intermediate state records generated during backtracking), data integrity cleaning is triggered. During cleaning, state checkpoints in persistent storage are retrieved, and the global transaction context in the checkpoints is used as the true value benchmark. Redundant write operations unrelated to the global final state goal of the constraint guidance graph are identified and eliminated by scanning all atomic operation records in the task result package. For example, in the "interbank clearing" task, if two duplicate "pre-payment" instructions are generated due to replanning, the cleaning program will revoke the redundant fund freeze records before the result package is encapsulated based on the idempotency flag and transaction backtracking log. Finally, through conflict elimination logic, the stray data generated by multi-path parallel or compensation execution is merged and unified, and a task result package that is completely aligned with the global final state goal parameters of the constraint guidance graph is output.
[0085] This invention ensures the consistency of task delivery through multi-dimensional logical trajectory verification and data refinement. Throughout the process, alignment signals containing logical stamps and data fingerprints from each execution node are aggregated. Causal chain tracing technology is used to reconstruct the actual execution trajectory, which is then compared with the preset logical paths in the constraint guidance graph for topological similarity and graph editing distance. If an unexpected logical branch caused by a compensation path is detected, the global transaction context in the status checkpoint is retrieved as a benchmark. Atomic operation records in the task result package are scanned, and data integrity cleaning is performed, eliminating redundant write operation records and resolving conflicts.
[0086] This invention achieves topological consistency verification between the actual execution trajectory and the preset logic through causal chain tracing and graph editing distance calculation; combined with data integrity cleaning, it can effectively identify and eliminate redundant write operations generated by compensation paths; this eliminates logical conflicts caused by multi-path execution to a certain extent, ensures accurate alignment between the task result package and the global final state target, and guarantees the uniqueness and consistency of the delivered data.
[0087] This invention constructs a two-layer constraint guidance graph containing runtime assertions and utilizes semantic feature vector offset comparison to achieve quantitative monitoring of deep logic bounds in distributed tasks. By combining kernel-state snapshots with state checkpoints generated from the global context, it ensures atomic alignment between the underlying state and upper-level decisions, providing a high-reliability playback benchmark for subgraph reconstruction. Combined with adaptive compensation paths and causal chain tracing, this scheme enhances the task flow's resilience to disturbances while ensuring global final state consistency through data cleaning. This closed-loop correction architecture significantly reduces the risk of failure and provides a robust, self-healing execution solution for heterogeneous multi-agent collaboration.
[0088] Example 2:
[0089] This embodiment focuses on the scheduling and collaborative execution of automated flexible production lines in a large-scale industrial internet environment. In a flexible manufacturing unit, the production scheduling center needs to orchestrate in real time sub-task flows with strong physical relationships, including "workpiece visual positioning," "multi-axis robotic arm trajectory planning," and "precision assembly quality inspection." Due to network electromagnetic interference, instantaneous sensor noise, and motion delays caused by mechanical wear in the workshop environment, the execution chain is highly susceptible to deviating from preset industrial protocol constraints.
[0090] First, the semantic parsing engine receives distributed scheduling instructions containing processing routes and material ratios; it then extracts key target parameters (such as assembly accuracy). Process cycle time The topology module generates a task topology flow with a directed acyclic graph structure, and uses constraint operators to transform process rules into runtime assertions (such as "joint torque feedback value must not exceed the preset safety envelope"). These runtime assertions are injected into the topology nodes to construct a two-layer topology structure containing both processing logic and physical constraint dimensions, i.e., a constraint-guided graph.
[0091] During the process of the robotic arm performing tasks driven by the automation engine, the service call responses of the robotic arm controller are captured in real time. A feature extraction algorithm is used to transform the physical state of each execution node (such as coordinate pose, drive current, and joint velocity) into a 256-dimensional semantic feature vector. The cosine similarity offset of the output vectors between adjacent nodes in the feature description space is calculated and compared with a preset feature dimension threshold (e.g., 0.10). If the cosine similarity offset exceeds the threshold, it is determined that the current physical state is affected by environmental disturbances and has deviated from the preset envelope; this is identified as a logical boundary violation, triggering a subgraph reconstruction mechanism.
[0092] During the execution of a task branch by the robotic arm, the execution depth data of the logic link (e.g., the 5th level recursive call in the "fine assembly stage") and the computational resource consumption data are acquired simultaneously, and the logic convergence speed gradient is calculated accordingly. If the abnormal placement of the workpiece causes the robotic arm to fall into logical oscillation of repetitive search actions, resulting in the logic convergence speed gradient being lower than the dynamically adjusted threshold, it is determined that the currently running execution node faces the risk of logic loss of control. At this time, the execution state of the execution node is immediately subject to real-time boundary constraints, and the mechanical collision at the physical level is prevented by constraining the action envelope of the robotic arm.
[0093] When a node triggers a completion signal, the runtime stack image of the control process is intercepted and obtained through the eBPF kernel probe. The state embedding vector corresponding to the decision sequence is extracted in user space. Hardware registers (such as R15 under x86 architecture or X19 under ARM architecture) are used as transit identifiers to atomically associate the underlying instruction context with the upper-level process parameters, generate state checkpoints, and store them in content-addressable persistent memory.
[0094] When visual positioning is determined to be out of bounds and reconstruction is triggered, the state checkpoint of the abnormal node is extracted from the persistent memory; the process context of the robotic arm is reconstructed in an isolated sandbox environment, and the same motion control algorithm library image is pre-installed; during the re-simulation process, the interference of on-site noise is shielded, and pure logic operations are performed based on snapshot variables; the predicted coordinates output by the re-simulation are compared with the actual captured deviation coordinates. If the deviation ratio exceeds the threshold (e.g., 0.05%), it is determined to be a defect of the algorithm logic under special working conditions rather than instantaneous noise.
[0095] Subsequently, the reconstruction module performs local instruction topology pruning on the affected logically related subsets of "trajectory calculation" and "grasp compensation," and recalculates the compensation path flow. During the calculation, environmental disturbances such as sensor delay are converted into execution cost factors, and the A* algorithm is used to search for a new instruction evolution sequence from the current checkpoint to the assembly endpoint. Idempotent operators are inserted into the instruction flow to ensure that even if compensation instructions are issued multiple times, the robotic arm will not perform repeated reset actions.
[0096] Before issuing the compensation path, a global constraint consistency check is performed to simulate and extrapolate the expected assembly accuracy after the compensation path is executed. If the extrapolation shows that replanning the path will cause the final product tolerance to exceed the limit, multi-level backtracking is triggered to extract the state checkpoints of earlier sequences (such as backtracking to the "coarse positioning stage") and replan the process path.
[0097] Finally, the alignment signals of each node are aggregated, and the topological similarity between the actual execution trajectory and the process template is compared using a graph editing distance algorithm. If an unexpected logical branch generated by the reconstruction is detected (such as redundant calibration action records), the status checkpoint is retrieved to clean and eliminate conflicts in the processing data package, redundant instruction records are removed, and the final processing task result package that meets the process final state requirements is output.
[0098] Through this dynamic self-healing mechanism, the flexible production line can autonomously repair logical deviations caused by physical disturbances without the need for manual intervention and downtime, ensuring the continuity of high-precision assembly tasks and product consistency.
[0099] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. For those skilled in the art, various improvements, modifications, or equivalent substitutions of some technical features can be made without departing from the core concept and technical framework of the present invention, and all such improvements and substitutions should be considered to fall within the protection scope of the present invention. Therefore, the substantive protection boundary of the present invention should be determined by the contents of the claims.
Claims
1. A method for automatically decomposing and executing complex enterprise tasks based on multi-agent collaboration, characterized in that, include: Receive raw distributed scheduling instructions and generate task topology flow through semantic parsing; By using constraint operators to inject runtime assertions containing preset feature dimension thresholds into each node of the task topology flow according to business rules, multi-dimensional logical execution boundaries of each execution node are defined, and a constraint guidance graph is output. The process of outputting the constraint guidance graph includes: The process involves extracting task target parameters and dependencies from the original distributed scheduling instructions; performing topological sorting of the task target parameters based on the dependencies through semantic parsing to generate a task topology flow with a directed acyclic graph structure; extracting logical dependency conditions from business rules, converting them into decision functions recognizable by the constraint operators, and encapsulating them into runtime assertions; injecting the runtime assertions into the corresponding execution nodes of the task topology flow to construct a constraint guidance graph with a two-layer topology structure containing execution logic dimensions and state constraint dimensions; the process of injecting runtime assertions refers to extracting semantic feature vectors of the execution output of each execution node using the logical consistency of service call responses between adjacent execution nodes as the feature dimension; calculating the cosine similarity offset of the output vectors of adjacent agents in the feature description space and comparing it with the preset feature dimension threshold; if the cosine similarity offset exceeds the threshold, it is determined that the multidimensional logical execution boundary has exceeded the limit. The constraint guidance graph is input to the asynchronous engine, driving each execution node to produce service call responses. When the execution node completes, a snapshot of the current agent's process-level variables and the global transaction context are captured and stored in persistent memory to generate a state checkpoint with logical replay capability. The process of determining the multi-dimensional logical execution boundary includes: acquiring in real time the logical link execution depth data and computational resource consumption data of each agent when executing task branches, and using them as inputs for the spatiotemporal complexity feature dimension; calculating the logical convergence speed gradient of the execution node in combination with the global transaction context; and defining the execution state of each execution node in the constraint guidance graph in real time by comparing the logical convergence speed gradient with a dynamically adjusted convergence speed threshold. The service call response is captured in real time and logically compared with the running state assertion; if the comparison result shows that the data offset is out of bounds, the corresponding state checkpoint is extracted from the persistent memory as the replanning benchmark, and the constraint guidance graph is reconstructed by combining the collected environmental disturbance characteristics, the compensation path flow is calculated and sent to the asynchronous engine, and the dynamic self-healing of the chain is executed. The alignment signals fed back from each execution node are aggregated, and after confirming that the execution process conforms to the logic of the constraint guidance graph, the task result package is encapsulated and output.
2. The method for automatically decomposing and executing complex enterprise tasks based on multi-agent collaboration as described in claim 1, characterized in that, The process of capturing the process-level variable snapshot includes: obtaining the runtime stack image of the agent at the current execution node through kernel-mode interception; extracting the state embedding vector corresponding to the current decision sequence in user mode and pushing it into the call register so that the kernel-mode interception can synchronously associate the state embedding vector; and mapping and associating the runtime stack image with the state embedding vector to form the process-level variable snapshot.
3. The method for automatically decomposing and executing complex enterprise tasks based on multi-agent collaboration as described in claim 1, characterized in that, The state checkpoint with logical replay capability is specifically used for: after subgraph reconstruction, using the process-level variable snapshot to re-simulate the logical execution process, obtaining the deviation value by comparing the deviation between the re-simulation output and the original service call response, and determining whether to update the compensation path based on the deviation value.
4. The method for automatically decomposing and executing complex enterprise tasks based on multi-agent collaboration as described in claim 1, characterized in that, The process of storing the associated data to the persistent storage includes: the persistent storage adopts an incremental storage structure based on content addressing; when generating the state checkpoint, the difference variable features of the current execution node data relative to the previous execution node data and the incremental data of the global transaction context are calculated and hash-associated storage is performed to construct a multi-branch version concurrent traceability mapping relationship across the agent chain during the self-healing process.
5. The method for automatically decomposing and executing complex enterprise tasks based on multi-agent collaboration as described in claim 1, characterized in that, The constraint-guided graph is reconstructed into a subgraph, including: obtaining the execution state deviation value between the service call response and the runtime assertion; identifying the program logic associated subset affected by logic in the constraint-guided graph based on the execution state deviation value; the subgraph reconstruction only performs local instruction topology pruning and execution node reordering on the program logic associated subset, that is, by recursively searching the execution node dependencies in the program logic associated subset, the boundary of the replanning search space that adaptively shrinks at the program logic level is established.
6. The method for automatically decomposing and executing complex enterprise tasks based on multi-agent collaboration as described in claim 5, characterized in that, The process of calculating the compensation path flow includes: taking the state checkpoint as the execution starting point and extracting the execution site data stored therein; converting the environmental disturbance features into execution cost factors and injecting them into the replanning benchmark; in the reconstructed subgraph, calculating the instruction evolution sequence from the execution starting point to the endpoint target of the constraint guidance graph through a search algorithm, and encapsulating the instruction evolution sequence into an idempotent control instruction flow; inserting a preset idempotent operator into the instruction flow according to the operation type of the execution entity on different resources, and outputting the compensation path flow that is equivalent to the execution result of the original failed path but has a different logical path.
7. The method for automatically decomposing and executing complex enterprise tasks based on multi-agent collaboration as described in claim 1, characterized in that, The dynamic self-healing also includes a global constraint consistency verification process: before issuing the compensation path flow, the global transaction context in the state checkpoint is retrieved, and the expected output value of the compensation path flow in the expected completion state is calculated. Verify whether the expected output value satisfies the final target state boundary defined by the constraint-guided graph. If the verification fails, abandon the current subgraph reconstruction scheme and trigger multi-level backtracking to extract the state checkpoint of an earlier sequence position and restart the replanning.
8. The method for automatically decomposing and executing complex enterprise tasks based on multi-agent collaboration as described in claim 1, characterized in that, The process of confirming that the execution process conforms to the constraint guidance graph logic includes: using the alignment signal to trace the causal chain of the service call responses produced by each execution node; verifying the consistency of global task execution by comparing the logical structure topology similarity between the actual execution trajectory of each execution node and the preset logical path in the constraint guidance graph; if an unexpected logical branch is detected due to the distribution of compensation path flow, the state checkpoint is invoked to perform data integrity cleansing and conflict elimination on the task result package, and by eliminating redundant write operations generated by the unexpected logical branch, the task result package aligned with the global final state target parameters of the constraint guidance graph is output.