Task matching method and system based on multi-agent system

By specifying a master agent in a multi-agent system, using knowledge graphs and directed acyclic graphs to analyze task relationships, and rationally allocating tasks to the most appropriate slave agents, the problems of resource waste and task confusion among agents are solved, and efficient and accurate task execution is achieved.

CN120704884APending Publication Date: 2025-09-26JIANGSU HENGBAO INTELLIGENT SYST TECH CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In existing multi-agent systems, data sharing between agents leads to resource waste and low efficiency, and task allocation is conflicting and chaotic, failing to effectively consider logical relationships and time dependencies.

Method used

In a multi-agent system, a master agent is designated. By constructing a knowledge graph and a directed acyclic graph, the associations and time dependencies between tasks are analyzed, and tasks are reasonably assigned to the most appropriate slave agents to ensure that tasks are executed in sequence.

Benefits of technology

It improves the accuracy and efficiency of task processing, avoids resource waste and conflicts, and ensures that tasks are executed in a logical and chronological order.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120704884A_ABST
    Figure CN120704884A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of multi-agent systems, in particular to a task matching method and system based on a multi-agent system, a master agent is used for analyzing a request of a user, identifying a plurality of corresponding sub-target tasks according to the request, and establishing task mapping with other slave agents according to the identified sub-target tasks; and the slave agent performs corresponding processing according to the relationship between the sub-target tasks, and stores a corresponding processing result to a local knowledge base. According to the method, the newly added task requests are collected to expand and supplement the primary knowledge graph, the expanded knowledge graph is subjected to element analysis, so that the incidence relation between the elements is recognized, then whether the task requests needing to be processed conform to the incidence relation or not is judged, the time dependence relation of the task requests is further judged, and the task requests are processed according to the time dependence relation. And the master agent allocates different slave agents to perform task processing according to different results which are possibly obtained, so that the corresponding slave agents can be allocated more accurately.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of multi-agent systems, and in particular to a task matching method and system based on a multi-agent system. Background Art

[0002] A multi-agent system (MAS), also known as a multi-agent system or self-organized system, is a computing system or swarm system composed of multiple interacting intelligent agents. Each agent in a MAS can independently make decisions and execute actions, and multiple agents can communicate and collaborate to complete complex tasks. Currently, MAS has been applied in smart terminals, robotics, traffic scheduling, distributed computing, and other fields.

[0003] When multiple agents share a single, large database, the response process involves data sharing between them. This can lead to the identification of content that is accessible to other agents, as not every agent is relevant to the identified content. Existing multi-agent data sharing methods result in the intervention of irrelevant agents, resulting in significant resource waste, high costs, and low efficiency. For example, in a hospital setting, when a doctor requests "prepare breakfast for the patient in Ward 101 and check their medications," two robots with different tasks may simultaneously head to the kitchen to prepare breakfast, causing congestion or resource conflicts. Improving the efficiency of multi-agent work is a pressing technical issue that needs to be addressed.

[0004] Based on this, one solution in the existing technology is to retain multiple agents. Each time a task passes through the main agent, the main agent acts as a router to decide which agent is responsible for handling the task. However, the current collaborative technology has certain limitations. The existing technology does not take into account the logical relationship and time dependency when parsing the user's request, which may lead to conflicts in the allocation of agents and cause low task processing efficiency. Summary of the Invention

[0005] Purpose of the invention: In order to overcome the shortcomings of the existing technology, the present invention provides a task matching method based on a multi-agent system, which solves the problem of low task processing efficiency caused by incorrect and chaotic agent allocation in the existing technology. The present invention also provides a task matching system based on a multi-agent system.

[0006] Technical solution: According to a first aspect of the present invention, a task matching method based on a multi-agent system is provided, the method comprising:

[0007] In a multi-agent system, one agent is designated as a master agent, and the other agents are designated as slave agents. The master agent is in communication with the slave agents. The master agent is used to interpret user requests, identify corresponding sub-target tasks based on the requests, and establish task mappings with other slave agents based on the identified sub-target tasks.

[0008] The slave agent performs corresponding processing according to the relationship between the sub-goal tasks and stores the corresponding processing results in the local knowledge base. The relationship between the sub-goal tasks includes: using the constructed knowledge graph to perform association analysis on the elements corresponding to the sub-tasks. If the elements are identified to have an association relationship from the constructed knowledge graph, it is further determined whether there is a clear time relationship. Otherwise, the association analysis results of the corresponding sub-goal tasks are added to the relationship node graph, and it is further determined whether the request has a clear time relationship.

[0009] If there is a clear time relationship, the linear execution order of the task is output according to the set topological sequence diagram and time constraint table of the directed acyclic graph, so that one or more slave agents perform processing according to the said linear execution order; otherwise, multiple slave agents perform processing at the same time according to the association relationship corresponding to the constructed knowledge graph.

[0010] Further, including:

[0011] The step of establishing task mappings with other slave agents based on the identified sub-goal tasks includes:

[0012] For each sub-goal task, the most suitable slave agent is selected to perform the task based on the ability and current status of the slave agent, thereby ensuring that different sub-goal tasks are handled by different agents.

[0013] Further, including:

[0014] The step of selecting the most suitable slave agent to perform the task based on the capabilities and current status of the slave agent includes:

[0015] The capabilities of the slave agent are represented as a first numerical vector, and the task requirements of the sub-goal task are represented as a second numerical vector, where each dimension of the first numerical vector corresponds to a skill proficiency of the current slave agent, and each dimension of the second numerical vector corresponds to the requirement value of a skill for the current sub-goal task;

[0016] According to the matching degree between the first numerical vector and the second numerical vector, the best slave agent corresponding to the current subtask is determined.

[0017] Further, including:

[0018] The step of establishing task mapping with other slave agents based on the identified sub-goal tasks also includes:

[0019] After determining the best slave agent corresponding to the current subtask, the master agent queries the online status information of each slave agent, which includes their location, whether they are currently idle, skills, and load capacity. If any factor in the current slave agent's online status information does not meet the requirements, other slave agents will be re-determined as the best slave agents.

[0020] Further, including:

[0021] The constructed knowledge graph is used to perform association analysis of elements corresponding to sub-goal tasks, including:

[0022] Collecting a certain amount of text data and preprocessing the text data;

[0023] The pre-trained model is used to extract elements into entities from the pre-processed text data, and the similarity between entities is determined by correlation analysis;

[0024] Extract the relationships between entities from the preprocessed elements, thereby constructing a set of relationships between each element and entity, and constructing relationship triples based on entities and relationships to generate a primary knowledge graph;

[0025] The primary knowledge graph is expanded and supplemented through newly added task requests, and the expanded knowledge graph is subjected to element analysis to identify the association relationships between elements.

[0026] Further, including:

[0027] The primary knowledge graph is expanded and supplemented by the newly added task request, and the expanded knowledge graph is subjected to element analysis to identify the association relationship between elements, including:

[0028] After preprocessing the newly added task request, each valid element is obtained. Based on each element and similar elements in the keyword library, the node data in the primary knowledge graph is traversed to obtain the entity set and relationship set constructed by the newly added task request related to the primary knowledge graph;

[0029] Based on the expanded knowledge graph constructed by the entity set and relationship set constructed by the newly added task request, the node correlation model is used to analyze the correlation between nodes, and the association rules are mined for the highly correlated node sets to obtain the high-frequency relationship set.

[0030] The corresponding relationship node graph is constructed based on the high-frequency relationship set, the relationship node graph is stored to form corresponding association rules, and a query interface is provided.

[0031] Further, including:

[0032] The node correlation model is used to analyze the correlation between nodes, and association rules are mined for highly correlated node sets, thereby obtaining a high-frequency relationship set, including:

[0033] A node correlation model is constructed and a set of entities with high correlation is obtained. The node correlation model is expressed as: Among them, P(r|e i ,e j ) is entity e i and e j The probability of association through relationship r, if P RE (e i ,e j ) is greater than the set threshold, it is considered to be a set of entities with high correlation; further, the Apriori algorithm is used to mine association rules for the said set of entities with high correlation to obtain a high-frequency relationship set and form corresponding association rules.

[0034] Further, including:

[0035] The further determination of whether there is a clear time relationship includes:

[0036] A directed acyclic graph is constructed with sub-goal tasks as nodes and association relationships as edges, and a time constraint table is established to specify the earliest start time, latest completion time or fixed interval of the sub-goal tasks; based on the dependency relationships generated by the directed acyclic graph and the time constraint table, an executable sequence is generated.

[0037] Further, including:

[0038] The step of generating an executable sequence based on the dependency relationship generated from the directed acyclic graph and the time constraint table includes:

[0039] Integrate the time constraint table into the created directed acyclic graph, and maintain a time window for each node without modifying the directed acyclic graph structure. The time window is expressed as [earliest start time, latest start time] and is maintained by the time constraint table.

[0040] The time constraint table includes absolute constraints and relative constraints. The absolute constraints require that tasks must be executed within a specific time window. The relative constraints refer to the relative time relationship between tasks, thereby creating virtual nodes and edges. For absolute constraints, the time difference constraint is expressed by the edge weight, that is:

[0041] Create a virtual time anchor node and add edges in the following way;

[0042] If sub-goal task A must start at time t≥M, add an edge Start→A with an edge weight of M, which means that A starts at t=M at the earliest. If sub-goal task A must be completed at t≤N, add an edge A→End with an edge weight of -N, which means that A is completed at t=N at the latest.

[0043] For relative constraints, if the current sub-goal task A needs to be started after another sub-task B is completed + P time, then add an edge: current task A→B, and the edge weight is the execution time of A + P.

[0044] Further, including:

[0045] Before the one or more slave agents perform processing according to the linear execution order, the method further includes:

[0046] Taking into account the dependencies and temporal sequence between the sub-goal tasks, the master agent will simultaneously inform the execution order or execution trigger signal when sending each sub-goal task to each slave agent, so that each slave agent can execute the corresponding sub-goal task in the informed execution order or execute the corresponding sub-goal task when it is judged that the current state meets the requirements of the execution trigger signal, that is, each slave agent actively executes the corresponding sub-goal task at the appropriate time.

[0047] Further, including:

[0048] Before the one or more slave agents perform processing according to the linear execution order, the method further includes:

[0049] When the master agent determines that different slave agents meet the execution time, it actively calls each slave agent to execute the corresponding sub-target task as required, that is, each slave agent only passively executes the corresponding sub-target task according to the call instruction.

[0050] On the other hand, the present invention also provides a task matching system based on a multi-agent system, the system comprising:

[0051] A mapping establishment module is used to designate one agent as the master agent and the other agents as slave agents in a multi-agent system, wherein the master agent communicates with each slave agent; the master agent is used to interpret user requests, identify corresponding sub-target tasks based on the requests, and establish task mappings with other slave agents based on the identified sub-target tasks;

[0052] A relationship determination module is configured to perform corresponding processing based on the relationship between the sub-goal tasks through the slave agent and store the corresponding processing results in a local knowledge base. The relationship between the sub-goal tasks includes: using the constructed knowledge graph to perform association analysis on the elements corresponding to the sub-tasks; if the elements are identified to have an association relationship from the constructed knowledge graph, then further determine whether there is a clear time relationship; otherwise, add the association analysis results of the corresponding sub-goal tasks to the relationship node graph, and further determine whether the request has a clear time relationship;

[0053] The processing module is used to output the linear execution order of the task according to the topological sequence diagram and time constraint table of the set directed acyclic graph if there is a clear time relationship, so that one or more slave agents perform processing according to the said linear execution order; otherwise, according to the association relationship corresponding to the constructed knowledge graph, multiple slave agents perform processing at the same time.

[0054] Beneficial effects: Compared with the prior art, the present invention has the following advantages:

[0055] (1) The present invention first uses the collected text data to construct a primary knowledge graph and performs association analysis on the corresponding elements. Secondly, on this basis, it collects new task requests to expand and supplement the primary knowledge graph, and performs element analysis on the expanded knowledge graph to identify the association relationship between elements. Finally, it determines whether the task request to be processed meets the association relationship, and further determines the time dependency of the task request. The main intelligent agent assigns the task to different slave intelligent agents for task processing based on the different results that may be obtained above. The judgment of the two-layer relationship can more accurately assign the corresponding slave intelligent agents, thereby improving the efficiency and accuracy of task processing.

[0056] (2) The judgment of the time dependency of the present invention adopts a directed acyclic graph combined with a designed time constraint table, and each sub-target task is added to the directed acyclic graph according to the time constraint relationship, thereby obtaining the time dependency corresponding to the task request to be processed. The present application not only considers logical relationships such as cause and effect, but also considers time dependency, so that subsequent slave agents can process tasks in sequence to avoid confusion or resource abuse.

[0057] (3) The master agent of the present invention selects the most appropriate slave agent for allocation based on the capabilities and current status of the slave agent, and the slave agent can perform the corresponding sub-target tasks in an active or passive manner, ensuring that different sub-tasks are handled by different agents to optimize efficiency and avoid conflicts. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] Figure 1 This is a flow chart of a task matching method based on a multi-agent system according to an embodiment of the present invention;

[0059] Figure 2 This is a schematic diagram of the multi-agent structure described in an embodiment of the present invention. DETAILED DESCRIPTION

[0060] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention and not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0061] Example 1: The multi-agent system of the present invention adopts a master-slave agent structure. Both the master agent and the slave agent are agents with thinking capabilities. Task mapping is established through the master agent. The master agent of the present application can parse user requests, identify multiple implicit target subtasks, search the target knowledge base according to the target subtasks, generate search results, and establish a task mapping based on the search results. The task mapping assigns a corresponding slave agent to each target subtask. For each subtask, the most suitable agent is selected to perform the task based on the agent's capabilities and current status. Ensure that different subtasks are responsible for different agents to optimize efficiency and avoid conflicts.

[0062] like Figure 1 As shown, the present application provides a task matching method based on a multi-agent system, the method comprising the following steps:

[0063] S1 designates an agent as the master agent in a multi-agent system and the other agents as slave agents. The master agent communicates with each slave agent, such as Figure 2 As shown; the main intelligent agent is used to parse the user's request, and identify the corresponding sub-target tasks based on the request, and establish task mapping with other slave intelligent agents based on the identified sub-target tasks.

[0064] It should be noted that the main agent and the slave agent in this embodiment are both agents with thinking capabilities, such as deepseek. Task mapping is established through the main agent. The main agent of this application can parse user requests, identify multiple implicit target subtasks (transportation reservation + transportation arrangement, etc.), and establish task mapping based on the identified implicit target subtasks. For specific task mapping examples, flight query corresponds to agent A, payment processing corresponds to agent B, and taxi dispatch corresponds to agent C.

[0065] The main agent of this application can parse user requests and identify multiple implicit target subtasks, further including:

[0066] Analyze user requests, perform word segmentation processing, and perform semantic analysis on the word segmentation results to generate multiple target subtasks corresponding to the user requests.

[0067] Specific: The user's request is "book the fastest flight to Beijing for the passenger in room number 101 and arrange a taxi to take him to the airport"

[0068] The possible words are: ["for the room number 101," the passenger," booked," the fastest," to," Beijing," the ticket," arranged," taxi," sent," to," the airport."]

[0069] Natural language processing (NLP) technology and a rules engine are used to identify keywords associated with task instructions within the word segmentation list. In this example, these keywords might be "room number 101," "passenger," "book a flight," or "deliver to the airport." Using a pre-set intent rules engine, the keywords are analyzed to infer the user's specific intent, deriving the task intent. Based on this intent, multiple implicit target subtasks are identified.

[0070] The rule engine consists of a rule base, a pattern matcher, an inference engine, and a conflict resolution module. Building a rule base, it conducts multi-dimensional keyword analysis, including lexical-level analysis (exact matching (order numbers, product IDs, etc.), synonym expansion, and negation detection), syntactic-level analysis (dependency analysis, action-object identification), and semantic-level analysis (word vector similarity, e.g., "failure ≈ not working" and knowledge graph association ("iPhone" → "Apple phone")). The results of these keyword analyses are then used to match rules using a weighted scoring mechanism and conflict resolution strategies. For example, the weighted scoring mechanism includes: Required keywords: 100 points (missing keywords are rejected); Optional keywords: +20 points for each match; Context bonus: +30 points for matching contextual conditions; Excluded keywords: -100 points for presence. Conflict resolution strategies include priority priority (higher-priority rules override lower-priority rules), coverage priority (rules with more matching keywords win), and recent usage priority (conversational context relevance). This enhances the output of user intent through contextual awareness.

[0071] Specific: Based on the analyzed task intent, break down complex tasks into a series of specific, actionable subtasks, such as "flight search," "flight payment," and "taxi booking."

[0072] Establishing a task mapping based on the identified implicit target subtasks further includes:

[0073] The target knowledge base is searched according to the target subtask to generate search results, and a task mapping is established according to the search results. The task mapping assigns a corresponding slave agent to each target subtask.

[0074] In this embodiment, for each sub-target task, the most suitable slave agent is selected to perform the task based on the capabilities and current status of the slave agent, thereby ensuring that different sub-target tasks are undertaken by different agents, thereby ensuring that different sub-tasks are undertaken by different agents, so as to optimize efficiency and avoid conflicts.

[0075] Specifically, this embodiment can use the following method to select the most appropriate one based on the capabilities and current state of the slave agent: the capabilities of the slave agent are represented as a first numerical vector, and the task requirements of the sub-goal task are represented as a second numerical vector. Each dimension of the first numerical vector corresponds to the current skill proficiency of the slave agent, and each dimension of the second numerical vector corresponds to the skill requirement of the current sub-goal task.

[0076] According to the matching degree between the first numerical vector and the second numerical vector, the best slave agent corresponding to the current subtask is determined.

[0077] More specifically, this embodiment can be implemented using the following technical solutions:

[0078] In the first step, the agent’s capabilities and the task requirements of the target subtask are represented as a numerical vector, where each dimension of the vector corresponds to a skill or attribute.

[0079] Agent capability vector A i =[a i1 ,a i2 ,...,a in ]:a ij Represents agent A i The ability value of the j-th skill, such as proficiency, 0 to 1 or 0 to 100.

[0080] Task requirement vector T k =[t k1 ,t k2 ,...,t kn ]:t kj Represents task T k The intensity of demand for the jth skill, such as required = 1, optional = 0.5, and not required = 0.

[0081] This embodiment takes the following example: Assume that the task requires three skills: [programming, image recognition, and mechanical control].

[0082] The ability vector of agent A1: A1 = [0.9, 0.2, 0.1], which means it is good at programming but not good at image recognition and mechanical control.

[0083] The requirement vector of task T1 is: T1 = [1.0, 0.5, 0.0], which means programming is required, image recognition is optional, and mechanical control is not required.

[0084] The second step is to calculate the cosine similarity between agent A1 and task T1.

[0085] Cosine similarity measures similarity by the angle between vectors. The formula is:

[0086]

[0087] For A1 and T1:

[0088] A1·T1=0.9×1.0+0.2×0.5+0.1×0.0=1.0

[0089]

[0090] The third step is to select the agent based on cosine similarity

[0091] The closer the value is to 1, the higher the match degree is. 1: perfect match, the capability completely covers the requirement. 0: no correlation.

[0092] Cosine similarity only evaluates capability matching and requires further consideration of agent status (such as load and resources) for comprehensive decision making. For example:

[0093]

[0094] Among them, α, β are weights (such as α = 0.7, β = 0.3 α = 0.7, β = 0.3), Load (A i ) is the current task number of the agent, and the inverse form ensures a high score with low load.

[0095] Furthermore, this embodiment also includes:

[0096] The step of establishing task mapping with other slave agents based on the identified sub-goal tasks also includes:

[0097] After determining the best slave agent corresponding to the current subtask, the master agent queries the online status information of each slave agent, which includes their location, whether they are currently idle, skills, and load capacity. If any factor in the current slave agent's online status information does not meet the requirements, other slave agents will be re-determined as the best slave agents.

[0098] That is, the target knowledge base of the main intelligent agent of this application stores the task routes of subtasks, the status of the intelligent agent (whether it is online) and the needs of the service objects, arranges the execution steps of these subtasks, and has the most suitable intelligent agent execute them in the correct order, which not only improves the accuracy and efficiency of task execution, but also enhances the flexibility and adaptability of the system.

[0099] The master agent in this application can query the online status of each slave agent, including their location, availability, special skills (such as the ability to handle flight reservations), and load capacity. Based on this online status information, the master agent is selected to perform each subtask. For example, an agent with flight reservation capabilities can be selected to book flights, while another agent specializing in transportation reservations can be selected to allocate taxis.

[0100] S2 describes that the slave agent makes corresponding processing based on the relationship between the sub-goal tasks, and stores the corresponding processing results in the local knowledge base. The relationship between the sub-goal tasks includes: using the constructed knowledge graph to perform association analysis on the elements corresponding to the sub-tasks. If an association relationship is identified in the elements from the constructed knowledge graph, it is further determined whether there is a clear time relationship. Otherwise, the association analysis results of the corresponding sub-goal tasks are added to the relationship node graph, and it is further determined whether the request has a clear time relationship.

[0101] In this embodiment, the association analysis of the elements corresponding to the sub-goal tasks using the constructed knowledge graph includes the following steps:

[0102] S21 collects a certain amount of text data and preprocesses the text data; the text data here is not necessarily just the data requested by the task, and other data can also be collected. The purpose is to build a primary knowledge graph.

[0103] S22 uses a pre-trained model to extract elements into entities from the pre-processed text data and uses association analysis to determine the similarity between entities;

[0104] S23 extracts the relationship between entities from the preprocessed elements, thereby constructing a relationship set between each element and entity, constructing a relationship triple based on the entities and relationships, and then generating a primary knowledge graph;

[0105] S24 expands and supplements the primary knowledge graph through newly added task requests, and performs element analysis on the expanded knowledge graph to identify the association relationships between elements.

[0106] The expansion and supplementary solutions described in this embodiment specifically include:

[0107] After preprocessing the newly added task request, each valid element is obtained. Based on each element and similar elements in the keyword library, the node data in the primary knowledge graph is traversed to obtain the entity set and relationship set constructed by the newly added task request related to the primary knowledge graph;

[0108] Based on the expanded knowledge graph constructed by the entity set and relationship set constructed by the newly added task request, the node correlation model is used to analyze the correlation between nodes, and the association rules are mined for the highly correlated node sets to obtain the high-frequency relationship set.

[0109] The corresponding relationship node graph is constructed based on the high-frequency relationship set, the relationship node graph is stored to form corresponding association rules, and a query interface is provided.

[0110] The node correlation model is used to analyze the correlation between nodes, and association rules are mined for a set of highly correlated nodes, thereby obtaining a set of high-frequency relationships. This embodiment specifically includes:

[0111] First, a node correlation model is constructed and a set of entities with high correlation is obtained. The node correlation model is expressed as: Among them, P(r|e i ,e j ) is entity e i and e j The probability of association through relationship r, if P RE (e i ,e j ) is greater than a set threshold, it is considered a highly correlated entity set; this embodiment does not impose a limit on this threshold, and an empirical value can be used. The Apriori algorithm is further used to mine association rules for the highly correlated entity set to obtain a high-frequency relationship set and form corresponding association rules.

[0112] In this embodiment, further determining whether there is a clear time relationship includes:

[0113] A directed acyclic graph is constructed with sub-goal tasks as nodes and association relationships as edges, and a time constraint table is established to specify the earliest start time, latest completion time or fixed interval of the sub-goal tasks; based on the dependency relationships generated by the directed acyclic graph and the time constraint table, an executable sequence is generated.

[0114] Further, including:

[0115] The step of generating an executable sequence based on the dependency relationship generated from the directed acyclic graph and the time constraint table includes:

[0116] Integrate the time constraint table into the created directed acyclic graph, and maintain a time window for each node without modifying the directed acyclic graph structure. The time window is expressed as [earliest start time, latest start time] and is maintained by the time constraint table.

[0117] The time constraint table includes absolute constraints and relative constraints. The absolute constraints require that tasks must be executed within a specific time window. The relative constraints refer to the relative time relationship between tasks, thereby creating virtual nodes and edges. For absolute constraints, the time difference constraint is expressed by the edge weight, that is:

[0118] Create a virtual time anchor node and add edges in the following way;

[0119] If sub-goal task A must start at time t≥M, add an edge Start→A with an edge weight of M, which means that A starts at t=M at the earliest. If sub-goal task A must be completed at t≤N, add an edge A→End with an edge weight of -N, which means that A is completed at t=N at the latest.

[0120] For relative constraints, if the current sub-goal task A needs to be started after another sub-task B is completed + P time, then add an edge: current task A→B, and the edge weight is the execution time of A + P.

[0121] Specifically, in this application, these subtasks are arranged in a logical order or time dependency to form an ordered execution sequence. Each subtask in this sequence is assigned to a specific agent, and the collaboration requirements between the agents are taken into account.

[0122] These subtasks are arranged in a logical order or time dependency to form an ordered execution sequence. Specific steps:

[0123] After the task is decomposed, there is a logical order or time dependency between the subtasks. For example, if task B needs to be started after task A is completed, efficient execution must be ensured through task sequence orchestration and intelligent agent collaboration mechanism.

[0124] Establish a directed acyclic graph (DAG). The directed acyclic graph (DAG) represents the task of each agent through nodes. If task A must be completed before task B, add an edge A→B. The task dependency is converted into an event-driven execution flow. Dynamic scheduling is performed by the main agent (or distributed coordinator) to ensure that subtasks are executed by appropriate agents in a topological order. Specifically: subtasks are used as nodes (nodes store task ID, required capabilities, input and output data formats, and timeout period), and dependencies are used as edges. For example, B (assembly)→C (procurement).

[0125] Create a time constraint table to specify the earliest start time, latest completion time, or fixed interval for each subtask, for example: T2.start_time ≥ T1.end_time + 10s. Generate an executable sequence based on the Directed Acyclic Graph (DAG) and the dependencies generated by the time constraint table. This includes:

[0126] The topological sequence diagram and time constraint table of the directed acyclic graph (DAG) output the linear execution order of tasks.

[0127] By integrating the time constraint table into the creation of a directed acyclic graph (DAG), a time window [earliest start time, latest start time] is maintained for each node without modifying the DAG structure. The time window is maintained through the time constraint table and includes the following:

[0128] The time constraint table includes absolute constraints and relative constraints. Absolute constraints require that tasks must be executed within a specific time window. For example, Task B starts between t=2 and t=5. The relative constraint refers to the relative time relationship between tasks. Task B is delayed by 3 time units after Task A is completed. By creating virtual nodes and edges, for absolute constraints, the time difference constraint is represented by the edge weight. The time difference constraint in this embodiment is similar to the longest path problem. Specifically, virtual "time anchor" nodes such as Start and End are created, and edges are added:

[0129] If task A must start at t≥2, add an edge Start→A with an edge weight of 2, which means that A can be started at t=2 at the earliest.

[0130] If task A must be completed at t≤5, add an edge A→End with an edge weight of -5, which means that A must be completed at t=5 at the latest.

[0131] For relative constraints, if task B needs to start 3 units after task A completes, add an edge A→B with an edge weight equal to the execution time of A + 3. For example, if A takes 2 units of time to execute, then the edge weight is 2+3=5, meaning that B can start at the earliest 5 units of time after A starts.

[0132] Example: Assume the DAG and time constraints are as follows:

[0133] Task A: Execution time = 2, must be started at t∈[0,3], that is, an absolute constraint.

[0134] Task B: Execution time = 1, must be started after A is completed + 1, that is, relative constraint.

[0135] Task C: Execution time = 2, needs to be started after A is completed + 2.

[0136] Steps: 1. Add virtual nodes Start and End:

[0137] Start→A (edge ​​weight = 0, because A can be started immediately at the earliest).

[0138] A→End (edge ​​weight = -3, because A starts at t=3 at the latest and requires 2 units to execute, so it needs to be started at t=1 to meet the completion time of t=3).

[0139] 2. The topological order is [A, B, C]:

[0140] A's time window: EST=0, LST=1, that is, it must be started before t=1.

[0141] B's EST=0+2+1=3.

[0142] C's EST=0+2+2=4.

[0143] Final linear order: A(t=0→2)→B(t=3→4)→C(t=4→6).

[0144] If there is a clear time relationship in S3, the linear execution order of the task is output according to the topological sequence diagram and time constraint table of the set directed acyclic graph, so that one or more slave agents perform processing according to the said linear execution order; otherwise, multiple slave agents perform processing at the same time according to the association relationship corresponding to the constructed knowledge graph.

[0145] Before the one or more slave agents perform processing according to the linear execution order, this embodiment further includes:

[0146] Taking into account the dependencies and temporal sequence between the sub-goal tasks, the master agent will simultaneously inform the execution order or execution trigger signal when sending each sub-goal task to each slave agent, so that each slave agent can execute the corresponding sub-goal task in the informed execution order or execute the corresponding sub-goal task when it is judged that the current state meets the requirements of the execution trigger signal, that is, each slave agent actively executes the corresponding sub-goal task at the appropriate time.

[0147] Before the one or more slave agents perform processing according to the linear execution order, the method further includes:

[0148] When the master agent determines that different slave agents meet the execution time, it actively calls each slave agent to execute the corresponding sub-target task as required, that is, each slave agent only passively executes the corresponding sub-target task according to the call instruction.

[0149] Specifically, consider the dependencies and temporal order between subtasks. The master agent can simultaneously inform each subtask agent of the execution order or trigger signal when issuing each subtask. This allows each subtask agent to execute the corresponding subtask in the specified order or when the current state meets the trigger signal. This means each subtask agent proactively executes the corresponding subtask at the appropriate time. Alternatively, the master agent can proactively call a subtask agent to execute the corresponding subtask only when it determines that the execution timing is appropriate. This means each subtask agent passively executes the corresponding subtask according to the call instruction. For example, before boarding a flight, one must first purchase a ticket and arrive at the airport. Therefore, subtasks A and B must be executed before subtask C. Following this logical order, the subtasks are arranged into an ordered sequence, ensuring that each subtask is executed in the correct order. The resulting subtask sequence might be as follows: [Subtask B, Subtask A, Subtask C].

[0150] Each agent has a unique identifier (ID) for identification and communication. Based on a predetermined allocation scheme, the system finds the ID of the agent responsible for executing a specific subtask and sends specific instructions (such as target location and required actions) to the corresponding agent. Direct communication via their ID ensures that task instructions are accurately conveyed to the correct executor.

[0151] There is no specific limitation here on the task processing steps, task processing methods, task complexity, data types involved in the task, etc., that is, different slave agents are used to process different tasks.

[0152] The slave agent of this embodiment can be an interactive question-and-answer agent dedicated to handling interactive question-and-answer tasks or an intelligent robot that performs actions.

[0153] In this embodiment, different slave agents are used to process different types of sub-tasks, that is, slave agents dedicated to a single type of task are created in advance according to different task types. There are various ways to divide task types. For example, multiple sub-target tasks include at least clear result acquisition tasks. Correspondingly, each sub-target agent should include at least a clear result acquisition agent dedicated to processing clear result acquisition tasks.

[0154] In this embodiment, after the slave agent processes the target subtask, the target subtask, slave agent information, and processing result label of whether the subtask is successfully processed can also be stored in the local knowledge base to update the training samples of the information prediction model for continuous optimization training of the model. The information prediction model is based on a deep learning model, and the data in the database is input as learning samples into the deep learning model for training.

[0155] Embodiment 2: The present invention further provides a task matching system based on a multi-agent system, the system comprising:

[0156] A mapping establishment module is used to designate one agent as the master agent and the other agents as slave agents in a multi-agent system, wherein the master agent communicates with each slave agent; the master agent is used to interpret user requests, identify corresponding sub-target tasks based on the requests, and establish task mappings with other slave agents based on the identified sub-target tasks;

[0157] A relationship determination module is configured to perform corresponding processing based on the relationship between the sub-goal tasks through the slave agent and store the corresponding processing results in a local knowledge base. The relationship between the sub-goal tasks includes: using the constructed knowledge graph to perform association analysis on the elements corresponding to the sub-tasks; if the elements are identified to have an association relationship from the constructed knowledge graph, then further determine whether there is a clear time relationship; otherwise, add the association analysis results of the corresponding sub-goal tasks to the relationship node graph, and further determine whether the request has a clear time relationship;

[0158] The processing module is used to output the linear execution order of the task according to the topological sequence diagram and time constraint table of the set directed acyclic graph if there is a clear time relationship, so that one or more slave agents perform processing according to the said linear execution order; otherwise, according to the association relationship corresponding to the constructed knowledge graph, multiple slave agents perform processing at the same time.

[0159] Other technical features of a task matching system based on a multi-agent system in this embodiment are similar to the corresponding task matching method based on a multi-agent system and will not be repeated here.

[0160] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0161] Obviously, those skilled in the art may make various changes and modifications to the embodiments of the present invention without departing from the spirit and scope of the embodiments of the present invention. Thus, if such changes and modifications of the embodiments of the present invention fall within the scope of the claims and their equivalents, the present invention is intended to include such changes and modifications.

Claims

1. A task matching method based on a multi-agent system, characterized in that: The method includes: In a multi-agent system, one agent is designated as a master agent, and the other agents are designated as slave agents. The master agent is in communication with the slave agents. The master agent is used to interpret user requests, identify corresponding sub-target tasks based on the requests, and establish task mappings with other slave agents based on the identified sub-target tasks. The slave agent performs corresponding processing according to the relationship between the sub-goal tasks and stores the corresponding processing results in the local knowledge base. The relationship between the sub-goal tasks includes: using the constructed knowledge graph to perform association analysis on the elements corresponding to the sub-tasks. If the elements are identified to have an association relationship from the constructed knowledge graph, it is further determined whether there is a clear time relationship. Otherwise, the association analysis results of the corresponding sub-goal tasks are added to the relationship node graph, and it is further determined whether the request has a clear time relationship. If there is a clear time relationship, the linear execution order of the task is output according to the set topological sequence diagram and time constraint table of the directed acyclic graph, so that one or more slave agents perform processing according to the said linear execution order; otherwise, multiple slave agents perform processing at the same time according to the association relationship corresponding to the constructed knowledge graph.

2. The task matching method based on a multi-agent system according to claim 1, characterized in that: The step of establishing task mappings with other slave agents based on the identified sub-goal tasks includes: For each sub-goal task, the most suitable slave agent is selected to perform the task based on the ability and current status of the slave agent, thereby ensuring that different sub-goal tasks are handled by different agents.

3. The task matching method based on a multi-agent system according to claim 2, characterized in that: The step of selecting the most suitable slave agent to perform the task based on the capabilities and current status of the slave agent includes: The capabilities of the slave agent are represented as a first numerical vector, and the task requirements of the sub-goal task are represented as a second numerical vector, where each dimension of the first numerical vector corresponds to a skill proficiency of the current slave agent, and each dimension of the second numerical vector corresponds to the requirement value of a skill for the current sub-goal task; According to the matching degree between the first numerical vector and the second numerical vector, the best slave agent corresponding to the current subtask is determined.

4. The task matching method based on a multi-agent system according to claim 3, characterized in that: The step of establishing task mapping with other slave agents based on the identified sub-goal tasks also includes: After determining the best slave agent corresponding to the current subtask, the master agent queries the online status information of each slave agent, which includes their location, whether they are currently idle, skills, and load capacity. If any factor in the current slave agent's online status information does not meet the requirements, other slave agents will be re-determined as the best slave agents.

5. The task matching method based on a multi-agent system according to claim 1, characterized in that: The constructed knowledge graph is used to perform association analysis of elements corresponding to sub-goal tasks, including: Collecting a certain amount of text data and preprocessing the text data; The pre-trained model is used to extract elements into entities from the pre-processed text data, and the similarity between entities is determined by correlation analysis; Extract the relationships between entities from the preprocessed elements, thereby constructing a set of relationships between each element and entity, and constructing relationship triples based on entities and relationships to generate a primary knowledge graph; The primary knowledge graph is expanded and supplemented through newly added task requests, and the expanded knowledge graph is subjected to element analysis to identify the association relationships between elements.

6. The task matching method based on a multi-agent system according to claim 5, characterized in that: The primary knowledge graph is expanded and supplemented by the newly added task request, and the expanded knowledge graph is subjected to element analysis to identify the association relationship between elements, including: After preprocessing the newly added task request, each valid element is obtained. Based on each element and similar elements in the keyword library, the node data in the primary knowledge graph is traversed to obtain the entity set and relationship set constructed by the newly added task request related to the primary knowledge graph; Based on the expanded knowledge graph constructed by the entity set and relationship set constructed by the newly added task request, the node correlation model is used to analyze the correlation between nodes, and the association rules are mined for the highly correlated node sets to obtain the high-frequency relationship set. The corresponding relationship node graph is constructed based on the high-frequency relationship set, the relationship node graph is stored to form corresponding association rules, and a query interface is provided.

7. The task matching method based on a multi-agent system according to claim 6, characterized in that: The node correlation model is used to analyze the correlation between nodes, and association rules are mined for highly correlated node sets, thereby obtaining a high-frequency relationship set, including: A node correlation model is constructed and a set of entities with high correlation is obtained. The node correlation model is expressed as: Among them, P(r|e i ,e j ) is entity e i and e j The probability of association through relationship r, if P RE (e i ,e j ) is greater than the set threshold, it is considered to be a set of entities with high correlation; further, the Apriori algorithm is used to mine association rules for the said set of entities with high correlation to obtain a high-frequency relationship set and form corresponding association rules.

8. The task matching method based on a multi-agent system according to claim 1, characterized in that: The further determination of whether there is a clear time relationship includes: A directed acyclic graph is constructed with sub-goal tasks as nodes and association relationships as edges, and a time constraint table is established to specify the earliest start time, latest completion time or fixed interval of the sub-goal tasks; based on the dependency relationships generated by the directed acyclic graph and the time constraint table, an executable sequence is generated.

9. The task matching method based on a multi-agent system according to claim 8, characterized in that: The step of generating an executable sequence based on the dependency relationship generated from the directed acyclic graph and the time constraint table includes: Integrate the time constraint table into the created directed acyclic graph, and maintain a time window for each node without modifying the directed acyclic graph structure. The time window is expressed as [earliest start time, latest start time] and is maintained by the time constraint table. The time constraint table includes absolute constraints and relative constraints. The absolute constraints require that tasks must be executed within a specific time window. The relative constraints refer to the relative time relationship between tasks, thereby creating virtual nodes and edges. For absolute constraints, the time difference constraint is expressed by the edge weight, that is: Create a virtual time anchor node and add edges; If sub-goal task A must start at time t≥M, add an edge Start→A with an edge weight of M, which means that A starts at t=M at the earliest. If sub-goal task A must be completed at t≤N, add an edge A→End with an edge weight of -N, which means that A is completed at t=N at the latest. For relative constraints, if the current sub-goal task A needs to be started after another sub-task B is completed + P time, then add an edge: current task A→B, and the edge weight is the execution time of A + P.

10. The task matching method based on a multi-agent system according to claim 1, characterized in that: Before the one or more slave agents perform processing according to the linear execution order, the method further includes: Taking into account the dependencies and temporal sequence between the sub-goal tasks, the master agent will simultaneously inform the execution order or execution trigger signal when sending each sub-goal task to each slave agent, so that each slave agent can execute the corresponding sub-goal task in the informed execution order or execute the corresponding sub-goal task when it is judged that the current state meets the requirements of the execution trigger signal, that is, each slave agent actively executes the corresponding sub-goal task at the appropriate time.

11. The task matching method based on a multi-agent system according to claim 1, characterized in that: Before the one or more slave agents perform processing according to the linear execution order, the method further includes: When the master agent determines that different slave agents meet the execution time, it actively calls each slave agent to execute the corresponding sub-target task as required, that is, each slave agent only passively executes the corresponding sub-target task according to the call instruction.

12. A task matching system based on a multi-agent system, characterized in that: The system includes: A mapping establishment module is used to designate one agent as the master agent and the other agents as slave agents in a multi-agent system, wherein the master agent communicates with each slave agent; the master agent is used to interpret user requests, identify corresponding sub-target tasks based on the requests, and establish task mappings with other slave agents based on the identified sub-target tasks; A relationship determination module is configured to perform corresponding processing based on the relationship between the sub-goal tasks through the slave agent and store the corresponding processing results in a local knowledge base. The relationship between the sub-goal tasks includes: using the constructed knowledge graph to perform association analysis on the elements corresponding to the sub-tasks; if the elements are identified to have an association relationship from the constructed knowledge graph, then further determine whether there is a clear time relationship; otherwise, add the association analysis results of the corresponding sub-goal tasks to the relationship node graph, and further determine whether the request has a clear time relationship; The processing module is used to output the linear execution order of the task according to the topological sequence diagram and time constraint table of the set directed acyclic graph if there is a clear time relationship, so that one or more slave agents perform processing according to the said linear execution order; otherwise, according to the association relationship corresponding to the constructed knowledge graph, multiple slave agents perform processing at the same time.

Citation Information

Cited By

  • Task execution main body intelligent selection method, system and device and medium

    CN121010340A

  • Knowledge graph construction system based on multiple agents

    CN121960708A

  • Clinical multi-agent task sequence generation method and system

    CN122091138A