Request routing methods, devices, electronic equipment and storage media in multi-agent systems
By generating a routing summary signal isolated from the user-displayed content in a multi-agent system, and combining it with fast routing conditions and task planning information, the input of the task planner is optimized. This solves the problems of slow speed and low accuracy caused by the task planner processing irrelevant information, and improves the stability and scalability of the system.
Patent Information
- Application Number
- CN202611164309.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-31
- Publication Date
- 2026-11-10
AI Technical Summary
In multi-agent systems, task planners suffer from slow routing speed and low accuracy due to processing a large amount of irrelevant information. In particular, they are prone to misrouting when dealing with referential expressions that rely on historical context, which reduces the stability and accuracy of the system.
By generating a route summary signal isolated from the interactive content displayed to the user, and combining it with fast routing conditions and task planning information, the input to the task planner is optimized, thereby enabling the generation of a structured task list and the routing of the target agent.
It significantly improves the routing speed and accuracy of the task planner, reduces the cost of model invocation, and enhances the stability and scalability of multi-agent systems when handling continuous and complex dialogues.
Smart Images

Figure CN123068076A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence and intelligent interaction, specifically to a request routing method, apparatus, electronic device, and storage medium in a multi-agent system. Background Technology
[0002] In multi-agent systems, a task planner is typically used to understand user intent and route user requests to the appropriate agent for execution.
[0003] In existing technologies, task planners typically rely on the complete chat history, the raw outputs of all agents, and all interactive content displayed to the user (such as natural language replies, card content, tool call details, etc.) to construct context when making routing decisions. This approach requires the task planner to process a large amount of information unrelated to routing decisions, such as user-facing wrapper language, rich media displays, repetitive greetings, and detailed tool outputs of executed tasks. This not only results in excessively long input content for the task planner, slowing down processing speed and increasing model call costs, but more importantly, a large amount of invalid "noise" information can interfere with the task planner's judgment of the user's true intentions. This is especially true when processing referential expressions that rely on historical context (such as "this" or "that one just now"), which can easily lead to misrouting, reducing routing accuracy and system stability. Summary of the Invention
[0004] In view of the aforementioned problems, this application is made to provide a request routing method, apparatus, electronic device, and storage medium in a multi-agent system that overcomes or at least partially solves the aforementioned problems, comprising: A request routing method in a multi-agent system includes: The execution results of historical tasks performed by each intelligent agent are obtained, and an associated route summary signal is generated based on the execution results. The route summary signal is isolated from the interactive content displayed to the user. Upon receiving a current user request, determine whether the current user request meets the preset fast routing conditions; If the current user request meets the fast routing conditions, then a target task plan is generated based on the current user request; If the current user request does not meet the fast routing conditions, then task planning information is determined based on the route summary signal and the current user request; The task planning information is input into the task planner, and the task planner outputs a structured task list. Based on the structured task list and the current user request, the target task plan is determined; The target task plan is routed to the target agent, and the target agent is invoked to execute the target task plan.
[0005] Further, determining whether the current user request meets the preset fast routing conditions includes: Deterministic routing of the current user request is performed based on action caching, fixed agent identifiers, or hard rules to determine whether the current user request is fully hit; If the current user request is fully hit, then the current user request is determined to meet the fast routing conditions; If the current user request is not fully hit, then the current user request is determined to not meet the fast routing conditions.
[0006] Further, the task planning information includes planner hints and planner lightweight context. If the current user request does not meet the fast routing conditions, the task planning information is determined based on the route summary signal and the current user request, including: If the current user request is not fully hit, then the current user request is divided into a hit part and a miss part; Based on the hit portion, the planner prompt information is generated; The planner lightweight context is constructed based on the missed portions, the route summary signal, and the structured attributes of the historical tasks.
[0007] Further, determining the target task plan based on the structured task list and the current user request includes: The hit portion is merged with the structured task list to obtain the target task list; In the target task list, tasks of the same agent are merged to obtain the target task plan.
[0008] Further, the step of obtaining the execution results corresponding to the historical tasks executed by each intelligent agent, and generating associated routing summary signals based on the execution results, includes: Receive the output streams corresponding to each of the aforementioned intelligent agents; The execution result is generated based on the output stream, and the execution result carries a structured hidden content block; The structured hidden content block is extracted from the execution result and used as the routing summary signal.
[0009] Furthermore, When the agent corresponding to the output stream is an executing agent, the structured hidden content block is a task result summary containing task status identifiers and task result descriptions; When the agent corresponding to the output stream is a response agent, the structured hidden content block is a response route summary containing a description of the core content of the response.
[0010] Furthermore, after inputting the task planning information into the task planner and outputting a structured task list through the task planner, the process further includes: Perform whitelist verification on the agents corresponding to each task in the structured task list; The task that is not in the whitelist is marked as a fallback task. The fallback task is determined not to be executed, and the responding agent is called to handle the fallback task.
[0011] A request routing device in a multi-agent system, comprising: The acquisition module is used to acquire the execution results of the historical tasks executed by each intelligent agent, and generate an associated route summary signal based on the execution results. The route summary signal is isolated from the interactive content displayed to the user. The judgment module is used to determine whether the current user request meets the preset fast routing conditions when the current user request is received; The generation module is used to generate a target task plan based on the current user request if the current user request meets the fast routing conditions. The first determining module is used to determine task planning information based on the route summary signal and the current user request if the current user request does not meet the fast routing conditions. The task planning module is used to input the task planning information into the task planner and output a structured task list through the task planner. The second determining module is used to determine the target task plan based on the structured task list and the current user request; The routing module is used to route to the target agent based on the target task plan and to invoke the target agent to execute the target task plan.
[0012] A computer electronic device includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the steps of the request routing method in a multi-agent system as described above.
[0013] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the request routing method in a multi-agent system as described above.
[0014] This application has the following advantages: In the embodiments of this application, in view of the problem in the prior art that "task planners suffer from slow routing speed and low accuracy due to a large amount of irrelevant information in the input context", this application provides a solution, specifically as follows: "Obtain the execution results corresponding to the historical tasks executed by each intelligent agent, and generate an associated routing summary signal based on the execution results, wherein the routing summary signal is isolated from the interactive content displayed to the user; upon receiving a current user request, determine whether the current user request meets the preset fast routing conditions; if the current user request meets the fast routing conditions, generate a target task plan based on the current user request; if the current user request does not meet the fast routing conditions, determine task planning information based on the routing summary signal and the current user request; input the task planning information into the task planner, and output a structured task list through the task planner; determine the target task plan based on the structured task list and the current user request; route to the target intelligent agent based on the target task plan, and call the target intelligent agent to execute the target task plan." This application extracts and generates a route summary signal isolated from the user-displayed content by extracting the agent's execution results. This transforms the information relied upon by the task planner for route decisions from a lengthy and noisy complete historical context to a refined, task-focused structured signal (such as task state, result summary, and target agent). This mechanism effectively isolates the interference of user-facing packaging content on route decisions. Simultaneously, the introduction of fast route condition judgments based on action caching, fixed agent identifiers, or hard rules enables rapid processing of deterministic requests without invoking a complex task planner, further reducing the planner's call frequency and input load. When the task planner must be invoked, constructing task planning information based on the route summary signal and the planner's lightweight context significantly reduces the input size and increases information density. Therefore, this application's solution significantly improves the routing speed and accuracy of the task planner, reduces misrouting caused by contextual noise, reduces model invocation costs, and enhances the stability and scalability of multi-agent systems when handling continuous and complex dialogues. Attached Figure Description
[0015] To more clearly illustrate the technical solution of this application, the drawings used in the description of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 This is a flowchart illustrating the steps of a request routing method in a multi-agent system according to an embodiment of this application; Figure 2 This is a structural block diagram of a request routing device in a multi-agent system provided in an embodiment of this application; Figure 3 This is a schematic diagram of the structure of a computer electronic device provided in an embodiment of the present invention; 1. A computer electronic device; 2. An external device; 3. A processing unit; 4. A bus; 5. A network adapter; 6. An I / O interface; 7. A display; 8. Memory; 9. Random access memory; 10. A cache memory; 11. A storage system; 12. A program / utility; 13. A program module. Detailed Implementation
[0017] To make the objectives, features, and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0018] Analysis of existing technologies reveals that current multi-agent systems suffer from low efficiency and accuracy in intent recognition due to the coupling between displayed content and routing decision signals. This application addresses this issue by proposing a request routing method for multi-agent systems, thereby decoupling the data between the presentation layer and the routing layer and improving the speed and stability of request routing.
[0019] The embodiments of this application can be applied to conversational artificial intelligence systems that include multiple intelligent agents, such as intelligent store assistants, virtual personal assistants, or enterprise-level business orchestration platforms. In these systems, users interact with a unified dialogue interface, while various intelligent agents with different business capabilities (such as copywriting generation, device control, data querying, etc.) collaborate to complete tasks.
[0020] It should be noted that the following explanations are provided for key terms involved in the embodiments of this application, in order to facilitate understanding of the technical solutions of this application: Task planner: A functional module used to understand user requests, break them down into one or more sub-tasks, and select a suitable target agent for each sub-task. It is also referred to as a planner in this application.
[0021] Intelligent agent: A functional entity responsible for executing specific business capabilities, handling only assigned business sub-tasks. Based on their responsibilities, they can be divided into execution agents responsible for performing specific business operations and response agents responsible for generating natural language responses.
[0022] Routing summary signal: Structured information, isolated from the interactive content displayed to the user, summarizing the agent's historical task execution results or core responses. It is not the complete response shown to the user, but rather an information summary serving subsequent routing decisions.
[0023] Fast routing conditions: Pre-defined conditions that allow the target agent to be determined without relying on complex reasoning by the task planner. These are based on deterministic decision-making mechanisms, such as action caching, fixed agent identifiers, or hard rules.
[0024] Structured task list: A list of one or more task items output by the task planner. Each task item is structured with core routing elements such as task name, task instructions, and target agent.
[0025] Target task plan: The final task scheme determined and used to drive the agent to execute. It may come entirely from deterministic fast routing, or it may be the product of merging and optimizing the task planner output with the deterministic routing results.
[0026] Reference Figure 1 This illustration shows a request routing method in a multi-agent system according to an embodiment of this application. The method mainly includes: S110. Obtain the execution results corresponding to the historical tasks executed by each intelligent agent, and generate an associated routing summary signal based on the execution results. The routing summary signal is isolated from the interactive content displayed to the user. S120. Upon receiving a current user request, determine whether the current user request meets the preset fast routing conditions; S130. If the current user request meets the fast routing conditions, then generate a target task plan based on the current user request. S140. If the current user request does not meet the fast routing conditions, then determine the task planning information based on the routing summary signal and the current user request. S150. Input the task planning information into the task planner, and output a structured task list through the task planner. S160. Based on the structured task list and the current user request, determine the target task plan; S170. Based on the target task plan, route to the target agent and invoke the target agent to execute the target task plan.
[0027] In the embodiments of this application, the above steps work together. In a multi-agent system, the execution results of historical tasks of agents are rich in information, but also contain a large amount of user-oriented packaged content that is useless for routing decisions. This solution extracts and generates associated but isolated routing summary signals from these execution results through step S101, thereby achieving the separation of the "signals" required for routing from the displayed content from the source. When a new user request arrives, instead of immediately starting a complex task planner for reasoning, a diversion valve is set through step S102: requests that meet the conditions for fast routing are identified as deterministic scenarios and are directly processed at high speed through step S103, bypassing the heavyweight planner call. Only when the request cannot be completely parsed by deterministic rules does it enter step S104. At this time, the system does not hand over the noisy complete historical context to the planner, but uses the previously accumulated high-purity routing summary signal as the core input to build concise task planning information for the planner. Finally, regardless of the routing decision path, the system can generate the target task plan (step S106) and complete the call to the target agent (step S107). This collaborative mechanism of "summary isolation, fast priority, and planning fallback" jointly solves the problem of slow routing speed and low accuracy caused by excessive historical context noise, achieving a comprehensive effect of significantly reducing the planner's inference load and improving routing response speed and stability.
[0028] Taking a specific application scenario as an example, suppose a smart store assistant integrates multiple business agents, such as a device control agent and a sales copy agent. In the first round of dialogue, the user requests, "Help me generate a sales copy for a durian mille-feuille." At this point, the system performs a quick routing condition check and finds that the request does not hit any action cache or hard rules, so it enters a non-fast routing branch. The system determines task planning information based on the route summary signal, which may be empty at this time or accumulated from previous dialogues, and the current user request. The task planner outputs a structured task list based on this, which includes one task: the target agent is the "sales copy agent." This list is processed to form the target task plan, ultimately triggering the call to the sales copy agent. After this execution is completed, the system extracts the route summary signal from the execution result of the sales copy agent, which is, for example, a structured summary information summarizing the core fact that "a lively style of sales copy has been generated for the durian mille-feuille." This signal is invisible to the user but is properly stored. When a user immediately makes a second request, "Change this version, make it more youthful," the system first determines if it meets the fast routing criteria. For example, if the user initiated the request by clicking the "Change Version" button on the card, hitting the action cache, it is directly determined to meet the fast routing criteria, generating a target task plan pointing to the "sales copywriting AI agent," completing a response within seconds. Even if there is no button click and the fast routing criteria are not fully met, the system can still accurately identify "this" as referring to the sales copywriting for durian mille-feuille from the routing summary signal corresponding to the previous task when constructing subsequent task planning information. This guides the task planner to correctly route to the copywriting AI agent again, rather than being misled by the complex content displayed on the previous card.
[0029] This application extracts and generates a route summary signal isolated from the user-displayed content by extracting the agent's execution results. This transforms the information relied upon by the task planner for route decisions from a lengthy and noisy complete historical context to a refined, task-focused structured signal (such as task state, result summary, and target agent). This mechanism effectively isolates the interference of user-facing packaging content on route decisions. Simultaneously, the introduction of fast route condition judgments based on action caching, fixed agent identifiers, or hard rules enables rapid processing of deterministic requests without invoking a complex task planner, further reducing the planner's call frequency and input load. When the task planner must be invoked, constructing task planning information based on the route summary signal and the planner's lightweight context significantly reduces the input size and increases information density. Therefore, this application's solution significantly improves the routing speed and accuracy of the task planner, reduces misrouting caused by contextual noise, reduces model invocation costs, and enhances the stability and scalability of multi-agent systems when handling continuous and complex dialogues.
[0030] The request routing method in the multi-agent system of this exemplary embodiment will be further described below.
[0031] In one embodiment of the present invention, the specific process of "determining whether the current user request meets the preset fast routing conditions" in step S120 can be further explained in conjunction with the following description.
[0032] As described in the following steps, deterministic routing is performed on the current user request based on action caching, fixed agent identifier, or hard rules to determine whether the current user request is fully hit; if the current user request is fully hit, it is determined that the current user request meets the fast routing conditions; if the current user request is not fully hit, it is determined that the current user request does not meet the fast routing conditions.
[0033] In one specific implementation, this approach constructs a fast processing channel composed of multiple deterministic defenses. Action caching records the binding relationships between recently clicked card buttons and their corresponding agents, allowing for instantaneous responses when duplicate operations are detected. Fixed agent identifiers allow certain special interaction entry points (such as clicking specific function menus) to directly carry the target agent's identity information. Hard rules are a series of pre-defined precise phrases, keywords, or regular expressions that can directly map to specific agents. Only when these deterministic routing methods fail to unambiguously and completely cover the user's request intent will the system determine that the request does not meet the fast routing conditions. Furthermore, this approach significantly improves system response speed. A large number of high-frequency, explicit operation-type requests do not need to enter the task planner's inference stage, completing routing decisions directly within milliseconds, greatly reducing user waiting time. Simultaneously, by skipping the task planner, it also directly saves on the corresponding model call costs. As a specific implementation, hard rules can be configured to perform precise phrase matching on the user's original input text, or to perform AND / OR logical combination matching on multiple keywords.
[0034] In one embodiment of the present invention, the task planning information includes planner prompt information and planner lightweight context. The specific process of step S140, "If the current user request does not meet the fast routing conditions, then determine the task planning information based on the routing summary signal and the current user request", can be further explained in conjunction with the following description.
[0035] As described in the following steps, if the current user request is not fully hit, the current user request is divided into a hit portion and a miss portion; based on the hit portion, the planner prompt information is generated; based on the miss portion, the route summary signal, and the structured attributes of the historical task, the planner lightweight context is constructed.
[0036] In one implementation, this embodiment addresses a mixed scenario: in a user's single-line input, some intents can be identified by deterministic rules, while others are ambiguous or require historical context. For example, if a user inputs "Turn on the light, and then write some copy for me like last time," "Turn on the light" might be instantly identified by a hard rule and classified as part of the identified portion, while "Write some copy like last time" would be classified as part of the unidentified portion. The system converts the identified portion into planner prompts, explicitly informing the planner that this part of the task "has been generated by the preceding rules and cannot be planned repeatedly," thus allowing the planner to focus entirely on parsing the intents of the unidentified portion. Simultaneously, the lightweight planner context constructed for the planner no longer contains the complete historical dialogue text, but is precisely composed of fragments representing unprocessed user intents, high-purity routing summary signals, and structured attributes of historical tasks (such as task name, target agent, etc.). Furthermore, this approach can improve the efficiency and accuracy of the task planner's decision-making. On the one hand, the planner's prompts explicitly define the planning boundaries, avoiding redundant planning or planning conflicts; on the other hand, the planner's lightweight context provides it with highly information-dense and noise-free decision-making basis, avoiding interference from the results of complex tool calls or card display codes that indicate the previous task has been completed, enabling it to identify the specific historical task referred to by "last time" more quickly and accurately, and plan the correct new task.
[0037] In one embodiment of the present invention, the specific process of "determining the target task plan based on the structured task list and the current user request" in step S160 can be further described in conjunction with the following description.
[0038] As described in the following steps, the hit portion is merged with the structured task list to obtain the target task list; in the target task list, tasks of the same agent are merged to obtain the target task plan.
[0039] In one specific implementation, when user intent is divided into a hit portion and a miss portion, and each portion generates multiple subtasks through a fast routing channel and a task planner, these subtasks are first merged into a preliminary target task list. For example, fast routing hits the "device control agent," the task planner also outputs a task to call the "sales copywriting agent," and another task that needs to be executed by the "device control agent" (e.g., the planner believes that in addition to turning on the lights, the temperature needs to be adjusted). These three initial tasks are all placed in the same target task list. Subsequently, the system optimizes the list, merging two tasks that target the same "device control agent" into a combined task, ultimately resulting in a more concise target task plan. Furthermore, this approach can reduce the number of agent calls, shorten the overall task execution time, and optimize system resource consumption. By aggregating discrete tasks that target the same execution unit, a set of coherent instructions can be passed to the agent in a single call, avoiding the network round-trip latency and context reconstruction overhead caused by multiple calls.
[0040] In one embodiment of the present invention, the specific process of step S110, "obtaining the execution results corresponding to the historical tasks executed by each intelligent agent and generating associated routing summary signals based on the execution results," can be further explained in conjunction with the following description.
[0041] As described in the following steps, receive the output stream corresponding to each of the intelligent agents; generate the execution result based on the output stream, the execution result carrying a structured hidden content block; and extract the structured hidden content block from the execution result as the routing summary signal.
[0042] In one specific implementation, the output of the agent (such as a business execution agent or a response agent) is not a single block of text, but a structured output stream. This output stream, in addition to containing interactive content such as text, cards, and rich media ultimately displayed to the user, also conventionally carries a structured hidden content block with special tags. This hidden content block is designed to carry structured information intended for internal system use rather than for the user. Upon receiving the output stream, the system parses the specific tags (such as...)<task_outcome> or<response_route_summary> The hidden block is located, its content is extracted completely, and it is then completely stripped from the output stream before being pushed to the user. The extracted content is the pure route summary signal. Furthermore, this provides a unique and stable signal source for constructing a noise-free planner context. Because the route summary signal is physically isolated from the interactive content displayed to the user, it does not introduce noise such as lengthy natural language responses, JSON-formatted card codes, or tool call details into the next round of route judgment, thus ensuring the high quality of the route input information from the source.
[0043] In one embodiment of the present invention, it is also necessary to distinguish the specific types of the above-mentioned structured hidden content blocks. When the agent corresponding to the output stream is an executing agent, the structured hidden content block is a task result summary containing a task status identifier and a task result description. For example, after a device control agent completes the task of "turning down the volume", the hidden block content carried in its output stream may be: the status identifier is SUCCESS, and the task result description is "the volume of the store speaker has been turned down". When the agent corresponding to the output stream is a responding agent, the structured hidden content block is a response route summary containing a description of the core content of the response. For example, after the responding agent completes a round of catch-all questions or a summary statement, its hidden block content may be: the response route summary is "the three ways of applying for a membership card and their advantages and disadvantages have been explained to the user". By distinguishing these two types of route summary signals, the system can finely characterize historical links of different natures: the former accurately reflects whether a certain business operation is successful and its actual effect, while the latter summarizes the semantic focus of purely informational responses in the dialogue stream. This allows the task planner to clearly distinguish between "completed tasks" and "discussed information" when making subsequent decisions, thus making more accurate judgments on different types of follow-up questions such as "Is that done?" or "Can you elaborate on the solution we just discussed?"
[0044] In one embodiment of the present invention, the specific features of the "request routing method in a multi-agent system" after step S150 can be further described in conjunction with the following description.
[0045] As described in the following steps, a whitelist verification is performed on the agents corresponding to each task in the structured task list; tasks whose agents are not in the whitelist are marked as fallback tasks, the fallback tasks are determined not to be executed, and the responding agent is called to perform fallback processing on the fallback tasks.
[0046] In one specific implementation, during actual operation, the task planner might output a target not on the current system's available agent whitelist due to inference bias, or it might automatically output a fallback instruction pointing to special handling when encountering an unresolved intent. This step is designed to address such planning risks. The system compares the target agent of each task output by the task planner with a verification whitelist. If the target agent of a task is illegal or marked as a fallback, the system will not force the execution of the task, but will capture it and safely transfer the handling responsibility to the responding agent, which will explain the situation to the user or provide guidance in a user-friendly natural language. Furthermore, this approach significantly improves the system's robustness and security. It prevents internal system errors or anomalies caused by the planner's misplanning leading to the incorrect assignment of tasks to non-existent or insufficiently authorized agents, providing users with a always-available and user-friendly fallback interaction experience.
[0047] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0048] Reference Figure 2 This application illustrates a request routing device 200 in a multi-agent system according to an embodiment of the present application, specifically including: The acquisition module 210 is used to acquire the execution results of the historical tasks executed by each intelligent agent, and generate an associated route summary signal based on the execution results. The route summary signal is isolated from the interactive content displayed to the user. The judgment module 220 is used to determine whether the current user request meets the preset fast routing conditions when the current user request is received; The generation module 230 is used to generate a target task plan based on the current user request if the current user request meets the fast routing conditions; The first determining module 240 is used to determine task planning information based on the routing summary signal and the current user request if the current user request does not meet the fast routing conditions. The task planning module 250 is used to input the task planning information into the task planner and output a structured task list through the task planner. The second determining module 260 is used to determine the target task plan based on the structured task list and the current user request; The routing module 270 is used to route to the target agent based on the target task plan and call the target agent to execute the target task plan.
[0049] In one embodiment of the present invention, the determining module 220 is further configured to: Deterministic routing of the current user request is performed based on action caching, fixed agent identifiers, or hard rules to determine whether the current user request is fully hit; If the current user request is fully hit, then the current user request is determined to meet the fast routing conditions; If the current user request is not fully hit, then the current user request is determined to not meet the fast routing conditions. In one embodiment of the present invention, the task planning information includes planner hint information and planner lightweight context, and the first determining module 240 is further configured to: If the current user request is not fully hit, then the current user request is divided into a hit part and a miss part; Based on the hit portion, the planner prompt information is generated; The planner lightweight context is constructed based on the missed portions, the route summary signal, and the structured attributes of the historical tasks.
[0050] In one embodiment of the present invention, the second determining module 260 is further configured to: The hit portion is merged with the structured task list to obtain the target task list; In the target task list, tasks of the same agent are merged to obtain the target task plan.
[0051] In one embodiment of the present invention, the acquisition module 210 is further configured to: Receive the output streams corresponding to each of the aforementioned intelligent agents; The execution result is generated based on the output stream, and the execution result carries a structured hidden content block; The structured hidden content block is extracted from the execution result and used as the routing summary signal.
[0052] In one embodiment of the present invention, When the agent corresponding to the output stream is an executing agent, the structured hidden content block is a task result summary containing task status identifiers and task result descriptions; When the agent corresponding to the output stream is a response agent, the structured hidden content block is a response route summary containing a description of the core content of the response.
[0053] In one embodiment of the present invention, the request routing device 200 is further configured to: Perform whitelist verification on the agents corresponding to each task in the structured task list; The task that is not in the whitelist is marked as a fallback task. The fallback task is determined not to be executed, and the responding agent is called to handle the fallback task.
[0054] Reference Figure 3 The illustration shows a computer electronic device for implementing a request routing method in a multi-agent system according to the present invention, which may specifically include the following: The aforementioned computer electronic device 1 is manifested in the form of a general-purpose computing device. The components of a computer electronic device 1 may include, but are not limited to: one or more processors or processing units 3, memory 8, and a bus 4 connecting different system components (including memory 8 and processing unit 3).
[0055] Bus 4 represents one or more of several bus architectures, including memory buses or memory controllers, peripheral buses, graphics acceleration ports, processors, or local buses using any of the various bus architectures. For example, these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Audio / Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.
[0056] A computer electronic device 1 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by a computer electronic device 1, including volatile and non-volatile media, removable and non-removable media.
[0057] Memory 8 may include computer system readable media in the form of volatile memory, such as random access memory 9 and / or cache memory 10. A computer electronic device 1 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 11 may be used to read and write non-removable, non-volatile magnetic media (commonly referred to as a "hard disk drive"). Although Figure 3As not shown, a disk drive for reading and writing to a removable non-volatile disk (such as a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (such as a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 4 via one or more data media interfaces. The memory may include at least one program product having a set (e.g., at least one) of program modules 13 configured to perform the functions of the embodiments of this application.
[0058] A program / utility 12 having a set (at least one) of program modules 13 may be stored, for example, in memory. Such program modules 13 include—but are not limited to—an operating system, one or more application programs, other program modules 13, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 13 typically perform the functions and / or methods described in the embodiments of this application.
[0059] A computer electronic device 1 can also communicate with one or more external devices 2 (e.g., keyboard, pointing device, display 7, camera, etc.), and with one or more devices that enable an operator to interact with the computer electronic device 1, and / or with any device that enables the computer electronic device 1 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed through I / O interface 6. Furthermore, the computer electronic device 1 can also communicate with one or more networks (e.g., local area network (LAN)), wide area network (WAN), and / or public networks (e.g., the Internet) via network adapter 5. Figure 3 As shown, network adapter 5 communicates with other modules of a computer electronic device 1 via bus 4. It should be understood that, although... Figure 3 As not shown, other hardware and / or software modules may be used in conjunction with a computer electronic device 1, including but not limited to: microcode, device drivers, redundant processing units 3, external disk drive arrays, RAID systems, tape drives, and data backup storage systems 11.
[0060] The processing unit 3 executes various functional applications and data processing by running programs stored in memory 8, such as implementing a request routing method in a multi-agent system provided in the embodiments of this application.
[0061] That is, when the processing unit 3 executes the above program, it performs the following: obtaining the execution results corresponding to the historical tasks executed by each intelligent agent, and generating an associated route summary signal based on the execution results, wherein the route summary signal is isolated from the interactive content displayed to the user; upon receiving a current user request, determining whether the current user request meets the preset fast routing conditions; if the current user request meets the fast routing conditions, generating a target task plan based on the current user request; if the current user request does not meet the fast routing conditions, determining task planning information based on the route summary signal and the current user request; inputting the task planning information into a task planner, and outputting a structured task list through the task planner; determining the target task plan based on the structured task list and the current user request; routing to the target intelligent agent based on the target task plan, and calling the target intelligent agent to execute the target task plan.
[0062] In this application embodiment, the present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a request routing method in a multi-agent system as provided in all embodiments of the present application.
[0063] That is, when the program is executed by the processor, it implements the following: obtaining the execution results corresponding to the historical tasks executed by each intelligent agent, and generating an associated route summary signal based on the execution results, wherein the route summary signal is isolated from the interactive content displayed to the user; upon receiving a current user request, determining whether the current user request meets preset fast routing conditions; if the current user request meets the fast routing conditions, generating a target task plan based on the current user request; if the current user request does not meet the fast routing conditions, determining task planning information based on the route summary signal and the current user request; inputting the task planning information into a task planner, and outputting a structured task list through the task planner; determining the target task plan based on the structured task list and the current user request; routing to the target intelligent agent based on the target task plan, and calling the target intelligent agent to execute the target task plan.
[0064] Any combination of one or more computer-readable media may be used. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device.
[0065] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including—but not limited to—electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of transmitting, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.
[0066] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof. These programming languages include object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the operator's computer, partially on the operator's computer, as a standalone software package, partially on the operator's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the operator's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider). The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably.
[0067] Although preferred embodiments of the present application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present application.
[0068] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device 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 terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.
[0069] The above provides a detailed description of the request routing method, apparatus, electronic device, and storage medium in a multi-agent system provided by this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A request routing method in a multi-agent system, characterized in that, include: The execution results of historical tasks performed by each intelligent agent are obtained, and an associated route summary signal is generated based on the execution results. The route summary signal is isolated from the interactive content displayed to the user. Upon receiving a current user request, determine whether the current user request meets the preset fast routing conditions; If the current user request meets the fast routing conditions, then a target task plan is generated based on the current user request; If the current user request does not meet the fast routing conditions, then task planning information is determined based on the route summary signal and the current user request; The task planning information is input into the task planner, and the task planner outputs a structured task list. Based on the structured task list and the current user request, the target task plan is determined; The target task plan is routed to the target agent, and the target agent is invoked to execute the target task plan.
2. The method according to claim 1, characterized in that, The step of determining whether the current user request meets the preset fast routing conditions includes: Deterministic routing of the current user request is performed based on action caching, fixed agent identifiers, or hard rules to determine whether the current user request is fully hit; If the current user request is fully hit, then the current user request is determined to meet the fast routing conditions; If the current user request is not fully hit, then the current user request is determined to not meet the fast routing conditions.
3. The method according to claim 2, characterized in that, The task planning information includes planner hints and planner lightweight context. If the current user request does not meet the fast routing conditions, the task planning information is determined based on the route summary signal and the current user request, including: If the current user request is not fully hit, then the current user request is divided into a hit part and a miss part; Based on the hit portion, the planner prompt information is generated; The planner lightweight context is constructed based on the missed portions, the route summary signal, and the structured attributes of the historical tasks.
4. The method according to claim 3, characterized in that, The step of determining the target task plan based on the structured task list and the current user request includes: The hit portion is merged with the structured task list to obtain the target task list; In the target task list, tasks of the same agent are merged to obtain the target task plan.
5. The method according to claim 1, characterized in that, The step of obtaining the execution results of historical tasks executed by each agent and generating associated route summary signals based on the execution results includes: Receive the output streams corresponding to each of the aforementioned intelligent agents; The execution result is generated based on the output stream, and the execution result carries a structured hidden content block; The structured hidden content block is extracted from the execution result and used as the routing summary signal.
6. The method according to claim 5, characterized in that, When the agent corresponding to the output stream is an executing agent, the structured hidden content block is a task result summary containing task status identifiers and task result descriptions; When the agent corresponding to the output stream is a response agent, the structured hidden content block is a response route summary containing a description of the core content of the response.
7. The method according to any one of claims 1 to 6, characterized in that, After inputting the task planning information into the task planner and having the task planner output a structured task list, the process further includes: Perform whitelist verification on the agents corresponding to each task in the structured task list; The task that is not in the whitelist is marked as a fallback task. The fallback task is determined not to be executed, and the responding agent is called to handle the fallback task.
8. A request routing device in a multi-agent system, characterized in that, include: The acquisition module is used to acquire the execution results of the historical tasks executed by each intelligent agent, and generate an associated route summary signal based on the execution results. The route summary signal is isolated from the interactive content displayed to the user. The judgment module is used to determine whether the current user request meets the preset fast routing conditions when the current user request is received; The generation module is used to generate a target task plan based on the current user request if the current user request meets the fast routing conditions. The first determining module is used to determine task planning information based on the route summary signal and the current user request if the current user request does not meet the fast routing conditions. The task planning module is used to input the task planning information into the task planner and output a structured task list through the task planner. The second determining module is used to determine the target task plan based on the structured task list and the current user request; The routing module is used to route to the target agent based on the target task plan and to invoke the target agent to execute the target task plan.
9. A computer electronic device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the steps of the request routing method in a multi-agent system as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, which, when executed by a processor, implements the steps of the request routing method in a multi-agent system as described in any one of claims 1 to 7.
