Business process-based complex task multi-agent collaborative disassembly method and system
By constructing a business process graph and an intelligent agent collaborative decomposition method, closed-loop dependencies are identified and processed, intelligent agents are accurately matched, and anomaly localization and data alignment are achieved. This solves the problems of low task decomposition efficiency and poor robustness in existing technologies, and improves the stability and collaboration efficiency of the system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING YIZHUANG INTELLIGENT CITY RES INST GRP CO LTD
- Filing Date
- 2026-01-19
- Publication Date
- 2026-05-08
AI Technical Summary
Existing technologies, in the collaborative decomposition of complex tasks based on business processes and involving multiple agents, cannot adaptively adjust task decomposition strategies, struggle to identify and handle circular dependency paths, exhibit inaccurate agent matching, and lack systematic exception handling, resulting in low execution efficiency and poor system robustness.
By constructing a business process graph, identifying closed-loop dependency paths and setting up a cyclic monitoring mechanism, selecting the most suitable intelligent agent based on constraint logic and reasoning rule base, establishing a causal tracing chain and constructing an anomaly propagation graph, accurate matching and anomaly localization are achieved, and semantically aligned data transmission is performed.
It improves the accuracy and efficiency of task breakdown, prevents infinite loops, enhances system stability and fault recovery capabilities, ensures the accuracy and integrity of information transmission, and strengthens the system's adaptability and collaboration efficiency.
Smart Images

Figure CN121542094B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and in particular to a method and system for collaborative decomposition of complex tasks based on business processes by multiple intelligent agents. Background Technology
[0002] With the rapid development of artificial intelligence technology, multi-agent collaborative systems are demonstrating increasingly important value in handling complex business processes. In modern enterprise environments, business processes often involve collaboration among multiple stages and roles, typically exhibiting complex dependencies, cyclical structures, and exception handling mechanisms. Traditional business process automation relies primarily on predefined rules and flowcharts, which struggle to address dynamically changing business needs. However, with the development of large-scale language models and agent technology, it has become possible to automatically break down complex tasks and assign them to multiple specialized agents for collaborative completion. This approach effectively improves the automation level and processing efficiency of business processes.
[0003] Existing technologies still have some shortcomings and deficiencies in the collaborative decomposition of complex tasks based on business processes by multiple agents. Most existing multi-agent systems adopt static task allocation mechanisms, which cannot adaptively adjust task decomposition strategies according to the dynamic changes of business processes. In particular, for business processes containing complex loop structures, it is difficult to effectively identify and handle circular dependency paths, resulting in low task execution efficiency or getting stuck in infinite loops. Existing technologies mainly rely on simple rule matching or keyword matching in matching agents and subtasks, lacking in-depth analysis of the historical execution capabilities of agents and logical consistency assessment. This makes it impossible to guarantee the selection of the most suitable agent to execute a specific subtask, which is particularly evident when dealing with highly specialized business processes with complex constraints. Existing multi-agent systems generally adopt simple retry or rollback strategies in anomaly handling, lacking systematic anomaly tracing and propagation analysis mechanisms. They cannot accurately locate the source of anomalies and generate appropriate alternative solutions, resulting in poor system robustness in complex business scenarios and difficulty in achieving process continuity and reliability. Summary of the Invention
[0004] This invention provides a method and system for collaborative decomposition of complex tasks by multiple agents based on business processes, which can solve the problems in the prior art.
[0005] A first aspect of this invention provides a method for collaborative decomposition of complex tasks based on business processes using multi-agent collaboration, comprising:
[0006] Analyze business process documents, extract process nodes and dependencies, and construct a business process graph;
[0007] The complex task is matched with the process nodes in the business process diagram to obtain a set of matching nodes;
[0008] Identify closed-loop dependency paths in the matching node set, mark the loop node group, extract the business termination conditions to set up a loop monitoring mechanism, and convert the loop node group into a subtask based on the termination signal.
[0009] The execution constraints of subtasks are expressed as constraint logic formulas, and the historical execution records of agents are expressed as reasoning rule bases. By matching and calculating the logical consistency score, the agent with the highest logical consistency score is selected for binding.
[0010] When the agent executes a subtask, a causal tracing chain is established. When an execution anomaly is detected, the causal tracing chain is traced back to the anomaly source subtask. An anomaly feature vector of the anomaly source subtask is extracted. An anomaly propagation graph is constructed based on the anomaly feature vector. Node features are extracted from the business process graph for matching. The process node with the highest matching degree is selected as the alternative process node to generate an alternative subtask.
[0011] Semantically align the output data of the preceding subtask with the input constraints of the subsequent subtask, inject the aligned data into the subsequent agent, and trigger its execution.
[0012] In one optional embodiment, identifying closed-loop dependency paths in the matching node set and marking cyclic node groups, extracting service termination conditions to set a cyclic monitoring mechanism, and converting cyclic node groups into subtasks based on termination signals includes:
[0013] Iterate through the dependencies between process nodes in the matching node set. When a closed-loop dependency path is detected between process nodes, mark the process nodes on the closed-loop dependency path as a loop node group.
[0014] Extract the business termination conditions corresponding to the loop node groups from the business process diagram, express the constraint variables in the business termination conditions as state variables, and transform the judgment logic into Boolean logic expressions.
[0015] An iteration counter and a state tracker are set at the starting process node of the loop node group. The iteration counter records the number of times the loop node group is executed, and the state tracker records the real-time values of the constraint variables. The iteration counter and the state tracker are updated each time the loop node group is executed.
[0016] The real-time values recorded by the state tracker are substituted into a Boolean logic expression for calculation. When the calculation result is true, a loop termination signal is generated.
[0017] Each process node in the loop node group is converted into a subtask. The current value of the iteration counter is used as the iteration identifier of the subtask, and the loop termination signal is used as the termination judgment basis of the subtask. A subtask containing the iteration identifier and the termination judgment basis is generated.
[0018] In one optional embodiment, the execution constraints of subtasks are expressed as constraint logic expressions, the historical execution records of agents are expressed as inference rule bases, and the agent with the highest logical consistency score is selected for binding by matching and calculating logical consistency scores.
[0019] Extract the precondition variables and postcondition variables from the execution constraints of the subtasks, express the precondition variables as logical predicates, and express the postcondition variables as logical postconditions to construct the logical expression of the subtask constraints;
[0020] Extract the input and output states from the agent's historical execution records, map the input states to the premises of the reasoning rules, and map the output states to the conclusions of the reasoning rules to generate a reasoning rule base.
[0021] The antecedent predicate in the subtask constraint logic is decomposed into atomic predicate sequences, the premise items in the reasoning rule base are decomposed into atomic premise sequences, the structural isomorphism between the atomic predicate sequences and the atomic premise sequences is calculated one by one, and the premise matching score is generated based on the structural isomorphism.
[0022] The consequent predicate in the subtask constraint logic is decomposed into a target state vector, the conclusion item in the reasoning rule base is decomposed into an actual state vector, the vector distance between the target state vector and the actual state vector is calculated, and the conclusion matching score is generated based on the reciprocal of the vector distance.
[0023] The logical consistency score is obtained by weighted summation of the premise matching score and the conclusion matching score, and the agent with the highest logical consistency score is selected for binding.
[0024] In one optional embodiment, a causal tracing chain is established when the agent executes a subtask. When an execution anomaly is detected, the causal tracing chain is traced back to the subtask that caused the anomaly. The anomaly feature vector of the subtask that caused the anomaly is extracted includes:
[0025] When the intelligent agent executes a subtask, it performs a hash operation on the input data to generate an input data fingerprint, and then stores the input data fingerprint in association with the subtask identifier.
[0026] After the subtask is completed, the output data is hashed to generate an output data fingerprint. The data transmission relationship between the subtask and subsequent subtasks is extracted. The output data fingerprint, subtask identifier and data transmission relationship are constructed as causal traceability nodes. The causal traceability nodes are connected in sequence according to the execution time to form a causal traceability chain.
[0027] Monitor the status information of the agent executing sub-tasks. When a predefined abnormal pattern occurs, trigger an abnormal detection signal, extract the abnormal sub-task identifier, locate the corresponding causal tracing node from the causal tracing chain, obtain the data transmission relationship, and traverse the previous causal tracing node along the reverse path of the data transmission relationship.
[0028] During the traversal, the input data fingerprint and output data fingerprint are extracted for each preceding causal tracing node. The consistency of the output data fingerprint and the input data fingerprint of the subsequent node is checked. When the check fails, the preceding causal tracing node is marked as the abnormal source node, the corresponding subtask is extracted, and the abnormal source subtask is determined.
[0029] Extract input data anomaly features, execution logic anomaly features, and output data anomaly features from the execution records of the anomaly source subtask, and combine them into an anomaly feature vector.
[0030] In one optional embodiment, verifying the consistency between the output data fingerprint and the input data fingerprint of the successor node includes:
[0031] The fingerprint transformation pattern from the output data fingerprint to the input data fingerprint is extracted from the data transmission relationship. The fingerprint transformation pattern records the change pattern of the hash value when the data is transmitted between nodes.
[0032] The fingerprint space is mapped by applying fingerprint transformation mode to the output data fingerprint to generate the expected input data fingerprint. The bitwise XOR result between the expected input data fingerprint and the input data fingerprint of the successor node is calculated. The number of bits with a value of 1 in the XOR result is counted to determine the fingerprint deviation.
[0033] When the fingerprint deviation exceeds the preset deviation threshold, the verification is deemed to have failed, and the preceding causal tracing node is marked as the abnormal source node.
[0034] In one optional embodiment, an anomaly propagation graph is constructed based on the anomaly feature vector, and node features are extracted from the business process graph for matching. The process node with the highest matching degree is selected as the alternative process node, and the alternative subtasks are generated, including:
[0035] The time-series feature sequence is obtained by deconstructing the abnormal feature vector. The rate of change and fluctuation amplitude of the time-series feature sequence are calculated based on the sliding time window to generate an abnormal evolution feature set.
[0036] An anomaly propagation graph is constructed based on the anomaly evolution feature set. The propagation strength and direction between process nodes are recorded in the diffusion layer, and the performance loss and resource consumption of process nodes are recorded in the influence layer. The set of candidate anomaly nodes and the set of risk nodes are obtained by mapping the diffusion layer and the influence layer.
[0037] Extract task types, input / output specifications, and resource consumption of process nodes from the business process graph to construct execution feature vectors, and calculate the similarity between execution feature vectors to obtain the node connection weight matrix;
[0038] A node matching network is constructed based on the node connection weight matrix. The node matching network is clustered using a community discovery algorithm to obtain node matching groups. The execution success rate and resource utilization rate of each process node in the node matching group are calculated. The process node with the highest comprehensive score of execution success rate and resource utilization rate is selected from the node matching group where the candidate abnormal node set is located as the replacement process node.
[0039] The historical execution data of the alternative process node is combined with the execution success rate threshold to generate alternative subtasks.
[0040] In one optional embodiment, semantically aligning the output data of the preceding subtask with the input constraints of the subsequent subtask, and injecting the aligned data into the subsequent agent and triggering execution includes:
[0041] Construct a multidimensional association graph from the data items in the output data of the preceding subtasks, extract the change patterns of data items in the time dimension, extract the association strength between data items in the spatial dimension, extract the role hierarchy of data items in the business dimension, and generate a data feature association matrix.
[0042] The input constraints of subsequent subtasks are expressed as a constraint network. The importance and mutual exclusivity of the constraints are calculated, a constraint priority sequence is constructed, the data feature association matrix is mapped to the constraint priority sequence, and the data items are hierarchically transformed and combined for optimization based on the mapping results to generate semantically aligned data with optimal constraint satisfaction.
[0043] Extract processing pattern sequences from the historical execution records of subsequent agents, identify processing bottlenecks and fluctuation ranges, and construct the processing performance curve of the agent;
[0044] Based on the processing performance curve, the semantically aligned data is calculated into a core data stream and an auxiliary data stream. The core data stream is transmitted according to the peak of the processing performance curve, and the auxiliary data stream is transmitted according to the trough. Based on the processing status feedback information of the agent, the transmission ratio of the core data stream and the auxiliary data stream is calculated. The adjusted data is injected into the subsequent agent and an execution signal is sent.
[0045] A second aspect of this invention provides a multi-agent collaborative decomposition system for complex tasks based on business processes, comprising:
[0046] The process modeling module is used to parse business process documents, extract process nodes and dependencies, and build business process graphs.
[0047] The task mapping module is used to match complex tasks with process nodes in the business process graph to obtain a set of matching nodes;
[0048] The loop decomposition module is used to identify closed-loop dependency paths in the matching node set, mark the loop node group, extract the business termination conditions to set the loop monitoring mechanism, and convert the loop node group into a subtask based on the termination signal.
[0049] The agent selection module is used to express the execution constraints of subtasks as constraint logic expressions, express the historical execution records of agents as inference rule bases, and select the agent with the highest logical consistency score for binding by matching and calculating logical consistency scores.
[0050] The exception replacement module is used to establish a causal tracing chain when the agent executes a subtask. When an execution exception is detected, it traces back to the exception source subtask along the causal tracing chain, extracts the exception feature vector of the exception source subtask, constructs an exception propagation graph based on the exception feature vector, extracts node features from the business process graph for matching, selects the process node with the highest matching degree as the replacement process node, and generates a replacement subtask.
[0051] The semantic alignment module is used to semantically align the output data of the preceding subtask with the input constraints of the subsequent subtask, inject the aligned data into the subsequent agent and trigger its execution.
[0052] A third aspect of the present invention provides an electronic device, comprising:
[0053] processor;
[0054] Memory used to store processor-executable instructions;
[0055] The processor is configured to invoke instructions stored in the memory to execute the aforementioned method.
[0056] A fourth aspect of the present invention provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the aforementioned method.
[0057] In this embodiment of the invention, by constructing a business process graph and matching it with complex tasks, a systematic decomposition of complex tasks is achieved, making task decomposition more reasonable and orderly, and improving the accuracy and efficiency of task decomposition. Closed-loop dependency paths in the business process are identified and processed. By setting a loop monitoring mechanism and termination conditions, the circular dependency problem is effectively solved, preventing the system from falling into an infinite loop and improving system stability. An agent binding mechanism based on constraint logic and inference rule bases achieves precise matching between subtasks and the most suitable agents, significantly improving the success rate and efficiency of task execution. The introduction of causal tracing chains and anomaly propagation graphs enables precise location of the anomaly source when an execution anomaly occurs, and automatic generation of alternative subtasks, enhancing the system's fault recovery capability and adaptability. Semantic alignment technology is used to process data flow between subtasks, solving the data mismatch problem in multi-agent collaboration, ensuring the accuracy and integrity of information transmission, and improving overall collaboration efficiency. Attached Figure Description
[0058] Figure 1 This is a flowchart illustrating the multi-agent collaborative decomposition method for complex tasks based on business processes, according to an embodiment of the present invention.
[0059] Figure 2 This is a flowchart for anomaly tracing based on data fingerprints and causal chains. Detailed Implementation
[0060] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0061] The technical solution of the present invention will be described in detail below with reference to specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0062] Figure 1 This is a flowchart illustrating a method for collaborative decomposition of complex tasks based on business processes according to an embodiment of the present invention. Figure 1 As shown, the method includes:
[0063] Analyze business process documents, extract process nodes and dependencies, and construct a business process graph;
[0064] The complex task is matched with the process nodes in the business process diagram to obtain a set of matching nodes;
[0065] Identify closed-loop dependency paths in the matching node set, mark the loop node group, extract the business termination conditions to set up a loop monitoring mechanism, and convert the loop node group into a subtask based on the termination signal.
[0066] The execution constraints of subtasks are expressed as constraint logic formulas, and the historical execution records of agents are expressed as reasoning rule bases. By matching and calculating the logical consistency score, the agent with the highest logical consistency score is selected for binding.
[0067] When the agent executes a subtask, a causal tracing chain is established. When an execution anomaly is detected, the causal tracing chain is traced back to the anomaly source subtask. An anomaly feature vector of the anomaly source subtask is extracted. An anomaly propagation graph is constructed based on the anomaly feature vector. Node features are extracted from the business process graph for matching. The process node with the highest matching degree is selected as the alternative process node to generate an alternative subtask.
[0068] Semantically align the output data of the preceding subtask with the input constraints of the subsequent subtask, inject the aligned data into the subsequent agent, and trigger its execution.
[0069] In one optional implementation, identifying closed-loop dependency paths in the matching node set and marking cyclic node groups, extracting service termination conditions to set a cyclic monitoring mechanism, and converting cyclic node groups into subtasks based on termination signals includes:
[0070] Iterate through the dependencies between process nodes in the matching node set. When a closed-loop dependency path is detected between process nodes, mark the process nodes on the closed-loop dependency path as a loop node group.
[0071] Extract the business termination conditions corresponding to the loop node groups from the business process diagram, express the constraint variables in the business termination conditions as state variables, and transform the judgment logic into Boolean logic expressions.
[0072] An iteration counter and a state tracker are set at the starting process node of the loop node group. The iteration counter records the number of times the loop node group is executed, and the state tracker records the real-time values of the constraint variables. The iteration counter and the state tracker are updated each time the loop node group is executed.
[0073] The real-time values recorded by the state tracker are substituted into a Boolean logic expression for calculation. When the calculation result is true, a loop termination signal is generated.
[0074] Each process node in the loop node group is converted into a subtask. The current value of the iteration counter is used as the iteration identifier of the subtask, and the loop termination signal is used as the termination judgment basis of the subtask. A subtask containing the iteration identifier and the termination judgment basis is generated.
[0075] In one specific implementation, a depth-first search algorithm is used to traverse the dependencies in the matching node set to identify closed-loop dependency paths. Dependencies can be represented as a directed graph, where nodes represent process nodes and edges represent dependencies. During the traversal, a set of access markers and a set of current paths are maintained. A closed loop is detected when a node is found to already be in the current path. Specifically, starting with each unvisited node, the current node is marked as visited and added to the current path; then, all its successor nodes are recursively visited; if a successor node is found to already be in the current path during the recursion, all nodes from that node to the current node are extracted and marked as a loop node group.
[0076] For example, in an order processing flow, there exists a dependency path such as "order creation → payment confirmation → inventory check → order shipment → order status update → payment confirmation". Through a traversal algorithm, it can be identified that "payment confirmation → inventory check → order shipment → order status update → payment confirmation" constitutes a closed-loop dependency path, and these nodes are marked as a circular node group.
[0077] Extract the business termination conditions corresponding to the loop node groups from the business process diagram. The business process diagram contains the business logic description of the process nodes, which may include termination conditions for loop execution. Termination conditions are usually manifested as a specific variable reaching a certain threshold, satisfying a certain condition, or an event occurring. Abstract the constraint variables in these conditions into state variables, and transform the judgment logic into Boolean logic expressions.
[0078] Taking the above order processing flow as an example, the business termination condition may be "all order items have been shipped" or "the maximum number of retries has been exceeded". These conditions can be abstracted into the state variables "number of unshipped items" and "retry counter", as well as the Boolean expression "number of unshipped items == 0 || retry counter >= maximum number of retries".
[0079] A monitoring mechanism, including an iteration counter and a state tracker, is set up at the starting node of the loop node group. The iteration counter is initialized to zero and increments each time the loop's starting node is executed. The state tracker is responsible for recording the real-time values of the state variables involved in the termination condition. Each time a node in the loop node group is executed, the relevant state variables are updated based on the node's execution result.
[0080] For the order processing flow, an iteration counter is set at the "Payment Confirmation" node, with an initial value of zero. A status tracker is also set to track the "Number of Unshipped Items" and the "Retry Count". After each "Order Shipment" node is executed, the "Number of Unshipped Items" is updated; after each complete loop, the "Retry Count" is incremented.
[0081] During each iteration of the loop, the real-time values recorded by the state tracker are substituted into a Boolean logic expression for calculation. When the calculation result is true, it indicates that the termination condition has been met, and a loop termination signal is generated. The termination signal can be a Boolean flag used to indicate whether the loop should terminate.
[0082] During the loop execution, the state tracker continuously monitors the changes in "number of unshipped items" and "retry count". When the "number of unshipped items" decreases to zero or the "retry count" reaches the preset maximum value, the Boolean expression evaluates to true, generating a loop termination signal.
[0083] Each process node in the loop node group is transformed into a subtask with additional information. This additional information includes an iteration identifier and a termination criterion. The iteration identifier is the current value of the iteration counter, used to distinguish the same node in different iterations; the termination criterion is the loop termination signal, used to determine whether to continue executing the loop.
[0084] In the order processing flow example, during the first iteration, the "Payment Confirmation" node is transformed into a subtask with an iteration flag of 1, and the termination criterion is the current loop termination signal value. If, after a certain iteration, all goods have been shipped or the maximum number of retries has been reached, the generated subtask will contain a "true" termination criterion, indicating that this is the last loop.
[0085] The above methods can effectively identify circular dependency structures in business processes and set reasonable termination conditions based on business rules to ensure that the circular process can terminate at the appropriate time, avoiding resource waste and business blockage caused by infinite loops.
[0086] In one optional implementation, the execution constraints of subtasks are expressed as constraint logic expressions, the historical execution records of agents are expressed as inference rule bases, and the agent with the highest logical consistency score is selected for binding by matching and calculating logical consistency scores.
[0087] Extract the precondition variables and postcondition variables from the execution constraints of the subtasks, express the precondition variables as logical predicates, and express the postcondition variables as logical postconditions to construct the logical expression of the subtask constraints;
[0088] Extract the input and output states from the agent's historical execution records, map the input states to the premises of the reasoning rules, and map the output states to the conclusions of the reasoning rules to generate a reasoning rule base.
[0089] The antecedent predicate in the subtask constraint logic is decomposed into atomic predicate sequences, the premise items in the reasoning rule base are decomposed into atomic premise sequences, the structural isomorphism between the atomic predicate sequences and the atomic premise sequences is calculated one by one, and the premise matching score is generated based on the structural isomorphism.
[0090] The consequent predicate in the subtask constraint logic is decomposed into a target state vector, the conclusion item in the reasoning rule base is decomposed into an actual state vector, the vector distance between the target state vector and the actual state vector is calculated, and the conclusion matching score is generated based on the reciprocal of the vector distance.
[0091] The logical consistency score is obtained by weighted summation of the premise matching score and the conclusion matching score, and the agent with the highest logical consistency score is selected for binding.
[0092] In one specific implementation, the execution constraints of the subtask are formalized and converted into constraint logic expressions. Specifically, a set of precondition variables P and a set of postcondition result variables Q are extracted from the execution constraints of the subtask. The set of precondition variables P represents the conditions that must be met to execute the subtask, and the set of postcondition result variables Q represents the expected result after the subtask is executed. The precondition variables are expressed as the antecedent predicate P(x) of the logic expression, and the postcondition result variables are expressed as the consequent predicate Q(y) of the logic expression, thereby constructing the subtask constraint logic expression P(x)→Q(y).
[0093] For example, for a document processing subtask, preconditions might include "the input file format is PDF" and "the file size is less than 10MB", while postconditions might include "extracting text content" and "recognizing table structure". These conditions and results are formalized as logical predicates, such as Format(file, "PDF") ∧ Size(file, <10MB) → ExtractText(file) ∧ RecognizeTable(file).
[0094] A reasoning rule base is constructed from the historical execution records of the agents. For each agent, its historical input and output states are analyzed. Input states are mapped to premises of reasoning rules, and output states are mapped to conclusions of reasoning rules, generating reasoning rules of the form "If A then B". These rules constitute a representation of the agent's capabilities, reflecting the results the agent can produce under specific conditions.
[0095] For multiple historical execution records, common patterns can be extracted to form more generalized rules. For example, if the agent successfully processes PDF files of different sizes and extracts text multiple times, the rule "If Format(file, 'PDF') then ExtractText(file) with confidence 0.95" can be generated, where the confidence value reflects the reliability of the rule.
[0096] When calculating the matching degree between the agent and the subtask, the antecedent predicate P(x) in the subtask constraint logic is first decomposed into a sequence of atomic predicates [p1, p2, ..., p...]. n Similarly, the premises of each rule in the reasoning rule base are decomposed into an atomic premise sequence [a1, a2, ..., a...]. m The premise matching score is calculated by comparing the structural and semantic similarity of the two sequences.
[0097] When calculating structural isomorphism, the mapping relationship between atomic predicates and atomic premises is considered, including three aspects: predicate name matching, parameter number matching, and parameter type matching. For each pair of atomic predicates p i and atomic premise a j Calculate its structural similarity sim(p) i a j Then, the Hungarian algorithm is used to solve the optimal matching problem to obtain the maximum overall matching degree, i.e., the premise matching score S1.
[0098] To calculate the conclusion matching score, the consequent predicate Q(y) in the subtask constraint logic is decomposed into a target state vector VQ, and the conclusion terms in the inference rule base are decomposed into actual state vectors VR. Each dimension of the state vector corresponds to a possible outcome attribute. The cosine similarity or the reciprocal of the Euclidean distance between these two vectors is calculated to obtain the conclusion matching score S2.
[0099] The premise matching score S1 and the conclusion matching score S2 are weighted and summed to obtain the logical consistency score S = w1·S1 + w2·S2, where w1 and w2 are weight coefficients that satisfy w1 + w2 = 1. These weights can be adjusted according to specific application scenarios to balance the importance of input conditions and output results.
[0100] In practical applications, a threshold T can be set. Subtasks are only assigned to the appropriate agent when the logical consistency score S exceeds the threshold T. This avoids assigning tasks to agents with insufficient capabilities, thus improving overall execution quality.
[0101] For cases with multiple agents, calculate the logical consistency score between each agent and the subtask, and select the agent with the highest score for binding. If multiple agents have similar scores and all exceed the threshold, consider load balancing strategies or other auxiliary indicators (such as response time, resource consumption, etc.) for the final decision.
[0102] Furthermore, the method in this embodiment can also support dynamic learning and adaptation. As the agent performs more tasks, its historical execution records will be continuously enriched, and the inference rule base will be updated accordingly, enabling subsequent binding decisions to reflect changes and improvements in the agent's capabilities.
[0103] In a distributed computing environment, the method in this embodiment can achieve optimal matching between subtasks and agents, improving overall system efficiency. Through formal logical expression and matching computation, the task allocation process becomes more intelligent and adaptive, making it suitable for complex and ever-changing application scenarios.
[0104] In one optional implementation, a causal tracing chain is established when the agent executes a subtask. When an execution anomaly is detected, the causal tracing chain is traced back to the subtask that caused the anomaly. The anomaly feature vector of the subtask that caused the anomaly is extracted includes:
[0105] When the intelligent agent executes a subtask, it performs a hash operation on the input data to generate an input data fingerprint, and then stores the input data fingerprint in association with the subtask identifier.
[0106] After the subtask is completed, the output data is hashed to generate an output data fingerprint. The data transmission relationship between the subtask and subsequent subtasks is extracted. The output data fingerprint, subtask identifier and data transmission relationship are constructed as causal traceability nodes. The causal traceability nodes are connected in sequence according to the execution time to form a causal traceability chain.
[0107] Monitor the status information of the agent executing sub-tasks. When a predefined abnormal pattern occurs, trigger an abnormal detection signal, extract the abnormal sub-task identifier, locate the corresponding causal tracing node from the causal tracing chain, obtain the data transmission relationship, and traverse the previous causal tracing node along the reverse path of the data transmission relationship.
[0108] During the traversal, the input data fingerprint and output data fingerprint are extracted for each preceding causal tracing node. The consistency of the output data fingerprint and the input data fingerprint of the subsequent node is checked. When the check fails, the preceding causal tracing node is marked as the abnormal source node, the corresponding subtask is extracted, and the abnormal source subtask is determined.
[0109] Extract input data anomaly features, execution logic anomaly features, and output data anomaly features from the execution records of the anomaly source subtask, and combine them into an anomaly feature vector.
[0110] In one specific implementation, to achieve causal tracing and anomaly localization during the execution of the intelligent agent, a data fingerprint-based method is adopted. When the intelligent agent executes a subtask, it performs a SHA-256 hash algorithm on the input data to generate an input data fingerprint. Taking the subtask "product recommendation sorting" as an example, when user information data containing user ID, browsing history, purchase records, etc., is received, this data is serialized into JSON format, and its SHA-256 hash value "7f83b1657ff1fc53b92dc18148a1d65dfc2d4b1fa3d677284addd200126d9069" is calculated as the input data fingerprint. Simultaneously, the subtask identifier "TASK_REC_001" is associated with this input data fingerprint and stored in a key-value database, where the key is the subtask identifier and the value is the input data fingerprint.
[0111] After the subtask is completed, the output data is also hashed using SHA-256 to generate an output data fingerprint. Continuing with the recommendation ranking task as an example, after generating the recommended product list, the list is serialized into a JSON string and the hash value "3a6eb0790f39ac87c94f3856b2dd2c5d110e6811602261a9a923d3bb23adc8b7" is calculated as the output data fingerprint. By parsing the task execution log, the relationship between this subtask and the subsequent "product display" subtask is extracted, forming a data transfer relationship description "TASK_REC_001->TASK_DISP_002". The output data fingerprint, subtask identifier, and data transfer relationship are combined to construct a causal traceability node, stored as a node in the graph database. Node attributes include the subtask identifier, input data fingerprint, output data fingerprint, execution timestamp, and data transfer relationship. As multiple subtasks are executed, these causal traceability nodes are connected by edges in the graph database according to the execution sequence, forming a complete causal traceability chain.
[0112] During execution, the system monitors the status information of the agent executing subtasks in real time, including execution time, resource consumption, and return status codes. When a predefined abnormal pattern is detected, such as execution time exceeding a predetermined threshold of 3000 milliseconds, a return status code of 500, or memory usage exceeding 90%, an anomaly detection signal is triggered. Taking a timeout in the "product display" subtask as an example, the system triggers an anomaly detection signal, extracts the abnormal subtask identifier "TASK_DISP_002," and locates the corresponding causal traceability node in the causal tracing chain using the subtask identifier. From this node, the system obtains the data transmission relationship "TASK_REC_001->TASK_DISP_002" and begins traversing the preceding causal traceability nodes along the reverse path of the data transmission relationship, first visiting the "TASK_REC_001" node.
[0113] During the traversal, the input and output fingerprints are extracted for each preceding causal tracing node. Taking the node "TASK_REC_001" as an example, its output fingerprint "3a6eb0790f39ac87c94f3856b2dd2c5d110e6811602261a9a923d3bb23adc8b7" is extracted and compared with the input fingerprint "3a6eb0790f39ac87c94f3856b2dd2c5d110e6811602261a9a923d3bb23adc8b7" of the successor node "TASK_DISP_002". If they match, the traversal continues along the reverse path. If an inconsistency is found, such as the output data fingerprint of "TASK_REC_001" being different from the input data fingerprint of "TASK_DISP_002", it indicates that the data may have been tampered with or corrupted during transmission. In this case, the "TASK_REC_001" node is marked as the source node of the anomaly, and "Product Recommendation Ranking" is identified as the source subtask of the anomaly.
[0114] When tracing back to the earlier node "TASK_USER_000" (user data processing), comparing its output data fingerprint "7f83b1657ff1fc53b92dc18148a1d65dfc2d4b1fa3d677284addd200126d9069" with the input data fingerprint "7f83b1657ff1fc53b92dc18148a1d65dfc2d4b1fa3d677284addd200126d9069" of "TASK_REC_001", the two are found to be consistent, indicating that the user data processing step is normal. Continue tracing backwards until the earliest inconsistency is found or the starting node is reached.
[0115] After identifying the subtask that caused the anomaly, extract the anomaly features from its execution logs. Extract input data anomaly features from the execution logs, such as an unusually large number of products in the user data (over 10,000); extract execution logic anomaly features, such as an abnormal computation path in the recommendation algorithm (the number of traversals exceeds 10 times the expected number); extract output data anomaly features, such as the recommendation results containing more than 50% of products that have been removed from the platform. Combine these features into an anomaly feature vector, recorded as "Number of products in input data: 12568, Number of algorithm traversals: 15390, Percentage of removed products: 0.68", for subsequent anomaly reproduction and repair.
[0116] In practical applications, Redis can be used for efficient storage and retrieval of data fingerprints, Neo4j can be used to construct a graph data structure for causal tracing, and Prometheus can be used to monitor the execution status of agents. When an anomaly is detected, the Depth-First Search algorithm is used to perform a reverse traversal of the graph structure to achieve efficient anomaly source localization. By verifying the consistency of input and output data fingerprints at each node in the causal tracing chain, the specific link in the data flow anomaly can be accurately located, thereby quickly identifying the root cause of the task anomaly. This causal tracing method based on data fingerprints can not only accurately locate the source of anomalies in complex multi-agent collaborative tasks, but also provide reliable data support for subsequent system optimization and fault prevention.
[0117] like Figure 2 As shown, a flowchart illustrating the anomaly tracing process based on data fingerprints and causal chains is presented.
[0118] In one optional implementation, verifying the consistency between the output data fingerprint and the input data fingerprint of the successor node includes:
[0119] The fingerprint transformation pattern from the output data fingerprint to the input data fingerprint is extracted from the data transmission relationship. The fingerprint transformation pattern records the change pattern of the hash value when the data is transmitted between nodes.
[0120] The fingerprint space is mapped by applying fingerprint transformation mode to the output data fingerprint to generate the expected input data fingerprint. The bitwise XOR result between the expected input data fingerprint and the input data fingerprint of the successor node is calculated. The number of bits with a value of 1 in the XOR result is counted to determine the fingerprint deviation.
[0121] When the fingerprint deviation exceeds the preset deviation threshold, the verification is deemed to have failed, and the preceding causal tracing node is marked as the abnormal source node.
[0122] In one specific implementation, the extraction and application of data fingerprint transformation patterns constitute the core technical foundation for accurate causal tracing in the method for decomposing complex tasks based on business processes through multi-agent collaborative processing. During agent collaborative execution, a transformation pattern extraction module needs to be established to extract fingerprint transformation patterns from historical execution records. This module receives two inputs: a set of historical data transfer records between subtasks and a specified pair of adjacent subtasks. The transformation pattern extraction module filters all historical data transfer records of the specified subtask pair from the record set. Each record contains the output data fingerprint of the preceding subtask and the input data fingerprint of the subsequent subtask.
[0123] The transformation pattern extraction process is implemented using a bit-level comparison algorithm. For each output-input fingerprint pair, a bit-by-bit comparison operation is performed to generate a bit-level comparison matrix. Each bit in this matrix is marked as "1" to indicate that the bit remains unchanged during transmission, and marked as "0" to indicate that the bit may change. A bitwise AND operation is performed on the comparison matrices of all historical records to obtain a transformation mask. In the transformation mask, positions with a value of "1" represent bits that remain unchanged throughout all historical transmissions, and positions with a value of "0" represent bits that have changed in at least one transmission. This transformation mask is converted into a hexadecimal representation of the transformation pattern and stored in a transformation pattern library. The transformation pattern library uses a key-value pair structure, where the key is "previous subtask identifier - subsequent subtask identifier", and the value is the corresponding hexadecimal transformation pattern.
[0124] The fingerprint space mapping module is responsible for mapping the output data fingerprint to the expected input data fingerprint. This module receives three inputs: the output data fingerprint of the preceding subtask, the identifier pairs of the preceding and subsequent subtasks, and a transformation pattern library. The mapping process first retrieves the corresponding hexadecimal transformation pattern from the transformation pattern library and converts it into a binary mask. If no corresponding transformation pattern is found, a default mask (all "0"s, indicating that all bits may change) is used. The output data fingerprint and the binary mask are then bitwise ANDed to obtain the expected input data fingerprint.
[0125] The fingerprint deviation calculation module calculates the degree of difference between the expected input data fingerprint and the actual input data fingerprint. This module receives the expected input data fingerprint and the actual input data fingerprint of the subsequent node, performs a bitwise XOR operation to generate a difference bitmap. The number of bits with a value of "1" in the difference bitmap is counted, and divided by the total number of bits to obtain the normalized fingerprint deviation, which ranges from 0 to 1, where 0 represents complete consistency and 1 represents complete difference.
[0126] The anomaly detection module sets a reasonable deviation threshold based on the business scenario. A lower threshold (e.g., 0.05) is set for scenarios with high security requirements, while a higher threshold (e.g., 0.3) can be set for general business scenarios. When the calculated deviation exceeds the preset threshold, the verification is deemed a failure, triggering the anomaly marking process. The anomaly marking module marks the preceding causal tracing node as the anomaly source node, updates the node status in the database, and records information such as the detection time, deviation value, and threshold setting.
[0127] The transformation mode library is maintained through an incremental update mechanism. After each successful data transfer, a new output-input fingerprint pair is extracted and compared with the current transformation mode. If a bit is found that does not conform to the current mode, the transformation mode is updated, changing the bit from "1" to "0". To prevent the mode from becoming too lenient, a time decay mechanism is introduced to periodically re-evaluate historical transfer records and reconstruct the transformation mode.
[0128] In the production environment, the pattern library is divided into two parts: a stable pattern area and a test pattern area. Newly extracted transformation patterns first enter the test pattern area. After a certain number of verifications (e.g., 100), their accuracy determines whether they are upgraded to the stable pattern area. Simultaneously, multi-version pattern management is implemented to provide rollback capabilities for business process changes.
[0129] Different preprocessing strategies are designed for different data types. Structured data is normalized to ensure consistent field order; semi-structured data is extracted using pattern extraction to retain core semantic features; and unstructured data is converted into fixed-length feature vectors using feature extraction algorithms before fingerprint calculation.
[0130] When handling large-scale collaborative tasks, a hierarchical transformation strategy is adopted. A coarse-grained transformation mode is used at the business level, while a fine-grained transformation mode is used at the data level. This combination improves detection efficiency. Simultaneously, a task correlation matrix is established by combining task semantic information. A stricter deviation threshold is applied to highly correlated task pairs, while a more lenient threshold is applied to low-correlation task pairs, thus achieving a differentiated detection strategy.
[0131] By combining this data fingerprint transformation pattern with deviation calculation, data anomalies in the multi-agent collaboration process can be accurately identified, providing precise causal tracing capabilities and technical support for anomaly diagnosis and recovery in the process of complex task collaborative decomposition.
[0132] In one optional implementation, an anomaly propagation graph is constructed based on the anomaly feature vector, and node features are extracted from the business process graph for matching. The process node with the highest matching degree is selected as the alternative process node, and the alternative subtasks are generated, including:
[0133] The time-series feature sequence is obtained by deconstructing the abnormal feature vector. The rate of change and fluctuation amplitude of the time-series feature sequence are calculated based on the sliding time window to generate an abnormal evolution feature set.
[0134] An anomaly propagation graph is constructed based on the anomaly evolution feature set. The propagation strength and direction between process nodes are recorded in the diffusion layer, and the performance loss and resource consumption of process nodes are recorded in the influence layer. The set of candidate anomaly nodes and the set of risk nodes are obtained by mapping the diffusion layer and the influence layer.
[0135] Extract task types, input / output specifications, and resource consumption of process nodes from the business process graph to construct execution feature vectors, and calculate the similarity between execution feature vectors to obtain the node connection weight matrix;
[0136] A node matching network is constructed based on the node connection weight matrix. The node matching network is clustered using a community discovery algorithm to obtain node matching groups. The execution success rate and resource utilization rate of each process node in the node matching group are calculated. The process node with the highest comprehensive score of execution success rate and resource utilization rate is selected from the node matching group where the candidate abnormal node set is located as the replacement process node.
[0137] The historical execution data of the alternative process node is combined with the execution success rate threshold to generate alternative subtasks.
[0138] In one specific implementation, the anomaly feature vector is deconstructed to obtain a time-series feature sequence. The anomaly feature vector contains multi-dimensional indicators of the system's operating status, such as CPU utilization, memory usage, and response time. The deconstruction process uses principal component analysis to decompose the high-dimensional feature vector into key indicators on the time series. For example, for an anomaly feature vector V=[v1, v2, ..., v...] containing ten dimensions... 10 Principal component analysis yields three main time-series feature sequences, S1, S2, and S3. A sliding time window is then set, with the window size determined based on business characteristics, typically ranging from 5 to 30 minutes. Within each window, the rate of change r = Δs / Δt and the fluctuation amplitude a = max(s) - min(s) of the time-series features are calculated, forming an anomaly evolution feature set E = {r1, a1, r2, a2, ...}. This feature set reflects the dynamic evolution process of the anomaly state.
[0139] Based on the aforementioned abnormal evolution feature set, a two-layer abnormal propagation graph G=(V,E,D,I) is constructed, where V is the set of process nodes, E is the set of connecting edges between nodes, and D and I represent the diffusion layer and the influence layer, respectively. In the diffusion layer D, the transmission strength and diffusion direction between nodes are calculated using a network flow algorithm. For any two connected nodes i and j, their transmission strength is determined by t. ij = ∑(r i ·r j ) / |r i The direction of diffusion is determined by the sequential relationship of changes in the temporal characteristics between nodes. For example, if the CPU utilization anomaly of node A occurs before that of node B, the anomaly is considered to have diffused from A to B. In the influence layer I, the performance loss p and resource consumption c of each node are recorded. Through the mapping relationship between the diffusion layer and the influence layer, a variant of the PageRank algorithm is used to calculate the anomaly influence score s = αp + βc + γ∑t for each node. ij , where α, β, and γ are weighting coefficients. Based on the score threshold, a set A of candidate anomaly nodes is defined. c and the set of risk nodes R n .
[0140] Extract process node features from the business process graph. For each node, extract task type (e.g., computational, I / O, network), input / output specifications (data format, size, etc.), and resource consumption mode (CPU-intensive, memory-intensive, etc.) to construct the execution feature vector F. i The cosine similarity method is used to calculate the similarity between feature vectors, i.e., sim(F i F j ) = F i ·F j / (|F i |·|F j |), thus obtaining the node connection weight matrix W, where each element w ij This represents the similarity between nodes i and j.
[0141] Based on the node connection weight matrix W, construct a node matching network N=(V, E) w The weights of the edges are derived from the corresponding elements in matrix W. The Louvain community detection algorithm is used to cluster the network, grouping nodes with high similarity into the same node matching group M. g Within each matching group, calculate the execution success rate s of each process node. r (Number of successful executions / Total number of executions) and resource utilization rate r u (Actual resource consumption / allocation). The overall score is calculated using the formula: score = δ·s r + (1-δ)·r u δ is a balance factor, with a value range of [0, 1], and is usually set to 0.7. From the matching group of candidate abnormal nodes, the process node with the highest comprehensive score is selected as the replacement process node.
[0142] Generate alternative subtasks. First, collect historical execution data for the alternative process nodes, including execution time, resource consumption, and success rate. Set an execution success rate threshold θ (usually 0.9), and combine it with the average execution time t from the historical data. avg and resource requirements r ireq Generate alternative subtask T sub = {node id , t avg r req Let θ, params}, where params are the parameter configurations required for the task. These alternative subtasks will be triggered and executed in abnormal situations to ensure the smooth operation of the business process.
[0143] In one optional implementation, semantically aligning the output data of the preceding subtask with the input constraints of the subsequent subtask, and injecting the aligned data into the subsequent agent to trigger execution includes:
[0144] Construct a multidimensional association graph from the data items in the output data of the preceding subtasks, extract the change patterns of data items in the time dimension, extract the association strength between data items in the spatial dimension, extract the role hierarchy of data items in the business dimension, and generate a data feature association matrix.
[0145] The input constraints of subsequent subtasks are expressed as a constraint network. The importance and mutual exclusivity of the constraints are calculated, a constraint priority sequence is constructed, the data feature association matrix is mapped to the constraint priority sequence, and the data items are hierarchically transformed and combined for optimization based on the mapping results to generate semantically aligned data with optimal constraint satisfaction.
[0146] Extract processing pattern sequences from the historical execution records of subsequent agents, identify processing bottlenecks and fluctuation ranges, and construct the processing performance curve of the agent;
[0147] Based on the processing performance curve, the semantically aligned data is calculated into a core data stream and an auxiliary data stream. The core data stream is transmitted according to the peak of the processing performance curve, and the auxiliary data stream is transmitted according to the trough. Based on the processing status feedback information of the agent, the transmission ratio of the core data stream and the auxiliary data stream is calculated. The adjusted data is injected into the subsequent agent and an execution signal is sent.
[0148] In one specific implementation, when constructing a multidimensional association graph, a data item parser is implemented. This parser reads the output data structure of the preceding subtasks and extracts all key-value pairs as the initial set of data items. The parser supports multiple data formats such as JSON, XML, and tables, and extracts data items from nested structures through recursive traversal. For each data item, its basic characteristics such as path, data type, value range, and proportion of null values are recorded.
[0149] Temporal feature extraction is achieved using a sliding window algorithm. The window size is set to N records executed, and the window sliding step size is M. For each data item, the frequency and magnitude of change are calculated within the window. Frequency is defined as the number of times the value changes divided by the total number of observations; magnitude is defined as the difference between the maximum and minimum values divided by the average value. Fourier transform analysis is used to analyze the data item value sequence, extracting the main periodic components and recording the period length and intensity. The temporal feature vector consists of three components: frequency, magnitude, and period intensity, each normalized to the 0-1 range.
[0150] The spatial association strength calculation employs a two-stage process. The first stage calculates the pairwise association strength between data item pairs, generating an initial association matrix. Linear associations are represented by the Pearson correlation coefficient, with its absolute value used; non-linear associations are represented by a normalized association metric based on mutual information. The second stage applies a community detection algorithm to identify highly correlated groups of data items, adding the group affiliation information of each data item to the spatial features. The association strength matrix is sparsified by setting a threshold to reduce subsequent computational complexity.
[0151] The business dimension's hierarchical impact is automatically learned through a decision tree model. Training data is derived from the usage frequency, access patterns, and error sensitivity of data items in historical execution records. The decision tree categorizes data items into three levels: critical (decisive impact on business outcomes), important (affects business quality but not decisively), and auxiliary (provides contextual information or optional enhancements). Each data item's business hierarchy is represented by a three-dimensional vector, indicating its probability of belonging to each of the three levels.
[0152] The data feature association matrix is generated by fusing eigenvectors from three dimensions. Rows in the matrix represent data items, and columns represent components of the feature dimensions, with each element ranging from 0 to 1. After feature extraction, principal component analysis is applied to reduce the feature dimensionality, retaining the principal components that explain 90% of the variance, thus forming a compressed feature matrix.
[0153] The constraint network is constructed through a combination of static analysis and dynamic monitoring. Static analysis parses the interface documentation and code comments of subsequent subtasks to extract type constraints, range constraints, and structural constraints. Dynamic monitoring collects exception logs and performance fluctuations during subtask execution to extract implicit and performance constraints. Constraints are represented as triples: constraint target (data item or set of data items), constraint type, and constraint parameter. Nodes in the constraint network represent constraints, and edges represent the logical relationships (AND, OR, NOT) between constraints.
[0154] Constraint priority calculation uses a weighted scoring mechanism. Importance scores are based on the business impact of constraint violations, including three levels: functional disruption (weight 1.0), quality degradation (weight 0.7), and efficiency reduction (weight 0.4). Mutual exclusion scores are calculated by analyzing the probability of conflict between constraint pairs; constraint pairs with high conflict probabilities are marked as mutually exclusive. The constraint priority sequence is generated using a topological sorting algorithm, ensuring optimal trade-offs within the set of mutually exclusive constraints.
[0155] Semantic alignment transformation is implemented as a mapping function library. Each mapping function receives a data feature vector and constraints, and outputs a transformation strategy. Transformation strategies include: preserving original values, type conversion, structural reorganization, semantic enhancement, and default value filling. Highly time-varying data items use real-time acquisition or setting of expiration markers; highly correlated data item groups use atomic transfer strategies to ensure consistency; high-level data items prioritize satisfying high-priority constraints, sacrificing low-priority constraints when necessary.
[0156] Processing mode sequence extraction is achieved through time series analysis. Data on processing latency, resource consumption, and response quality of subsequent agents under different load conditions are collected to form a time series. A change point detection algorithm is applied to identify performance abrupt changes and mark these points as processing bottlenecks; a periodic decomposition algorithm is applied to extract periodic fluctuation patterns and identify peak and trough intervals; and a trend analysis algorithm is applied to extract long-term performance change trends. The processing performance curve is generated through piecewise function fitting, with each segment corresponding to a processing mode.
[0157] Data flow splitting is performed based on data item characteristics and constraint priorities. The core data flow includes: critical business-level data items, data items necessary to satisfy high-priority constraints, and data items upon which bottlenecks depend. The auxiliary data flow includes: auxiliary business-level data items, data items satisfying low-priority constraints, and data items that can be delayed. The allocation ratio of data items in the two flows is calculated based on their comprehensive characteristic score; data items with higher characteristic scores are allocated more to the core flow.
[0158] Intelligent transmission scheduling employs a feedback control mechanism. The processing status of subsequent agents is fed back in real-time via heartbeat messages, including task queue depth, resource utilization, and processing latency. The scheduler matches the feedback status with the processing performance curve to identify the current performance range. During peak performance periods, the total transmission volume of core and auxiliary data streams is increased; during trough periods, only core data streams are transmitted, and they are prioritized. The transmission ratio is dynamically adjusted via a proportional-integral-derivative controller, with the control objective of maintaining the resource utilization of subsequent agents within the ideal range.
[0159] Before data injection, an eventual consistency check is performed to ensure that the split data stream meets key constraints. The injection process pushes data to the input buffer of subsequent agents through a predefined interface, while simultaneously sending an execution signal containing metadata. This metadata includes data structure descriptions, integrity check codes, priority markers, and dependency graphs, assisting subsequent agents in efficiently processing the received data.
[0160] Through the above implementation steps, an intelligent data transmission mechanism based on data feature association and constraint priority was realized, which ensured the efficient flow and processing of data in the multi-agent collaboration process and greatly improved the efficiency and stability of complex task decomposition and execution.
[0161] This invention provides a multi-agent collaborative decomposition system for complex tasks based on business processes, comprising:
[0162] The process modeling module is used to parse business process documents, extract process nodes and dependencies, and build business process graphs.
[0163] The task mapping module is used to match complex tasks with process nodes in the business process graph to obtain a set of matching nodes;
[0164] The loop decomposition module is used to identify closed-loop dependency paths in the matching node set, mark the loop node group, extract the business termination conditions to set the loop monitoring mechanism, and convert the loop node group into a subtask based on the termination signal.
[0165] The agent selection module is used to express the execution constraints of subtasks as constraint logic expressions, express the historical execution records of agents as inference rule bases, and select the agent with the highest logical consistency score for binding by matching and calculating logical consistency scores.
[0166] The exception replacement module is used to establish a causal tracing chain when the agent executes a subtask. When an execution exception is detected, it traces back to the exception source subtask along the causal tracing chain, extracts the exception feature vector of the exception source subtask, constructs an exception propagation graph based on the exception feature vector, extracts node features from the business process graph for matching, selects the process node with the highest matching degree as the replacement process node, and generates a replacement subtask.
[0167] The semantic alignment module is used to semantically align the output data of the preceding subtask with the input constraints of the subsequent subtask, inject the aligned data into the subsequent agent and trigger its execution.
[0168] A third aspect of the present invention provides an electronic device, comprising:
[0169] processor;
[0170] Memory used to store processor-executable instructions;
[0171] The processor is configured to invoke instructions stored in the memory to execute the aforementioned method.
[0172] A fourth aspect of the present invention provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the aforementioned method.
[0173] This invention can be a method, apparatus, system, and / or computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for performing various aspects of the invention.
[0174] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for collaborative decomposition of complex tasks based on business processes by multiple agents, characterized in that, include: Analyze business process documents, extract process nodes and dependencies, and construct a business process graph; The complex task is matched with the process nodes in the business process diagram to obtain a set of matching nodes; Identify closed-loop dependency paths in the matching node set, mark the loop node group, extract the business termination conditions to set up a loop monitoring mechanism, and convert the loop node group into a subtask based on the termination signal. The execution constraints of subtasks are expressed as constraint logic formulas, and the historical execution records of agents are expressed as reasoning rule bases. By matching and calculating the logical consistency score, the agent with the highest logical consistency score is selected for binding. A causal tracing chain is established when the agent executes a subtask. When an execution anomaly is detected, the causal tracing chain is traced back to the anomaly source subtask. The anomaly feature vector of the anomaly source subtask is extracted, an anomaly propagation graph is constructed based on the anomaly feature vector, and node features are extracted from the business process graph for matching. The process node with the highest matching degree is selected as the alternative process node, and alternative subtasks are generated, including: The time-series feature sequence is obtained by deconstructing the abnormal feature vector. The rate of change and fluctuation amplitude of the time-series feature sequence are calculated based on the sliding time window to generate an abnormal evolution feature set. An anomaly propagation graph is constructed based on the anomaly evolution feature set. The propagation strength and direction between process nodes are recorded in the diffusion layer, and the performance loss and resource consumption of process nodes are recorded in the influence layer. The set of candidate anomaly nodes and the set of risk nodes are obtained by mapping the diffusion layer and the influence layer. Extract task types, input / output specifications, and resource consumption of process nodes from the business process graph to construct execution feature vectors, and calculate the similarity between execution feature vectors to obtain the node connection weight matrix; A node matching network is constructed based on the node connection weight matrix. The node matching network is clustered using a community discovery algorithm to obtain node matching groups. The execution success rate and resource utilization rate of each process node in the node matching group are calculated. The process node with the highest comprehensive score of execution success rate and resource utilization rate is selected from the node matching group where the candidate abnormal node set is located as the replacement process node. The historical execution data of the alternative process nodes are combined with the execution success rate threshold to generate alternative sub-tasks; Semantically align the output data of the preceding subtask with the input constraints of the subsequent subtask, inject the aligned data into the subsequent agent, and trigger its execution.
2. The method according to claim 1, characterized in that, Identify closed-loop dependency paths in the matching node set, mark the loop node group, extract business termination conditions, set up a loop monitoring mechanism, and transform the loop node group into subtasks based on the termination signal, including: Iterate through the dependencies between process nodes in the matching node set. When a closed-loop dependency path is detected between process nodes, mark the process nodes on the closed-loop dependency path as a loop node group. Extract the business termination conditions corresponding to the loop node groups from the business process diagram, express the constraint variables in the business termination conditions as state variables, and transform the judgment logic into Boolean logic expressions. An iteration counter and a state tracker are set at the starting process node of the loop node group. The iteration counter records the number of times the loop node group is executed, and the state tracker records the real-time values of the constraint variables. The iteration counter and the state tracker are updated each time the loop node group is executed. The real-time values recorded by the state tracker are substituted into a Boolean logic expression for calculation. When the calculation result is true, a loop termination signal is generated. Each process node in the loop node group is converted into a subtask. The current value of the iteration counter is used as the iteration identifier of the subtask, and the loop termination signal is used as the termination judgment basis of the subtask. A subtask containing the iteration identifier and the termination judgment basis is generated.
3. The method according to claim 1, characterized in that, The execution constraints of subtasks are expressed as constraint logic formulas, and the historical execution records of agents are expressed as inference rule bases. Logical consistency scores are calculated through matching, and the agent with the highest logical consistency score is selected for binding. Extract the precondition variables and postcondition variables from the execution constraints of the subtasks, express the precondition variables as logical predicates, and express the postcondition variables as logical postconditions to construct the logical expression of the subtask constraints; Extract the input and output states from the agent's historical execution records, map the input states to the premises of the reasoning rules, and map the output states to the conclusions of the reasoning rules to generate a reasoning rule base. The antecedent predicate in the subtask constraint logic is decomposed into atomic predicate sequences, the premise items in the reasoning rule base are decomposed into atomic premise sequences, the structural isomorphism between the atomic predicate sequences and the atomic premise sequences is calculated one by one, and the premise matching score is generated based on the structural isomorphism. The consequent predicate in the subtask constraint logic is decomposed into a target state vector, the conclusion item in the reasoning rule base is decomposed into an actual state vector, the vector distance between the target state vector and the actual state vector is calculated, and the conclusion matching score is generated based on the reciprocal of the vector distance. The logical consistency score is obtained by weighted summation of the premise matching score and the conclusion matching score, and the agent with the highest logical consistency score is selected for binding.
4. The method according to claim 1, characterized in that, A causal tracing chain is established when the agent executes a subtask. When an execution anomaly is detected, the causal tracing chain is traced back to the subtask that caused the anomaly. The anomaly feature vector of the subtask that caused the anomaly is extracted includes: When the intelligent agent executes a subtask, it performs a hash operation on the input data to generate an input data fingerprint, and then stores the input data fingerprint in association with the subtask identifier. After the subtask is completed, the output data is hashed to generate an output data fingerprint. The data transmission relationship between the subtask and subsequent subtasks is extracted. The output data fingerprint, subtask identifier and data transmission relationship are constructed as causal traceability nodes. The causal traceability nodes are connected in sequence according to the execution time to form a causal traceability chain. Monitor the status information of the agent executing sub-tasks. When a predefined abnormal pattern occurs, trigger an abnormal detection signal, extract the abnormal sub-task identifier, locate the corresponding causal tracing node from the causal tracing chain, obtain the data transmission relationship, and traverse the previous causal tracing node along the reverse path of the data transmission relationship. During the traversal, the input data fingerprint and output data fingerprint are extracted for each preceding causal tracing node. The consistency of the output data fingerprint and the input data fingerprint of the subsequent node is checked. When the check fails, the preceding causal tracing node is marked as the abnormal source node, the corresponding subtask is extracted, and the abnormal source subtask is determined. Extract input data anomaly features, execution logic anomaly features, and output data anomaly features from the execution records of the anomaly source subtask, and combine them into an anomaly feature vector.
5. The method according to claim 4, characterized in that, The consistency check between the output data fingerprint and the input data fingerprint of the successor node includes: The fingerprint transformation pattern from the output data fingerprint to the input data fingerprint is extracted from the data transmission relationship. The fingerprint transformation pattern records the change pattern of the hash value when the data is transmitted between nodes. The fingerprint space is mapped by applying fingerprint transformation mode to the output data fingerprint to generate the expected input data fingerprint. The bitwise XOR result between the expected input data fingerprint and the input data fingerprint of the successor node is calculated. The number of bits with a value of 1 in the XOR result is counted to determine the fingerprint deviation. When the fingerprint deviation exceeds the preset deviation threshold, the verification is deemed to have failed, and the preceding causal tracing node is marked as the abnormal source node.
6. The method according to claim 1, characterized in that, Semantically align the output data of the preceding subtask with the input constraints of the subsequent subtask, and inject the aligned data into the subsequent agent to trigger execution, including: Construct a multidimensional association graph from the data items in the output data of the preceding subtasks, extract the change patterns of data items in the time dimension, extract the association strength between data items in the spatial dimension, extract the role hierarchy of data items in the business dimension, and generate a data feature association matrix. The input constraints of subsequent subtasks are expressed as a constraint network. The importance and mutual exclusivity of the constraints are calculated, a constraint priority sequence is constructed, the data feature association matrix is mapped to the constraint priority sequence, and the data items are hierarchically transformed and combined for optimization based on the mapping results to generate semantically aligned data with optimal constraint satisfaction. Extract processing pattern sequences from the historical execution records of subsequent agents, identify processing bottlenecks and fluctuation ranges, and construct the processing performance curve of the agent; Based on the processing performance curve, the semantically aligned data is calculated into a core data stream and an auxiliary data stream. The core data stream is transmitted according to the peak of the processing performance curve, and the auxiliary data stream is transmitted according to the trough. Based on the processing status feedback information of the agent, the transmission ratio of the core data stream and the auxiliary data stream is calculated. The adjusted data is injected into the subsequent agent and an execution signal is sent.
7. A multi-agent collaborative decomposition system for complex tasks based on business processes, used to implement the method of any one of claims 1-6, characterized in that, include: The process modeling module is used to parse business process documents, extract process nodes and dependencies, and build business process graphs. The task mapping module is used to match complex tasks with process nodes in the business process graph to obtain a set of matching nodes; The loop decomposition module is used to identify closed-loop dependency paths in the matching node set, mark the loop node group, extract the business termination conditions to set the loop monitoring mechanism, and convert the loop node group into a subtask based on the termination signal. The agent selection module is used to express the execution constraints of subtasks as constraint logic expressions, express the historical execution records of agents as inference rule bases, and select the agent with the highest logical consistency score for binding by matching and calculating logical consistency scores. The exception replacement module is used to establish a causal tracing chain when the agent executes a subtask. When an execution exception is detected, it traces back to the exception source subtask along the causal tracing chain, extracts the exception feature vector of the exception source subtask, constructs an exception propagation graph based on the exception feature vector, extracts node features from the business process graph for matching, selects the process node with the highest matching degree as the replacement process node, and generates a replacement subtask. The semantic alignment module is used to semantically align the output data of the preceding subtask with the input constraints of the subsequent subtask, inject the aligned data into the subsequent agent and trigger its execution.
8. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the computer program instructions are executed by the processor, they implement the method described in any one of claims 1 to 6.
Citation Information
Patent Citations
Multi-agent cooperative industrial design method and system for complex engineering
CN120197516A
Task complexity driven graph semantic multi-agent collaborative decision-making method and system
CN120950220A