Task-oriented dialogue method and customer service system

By constructing a knowledge base for real-person dialogue and a sequence of task parameters, and combining it with a large language model to guide the dialogue process, the problem of rigid interaction and uncontrollable process in task-oriented dialogues of intelligent customer service systems has been solved. This has achieved a combination of business logic and humanization, improving user experience and dialogue completion rate.

CN122332525APending Publication Date: 2026-07-03CHENGDU BOSS INNOVATION TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHENGDU BOSS INNOVATION TECH CO LTD
Filing Date
2026-04-13
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

Existing intelligent customer service systems struggle to balance business logic and human-like interaction in task-oriented dialogues. Traditional systems suffer from rigid interactions, while large-scale model systems exhibit uncontrollable processes.

Method used

By constructing a real-person dialogue knowledge base and task parameter sequence, and combining it with a large language model for dialogue, the dialogue process is guided by real-person dialogue reference templates and task parameter sequences. This ensures that each step of the dialogue has a clear task objective and response standard, and achieves humanization and business logic in the dialogue through parameter iteration and context information updates.

Benefits of technology

It achieves a combination of business logic and humanization in task-oriented dialogues, improving user experience and dialogue completion rate, ensuring that the dialogue process strictly follows the business path, and increasing user acceptance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122332525A_ABST
    Figure CN122332525A_ABST
Patent Text Reader

Abstract

This invention provides a task-oriented dialogue method and customer service system. The method includes: obtaining the current task parameters to be queried for the target task and a human-like dialogue reference template; constructing context information based on the current task parameters to be queried and the human-like dialogue reference template; having a large model engage in dialogue with the user based on the context information until the parameter information of the current task parameters to be queried is obtained from the user's response; when the parameter information is detected to be valid, generating the next task parameters to be queried; using the next task parameters to be queried as the new current task parameters to be queried, updating the context information, and returning to the step of having the large model engage in dialogue with the user based on the context information until the parameter information of the current task parameters to be queried is obtained from the user's response, until all valid parameter information of the target task's parameters is collected. This invention enables a task-oriented dialogue that balances business logic and human-like interaction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of large language model technology, and more specifically, to a task-oriented dialogue method and customer service system. Background Technology

[0002] With the rapid development of artificial intelligence technology, intelligent customer service systems have become an important part of e-commerce, logistics, and after-sales service. Especially in task-oriented dialogue scenarios that require strict process control, such as after-sales installation appointments and fault reporting, enterprises hope to reduce labor costs while maintaining high-quality service levels through automation systems.

[0003] Current intelligent customer service technologies mainly fall into two categories: The first is dialogue systems based on rules or traditional slot-filling techniques. These systems typically rely on predefined finite state machines (FSMs) or fixed dialogue trees. While they can mechanically ask users for information in a preset order in task-oriented dialogue scenarios, they suffer from obvious interaction rigidity, failing to flexibly respond to user interruptions, counter-questions, or casual conversations, resulting in a poor user experience. Furthermore, these systems lack emotional interaction capabilities, using fixed response templates and employing a stiff tone, easily leading users to recognize them as bots and develop a negative attitude. The second category is generative dialogue systems based on end-to-end Large Language Models (LLMs). These large models, utilizing the Transformer architecture, possess powerful semantic understanding and natural language generation capabilities, enabling fluent and natural responses. However, in strict business process scenarios, they often suffer from uncontrollable processes, digressions during dialogue, and deviations from the main business line, such as skipping key steps or "forgetting" business objectives during casual conversations with users. Although model behavior can be constrained by prompts, in long, multi-turn dialogues, the model may forget the initially set role constraints or have difficulty accurately reverting to the business process when faced with complex questions.

[0004] Therefore, how to provide a task-oriented dialogue method that balances business logic and human-like interaction is a technical problem that urgently needs to be solved in the field of intelligent customer service. Summary of the Invention

[0005] In view of this, one of the objectives of this invention is to provide a task-oriented dialogue method and customer service system that enables the task-oriented dialogue process between intelligent customer service and users to balance business logic and human-like interaction. To achieve the above objective, the technical solution adopted in the embodiments of this invention is as follows: In a first aspect, the present invention provides a task-oriented dialogue method, the method comprising: obtaining current task parameters to be queried for a target task and a real-person dialogue reference template; constructing context information based on the current task parameters to be queried and the real-person dialogue reference template; having a large model engage in dialogue with the user based on the context information until parameter information of the current task parameters to be queried is obtained from the user's response content; when the parameter information is detected to be valid, generating the next task parameters to be queried; using the next task parameters to be queried as the new current task parameters to be queried, updating the context information, and returning to the step of having the large model engage in dialogue with the user based on the context information until parameter information of the current task parameters to be queried is obtained from the user's response content, until all valid parameter information of all task parameters of the target task is collected.

[0006] In an optional implementation, obtaining the current task parameters to be queried and the real-person dialogue reference template for the target task includes: obtaining the user's response content in the previous round of dialogue; retrieving multiple real-person dialogue reference templates that match the response content from a pre-built real-person dialogue knowledge base; and determining the current task parameters to be queried from a pre-built sequence of task parameters for the target task based on the task parameter collection status; wherein the sequence of task parameters contains multiple task parameters, and the multiple task parameters are ordered according to the business logic order of the target task.

[0007] In an optional implementation, the large model engages in dialogue with the user based on the context information until the parameter information of the current task to be queried is obtained from the user's response. This includes: generating the current round of dialogue content based on the context information and sending it to the user; determining whether the user's current response content contains the parameter information; if it does, terminating the dialogue and extracting the parameter information; otherwise, determining the user's dialogue intent based on the current response content; generating intent response content based on the response strategy corresponding to the user's dialogue intent, and then conducting the next round of dialogue based on the current task to be queried until the parameter information is obtained.

[0008] In an optional implementation, the method further includes updating the context information using the user's responses in each round of dialogue.

[0009] In an optional implementation, before generating the next task parameter to be queried after detecting that the parameter information is valid, the method further includes: responding to the parameter collection tool call request of the large model and obtaining the parameter information from the parameter collection tool; determining whether the parameter information is consistent with a preset parameter format; if consistent, determining that the parameter information is valid and determining the next task parameter to be queried; otherwise, returning an error message to the large model.

[0010] In an optional implementation, when the parameter information is detected to be valid, generating the next task parameter to be queried includes: when the parameter information is detected to be valid, configuring a collected flag for the task parameter corresponding to the parameter information in the task parameter sequence; and generating the next task parameter to be queried based on the next task parameter of the task parameter corresponding to the parameter information.

[0011] In an optional implementation, generating the next task parameter to be queried based on the next task parameter corresponding to the parameter information includes: generating dialogue indication information based on the next task parameter; and generating the next task parameter to be queried based on the next task parameter, the dialogue indication information, and the feedback information of successfully collecting the parameter information.

[0012] In an optional implementation, constructing context information based on the current task parameters to be queried and the real-person dialogue reference templates includes: retrieving multiple real-person dialogue reference templates that best match the response content from a pre-built real-person dialogue knowledge base; and constructing the context information based on the multiple real-person dialogue reference templates and the current task parameters to be queried.

[0013] In an optional implementation, before obtaining the current task parameters to be queried for the target task and the real-person dialogue reference template, the method further includes: collecting real dialogue text data in each task scenario; after desensitizing the real dialogue data, extracting the real-person dialogue reference template; identifying the user's dialogue intent in each real-person dialogue reference template and configuring a response strategy; and constructing the real-person dialogue knowledge base based on the real-person dialogue reference template and the response strategy.

[0014] In an optional implementation, before constructing the real-person dialogue knowledge base based on the real-person dialogue reference template and the response strategy, the method further includes: performing generalization processing and verification on each of the real-person dialogue reference templates.

[0015] Secondly, the present invention provides a customer service system for executing the task-oriented dialogue method as described in any of the foregoing embodiments.

[0016] The task-oriented dialogue method and customer service system provided in this invention first obtains the current task parameters to be queried and a human-like dialogue reference template for the target task. Then, contextual information is constructed based on these parameters and the template to ensure that each step of the dialogue has a clear task objective and response specifications. Next, the large model engages in dialogue with the user based on the constructed contextual information until the required parameter information is obtained from the user's response. This not only focuses the dialogue on extracting the current task parameters but also gives the dialogue a natural, human-like feel. Subsequently, the system verifies the validity of the obtained parameter information to ensure its accuracy and reliability. Finally, through iterative updates of parameters and contextual information, the entire dialogue process proceeds in an orderly manner according to the preset business path, maintaining business logic while making the interaction between the large model and the user feel human-like.

[0017] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0018] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 A schematic flowchart illustrating the task-oriented dialogue method provided in an embodiment of the present invention; Figure 2 An architecture diagram of the customer service system provided in an embodiment of the present invention; Figure 3 A schematic diagram illustrating the working process of a customer service system provided in an embodiment of the present invention; Figure 4 This is a structural block diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0021] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.

[0022] It should be noted that relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0023] First, let's explain the relevant terms used in the embodiments of this invention.

[0024] Large Language Model (LLM): A large-scale pre-trained model based on deep learning (such as GPT-4, Gemini, etc.), typically containing hundreds of billions to trillions of parameters. This model, through self-supervised learning on massive amounts of text data, possesses powerful natural language understanding (NLU), natural language generation (NLG), and logical reasoning capabilities, and forms the foundation for realizing anthropomorphic dialogue in this invention.

[0025] Task-oriented dialogue: A dialogue system designed to accomplish a specific, defined task (such as after-sales appointment, flight booking, or fault reporting). Unlike chit-chat, it emphasizes the accuracy, efficiency, and ultimate task completion rate of the dialogue.

[0026] Slot filling: A key technology in task-oriented dialogue systems, it refers to extracting specific entity parameters (such as time, location, quantity, and specifications) from the user's natural language input and filling them into predefined semantic slots to complete the collection of structured information.

[0027] A Finite State Machine (FSM) is a mathematical computational model consisting of a set of states, an initial state, input events, and transition functions. In traditional intelligent customer service, FSMs are often used to define fixed, non-jumpable dialogue flow transition logic.

[0028] Dialogue Tree: A tree-structured dialogue flowchart that predefines all possible dialogue paths and branch nodes. Users must strictly follow the pre-defined paths in the tree structure to interact; the system lacks the ability to handle interactions outside these paths.

[0029] Transformer: A deep neural network architecture based on self-attention. It abandons the traditional recurrent neural network (RNN) structure, possesses efficient parallel computing capabilities and the ability to capture long-range contextual dependencies, and is the foundational model architecture for all current mainstream large language models.

[0030] The task-oriented dialogue and customer service system provided in the embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0031] The inventors discovered during their research that the key to task-oriented dialogue lies in both strictly adhering to the order of business processes (for example, for installation appointments, one must first confirm "delivery status," then ask for "address," and finally inquire about "ceiling condition"), and being able to flexibly respond to the user's real and varied language behaviors (such as sudden counter-questions, initiating small talk, or skipping steps in the answer). However, existing intelligent customer service technologies still face significant challenges: traditional rule-based systems ensure process strictness but offer a poor interactive experience, while systems based on large models, although possessing human-like dialogue capabilities, struggle to meet the accuracy requirements of business process control.

[0032] To address the aforementioned technical problems, embodiments of the present invention provide a task-based dialogue method. The executing entity of this method can be a customer service system. (See also...) Figure 1 , Figure 1 A schematic flowchart of the task-oriented dialogue method provided in the embodiments of the present invention includes steps S101 to S104, as described below: S101: Obtain the current parameters of the target task to be queried and the reference template for real-person dialogue; S102: Construct context information based on the current task parameters to be queried and the live dialogue reference template; S103: The large model engages in dialogue with the user based on contextual information until it obtains the parameter information of the current task to be queried from the user's response. S104: When the parameter information is detected to be valid, generate the next task parameters to be queried; S105: Take the next pending task parameter as the new current pending task parameter, update the context information and return to S103, until all valid parameter information of the target task has been collected.

[0033] Unlike existing technologies, this invention first acquires the current task parameters to be queried and a human-like dialogue reference template for the target task. Then, it constructs contextual information based on these parameters and the template, ensuring that each step of the dialogue has a clear task objective and response specifications. Next, the large model engages in dialogue with the user based on the constructed contextual information until the required parameter information is obtained from the user's response. This not only focuses the dialogue on extracting the current task parameters but also gives the dialogue a natural, human-like feel. Subsequently, the system verifies the validity of the acquired parameter information to ensure its accuracy and reliability. Finally, through iterative updates of parameters and contextual information, the entire dialogue process proceeds in an orderly manner according to the preset business path, maintaining business logic while making the interaction between the large model and the user feel human-like.

[0034] Next, the embodiments of the present invention will be described in conjunction with the relevant accompanying drawings. Figure 1 The task-based dialogue process is shown in detail.

[0035] In one embodiment of the present invention, in order to solve the problem that traditional customer service lacks a sense of realism and cannot flexibly respond to user questions or casual conversations, high-quality dialogue fragments can be sorted out from real-person dialogue data to build a real-person dialogue knowledge base and maintain real-person dialogue reference templates as reference dialogues for large models to communicate with users.

[0036] In this embodiment of the invention, the method for creating a real-person dialogue knowledge base can be as shown in steps a1 to a4: Step a1: Collect real dialogue text data from each task scenario; The real dialogue text data in this embodiment of the invention is converted from real call records of high-scoring services provided between real customer service representatives and users in various task scenarios. These call records include instances of users suddenly asking questions, complaining, or changing the subject, as well as excellent responses from top-performing customer service representatives who remain calm and composed, prioritizing empathy before action.

[0037] Optionally, the task scenarios applicable to the embodiments of the present invention may include, but are not limited to, typical scenarios that require strict process control, such as range hood installation appointments and fault reporting.

[0038] Optionally, the number of actual call records can be flexibly set by relevant technical personnel, such as 100 records.

[0039] Step a2: After anonymizing the real dialogue data, extract the real dialogue reference template; In this embodiment of the invention, the real dialogue text data is first anonymized by replacing or deleting personal identification information such as phone numbers, addresses, and names, and filtering out content containing inappropriate expressions or emotional biases. For example, "Manager Zhang" is replaced with "customer service personnel," and "XX Road, High-tech Zone, Chengdu" is replaced with "your installation address." This results in a clean, safe, and reusable general-purpose corpus.

[0040] Next, based on the anonymized data, real-person dialogue reference templates are extracted. These templates are high-quality response segments extracted from real conversations, tailored to specific user feedback by customer service representatives. For example, if a user asks, "How long is the pipe?", the corresponding extracted response would be a complete statement such as, "Generally, 18 centimeters is sufficient; the technician can adjust it on-site..."—a statement that both answers the question and demonstrates professional judgment. These real-person dialogue reference templates will serve as the core contextual information for building subsequent large-scale model dialogues, enabling the large model to provide highly human-like responses in each round of dialogue.

[0041] Step a3: Identify the user's dialogue intent in each real-person dialogue reference template and configure the response strategy; In this embodiment of the invention, the user's dialogue intent is a semantic classification of the user's language behavior, including but not limited to: questioning, such as the user asking "How long is the pipe?"; direct cooperation, such as the user saying "I received the goods"; casual conversation, such as the user complaining "The weather has been bad lately", etc.

[0042] For each type of user dialogue intent, a matching response strategy can be configured. The response strategy defines the response logic that should be followed under that intent. For example, for a user asking a question or raising an objection, the strategy could be "first provide an accurate answer and then steer back to the main business line"; for a user directly cooperating with the response, the strategy could be "first offer warm confirmation or praise and then advance the business"; for a user engaging in casual conversation or venting their emotions, the strategy could be "first offer brief empathy and then return to the main line".

[0043] In this embodiment of the invention, in addition to configuring a response strategy for each real-person dialogue reference template, the dialogue content can also be generalized, for example, replacing specific values ​​or information (such as "Mr. Li") with general placeholders, so that a reusable real-person dialogue reference template can be obtained.

[0044] Step a4: Build a real-person dialogue knowledge base based on real-person dialogue reference templates and response strategies.

[0045] Finally, based on the real-person dialogue reference templates and their configured response strategies, a real-person dialogue knowledge base is constructed. This knowledge base stores the mapping relationship between the real-person dialogue reference templates and the response strategies in a structured manner, and supports quick retrieval and return of the most matching real-person dialogue reference templates at runtime based on the user's real-time response content.

[0046] In one embodiment of the present invention, before being stored in the database, business experts can perform a final verification of the candidate scripts generated by the large model, eliminating non-compliant or inappropriate content to ensure the professionalism and security of the scripts, and ultimately forming a structured script pool containing multiple high-frequency task scenario response strategies.

[0047] As can be seen, by pre-constructing a structured, high-quality human dialogue knowledge base, the embodiments of the present invention can provide reference scripts for subsequent large models in each round of dialogue, which can significantly improve the anthropomorphism of the responses generated by the large models and the user acceptance.

[0048] In one embodiment of the present invention, in addition to pre-creating a real-person dialogue knowledge base, in order to solve the problem that AI customer service is prone to process loss of control, skipping steps, or deviating from the main business line in multiple rounds of dialogue, a task parameter sequence can be created first according to the task, such as "whether the goods have been received", "address", "ceiling information", "cabinet installation status", etc. The task parameter sequence contains multiple task parameters, and the multiple task parameters are sorted according to the business logic order of the target task.

[0049] Understandably, this task parameter sequence strictly constrains the temporal dependencies and execution priorities of parameter collection. For example, address collection can only proceed after confirming that the user has received the goods; and an installation address can only be obtained before a time can be scheduled. By constructing the task parameter sequence, the dialogue process can be controlled, thus ensuring that the large model strictly follows the logic of the business process during the dialogue.

[0050] After completing the above preparations, when a user seeks help to complete a certain target task, the customer service system can combine the large model and follow the task-oriented dialogue methods in S101 to S105 to assist in completing the target task.

[0051] In one embodiment of the present invention, based on a pre-built real-person dialogue knowledge base and a sequence of task parameters corresponding to the target task, step S101 can be implemented as follows: Step 1: Obtain the user's response from the previous conversation; Step 2: Retrieve multiple real-person dialogue reference templates that match the reply content from the pre-built real-person dialogue knowledge base; Step 3: Determine the current task parameter to be queried from the pre-built task parameter sequence for the target task, based on the task parameter collection status; the task parameter sequence contains multiple task parameters, which are ordered according to the business logic order of the target task.

[0052] As can be seen, the current task parameter to be queried can be obtained from the pre-built task parameter sequence, which is the single task parameter that must be collected in the current round. For example, by viewing the task parameter sequence, the system finds that "ceiling information" has been collected, and the next thing to be asked is "appointment time". Therefore, it generates the structure: {"Target":"appointment time","instruction":"Please ask the user when they want the technician to come to the door"}, which is the current task parameter to be queried in this embodiment of the invention.

[0053] At the same time, the system synchronously obtains the actual responses given by the user in the previous round of dialogue. The parameters of the current task to be queried can prevent the large model from falling into the illusion and going off-topic caused by free generation, and the responses in the previous task dialogue can support subsequent anthropomorphic responses. Thus, the current task parameters to be queried and the responses can be used as the data basis for constructing the subsequent dynamic context.

[0054] In one embodiment of the present invention, based on the current task parameters to be queried and the response content obtained in step S101, in step S102, the system can, in real time, match the most suitable multiple real-person dialogue reference templates from a pre-built real-person dialogue knowledge base according to the user's actual response content in the previous round, and simultaneously combine them with the current task parameters to be queried, and fill both into a pre-designed prompt word template, thereby obtaining the context information of the current round of dialogue. Therefore, step S102 can be implemented according to the following method: Step b1: Retrieve multiple real-person dialogue reference templates that best match the reply content from the pre-built real-person dialogue knowledge base; In this embodiment of the invention, based on the user's response in the previous round, the most matching multiple real-person dialogue reference templates are retrieved from the real-person dialogue knowledge base. For example, in response to a user's inquiry about size, the template might say, "Generally, 18 centimeters is sufficient; the technician can adjust it on-site...". The number of real-person dialogue reference templates can be flexibly set by relevant technical personnel, such as 3, 5, or 10; this is not limited here. During the detection process, the cosine similarity between the user's response and the user's statement portion in each real-person dialogue reference template can be calculated, or other similarity measurement methods can be selected; this is not limited here.

[0055] Step b2: Construct context information based on multiple real-person dialogue reference templates and the parameters of the current task to be queried.

[0056] The system can fill in the previous user's reply and the parameters of the current task to be asked into a fixed-format prompt template, thereby generating contextual information.

[0057] For example, the prompt template could look like this: "You are a professional range hood after-sales customer service representative. Please always reply according to the following principles: prioritize the tone, rhythm, and logic of the live dialogue template provided below; focus on completing the current task parameters to be inquired about; do not proactively introduce new topics or skip the current task; reference dialogue modules: "Understood! The ceiling hasn't been done yet, so let's confirm the other conditions first~ What is your installation address?", "Thank you so much for your cooperation! Next, I'd like to confirm the appointment time with you..."; current parameters to be inquired about: {"Target":"appointment time","instruction":"Please ask the user when they would like the technician to come"}", this complete text is the context information of the large model in this round of dialogue.

[0058] By integrating the current parameters to be queried and the human dialogue reference template into the above implementation method, the prompt context of the large model can be ensured that the large model combines the human dialogue reference template and the tasks that must be performed to conduct dialogue, so that the dialogue content takes into account both business logic and human-like interaction.

[0059] Next, in step S103 of this embodiment of the invention, the system inputs the context information generated in step S102 into the large model, so that the large model can engage in dialogue with the user based on the context information until the parameter information of the currently requested task parameters is obtained from the user's response.

[0060] It is understandable that in step S103, the large model may need to engage in one or more rounds of dialogue with the user to collect parameter information regarding the current task parameters. If the parameter information is collected in one round of dialogue, step S104 can be triggered directly. Otherwise, the large model needs to continue generating dialogue content and engaging in dialogue with the user in order to collect parameter information regarding the current task parameters. Therefore, the implementation method for step S103 is as follows: Step c1: Generate the current round of dialogue content based on the context information and send it to the user; Step c2: Determine whether the user's current reply contains parameter information; Step c3: If the information is included, terminate the conversation and extract the parameter information; otherwise, determine the user's conversational intent based on the current response content. In this embodiment of the invention, if the parameter information has already been obtained in the current round of dialogue, the dialogue can be terminated and subsequent processes can proceed; for example, if the current response explicitly provides parameters (such as "tomorrow afternoon"), the dialogue can be terminated and the parameters extracted. Conversely, the user's dialogue intent is determined based on the current response content. As mentioned above, the user's dialogue intent in this embodiment of the invention includes, but is not limited to, questioning, direct cooperation, and casual conversation; the response strategy refers to the pre-configured language organization logic and emotional response methods that match various user dialogue intents, which will not be elaborated here.

[0061] Optionally, embodiments of the present invention can use the judgment logic running inside the large model, which can be the model's own capability or an additional intent recognition module, to complete the judgment of the user's dialogue intent.

[0062] Step c4: After generating the intent response content based on the response strategy corresponding to the user's dialogue intent, proceed to the next round of dialogue based on the current task parameters to be asked, until the parameter information is obtained.

[0063] For example, if the current response is a question ("What time will the technician arrive?") or casual conversation ("Is your technician reliable?"), the large model generates a response based on the pre-set response strategy and tries to ask for the parameters of the current task again, such as "The technicians have all undergone rigorous training, and they will even help you test the effect after installation~ Let's schedule a time?"

[0064] As can be seen from the above implementation method, the large model cannot decide what to ask next in each round of dialogue; it can only respond to the parameters of the currently requested task until it obtains the task parameter information. In this way, the large model can proactively intervene in intent recognition and response when parameters are not successfully obtained, avoiding the problem of the large model deviating from the main business process in multi-round dialogues. It also overcomes the rigidity of interaction caused by the rule system's inability to understand user language intent. This ensures that each round of dialogue always revolves around a single business goal, while giving the system the responsiveness of a human customer service representative, thereby significantly improving user acceptance and dialogue completion rate without sacrificing business rigor.

[0065] In one embodiment of the present invention, in order to make the responses of the large model more human-like, before collecting parameter information, the system can also use the user's responses in each round of dialogue to update the context information. However, the "current task parameters to be asked" in the context information are not updated and are still strictly locked as the only business objective to be completed in this round. At the same time, the latest round of user real responses are dynamically injected to update the context information. This allows the large model to continuously achieve human-like dialogue while always focusing on the same task objective, effectively avoiding the rigid interaction caused by static context.

[0066] Next, when the large model obtains the parameter information of the current task to be queried from the user's reply content in a certain round of dialogue, it triggers the system to execute step S104. When the parameter information is detected to be valid, the next task to be queried parameter is generated.

[0067] In this embodiment of the invention, when the large model obtains the parameter information of the currently queried task parameters, it can immediately call the parameter collection tool to provide the parameter information to the system. After receiving the call request from the parameter collection tool, the system obtains the parameter information and performs validity verification to determine whether the parameters collected by the large model are valid. This ensures the accuracy of parameter input and avoids subsequent process interruptions or service failures due to ambiguous or incorrect expressions.

[0068] Therefore, in this embodiment of the invention, determining whether the parameter information collected by the large model is valid can be implemented according to the following method: Step d1: Respond to the parameter collection tool call request of the large model and obtain parameter information from the parameter collection tool; In this embodiment of the invention, after the large model obtains the parameter information of the currently queried task parameters from the response content, it calls the parameter collection tool Parameter_collection and inputs the parameter information. For example, Parameter_collection("parameter"="ceiling information","value"="none","is_ready"=True). After the system receives the parameter collection tool call request from the large model, it can obtain the parameter information (such as "ceiling information") from it.

[0069] Step d2: Determine whether the parameter information is consistent with the preset parameter format; In this embodiment of the invention, after the system extracts the parameter information, it can check whether the format of the parameter information is consistent with the preset parameter format, thereby determining whether the parameter is valid.

[0070] Step d3: If they match, the parameter information is confirmed to be valid, and the parameters for the next task to be queried are determined.

[0071] For example, when the system receives Parameter_collection("parameter":"appointment time","value":"tomorrow afternoon","is_ready":True), it can check whether the "appointment time" field conforms to the format (e.g., it cannot be vague words like "the day after tomorrow" or "as soon as possible"). If it conforms to the format, the parameter is valid, and the next parameter to be queried is determined. Otherwise, if the parameter validation result is invalid (e.g., the user says "as soon as possible"), the system will not proceed with the process, but will return an error message to the large model (e.g., {"status":"error","retry_target":"appointment time","message":"Please provide the specific date and time period"}). The large model will then continue the dialogue and collect parameter information.

[0072] In one embodiment of the present invention, once the system determines that the parameter information collected by the large model is valid, it further determines the next task parameter to be queried. During this process, the system can first configure a collected or completed flag for the task parameter corresponding to the current parameter information in the task parameter sequence. Then, it scans the entire task parameter sequence to find the next task parameter corresponding to the current parameter information and generates the next task parameter to be queried.

[0073] In this embodiment of the invention, the process of generating the next task parameter to be queried specifically involves: generating dialogue indication information based on the next task parameter; then, generating the next task parameter to be queried based on the next task parameter, the dialogue indication information, and the feedback information of successfully collecting parameter information.

[0074] For example, the sequence of task parameters for installing a gas cabinet is as follows: receipt status, address information, appointment time, ceiling information, cabinet installation status, water and electricity status, gas supply, and contact person. If the ceiling information has been collected, the next incomplete item is the cabinet installation status. The system can then generate the next task parameter based on the cabinet installation status, in the form of: {"status":"success","next_target":"cabinet installation status","instruction":"Please ask the user if the cabinet has been installed"}. Here, "status":"success" indicates successful collection of the current parameter information, "next_target" is the next task parameter, and "instruction" is the dialog instruction for the next task parameter. The system uses the next task parameter as the new current task parameter, serving as the context for the next round of task dialogue, and begins a new round of queries until all parameters in the task parameter sequence have been collected.

[0075] As can be seen from the above implementation methods, this embodiment of the invention utilizes a parameter call tool as a bridge for interaction between the large model and the customer service system. Each step of the interaction in the large model needs to be reported to the customer service system through the parameter call tool. After the system performs validity verification in the background, it dynamically generates a unique variable "current query task parameter" and sends it back to the large model. This design can constrain the large model to focus only on the single business objective specified by the system in each round of dialogue. Even in scenarios with multiple rounds of long dialogue or frequent user interruptions, it can ensure that the business process is strictly executed according to the preset standard sequence, achieving an "effective combination of business logic and flexible dialogue response".

[0076] To perform the corresponding steps in the above embodiments and various possible methods, this embodiment of the invention also provides a customer service system 20, which can be used to execute the task-oriented dialogue method provided in this embodiment of the invention. Specifically, please refer to... Figure 2 , Figure 2 The architecture diagram of the customer service system provided in this embodiment of the invention includes: a live dialogue knowledge base 201, a user interaction layer 202, a large model layer 203, and a business logic layer 204. The live dialogue knowledge base 201 has been described in detail above and will not be repeated here.

[0077] User interaction layer 202 is used to complete bidirectional voice-to-text conversion. The front end uses the ASR engine to convert the user's voice reply into text in real time; the back end converts the natural language reply generated by the large model into a human-like voice output with service warmth through the TTS module, ensuring the continuity and friendliness of the end-to-end interactive experience.

[0078] The large model layer 203 deploys a large language model that has been fine-tuned and optimized by business corpus. On the one hand, it generates dialogue content that conforms to the tone of a real customer service representative and business logic based on dynamically injected real-person dialogue reference templates and current query task parameters. On the other hand, it actively identifies parameter information in user replies, triggers the parameter collection tool to be called, and reports the parameter information to the business logic layer 204 through a predefined interface.

[0079] The business logic layer 204, acting as the "central nervous system" of the system, is responsible for maintaining the task parameter sequence and storing a complete list of business parameters (such as "receipt status", "address", "time", "hole opening status", "ceiling status", etc.); constructing context information and providing it to the large model layer; performing validity verification based on the parameter information returned by the large model layer 203; updating the parameter collection status; determining the next task target that must be executed; and issuing the next task parameters to be queried.

[0080] To facilitate a clear and intuitive understanding of the working process of the customer service system 20 provided in this embodiment of the invention, the following description uses the process of collecting parameters for a single task as an example to illustrate the working process of the customer service system. Please refer to... Figure 3 , Figure 3 A schematic diagram of the working process of a customer service system provided in an embodiment of the present invention includes the following steps 0 to 15: Step 0: The user interaction layer receives user voice input; Step 1: The user interaction layer converts the user's voice into text; Step 2: The user interaction layer sends the text to the business logic layer; Step 3: The business logic layer retrieves real-person dialogue reference templates from the real-person dialogue knowledge base; Step 4: The business logic layer constructs context information using the parameters of the current task to be queried and the real-person dialogue reference template; Step 5: The business logic layer sends the context information to the large model layer; Step 6: The large model layer generates natural language response content and sends it to the user interaction layer; Step 7: The user interaction layer converts natural language responses into speech; Step 8: The user interaction layer receives the user's voice response; Step 9: The user interaction layer converts the user's voice reply into a reply text; Step 10: The user interaction layer sends the reply text to the large model layer; Step 11: Obtain parameter information for the large model layer; Step 12: The large model layer sends a request to the business logic layer to invoke the parameter collection tool; Step 13: The business logic layer performs parameter validity validation; Step 14: After successful verification, the business logic layer determines the parameters of the next task to be queried. Step 15: The business logic layer provides the parameters of the next task to be queried to the large model layer.

[0081] To verify the effectiveness of the method and system provided in this embodiment of the invention in real business scenarios, the system was deployed at the national after-sales telephone service center of a kitchen appliance brand and a week-long real-time experience test was conducted. The task scenario was: on-site installation appointment telephone service for range hoods; the test sample consisted of 108 randomly selected real user calls, with the interaction targets being actual users who purchased the products; no screening was performed based on age, accent, or expression method.

[0082] In this embodiment of the invention, the test employs an extremely stringent "end-to-end closed-loop" success criterion. A phone call must simultaneously meet all of the following conditions to be considered a successful appointment: Condition 1: Completeness of Information Collection. The system must accurately and without omission collect all preset necessary business fields, including but not limited to: whether the goods have arrived, expected on-site delivery time, whether the ceiling has been completed, cabinet installation status, whether water and electricity are connected, whether gas is connected, accurate contact phone number and on-site address.

[0083] Condition 2: Zero human intervention. The entire process was completed autonomously by the large model, without triggering any "transfer to human intervention" operation.

[0084] Condition 3: Smooth workflow. No major model freezes, repeated question loops, or logical deadlocks occur during the dialogue.

[0085] Condition 4: User emotional experience. The user does not hang up the phone due to a poor experience or recognition of the robot.

[0086] The final test results showed that out of a total of 108 test calls, 92 were successfully booked, achieving a success rate of 85.18%. Only 16 calls failed to complete the fully automated process, mainly due to: 1. Background noise affecting intent judgment, leading to a poor user experience and resulting in being transferred to a human operator or hanging up; 2. Incorrect extraction of key parameters, causing process repetition, affecting user experience and resulting in being transferred to a human operator or hanging up.

[0087] Therefore, compared to the less than 40% task completion rate of traditional intelligent voice navigation, the method and system provided by this invention achieve a unified process control and humanized response in real business scenarios. On the one hand, the high success rate of 85.18% indicates that the tool-driven sequential parameter collection mechanism ensures that the large model strictly follows the preset business sequence in complex multi-round dialogues with an average duration of more than 3 minutes, achieving accurate collection of all key installation conditions (such as whether the ceiling is completed, whether the gas is connected, etc.) with zero omissions and zero skips. On the other hand, the extremely low user hang-up rate and near-zero manual transfer rate fully demonstrate that the dynamic real-person dialogue reference template injection mechanism combined with the intention response strategy in the context of real customer service (such as providing professional answers first when facing questions, and then naturally bringing the main line back), significantly improves the conversational level of the response, enabling the system to maintain high dialogue stickiness and warmth when dealing with counter-questions, small talk, etc.

[0088] The present invention can also provide an electronic device 40, which can be used to deploy the customer service system 20 provided in the present invention, and the customer service system 20 can execute the task-oriented dialogue method provided in the present invention.

[0089] Optionally, the electronic device 40 may be, but is not limited to, a terminal device or a server.

[0090] Please see Figure 4 , Figure 4The structural block diagram of the electronic device provided in the embodiment of the present invention includes a memory 401, a processor 402, and a communication interface 403. The memory 401, processor 402, and communication interface 403 are electrically connected to each other directly or indirectly to realize data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses or signal lines.

[0091] Optionally, the bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized into address buses, data buses, control buses, etc. For ease of representation, Figure 4 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0092] In this embodiment of the invention, the processor 402 may be a general-purpose processor, a digital signal processor, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in this embodiment of the invention. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in this embodiment of the invention can be directly manifested as execution by the hardware processor, or execution by a combination of hardware and software modules within the processor. The software modules may reside in the memory 401, and the processor 402 reads the program instructions from the memory 401 and, in conjunction with its hardware, completes the steps of the aforementioned methods.

[0093] In this embodiment of the invention, the memory 401 can be a non-volatile memory, such as a hard disk drive (HDD) or a solid-state drive (SSD), or it can be volatile memory, such as RAM. The memory can also be any other medium capable of carrying or storing desired executable program code having an instruction or data structure form and accessible by a computer, but is not limited thereto. The memory in this embodiment of the invention can also be a circuit or any other device capable of implementing a storage function for storing instructions and / or data.

[0094] The memory 401 can be used to store software programs and modules, such as the instructions / modules of the customer service system 20 provided in this embodiment of the invention. These can be stored in the memory 401 in the form of software or firmware, or embedded in the operating system (OS) of the electronic device 40. The processor 402 executes various functional applications and data processing by executing the software programs and modules stored in the memory 401. The communication interface 403 can be used to communicate with other node devices for signaling or data.

[0095] Understandable. Figure 4 The structure shown is for illustrative purposes only; the electronic device 40 may also include components that are more advanced than those shown. Figure 4 The more or fewer components shown, or having the same Figure 4 The different configurations shown. Figure 4 The components shown can be implemented using hardware, software, or a combination thereof.

[0096] Based on the above embodiments, the present invention also provides a storage medium in which a computer program is stored. When the computer program is executed by a computer, the computer executes the task-oriented dialogue method provided in the above embodiments. For specific implementation, please refer to the method embodiments, which will not be repeated here.

[0097] Based on the above embodiments, the present invention also provides a program product, which includes a computer program. The processor can execute the computer program to implement the task-oriented dialogue method provided in the embodiments of the present invention. For specific implementation, please refer to the method embodiments, which will not be repeated here.

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

[0099] Furthermore, the units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the objectives of the embodiments of the present invention, depending on actual needs.

[0100] Furthermore, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0101] It should be noted that if the function is implemented as a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes: USB flash drive, mobile hard drive, read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk, and other media capable of storing program code.

[0102] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A task-oriented dialog method, characterized by, The method includes: Obtain the current parameters of the target task to be queried and the reference template for real-person dialogue; Context information is constructed based on the current task parameters to be queried and the real-person dialogue reference template; The large model engages in dialogue with the user based on the context information until the parameter information of the currently requested task parameter is obtained from the user's response. Once the parameter information is detected to be valid, the next task parameters to be queried are generated. The next task parameter to be queried is used as the new current task parameter to be queried. The context information is updated and the process of having the large model engage in dialogue with the user based on the context information continues until the parameter information of the current task parameter to be queried is obtained from the user's response. This process continues until all valid parameter information of all task parameters of the target task has been collected.

2. The task-oriented dialog method of claim 1, wherein, Obtain the current pending task parameters and a live dialogue reference template for the target task, including: Obtain the user's response content from the previous round of conversation; From a pre-built knowledge base of real-person dialogues, multiple real-person dialogue reference templates that match the content of the reply are retrieved; From the pre-constructed sequence of task parameters for the target task, the task parameters to be queried are determined according to the task parameter collection status; wherein, the sequence of task parameters contains multiple task parameters, and the multiple task parameters are ordered according to the business logic order of the target task.

3. The task-oriented dialog method of claim 1, wherein, The large model engages in dialogue with the user based on the context information until the parameter information of the currently requested task parameter is obtained from the user's response, including: The current round of dialogue content is generated based on the context information and sent to the user; Determine whether the user's current reply contains the parameter information; If the parameter information is included, the conversation is terminated and the parameter information is extracted; otherwise, the user's conversational intent is determined based on the current response content. After generating the intended response content based on the response strategy corresponding to the user's dialogue intent, the next round of dialogue is conducted according to the current task parameters to be asked, until the parameter information is obtained.

4. The task-oriented dialog method of claim 3, wherein, The method further includes: The context information is updated using the user's responses in each round of dialogue.

5. The task-oriented dialog method of claim 1, wherein, Before generating the next task parameters to be queried after the parameter information is detected to be valid, the method further includes: Respond to the parameter collection tool call request of the large model, and obtain the parameter information from the parameter collection tool; Determine whether the parameter information is consistent with the preset parameter format; If they match, the parameter information is deemed valid, and the parameters for the next task to be queried are determined; otherwise, an error message is returned to the large model.

6. The task-oriented dialog method of claim 2, wherein, When the parameter information is detected to be valid, the next set of parameters to be queried is generated, including: When the parameter information is detected to be valid, a collected flag is configured for the task parameter corresponding to the parameter information in the task parameter sequence. The next task parameter to be queried is generated based on the next task parameter corresponding to the parameter information.

7. The task-oriented dialog method of claim 6, wherein, Based on the next task parameter corresponding to the parameter information, generate the next task parameter to be queried, including: Generate dialogue instruction information based on the next task parameters; Based on the next task parameters, the dialogue instruction information, and the successful collection feedback information of the parameter information, the next task parameters to be queried are generated.

8. The task-oriented dialogue method according to claim 2, characterized in that, Before obtaining the current query parameters and the live dialogue reference template for the target task, the method further includes: Collect real dialogue text data from various task scenarios; After desensitizing the real dialogue text data, a real-person dialogue reference template is extracted; Identify the user's dialogue intent in each real-person dialogue reference template and configure a response strategy; Based on the real-person dialogue reference template and the response strategy, the real-person dialogue knowledge base is constructed.

9. The task-oriented dialogue method according to claim 8, characterized in that, Before constructing the real-person dialogue knowledge base based on the real-person dialogue reference template and the response strategy, the method further includes: Each of the aforementioned real-person dialogue reference templates is generalized and validated.

10. A customer service system, characterized in that, The customer service system is used to execute the task-oriented dialogue method as described in any one of claims 1 to 9.