Multi-agent task routing method and device based on causal atlas and related products
By using causal graphs to structure and manage the interaction history of multi-agent systems, the problems of slow processing speed and poor reasoning accuracy in existing systems are solved, achieving more efficient and accurate task processing and decision-making.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CSC FINANCIAL CO LTD
- Filing Date
- 2025-12-08
- Publication Date
- 2026-04-21
AI Technical Summary
Existing multi-agent systems suffer from slow processing speed, poor reasoning accuracy, and poor decision-making rationality when handling complex tasks. This is mainly because the interaction history between agents is stored in the form of simple text strings or dictionaries, which leads to reliance on expensive context windows and easy confusion of speaking objects and stances.
A multi-agent task routing method based on causal graphs is adopted. By generating an initial weighted directed graph, nodes represent agent speech, edges represent causal relationships, edge weights quantify causal strength, and interaction history is managed in a structured manner to clarify causal relationships, avoid disordered information accumulation, and update the graph through causal metadata to ensure that agents can quickly parse causal relationships during reasoning.
It significantly improves the processing speed, reasoning accuracy, and decision rationality of multi-agent systems in handling complex tasks, reduces computing power consumption and response latency, ensures that each decision is based on precise causal relationships, and improves the overall efficiency and accuracy of task processing.
Smart Images

Figure CN121900891A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and more specifically, to a multi-agent task routing method, apparatus, and related products based on causal graphs. Background Technology
[0002] A multi-agent system (MAS) is a distributed computing system formed by the interaction of multiple autonomous or semi-autonomous agents in an environment. It can solve complex problems that are difficult for a single agent to handle and is widely used in fields such as traffic management, disaster response, and social modeling. The agents can be software programs, robots, or human groups. They achieve task allocation and resource optimization through communication and cooperation. Its core characteristics include autonomous decision-making, distributed coordination, and environmental adaptability.
[0003] Existing multi-agent systems typically rely on a shared, flattened state space when handling complex tasks. In this model, the interaction history, data analysis results, and decision records between agents are often stored as simple text strings or dictionaries. While this approach enables basic information sharing, it has limitations: the dialogue history is usually just text arranged chronologically, which forces agents to rely on expensive context windows for reasoning and decision-making (paid per text volume, with higher computational costs and response latency for more interactive content). Furthermore, it can easily lead to agent confusion, such as misinterpreting the target audience or stance of their statements. These limitations result in poor processing speed, inference accuracy, and decision rationality in existing multi-agent systems when handling complex tasks. Therefore, it is urgent to solve this technical problem. Summary of the Invention
[0004] In view of the above situation, this application provides a multi-agent task routing method, device and related products based on causal graphs, which aims to solve the above problems or at least partially solve the above problems.
[0005] In a first aspect, embodiments of this application provide a multi-agent task routing method based on causal graphs, the method comprising: Generate an initial causal graph; the initial causal graph is a weighted directed graph consisting of an empty set of nodes, an empty set of edges, and an empty weight matrix; wherein, nodes are used to represent the speech of the agent, edges are used to represent the causal relationship between each speech, and edge weights are used to quantify the strength of the causal relationship between two edges. Multiple subtasks are sequentially designated as target subtasks; based on the target subtasks, the speaking agent is determined; The speaking agent generates the current speech content and corresponding causal metadata based on the causal graph; wherein, the causal metadata includes: the current speaking node identifier, the identifier of the speaking node to which the current speech is directed, the speech type of the current speech, the causal relationship type between the current speech and the speaking node to which it is directed, and the citation identifier of the evidence cited in the current speech. The causal graph is updated based on the content of the current speech and the causal metadata. Return to the step of determining the speaking agent based on the target subtask, until the target subtask is completed.
[0006] Secondly, embodiments of this application also provide a multi-agent task routing device based on causal graphs, the device comprising: The graph initialization module is used to generate an initial causal graph. The initial causal graph is a weighted directed graph consisting of an empty set of nodes, an empty set of edges, and an empty weight matrix. Nodes represent the statements of the agents, edges represent the causal relationships between statements, and edge weights quantify the strength of the causal relationship between two edges. The determination module is used to sequentially identify multiple subtasks as target subtasks; and to determine the speaking agent based on the target subtasks. The generation module is used by the speaking agent to generate the speech content of the current speech and the corresponding causal metadata based on the causal graph; wherein the causal metadata includes: the current speaking node identifier, the identifier of the speaking node to which the current speech is directed, the speech type of the current speech, the causal relationship type between the current speech and the speaking node to which it is directed, and the citation identifier of the evidence cited in the current speech. The graph update module is used to update the causal graph based on the content of the current speech and the causal metadata; and return to the step of determining the speaking agent based on the target subtask until the target subtask is completed.
[0007] Thirdly, embodiments of this application also provide an electronic device, including: a processor; and a memory arranged to store computer-executable instructions, which, when executed, cause the processor to perform the steps of the above-described multi-agent task routing method based on causal graphs.
[0008] Fourthly, embodiments of this application also provide a computer-readable storage medium that stores one or more programs. When executed by an electronic device including multiple applications, the one or more programs cause the electronic device to perform the steps of the multi-agent task routing method based on causal graphs described above.
[0009] Using the above technical solutions, the multi-agent task routing method, device, and related products based on causal graphs provided in this application can first initialize a weighted directed graph-like causal graph consisting of an empty node set, an empty edge set, and an empty weight matrix. Nodes represent agent statements, edges represent causal relationships between statements, and edge weights are used to quantify causal strength. The causal graph-like state space replaces the traditional flattened state space, no longer simply storing interaction information as text strings or dictionaries, laying the foundation for subsequent structured management of interaction history and clarification of causal relationships, avoiding disordered information accumulation. Then, multiple sub-tasks are sequentially used as target sub-tasks, and the speaking agents are determined accordingly, clarifying the information output subjects at each stage. Next, the speaking agent generates speech content and causal metadata, including the current speaking node identifier, the targeted node identifier, the speech type, and the type of causal relationship, based on the current causal graph. Then, it updates the causal graph based on the speech content and causal metadata. Here, the causal metadata directly identifies the target and associated attributes of the speech, continuously updating the structured interactive causal information of the graph. Furthermore, by quantifying causal strength through edge weights, the agent can quickly parse the causal relationships between speeches during subsequent reasoning, eliminating the need for semantic understanding in large amounts of unordered text. This largely avoids the problem of the agent confusing the target and the stance of the speech, significantly improving reasoning accuracy while greatly reducing computational consumption and response latency. Finally, the process of determining the speaking agent, generating content and metadata, and updating the graph is repeated until the subtask is completed. This ensures that the entire process of handling complex tasks is based on structured information with clear causal relationships. The graph is continuously optimized with each interaction, allowing each decision to rely on precise causal connections from the preceding steps. Ultimately, this comprehensively improves the processing speed, reasoning accuracy, and decision-making rationality of the multi-agent system in handling complex tasks.
[0010] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description
[0011] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments of this application and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 A flowchart illustrating the multi-agent task routing method based on causal graphs provided in an embodiment of this application is shown. Figure 2 A flowchart illustrating a multi-agent task routing method based on causal graphs according to another embodiment of this application is shown. Figure 3This paper shows a schematic diagram of the structure of a multi-agent task routing device based on causal graphs provided in an embodiment of this application. Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of this application is shown. Detailed Implementation
[0012] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0013] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0014] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such use can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the term "comprising" and its variations should be interpreted as open-ended terms meaning "including but not limited to."
[0015] As previously mentioned, existing multi-agent systems typically rely on a shared, flattened state space when handling complex tasks. In this model, the interaction history, data analysis results, and decision records between agents are often stored as simple text strings or dictionaries. While this method enables basic information sharing, it has limitations: the dialogue history is usually just text arranged chronologically, which forces agents to rely on expensive context windows (paid per text volume, with higher computational costs and response latency for more interactive content) when making inferences and decisions. Furthermore, it can easily lead to agent confusion, such as misinterpreting the target audience or stance of their statements. These limitations result in poor processing speed, inference accuracy, and decision rationality in existing multi-agent systems when handling complex tasks. Therefore, this invention proposes a multi-agent task routing method, apparatus, and related products based on causal graphs. The following detailed description of specific embodiments further illustrates this application.
[0016] To facilitate understanding of this embodiment, a detailed description of the causal graph-based multi-agent task routing method disclosed in this application embodiment will be provided first. The executing entity of the causal graph-based multi-agent task routing method provided in this application embodiment is generally a computer device with a certain computing capability. This computer device may include, for example, a terminal device, a server, or other processing devices. The terminal device can be a user equipment (UE), mobile device, user terminal, terminal, personal digital assistant (PDA), handheld device, computing device, etc. In some possible implementations, this causal graph-based multi-agent task routing method can be implemented by the processor calling computer-readable instructions stored in memory.
[0017] Figure 1 This illustration shows a flowchart of a multi-agent task routing method based on causal graphs provided in an embodiment of this application. Figure 1 It can be seen that the embodiments of this application include at least steps S101-S105: S101: Generate an initial causal graph; the initial causal graph is a weighted directed graph consisting of an empty set of nodes, an empty set of edges, and an empty weight matrix; wherein, nodes are used to represent the speech of the agent, edges are used to represent the causal relationship between each speech, and edge weights are used to quantify the strength of the causal relationship between two edges. S102: Sequentially designate multiple subtasks as target subtasks; determine the speaking agent based on the target subtasks; S103: The speaking agent generates the current speaking content and corresponding causal metadata based on the causal graph; wherein, the causal metadata includes: the current speaking node identifier, the identifier of the speaking node targeted by the current speaking, the speaking type of the current speaking, the causal relationship type between the current speaking and the speaking node targeted by it, and the citation identifier of the evidence cited in the current speaking. S104: Update the causal graph based on the content of the current speech and the causal metadata; S105: Return to the step of determining the speaking agent based on the target sub-task, until the target sub-task is completed.
[0018] As can be seen, this embodiment first initializes a weighted directed graph-like causal graph consisting of an empty node set, an empty edge set, and an empty weight matrix. Nodes represent agent statements, edges represent causal relationships between statements, and edge weights quantify causal strength. This graph-like state space replaces the traditional flat state space, no longer simply storing interaction information as text strings or dictionaries. This lays the foundation for subsequent structured management of interaction history and clarification of causal relationships, avoiding disordered information accumulation. Then, multiple subtasks are sequentially used as target subtasks, and the speaking agents are determined accordingly, clarifying the information output subjects at each stage. Next, the speaking agent generates speech content and causal metadata, including the current speaking node identifier, the targeted node identifier, the speech type, and the type of causal relationship, based on the current causal graph. Then, it updates the causal graph based on the speech content and causal metadata. Here, the causal metadata directly identifies the target and associated attributes of the speech, continuously updating the structured interactive causal information of the graph. Furthermore, by quantifying causal strength through edge weights, the agent can quickly parse the causal relationships between speeches during subsequent reasoning, eliminating the need for semantic understanding in large amounts of unordered text. This largely avoids the problem of the agent confusing the target and the stance of the speech, significantly improving reasoning accuracy while greatly reducing computational consumption and response latency. Finally, the process of determining the speaking agent, generating content and metadata, and updating the graph is repeated until the subtask is completed. This ensures that the entire process of handling complex tasks is based on structured information with clear causal relationships. The graph is continuously optimized with each interaction, allowing each decision to rely on precise causal connections from the preceding steps. Ultimately, this comprehensively improves the processing speed, reasoning accuracy, and decision-making rationality of the multi-agent system in handling complex tasks.
[0019] During implementation, by using this graph, users can trace the complete logical chain of the final decision-making result, accurately identify which argument and which piece of evidence is the key turning point in the decision, locate the key rebuttal points that lead to negative results or arguments that lack evidence support, thereby accumulating experience and learning independently, and improving the quality of their future decision-making.
[0020] The following provides a detailed explanation of S101-S105.
[0021] Regarding S102 and S105 above: During implementation, the multi-agent system will acquire the task to be solved (a specific task that requires multiple agents to complete through division of labor, interaction, and collaboration, such as formulating a promotion plan for an e-commerce platform, analyzing the risk points of a project, generating a technical report, etc.). This task will first be broken down into multiple sub-tasks. The specific decomposition method is based on existing technology and will not be elaborated here.
[0022] exist Figure 1In the illustrated embodiment, the multiple subtasks to be broken down are sequentially used as target subtasks. For each target subtask, the following steps are executed cyclically: based on the target subtask, a speaking agent is determined; the speaking agent generates the current speaking content and corresponding causal metadata according to the causal graph; the causal graph is updated according to the current speaking content and the causal metadata until the target subtask is completed. Finally, after each subtask is completed, the decision agent makes a decision, thus completing the routing of the multi-agent task.
[0023] Regarding S101, S103, and S104 above: First, a causal graph is initialized, which can be formalized as a weighted directed graph G=(V,E,W), where V is an empty set of nodes, E is an empty set of edges, and W is an empty weight matrix. Here, nodes represent the statements of each agent, edges represent the causal relationships between statements, and edge weights are used to quantify the strength of the causal relationship between two edges.
[0024] In practical implementation, for node v, i ∈V can be represented by a tuple, where the node's attributes, i.e., the characteristics of the tuple, include, but are not limited to: the speech identifier ID. i (Unique identifier for this statement), Agent identifier i (Unique identifier of the speaking agent), Content of the speech i (The original text string of the message), Message Type (Type) i The purpose of the speech is determined by a predefined set T, such as T = {Proposal, Rebuttal, Support, Question}, where Proposal proposes a new viewpoint or solution; Rebuttal directly refutes another viewpoint; Support agrees with and reinforces another viewpoint; and Question raises a question about a viewpoint. The speech content is embedded in the vector Embed. i Content can be encoded by a pre-trained language model encoder ε(·). i Mapping to d-dimensional vector space, i.e., Embed i =ε(Content i ), timestamp TS i (Speaking time).
[0025] For edge e ij ∈E is a source node v i to target node v j A directed relation can be defined by a tuple, and the characteristics of a tuple include, but are not limited to, the source node identifier (ID). iTarget node identifier ID j Relation type Rel ij : Used to describe the type of causal relationship, taking values from a predefined set R, for example, R={RespondsTo, Refutes, Supports, Disagrees, Cites}, where RespondsTo (response): provides a general response to a statement; Refutes (refute): explicitly points out the error of a viewpoint (statement); Supports (support): explicitly expresses agreement with a viewpoint (statement); Disagrees (disagree): explicitly expresses disagreement with a viewpoint (statement); Cites (cite): cites evidence; citation identifier Evid ij When the relation type is Cites, this identifier points to a reference to external data or internal process artifacts. If Rel ij If no references are involved, this item is an empty set. The internal process outputs are data other than text output by the agent, such as reports, graphs, and tables.
[0026] For a weight matrix W, edge weights w ij ∈W is a non-negative real number. In implementation, it can be directly output by the agent.
[0027] In some embodiments, updating the causal graph based on the content of the current speech and the causal metadata includes: Create the current message node corresponding to the current message; Based on the content of the current speech and the corresponding causal metadata, the attribute values of the current speech node are set; wherein, the node attributes include: speech content, speech identifier, speech agent identifier, speech type, content embedding vector, and timestamp; Based on the node identifier of the historical message node to which the current message is directed, create a directed edge from the current message node to the historical message node; Based on the causal metadata of the current speech, the attribute values of the directed edge are set; the attributes of the directed edge include: the identifier of the historical speech node, the identifier of the current speech node, the causal relationship type between the current speech node and the historical speech node, and the citation identifier of the evidence cited in the current speech; Set the edge weights of the directed edges and record them in the weight matrix.
[0028] In this embodiment, a new speaking node can be created based on the current speaking content and causal metadata, and the node attributes, edge attributes, and edge weights can be updated, thereby realizing the updating of the causal graph.
[0029] In implementation, the node corresponding to the current speech, i.e., the current speech node, can be created first, and its attribute values can be set. Specifically, the identifier of the current speech node can be extracted from the causal metadata and set as the "speech identifier" attribute value of the current speech node; the speech type of the current speech can be extracted and set as the "speech type" attribute value of the node; then, the speech content of the current speech can be filled into the "speech content" attribute, the identifier of the agent that made the speech can be set as the "speech agent identifier" attribute value of the current speech node, the speech content can be encoded to obtain an embedding vector, and this can be set as the "content embedding vector" attribute value of the current speech node. The current time can be recorded as a "timestamp" to complete the setting of the various attributes of the current speech node.
[0030] Next, based on the node identifier of the historical message node targeted by the current message, a directed edge is created from the current message node to the historical message node, and the attributes of the directed edge are set. Specifically, the identifier of the message node targeted by the current message can be obtained from the causal metadata, and the corresponding historical message node can be found; then, a directed edge connecting the two is created with the current message node as the starting point and the historical message node as the ending point. The obtained historical message node identifier is then filled into the "historical message node identifier" attribute of the directed edge, and the current message node identifier is filled into the "current message node identifier" attribute; the causal relationship type between the current message node and the historical message node is extracted from the causal metadata and set as the "causal relationship type between the current message node and the historical message node" attribute of the directed edge; and combined with the identifier corresponding to the evidence cited in the current message, it is set as the "citation identifier" attribute, thus completing the setting of the directed edge attributes.
[0031] Regarding edge weights, in some embodiments of this application, the edge weights are generated according to the following method: Calculate the content similarity based on the content embedding vectors of the current speaking node and the historical speaking nodes; Calculate the credibility of the evidence based on the citation identifier of the current speaking node; Calculate time decay data based on the timestamps of the current speaking node and the historical speaking nodes; The edge weights are calculated based on the content similarity, the credibility of the evidence, and the time decay data.
[0032] In this embodiment, for the step of "calculating content similarity based on the content embedding vectors of the current speaking node and the historical speaking nodes", in specific implementation, for example, cosine similarity can be used to calculate content similarity, which can be calculated according to the following formula: Sim(v i ,v j )=(Embed i Embedj ) / (||Embed i ||×||Embed j ||) Where “·” represents the vector dot product, and “||·||” represents the L2 norm of the vector; the result ranges from [0,1], and the higher the value, the stronger the semantic connection between the two speaking nodes.
[0033] Regarding the step of "calculating the credibility of evidence based on the citation identifier of the current speaking node," in some embodiments, the credibility of evidence is calculated according to the following formula:
[0034] in, This indicates the credibility of the evidence. Assuming a pre-defined level of credibility for external evidence, The preset internal evidence credibility level is defined, where internal evidence refers to speech data generated by the speaking agent other than text format. The internal and external evidence credibility levels can be set according to actual needs; this embodiment does not impose any limitations on this.
[0035] For example, if a speaking agent cites an authoritative industry standard document as external evidence, the credibility of that external evidence is preset. The value was set to 0.9, and simulation data charts (non-textual internal evidence) were generated to verify the feasibility of the scheme. The credibility of the internal evidence was preset. The value is 0.8. Calculated using the above formula, the credibility of the evidence for the current speaking node is 1 / 2 × 0.9 + 1 / 2 × 0.8 = 0.85; if the external evidence is ordinary journal literature (… Set to 0.7), internal evidence consists of policy analysis reports generated by other agents ( If we set it to 0.6, then the credibility of the evidence is 1 / 2 × 0.7 + 1 / 2 × 0.6 = 0.65.
[0036] For the step of "calculating time decay data based on the timestamps of the current speaking node and the historical speaking nodes", the calculation can be performed using the following formula:
[0037] in, This represents the difference between the timestamps of the current speaking node and the timestamps of historical speaking nodes.
[0038] Finally, the edge weights are calculated based on the content similarity, the evidence credibility, and the time decay data. Specifically, the edge weights can be obtained by multiplying the content similarity, the evidence credibility, and the time decay data, i.e., by calculating the edge weights using the following formula:
[0039] In practical applications, existing multi-agent systems typically rely on pre-defined round counts or simple keyword matching to drive the process. However, this rigid routing mechanism cannot adapt to dynamic changes in tasks, potentially leading to inefficient repetitive discussions or premature decisions. Therefore, see [link to relevant documentation]. Figure 2 As shown, in some embodiments of this application, before the step of returning to determine the speaking agent based on the target subtask, the method further includes: The team consensus degree is calculated based on the edge weights of all supporting and opposing edges in the causal graph. Based on the causal graph, the influence score of each node is calculated; Based on the team consensus and the influence scores of each member, the sub-tasks to be solved are determined. The subtask to be solved is identified as the target subtask.
[0040] Before returning to the step of determining the speaking agent based on the target subtask, this embodiment also calculates the team consensus and the influence score of each node by analyzing the causal graph, and uses these two indicators to determine the subtask to be solved.
[0041] Specifically, regarding the step of "calculating the team consensus degree based on the weights of all supporting edges and all rebuttal edges in the causal graph," the team consensus degree can be calculated using the following formula:
[0042] in, E represents the level of team consensus. supports E represents the set of edges with the relation type Supports. refutes E represents the set of edges of relation type Refutes. disagrees This represents the set of edges with the relation type Disagrees, where ε is a small positive number to prevent the denominator from being zero.
[0043] Understandably, S consensus [0,∞), when the value approaches 0, it indicates that there are serious disagreements within the team; when the value approaches positive infinity, it indicates that the team has reached a strong consensus.
[0044] Regarding the step of "calculating the influence score of each node based on the causal graph," in some embodiments of this application, calculating the influence score of each node based on the causal graph includes: Treat each node as a target node and perform the following steps: Determine the set of parent nodes of the target node; the nodes in the set of parent nodes directly point to the target node; calculate the basic influence score of the target node based on the edge weight from each node in the set of parent nodes to the target node and the total weight of all outgoing edges of each node; Based on the rebuttal and opposition incoming edge weights of the target node in the causal graph, the degree of rebuttal of the target node is calculated. The influence score of the target node is calculated based on the basic influence score and the data on the degree of refutation.
[0045] In this embodiment, to calculate the influence score of each node, the basic influence score and the degree of refutation of each node can be calculated first.
[0046] In practice, the basic influence score of the target node can be calculated using, for example, the following formula:
[0047] Among them, I(v) i ) (t+1) Represents node v i Influence score after iteration t+1. The damping factor has a range of values. (0,1); V is the total number of nodes, 1 / |V| is the basic influence value, which ensures that each node in the graph has an average initial influence score at the start of the algorithm. Parents(v i ) represents all direct pointers to node v i The set of nodes (i.e., references v) i (nodes); w ji Representing edge e ji The weight of an edge is determined by its weight; the higher the weight of the edge, the greater the influence it transmits. OutWeight(v j ) represents node v j The total weight of all outgoing edges is used for normalization to ensure that the total influence of a node is distributed across all the arguments it references.
[0048] The reason iteration is needed here is that a node's base influence score cannot be determined in a single calculation. It depends on the influence of the nodes that reference it (i.e., Parents(vi)), and the influence of these referencing nodes also needs to be calculated using the same logic, exhibiting a mutually dependent transitive relationship. For example, node v1 references v... i The influence score of v1 will affect v iThe score of v1 may depend on the score of v2, which references v1. This chain reaction cannot be covered by a single calculation. By iterating, the node influence score obtained in the previous round is used to update the next round of calculation until the scores of all nodes no longer change significantly (reaching convergence). The final result can truly reflect the actual influence transmission between nodes in the graph based on reference relationships and edge weights, avoiding the result deviation caused by a single calculation relying only on the initial average influence.
[0049] For data on the degree of refutation, it can be calculated using the following formula:
[0050] Represents node v i The degree to which the argument is refuted, with a value range of [0,1]. This represents the set of all incoming edges whose relation type is Refutes or Disagrees. Indicates pointing to v i The sum of the weights of all rebuttal edges (i.e., v) i (Total strength of the rebuttal) Indicates all pointers to v i The set of incoming edges (all relation types). Indicates v i The sum of all incoming edge weights (i.e., v) i (Total attention received during the discussion).
[0051] Understandably, the data on the degree of refutation is used to weaken the influence of a well-refuted argument; the higher the score, the more severely the argument is weakened in the debate.
[0052] After obtaining the basic influence score and the degree of refutation for each node, the final influence score I can be calculated using the following formula. final (v i ):
[0053] Understandably, if an argument is not refuted at all (RefutationScore = 0), its final impact equals its original impact I(v). i If an argument is refuted extremely strongly (RefutationScore ≈ 1), its final impact is close to zero, indicating that the argument is invalid or irrelevant.
[0054] Finally, based on the team consensus and the influence scores of each, the sub-task to be solved is determined; if the sub-task to be solved is the current target sub-task, then return to the step of determining the speaking agent based on the target sub-task; if the sub-task to be solved is the next sub-task, then take the next sub-task as the target sub-task and return to the step of determining the speaking agent based on the target sub-task.
[0055] Regarding the step of "determining the sub-tasks to be solved based on the team consensus and each influence score," in some embodiments of this application, determining the sub-tasks to be solved based on the team consensus and each influence score includes: Based on the influence score of each node, the weight of the incoming edges of each rebuttal category, the preset sufficient rebuttal threshold and influence threshold, one or more nodes that have not been sufficiently refuted are selected. Calculate the total unrefuted influence based on the influence scores of one or more nodes that were not sufficiently refuted; Based on the team consensus level, the sum of the unrebutted influence, and the preset consensus level threshold and unrebutted influence threshold, the sub-tasks to be solved are determined.
[0056] In this embodiment, one or more nodes that have not been sufficiently refuted are first selected based on preset sufficient refutation thresholds and influence thresholds. Specifically, a node that has not been sufficiently refuted is defined as follows:
[0057] Where, θ W θ is the preset threshold for sufficient rebuttal. I The preset influence threshold, This represents a rebuttal-type edge pointing to node i. The nodes that have not been sufficiently refuted are those whose influence score is greater than the preset influence threshold and whose weight is less than the preset sufficient refutation threshold.
[0058] After identifying nodes that have not been sufficiently refuted, the total unrefuted influence can be calculated based on the influence scores of one or more such nodes. Specifically, the total unrefuted influence can be calculated using the following formula. :
[0059] Finally, based on the team consensus level, the sum of unrebuttal influence, and preset consensus level and unrebuttal influence thresholds, the sub-tasks to be solved are determined. Specifically, the sub-tasks to be solved can be determined according to the following function:
[0060] Where, θS θ represents the preset consensus threshold. U This represents the preset threshold for unrefuted influence. During implementation, if Sconsensus < θ S And UCTI>θ U If Sconsensus ≥ θ, then the debate on the current target subtask continues, and the route is routed to the relevant agent; S Or UCTI≤θ U : End the current target subtask and route to the next stage subtask or the final decision-maker (decision-making agent).
[0061] This embodiment first calculates the team consensus based on the weights of the support and refutation edges in the causal graph. This step transforms the interaction of viewpoints among agents into a quantifiable consensus indicator. Next, it calculates the influence score of each node based on the causal graph, which can be used to clarify the discussion value of the node and provide a basis for judging whether the node has been sufficiently refuted. Then, based on the team consensus and the influence scores of each node, combined with the status of whether the node has been sufficiently refuted, it judges the necessity of advancing the current subtask. Finally, the current subtask that needs to be continued after the judgment is determined to be the target subtask. This makes the multi-agent collaboration process no longer blindly follow the preset rules, but decides whether to continue the current subtask based on the actual consensus progress and whether the node has been sufficiently refuted. It avoids wasting energy on subtasks where the node has been sufficiently refuted and no longer needs discussion, and can continue to focus on the current subtask where the node has not been sufficiently refuted and still needs to be clarified. This avoids ineffective repeated discussions or premature decisions under rigid mechanisms, and ultimately effectively improves the adaptability and execution efficiency of the task process.
[0062] Those skilled in the art will understand that in the above-described method of the specific embodiments, the order in which the steps are written does not imply a strict execution order, and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.
[0063] It should be noted that in practical applications, all the above-mentioned possible implementation methods can be combined in any way to form possible embodiments of this application, and will not be described in detail here. The information (including but not limited to device information, user information, etc.) and data (including but not limited to data used for analysis, storage and display, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0064] Based on the same concept, this application also provides a multi-agent task routing device based on causal graphs, which corresponds one-to-one with the multi-agent task routing method based on causal graphs in the above embodiments. Figure 3This paper shows a schematic diagram of the structure of a multi-agent task routing device based on causal graphs provided in an embodiment of this application. See also... Figure 3 As shown, the causal graph-based multi-agent task routing device 300 provided in this application includes: The graph initialization module 301 is used to generate an initial causal graph. The initial causal graph is a weighted directed graph consisting of an empty node set, an empty edge set, and an empty weight matrix. Nodes represent the speech of an agent, edges represent the causal relationship between speeches, and edge weights quantify the strength of the causal relationship between two edges. The determination module 302 is used to sequentially identify multiple subtasks as target subtasks and determine the speaking agent based on the target subtasks. The generation module 303 is used by the speaking agent to generate the speech content of the current speech and the corresponding causal metadata according to the causal graph; wherein, the causal metadata includes: the current speaking node identifier, the identifier of the speaking node to which the current speech is directed, the speech type of the current speech, the causal relationship type between the current speech and the speaking node to which it is directed, and the citation identifier of the evidence cited in the current speech. The graph update module 304 is used to update the causal graph based on the content of the current speech and the causal metadata; and return to the step of determining the speaking agent based on the target subtask until the target subtask is completed.
[0065] In some embodiments, in the above-described apparatus, the map update module 304 is specifically used for: Create the current message node corresponding to the current message; Based on the content of the current speech and the corresponding causal metadata, the attribute values of the current speech node are set; wherein, the node attributes include: speech content, speech identifier, speech agent identifier, speech type, content embedding vector, and timestamp; Based on the node identifier of the historical message node to which the current message is directed, create a directed edge from the current message node to the historical message node; Based on the causal metadata of the current speech, the attribute values of the directed edge are set; the attributes of the directed edge include: the identifier of the historical speech node, the identifier of the current speech node, the causal relationship type between the current speech node and the historical speech node, and the citation identifier of the evidence cited in the current speech; Set the edge weights of the directed edges and record them in the weight matrix.
[0066] In some embodiments, the apparatus further includes a weight calculation module for: Calculate the content similarity based on the content embedding vectors of the current speaking node and the historical speaking nodes; Calculate the credibility of the evidence based on the citation identifier of the current speaking node; Calculate time decay data based on the timestamps of the current speaking node and the historical speaking nodes; The edge weights are calculated based on the content similarity, the credibility of the evidence, and the time decay data.
[0067] In some embodiments, in the above-described apparatus, the credibility of the evidence is calculated according to the following formula:
[0068] in, This indicates the credibility of the evidence. Assuming a pre-defined level of credibility for external evidence, The preset credibility of internal evidence is defined as the speech data generated by the speaking agent, excluding textual data.
[0069] In some embodiments, the apparatus further includes a routing module, configured to: prior to the step of returning to determine the speaking agent based on the target subtask. The team consensus degree is calculated based on the edge weights of all supporting and opposing edges in the causal graph. Based on the causal graph, the influence score of each node is calculated; Based on the team consensus and the influence scores of each member, the sub-tasks to be solved are determined. The subtask to be solved is identified as the target subtask.
[0070] In some embodiments, in the above-described apparatus, the routing module, when calculating the influence score of each node based on the causal graph, is specifically used for: Treat each node as a target node and perform the following steps: Determine the set of parent nodes of the target node; the nodes in the set of parent nodes directly point to the target node; calculate the basic influence score of the target node based on the edge weight from each node in the set of parent nodes to the target node and the total weight of all outgoing edges of each node; Based on the rebuttal and opposition incoming edge weights of the target node in the causal graph, the degree of rebuttal of the target node is calculated. The influence score of the target node is calculated based on the basic influence score and the data on the degree of refutation.
[0071] In some embodiments, in the above-described apparatus, when the routing module determines the sub-tasks to be solved based on the team consensus and each of the influence scores, it is specifically used for: Based on the influence score of each node, the weight of the incoming edges of each rebuttal category, the preset sufficient rebuttal threshold and influence threshold, one or more nodes that have not been sufficiently refuted are selected. Calculate the total unrefuted influence based on the influence scores of one or more nodes that were not sufficiently refuted; Based on the team consensus level, the sum of the unrebutted influence, and the preset consensus level threshold and unrebutted influence threshold, the sub-tasks to be solved are determined.
[0072] This invention provides a multi-agent task routing device based on causal graphs. First, a weighted directed graph-like causal graph is initialized, consisting of an empty set of nodes, empty sets of edges, and an empty weight matrix. Nodes represent agent statements, edges represent causal relationships between statements, and edge weights quantify causal strength. This graph-like state space replaces the traditional flat state space, eliminating the simple storage of interaction information as text strings or dictionaries. This lays the foundation for subsequent structured management of interaction history and clarification of causal relationships, avoiding disordered information accumulation. Then, multiple subtasks are sequentially designated as target subtasks, and the speaking agents are determined accordingly, clarifying the information output subjects at each stage. Next, the speaking agent generates speech content and causal metadata, including the current speaking node identifier, the targeted node identifier, the speech type, and the type of causal relationship, based on the current causal graph. Then, it updates the causal graph based on the speech content and causal metadata. Here, the causal metadata directly identifies the target and associated attributes of the speech, continuously updating the structured interactive causal information of the graph. Furthermore, by quantifying causal strength through edge weights, the agent can quickly parse the causal relationships between speeches during subsequent reasoning, eliminating the need for semantic understanding in large amounts of unordered text. This largely avoids the problem of the agent confusing the target and the stance of the speech, significantly improving reasoning accuracy while greatly reducing computational consumption and response latency. Finally, the process of determining the speaking agent, generating content and metadata, and updating the graph is repeated until the subtask is completed. This ensures that the entire process of handling complex tasks is based on structured information with clear causal relationships. The graph is continuously optimized with each interaction, allowing each decision to rely on precise causal connections from the preceding steps. Ultimately, this comprehensively improves the processing speed, reasoning accuracy, and decision-making rationality of the multi-agent system in handling complex tasks.
[0073] Specific limitations regarding the causal graph-based multi-agent task routing device can be found in the limitations of the causal graph-based multi-agent task routing method described above, and will not be repeated here. Each module in the aforementioned causal graph-based multi-agent task routing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0074] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of this application is shown. Figure 4 As shown, at the hardware level, this electronic device includes a processor, and optionally also includes an internal bus, a network interface, and memory. The memory may include main memory, such as high-speed random-access memory (RAM), or it may include non-volatile memory, such as at least one disk drive. Of course, this electronic device may also include other hardware required for other business operations.
[0075] The processor, network interface, and memory can be interconnected via an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 4 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.
[0076] Memory is used to store programs. Specifically, programs may include program code, which includes computer operation instructions. Memory may include main memory and non-volatile memory, and provides instructions and data to the processor.
[0077] The processor reads the corresponding computer program from non-volatile memory into main memory and then runs it, forming a multi-agent task routing device based on causal graphs at the logical level. The processor executes the program stored in memory and specifically performs the aforementioned methods.
[0078] The processor may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in the memory, and the processor reads the information in the memory and, in conjunction with its hardware, completes the steps of the above method.
[0079] This electronic device can execute the causal graph-based multi-agent task routing method provided in several embodiments of this application, and is implemented as a causal graph-based multi-agent task routing device. Figure 3 The functions of the embodiments shown are not described in detail here.
[0080] This application also proposes a computer-readable storage medium that stores one or more programs, the programs including instructions that, when executed by an electronic device including multiple applications, enable the electronic device to perform the causal graph-based multi-agent task routing method provided in several embodiments of this application.
[0081] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0082] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0083] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0084] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0085] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0086] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0087] Computer-readable media include both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0088] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0089] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0090] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A multi-agent task routing method based on causal graphs, characterized in that, The method includes: Generate an initial causal graph; the initial causal graph is a weighted directed graph consisting of an empty set of nodes, an empty set of edges, and an empty weight matrix; wherein, nodes are used to represent the speech of the agent, edges are used to represent the causal relationship between each speech, and edge weights are used to quantify the strength of the causal relationship between two edges. Multiple subtasks are sequentially designated as target subtasks; based on the target subtasks, the speaking agent is determined; The speaking agent generates the current speech content and corresponding causal metadata based on the causal graph; wherein, the causal metadata includes: the current speaking node identifier, the identifier of the speaking node to which the current speech is directed, the speech type of the current speech, the causal relationship type between the current speech and the speaking node to which it is directed, and the citation identifier of the evidence cited in the current speech. The causal graph is updated based on the content of the current speech and the causal metadata. Return to the step of determining the speaking agent based on the target subtask, until the target subtask is completed.
2. The method according to claim 1, characterized in that, The step of updating the causal graph based on the content of the current speech and the causal metadata includes: Create the current message node corresponding to the current message; Based on the content of the current speech and the corresponding causal metadata, the attribute values of the current speech node are set; wherein, the node attributes include: speech content, speech identifier, speech agent identifier, speech type, content embedding vector, and timestamp; Based on the node identifier of the historical message node to which the current message is directed, create a directed edge from the current message node to the historical message node; Based on the causal metadata of the current speech, the attribute values of the directed edge are set; the attributes of the directed edge include: the identifier of the historical speech node, the identifier of the current speech node, the causal relationship type between the current speech node and the historical speech node, and the citation identifier of the evidence cited in the current speech; Set the edge weights of the directed edges and record them in the weight matrix.
3. The method according to claim 2, characterized in that, The method further includes: Calculate the content similarity based on the content embedding vectors of the current speaking node and the historical speaking nodes; Calculate the credibility of the evidence based on the citation identifier of the current speaking node; Calculate time decay data based on the timestamps of the current speaking node and the historical speaking nodes; The edge weights are calculated based on the content similarity, the credibility of the evidence, and the time decay data.
4. The method according to claim 3, characterized in that, The credibility of the evidence is calculated according to the following formula: in, This indicates the credibility of the evidence. Assuming a pre-defined level of credibility for external evidence, The preset credibility of internal evidence is defined as the speech data generated by the speaking agent, excluding textual data.
5. The method according to any one of claims 1-4, characterized in that, Before the step of returning to determine the speaking agent based on the target subtask, the method further includes: The team consensus degree is calculated based on the edge weights of all supporting and opposing edges in the causal graph. Based on the causal graph, the influence score of each node is calculated; Based on the team consensus and the influence scores of each member, the sub-tasks to be solved are determined. The subtask to be solved is identified as the target subtask.
6. The method according to claim 5, characterized in that, The calculation of the influence score for each node based on the causal graph includes: Treat each node as a target node and perform the following steps: Determine the set of parent nodes of the target node; the nodes in the set of parent nodes directly point to the target node; calculate the basic influence score of the target node based on the edge weight from each node in the set of parent nodes to the target node and the total weight of all outgoing edges of each node; Based on the rebuttal and opposition incoming edge weights of the target node in the causal graph, the degree of rebuttal of the target node is calculated. The influence score of the target node is calculated based on the basic influence score and the data on the degree of refutation.
7. The method according to claim 5, characterized in that, Based on the team consensus and the influence scores of each member, the sub-tasks to be solved are determined, including: Based on the influence score of each node, the weight of the incoming edges of each rebuttal category, the preset sufficient rebuttal threshold and influence threshold, one or more nodes that have not been sufficiently refuted are selected. Calculate the total unrefuted influence based on the influence scores of one or more nodes that were not sufficiently refuted; Based on the team consensus level, the sum of the unrebutted influence, and the preset consensus level threshold and unrebutted influence threshold, the sub-tasks to be solved are determined.
8. A multi-agent task routing device based on causal graphs, characterized in that, The device includes: The graph initialization module is used to generate an initial causal graph. The initial causal graph is a weighted directed graph consisting of an empty set of nodes, an empty set of edges, and an empty weight matrix. Nodes represent the statements of the agents, edges represent the causal relationships between statements, and edge weights quantify the strength of the causal relationship between two edges. The determination module is used to sequentially identify multiple subtasks as target subtasks; and to determine the speaking agent based on the target subtasks. The generation module is used by the speaking agent to generate the speech content of the current speech and the corresponding causal metadata based on the causal graph; wherein the causal metadata includes: the current speaking node identifier, the identifier of the speaking node to which the current speech is directed, the speech type of the current speech, the causal relationship type between the current speech and the speaking node to which it is directed, and the citation identifier of the evidence cited in the current speech. The graph update module is used to update the causal graph based on the content of the current speech and the causal metadata; and return to the step of determining the speaking agent based on the target subtask until the target subtask is completed.
9. An electronic device, comprising: processor; as well as A memory configured to store computer-executable instructions, characterized in that, when executed, the executable instructions cause the processor to perform the steps of the method as described in any one of claims 1-7.
10. A computer-readable storage medium storing one or more programs, characterized in that, When the one or more programs are executed by an electronic device including multiple applications, the electronic device causes the electronic device to perform the steps of the method as described in any one of claims 1-7.
Citation Information
Patent Citations
Multi-agent cooperative industrial design method and system for complex engineering
CN120197516A
Multi-stage task processing method and system based on intelligent Agent model
CN120335962A
Reinforcement learning decision optimization method, system and equipment based on causal big language model
CN120911539A
Energy system subversive technology identification method, equipment and medium
CN120996046A
Autonomous agent rumor checking system based on dynamic causal evidence graph
CN121072525A