Task routing determination method and apparatus, electronic device, and storage medium

By acquiring user task text and historical dialogue text, and combining a pre-set large model and dynamic confidence threshold, the intention and product recognition are optimized, solving the problem of intention recognition bias in traditional methods and achieving efficient and accurate task routing decisions.

CN122309703APending Publication Date: 2026-06-30LAUNCH TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
LAUNCH TECH CO LTD
Filing Date
2026-03-24
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

Traditional intent recognition methods are prone to bias and errors in intelligent interaction, leading to incorrect task routing decisions, reduced task execution efficiency and accuracy, and a lack of flexibility and adaptability.

Method used

By acquiring the user's task text, historical dialogue text, and preset product list, the system uses a preset large model to identify intent type and product name, combines dynamic confidence thresholds for task routing decisions, and employs a multi-pattern matching strategy and dynamic threshold adjustment mechanism to optimize semantic understanding and contextual association.

Benefits of technology

It improves the accuracy and robustness of intent classification, reduces the number of times users need to clarify, enhances task execution efficiency and system stability, adapts to different scenario requirements, and avoids repeated queries and routing errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122309703A_ABST
    Figure CN122309703A_ABST
Patent Text Reader

Abstract

This application discloses a task routing determination method, apparatus, electronic device, and storage medium. The method includes: acquiring a user's first task text, historical dialogue text, and a preset product list; filling the first task text, historical dialogue text, and preset product list into a preset prompt word template to obtain a first prompt word text; determining a target intent type, target product name, and target confidence level based on the first prompt word text and a preset big model; the target confidence level reflects the confidence value of the preset big model for the target intent type and target product name; determining a target confidence level threshold based on the historical dialogue text, the first task text, and the target product name; and processing the target intent type and target product name based on the target confidence level and the target confidence level threshold to obtain the target task route for the first task text. Using this application, task execution efficiency can be improved when interacting with users on tasks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a task routing determination method, apparatus, electronic device, and storage medium. Background Technology

[0002] In intelligent interaction and task routing, intent recognition is a crucial step. For example, in actual interaction scenarios, intent recognition is used to analyze the user's core needs, and then task routing is completed based on the recognition results. The accuracy of intent recognition directly determines the overall efficiency and precision of subsequent task processing.

[0003] However, traditional methods are prone to user intent recognition errors or even misidentification. Once intent recognition fails, it directly leads to incorrect task routing decisions and low task routing accuracy, causing tasks to be assigned to mismatched execution modules and unable to complete effective processing. Subsequently, the user intent acquisition process needs to be restarted, and intent recognition and task routing determination need to be performed again, which reduces task execution efficiency. Summary of the Invention

[0004] To address the aforementioned issues, embodiments of the present invention provide a task routing determination method, apparatus, electronic device, and storage medium, which can improve task execution efficiency when interacting with users on tasks.

[0005] In a first aspect, embodiments of the present invention provide a task routing determination method, including: The system retrieves the user's initial task text, historical dialogue text, and preset product list; the initial task text includes the user's description of the initial product name; the historical dialogue text consists of interaction texts with the user prior to the initial task text; and the preset product list includes multiple product names. Fill the first task text, the historical dialogue text, and the preset product list into the preset prompt word template to obtain the first prompt word text; The target intent type, target product name, and target confidence level are determined based on the first prompt text and the preset large model; the target product name is the product name that corresponds to the initial product name among the plurality of product names; the target confidence level is used to reflect the confidence value of the preset large model for the target intent type and the target product name; Based on the historical dialogue text, the first task text, and the target product name, determine the target confidence threshold; Based on the target confidence level and the target confidence threshold, the target intent type and the target product name are processed to obtain the target task route for the first task text.

[0006] Secondly, embodiments of the present invention provide a task routing determination device, the device comprising an acquisition unit and a processing unit; The acquisition unit is used to acquire the user's first task text, historical dialogue text, and preset product list; the first task text includes the initial product name described by the user; the historical dialogue text is the interaction text between the user and the first task text before the interaction time; the preset product list includes multiple product names. The processing unit is used to fill the first task text, the historical dialogue text and the preset product list into a preset prompt word template to obtain the first prompt word text. The target intent type, target product name, and target confidence level are determined based on the first prompt text and the preset large model; the target product name is the product name that corresponds to the initial product name among the plurality of product names; the target confidence level is used to reflect the confidence value of the preset large model for the target intent type and the target product name; Based on the historical dialogue text, the first task text, and the target product name, determine the target confidence threshold; Based on the target confidence level and the target confidence threshold, the target intent type and the target product name are processed to obtain the target task route for the first task text.

[0007] Thirdly, embodiments of the present invention provide an electronic device, the electronic device including a processor and a memory, the processor being connected to the memory, the memory being used to store a computer program, and the processor being used to execute the computer program stored in the memory, so that the electronic device performs the method as described in the first aspect.

[0008] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program that is executed by a processor to implement the method described in the first aspect.

[0009] Fifthly, embodiments of this application provide a computer program product, the computer program product including a non-transitory computer-readable storage medium storing a computer program, the computer being operable to perform the method as described in the first aspect.

[0010] Implementing the embodiments of this application has the following beneficial effects: In this embodiment, the user's first task text, historical dialogue text, and preset product list are first obtained. The first task text includes the initial product name described by the user, the historical dialogue text is the interaction text with the user before the first task text, and the preset product list includes multiple product names. Then, the first task text, historical dialogue text, and preset product list are filled into a preset prompt word template to obtain the first prompt word text. Next, the target intent type, target product name, and target confidence are determined based on the first prompt word text and the preset big model. The target product name is the product name corresponding to the initial product name among multiple product names, and the target confidence is used to reflect the confidence value of the preset big model for the target intent type and target product name. Then, the target confidence threshold is determined based on the historical dialogue text, the first task text, and the target product name. Finally, the target intent type and target product name are processed based on the target confidence and the target confidence threshold to obtain the target task route of the first task text. Therefore, by determining the target confidence level and the target confidence level threshold, and then adopting differentiated processing methods to determine the target task route when the target confidence level is different, the routing error problem caused by intent recognition deviation is avoided. At the same time, the process redundancy caused by repeated routing is avoided, and the problem of low task execution efficiency caused by low routing accuracy in traditional technology is solved. When interacting with users on tasks, the task execution efficiency can be improved. Attached Figure Description

[0011] To more clearly illustrate the technical solutions in the embodiments of the present invention or the background art, the drawings used in the embodiments of the present invention or the background art will be described below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0012] Figure 1 This is a schematic diagram of the architecture of a task routing determination system provided in an embodiment of this application; Figure 2 This is a flowchart of a task routing determination method provided in an embodiment of this application; Figure 3 This is a flowchart of a task routing decision provided in an embodiment of this application; Figure 4 This is a flowchart of a confidence-based routing decision provided in an embodiment of this application; Figure 5 This is a flowchart of a product identification method provided in an embodiment of this application; Figure 6 This is a flowchart of a structured result parsing method provided in an embodiment of this application; Figure 7This is a schematic diagram of the structure of a task routing determination device provided in an embodiment of this application; Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0013] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0014] The terms "first," "second," "third," and "fourth," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or modules is not limited to the listed steps or modules, but may optionally include steps or modules not listed, or may optionally include other steps or modules inherent to these processes, methods, products, or devices.

[0015] In this document, the term "embodiment" means that a particular feature, result, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0016] The following describes the relevant content, concepts, technical issues, technical solutions, and beneficial effects involved in the embodiments of this application.

[0017] First, let me explain some of the technical terms used in this application: Large Language Model (LLM): A pre-trained language model represented by Qwen.

[0018] Task Routing (TR): The process of distributing user queries to the corresponding task processing modules based on the identified user intent.

[0019] Confidence Score (CS): The degree of confidence the model has in the output classification and recognition results. The value ranges from 0 to 1.

[0020] Intent Classification (IC): The technical process of identifying the semantic purpose of a user's query and classifying it into the corresponding intent category.

[0021] Named Entity Recognition (PER): A technology that accurately extracts entity information such as product names from user natural language queries.

[0022] In traditional solutions, for intent recognition, rule-based methods are limited by fixed logic, making it difficult to understand the complex semantics and contextual relationships in user queries, resulting in low recognition accuracy. During routing decisions, the lack of intelligent decision-making mechanisms often leads to repeated queries, resulting in low routing efficiency. In product recognition, spelling errors and product aliases in user input can easily cause standard product matching failures, leading to inaccurate product recognition. Furthermore, traditional methods often use fixed thresholds for confidence assessment, failing to flexibly adapt to the differentiated needs of different task scenarios, resulting in poor adaptability. Moreover, most solutions ignore the value of dialogue history information, leading to repeated clarification of the same user questions and failing to fully utilize historical interaction data to optimize the processing flow. These shortcomings seriously affect user experience and system operating efficiency.

[0023] For example, in a traditional rule-engine-based multi-module routing system, the system mainly consists of a keyword matching module, a fixed routing table, and a simple clarification mechanism. The keyword matching module matches preset keywords using regular expressions, the fixed routing table establishes a mapping relationship between intent and processing modules, and the simple clarification mechanism returns a fixed clarification question when a match fails. Based on this system, the user input is first segmented and keywords are extracted, then the rule base is traversed for pattern matching, and finally the corresponding processing module is selected based on the matching results, ultimately outputting a response or a fixed clarification question.

[0024] However, limited by the core logic of keyword matching, the system cannot handle synonyms and complex sentence structures, resulting in weak semantic understanding and a high misclassification rate. Furthermore, the lack of context awareness due to the absence of historical dialogue information during processing leads to a high rate of repeated clarifications. The use of fixed thresholds and routing tables creates a rigid decision-making mechanism that cannot adapt to the dynamic needs of different scenarios, resulting in poor system flexibility. Moreover, when parsing or matching fails, it can only return a fixed clarification question, lacking effective backup solutions and exhibiting weak error recovery capabilities, thus affecting system stability.

[0025] Therefore, to address the aforementioned shortcomings, this application provides a task routing determination method that can improve the accuracy and robustness of intent classification. By optimizing semantic understanding and contextual association mechanisms, it solves the problem of high misclassification rates in traditional solutions; reduces the number of user clarifications, improves dialogue efficiency, and fully utilizes historical dialogue information to avoid repeated inquiries; enhances the accuracy of product name recognition by using a multi-pattern matching strategy to address issues such as spelling errors and product aliases; improves the system's adaptability and stability by employing a dynamic threshold adjustment mechanism to adapt to different scenarios and improving error recovery schemes; and simultaneously optimizes multi-task parallel processing performance to achieve efficient and accurate task routing, thereby improving the operational effect and user experience of the intelligent interaction system.

[0026] See Figure 1 , Figure 1 This is a schematic diagram of the architecture of a task routing determination system provided in an embodiment of this application. Specifically, it includes an input processing layer, an intelligent analysis layer, a decision routing layer, and a task execution layer.

[0027] The input processing layer contains three functional modules for collecting and preprocessing basic task information. The product list loading module loads a pre-configured product list; the user query receiving module receives user input task requests and converts them into a processable text format; and the history dialogue management module retrieves the current user's historical interaction text before the current task.

[0028] The intelligent analysis layer, based on the information from the input processing layer, intelligently parses the information. The large model inference engine is used to schedule subordinate modules to execute analysis tasks. The product entity extractor extracts product-related information from the user query receiving module and the historical dialogue management module, and matches it with the standard product names provided by the product list loading module. The intent classifier is used to identify the task intent category corresponding to the user task, such as return application, sales consultation, etc. The confidence calculator combines the matching results of the product entity extractor and the identification results of the intent classifier to calculate the joint confidence of the two, thereby reflecting the credibility of the results.

[0029] The decision routing layer routes tasks based on the output of the intelligent analysis layer. The exception handling controller performs compliance checks on the output of the intelligent analysis layer, such as verifying whether the intent is legal and whether the confidence level is within a valid range, and handles parsing exception scenarios. The dynamic threshold router calculates the target confidence threshold by combining historical dialogues, task text, and product information, and then compares the result of the confidence calculator with the threshold to classify the corresponding confidence level. The multiplexing scheduler matches the corresponding execution plan according to the confidence level, specifically including modes such as direct routing for high confidence, user confirmation for medium confidence, and general fallback for low confidence.

[0030] The task execution layer comprises five functional modules that execute specific task operations based on instructions from the decision routing layer. The technical repair guidance module handles product technical faults and repair-related tasks; the product operation support module is responsible for operational tasks such as product purchase, return, and exchange; the sales consultation service module handles sales-related consultations such as product introduction and price inquiry; the social greeting handling module handles user greetings and interactions without task requests; and the general question response module serves as a fallback module, handling tasks with low to medium confidence or those that are not clearly categorized.

[0031] See Figure 2 , Figure 2 This is a flowchart illustrating a task routing determination method provided in an embodiment of this application. The task routing determination method provided in this application includes, but is not limited to, the following steps: Step S101: Obtain the user's first task text, historical conversation text, and preset product list; The first task text includes the initial product name described by the user; the historical dialogue text is the interaction text between the user and the interaction time prior to the first task text; the preset product list includes multiple product names. Step S102: Fill the first task text, historical dialogue text, and preset product list into the preset prompt word template to obtain the first prompt word text; Step S103: Determine the target intent type, target product name, and target confidence level based on the first prompt word text and the preset large model; Among them, the target product name is the product name that corresponds to the initial product name among multiple product names; the target confidence score is used to reflect the confidence value of the preset large model for the target intent type and the target product name; Step S104: Determine the target confidence threshold based on the historical dialogue text, the first task text, and the target product name; Step S105: Based on the target confidence level and the target confidence level threshold, process the target intent type and the target product name to obtain the target task route for the first task text.

[0032] The task routing determination method provided in this application can be applied to the following scenarios: task distribution in intelligent customer service systems, intelligent tutoring systems in the education field, preliminary triage systems in medical diagnosis, intelligent shopping guide systems in e-commerce platforms, etc., without limitation.

[0033] Specifically, the first task text is the content of the task request currently initiated by the user, which may be a query task; the initial product name is the product identifier related to the task described by the user in the first task text, which may have problems such as non-standard expression and spelling errors; the historical dialogue text is the interaction record between the task routing system and the user before this task request, which is used to help understand the user's intent. The time range of the interaction record can be preset. For example, the historical dialogue text is the interaction record within 24 hours before the first task text; the preset product list is a pre-configured and stored collection of standard product names covering all products within the scope of the current task.

[0034] Specifically, the preset prompt template is a pre-designed text framework to guide the large model to output results that conform to the expected format and content. It usually includes elements such as task description, contextual guidance, and output constraints. The target intent type is the task request category identified by the large model. The target product name is the standard product name matched from the preset product list that corresponds to the initial product name. The target confidence is a quantitative value of the large model's confidence in the accuracy of its output target intent type and target product name. The value range is usually 0 to 1, with higher values ​​indicating higher confidence. The target confidence threshold is used to classify confidence levels and assist in routing decisions. The target task route is the final determined execution plan for handling user tasks, including the task execution modules and corresponding operations.

[0035] In one possible embodiment, the system obtains the user's initial task text, historical dialogue text, and a preset product list. The initial task text includes the user's description of the initial product name, the historical dialogue text consists of interactions with the user prior to the initial task text, and the preset product list includes multiple product names. Specifically, the system receives the user's currently submitted initial task text through a user interaction interface, which can be a web page input box, a client-side dialog window, a speech-to-text interface, etc. For example, if the user inputs: "How do I apply for a refund for the Qwen-7B model?", this text is the initial task text, where "Qwen-7B model" is the initial product name. The system retrieves the user's historical dialogue text from the dialogue database using the user's unique identifier. If the user previously inquired about the purchase process of the Qwen-7B model, this dialogue text can be a portion of the historical dialogue text, used to help determine the context of the user's current refund request. The system loads a preset product list from a preset product information database. This list includes all standard product names and corresponding basic information covered by the task, such as Qwen-7B Basic Edition, Qwen-7B Enterprise Edition, etc. Among them, the user interaction interface reserves an expansion interface for multimodal input, which can connect to various input forms such as voice and images, breaking through the limitations of pure text interaction and further catering to the diverse interaction habits of users.

[0036] In one possible embodiment, the first task text, historical dialogue text, and preset product list are filled into a preset prompt word template to obtain the first prompt word text. Specifically, the preset prompt word template library is first called, and a template matching the current task type is selected. This template usually contains a fixed instruction expression. For example, the template could be: Based on the following user task text, historical dialogue text, and preset product list, identify the user's target intent type, match the corresponding standard product name, and output the confidence level: User task text: {first task text}; Historical dialogue text: {historical dialogue text}; Preset product list: {preset product list}; Output format: Target intent type: Select from {return application, sales consultation, technical repair, social greeting, general consultation}. If it exceeds this range, output "general consultation"; Target product name: Select from the above preset product list. If there is no matching item, output "general product"; Target confidence level: Output a value in the range of 0 to 1. Through a text filling algorithm, the first task text, historical dialogue text, and preset product list are respectively filled into the corresponding placeholder positions of the template to complete the generation of the first prompt word text.

[0037] In one possible embodiment, the target intent type, target product name, and target confidence level are determined based on the first prompt text and a pre-defined large model. The target product name is the product name corresponding to the initial product name among multiple product names. The target confidence level reflects the confidence value of the pre-defined large model in the target intent type and target product name. This pre-defined large model can be a finely tuned general-purpose large language model with strong semantic understanding and entity matching capabilities. The first prompt text is input into the pre-defined large model, which first performs semantic parsing on the first prompt text and combines it with contextual information supplemented by historical dialogue text to accurately identify the user's core request, i.e., determine the target intent type. For example, combining the user task text: "How to apply for a refund using the Qwen-7B model," and the purchase process mentioned in historical dialogues, the large model can identify the target intent type as a refund application. The large model extracts the initial product name "Qwen-7B model" from the first task text and performs multi-dimensional matching with product names in the preset product list, including exact matching, edit distance matching, and semantic similarity matching. If the initial product name has a slight spelling error, such as "Qwen-7B" being misspelled as "Qwen-7b", it is corrected to the standard name through edit distance matching. If the initial product name is incomplete, such as "Qwen-7B model", it is matched with "Qwen-7B basic version" or "Qwen-7B enterprise version" based on the context, and finally the target product name is determined. After completing intent recognition and product matching, the large model outputs the target confidence score corresponding to the target intent type and the target product name based on its own semantic understanding ability and training data. For example, in the above case, if the large model has a high degree of confidence in the "refund application" intent and the product matching result of "Qwen-7B basic version", it may output a target confidence score of 0.92. Among them, the large model reasoning supports integration with external knowledge bases. By integrating external data such as domain-specific knowledge and full product information, it can enhance the model's reasoning analysis and intent recognition capabilities, and improve the accuracy and intelligence of routing decisions.

[0038] In one possible embodiment, a target confidence threshold is determined based on the historical dialogue text, the first task text, and the target product name. The target confidence threshold may include multiple thresholds; for example, it may include a first target confidence threshold and a second target confidence threshold. The number of target confidence thresholds determines the number of target confidence levels. For example, if there is one target confidence threshold, then there are two target confidence levels; if there are two target confidence thresholds, then there are three target confidence levels.

[0039] Since different users' interaction habits, the completeness of task text information, and the complexity of the product all affect the reference value of confidence scores, a fixed threshold is difficult to adapt to all scenarios. Therefore, the threshold needs to be dynamically calculated. The baseline confidence threshold is adaptively scaled and adjusted using three quantitative indicators: historical dialogue length, product complexity, and time factor. The baseline confidence threshold, which is the initial confidence threshold, can be 0.3 and 0.6, respectively.

[0040] The length of historical dialogues is quantified by the number of interaction rounds. More rounds indicate richer historical context information, allowing for a more accurate understanding of user needs through multi-round dialogues, and the confidence requirement for single intent or product identification can be appropriately reduced. Therefore, the longer the historical dialogue length, the greater the calculated dialogue length weight, and the smaller the target adjustment value obtained after weighted summation (which is negative). The final dynamic threshold is the result of adding the target adjustment value to the baseline threshold, which is lower than the baseline threshold. With a lower threshold, the identified target confidence is more likely to exceed the threshold standard, making it easier to determine high confidence and thus execute a direct routing strategy, reducing unnecessary user clarification and improving interaction efficiency.

[0041] Product complexity is quantified into low, medium, and high levels. Higher complexity indicates a more cumbersome task processing flow and functional logic, requiring higher accuracy in intent recognition and product matching. Recognition errors can easily lead to routing mistakes and subsequent task processing failures. Therefore, higher product complexity corresponds to a larger product complexity factor, resulting in a larger, positive target adjustment value after weighted summation. The final dynamic threshold is the result of adding the target adjustment value to the baseline threshold, and is higher than the baseline threshold. With a higher threshold, it becomes more difficult for the recognized target confidence to reach the threshold standard and be classified as high confidence. More accurate recognition results are required to execute direct routing. If the threshold is not reached, the user confirmation process begins, ensuring that routing decisions match the product complexity and improving decision accuracy.

[0042] The time factor is quantified based on the time interval between the first task text and the previous historical dialogue. The shorter the interval, the stronger the timeliness of the historical dialogue, the higher the correlation between the historical context and the current user needs, and the greater its reference value. The confidence requirement for a single recognition can be reduced based on the latest interaction information. Therefore, the shorter the time interval, the larger the calculated time decay coefficient, and the smaller the target adjustment value after weighted summation, which is negative. The final dynamic threshold is the result of the baseline threshold plus the target adjustment value, which is lower than the baseline threshold. After the threshold is reduced, the target confidence of the recognition is more likely to exceed the threshold standard, and it is easier to judge it as high confidence, making full use of effective historical information to simplify the routing process. Conversely, the longer the time interval, the weaker the timeliness of historical information, the higher the threshold, the higher the requirement for the accuracy of a single recognition, and the more difficult it is to reach the threshold standard.

[0043] The above three factors are weighted and summed to form a target adjustment value, which together determine the final value of the dynamic threshold: the larger the target adjustment value, the higher the dynamic threshold, and the more difficult it is to reach the confidence level; the smaller the target adjustment value, the lower the dynamic threshold, and the easier it is to reach the confidence level, thus achieving adaptive matching of the threshold to different task scenarios.

[0044] Specifically, the historical dialogue text is first analyzed to extract features such as interaction rounds and the types of user's historical needs. If the user is interacting for the first time and has no historical needs recorded, this dimension is assigned a lower weight; if the user is a high-frequency user and their historical needs are highly relevant to the current task, it is assigned a higher weight. The completeness of the information in the first task text is evaluated, mainly judging whether it contains core demands, product information, key time nodes, etc. The more complete the information, the lower the dependence on confidence, and the threshold can be appropriately lowered; the more fragmented the information, the higher the threshold needs to be. In addition, the complexity of the product corresponding to the target product name is analyzed. For products with complex functions and cumbersome task processes, a higher threshold needs to be set to ensure routing accuracy; for products with simple functions and standardized processes, the threshold can be appropriately lowered to improve processing efficiency.

[0045] In one possible embodiment, the target intent type and target product name are processed based on the target confidence level and the target confidence threshold to obtain the target task route for the first task text. Specifically, the target confidence level is first compared with the target confidence threshold to classify confidence levels. For the first target confidence threshold of 0.6 and the second target confidence threshold of 0.3, the target confidence level can be divided into three confidence levels. The higher the confidence level, the higher the accuracy of the intent and product information output by the large model. For the first confidence level, the corresponding execution scheme is directly matched based on the target intent type and the target product name. For example, if the target intent type is "refund application", the target product name is "Qwen-7B basic version", and the target confidence level is 0.92, which is higher than the first target confidence threshold of 0.6, the "product refund processing module" is matched as the execution module, and "accept Qwen-7B basic version refund application, verify order information, and start refund process" is matched as the execution operation to form the target task route. For the second confidence level, a confirmation query text is generated based on the target intent type and target product name. This text is then fed back to the user through the user interaction interface. After obtaining the user's response text, the target intent type and target product name are corrected based on the response text, and then the corresponding execution module and operation are matched. For example, when the target confidence level is 0.57 and between the first target confidence threshold of 0.6 and the second target confidence threshold of 0.3, the query text "Hello, do you want to apply for a refund for the Qwen-7B basic version?" is generated. If the user answers "yes", the original target intent and product information are maintained and the refund processing module is matched. If the user answers "no, I want to apply for a refund for the Qwen-7B enterprise version", the target product name is corrected and the corresponding module is re-matched. For the third confidence level, a preset general execution module and basic execution operation are matched to ensure that the task can be processed normally and to avoid process interruption. For example, when the target confidence level is 0.1 and lower than the second target confidence threshold of 0.3, the task is routed to the "general consultation processing module" to perform the basic operation of "recording user needs and providing feedback that product and intent information need further verification". It should be noted that the generated target task route will be stored in a standardized format and transmitted to the corresponding execution module. After receiving the route instruction, the execution module will process the task according to the specified execution operation and feed back the processing result to the user.

[0046] In this embodiment, by collecting user task-related information from multiple dimensions and combining it with preset prompt word templates to guide the large model to output standardized results, the accuracy of identifying target intent types and target product names is improved. A dynamic weighted calculation method is used to determine the target confidence threshold, overcoming the limitation of poor adaptability of fixed thresholds and accurately matching the scenario requirements of different users, tasks, and products. Based on confidence level classification, a differentiated routing strategy is adopted, ensuring task processing efficiency in high-confidence scenarios while guaranteeing processing accuracy and process stability in medium- and low-confidence scenarios through interactive confirmation and a general fallback mechanism, reducing task processing error rates and process interruption probabilities. The entire process, from information collection to route determination, can be completed without manual intervention, improving task processing efficiency, reducing manual operation costs, and providing users with a more accurate and smoother service experience. It is suitable for various task scenarios requiring task routing allocation.

[0047] Optionally, based on a pre-defined large model, the output corresponding to the first prompt word text can be the first intent type, the first product name, and the first confidence level. After verifying the first intent type, the first product name, and the first confidence level, the target intent type, the target product name, and the target confidence level are determined based on the verification results.

[0048] Specifically, step S103, determining the target intent type, target product name, and target confidence level based on the first prompt word text and the preset large model, may include the following steps: Step S201: Call the preset large model to process the first prompt word text to obtain a structured output result including the first intent type, the first product name and the first confidence level; Step S202: Parse the structured output to obtain the first intent type, the first product name, and the first confidence level; Step S203: Validate the first intent type, the first product name, and the first confidence level to obtain the target intent type, the target product name, and the target confidence level.

[0049] Specifically, the first intent type is the initial identification result of the user intent directly output by the preset large model; the first product name is the initial result of the product name extracted and matched by the preset large model from the first task text; the first confidence level is the initial quantitative value of the preset large model's confidence in the first intent type and the first product name; the structured output result is standardized data containing the above three types of information output by the preset large model in a preset format such as JSON; format parsing is the process of converting the structured output result into identifiable and processable discrete information.

[0050] In one possible embodiment, a preset large model is invoked to process the first prompt text, obtaining a structured output result including a first intent type, a first product name, and a first confidence level. Specifically, the first prompt text is transmitted as input to the preset large model, and a structured output instruction of the preset large model is triggered simultaneously. The preset large model outputs the first intent type, the first product name, and the first confidence level according to a preset format.

[0051] For example, if the first prompt text contains the user's current query "Can Qwen-7B Enterprise Edition be returned?", the historical dialogue text "User: I have purchased Qwen-7B Enterprise Edition for 3 days; Customer Service: Okay, the order information has been recorded" and the preset product list "Qwen-7B Basic Edition, Qwen-7B Enterprise Edition", then after processing, the preset large model, in JSON format, can generate the following structured output: {"intent_type":"Return Request","product_name":"Qwen-7B Enterprise Edition","confidence":0.89}, where "Return Request" is the first intent type, "Qwen-7B Enterprise Edition" is the first product name, and 0.89 is the first confidence level.

[0052] In one possible implementation, the structured output is parsed to obtain the first intent type, first product name, and first confidence level. First, the structured output is directly parsed as JSON. A JSON parser is called to perform syntax validation and data extraction. If the result format fully conforms to JSON specifications (e.g., no trailing commas, double quotes, and no missing fields), the first intent type, first product name, and first confidence level are directly extracted. If direct JSON parsing fails (e.g., due to single quotes, missing fields, or syntax errors), a regular expression matching mechanism is triggered. Multiple pre-defined regular expression rules are invoked, each with its own matching logic designed for the first intent type, first product name, and first confidence level, covering different output formats. If the regular expression matches successfully, the corresponding information is extracted. If the match fails or the extracted fields are incomplete, format repair is performed, automatically correcting syntax errors in the structured output, such as converting single quotes to double quotes, removing trailing commas, adding missing curly braces, and filling in missing fields. After repair, JSON parsing is re-executed. If the format cannot be parsed after repair, the parsing is deemed to have failed, and default values ​​are output, such as the first intent type being "unknown intent", the first product name being "general product", and the first confidence level being 0.2.

[0053] For example, if the structured output is: {intent_type:'Return Application',product_name:'Qwen-7B Enterprise Edition',confidence:0.89}, which contains single quotes, direct JSON parsing will fail. However, regular expression matching will extract the first intent type "Return Application", the first product name "Qwen-7B Enterprise Edition", and the first confidence level of 0.89. If the structured output is: {intent_type:'Return Application',product_name:'Qwen-7B Enterprise Edition'}, which is missing the confidence level field, regular expression matching will trigger format repair, completing the confidence level field to the default value of 0.2, and then JSON parsing will extract the complete information.

[0054] In one possible embodiment, the first intent type, the first product name, and the first confidence level are verified to obtain the target intent type, the target product name, and the target confidence level. Specifically, for the first intent type, it is compared with a preset intent type library, which may include types such as "return application," "sales consultation," "technical repair," "social greeting," and "general consultation." If the first intent type belongs to a type in the preset intent library, it is directly determined as the target intent type. If it does not belong to the library, such as "refund application" and "return application" being synonymous, or "product problem" being ambiguous, it is corrected to a valid type through semantic similarity matching. For example, "refund application" is mapped to "return application," and "product problem" is determined to be "technical repair." For the first product name, a fuzzy matching algorithm is used to verify it. First, an exact match is performed to check if the first product name is completely identical to the standard names in the preset product list. If the exact match fails, an edit distance match is performed, calculating the edit distance between the first product name and each product name in the preset product list. The error in the edit distance is allowed to be less than or equal to a preset error value, which can be 2. For example, "Qwen-7B" might be mistakenly written as "Qwen-7b" or "Qwen7B". If the match is successful, the standard product name is used as the target product name. If the edit distance match fails, a semantic similarity match is performed, calculating the similarity between the first product name and each standard product name using a pre-trained semantic model. If the similarity is greater than a preset threshold, the most similar standard product name is returned as the target product name. If all matches fail, a preset default product name, such as "General Product," is used as the target product name. For the first confidence level, check if it falls within the valid range of 0 to 1. If it exceeds this range, such as 1.2 or -0.1, normalization is performed to correct the value to within the 0 to 1 range, e.g., 1.2 is corrected to 1.0, and -0.1 is corrected to 0.0. If the first confidence level is missing, a preset default confidence level, such as 0.2, is used as the target confidence level. If the first confidence level is within the valid range, it is directly determined as the target confidence level. For example, if the first intent type is "refund application", it is corrected to the target intent type "return application" after semantic matching; the first product name is "Qwen-7b", which is corrected to the target product name "Qwen-7B Enterprise Edition" after edit distance matching; and the first confidence level is 1.1, which is corrected to the target confidence level of 1.0 after normalization.

[0055] In this embodiment of the application, by combining asynchronous calls to the large model with a multi-round parsing mechanism, the efficiency of obtaining structured output results is ensured, the parsing failure caused by non-standard format is solved, and the fault tolerance is enhanced.

[0056] Optionally, step S202, parsing the structured output to obtain the first intent type, the first product name, and the first confidence level, may include the following steps: Step S301: Determine the target data exchange format based on the structured output results; Step S302: Based on the target data exchange format, perform first format parsing on the structured output result to obtain the first parsing result; Step S303: If the first parsing result indicates successful parsing, determine the first intent type, the first product name, and the first confidence level based on the first parsing result; Step S304: If the first parsing result indicates parsing failure, call the preset regular expression to perform second format parsing on the structured output result to obtain the second parsing result; Step S305: If the second parsing result indicates successful parsing, determine the first intent type, the first product name, and the first confidence level based on the second parsing result; Step S306: If the second parsing result indicates parsing failure, perform format repair processing on the structured output result to obtain the format repair result; Step S307: If the format repair result indicates successful repair, determine the first intent type, the first product name, and the first confidence level based on the format repair result; Step S308: If the format repair result indicates that the repair failed, obtain the preset parsing result, and determine the first intent type, the first product name and the first confidence level based on the preset parsing result.

[0057] Specifically, the target data exchange format is the data organization specification followed by the structured output results. In this embodiment, JSON format is the primary format, while also being compatible with common structured formats such as XML and YAML. The first format parsing is a native parsing method based on the target data exchange format, relying on a dedicated parser for the corresponding format to extract data. The first parsing result is the status identifier and corresponding parsed data output after the first format parsing. The status identifier can be success or failure. The preset regular expression is a pre-configured set of matching rules designed for intent type, product name, and confidence level. The second format parsing is a parsing method that extracts core fields from non-standard structured results using regular expressions. The second parsing result is the status identifier and corresponding parsed data output after the second format parsing. Format repair processing is an operation to correct structured output results with syntax errors or missing fields. The format repair result is the status identifier and repaired structured data output after format repair. The preset parsing result is a pre-set fallback data set used for parsing failure scenarios.

[0058] In one possible implementation, the target data exchange format is determined based on the structured output. Specifically, if metadata exists, the metadata information of the structured output is extracted, and the format type is directly determined through the format identifier field in the metadata; if metadata is missing, matching is performed based on characteristic characters of different data exchange formats. For example, if the result starts with "{" and ends with "}", and contains separators such as ":" and ",", it is determined to be in JSON format; if the result contains "...", it is determined to be in JSON format. <root> ”、"< / root> If the result contains tags such as "", it is determined to be in XML format; if the result contains key-value pairs and the list items are identified by "-", it is determined to be in YAML format.

[0059] For example, if the structured output is: {"intent_type":"Return Application","product_name":"Qwen-7B Enterprise Edition","confidence":0.89}, the target data exchange format can be determined to be JSON format by the characteristic characters "{", "}", and ":".

[0060] In one possible embodiment, the structured output is parsed according to the target data exchange format to obtain a first parsing result. If the first parsing result indicates successful parsing, the first intent type, first product name, and first confidence level are determined based on the first parsing result. Specifically, according to the target data exchange format, a dedicated parser for the corresponding format is invoked. If it is JSON format, a JSON parser is invoked; if it is XML format, an XML parser is invoked. The parser performs syntax validation and data extraction on the structured output according to the syntax rules of the corresponding format to generate the first parsing result. The first parsing result includes a parsing status identifier and the extracted first intent type, first product name, and first confidence level. If the structured output fully conforms to the syntax specifications of the target data exchange format, with no syntax errors and complete fields, it is marked as "parsing successful." If there are syntax errors, such as inconsistent trailing commas or quotation marks, or missing core fields, it is marked as "parsing failed," with an error reason description, such as "unclosed quotation marks exist" or "missing confidence field." If the first parsing result is marked as "parsing successful," the core field data is directly extracted from the parsing result as the final result. For example, after parsing the JSON format result "{"intent_type":"return application","product_name":"Qwen-7B Enterprise Edition","confidence":0.89}", the first intent type is directly determined to be "return application", the first product name is "Qwen-7B Enterprise Edition", and the first confidence level is 0.89. This level of parsing is highly efficient and suitable for ideal scenarios with large model output formats.

[0061] In one possible embodiment, if the first parsing result indicates parsing failure, a preset regular expression is invoked to perform a second format parsing on the structured output result to obtain a second parsing result; if the second parsing result indicates parsing success, the first intent type, the first product name, and the first confidence level are determined based on the second parsing result. Specifically, if the first parsing result is marked as "parsing failed," such as the structured output result being: {intent_type:'return application',product_name:'Qwen-7B Enterprise Edition',confidence:0.89}, which contains single quotes instead of the standard JSON double quotes, a preset regular expression library is automatically invoked. This preset regular expression library contains multiple sets of matching rules for core fields, covering different format deviation scenarios. The structured output result is globally matched using regular expressions. If all core fields can be successfully extracted, the second parsing result is marked as "parsing successful," and the extracted data is used as the first intent type, the first product name, and the first confidence level; if only some fields can be extracted or no match can be found at all, it is marked as "parsing failed." For example, performing regular expression matching on the above results containing single quotes can successfully extract the three core fields "return application", "Qwen-7B Enterprise Edition", and "0.89", achieving successful parsing.

[0062] In one possible embodiment, if the second parsing result indicates parsing failure, the structured output result is subjected to format repair processing to obtain a format repair result; if the format repair result indicates successful repair, the first intent type, the first product name, and the first confidence level are determined based on the format repair result. Specifically, if the second parsing result is marked as "parsing failed," such as the structured output result being: {intent_type:'Return Application',product_name:'Qwen-7B Enterprise Edition',confidence:0.89,}, which contains a trailing comma; or being: {intent_type:'Return Application',product_name:,confidence:0.89}, where the product name field value is missing, format repair processing is performed. The repair operations are divided into two categories: First, syntax error repair, which automatically corrects issues such as inconsistent trailing commas, single or double quotes, and unclosed parentheses using preset repair rules, such as deleting trailing commas, converting single quotes to double quotes, and adding missing closing parentheses. Second, field missing correction, which addresses missing core fields by first inferring possible values ​​based on contextual semantics. If inference fails, preset default values ​​are filled in, such as "general products" for missing product names and "0.2" for missing confidence levels. The repaired structured output is then re-parsed using the first format parsing. If parsing is successful, the format repair result is marked as "repair successful," and the core fields are determined based on the parsing result. If unresolved syntax errors remain after repair, such as completely corrupted core fields or structural collapse, the result is marked as "repair failed."

[0063] In one possible embodiment, if the format repair result indicates repair failure, a preset parsing result is obtained, and the first intent type, first product name, and first confidence level are determined based on the preset parsing result. The data in the preset parsing result library has been verified by the task scenario. For example, the first intent type is set to "general consultation" by default, the first product name is set to "general product" by default, and the first confidence level is set to "0.2" by default. These default values ​​conform to the task logic, avoid process interruption due to parsing failure, provide processable data for subsequent verification stages, and ensure the continuity of the task routing process.

[0064] In this embodiment, the target data exchange format is accurately identified to achieve multi-format compatible parsing and adapt to the output habits of different large models. Through a layered parsing strategy, the problem of non-standard formats is solved step by step, reducing the probability of parsing failure and improving the fault tolerance compared to a single parsing method. The syntax correction and field completion in the format repair can fix most common format errors and further improve the success rate of core field extraction. The pre-set parsing result fallback mechanism ensures that the process is not interrupted in extreme scenarios, ensuring stable operation and thus improving the reliability and efficiency of the entire task routing determination method.

[0065] Optionally, step S203, verifying the first intent type, the first product name, and the first confidence level to obtain the target intent type, the target product name, and the target confidence level, may include the following steps: Step S401: Based on the first intent type and the preset intent type library, perform a first matching verification on the first intent type, and determine the target intent type based on the verification result of the first matching verification; Step S402: Based on the first product name and the preset product list, perform a second matching verification on the first product name, and determine the target product name based on the verification result of the second matching verification; Step S403: Based on the first confidence level and the preset confidence interval, perform a third matching verification on the first confidence level, and determine the target confidence level based on the verification result of the third matching verification.

[0066] Specifically, the preset intent type library is a pre-configured standardized set of task-related intent categories, including intent type names, synonym mapping tables, and task attribute descriptions; the first matching verification is a process of validating and standardizing the first intent type based on the preset intent type library; the second matching verification is a process of verifying the accuracy and standardizing the first product name by combining a preset product list and using a multi-pattern matching algorithm; the preset confidence interval is a preset numerical range used to determine the validity of the confidence level, for example, the range of 0 to 1; the third matching verification is a process of verifying the numerical validity of the first confidence level and correcting outliers.

[0067] For the first intent type, the first matching verification is divided into two levels: the first level is exact matching, which compares the first intent type with the standard names in the preset intent type library to ensure complete consistency. If the match is successful, the standard name is directly identified as the target intent type. If the exact matching fails, the second level, semantic similarity matching, is entered. Using a pre-trained semantic model, such as a BERT-based text similarity calculation model, the semantic similarity between the first intent type and each standard intent type in the preset intent type library is calculated. If the highest similarity value exceeds the preset similarity threshold, such as 0.85, the corresponding standard intent type is identified as the target intent type. If the highest similarity value is lower than the preset threshold, "General Consultation" in the preset intent type library is taken as the target intent type.

[0068] For example, if the first intent type is "refund application", and the synonym mapping table of "return application" in the preset intent type library contains "refund application", then after exact matching verification, the target intent type is determined to be "return application"; if the first intent type is "product fault handling", and after semantic similarity matching, the similarity with "technical repair" is 0.92, which exceeds the threshold of 0.85, then the target intent type is determined to be "technical repair"; if the first intent type is "irrelevant expression", and the similarity with all standard intent types is less than 0.85, then the target intent type is determined to be "general consultation".

[0069] For the first confidence level, a third matching verification is performed based on the preset confidence range of 0~1. First, it is confirmed whether the first confidence level is a valid value, such as whether it is a number or whether there are non-numeric characters. If it is an invalid value, the preset default confidence level, such as 0.2, is directly determined as the target confidence level. If it is a valid value, it is further checked whether it is within the preset confidence range: if the first confidence level is within the range of 0~1, it is directly determined as the target confidence level; if the first confidence level is greater than 1, the target confidence level is corrected to 1, i.e., the upper limit of the range; if the first confidence level is less than 0, the target confidence level is corrected to 0, i.e., the lower limit of the range.

[0070] In this embodiment, precise verification and standardized correction across multiple dimensions and levels reduce the number of times users need to clarify and improve task processing efficiency.

[0071] For the first product name, optionally, the second matching verification includes at least one of the following: exact matching, edit distance matching, and semantic similarity matching; step S402, based on the first product name and the preset product list, performs a second matching verification on the first product name, and determines the target product name based on the verification result of the second matching verification, which may include the following steps: Step S501: Perform exact matching between the first product name and each product name in the preset product list to obtain the exact matching result; Step S502: If the exact match result indicates a successful match, use the product name corresponding to the exact match result as the target product name; Step S503: If the exact match result indicates that the match failed, perform edit distance matching on the first product name, calculate the edit distance between the first product name and each product name in the preset product list, and obtain multiple edit distances; Step S504: If there is a second product name among multiple edit distances whose edit distance is less than the preset edit distance, use the second product name as the target product name; Step S505: If each edit distance in the multiple edit distances is greater than or equal to the preset edit distance, perform semantic similarity matching on the first product name, calculate the semantic similarity between the first product name and each product name in the preset product list, and obtain multiple semantic similarities; Step S506: If there is a third product name among multiple semantic similarities that has a semantic similarity greater than the preset semantic similarity, the third product name shall be used as the target product name; Step S507: If each semantic similarity among multiple semantic similarities is less than or equal to the preset semantic similarity, obtain the preset product name and use the preset product name as the target product name.

[0072] Specifically, exact match is a matching method where the first product name and the product names in the preset product list are completely identical in characters; the exact match result includes the matching status identifier output after the exact match and the corresponding matched product name; edit distance is the minimum number of character insertions, deletions, or replacements required to convert the first product name into a product name in the preset product list; preset edit distance is a pre-set threshold used to determine the validity of edit distance matching, for example, it can be 2; semantic similarity is a quantitative value of the degree of semantic association between the first product name and the product names in the preset product list calculated by a semantic model; preset semantic similarity is a pre-set threshold used to determine the validity of semantic similarity matching, for example, it can be 0.8; preset product name is a pre-configured fallback product name used in scenarios where matching fails, such as "general products".

[0073] In one possible implementation, if a product name is found to be completely identical to the preprocessed name of the first product name, the matching status is marked as "match successful," and the product name is appended; if no product name is found to be completely identical, the status is marked as "match failed." If the exact matching result is "match successful," the product name corresponding to that result is directly determined as the target product name, ensuring matching efficiency and accuracy.

[0074] If the exact match result is "match failed," such as the first product name being "Qwen7B Enterprise Edition" and missing the character "-," an edit distance match is performed. The edit distance calculation algorithm is called to generate the edit distance between the first product name and each product name in the preset product list. For example, the edit distance between the first product name "Qwen7B Enterprise Edition" and "Qwen-7B Enterprise Edition" in the preset product list is 1, so the character "-" needs to be inserted; the edit distance with "Qwen-7B Basic Edition" is 3, so "-" needs to be inserted and "Basic Edition" replaced with "Enterprise Edition," resulting in multiple edit distance values. These multiple edit distances are compared with a preset edit distance, such as 2. If there is at least one product name with an edit distance smaller than the preset edit distance (i.e., the second product name), then that second product name is determined as the target product name.

[0075] If multiple second product names meet the criteria, such as the first product name "Qwen-7 Enterprise Edition" having an edit distance of 1 from "Qwen-7B Enterprise Edition" and 1 from "Qwen-7C Enterprise Edition", the product name with the smallest edit distance will be selected as the target product name. If the edit distances are equal, further filtering will be performed based on the contextual information of historical dialogue text or the first task text. For example, if the user has mentioned "B series products" in historical dialogue, "Qwen-7B Enterprise Edition" will be selected as the target product name.

[0076] If all edit distances are greater than or equal to the preset edit distance, such as the first product name being "Tongyi 7B Enterprise Edition" with an edit distance of 3 compared to "Qwen-7B Enterprise Edition" in the preset product list, exceeding the threshold of 2, semantic similarity matching is performed. For example, the first product name and each product name in the preset product list can first be converted into vector forms recognizable by a pre-trained semantic model. Then, the semantic similarity between each pair of vectors is calculated using a cosine similarity algorithm, resulting in multiple semantic similarity quantifications. The pre-trained semantic model can be a semantic encoding model based on BERT or Qwen. For example, the semantic similarity between the first product name "Tongyi 7B Enterprise Edition" and "Qwen-7B Enterprise Edition" is 0.85, and the semantic similarity with "Qwen-7B Basic Edition" is 0.7, ultimately generating multiple semantic similarity results. These multiple semantic similarities are compared with a preset semantic similarity of 0.8. If at least one product name has a semantic similarity greater than the preset threshold, i.e., the third product name, then that third product name is determined as the target product name. If multiple third-party product names meet the criteria, the product name with the highest semantic similarity is selected as the target product name. If multiple products have the same highest semantic similarity value, auxiliary factors such as product popularity and user historical interaction preferences are considered when making the selection. For example, if the semantic similarity between "Qwen-7B Enterprise Edition" and "Qwen-7B Professional Edition" is 0.86, and the user has previously purchased the "Enterprise Edition" product, then "Qwen-7B Enterprise Edition" is selected as the target product name.

[0077] If all semantic similarities are less than or equal to the preset semantic similarity, such as the first product name being "Unknown Intelligent Model" and having a semantic similarity of less than 0.8 with all product names in the preset product list, a preset product name, such as "General Product," is directly retrieved from the preset configuration and designated as the target product name. The purpose of this preset product name is to avoid interrupting the subsequent routing decision process due to product name matching failures, and to provide a basic identifier for subsequent task processing, ensuring that task execution can proceed according to general logic.

[0078] In this embodiment, the accuracy of product identification is improved. Precise matching ensures rapid and accurate identification of standardized product names, improving matching efficiency. Edit distance matching covers scenarios such as spelling errors, character redundancy, or missing characters, addressing the shortcomings of traditional rule-based matching's excessively high requirements for character standardization. Semantic similarity matching achieves semantic association between product aliases, non-standard expressions, and standard product names, overcoming the limitations of character-level matching. The fallback mechanism of preset product names ensures the continuity of the process in extreme scenarios, enhancing stability. Furthermore, each matching threshold and algorithm can be dynamically adjusted according to the task scenario, exhibiting strong adaptability and effectively solving the problem of inaccurate product identification in existing technologies.

[0079] Optionally, step S104, determining the target confidence threshold based on the historical dialogue text, the first task text, and the target product name, may include the following steps: Step S601: Determine the interaction rounds of the historical dialogue text based on the historical dialogue text; Step S602: Based on the historical dialogue text and the first task text, determine the time interval between the first task text and the previous text of the first task text; Step S603: Obtain the product complexity level corresponding to the target product name; Step S604: Assign weights to the interaction rounds, time intervals, and product complexity levels to obtain the dialogue length weight, time decay coefficient, and product complexity factor; Step S605: Determine the target adjustment value based on the dialogue length weight, time decay coefficient, and product complexity factor; Step S606: Adjust the initial confidence threshold according to the target adjustment value to obtain the target confidence threshold.

[0080] Specifically, the interaction round is the number of effective dialogues with the user in the historical dialogue text; the time interval is the time difference between the first task text and the last interaction text in the historical dialogue text, i.e., the text preceding the first task text; the product complexity level is a level divided according to the functional complexity and task process complexity corresponding to the target product name, which can be divided into low complexity, medium complexity, and high complexity; the dialogue length weight is a weight coefficient assigned based on the interaction round and used to adjust the threshold; the time decay coefficient is a coefficient assigned based on the time interval and reflects the impact of the timeliness of historical information on the threshold; the product complexity factor is a threshold adjustment factor determined based on the product complexity level and adapted to the product characteristics; the initial confidence threshold is a preset initial confidence critical value used as an adjustment benchmark. In this embodiment, two initial confidence thresholds are used as examples, which can be 0.6 and 0.3 respectively.

[0081] In one possible embodiment, historical dialogue is parsed, the historical dialogue text is structured, and the number of valid interaction rounds is counted according to the logical units of the text sent and responded by the user. A single logical unit is counted as one round of interaction. If there are cases where the user sends text or responds continuously, it is still counted as one round of interaction.

[0082] In one possible implementation, the generation timestamp of the first task text is first extracted, and then the timestamp of the last interaction text is extracted from the historical dialogue text. The time interval is then calculated using a time difference algorithm. If the historical dialogue text is empty, the time interval is set to the maximum value by default, indicating that there is no valid historical information to support it.

[0083] In one possible embodiment, a preset product complexity level mapping table is retrieved. This table pre-associates each product name in a preset product list with a corresponding complexity level. The level classification is based on factors such as the number of product functions, task processing steps, and configuration parameter complexity. For example, basic software tools like the Qwen-7B Basic Edition, with its simple functions and processes, are classified as low complexity; enterprise-level solutions like the Qwen-7B Enterprise Edition, with its rich features and complex processes, are classified as medium complexity; and customized development products like the Qwen Custom Edition, with its complex configuration and the need for multi-department collaboration, are classified as high complexity. By precisely matching the target product name with the mapping table, the corresponding product complexity level is directly determined.

[0084] In one possible embodiment, a preset weighting rule is used to determine corresponding coefficients based on the number of interaction rounds, time intervals, and product complexity levels. For the dialogue length weight, more interaction rounds indicate richer historical information, resulting in a smaller weight coefficient (negative value), indicating a stronger downward impact of historical information on the threshold. For the time decay coefficient, shorter time intervals indicate newer historical information, resulting in a smaller coefficient (negative value), indicating higher reference value of historical information and a stronger downward impact on the threshold. For the product complexity factor, higher complexity levels result in a larger factor value (positive value), indicating a higher confidence threshold is needed to ensure routing accuracy and a stronger upward impact on the threshold.

[0085] Specifically, the coefficients of each dimension are set with positive and negative values ​​according to the direction of influence. Negative values ​​are threshold adjustment factors, which are used to lower the confidence threshold and make the threshold easier to reach. Positive values ​​are threshold adjustment factors, which are used to increase the confidence threshold and make the threshold more difficult to reach. The larger the absolute value of the value, the stronger the adjustment of the threshold by that dimension. Among them, the dialogue length weight is a threshold reduction factor, taking a negative value. The more rounds of interaction, the richer the historical information, and the larger the absolute value of the negative weight, resulting in a stronger reduction in the threshold. For example, 0 rounds of interaction result in a value of 0, 1-2 rounds in -0.1, 3-4 rounds in -0.2, and 5-6 rounds in -0.3. For instance, if a user's historical dialogues consist of 4 rounds, the weight for this dimension would be -0.2. The time decay coefficient is also a threshold reduction factor, taking a negative value. The shorter the time interval between the first task text and the previous dialogue, the stronger the timeliness of the historical information, and the larger the absolute value of the negative coefficient, resulting in a stronger reduction in the threshold. Specifically, when the time interval is ≤30 minutes, the value is [value missing]. The coefficient is -0.3 for 30 minutes to 2 hours, -0.2 for 2 to 12 hours, and -0.1 for time intervals greater than 12 hours. For example, if the interval between the first task text and the previous dialogue is 1.5 hours, the coefficient for this dimension is -0.2. The product complexity factor is a threshold adjustment factor, which takes a positive value. The higher the complexity of the target product, the higher the requirement for the accuracy of intent and product recognition, the larger the positive value of the factor, and the stronger the adjustment of the threshold. For example, the value is 0 for a basic tool with low complexity, 0.2 for a medium-complexity enterprise software, and 0.3 for a customized solution with high complexity. For example, if the target product name is Qwen customized version, the factor for this dimension can be 0.3.

[0086] The target adjustment value can be the sum of the dialogue length weight, time decay coefficient, and product complexity factor. For example, the target adjustment value = dialogue length weight + time decay coefficient + product complexity factor. Alternatively, the dialogue length weight, time decay coefficient, and product complexity factor can be weighted and summed first. For instance, if the weights of the dialogue length weight, time decay coefficient, and product complexity factor are 0.4, 0.3, and 0.3 respectively, the target adjustment value = dialogue length weight × 0.4 + time decay coefficient × 0.3 + product complexity factor × 0.3. The initial confidence threshold is dynamically adjusted using the target adjustment value to obtain the target confidence threshold. First, a preset initial confidence threshold is retrieved, and then the target confidence threshold is calculated using the adjustment formula: Target confidence threshold = Initial confidence threshold + Target adjustment value.

[0087] For example, if there are 3 rounds of interaction, the corresponding dialogue length weight is -0.3; the time interval is 20 minutes, the corresponding time decay coefficient is -0.2; and the product complexity is medium, the corresponding product complexity factor is 0.2. Then the target adjustment value can be the sum of -0.3, -0.2 and 0.2, which is -0.3.

[0088] If the weights for dialogue length, time decay coefficient, and product complexity factor are 0.4, 0.3, and 0.3 respectively, then the target adjustment value = (-0.3)×0.4 + (-0.2)×0.3 + 0.2×0.3 = -0.12 - 0.06 + 0.06 = -0.12. Correspondingly, for initial confidence thresholds of 0.6 and 0.3, the adjusted target confidence thresholds are 0.48 and 0.18.

[0089] In this embodiment, the richness and timeliness of historical information are quantified based on the number of historical dialogue interaction rounds and time intervals. Combined with the product complexity level, different task characteristics are adapted, breaking through the limitations of traditional fixed thresholds. The dynamically generated target confidence threshold can be highly matched with the current task scenario, effectively improving the routing accuracy of high confidence scenarios and the processing rationality of medium and low confidence scenarios, thereby reducing the number of times users need to clarify and improving response efficiency.

[0090] Optionally, the target task routing includes at least one target execution module and at least one target execution operation, wherein the at least one target execution operation is an instruction adapted to the at least one target execution module, used to drive the at least one target execution module to perform an operation corresponding to the target intent type and the target product name; step S105, processing the target intent type and the target product name according to the target confidence level and the target confidence threshold to obtain the target task routing of the first task text, may include the following steps: Step S701: Determine the confidence level corresponding to the target confidence level based on the target confidence threshold; Step S702: If the confidence level is the first confidence level, determine at least one target execution module and at least one target execution operation based on the target intent type and the target product name; Step S703: If the confidence level is the second confidence level, generate a query text for the target intent type and the target product name, obtain the user's response text based on the query text, adjust the target intent type and the target product name according to the response text to obtain the adjusted intent type and product name, and determine at least one target execution module and at least one target execution operation based on the adjusted intent type and product name; the second confidence level is lower than the first confidence level. Step S704: If the confidence level is the third confidence level, obtain at least one preset execution module and at least one preset execution operation according to the target intent type and target product name, and use the at least one preset execution module as at least one target execution module and the at least one preset execution operation as at least one target execution operation; the third confidence level is lower than the second confidence level.

[0091] Specifically, the first confidence level corresponds to high confidence scenarios; the second confidence level corresponds to medium confidence scenarios; and the third confidence level corresponds to low confidence scenarios. The query text is a confirmatory interactive text generated based on the target intent type and target product name, used to verify information with the user. The response text is the confirmation or correction information provided by the user based on the query text. The preset execution module is a pre-configured general-purpose execution module used in low confidence scenarios. The preset execution operation is a basic operation instruction adapted to the preset execution module and used to handle general needs.

[0092] In one possible implementation, if the target confidence threshold includes a first target confidence threshold and a second target confidence threshold, and the first target confidence threshold is greater than the second target confidence threshold, then if the target confidence is greater than the first target confidence threshold, it is determined to be at the first confidence level, indicating that the target intent type and target product name output by the large model are highly accurate and can be directly routed without user confirmation; if the target confidence is between the first and second target confidence thresholds, it is determined to be at the second confidence level, indicating that the accuracy of the information needs further verification; if the target confidence is less than the second target confidence threshold, it is determined to be at the third confidence level, indicating that the reliability of the information is low and a general routing strategy is needed as a fallback. For example, if the first target confidence threshold is 0.6 and the second target confidence threshold is 0.3, if the target confidence is 0.85, it is determined to be at the first confidence level; if the target confidence is 0.45, it is determined to be at the second confidence level; and if the target confidence is 0.2, it is determined to be at the third confidence level.

[0093] For the first confidence level, a pre-defined mapping table between intents, products, modules, and operations is retrieved. This mapping table pre-defines each combination of intent type and product name, associating it with a corresponding dedicated target execution module and a matching target execution operation. The dedicated target execution module is a functional module with specific task processing capabilities, such as a product operation support module or a sales consultation service module. The target execution operation is a standardized task action instruction from this module for a specific intent and product. By querying the combination of target intent type and target product name, at least one corresponding target execution module and at least one target execution operation are precisely matched from the mapping table, forming a target task route. For example, if the target intent type is "return application" and the target product name is "Qwen-7B Enterprise Edition," then the target execution module matched from the mapping table is "Product Operation Support Module," and the target execution operation is "Retrieve Qwen-7B Enterprise Edition order information, verify return eligibility, initiate return process, and provide processing progress feedback." This target execution operation serves as an adaptation instruction, driving the product operation support module to complete the entire return processing process. If there are complex tasks that require collaboration among multiple modules, such as "customized product consultation" and "solution quotation", then multiple target execution modules are matched, such as the sales consultation service module and the product solution design module, and the corresponding multiple target execution operations.

[0094] For the second confidence level, the query text is first generated using a natural language generation model based on the target intent type and target product name. The query text must clearly verify the core information and avoid vague expressions. For example, if the target intent type is "return application" and the target product name is "Qwen-7B Enterprise Edition," the generated query text could be: "Hello, do you need to process a return of your Qwen-7B Enterprise Edition? Please confirm or provide further details about your needs." If the target product name is ambiguous, such as "Qwen-7B series," the query text could be: "Hello, is the Qwen-7B series you mentioned specifically the Basic, Enterprise, or Professional version? Do you need to process a return of this product?" The system pushes inquiry text through a user interaction interface and receives real-time user feedback text. If the response text is a confirmation, such as "Yes" or "Confirm Return," the target intent type and target product name remain unchanged. If the response text is a correction, such as "Not a Return, but an Exchange" or "It's the Qwen-7B Basic Edition," the system combines the corrected response text to obtain an adjusted intent type, such as "Exchange Request," and an adjusted product name, such as "Qwen-7B Basic Edition." Finally, based on the adjusted intent type and product name, the system queries a mapping table to determine the corresponding target execution module and target execution operation, forming a target task route. For example, if the adjusted intent type is "Exchange Request" and the product name is "Qwen-7B Basic Edition," the matched target execution module is "Product Operation Support Module," and the target execution operation is "Verify Qwen-7B Basic Edition Exchange Eligibility, Generate Exchange Request Form, Notify Logistics Coordination."

[0095] For the third confidence level, based on the characteristics of the target intent type and the target product name, at least one suitable preset execution module is retrieved from the preset execution module library. These preset execution modules are modules with general task processing capabilities, such as general question answering modules and manual transfer preprocessing modules. They have broad coverage, strong compatibility, and can handle various uncertain needs. Simultaneously, at least one preset execution operation is matched to the preset execution module. This operation is used to record the need, provide a basic response, and provide clear guidance to avoid processing errors due to ambiguous information. For example, if the target intent type is "unknown consultation" and the target product name is "general product," then the preset execution module "general question answering module" is retrieved, and the preset execution operation is "record the user's current need keywords, provide feedback 'Your consultation has been received. To provide you with more accurate service, please provide details about the product model and specific needs,' and simultaneously save the interaction log for later traceability." If the target intent type is suspected to be "technical fault" but the confidence level is low, then the preset execution module "technical repair guidance module" is retrieved, and the preset execution operation is "push common technical fault troubleshooting guides, prompt the user to provide a description of the fault phenomenon, and reserve a manual transfer entry point."

[0096] In this embodiment, hierarchical routing decisions and differentiated processing strategies improve the accuracy, efficiency, and stability of task routing. The first confidence level of direct and accurate routing avoids unnecessary user interactions and improves task processing efficiency in high-confidence scenarios. The second confidence level of user confirmation and information correction mechanism reduces routing errors in medium-confidence scenarios, ensuring the accuracy of intent and product information. The third confidence level of universal fallback routing avoids process interruptions due to unreliable information, enhancing fault tolerance and stability.

[0097] In a specific embodiment, see Figure 3 , Figure 3 This is a flowchart of a task routing decision provided in an embodiment of this application. In the input preprocessing stage, this stage includes three parallel operations: historical dialogue formatting, query text cleaning, and product list loading. Historical dialogue formatting standardizes the historical dialogue text; query text cleaning performs noise reduction and format unification on the first task text submitted by the user; and product list loading retrieves a preset product list. After input preprocessing, the large-scale model inference stage includes three operations: prompt word template construction, asynchronous model invocation, and structured output generation. Prompt word template construction fills the preprocessed first task text, historical dialogue text, and preset product list into a preset prompt word template to generate input text recognizable by the large-scale model; structured output generation drives the large-scale model to output a structured result containing the target intent type, target product name, and target confidence level. In the JSON parsing and validation stage, direct JSON parsing is first performed. If parsing fails, regular expression matching is triggered. If regular expression matching fails, format repair processing is performed. If repair fails, field integrity verification is performed to ensure that the core fields of the structured result are not missing. After JSON parsing and validation, the confidence assessment stage includes three verification operations: probability value range correction, intent type validation, and product name validation. Probability value range correction ensures the confidence level is within the valid range of 0-1; intent type validation verifies the format compliance of intent and other information; and product name validation matches a preset product list to confirm the accuracy of product information. In the routing decision stage, based on the confidence assessment results, the task is divided into three routing strategies: high-confidence routing corresponds to scenarios with a confidence level greater than 0.6; medium-confidence routing corresponds to scenarios with a confidence level between 0.3 and 0.6; and low-confidence routing corresponds to scenarios with a confidence level less than 0.3. After determining the routing strategy, the task execution stage includes three operations: module invocation, response generation, and result return. Module invocation matches the corresponding execution module according to the routing strategy; response generation generates user-acceptable feedback content based on the module processing results; and result return pushes the response content to the user's device.

[0098] Furthermore, for confidence-based routing decisions, see [reference needed]. Figure 4 , Figure 4 This is a flowchart of a confidence routing decision provided in an embodiment of this application. The three types of pre-processing modules before the confidence threshold determination correspond to different dimensions of information preparation. In the confidence calculation, modules include the original model output, historical context analysis, and product matching evaluation, responsible for outputting initial confidence data, analyzing user historical interaction background, and evaluating the accuracy of product matching. In the threshold adaptive adjustment, modules include dialogue length weight, product complexity factor, and time decay coefficient, responsible for providing weighting parameters for the target confidence threshold calculation. In the anomaly detection mechanism, modules include JSON parsing failure detection, field missing detection, and numerical out-of-bounds checks, responsible for judging the compliance and completeness of confidence-related data. The processing results from the pre-processing module are aggregated at the confidence threshold judgment stage. Based on the multi-dimensional input data, the confidence level can be divided into three categories, and corresponding routing strategies are matched accordingly. High-confidence routing corresponds to a direct routing strategy, which includes three operations: no clarification inquiry, rapid response, and precise module invocation. That is, without additional user confirmation, the corresponding module is directly invoked and the result is quickly fed back. Medium-confidence routing corresponds to an intelligent clarification strategy, which includes three operations: confirmatory inquiry, gradual processing, and context-aware clarification. That is, the user's needs are verified through inquiry, and the corresponding module is determined step by step based on the context. Low-confidence routing corresponds to a general routing strategy, which includes three operations: basic clarification questions, general module processing, and preparation for manual transfer. That is, the needs are clarified through basic inquiry, general modules are invoked first, and manual customer service is transferred when necessary. The execution results of the three routing strategies are ultimately aggregated at the task execution stage to complete the specific task processing operations.

[0099] See Figure 5 , Figure 5This is a flowchart of a product identification method provided in an embodiment of this application. First, a user query and a product list are input to obtain the query text containing product information submitted by the user, while a preset product list is loaded. After input, a precise match check is performed, matching the product information in the user query with the product list at the character level. If a match is successful, the operation of returning the matched product is executed, and the precisely matched product result is output. If a match fails, edit distance matching is performed, calculating the character edit distance between the user's query product and each product in the product list. It is determined whether the edit distance is less than or equal to the corresponding threshold. If so, the operation of returning the most similar product is executed, and the product result with the smallest edit distance is output. If not, semantic similarity matching is performed, calculating the semantic association degree between the user's query product and each product in the product list using a semantic model, and calculating semantic similarity. After semantic similarity calculation, it is determined whether the similarity is greater than the corresponding threshold. If so, the operation of returning the semantically matched product is executed, and the product result with the highest semantic similarity is output. If not, the operation of returning an empty value is executed, indicating that no matching product was found.

[0100] See Figure 6 , Figure 6 This is a flowchart of a structured result parsing method provided in an embodiment of this application. First, the structured result output by the large model is directly parsed as JSON. The parsing is then checked for success; if successful, the parsing result is returned directly. If not, regular expression matching is performed, and preset regular expression rules are called to extract information. After regular expression matching, the matching is checked for success; if successful, the JSON object is extracted, and the fields are checked for completeness. If successful, the parsing result is returned. If the result is not successful, or the regular expression matching fails (corresponding to a no-response result), format repair is performed. Format repair includes three specific operations: correcting trailing commas, converting single quotes to double quotes, and completing missing fields, correcting syntax errors and missing fields in the structured result. After format repair, the repair is checked for success; if successful, the parsing result is returned. If not, a default value is returned. Then, the output of the returned parsing result or default value is verified and corrected, specifically including three verification operations: probability value range limitation, intent type verification, and product name verification, to ensure the compliance and accuracy of the parsing result.

[0101] In a specific embodiment, after receiving the target task route, the multiplexing scheduler of the decision routing layer allocates execution priorities according to the execution module type. The execution module type can include dedicated modules and general modules, with dedicated modules having higher processing priority than general modules. For example, the product operation support module has a higher processing priority than the general problem response module. The multiplexing scheduler sends instructions to the target execution module through the module communication interface and monitors the module execution status in real time. If the module execution times out, such as not responding for more than 5 seconds, it automatically switches to a backup module or triggers a manual transfer mechanism.

[0102] In different application scenarios, parameters can be configured and modules adapted to suit multiple fields.

[0103] For example, in an intelligent customer service system scenario, to adapt to the customer service needs of e-commerce platforms, the preset intent type library can include order inquiry, return and refund, logistics tracking, product consultation, etc., and the preset product list is a collection of products sold on the platform. For example, if a user enters "My Qwen-7B basic version hasn't been shipped yet, can you urge them?", the system can identify the target intent type "logistics tracking" and the target product name "Qwen-7B basic version". With high confidence, the system will route to the "logistics service module" and execute the operations "query order logistics status, trigger order urge instruction, and provide feedback on logistics progress".

[0104] For example, in the scenario of an intelligent tutoring system in the education field, to adapt to the tutoring needs of online education platforms, the preset intent type library can include course consultation, registration and payment, homework tutoring, grade inquiry, etc., and the preset product list is a collection of platform courses, such as "Python Programming Introduction Course" and "AI Basic Practical Course". For example, if a user enters "I want to enroll in your AI practical course, how do I pay?", the historical dialogue shows that the user has previously consulted the course outline. After dynamically adjusting the threshold, it is determined to be of high confidence and routed to the "Registration and Payment Module" to perform the operations "display payment methods, generate payment link, and synchronize registration information".

[0105] For example, in a preliminary triage system for medical diagnosis, to adapt to the online triage needs of hospitals, the preset intent type library can include symptom consultation, department search, appointment booking, report interpretation, etc., and the preset product list can include hospital departments and corresponding medical services, such as "Respiratory Medicine - Cold Treatment" and "Orthopedics - Fracture Treatment". For example, if a user enters "I have been coughing and have a fever recently, and I want to book an appointment with a relevant department", the system can identify the target intent type "appointment booking" and the target product name "Respiratory Medicine - Cold Treatment". With medium confidence, the system generates the query text "How long have you had your cough and fever symptoms? Do you have any other discomfort?". If the user replies "3 days, accompanied by a sore throat", the system will adjust the route to the "Respiratory Medicine Triage Module" and perform the operation "Recommend a respiratory medicine doctor and open the appointment booking portal".

[0106] In this embodiment, a multi-dimensional intent recognition mechanism integrating historical context is constructed based on large-scale model intent classification. Compared with traditional rule-based methods, this improves the accuracy and robustness of intent classification and solves the challenges of complex semantics and contextual understanding. By applying a three-level confidence threshold and adaptive adjustment strategy in the dynamic confidence routing method, combined with a historical dialogue awareness decision-making mechanism, it can accurately adapt to the confidence requirements of different scenarios. At the same time, it makes full use of dialogue history information, reducing the number of user clarifications and repeated inquiries, thus improving dialogue efficiency. The intelligent product entity extraction technology adopts a combination of semantic understanding and fuzzy matching to address issues such as spelling errors and product aliases, enhancing the accuracy of product name recognition. The multi-round JSON parsing guarantee mechanism, as a layered parsing scheme, improves the error recovery capability in parsing anomaly scenarios, thereby enhancing overall stability. The asynchronous multi-task routing architecture supports multi-task parallel processing, optimizes the agent scheduling logic, shortens response time, and improves operating efficiency.

[0107] In summary, in this embodiment, the user's first task text, historical dialogue text, and preset product list are first obtained. The first task text includes the initial product name described by the user, the historical dialogue text is the interaction text with the user before the first task text, and the preset product list includes multiple product names. Then, the first task text, historical dialogue text, and preset product list are filled into a preset prompt word template to obtain the first prompt word text. Next, the target intent type, target product name, and target confidence are determined based on the first prompt word text and the preset big model. The target product name is the product name corresponding to the initial product name among multiple product names, and the target confidence is used to reflect the confidence value of the preset big model for the target intent type and target product name. Then, the target confidence threshold is determined based on the historical dialogue text, the first task text, and the target product name. Finally, the target intent type and target product name are processed based on the target confidence and the target confidence threshold to obtain the target task route of the first task text. Therefore, by determining the target confidence level and the target confidence level threshold, and then adopting differentiated processing methods to determine the target task route when the target confidence level is different, the routing error problem caused by intent recognition deviation is avoided. At the same time, the process redundancy caused by repeated routing is avoided, and the problem of low task execution efficiency caused by low routing accuracy in traditional technology is solved. When interacting with users on tasks, the task execution efficiency can be improved.

[0108] The methods of the embodiments of the present invention have been described in detail above, and the apparatus of the embodiments of the present invention is provided below.

[0109] See Figure 7 , Figure 7 This is a schematic diagram of the structure of a task routing determination device provided in an embodiment of this application. Figure 7 As shown, the task routing determination device 800 includes an acquisition unit 801 and a processing unit 802. The acquisition unit 801 is used to acquire the user's first task text, historical dialogue text, and preset product list. The first task text includes the initial product name described by the user. The historical dialogue text is the interaction text between the user and the first task text before the interaction time. The preset product list includes multiple product names. The processing unit 802 is used to fill the first task text, historical dialogue text, and preset product list into a preset prompt word template to obtain the first prompt word text. Based on the first prompt word text and a preset big model, the processing unit 802 determines the target intent type, target product name, and target confidence level. The target product name is the product name corresponding to the initial product name among multiple product names. The target confidence level reflects the confidence value of the preset big model for the target intent type and target product name. Based on the historical dialogue text, the first task text, and the target product name, the processing unit 802 determines the target confidence level threshold. Based on the target confidence level and the target confidence level threshold, the processing unit processes the target intent type and target product name to obtain the target task route of the first task text.

[0110] In specific implementations, the acquisition unit 801 and the processing unit 802 in this application embodiment can also execute other implementations described in the task routing determination method of this application embodiment, which will not be repeated here.

[0111] See Figure 8 , Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 8 As shown, the electronic device 900 includes a transceiver 901, a processor 902, and a memory 903, which are connected via a bus 904. The memory 903 stores computer programs and data, and can transmit the data stored in the memory 903 to the processor 902. The electronic device 900 can be the task routing determination device 800 described above, and the processor 902 can be the acquisition unit 801 and processing unit 802 described above. In this embodiment, the processor 902 is used to read the computer program in the memory 903 and execute some or all of the steps of the task routing determination method described above.

[0112] This application also provides a computer-readable storage medium storing a computer program that is executed by a processor to implement some or all of the steps of any of the task routing determination methods described in the above method embodiments.

[0113] This application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the task routing determination methods described in the above method embodiments.

[0114] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to this application.

[0115] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0116] In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules 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 devices or modules may be electrical or other forms.

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

[0118] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules described above can be implemented in hardware or as software program modules.

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

[0120] The embodiments of this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for determining task routes, characterized in that, include: The system retrieves the user's initial task text, historical dialogue text, and preset product list; the initial task text includes the user's description of the initial product name; the historical dialogue text consists of interaction texts with the user prior to the initial task text; and the preset product list includes multiple product names. Fill the first task text, the historical dialogue text, and the preset product list into the preset prompt word template to obtain the first prompt word text; The target intent type, target product name, and target confidence level are determined based on the first prompt text and the preset large model; the target product name is the product name that corresponds to the initial product name among the plurality of product names; the target confidence level is used to reflect the confidence value of the preset large model for the target intent type and the target product name; Based on the historical dialogue text, the first task text, and the target product name, determine the target confidence threshold; Based on the target confidence level and the target confidence threshold, the target intent type and the target product name are processed to obtain the target task route for the first task text.

2. The method as described in claim 1, characterized in that, The step of determining the target intent type, target product name, and target confidence level based on the first prompt word text and the preset large model includes: The preset large model is invoked to process the first prompt word text, resulting in a structured output including the first intent type, the first product name, and the first confidence level. The structured output is parsed to obtain the first intent type, the first product name, and the first confidence level. The first intent type, the first product name, and the first confidence level are verified to obtain the target intent type, the target product name, and the target confidence level.

3. The method as described in claim 2, characterized in that, The step of parsing the structured output to obtain the first intent type, the first product name, and the first confidence level includes: Based on the structured output results, determine the target data exchange format; According to the target data exchange format, the structured output result is parsed in a first format to obtain a first parsing result; If the first parsing result indicates successful parsing, the first intent type, the first product name, and the first confidence level are determined based on the first parsing result. If the first parsing result indicates parsing failure, a preset regular expression is invoked to perform second format parsing on the structured output result to obtain a second parsing result; If the second parsing result indicates successful parsing, the first intent type, the first product name, and the first confidence level are determined based on the second parsing result. If the second parsing result indicates parsing failure, the structured output result is subjected to format repair processing to obtain the format repair result; If the format repair result indicates successful repair, the first intent type, the first product name, and the first confidence level are determined based on the format repair result. If the format repair result indicates that the repair has failed, obtain the preset parsing result, and determine the first intent type, the first product name, and the first confidence level based on the preset parsing result.

4. The method as described in claim 2, characterized in that, The step of verifying the first intent type, the first product name, and the first confidence level to obtain the target intent type, the target product name, and the target confidence level includes: Based on the first intent type and the preset intent type library, a first matching verification is performed on the first intent type, and the target intent type is determined based on the verification result of the first matching verification. Based on the first product name and the preset product list, a second matching verification is performed on the first product name, and the target product name is determined based on the verification result of the second matching verification. Based on the first confidence level and the preset confidence interval, a third matching verification is performed on the first confidence level, and the target confidence level is determined based on the verification result of the third matching verification.

5. The method as described in claim 4, characterized in that, The second matching verification includes at least one of the following: exact matching, edit distance matching, and semantic similarity matching; the step of performing a second matching verification on the first product name based on the first product name and the preset product list, and determining the target product name based on the verification result of the second matching verification, includes: The first product name is precisely matched with each product name in the preset product list to obtain a precise matching result; If the exact match result indicates a successful match, the product name corresponding to the exact match result shall be used as the target product name; If the exact match result indicates a match failure, an edit distance match is performed on the first product name, and the edit distance between the first product name and each product name in the preset product list is calculated to obtain multiple edit distances; If there is a second product name among the plurality of edit distances whose edit distance is less than the preset edit distance, the second product name shall be used as the target product name; If each of the multiple edit distances is greater than or equal to the preset edit distance, semantic similarity matching is performed on the first product name, and the semantic similarity between the first product name and each product name in the preset product list is calculated to obtain multiple semantic similarities; If among the multiple semantic similarities, there is a third product name with a semantic similarity greater than the preset semantic similarity, the third product name shall be used as the target product name; If each of the multiple semantic similarities is less than or equal to the preset semantic similarity, a preset product name is obtained and used as the target product name.

6. The method according to any one of claims 1-5, characterized in that, The step of determining the target confidence threshold based on the historical dialogue text, the first task text, and the target product name includes: Based on the historical dialogue text, determine the interaction rounds of the historical dialogue text; Based on the historical dialogue text and the first task text, determine the time interval between the first task text and the previous text of the first task text; Obtain the product complexity level corresponding to the target product name; The interaction rounds, the time intervals, and the product complexity levels are weighted and assigned values ​​to obtain the dialogue length weight, the time decay coefficient, and the product complexity factor. The target adjustment value is determined based on the dialogue length weight, the time decay coefficient, and the product complexity factor; The initial confidence threshold is adjusted based on the target adjustment value to obtain the target confidence threshold.

7. The method as described in claim 6, characterized in that, The target task routing includes at least one target execution module and at least one target execution operation. The at least one target execution operation is an instruction adapted to the at least one target execution module, used to drive the at least one target execution module to perform an operation corresponding to the target intent type and the target product name. The step of processing the target intent type and the target product name according to the target confidence level and the target confidence threshold to obtain the target task routing for the first task text includes: Based on the target confidence threshold, determine the confidence level corresponding to the target confidence level; If the confidence level is the first confidence level, the at least one target execution module and the at least one target execution operation are determined based on the target intent type and the target product name; If the confidence level is the second confidence level, a query text is generated for the target intent type and the target product name; the user's response text based on the query text is obtained; the target intent type and the target product name are adjusted according to the response text to obtain the adjusted intent type and product name; and the at least one target execution module and the at least one target execution operation are determined based on the adjusted intent type and product name; the second confidence level is lower than the first confidence level. If the confidence level is the third confidence level, at least one preset execution module and at least one preset execution operation are obtained based on the target intent type and the target product name. The at least one preset execution module is used as the at least one target execution module, and the at least one preset execution operation is used as the at least one target execution operation. The third confidence level is lower than the second confidence level.

8. A task routing determination device, characterized in that, The device includes an acquisition unit and a processing unit; The acquisition unit is used to acquire the user's first task text, historical dialogue text, and preset product list; the first task text includes the initial product name described by the user; the historical dialogue text is the interaction text between the user and the first task text before the interaction time; the preset product list includes multiple product names. The processing unit is used to fill the first task text, the historical dialogue text and the preset product list into a preset prompt word template to obtain the first prompt word text. The target intent type, target product name, and target confidence level are determined based on the first prompt text and the preset large model; the target product name is the product name that corresponds to the initial product name among the plurality of product names; the target confidence level is used to reflect the confidence value of the preset large model for the target intent type and the target product name; Based on the historical dialogue text, the first task text, and the target product name, determine the target confidence threshold; Based on the target confidence level and the target confidence threshold, the target intent type and the target product name are processed to obtain the target task route for the first task text.

9. An electronic device, characterized in that, include: A processor and a memory, the processor being connected to the memory, the memory being used to store a computer program, the processor being used to execute the computer program stored in the memory to cause the electronic device to perform the method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, the computer program including program instructions that, when executed by a processor, cause the processor to perform the method as described in any one of claims 1-7.