Multi-agent routing method

By performing semantic deconstruction and multi-dimensional matching on the query text, a comprehensive score is generated, and the most matching target agent is selected for routing. This solves the problem in existing technologies where it is difficult to distinguish between requests from the same subject but with different action intentions, and improves the routing accuracy and robustness of multi-agent systems.

CN123050477APending Publication Date: 2026-11-06LENOVO (BEIJING) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611162014.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-31
Publication Date
2026-11-06

AI Technical Summary

Technical Problem

Existing multi-agent routing schemes struggle to effectively distinguish between requests from entities with the same subject but vastly different intentions, resulting in low routing accuracy, a lack of hard isolation mechanisms at domain boundaries, and insufficient confidence in the output results.

Method used

By acquiring entity information and action intent information from the text to be queried, multi-dimensional matching is performed using the specified entity and action information of candidate agents to generate a comprehensive score, and the most matching target agent is selected for routing.

Benefits of technology

It improves the accuracy and robustness of routing in multi-agent systems, effectively distinguishes requests from entities with the same subject but different action intentions, and achieves hard isolation of domain boundaries and reliability of output results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123050477A_ABST
    Figure CN123050477A_ABST
Patent Text Reader

Abstract

This application provides a multi-agent routing method; the method includes: acquiring entity information, action intent information, and multiple candidate agents from a text to be queried; each candidate agent is pre-set with specified entity information and specified action information; matching the entity information with the specified entity information of each candidate agent to generate a first score for each candidate agent in the entity matching dimension; matching the action intent information with the specified action information of each candidate agent to generate a second score for each candidate agent in the action matching dimension; generating a target score for each candidate agent based on the first score and the second score; determining a target agent from the multiple candidate agents based on the target scores of each candidate agent; and routing the text to be queried to the target agent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to artificial intelligence technology, and more particularly to a multi-agent routing method. Background Technology

[0002] In a supervisor multi-agent architecture, the supervisor needs to route user natural language queries to the corresponding sub-agents for execution. However, existing routing schemes typically treat user natural language queries as a whole for intent recognition, failing to effectively distinguish between requests from the same subject but with vastly different action intents, resulting in low routing accuracy. Summary of the Invention

[0003] This application provides a multi-agent routing method.

[0004] The technical solution of this application embodiment is implemented as follows: This application provides a multi-agent routing method, the method comprising: acquiring entity information, action intent information, and multiple candidate agents from a text to be queried; each candidate agent is pre-configured with specified entity information and specified action information; The entity information is matched with the specified entity information of each candidate agent to generate a first score for each candidate agent in the entity matching dimension; the action intent information is matched with the specified action information of each candidate agent to generate a second score for each candidate agent in the action matching dimension. Based on the first score and the second score, a target score is generated for each candidate agent; Based on the target scores of each candidate agent, the target agent is determined from the plurality of candidate agents; The text to be queried is routed to the target agent. Attached Figure Description

[0005] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the specification, serve to explain the technical solutions of this application. Obviously, the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.

[0006] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.

[0007] Figure 1 This is one of the flowcharts illustrating a multi-agent routing method provided in an embodiment of this application; Figure 2 This is a second schematic flowchart of a multi-agent routing method provided in an embodiment of this application; Figure 3 This is the third flowchart illustrating a multi-agent routing method provided in this application embodiment; Figure 4 This is the fourth flowchart of a multi-agent routing method provided in the embodiments of this application; Figure 5 This is the fifth flowchart illustrating a multi-agent routing method provided in this application embodiment; Figure 6 This is a schematic diagram of the structure of a multi-agent routing device provided in an embodiment of this application; Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0008] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the specific technical solutions of this application will be further described in detail below with reference to the accompanying drawings of the embodiments of this application. The following embodiments are used to illustrate this application, but are not intended to limit the scope of this application.

[0009] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0010] In the following description, references to "some embodiments," "this embodiment," "this application embodiment," and examples, etc., describe a subset of all possible embodiments. However, it is understood that "some embodiments" may be the same subset or different subset of all possible embodiments and may be combined with each other without conflict.

[0011] The terms "first," "second," and "third" appearing in the embodiments of this application do not have a specific meaning (e.g., there is no order, nor does it indicate a special limitation on the number of devices in the embodiments of this application), but are merely for the purpose of clearly describing the embodiments of this application and do not constitute any limitation on the embodiments of this application. The term "multiple" appearing in the embodiments of this application refers to two or more integers.

[0012] To facilitate understanding of the technical solutions of the embodiments of this application, the relevant technologies or terms of the embodiments of this application are described below. The following related technologies or related terms are optional solutions and can be combined with the technical solutions of the embodiments of this application in any way, and all of them fall within the protection scope of the embodiments of this application.

[0013] In the Supervisor Multi-Agent architecture, the Supervisor is responsible for understanding the intent of the user's natural language query and then distributing the task to the corresponding sub-agent for execution based on the intent. As enterprise intelligent assistant application scenarios become more complex, the number of sub-agents and business domains continue to increase. Accurate intent recognition and routing capabilities are the core bottleneck restricting the stable and reliable operation of the system.

[0014] Existing intent classification and routing schemes mainly include: (1) Pure large model classification scheme. This scheme directly uses a large language model to determine the intent of user input and route it. Its shortcomings are: the results are unstable when processing technical terms or new scenarios, and the same question may produce different results due to slight adjustments in the input, which lacks consistency; each request requires calling a large model, resulting in high response latency and high computational cost; the model only outputs deterministic conclusions and cannot provide confidence measurement, making it difficult to provide a reliable assessment of the degree of certainty for downstream decision-making.

[0015] (2) Keyword rule matching scheme. This scheme routes requests by matching strings through a preset keyword rule table. Its shortcomings are: it can only recognize preset keywords. If the user changes the expression, it will not match correctly. For example, "computer screen is black" and "monitor is not lit" will be regarded as completely different requests; as the business grows, the number of rules expands, making maintenance difficult and conflicts between rules are easy to occur; it cannot understand semantic similarity.

[0016] (3) Independently trained classification model scheme. This scheme uses pre-trained models such as Bidirectional Encoder Representations from Transformers (BERT) to train the intent classifier separately. Its shortcomings are: each sentence is treated as an independent event without considering the dialogue context and business context; a large amount of labeled data is required, making cold start difficult; the model still forcibly outputs classification results when uncertain, lacking a fallback mechanism for "uncertain" situations.

[0017] The inventors of this application discovered in their research and analysis that the problems with the related technologies are at least as follows: it is difficult to effectively distinguish between requests from the same subject but with different intentions (e.g., "requesting a computer" belongs to the Human Resources (HR) process, while "repairing a computer" belongs to the Information Technology (IT) process), there is a lack of hard isolation mechanisms for domain boundaries (e.g., IT agents should not respond to "reimbursement" requests), and there is a lack of safe and reliable degradation strategies when the confidence of the output results is insufficient.

[0018] To address at least one of the problems existing in related technologies, embodiments of this application provide a multi-agent routing method. This method first performs semantic deconstruction on the user's query text, then performs multi-dimensional matching processing on the deconstructed information and each agent, then performs a comprehensive score on the matching results, and finally implements routing based on the score results. This can improve the accuracy of routing.

[0019] It should be noted that the embodiments of this application can be applied to various scenarios such as enterprise-level intelligent assistants, customer service robots, and knowledge management platforms, and are particularly suitable for multi-agent collaborative architectures with complex business domains and a large number of intelligent agents. The following will use an enterprise intelligent assistant as an example to describe the specific implementation methods of this application in detail with reference to the accompanying drawings.

[0020] Figure 1 This is one of the flowcharts illustrating a multi-agent routing method provided in an embodiment of this application; as shown... Figure 1 As shown, the method may include the following steps 101 to 106: Step 101: Obtain entity information, action intent information, and multiple candidate agents from the text to be queried; each candidate agent is pre-set with specified entity information and specified action information.

[0021] In this embodiment of the application, the system can first receive the query text input by the user (i.e., natural language query text), and then use a large language model to perform semantic deconstruction or parsing of the query text to extract entity information and action intent information, and obtain multiple candidate agents output by the large language model.

[0022] It should be noted that entity information refers to noun-like information units with business semantics extracted from the text to be queried. These units are used to represent the business objects and related entities involved in the user's query, including but not limited to business object entities (such as "computer," "salary," and "server") and auxiliary context entities (such as "Zhang San," "City A," and "R&D Center"). The business object entity is the target object pointed to by the text to be queried, while the auxiliary context entity is a related entity that modifies or supplements the description of the business object entity.

[0023] It should be noted that action intent information refers to information extracted from the text to be queried that represents the type of target operation that the user expects to perform on the business object, such as "application", "repair", "reimbursement", "query", etc.

[0024] It should be noted that multiple candidate agents refer to one or more agents that the large language model initially recommends based on the semantic content of the query text, suggesting they may be suitable for handling the current query. For example, in the query "apply for a computer," the large language model might recommend an HR agent and an IT agent as candidates. Each candidate agent is pre-configured with specified entity information and specified action information. Specified entity information refers to the pre-registered information of each candidate agent that characterizes the types of business entities that the agent can handle (e.g., the IT agent has pre-defined entity information such as "computer," "server," and "printer"). Specified action information refers to the pre-registered information of each candidate agent that characterizes the types of operations that the agent can perform (e.g., the IT agent has pre-defined action information such as "repair," "configure," and "install"). The specified entity information and specified action information of a candidate agent together constitute the capability boundary of that agent. For example, the specified entity information for the HR intelligent agent is {salary, social security, housing provident fund, leave, onboarding}, and the specified action information is {application, reimbursement, inquiry, onboarding}; the specified entity information for the IT intelligent agent is {computer, network, VPN, password, server}, and the specified action information is {repair, reset, configuration, upgrade, troubleshooting}.

[0025] Step 102: Match the entity information with the specified entity information of each candidate agent to generate the first score of each candidate agent in the entity matching dimension.

[0026] In this embodiment of the application, for each candidate agent, its specified entity information can be matched with entity information obtained from the text to be queried to generate a first score for each candidate agent in the entity matching dimension.

[0027] In some embodiments, a three-level priority matching principle can be used to match the specified entity information of each candidate agent with the entity information obtained from the query text. The three-level priority matching principle, ranked from highest to lowest matching precision, includes: exact matching, inclusion matching, and semantic matching. Exact matching is the first level, which determines whether the entity information obtained from the query text is completely identical to the specified entity information of the candidate agent. If they are completely identical, the highest matching score (e.g., 1.0) is returned, and no further matching is performed. Inclusion matching is the second level, which, if exact matching fails, determines whether there is an inclusion relationship between the two entities. If an inclusion relationship exists, the second highest matching score (e.g., 0.7) is returned. Semantic matching is the third level, which, if both exact matching and inclusion matching fail, performs matching by calculating the vector similarity (e.g., cosine similarity) between the two entities, and returns the semantic similarity score multiplied by a preset semantic matching weighting coefficient as the matching score. This three-level priority matching principle allows matching to proceed sequentially from highest to lowest determinism, ensuring matching precision while also considering semantic generalization ability, thus providing more accurate entity matching results for subsequent routing decisions.

[0028] In some embodiments, all candidate agents can be traversed sequentially, and entity matching can be performed on each agent based on the above three-level priority matching principle to generate the first score of each candidate agent in the entity matching dimension.

[0029] For example, if a user query is "laptop" (i.e., the entity information in the query text includes "laptop"), the candidate agents include an IT agent and an HR agent. The specified entity information for the IT agent includes "computer," "laptop," and "server"; the specified entity information for the HR agent includes "salary," "social security," and "leave." For the IT agent, "laptop" is an exact match with "laptop" in the specified entity information, scoring 1.0. For the HR agent, "laptop" does not have an exact match or containment match with its specified entity information, and its score is 0.1 after semantic matching. It is evident that the IT agent achieves a significantly higher first score in the entity matching dimension. If the user query is "computer," the IT agent's exact match score for "computer" is 1.0, while the HR agent's score remains 0.1, the result being the same. If the user query is "laptop," the IT agent's specified entity information does not contain "laptop," but it does contain "laptop," satisfying containment matching, resulting in an IT agent score of 0.7, while the HR agent's score remains 0.1 for semantic matching.

[0030] Step 103: Match the action intent information with the specified action information of each candidate agent to generate a second score for each candidate agent in the action matching dimension.

[0031] In this embodiment of the application, for each candidate agent, its specified action information can be matched with the action intent information obtained from the text to be queried to generate a second score for each candidate agent in the action matching dimension.

[0032] In some embodiments, unlike entity matching, action intent matching may not employ semantic matching as a fallback strategy, but instead relies solely on a two-tier priority system of exact matching and inclusion matching. This is because action intent vocabularies are limited and semantic boundaries are clear. For example, "application" and "approval" are related but have opposite operational directions. Introducing semantic matching might lead to incorrect matching of similar but different action intents, resulting in routing decision errors. Specifically, when matching action intent information extracted from the query text with specified action information of candidate agents: if they are exact matches, a matching score of 1.0 is returned; if they have an inclusion relationship (i.e., one action information is a subset of the other), a matching score of 0.7 is returned; if they have neither exact nor inclusion matching, a matching score of 0 is returned.

[0033] For example, a user query is "I want to apply for a new computer," and the action intent information extracted from the query text is "apply." The specified action information for the HR agent includes "apply," "reimbursement," "query," and "onboarding," while the specified action information for the IT agent includes "repair," "configure," and "install." For the HR agent, "apply" is an exact match with its specified action information, scoring 1.0; for the IT agent, "apply" has neither an exact match nor a containment match with its specified action information, scoring 0. Similarly, a user query is "apply for reimbursement," and the extracted action intent information is "reimbursement." The HR agent also precisely matches "reimbursement," scoring 1.0, ensuring that reimbursement requests are not routed to the IT agent. Furthermore, a user query is "help me install the printer driver," and the action intent information is "install." The IT agent precisely matches "install," scoring 1.0.

[0034] Step 104: Based on the first score and the second score, generate the target score for each candidate agent.

[0035] In this embodiment, after obtaining the first score for each candidate agent in the entity matching dimension and the second score in the action matching dimension, the first and second scores can be fused to generate the target score for each candidate agent. Specifically, for each candidate agent, the first score generated in step 102 and the second score generated in step 103 can be obtained separately, and then fused according to a preset fusion strategy to obtain the target score for the candidate agent. The target score can be used to measure the overall matching degree of the candidate agent in handling the current user query; the higher the target score, the better the candidate agent matches the current user query.

[0036] For example, for a candidate agent with a first score of 0.85 and a second score of 0.60, the system merges these two scores to generate the target score for the candidate agent. For another candidate agent with a first score of 0.30 and a second score of 0.90, the system similarly merges the first and second scores to generate the target score for the candidate agent.

[0037] It should be noted that the specific implementation method for fusing the first score and the second score can be flexibly configured according to the actual application scenario, such as using weighted summation, weighted average or other fusion strategies. This application embodiment does not limit this.

[0038] Step 105: Based on the target scores of each candidate agent, determine the target agent from the plurality of candidate agents.

[0039] In this embodiment, after obtaining the target scores of each candidate agent, the system can determine the target agent from multiple candidate agents based on their target scores. Specifically, for each candidate agent, its target score is used to characterize the overall matching degree of the candidate agent in processing the current user query. The system sorts the candidate agents according to their target scores and determines the target agent based on the sorting results.

[0040] For example, given three candidate agents with target scores of 0.85, 0.62, and 0.33, where the highest target score is 0.85, the system identifies the candidate agent with the target score of 0.85 as the target agent. The target scores can be ranked from highest to lowest; the candidate agent with the highest target score indicates the highest overall match with the current user's query and is therefore the most suitable for processing that query.

[0041] Step 106: The text to be queried is routed to the target agent.

[0042] In this embodiment of the application, after determining the target intelligent agent, the system sends the text to be queried (i.e. the natural language query entered by the user) to the target intelligent agent, which then responds to or processes the text to be queried.

[0043] For example, when a user queries "Apply for a new computer," if the target agent is an HR agent, the system routes the query to the HR agent, which then handles the subsequent application process, such as guiding the user to fill out an asset application form and navigate the approval process. When a user queries "What should I do if my computer crashes with a blue screen?", if the target agent is an IT agent, the system routes the query to the IT agent, which then handles the subsequent troubleshooting and repair processes, such as providing diagnostic scripts, remote assistance, or dispatching repair orders.

[0044] For example, when a user queries "Please check my expense reimbursement progress from last month", if the target agent is the HR agent, the system will route the query to the HR agent, which will then check the reimbursement status and provide feedback to the user. When a user queries "Server CPU usage is too high", if the target agent is the IT agent, the system will route the query to the IT agent, which will then perform monitoring, diagnosis, and resource scheduling.

[0045] In this embodiment, the system first acquires entity information, action intent information, and multiple candidate agents from the text to be queried, with each candidate agent having pre-defined entity information and action information. Then, the entity information is matched with the specified entity information of each candidate agent to generate a first score, and the action intent information is matched with the specified action information of each candidate agent to generate a second score. Next, a target score is generated for each candidate agent based on the first and second scores. Then, a target agent is determined based on the target score. Finally, the text to be queried is routed to the target agent. Since the first score measures the degree of matching between each candidate agent and the text to be queried at the subject level, and the second score measures the degree of matching between each candidate agent and the text to be queried at the action intent level, by combining the first and second scores into a target score, the routing decision can simultaneously consider the matching at both the subject and action intent levels. This allows requests with the same subject but different action intents to be effectively distinguished, overcoming the shortcomings of related technologies that fail to distinguish between requests with the same subject but different action intents because they treat user queries as a whole for intent recognition, thus effectively improving the routing accuracy of multi-agent systems.

[0046] In some embodiments, the entity information includes a business object entity and an auxiliary context entity; the business object entity is the target object pointed to by the query text, and the auxiliary context entity is an associated entity used to modify the business object entity; such as Figure 2 As shown, step 102 may further include steps 1021 to 1023: Step 1021: Match each entity in the entity information with the specified entity information of each candidate agent to obtain the matching results of each entity and each candidate agent.

[0047] It's important to note that a business object entity is the target object referenced by the query text; that is, the core business objective or object referred to in the user's natural language query. The business object entity determines the primary business domain to which this query belongs. For example, in the query "I want to reimburse last month's travel expenses," "travel expenses" is the core business object entity, belonging to the finance / HR domain. Business object entities are typically noun expressions, such as "computer," "salary," or "VPN," possessing clear business affiliation attributes. The role of the business object entity is to serve as a crucial basis for routing decisions, ensuring that the system can correctly identify the core business scope involved in this query.

[0048] It's important to note that auxiliary contextual entities are related entities used to modify business object entities; that is, they modify or supplement the description of the business object entity, providing richer contextual information. For example, in the query "Please query Zhang San's laptop repair records," the business object entity is "laptop," and "Zhang San" is the auxiliary contextual entity. "Zhang San" specifies the ownership of the business object entity, limiting it to the owner of the laptop. The role of auxiliary contextual entities is to enhance the accuracy and completeness of semantic understanding, especially when multiple agents give similar ratings to the same business object entity, serving as a distinguishing criterion.

[0049] In this embodiment, after obtaining the entity information (including business object entities and auxiliary context entities) in the text to be queried, the system matches each entity in the entity information with the specified entity information of each candidate intelligent agent to determine the degree of matching between each entity and each candidate intelligent agent at the entity level. Specifically, for each entity in the entity information, the system matches it with the specified entity information of each candidate intelligent agent to obtain the matching results between each entity and each candidate intelligent agent.

[0050] For example, if the entity information includes two entities (such as the business object entity "laptop" and the auxiliary context entity "Zhang San"), and the candidate agents include an IT agent and an HR agent, then the system will match "laptop" with the specified entity information of the IT agent, match "laptop" with the specified entity information of the HR agent, match "Zhang San" with the specified entity information of the IT agent, and match "Zhang San" with the specified entity information of the HR agent, resulting in four independent matching results. Each matching result is used to characterize the degree of matching between the corresponding entity and the candidate agent at the entity level.

[0051] Step 1022: For each candidate agent, perform square root decay processing on the sum of matching results corresponding to the business object entity to generate a business object entity score; and perform square root decay processing on the sum of matching results corresponding to the auxiliary context entity to generate an auxiliary context entity score.

[0052] In this embodiment, after obtaining the matching results between each entity and each candidate agent, the system performs square root decay processing on the matching results corresponding to the business object entity and the matching results corresponding to the auxiliary context entity for each candidate agent, generating a business object entity score and an auxiliary context entity score for that candidate agent. Specifically, for each candidate agent, the system obtains the matching results of all business object entities under that candidate agent, sums these matching results, and divides the sum by the square root of the number of business object entities to generate the business object entity score for that candidate agent; simultaneously, the system obtains the matching results of all auxiliary context entities under that candidate agent, sums these matching results, and divides the sum by the square root of the number of auxiliary context entities to generate the auxiliary context entity score for that candidate agent.

[0053] For example, the entity information includes two business object entities (such as "computer" and "printer") and two auxiliary context entities (such as "Zhang San" and "R&D Center"), and the candidate intelligent agent includes an IT intelligent agent. The system matches each of the four entities with the specified entity information of the IT intelligent agent, obtaining four matching results. The matching results for the two business object entities are summed and divided by the square root of 2 to obtain the business object entity score; the matching results for the two auxiliary context entities are summed and divided by the square root of 2 to obtain the auxiliary context entity score.

[0054] It should be noted that the embodiments of this application perform square root decay processing by dividing the sum of multiple matching results of the same type (business object entity or auxiliary context entity) by the square root of the number of entities of that type. This ensures that when the number of entities of that type is single, the matching result remains unchanged without any decay; when the number of entities of that type is multiple, the sum of the matching results is appropriately compressed. Compared to directly summing the matching results (which results in higher scores with more entities, easily leading to inflated scores) or simple averaging (which actually lowers the score with more entities, failing to reflect the information of multiple entities), square root decay processing can suppress the inflated scores caused by the expansion of the number of entities while preserving the amount of information of multiple entities. It reasonably reflects that more matching entities do indeed provide more information. That is, the total score increases with the increase in the number of entities, but the rate of increase gradually slows down, thus making the entity score more reasonable and stable.

[0055] Step 1023: Based on the business object entity score and the auxiliary context entity score, generate the first score of the candidate agent in the entity matching dimension.

[0056] In some embodiments, after generating the business object entity score and auxiliary context entity score for each candidate agent, the system fuses the business object entity score and auxiliary context entity score for each candidate agent to generate a first score for that candidate agent in the entity matching dimension. Specifically, for each candidate agent, the system obtains the business object entity score and auxiliary context entity score of that candidate agent, and processes them according to a preset fusion strategy to obtain the first score of that candidate agent. The first score can comprehensively measure the overall matching degree between the specified entity information of the candidate agent and the entity information in the query text at the entity level.

[0057] For example, for a candidate agent, its business object entity score is 0.90 and its auxiliary context entity score is 0.60. The system merges these two scores to generate the candidate agent's first score. For another candidate agent, its business object entity score is 0.30 and its auxiliary context entity score is 0.80. The system similarly merges these two scores to generate the candidate agent's first score.

[0058] It's important to note that the business object entity is the core target object pointed to by the query text, serving as the primary basis for determining which business domain the query belongs to. The auxiliary context entity, on the other hand, is a related entity that modifies or supplements the business object entity, playing a supporting reference role. Based on the difference in importance between business object entities and auxiliary context entities in routing decisions, the contribution of the business object entity score should be higher than that of the auxiliary context entity score during fusion. This ensures that routing decisions are primarily driven by the business object entity, with the auxiliary context entity serving as a secondary reference. For example, if one candidate agent scores significantly higher on the business object entity but slightly lower on the auxiliary context entity, the former may still receive a higher initial score due to the dominant role of the business object entity score. This reflects the principle of "subject-driven," as the core business object pointed to by the query is the most crucial basis for determining the routing direction.

[0059] It is understood that this embodiment of the application, by distinguishing between business object entities and auxiliary context entities, performing matching processing separately, and then applying square root decay processing to the matching results, can avoid the problem of inflated scores caused by an increase in the number of entities, while retaining the information gain of multi-entity matching. Combining the business object entity score and the auxiliary context entity score, a first score is generated in an asymmetric weighted manner, ensuring that the core business object dominates the scoring direction, preventing modifiers from diluting the core semantic discriminative power, thereby improving the accuracy and robustness of routing decisions.

[0060] In some embodiments, generating the first score of the candidate agent in the entity matching dimension based on the business object entity score and the auxiliary context entity score includes: The business object entity score is weighted and fused with the auxiliary context entity score with a first weight and the auxiliary context entity score with a second weight to obtain the first score of the candidate agent in the entity matching dimension. Wherein, the first weight is greater than the second weight.

[0061] In this embodiment, after generating the business object entity score and auxiliary context entity score for each candidate agent, the system weights and fuses the business object entity score with a first weight and the auxiliary context entity score with a second weight for each candidate agent to generate a first score for that candidate agent in the entity matching dimension. The first weight is greater than the second weight. Specifically, for each candidate agent, the system obtains the business object entity score and auxiliary context entity score of that candidate agent and generates the first score for that candidate agent as follows: multiply the business object entity score by the first weight, multiply the auxiliary context entity score by the second weight, and then add the two together to obtain the first score for that candidate agent. The first weight controls the proportion of the business object entity score in the first score, and the second weight controls the proportion of the auxiliary context entity score in the first score.

[0062] For example, assuming the first weight is 1.0 and the second weight is 0.3, for the IT agent, its business object entity score is 0.90 and its auxiliary context entity score is 0.60, so its first score is: 1.0 × 0.90 + 0.3 × 0.60 = 0.90 + 0.18 = 1.08. For the HR agent, its business object entity score is 0.30 and its auxiliary context entity score is 0.80, so its first score is: 1.0 × 0.30 + 0.3 × 0.80 = 0.30 + 0.24 = 0.54. It can be seen that although the HR agent scores higher than the IT agent in auxiliary context entity score, because the IT agent scores significantly higher than the HR agent in business object entity score, and the first weight corresponding to the business object entity score is greater than the second weight corresponding to the auxiliary context entity score, the IT agent's first score is still higher than the HR agent's, reflecting the dominant role of business object entities in routing decisions.

[0063] It is understood that, by setting the first weight corresponding to the business object entity score to be greater than the second weight corresponding to the auxiliary context entity score, the matching situation of the business object entity plays a dominant role in the first score, while the matching situation of the auxiliary context entity only plays an auxiliary reference role. This makes the routing decision take the business object pointed to by the user query as the primary basis, while taking into account the influence of auxiliary context information, thereby improving the accuracy and rationality of the first score of each candidate agent in the entity matching dimension.

[0064] In some embodiments, each candidate agent is further pre-defined with negative constraint words, which are words that the candidate agent cannot process; such as Figure 3 As shown, prior to step 102, the method further includes steps 107 to 109: Step 107: Obtain the constraints in the text to be queried.

[0065] It's important to note that negative constraint words refer to a pre-defined set of prohibited words for each candidate agent, used to explicitly define words that the candidate agent cannot process. Negative constraint words are typically related to the business domain boundaries of the candidate agent. For example, negative constraint words for an IT-domain candidate agent might include HR-domain terms such as "reimbursement," "leave request," and "salary," while negative constraint words for an HR-domain candidate agent might include IT-domain terms such as "VPN" and "network failure." The purpose of negative constraint words is to achieve rigid isolation of domain boundaries, preventing candidate agents from responding to requests outside their scope of responsibility, thereby improving the accuracy and security of routing decisions.

[0066] In this embodiment, the system can extract constraints from the text to be queried. Constraints refer to information in the text to be queried that limits the scope, time, attributes, affiliation, etc. of business objects, and can be expressed as time words, location words, attribute words, or limiting phrases, etc.

[0067] For example, in the query text "Please check Zhang San's expense reports from last month," "last month" is the constraint, limiting the time frame of the expense reports. Another example is "Request a laptop with more than 16GB of memory," where "more than 16GB of memory" is the constraint, limiting the laptop's hardware configuration. Yet another example is "The server in R&D Center C needs repair," where "R&D Center C" is the constraint, limiting the server's location.

[0068] Step 108: Match the text to be queried, the business object entity, and the constraint conditions with the negative constraint words of each candidate agent.

[0069] In this embodiment, after obtaining the query text, business object entity, and constraints, the system uses the union of these three as a check domain. This check domain is then matched against the negative constraint words of each candidate agent to identify which candidate agents should be removed due to matching negative constraint words. Specifically, for each candidate agent, the system matches its negative constraint words against the union of the vocabulary set of the query text, the business object entity, and the constraints.

[0070] Step 109: If at least one of the query text, the business object entity, and the constraint condition matches a negative constraint word of the target candidate agent in each candidate agent, the target candidate agent is removed from the plurality of candidate agents.

[0071] In this embodiment of the application, if at least one word in the vocabulary set of the text to be queried matches the negative constraint word of the candidate agent, or the business object entity matches the negative constraint word of the candidate agent, or the constraint condition matches the negative constraint word of the candidate agent, then it is determined that the candidate agent should not process the query, and it is removed from the candidate agents.

[0072] It should be noted that when at least one of the three elements—the query text, the business object entity, and the constraint condition—matches a negative constraint term of a candidate agent, it indicates that the query involves words that the agent cannot process, and that the agent is not suitable to respond to the current query.

[0073] For example, negative constraint terms for the IT agent include "reimbursement," "leave," "onboarding," and "salary." If a user query is "I want to reimburse last month's travel expenses," the business object entity in the query text is "travel expenses," and the constraint condition is "last month." The system matches the query text, the business object entity "travel expenses," and the constraint condition "last month" with the negative constraint terms of the IT agent. Since "reimbursement" in the query text matches the negative constraint term "reimbursement" in the IT agent, the IT agent is deemed unsuitable for processing this query and is removed from the list of candidate agents.

[0074] It should be noted that negative constraint word matching is a pre-filtering mechanism used to remove obviously unsuitable candidate agents before scoring, so as to avoid wasting computing resources in subsequent scoring.

[0075] It is understood that by introducing a negative constraint word pre-filtering mechanism before scoring, the system can quickly filter out irrelevant agents in the early stages of routing decision-making. This not only avoids wasting computing resources in subsequent scoring, but also avoids routing queries to agents that do not have processing capabilities, thereby achieving hard isolation of the domain boundary.

[0076] In some embodiments, each candidate agent is further pre-defined with positive constraint words, which are words that the candidate agent can process; such as Figure 4 As shown, step 104 may further include steps 1041 to 1044: Step 1041: Obtain the constraints in the text to be queried.

[0077] It's important to note that positive constraint words refer to a pre-configured set of words for each candidate agent. This set of words represents words that the candidate agent is proficient in or can effectively process. For example, positive constraint words for an HR candidate agent might include "social security," "housing provident fund," "salary," "leave," and "onboarding"; positive constraint words for an IT candidate agent might include "VPN," "password reset," "network connection," and "system failure." The role of positive constraint words is to enhance the candidate agent's confidence in matching a specific query. When the query text matches a positive constraint word, the system can award additional incentive points, thereby improving the candidate agent's final fit. Positive and negative constraint words together constitute a bidirectional hard constraint gating mechanism, achieving a unified framework for rigid isolation of domain boundaries and feature enhancement.

[0078] In this embodiment, the system can extract constraints from the text to be queried. Constraints refer to information in the text to be queried that limits the scope, time, attributes, and affiliation of a business object, and can be expressed as time words, location words, attribute words, or limiting phrases. For example, if the text to be queried is "Please check Zhang San's expense report from last month," then "last month" is the constraint, used to limit the time range of the expense report.

[0079] Step 1042: Match the text to be queried, the business object entity, and the constraint condition with the positive constraint words of each candidate agent to obtain the positive hit results of each candidate agent; the positive hit results include the first positive hit result corresponding to the text to be queried, the second positive hit result corresponding to the business object entity, and the third positive hit result corresponding to the constraint condition.

[0080] In this embodiment, the positive hit result is a quantitative evaluation of the matching of the query content with the positive constraint words of the candidate intelligent agent at three different granularity levels (original text layer, entity layer, and constraint layer). The first positive hit result reflects the degree of matching between the query text and the positive constraint words. For example, if the query text includes "social security" and the positive constraint words of the HR candidate intelligent agent also include "social security", it is counted as a hit. The second positive hit result reflects the degree of matching between the structured extracted business object entities and the positive constraint words. For example, if "travel expenses" is extracted as a business object entity and the positive constraint words of the HR candidate intelligent agent include words related to "travel expenses", it is counted as a hit. The third positive hit result reflects the degree of matching between the constraint conditions and the positive constraint words. For example, if "last month" is extracted as a constraint condition and the positive constraint words of the HR candidate intelligent agent include "historical records" or "time range", it is counted as a hit.

[0081] Step 1043: Based on the positive hit results, generate target incentive scores for each candidate agent.

[0082] In this embodiment, the target incentive score is an additional bonus calculated based on positive hit results, used to reinforce the preference for candidate agents with strong supporting signals. The target incentive score consists of three parts: the query text hit reward, the business object entity hit reward, and the constraint condition hit reward. Each part can be weighted and accumulated according to the number of hits and the set reward coefficient, and is ultimately controlled by the truncation control of the total enhancement score upper limit.

[0083] Step 1044: Based on the first score, the second score, and the target incentive score, generate the target score for each candidate agent.

[0084] In this embodiment, the first score, the second score, and the target incentive score can be fused (e.g., by performing a weighted linear combination) to obtain the target score for each candidate agent. This ternary composite scoring mechanism ensures the orthogonality and completeness of the scoring dimensions.

[0085] It is understood that the embodiments of this application introduce a positive constraint word enhancement mechanism to provide hierarchical incentives and scores for the matching of query content with positive constraint words at the original text layer, entity layer, and constraint layer. This can enable agents that match positive constraint words in multiple dimensions to obtain higher comprehensive scores without changing the basic matching scores of each candidate agent. This will more accurately highlight agents that are highly relevant to the current query and improve the discriminability and accuracy of routing decisions.

[0086] In some embodiments, generating target incentive scores for each candidate agent based on the positive hit results includes: For each candidate agent, if it is determined that at least one word in the text to be queried hits the positive constraint word based on the first positive hit result of the candidate agent, the specified value is used as the first incentive score of the candidate agent. Based on the second positive hit result of the candidate agent, a first number of positive constraint words are determined in the business object entity, and the smaller value between the first number and the first specified upper limit value is used as the second incentive score of the candidate agent. Based on the third positive hit result of the candidate agent, a second number of positive constraint words that are hit in the constraint condition is determined, and the smaller value between the second number and the second specified upper limit value is used as the third incentive score of the candidate agent. Based on the first incentive score, the second incentive score, and the third incentive score, a target incentive score is generated for the candidate agent.

[0087] In this embodiment of the application, after obtaining the positive hit results of each candidate agent, the system generates a first incentive score, a second incentive score, and a third incentive score for each candidate agent based on its first positive hit result, a second positive hit result, and a third positive hit result, and generates a target incentive score for the candidate agent based on the three scores.

[0088] Specifically, for each candidate agent, the system first determines whether there is at least one word in the query text that matches the positive constraint word of the candidate agent, based on the first positive hit result of the candidate agent. If so, a specified value is used as the first incentive score for the candidate agent; otherwise, the first incentive score is zero. In this way, once the query text matches a positive constraint word, it receives a fixed incentive score, reflecting the direct correlation between the user's original query and the agent's capabilities. The system also determines the first number of positive constraint words in the business object entity that match the candidate agent based on the second positive hit result of the candidate agent, and uses the smaller of this first number and a first specified upper limit value as the second incentive score for the candidate agent. By introducing the first specified upper limit value, the system avoids inflated incentive scores due to an excessive number of matched words in the business object entity. Finally, the system determines the second number of positive constraint words in the constraint conditions that match the candidate agent based on the third positive hit result of the candidate agent, and uses the smaller of this second number and a second specified upper limit value as the third incentive score for the candidate agent. Similarly, by introducing a second specified upper limit, the system can avoid inflated incentive scores due to an excessive number of hit words in the constraints. After obtaining the first, second, and third incentive scores, the system generates the target incentive score for the candidate agent based on these three scores.

[0089] For example, for a candidate agent (such as an HR agent), its positive constraint terms include "salary," "social security," "housing provident fund," "leave," "onboarding," and "annual leave." If the query text is "Please check Zhang San's salary and social security," and the query text contains "salary," which matches a positive constraint term, the first incentive score is a specified value (e.g., 1). If the business object entities are "salary" and "social security," the first number of matches is 2, and the first specified upper limit is assumed to be 2. The smaller value of 2 is taken as the second incentive score. If there are no matches in the constraint conditions, the second number is 0, and the second incentive score is also 0. Subsequently, the system generates the target incentive score for the candidate agent based on the first, second, and third incentive scores. Through this hierarchical incentive method, the system can comprehensively evaluate the positive matching degree between the query content and the candidate agent from three dimensions: the original text layer, the entity layer, and the constraint layer.

[0090] It should be noted that the specified value, the first specified upper limit value and the second specified upper limit value in the embodiments of this application can be set according to actual needs, and the embodiments of this application do not limit this.

[0091] It is understood that the embodiments of this application design incentive scoring items in a hierarchical manner, corresponding to the positive hit situation at three levels: original text, entity, and constraint conditions. This enables the target incentive score to comprehensively reflect the matching degree between the candidate agent and the current query from different levels, and adopts an upper limit truncation strategy to prevent incentive score overflow, thus ensuring that the incentive score is reasonable and controllable.

[0092] In some embodiments, generating a target incentive score for the candidate agent based on the first incentive score, the second incentive score, and the third incentive score includes: The first incentive score, the second incentive score, and the third incentive score are weighted and summed to obtain the fourth incentive score. The smaller of the fourth incentive score and the third specified upper limit value is used as the target incentive score for the candidate agent.

[0093] In this embodiment, after obtaining the first, second, and third incentive scores for each candidate agent, the system performs a weighted summation of the three scores to obtain a fourth incentive score. The smaller of the fourth incentive score and a third specified upper limit is then used as the target incentive score for that candidate agent. Specifically, for each candidate agent, the system performs a weighted summation of its first, second, and third incentive scores according to preset weights to obtain a preliminary incentive score (i.e., the fourth incentive score). This fourth incentive score is then compared with a third specified upper limit, and the smaller of the two is taken as the target incentive score for that candidate agent. In this way, the target incentive score will not exceed the third specified upper limit, thereby avoiding an excessive influence on the basic matching score due to an excessively high incentive score.

[0094] For example, if a candidate agent has a first incentive score of 1, a second incentive score of 2, and a third incentive score of 1, and assuming the weights of the first, second, and third incentive scores are 0.5, 0.3, and 0.2 respectively, then the fourth incentive score is 1×0.5 + 2×0.3 + 1×0.2 = 0.5 + 0.6 + 0.2 = 1.3. If the upper limit of the third incentive score is 3, then the target incentive score is min(1.3,3) = 1.3; if the upper limit of the third incentive score is 1, then the target incentive score is min(1.3,1) = 1.

[0095] For example, if another candidate agent has a first incentive score of 1, a second incentive score of 0, and a third incentive score of 0, then the fourth incentive score is 1×0.5+0×0.3+0×0.2=0.5. If the third incentive score has a specified upper limit of 3, then the target incentive score is min(0.5,3)=0.5.

[0096] It should be noted that the third specified upper limit value and the weights corresponding to each incentive score in this application embodiment can be flexibly configured according to actual application scenarios and business needs, and this application embodiment does not impose specific limitations on this.

[0097] It is understood that the embodiments of this application obtain a fourth incentive score by weighted summation of the first incentive score, the second incentive score, and the third incentive score. This allows control over the influence of the original text layer, the entity layer, and the constraint layer on the target incentive score, making the target incentive score more consistent with actual application scenarios. Moreover, by introducing a third specified upper limit value to truncate the weighted summation result, the influence of the positive constraint word enhancement mechanism on the basic matching score can be effectively controlled, avoiding an abnormally high incentive score due to a candidate agent hitting too many positive constraint words, thereby maintaining the stability and reliability of routing decisions.

[0098] In some embodiments, generating a target score for each candidate agent based on the first score, the second score, and the target incentive score includes: For each candidate agent, the first score is weighted and summed with the third weight and the second score with the fourth weight, and then added to the target incentive score to generate the target score of the candidate agent. The third weight is greater than the fourth weight.

[0099] In this embodiment, after obtaining the first score, second score, and target incentive score for each candidate agent, the system, for each candidate agent, weights and sums the first score with a third weight and the second score with a fourth weight, and then adds this sum to the target incentive score to generate the target score for that candidate agent. The third weight is greater than the fourth weight. Specifically, for each candidate agent, the system multiplies the first score by the third weight, multiplies the second score by the fourth weight, adds these two sums, and then adds the target incentive score to obtain the target score for that candidate agent.

[0100] For example, suppose the third weight is 0.7 and the fourth weight is 0.3. For a candidate agent, its first score is 0.85, its second score is 0.60, and its target incentive score is 0.15. Then the target score is 0.7×0.85+0.3×0.60+0.15=0.595+0.18+0.15=0.925. For another candidate agent, its first score is 0.40, its second score is 0.90, and its target incentive score is 0.05. Then the target score is 0.7×0.40+0.3×0.90+0.05=0.28+0.27+0.05=0.60.

[0101] It should be noted that the third and fourth weights in this application embodiment can be flexibly configured according to actual application scenarios and business needs. This application embodiment does not impose specific limitations on this, as long as the third weight is greater than the fourth weight. Since the third weight is greater than the fourth weight, the contribution of the first score (entity matching dimension) to the target score is higher than that of the second score (action matching dimension), reflecting the "subject-driven" design principle. The core business object pointed to by the user query is the primary basis for routing decisions, while the action intent serves as a secondary reference. The target incentive score, as a bonus item, is used to incentivize candidate agents that perform well in positive constraint word matching, enabling agents that match the current query in multiple dimensions to obtain higher target scores, thereby improving the accuracy and discriminativeness of routing decisions.

[0102] In some embodiments, the method further includes: If it is determined that the entity information does not include any entity, the designated fallback agent will be identified as the target agent.

[0103] In this embodiment, after obtaining entity information from the text to be queried, the system can first determine whether the entity information includes any entity. If the entity information does not include any entity (i.e., both the business object entity and the auxiliary context entity are empty), the designated fallback agent is directly identified as the target agent, and the text to be queried is routed to the fallback agent for processing, without performing subsequent matching, scoring, or other steps.

[0104] For example, if the user enters "Hello" as the query text, and the query does not include any business object entity (such as "computer") or auxiliary context entity (such as "Zhang San"), the system determines that the entity information is empty and directly identifies the preset fallback agent as the target agent, which then responds.

[0105] For example, if the text to be queried is "How is the weather today?", which does not include any business object entities or auxiliary context entities, the system will directly identify the specified fallback agent as the target agent, thus avoiding invalid calculations for queries without entities in subsequent steps.

[0106] It should be noted that the designated fallback agent refers to a pre-defined general-purpose agent in a multi-agent system, used as a fallback solution when specialized agents cannot provide reliable responses. The designated fallback agent possesses general question-answering, basic task processing, or user guidance capabilities, such as a general question-answering agent. There is a complementary relationship between the designated fallback agent and candidate agents: candidate agents are responsible for precise routing in specific domains, while the designated fallback agent provides backup support; together, they constitute a complete routing system.

[0107] It is understood that in this embodiment of the application, when the text to be queried does not contain any entity, the system can terminate the subsequent calculation process in advance and directly route the query to the designated fallback agent for processing, thereby avoiding the risk of invalid calculation and no response.

[0108] In some embodiments, the method further includes: The designated fallback agent will be identified as the target agent if any of the following conditions are met: The conditions include: All of the candidate agents were removed; Among the plurality of candidate agents, there are candidate agents that have not been removed, and the target score of each of the candidate agents that have not been removed is lower than a first specified threshold. The designated fallback agent's second score in the action matching dimension is greater than or equal to the second designated threshold, and the designated fallback agent's target score is greater than or equal to the third designated threshold.

[0109] In this embodiment of the application, when determining the target intelligent agent, the system will also detect whether any of the following conditions are met. If the conditions are met, the designated fallback intelligent agent will be determined as the target intelligent agent.

[0110] Condition 1: Multiple candidate agents are removed. During the negative constraint filtering phase, if all candidate agents are removed due to matching negative constraint terms, the candidate agent set is empty. In this case, the system will designate a fallback agent as the target agent. For example, if a user query is "company annual meeting expense reimbursement process," and all candidate agents remove "reimbursement" as a negative constraint term, the system will call the fallback agent to respond.

[0111] Condition 2: The target scores of all candidate agents are below a first specified threshold. If there are candidate agents that have not been removed, but the target scores of all of them are below the first specified threshold (e.g., 0.25), it indicates that the matching degree between each candidate agent and the current query is insufficient. In this case, the system will designate a fallback agent as the target agent to avoid routing the query to an agent with an excessively low matching degree, thus preventing erroneous responses. For example, if the user query is "how to improve team collaboration efficiency," and the target scores of all candidate agents are below 0.25, the system will call the fallback agent to respond.

[0112] Condition 3: The fallback agent's second score in the action matching dimension reaches the second specified threshold, and the fallback agent's target score reaches the third specified threshold. Even if there are candidate agents that have not been removed and whose target scores are not lower than the first specified threshold, if the designated fallback agent's second score in the action matching dimension is greater than or equal to the second specified threshold (e.g., 0.70), and the designated fallback agent's target score is greater than or equal to the third specified threshold (e.g., 0.30), the system will still identify the designated fallback agent as the target agent. For example, if a user queries "What is artificial intelligence?", although there are candidate agents that have not been removed and whose target scores are not lower than 0.25, if the designated fallback agent's second score in the action matching dimension is 0.85 and its target score is 0.40, the system will call the fallback agent to respond.

[0113] It should be noted that the first specified threshold, the second specified threshold, and the third specified threshold in the embodiments of this application can be flexibly configured according to actual application scenarios and business needs. In some embodiments, the first specified threshold can be 0.25, the second specified threshold can be 0.70, and the third specified threshold can be 0.30. Those skilled in the art will understand that the above values ​​are merely illustrative and do not constitute a limitation on the embodiments of this application.

[0114] It is understood that the embodiments of this application adopt a three-stage adaptive fallback decision-making mechanism, that is, in three scenarios, all candidate agents are removed, the matching degree of candidate agents is generally insufficient, or the fallback agent itself has a high matching degree, the decision mechanism of automatically activating the designated fallback agent as the final routing target, to ensure that the system can still give a reliable response in various complex or edge scenarios, effectively avoiding system idleness or service interruption caused by the lack of a suitable agent, and improving the robustness of the system and user experience.

[0115] The following examples illustrate possible implementation schemes of the multi-agent routing method described in one or more of the above embodiments.

[0116] This proposal suggests a routing method based on multi-agent intent classification. The idea is to deconstruct natural language queries into five slots of structured semantics, then use bidirectional hard constraint gating to rigidly isolate domain boundaries and enhance features, and then combine a ternary composite scoring model for multi-dimensional adaptive quantification and ranking. Finally, a three-stage adaptive fallback decision ensures that the scheme has a reasonable response under any input.

[0117] For example, Figure 5 This is the fifth flowchart illustrating a multi-agent routing method provided in this application embodiment; as shown... Figure 5 As shown, the method mainly includes steps S1 to S7: Step S1, Five-slot Semantic Deconstruction. Receive the user's natural language query and map it through a large language model into an ordered, structured five-tuple representation of candidate agents, including action intent, core business object entities, auxiliary context entities, constraints, and recommendations.

[0118] Assume the user query is natural language text. Define semantic destructuring operators Through large language models The mapping is represented as an ordered structured quintuple, as shown in equation (1): (1) The definitions of each symbol are shown in Table 1.

[0119] Table 1

[0120] In a five-slot structure, separating Action and Subject is key to resolving routing confusion caused by different actions with the same subject. For example, when querying "I want to apply for a new computer" and "My computer is broken and needs repair," both have "computer" as the Subject, but the Actions are "apply" and "repair" respectively, corresponding to completely different business domains ("human resources" and "IT support").

[0121] This scheme also includes an early termination condition: if S = And C= If the deconstruction result does not contain any valid entities (i.e., business object entities and auxiliary context entities), then the preset fallback agent is returned directly. This terminates subsequent calculations and avoids invalid operations.

[0122] For example: User query =“I would like to claim reimbursement for last month’s travel expenses” Verification: Action="Reimbursement" is the action intent; Subject="{"Travel Expenses"} is the core business object, determining that this query belongs to the finance / HR domain; Context="{"Last Month"} is the constraint condition (time-modified context).

[0123] For example: user query ="Help me reset my VPN login password". Verification: Action="Reset"; Subject="VPN"} is the core business object, belonging to the IT field; Context="Login Password"} is an auxiliary modifier.

[0124] For example: user query ="Help me write an article about AI" Verification: Action="Write" is a general action; Subject="Article"} is a general object that does not belong to any professional field and should be handled by a general fallback agent.

[0125] Step S2, pre-filtering of negative constraints. For each candidate agent, check whether the query content matches the negative constraint words pre-configured for that agent; if it does, immediately exclude that agent and skip subsequent scoring calculations.

[0126] Let candidate agents be defined. The configured negative constraint term set is (For example, the negative constraint term set for an IT agent is {"reimbursement", "leave", "onboarding", "salary"}), and the check domain is defined as the original query text. Business object entity With constraints Union of: .

[0127] The negative constraint filtering function is defined as shown in equation (2): (2) in, For indicator functions, The set of words to query the original text.

[0128] For example, searching for "I want to claim reimbursement for last month's travel expenses". Negative constraint term set for IT intelligent agents ,but (IT agents are excluded). Negative constraint term set for HR agents. ,but (The HR agent passes the initial screening and proceeds to the scoring process.) For example, a query like "Help me write a piece of Python code"... . (The HR agent is excluded).

[0129] Step S3, Entity Scoring. For candidate agents that have passed the negative constraint pre-filtering, the entity score in the entity matching dimension is calculated using asymmetric weighting, with the core business object entity as the main factor and the auxiliary context entity as the auxiliary factor (i.e., the first score in the above embodiment).

[0130] The goal of this step is to quantify the semantic matching degree between the business object entities and auxiliary context entities in the query and the pre-registered entity sets of each candidate agent. This scheme designs two mechanisms: three-level priority matching and asymmetric weight fusion.

[0131] Let candidate agents be defined. Having a pre-registered entity set Define a single entity in the query. With entity set The three-level matching similarity function between them is shown in equation (3): (3) in, Indicates exact equality comparison of strings; This indicates a substring inclusion relationship, meaning that one string is a continuous subsequence of another string; The cosine similarity between text embedding vectors is calculated as shown in Equation (4); This is a semantic matching weighting coefficient (e.g., 0.95), used to penalize the uncertainty of pure semantic guessing.

[0132] (4) Through three-level priority matching, deterministic matching (precise matching) is achieved. and contain Semantic similarity (Embedding) always takes precedence over probabilistic matching. Weighting coefficient. This ensures that even if the semantic similarity reaches the maximum value of 1.0, the score of the third-level matching (0.95) is still lower than that of the first level (1.0) and the second level (the upper limit case of 0.7), thus guaranteeing the predictability of the scheme and the principle of prioritizing deterministic behavior.

[0133] For example, suppose there is a pre-registered entity set for IT intelligent agents. If querying entity =“VPN”, then If querying entity ="password", then If querying entity ="Network connection", then Assuming ,but .

[0134] When a Subject or Context includes multiple entities, the matching scores of multiple individual entities need to be aggregated into a set-level similarity score. For the entity set... The square root decay aggregation strategy is adopted, as shown in equation (5): (5) By using the square root decay aggregation strategy, it is possible to achieve: when , Degenerate into single entity fractions It itself has no attenuation; when hour, The factor, while preserving information from multiple entities, suppresses the artificially inflated scores caused by an overabundance of entities. Compared to simple averaging (… The square root decay is more moderate and can reflect the objective law that "more matching entities do indeed provide more information".

[0135] For example, Subject={“salary”} (single entity), for the HR agent. have .but .

[0136] For example, Subject = {"Salary", "Social Security"} (two entities), assuming... , .but .

[0137] It should be noted that the aggregation score for a perfect match between two entities (1.414) is higher than that for a single entity (1.0), reflecting the information gain from more matching evidence; however, it is not simply a doubling (2.0), which reflects the suppression effect of square root decay.

[0138] In this scheme, an asymmetric weighted fusion mechanism based on Subject-Context is designed. Candidate agents are defined. Weighted entity scoring. When merging the contributions of Subject and Context, Subject takes the lead (e.g., weighting). ), Context as an auxiliary (such as weights) ), to achieve asymmetric weighting (i.e. Greater than , Corresponding to the first weight in the above embodiments, The second weight corresponding to the above embodiment is calculated as shown in equation (6): (6) Through an asymmetric weighted fusion mechanism, due to Greater than This relationship ensures that the core business object (Subject) always dominates the scoring direction. The auxiliary context (Context) is only used in boundary scenarios. That is, when two agents score similarly on the same Subject, it provides auxiliary discrimination. The three-branch processing in Equation (6) guarantees the robustness of scoring under the absence of any entity slot: when there is only Subject, it is not affected by the absence of Context; when there is only Context, the weighting process prevents the modifiers from dominating excessively; when both coexist, the weighted fusion makes full use of all information.

[0139] For example, a query like "Please help me find the VPN login password" would have Subject={"VPN"} and Context={"login password"}. This applies to IT agents. : (Exact match) (If "login password" is included in the "password reset" class entity, then...) For HR intelligent agents (Assuming that neither "VPN" nor "login password" has an exact / inclusive match). , ,but .

[0140] It should be noted that in this example, the entity score of the IT agent (0.931) is much higher than that of the HR agent (0.132), indicating that the accurate matching of the Subject played a decisive role.

[0141] Step S4, Action Intent Scoring. The extracted action intent is matched with the predefined action set of each candidate agent, and the action intent score in the action matching dimension is calculated (i.e., the second score in the above embodiment).

[0142] Let candidate agents be defined. Predefined action set (For example, the action set of the HR agent is {"application", "reimbursement", "query", "onboarding"}), define the action intent extracted from the query quintuple. The action intent matching function for this agent's action set is shown in equation (7): (7) Unlike the entity matching function (Equation 3), the action intent matching function does not have a third level of semantic matching. This is because the vocabulary of action intent is limited and the semantic boundaries are clear (e.g., although "application" and "approval" are related, their operation directions are opposite), and using semantic similarity may introduce incorrect matching.

[0143] For example, Action = "Reimbursement", HR agent action set ,but .

[0144] For example, Action = "Reimbursement", which is an IT intelligent agent action set. ,but .

[0145] For example, Action = "Apply for activation", HR agent action set If it includes "application", then .

[0146] Step S5, positive constraint post-enhancement. Check the match between the query content and the candidate agent's positive constraint word set at multiple levels (original text layer, entity layer, constraint layer), and calculate the positive incentive score (i.e., the target incentive score in the above embodiment).

[0147] Let candidate agents be defined. The configured positive constraint term set is (For example, the positive constraint word set of the HR agent is {"social security", "housing provident fund", "salary", "leave", "onboarding", "workday"}), and the hierarchical incentive scoring function is defined as shown in equation (8): (8) The sub-items are shown in equations (9), (10), and (11), respectively: (9) (10) (11) in, The original text hit reward coefficient; The hit reward coefficient for a single core entity. The upper limit of the core entity hit count (i.e., the first specified upper limit value in the above embodiment); The reward coefficient for a single constraint term hit. The upper limit of the constraint word hit count (i.e., the second specified upper limit value in the above embodiment); The upper limit of the total enhancement score (i.e., the third specified upper limit value in the above embodiments) is set to prevent outliers from disrupting the backbone scoring system.

[0148] It should be noted that post-positive constraint enhancement is applied to entity scoring. and action intention score The base score is calculated and then applied, with additional feature confirmation scores added on top of the base score.

[0149] Understandably, this scheme uses a tiered reward design, with three sub-items corresponding to three different levels of inspection granularity, starting with the original text layer ( Capture direct hits at the word level, entity layer ( Confirm that the core objects extracted from the structured data have been matched, and the constraint layer ( Provide additional supporting evidence using limiting conditions. and The settings prevent score overflow caused by excessive keyword stuffing.

[0150] For example, to query "I want to check my social security and housing provident fund payment records", Subject={"social security", "housing provident fund"}, Constraints= Positive constraint word set for HR agents ,but , 0, , It should be noted that, due to the total upper limit... Limitations, actual enhancement The value was truncated to 0.30, which reflects the role of the overflow prevention mechanism.

[0151] In this scheme, negative constraint filtering and positive constraint enhancement can be unified into a bidirectional gating operator, as shown in equation (12): (12) when When the agent is hard-blocked, it is completely excluded from the candidate set and does not participate in any subsequent calculations; when At this point, the agent enters the scoring process and adds a score on top of the base score. Positive incentive scores.

[0152] Understandably, this scheme introduces a two-way hard constraint gating mechanism, unifying "subtraction" (negative exclusion) and "addition" (positive reinforcement) within the same constraint framework, and applying them to different stages of the scoring process.

[0153] Step S6, Triadic Composite Scoring. The entity score, action intention score, and positive incentive score are weighted and linearly combined, and combined with the negative constraint gating factor to obtain the final adaptation score (i.e., the target score in the above embodiment) for each candidate agent.

[0154] Candidate agents For query The final fit score is calculated as shown in equation (13): (13) in, Rate the entity Rate the intention of the action. To provide positive incentives for scoring, As a negative constraint gating factor, and For weighted weights ( That is, the third weight in the above embodiments, That is, the fourth weight in the above embodiments), satisfying (like , ).

[0155] It should be noted that, The range of values ​​is , hour Reset directly to zero; The range of values ​​is (Assuming here) This can be understood as the entity's affiliation, answering the question "Which domain does it belong to?" The range of values ​​is (Assuming here) This can be understood as the alignment of action intentions, answering "what operation is to be performed"; The range of values ​​is This can be understood as a feature confirmation score, answering the question "Is there a strong signal to corroborate this?" The range of values ​​is , is the final adaptation score.

[0156] It should be noted that, The design ensures that the business object (Subject) is always the most important criterion. Entity attribution answers "which domain the user is talking about," which is the primary basis for routing decisions. Action intent alignment answers "what operation the user wants to perform in this domain," serving as a supplementary correction. Feature confirmation provides additional signal verification. The three dimensions are orthogonally combined to form a complete scoring chain from "semantic understanding → domain delimitation → operation alignment → signal enhancement."

[0157] For example, query =“I want to claim reimbursement for last month’s travel expenses”; First, perform a five-slot deconstruction to obtain Then, perform a negative constraint check on the IT agent: , , (The IT agent is completely excluded, requiring no further computation); simultaneously, a negative constraint check is performed on the HR agent: (Passed, continue the scoring process); Subsequently, calculate the entity score for the HR agent: Subject={“Travel Expenses”}, assuming “Travel Expenses” is an exact match in the HR entity set: , ;Context={"last month"}, assuming "last month" has no match in the HR entity set: ;because and ,but Secondly, calculate the action intention score of the HR agent: (Exact matching); Next, positive reinforcement is applied to the HR agent: assuming the HR positive constraint word set contains words related to "travel expenses", ,but Finally, the final fit score of the HR agent is calculated. It is understandable that the HR agent, with a high score of 1.096, became the best match, while the IT agent, with a score of 0, was completely excluded, indicating that the routing result was correct.

[0158] Step S7, Three-stage adaptive fallback decision. Based on the size of the candidate agents and the final adaptation score distribution, a three-stage strategy is used to determine whether to activate the fallback agent to ensure that any query has a reasonable response path.

[0159] When all specialized agents score low, or are excluded by all negative constraints, or the query itself belongs to the general knowledge domain, a safe and reliable degradation strategy is required.

[0160] Define the following decision variables: Candidate set To ensure the final fit score reaches the confidence threshold A collection of intelligent agents; highest score , is the highest fit score in the candidate set; bottom-line intelligent agent For a pre-defined general fallback agent (such as a general question-answering agent), its original score calculated according to formula (13) is: .

[0161] Adjusted score of the fallback agent Determined according to the three-stage strategy shown in equation (14): (14) The meanings and preferred values ​​of each parameter are shown in Table 2: Table 2

[0162] Three-stage coverage logic: Phase 1 (No backup option): When When this occurs, it indicates that all specialized agents have been excluded by negative constraints or their scores have not reached the threshold. This presents a "total failure" mode, where the fallback agent must achieve a score no lower than [a certain threshold]. The minimum score is forcibly intervened to ensure that user queries receive a response.

[0163] Phase Two (Low-Score Enhancement): When the candidate agent set is not empty ( But the highest score Still relatively low ( When the answer is 0, it indicates a state of "half-believing, half-doubting". The fallback agent uses competitive scores... Add supplementary candidates to provide users with alternative solutions. The design reflects the greater urgency of "no candidates" as a fallback option compared to "low-scoring candidates".

[0164] Phase 3 (Strong Action Intent Matching): When the fallback agent's own action intent matching score is high ( And the total score meets the standard. When the query is in the general knowledge domain (e.g., "Help me write an article"), it indicates that the query may belong to the general knowledge domain. In this case, the fallback agent uses its original... Candidates are added naturally without being manually adjusted.

[0165] The fallback decision result (if triggered) is merged into the candidate intelligent agent set and then sorted in descending order. The top K results are output (i.e., Top-K), as shown in Equation (15): (15) in, The fallback agent is not empty when it is triggered, otherwise it is empty. . This represents the maximum number of agents that can be returned.

[0166] For example, a query could be "Please translate this French text for me." Assume that no professional agents (HR, IT, etc.) have registered "translation" or "French" related entities in the entity set, and... HR intelligent agent: Not selected; IT intelligent agent: Not selected; Original score of the bottom-line intelligent agent , That is, the fallback agent became the sole candidate with a score of 0.30.

[0167] For example, searching for "Help me write an article about the development of AI" will yield results. Assume an HR agent. (Selected), but the action set of the fallback agent includes "writing", and the action intention score. ,and , (Candidates are added naturally based on their raw scores). Output ranking: The bottom agent (0.30) is greater than the HR agent (0.22), so the bottom agent ranks first.

[0168] It is understandable that this solution, within a multi-agent collaborative architecture, achieves precise routing of user queries by performing five-slot semantic deconstruction on the query text and applying positive and negative bidirectional constraint processing (i.e., bidirectional hard constraint gating) and a ternary composite scoring. It should be noted that the multi-agent routing system used to implement this solution can include at least the following modules: The semantic deconstruction module receives a natural language query Q, calls a large language model to perform five-slot semantic deconstruction, and outputs a structured quintuple representation. Two-way hard constraint gating module: includes a negative constraint pre-filtering submodule and a positive constraint post-enhancement submodule, which execute hard rule constraints before and after the scoring calculation, respectively; The three-element composite scoring module includes an entity scoring engine and an intent scoring engine, which are used to combine the output of the bidirectional hard constraint gating module to calculate the final adaptation score of the candidate agent. The three-stage adaptive fallback decision module is used to execute a three-stage strategy based on the size of the candidate agents and the final adaptation score distribution to decide whether to introduce a fallback agent. Knowledge graph storage module: Used to maintain a structured knowledge base for each agent, including entity set (i.e., specified entity information), action set (i.e., specified action information), positive constraint word set, and negative constraint word set.

[0169] It is understood that this solution has at least the following beneficial effects: (1) Accurate identification of action intent: The five-slot structure deconstructs and separates the action from the subject, effectively overcoming the routing confusion defect of "requesting a computer" (HR process) and "repairing a computer" (IT process), which have the same subject but different action intents; (2) Hard isolation of domain boundary: The negative constraint pre-filtering mechanism excludes irrelevant agents before the scoring calculation, which not only achieves rigid blocking of domain penetration, but also saves the computing resources for subsequent scoring; (3) Strong anti-interference ability: The asymmetric weight design dominated by the subject ensures that the core business object always dominates the scoring direction, preventing modifiers from diluting the discriminative power of the core semantics; (4) Robustness guarantee of the scheme: The three-stage adaptive fallback decision covers three typical failure modes: "total failure", "half-believing and half-doubting" and "general knowledge attribution", ensuring that the scheme has a reasonable response under any input.

[0170] (5) Explainability and verifiability: All scoring steps have clear mathematical formulas and quantifiable intermediate results, supporting manual auditing and automated testing verification.

[0171] It should be noted that although the steps of the method in this application are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps; or steps from different embodiments may be combined into a new technical solution.

[0172] Based on the same inventive concept as the foregoing embodiments, this application provides a multi-agent routing device.

[0173] Figure 6 This is a schematic diagram of the structure of a multi-agent routing device provided in an embodiment of this application; as shown... Figure 6 As shown, the multi-agent routing device 600 includes: an acquisition module 610, a matching module 620, a generation module 630, a determination module 640, and a routing module 650; wherein: The acquisition module 610 is used to acquire entity information, action intent information, and multiple candidate intelligent agents in the text to be queried; each candidate intelligent agent is preset with specified entity information and specified action information. The matching module 620 is used to match the entity information with the specified entity information of each candidate agent to generate a first score for each candidate agent in the entity matching dimension; and to match the action intent information with the specified action information of each candidate agent to generate a second score for each candidate agent in the action matching dimension. The generation module 630 is used to generate target scores for each candidate agent based on the first score and the second score; The determination module 640 is used to determine the target agent from the plurality of candidate agents based on the target scores of each candidate agent; The routing module 650 is used to route the text to be queried to the target intelligent agent.

[0174] In some embodiments, the entity information includes a business object entity and an auxiliary context entity; the business object entity is the target object pointed to by the query text, and the auxiliary context entity is an associated entity used to modify the business object entity; the matching module 620 is further configured to: match each entity in the entity information with the specified entity information of each candidate agent to obtain the matching result of each entity with each candidate agent; for each candidate agent, perform square root decay processing on the sum of the matching results corresponding to the business object entity to generate a business object entity score; and perform square root decay processing on the sum of the matching results corresponding to the auxiliary context entity to generate an auxiliary context entity score; and generate the first score of the candidate agent in the entity matching dimension based on the business object entity score and the auxiliary context entity score.

[0175] In some embodiments, the matching module 620 is further configured to: weight and fuse the business object entity score with a first weight and the auxiliary context entity score with a second weight to obtain the first score of the candidate agent in the entity matching dimension; wherein the first weight is greater than the second weight.

[0176] In some embodiments, each candidate agent is further preset with negative constraint words, which are words that the candidate agent cannot process; the acquisition module 610 is further configured to: acquire the constraints in the text to be queried; the matching module 620 is further configured to: match the text to be queried, the business object entity, and the constraints with the negative constraint words of each candidate agent; the multi-agent routing device 600 further includes: a removal module, configured to remove the target candidate agent from the plurality of candidate agents when at least one of the text to be queried, the business object entity, and the constraints matches the negative constraint word of the target candidate agent in each candidate agent.

[0177] In some embodiments, each candidate agent is further pre-defined with positive constraint words, which are words that the candidate agent can process; the generation module 630 is further configured to: obtain the constraints in the query text; match the query text, the business object entity, and the constraints with the positive constraint words of each candidate agent to obtain positive hit results for each candidate agent; the positive hit results include a first positive hit result corresponding to the query text, a second positive hit result corresponding to the business object entity, and a third positive hit result corresponding to the constraints; generate a target incentive score for each candidate agent based on the positive hit results; and generate a target score for each candidate agent based on the first score, the second score, and the target incentive score.

[0178] In some embodiments, the generation module 630 is further configured to: for each candidate agent, if, based on the first positive hit result of the candidate agent, it is determined that at least one word in the query text hits the positive constraint word, and a specified value is used as the first incentive score of the candidate agent; based on the second positive hit result of the candidate agent, it is determined that a first number of the business object entity hits the positive constraint word, and the smaller of the first number and a first specified upper limit value is used as the second incentive score of the candidate agent; based on the third positive hit result of the candidate agent, it is determined that a second number of the constraint condition hits the positive constraint word, and the smaller of the second number and a second specified upper limit value is used as the third incentive score of the candidate agent; and based on the first incentive score, the second incentive score, and the third incentive score, a target incentive score for the candidate agent is generated.

[0179] In some embodiments, the generation module 630 is further configured to: perform a weighted summation of the first incentive score, the second incentive score, and the third incentive score to obtain a fourth incentive score; and use the smaller value between the fourth incentive score and a third specified upper limit value as the target incentive score of the candidate agent.

[0180] In some embodiments, the generation module 630 is further configured to: for each candidate agent, add the first score with a third weight and the second score with a fourth weight to the target incentive score to generate a target score for the candidate agent; wherein the third weight is greater than the fourth weight.

[0181] In some embodiments, the determining module 640 is further configured to: determine the designated fallback agent as the target agent if it is determined that the entity information does not include any entity.

[0182] In some embodiments, the determining module 640 is further configured to: determine a designated fallback agent as the target agent if any of the following conditions are met; the conditions include: all of the plurality of candidate agents are removed; there are candidate agents among the plurality of candidate agents that have not been removed, and the target scores of each of the candidate agents that have not been removed are lower than a first specified threshold; the second score of the designated fallback agent in the action matching dimension is greater than or equal to a second specified threshold, and the target score of the designated fallback agent is greater than or equal to a third specified threshold.

[0183] The descriptions of the above device embodiments are similar to those of the above method embodiments, and have similar beneficial effects. For technical details not disclosed in the device embodiments of this application, please refer to the descriptions of the method embodiments of this application for understanding.

[0184] Based on the same inventive concept as the foregoing embodiments, this application provides an electronic device.

[0185] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 7 The illustrated electronic device 700 includes a processor 701, which can call and run computer programs from memory to implement the methods in the embodiments of this application.

[0186] Optionally, such as Figure 7 As shown, the electronic device 700 may further include a memory 702. The processor 701 can retrieve and run computer programs from the memory 702 to implement the methods described in this embodiment.

[0187] The memory 702 can be a separate device independent of the processor 701, or it can be integrated into the processor 701.

[0188] Optionally, such as Figure 7 As shown, the electronic device 700 may also include a transceiver 703, which the processor 701 can control to communicate with other devices. Specifically, it can send information or data to other devices or receive information or data sent by other devices.

[0189] The transceiver 703 may include a transmitter and a receiver. The transceiver 703 may further include an antenna, which may be one or more.

[0190] This application also provides a computer-readable storage medium for storing computer programs.

[0191] Optionally, the computer-readable storage medium can be applied to the electronic device in the embodiments of this application, and the computer program causes the processor or electronic device to perform the various methods of the embodiments of this application, which will not be described in detail here for the sake of brevity.

[0192] This application also provides a computer program product, including computer program instructions.

[0193] Optionally, the computer program product can be applied to the electronic device in the embodiments of this application, and the computer program instructions cause the processor or electronic device to execute the various methods of the embodiments of this application. For the sake of brevity, they will not be described in detail here.

[0194] This application also provides a computer program.

[0195] Optionally, the computer program can be applied to the electronic device in the embodiments of this application. When the computer program runs on the processor or electronic device, it causes the processor or electronic device to execute the various methods of the embodiments of this application. For the sake of brevity, it will not be described in detail here.

[0196] It should be noted that the descriptions of the devices, storage media, computer program products, and computer program embodiments above are similar to the descriptions of the method embodiments above, and have similar beneficial effects. For technical details not disclosed in the device, storage media, computer program products, and computer program embodiments of this application, please refer to the descriptions of the method embodiments of this application for understanding.

[0197] It should be understood that the processor in the embodiments of this application may be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the above method embodiments can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor described above can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.

[0198] It is understood that the memory in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DR RAM). It should be noted that the memory used in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0199] It should be understood that the above-described memory is exemplary and not a limiting description. For example, the memory in the embodiments of this application may also be static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DR RAM), etc. That is to say, the memory in the embodiments of this application is intended to include, but is not limited to, these and any other suitable types of memory.

[0200] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0201] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0202] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0203] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0204] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0205] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a terminal device (which may be a personal computer, mobile phone, tablet computer, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0206] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A multi-agent routing method, the method comprising: Obtain entity information, action intent information, and multiple candidate agents from the text to be queried; Each of the candidate intelligent agents is pre-defined with specified entity information and specified action information; The entity information is matched with the specified entity information of each candidate agent to generate a first score for each candidate agent in the entity matching dimension; the action intent information is matched with the specified action information of each candidate agent to generate a second score for each candidate agent in the action matching dimension. Based on the first score and the second score, a target score is generated for each candidate agent; Based on the target scores of each candidate agent, the target agent is determined from the plurality of candidate agents; The text to be queried is routed to the target agent.

2. The method according to claim 1, wherein the entity information includes a business object entity and an auxiliary context entity; the business object entity is the target object pointed to by the query text, and the auxiliary context entity is an associated entity used to modify the business object entity; The step of matching the entity information with the specified entity information of each candidate agent to generate a first score for each candidate agent in the entity matching dimension includes: Each entity in the entity information is matched with the specified entity information of each candidate agent to obtain the matching result of each entity and each candidate agent; For each candidate agent, the sum of the matching results corresponding to the business object entity is subjected to square root decay processing to generate a business object entity score. Furthermore, the sum of the matching results corresponding to the auxiliary context entity is subjected to square root decay processing to generate an auxiliary context entity score; Based on the business object entity score and the auxiliary context entity score, the first score of the candidate agent in the entity matching dimension is generated.

3. The method according to claim 2, wherein generating the first score of the candidate agent in the entity matching dimension based on the business object entity score and the auxiliary context entity score includes: The business object entity score is weighted and fused with the auxiliary context entity score with a first weight and the auxiliary context entity score with a second weight to obtain the first score of the candidate agent in the entity matching dimension. Wherein, the first weight is greater than the second weight.

4. The method according to claim 2, wherein each of the candidate agents is further preset with negative constraint words, the negative constraint words being words that the candidate agent cannot process; before matching the entity information with the specified entity information of each candidate agent, the method further includes: Obtain the constraints in the text to be queried; The query text, the business object entity, and the constraints are matched with the negative constraint words of each candidate agent. If at least one of the query text, the business object entity, and the constraint conditions matches a negative constraint term of the target candidate agent among the candidate agents, the target candidate agent is removed from the plurality of candidate agents.

5. The method according to claim 2, wherein each candidate agent is further preset with positive constraint words, the positive constraint words being words that the candidate agent can process; the step of generating a target score for each candidate agent based on the first score and the second score includes: Obtain the constraints in the text to be queried; The query text, the business object entity, and the constraint conditions are matched with the positive constraint words of each candidate agent to obtain the positive hit results of each candidate agent; the positive hit results include the first positive hit result corresponding to the query text, the second positive hit result corresponding to the business object entity, and the third positive hit result corresponding to the constraint conditions; Based on the positive hit results, a target incentive score is generated for each candidate agent; Based on the first score, the second score, and the target incentive score, a target score is generated for each candidate agent.

6. The method according to claim 5, wherein generating target incentive scores for each candidate agent based on the positive hit result includes: For each candidate agent, if it is determined that at least one word in the text to be queried hits the positive constraint word based on the first positive hit result of the candidate agent, the specified value is used as the first incentive score of the candidate agent. Based on the second positive hit result of the candidate agent, a first number of positive constraint words are determined in the business object entity, and the smaller value between the first number and the first specified upper limit value is used as the second incentive score of the candidate agent. Based on the third positive hit result of the candidate agent, a second number of positive constraint words that are hit in the constraint condition is determined, and the smaller value between the second number and the second specified upper limit value is used as the third incentive score of the candidate agent. Based on the first incentive score, the second incentive score, and the third incentive score, a target incentive score is generated for the candidate agent.

7. The method according to claim 6, wherein generating the target incentive score for the candidate agent based on the first incentive score, the second incentive score, and the third incentive score comprises: The first incentive score, the second incentive score, and the third incentive score are weighted and summed to obtain the fourth incentive score. The smaller of the fourth incentive score and the third specified upper limit value is used as the target incentive score for the candidate agent.

8. The method according to any one of claims 5 to 7, wherein generating a target score for each candidate agent based on the first score, the second score, and the target incentive score comprises: For each candidate agent, the first score is weighted and summed with the third weight and the second score with the fourth weight, and then added to the target incentive score to generate the target score of the candidate agent. The third weight is greater than the fourth weight.

9. The method according to any one of claims 1 to 8, further comprising: If it is determined that the entity information does not include any entity, the designated fallback agent will be identified as the target agent.

10. The method according to claim 4, further comprising: The designated fallback agent will be identified as the target agent if any of the following conditions are met: The conditions include: All of the candidate agents were removed; Among the plurality of candidate agents, there are candidate agents that have not been removed, and the target score of each of the candidate agents that have not been removed is lower than a first specified threshold. The designated fallback agent's second score in the action matching dimension is greater than or equal to the second designated threshold, and the designated fallback agent's target score is greater than or equal to the third designated threshold.