A dialogue node processing method and device, electronic equipment and storage medium
By setting rollback intentions and matching user dialogue information, task-oriented robots can jump to appropriate historical dialogue nodes, solving the problem of inaccurate understanding of user information and improving dialogue efficiency and user experience.
Patent Information
- Application Number
- CN202211150507.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-21
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2042-09-21
AI Technical Summary
Task-oriented robots are unable to accurately understand the information expressed by users during conversations, leading to repeated clarification points, reduced information collection efficiency, and a poor user experience.
By setting a fallback intent, the system obtains the user's dialogue information and matches it with the branch intent and fallback intent of the current dialogue node. It then determines whether the fallback conditions are met, enabling the jump and processing of dialogue nodes, including updating information from historical dialogue nodes and outputting clarification statements.
It improves the efficiency of chatbots, accurately understands user information, enables multiple jumps in dialogue nodes and information collection, and enhances the user experience.
Smart Images

Figure CN115455165B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a method, apparatus, electronic device and storage medium for processing dialogue nodes. Background Technology
[0002] With the development of internet technology, intelligent robots have emerged. Among them, task-oriented robots engage in multi-round conversations with users, continuously clarifying their statements to obtain the minimum amount of information needed to complete the task. However, in the process of clarifying statements, task-oriented robots can only collect information by matching the intent information of the current dialogue node with the user's dialogue information. When the user's dialogue information does not match the intent information of the current dialogue node, the robot will keep repeating the clarification node, resulting in a poor user experience. To solve this problem, the original strategy is to process the node if the branch intent is hit, and to perform clarification interaction if it is not hit. This cannot accurately understand the user's expressed information, reducing the efficiency of node jumps and information collection. Summary of the Invention
[0003] The main objective of this application is to provide a dialogue node processing method, apparatus, electronic device, and storage medium to improve the working efficiency of a chatbot by setting a rollback intention.
[0004] To achieve the above objectives, a first aspect of this application proposes a dialogue node processing method, the method comprising:
[0005] Obtain the user's dialogue information and the pre-configured node intent of the current dialogue node, wherein the node intent includes the branch intent and the fallback intent of the current dialogue node;
[0006] When it is determined that the dialogue information does not match the branch intent of the current dialogue node, the dialogue information is matched with the fallback intent to obtain a matching result;
[0007] When the matching result is that the dialogue information matches the rollback intention, the current dialogue node is jumped to the historical dialogue node corresponding to the rollback intention;
[0008] Obtain the node intent of the historical dialogue node, and perform node processing on the historical dialogue node based on the dialogue information and the node intent of the historical dialogue node.
[0009] In some embodiments, after matching the dialogue information with the fallback intent to obtain a matching result, the method further includes:
[0010] When the matching result is that the dialogue information does not match the fallback intention, a clarification statement for the current dialogue node is output, wherein the clarification statement is used to clarify the branch intention of the current dialogue node.
[0011] In some embodiments, the node processing of the historical dialogue nodes based on the dialogue information and the node intent of the historical dialogue nodes includes one of the following:
[0012] When it is determined that the dialogue information matches the branch intent of the historical dialogue node, the historical dialogue information stored in the historical dialogue node is updated according to the dialogue information;
[0013] When it is determined that the dialogue information does not match the branch intention of the historical dialogue node, the dialogue information is matched with the rollback intention of the historical dialogue node;
[0014] When it is determined that the dialogue information does not match the branch intention of the historical dialogue node, but the dialogue information matches the fallback intention of the historical dialogue node, the historical dialogue node is jumped to the dialogue node corresponding to the fallback intention.
[0015] When it is determined that the dialogue information does not match the branching intent of the historical dialogue node, and the dialogue information does not match the rollback intent of the historical dialogue node, the clarification statement of the historical dialogue node is output.
[0016] In some embodiments, the method further includes:
[0017] If the node intent of the current dialogue node includes multiple fallback intents and the dialogue information matches at least one of the fallback intents, the current dialogue node is jumped to the historical dialogue node corresponding to at least one of the fallback intents.
[0018] In some embodiments, before performing node processing on the historical dialogue nodes based on the dialogue information and the node intent of the historical dialogue nodes, one of the following is further included:
[0019] If the branching intent of the historical dialogue node matches the rollback intent of the current dialogue node, the historical dialogue information stored in the historical dialogue node is updated according to the dialogue information.
[0020] If the branching intent of the historical dialogue node does not match the fallback intent of the current dialogue node, output a clarification statement for the historical dialogue node.
[0021] In some embodiments, after navigating the current dialogue node to the historical dialogue node corresponding to the fallback intention, the method further includes:
[0022] Clear the historical dialogue information stored in the historical dialogue node.
[0023] In some embodiments, the method further includes:
[0024] Obtain the node information of all dialogue nodes respectively, wherein the node information is obtained by the dialogue node processing the user's dialogue information, and all the dialogue nodes include at least the current dialogue node and the historical dialogue nodes;
[0025] Generate and output the target dialogue statement based on all the node information.
[0026] To achieve the above objectives, a second aspect of this application provides a dialogue node processing apparatus, the apparatus comprising:
[0027] The intent acquisition module is used to acquire the user's dialogue information and the node intent pre-configured for the current dialogue node, wherein the node intent includes the branch intent and the fallback intent of the current dialogue node.
[0028] The intent matching module is used to match the dialogue information with the fallback intent when it is determined that the dialogue information does not match the branch intent of the current dialogue node, and obtain a matching result.
[0029] The node jump module is used to jump the current dialogue node to the historical dialogue node corresponding to the fallback intention when the matching result is that the dialogue information matches the fallback intention.
[0030] The historical intent module is used to obtain the node intent of the historical dialogue node and perform node processing on the historical dialogue node according to the dialogue information and the node intent of the historical dialogue node.
[0031] To achieve the above objectives, a third aspect of this application provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the dialogue node processing method as described in the first aspect.
[0032] To achieve the above objectives, a fourth aspect of the present application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the dialogue node processing method described in the first aspect.
[0033] The dialogue node processing method, apparatus, electronic device, and storage medium proposed in this application acquire user dialogue information and the pre-configured node intent of the current dialogue node, thereby determining the branch intent and backtracking intent of the current dialogue node. When it is determined that the dialogue information does not match the branch intent of the current dialogue node, the dialogue information is matched with the backtracking intent of the current dialogue node to determine whether the dialogue information meets the backtracking condition of the current dialogue node and obtain a matching result. When the matching result is that the dialogue information matches the backtracking intent, the current dialogue node is jumped to the historical dialogue node corresponding to the backtracking intent, thereby realizing the node jump. Finally, the node information of the historical dialogue node is acquired, and the historical dialogue node is processed according to the dialogue information and the node intent of the historical dialogue node. By setting backtracking intent, the working efficiency of the chatbot is improved, the user's desired information is accurately understood, multiple jumps of dialogue nodes are realized, and it is applicable to more application scenarios. Attached Figure Description
[0034] Figure 1 This is a flowchart of the dialogue node processing method provided in the embodiments of this application;
[0035] Figure 2 This is a flowchart of a dialogue node processing method provided in another embodiment of this application;
[0036] Figure 3 This is a flowchart of a dialogue node processing method provided in another embodiment of this application;
[0037] Figure 4 This is a flowchart of a dialogue node processing method provided in another embodiment of this application;
[0038] Figure 5 This is a flowchart of a dialogue node processing method provided in another embodiment of this application;
[0039] Figure 6 This is a schematic diagram of a specific example of a dialogue node processing method provided in this application;
[0040] Figure 7 This is a schematic diagram of the structure of the dialogue node processing device provided in the embodiments of this application;
[0041] Figure 8 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0042] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0043] It should be noted that although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, and the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0044] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0045] First, let's analyze some of the terms used in this application:
[0046] Artificial intelligence (AI) is a new branch of computer science that studies, develops, and applies theories, methods, technologies, and systems to simulate, extend, and expand human intelligence. It aims to understand the essence of intelligence and produce intelligent machines that can react in a way similar to human intelligence. Research in this field includes robotics, speech recognition, image recognition, natural language processing, and expert systems. AI can simulate the information processes of human consciousness and thought. Furthermore, AI utilizes digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceiving the environment, acquiring knowledge, and using that knowledge to achieve optimal results.
[0047] Natural Language Processing (NLP): NLP uses computers to process, understand, and utilize human language (such as Chinese and English). NLP is a branch of artificial intelligence and an interdisciplinary field of computer science and linguistics, often referred to as computational linguistics. NLP includes syntactic analysis, semantic analysis, and discourse understanding. It is commonly used in machine translation, handwritten and printed character recognition, speech recognition and text-to-speech conversion, intent recognition, information extraction and filtering, text classification and clustering, sentiment analysis, and opinion mining. It involves data mining, machine learning, knowledge acquisition, knowledge engineering, artificial intelligence research, and linguistic research related to language computation.
[0048] Chatbots: Based on the different ways visitors expect the chatbot to respond, chatbots are divided into three types: consultative, casual, and task-oriented. Consultative: Visitors typically expect the chatbot to provide professional answers to their questions. It's presented in a question-and-answer format. The chatbot acts as a "knowledge advisor," answering questions and resolving doubts. Casual: Visitors expect a chatbot that can keep them company. The chatbot can respond to any question and engage in conversation. Visitors don't expect the completion of a specific goal, but rather emotional companionship. Task-oriented: Visitors typically expect the chatbot to not only provide professional answers to their questions but also proactively ask follow-up questions to obtain relevant information and provide different answers based on different information. It can also complete some task instructions. Broadly speaking, both "professional answers" and "completing task instructions" involve completing a task, hence the term "task-oriented."
[0049] Field information: Each row in a table is called a "record." Each record contains all the information in that row, much like all the information about a person in a contact database. However, records in a database don't have specific record names; they are often identified by their row number. A field is a smaller unit than a record. A collection of fields makes up a record. Each field describes a specific characteristic of the document, i.e., a data item, and has a unique field identifier that a computer can recognize.
[0050] Information extraction is a text processing technique that extracts factual information such as entities, relationships, and events from natural language text and outputs it as structured data. Information extraction is a technique for extracting specific information from text data. Text data is composed of specific units, such as sentences, paragraphs, and chapters. Text information is composed of smaller, specific units, such as characters, words, phrases, sentences, paragraphs, or combinations of these units. Extracting noun phrases, names of people, and place names from text data is an example of text information extraction. Of course, text information extraction techniques can extract information of various types.
[0051] Based on this, embodiments of this application provide a dialogue node processing method and apparatus, electronic device and storage medium, which aim to improve the working efficiency of the chatbot by setting fallback intentions.
[0052] The dialogue node processing method, apparatus, electronic device, and storage medium provided in this application are specifically described through the following embodiments. First, the dialogue node processing method in this application is described.
[0053] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) refers to the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.
[0054] Foundational artificial intelligence technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies mainly encompass computer vision, robotics, biometrics, dialogue node switching, natural language processing, and machine learning / deep learning.
[0055] The dialogue node processing method provided in this application relates to the field of artificial intelligence technology. This method can be applied to a terminal, a server, or software running on either a terminal or a server. In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, etc.; the server can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application implementing the dialogue node processing method, but is not limited to the above forms.
[0056] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0057] It should be noted that in all specific embodiments of this application, when processing data related to user identity or characteristics, such as user information, user behavior data, user historical data, and user location information, user permission or consent is obtained first. Furthermore, the collection, use, and processing of this data comply with relevant laws, regulations, and standards of the relevant countries and regions. In addition, when embodiments of this application require access to sensitive personal information of users, separate permission or consent from the user is obtained through pop-ups or redirects to confirmation pages. Only after obtaining the user's separate permission or consent is the necessary user-related data for the proper functioning of the embodiments of this application obtained.
[0058] Figure 1 This is an optional flowchart of the dialogue node processing method provided in the embodiments of this application. Figure 1 The method may include, but is not limited to, steps S101 to S104.
[0059] In some embodiments, the device executing the dialogue node processing method of this embodiment may be a chatbot, which may be a task-oriented chatbot, a consultation chatbot, a casual chatbot, etc. This embodiment does not impose specific limitations.
[0060] Step S101: Obtain the user's dialogue information and the node intent pre-configured for the current dialogue node;
[0061] It should be noted that node intent includes the branching intent of the current dialogue node and the backtracking intent of the current dialogue node.
[0062] In step S101 of some embodiments, the user's dialogue information and the branching intent and backtracking intent of the current dialogue node are obtained. The user's dialogue information may be the user's age information, identity information, gender information, name information, etc., and this embodiment does not impose specific limitations.
[0063] It should be noted that all dialogue information involving user privacy is obtained with the user's permission. The branch intent of the current dialogue node is used to represent the dialogue information that the current dialogue node wants to collect. The fallback intent is the fallback intent collected by the current dialogue node from the previous dialogue node. A dialogue node can correspond to multiple fallback intents.
[0064] In some embodiments, the number of backtracking intentions for the current dialogue node corresponds to the number of previous dialogue nodes. For example, if the current dialogue node is the third dialogue node queried by the chatbot, then the third dialogue node also includes the backtracking intentions of the first and second dialogue nodes; if the current dialogue node is the fifth dialogue node queried by the chatbot, then the fifth dialogue node includes the backtracking intentions of the first to fourth dialogue nodes, which facilitates subsequent node jump operations and avoids phenomena such as inability to backtrack or single matching by the chatbot.
[0065] It should be noted that the branching intent can be the chatbot's query information, such as "What is your name?", "What is your gender?", "What is your age?", etc., while the backtracking intent can be keywords, key words, etc. This embodiment does not impose specific limitations.
[0066] Step S102: When it is determined that the dialogue information does not match the branch intent of the current dialogue node, the dialogue information is matched with the fallback intent to obtain the matching result.
[0067] In step S102 of some embodiments, when it is determined that the dialogue information does not match the branch intention of the current dialogue node, the dialogue information is matched with the fallback intention to obtain a matching result, thereby determining whether the dialogue information satisfies the fallback intention of other historical dialogue nodes.
[0068] It should be noted that in this embodiment, the branch intent of the current dialogue node has a higher priority than the fallback intent of the current dialogue node. Therefore, after obtaining the user's dialogue information, it is first matched with the branch intent in each dialogue node. When the branch intent does not match, it is then matched with the fallback intent of that dialogue node.
[0069] In some embodiments, dialogue information and fallback intents can be matched using information such as keywords and slots. A dialogue node can have multiple fallback intents. For example, assuming the fallback intent of the current dialogue node is "age", "age", or "XX years old", and the current dialogue information is "Actually, my age is 18 years old", then the effective information in the dialogue information is identified as age and keywords such as 18 years old. By using the above keywords, it is determined that the dialogue information satisfies the fallback intent of the current dialogue node, and a matching result is obtained.
[0070] Step S103: When the matching result is that the dialogue information matches the rollback intention, the current dialogue node is jumped to the historical dialogue node corresponding to the rollback intention.
[0071] In step S103 of some embodiments, when the matching result is that the dialogue information matches the fallback intention, it means that the dialogue information satisfies the fallback intention of the previous dialogue node. Then, the current dialogue node is jumped to the historical dialogue node corresponding to the fallback intention, thereby realizing the jump of the dialogue node.
[0072] Understandably, if the current dialogue node is asking about age, the backtracking intent is keywords such as "gender," "male," or "female," and the dialogue information is information such as "Actually, I am a boy" or "Actually, I am a girl," then the dialogue information matches the backtracking intent. Therefore, the current dialogue node needs to be redirected to the historical dialogue node that asks about gender, which corresponds to the backtracking intent. This will enable the redirection of the current dialogue node and improve the user experience.
[0073] Step S104: Obtain the node intent of the historical dialogue nodes, and perform node processing on the historical dialogue nodes based on the dialogue information and the node intent of the historical dialogue nodes.
[0074] In step S104 of some embodiments, after jumping from the current dialogue node to the historical dialogue node corresponding to the fallback intention, the node intention of the historical dialogue node is obtained, and the historical dialogue node is processed according to the dialogue information and the node intention of the historical dialogue node, thereby realizing multiple matching of dialogue nodes, realizing iterative judgment of dialogue nodes, and accurately understanding the user's dialogue information.
[0075] It should be noted that the node processing of historical dialogue nodes includes, but is not limited to, jumping to historical dialogue nodes, outputting clarification statements from historical dialogue nodes, and storing information from historical dialogue nodes. This embodiment does not impose specific limitations.
[0076] It is understandable that the node intent of a historical dialogue node includes the branching intent and the backtracking intent of the historical dialogue node.
[0077] In some embodiments, user dialogue information and the pre-configured node intent of the current dialogue node are obtained, thereby determining the branch intent and fallback intent of the current dialogue node. When it is determined that the dialogue information does not match the branch intent of the current dialogue node, the dialogue information is matched with the fallback intent of the current dialogue node to determine whether the dialogue information meets the fallback condition of the current dialogue node and obtain the matching result. When the matching result is that the dialogue information matches the fallback intent, the current dialogue node is jumped to the historical dialogue node corresponding to the fallback intent, thereby realizing the node jump. Finally, the node information of the historical dialogue node is obtained, and the historical dialogue node is processed according to the dialogue information and the node intent of the historical dialogue node. By setting the fallback intent, the working efficiency of the chatbot is improved, the user's desired information is accurately understood, multiple jumps of dialogue nodes are realized, and it is applicable to more application scenarios.
[0078] Please see Figure 2 , Figure 2 This is an optional flowchart of the dialogue node processing method provided in the embodiments of this application. Figure 2 The method may include, but is not limited to, step S201.
[0079] Step S201: When the matching result is that the dialogue information does not match the fallback intention, output the clarification statement of the current dialogue node.
[0080] It should be noted that clarification statements are used to clarify the branching intent of the current dialogue node.
[0081] In step S201 of some embodiments, after matching the dialogue information with the rollback intention and obtaining the matching result, if the matching result is that the dialogue information and the rollback intention do not match, it means that the user's dialogue information is different from the rollback intention of the previously traversed dialogue nodes. Then, the clarification statement of the current dialogue node is output to reconfirm with the user, thereby improving the accuracy of dialogue information collection and avoiding situations such as the user not understanding the query information of the current dialogue node or mishearing the query information of the current dialogue node.
[0082] It should be noted that, assuming the current dialogue node is asking for a name, the fallback intent is "age", "gender", "male", "female", etc., and the dialogue information is "I like purple", then it is determined that the dialogue information does not match the fallback intent. Therefore, the clarification statement of the current dialogue node is output, namely "What is your name?", and the clarification statement of the dialogue node is repeated to the user to conduct a clarification interaction with the user.
[0083] In some embodiments, historical dialogue nodes are processed based on dialogue information and the node intent of historical dialogue nodes, including one of the following embodiments:
[0084] In some embodiments, when it is determined that the dialogue information matches the branch intent of a historical dialogue node, the historical dialogue information stored in the historical dialogue node is updated according to the dialogue information. In the process of processing the historical dialogue node according to the dialogue information and the node intent of the historical dialogue node, it is first necessary to match the intent, that is, match the dialogue information with the branch intent and the fallback intent of the historical dialogue node. Then, based on the matching result, the historical dialogue node is subjected to operations such as jumping, outputting clarification statements, or updating information, thereby realizing multiple matching of historical dialogue nodes, supporting more application scenarios, and improving user cooperation.
[0085] In some embodiments, when it is determined that the dialogue information matches the branch intent of a historical dialogue node, it means that the dialogue information satisfies the query information of the historical dialogue node. The historical dialogue information stored in the historical dialogue node can be updated according to the dialogue information, thereby realizing the information update of the dialogue node, enabling the user to change the information stored in the historical dialogue node, and realizing the jump of the dialogue node. For example, the historical dialogue node is a dialogue node that asks the user's age, and initially the historical dialogue node stores historical dialogue information, that is, the user's initial age is 20 years old. In the current dialogue information, the user's stated age is 22 years old, and it matches the branch intent of the historical dialogue node. Therefore, the historical dialogue information already stored in the historical dialogue node can be updated according to the dialogue information, and the age is updated from 20 years old to 22 years old.
[0086] It should be noted that each dialogue node stores corresponding information. This information is obtained by processing the information collected from all dialogue nodes and storing the processed information in the corresponding dialogue node to facilitate the subsequent output of the target dialogue statement.
[0087] It is understood that the processing of the collected information may include filtering key fields and removing sensitive fields, etc., and this embodiment does not impose specific limitations.
[0088] In some embodiments, when it is determined that the dialogue information does not match the branch intention of the historical dialogue node, the dialogue information is matched with the fallback intention of the historical dialogue node. After it is determined that the dialogue information does not match the branch intention of the historical dialogue node, the dialogue information is then matched with the fallback intention of the historical dialogue node to obtain a matching result that matches the fallback intention of the historical dialogue node. This facilitates the subsequent updating of information, avoids interruption of the dialogue task, and reduces the efficiency of information collection.
[0089] In some embodiments, when it is determined that the dialogue information does not match the branch intention of the historical dialogue node, but the dialogue information matches the back-down intention of the historical dialogue node, the historical dialogue node is jumped to the node corresponding to the back-down intention, thereby realizing the cyclic judgment of the historical dialogue node and realizing the iterative loop of the dialogue process.
[0090] In some embodiments, when it is determined that the dialogue information does not match the branching intent of the historical dialogue node, and the dialogue information does not match the backoff intent of the historical dialogue node, the clarification statement of the historical dialogue node is output to avoid situations where the robot cannot answer when the dialogue information received by the robot is inconsistent with all historical dialogue nodes, thereby improving the efficiency of information collection.
[0091] Understandably, when the dialogue message is "It's sunny today," the branch intent of the historical dialogue node is "What kind of insurance do you want?", the fallback intent is "Age" or "I am XX years old," and the clarification statement of the historical dialogue node is "What kind of insurance do you need?", the dialogue message does not match the branch intent or fallback intent of the historical dialogue node. Therefore, the clarification statement of the historical dialogue node, "What kind of insurance do you need?", is repeatedly output to guide the user on how to answer and avoid interrupting the dialogue.
[0092] Please see Figure 3 , Figure 3 This is an optional flowchart of a dialogue node processing method provided in another embodiment of this application. Figure 3 The method may include, but is not limited to, step S301.
[0093] Step S301: If the node intent of the current dialogue node includes multiple fallback intents and the dialogue information matches at least one fallback intent, the current dialogue node is jumped to the historical dialogue node corresponding to at least one fallback intent.
[0094] In step S301 of some embodiments, if the node intent of the current dialogue node includes multiple fallback intents and the dialogue information matches at least one fallback intent, the current dialogue node is jumped to the historical dialogue node corresponding to at least one fallback intent, thereby realizing the dialogue node jump function and avoiding the interruption of the dialogue process.
[0095] It should be noted that dialogue information can be matched with multiple backtracking intentions. When dialogue information matches multiple backtracking intentions, it is first determined whether the multiple backtracking intentions correspond to the same historical dialogue node. If multiple backtracking intentions correspond to the same historical dialogue node, the current dialogue node is directly jumped to the historical dialogue node corresponding to the multiple backtracking intentions. For example, if the current dialogue node has two backtracking intentions, namely "I am XX years old this year" and "Actually I am XX years old", both of these backtracking intentions correspond to dialogue nodes that ask for age. The user's dialogue information is "Actually I am 20 years old this year". At this time, the user's dialogue information satisfies both backtracking intentions. After judgment, it is determined that the two backtracking intentions correspond to the same historical dialogue node. Therefore, the current dialogue node is directly jumped to the historical dialogue node that asks for age, realizing the node jump.
[0096] In some embodiments, when the dialogue information matches multiple fallback intentions, and the multiple fallback intentions correspond to different historical dialogue nodes, it is necessary to compare the path lengths of the historical dialogue nodes corresponding to the fallback intentions with the current dialogue node. First, the historical dialogue node with the longest path length from the current dialogue node is selected for jump, and then the process is traversed downwards until all fallback intentions corresponding to the dialogue information are traversed.
[0097] Understandably, the current dialogue node has three fallback intentions: "I am XX years old," "I am male," and "My name is XX." These three fallback intentions correspond to the age history dialogue node (asking about age), the gender history dialogue node (asking about gender), and the name dialogue node (asking about name), respectively. The user's dialogue information is "I am a 15-year-old male." Since the user's dialogue information simultaneously satisfies the age and gender history dialogue nodes, a dialogue node jump is required. This involves determining the path length from the age and gender history dialogue nodes to the current dialogue node. After comparison, it is found that the path length of the gender history dialogue node is greater than that of the age history dialogue node. Therefore, the current dialogue node is first jumped to the gender history dialogue node for information update. After confirming that the gender history dialogue node information is updated, the current dialogue node is then jumped to the age dialogue node for information update. This process completes the jumps to all history dialogue nodes corresponding to the fallback intentions, achieving comprehensive information updates, accurately obtaining customer dialogue information, realizing intelligent dialogue node jumps, and improving the user experience.
[0098] In some embodiments, if the node intent of the current dialogue node includes multiple fallback intents and the dialogue information does not match any of the fallback intents, a clarification statement for the current dialogue node is output.
[0099] Understandably, the fallback intent of the current dialogue node includes "age", "I am XX years old", "my name is XXX", and "male". The clarification statement of the previous dialogue node was "What type of insurance do you need?". The current dialogue information is "I want a red bag", which does not match the fallback intent of the current dialogue node. Therefore, the clarification statement of the previous dialogue node, "What type of insurance do you need?", is repeated to guide the user on how to answer and avoid the dialogue from ending.
[0100] In some embodiments, before performing node processing on historical dialogue nodes based on dialogue information and the node intent of historical dialogue nodes, one of the following embodiments is also included:
[0101] In some embodiments, when the branch intent of a historical dialogue node matches the fallback intent of the current dialogue node, the historical dialogue information stored in the historical dialogue node is updated according to the dialogue information. This facilitates and quickly updates the historical dialogue information, improving the user experience. For example, if the branch intent of a historical dialogue node is "How old are you this year?", the fallback intent of the current dialogue node is "age" or "age number", and the dialogue information is "Actually, I am already 32 years old this year", then the branch intent of the historical dialogue node matches the fallback intent of the current dialogue node, and the dialogue information satisfies the fallback intent of the current dialogue node and is also the answer to the branch intent of the historical dialogue node. Therefore, the historical dialogue information can be updated directly, updating the historical dialogue information stored in the historical dialogue node to 32 years old, thereby realizing the information update of the dialogue node and achieving a pure fallback of the dialogue node.
[0102] In some embodiments, when the branch intent of a historical dialogue node does not match the backtracking intent of the current dialogue node, a clarification statement from the historical dialogue node is output. This prevents the chatbot from terminating the dialogue due to misunderstanding. For example, the branch intent of the historical dialogue node is "How old are you this year?", the clarification statement of the historical dialogue node is "May I ask your age this year?", the backtracking intent of the current dialogue node is "age" or "age number", and the dialogue information is "Actually, I misspoke my age". In this case, the dialogue information satisfies the backtracking intent of the current dialogue node, but it is not the answer to the branch intent of the historical dialogue node. Therefore, after the current dialogue node jumps to the historical dialogue node, it is still necessary to output the clarification statement "May I ask your age this year?" to guide the user to answer further.
[0103] Please see Figure 4 , Figure 4 This is an optional flowchart of a dialogue node processing method provided in another embodiment of this application. Figure 4 The method may include, but is not limited to, step S401.
[0104] Step S401: Clear the historical dialogue information stored in the historical dialogue node.
[0105] In step S401 of some embodiments, after jumping from the current dialogue node to the historical dialogue node corresponding to the rollback intention, the historical dialogue information stored in the historical dialogue node can also be cleared, thereby achieving the overwriting and clearing of the historical dialogue information of the historical dialogue node, without clearing the dialogue information of other dialogue nodes, thereby avoiding the need to clarify the already stored useful information and improving the working efficiency of the chatbot.
[0106] It should be noted that in step S401, only the historical dialogue information stored by the historical dialogue node is cleared, while the dialogue information stored by other dialogue nodes is retained. That is, the clarified information of the downstream dialogue node is not cleared.
[0107] Understandably, the current dialogue node is the one asking for gender, with the dialogue information "I am male, and I am actually 20 years old this year." At this point, it's necessary to jump to the historical dialogue node corresponding to the age inquiry. This historical dialogue node stores the historical dialogue information "18 years old," so it's necessary to clear the stored historical dialogue information and replace "18 years old" with "20 years old." Furthermore, after the historical dialogue node asking for age, there is another historical dialogue node asking for insurance type, which stores the historical dialogue information "car insurance." Since the dialogue information doesn't involve car insurance, it's not necessary to clear the historical dialogue information of the insurance historical dialogue node. Instead, it directly traverses down to the dialogue node without stored information and then asks the user again.
[0108] In some embodiments, the method for clearing historical dialogue information can also be to clear the historical dialogue information of all traversed historical nodes, that is, to clear the dialogue information of all dialogue nodes traversed from the current dialogue node to the historical dialogue node, and then to re-interact with the user for clarification.
[0109] Understandably, the current dialogue node is one that asks about gender, with the dialogue information "I am male, and I am actually 20 years old this year." At this point, it's necessary to jump to the historical dialogue node corresponding to the age inquiry. This historical dialogue node stores the historical dialogue information "18 years old," so it needs to be cleared, replacing "18 years old" with "20 years old." Furthermore, there's an insurance historical dialogue node following the age inquiry node, which stores the historical dialogue information "car insurance." This should also be cleared. The insurance historical dialogue node then clarifies the dialogue again, outputting the branch intent "What type of insurance do you need?", and awaits the user's response.
[0110] It should be noted that the two methods for clearing historical dialogue information of historical dialogue nodes can be selected according to actual needs, and this embodiment does not impose specific restrictions.
[0111] Please see Figure 5 , Figure 5 This is an optional flowchart of a dialogue node processing method provided in another embodiment of this application. Figure 5 The method may include, but is not limited to, steps S501 to S502.
[0112] Step S501: Obtain the node information of all dialogue nodes respectively;
[0113] It should be noted that the node information is obtained by the dialogue node processing the user's dialogue information, and all dialogue nodes include at least the current dialogue node and historical dialogue nodes.
[0114] In step S501 of some embodiments, the chatbot obtains node information of all chat nodes. The node information is obtained by the chat nodes processing the user's chat information. The processing of the user's chat information by the chat nodes includes, but is not limited to, splitting the chat information into multiple word groups, selecting keywords from the multiple word groups, determining and storing the node information, thereby obtaining the node information stored by each chat node.
[0115] Step S502: Generate and output the target dialogue statement based on all node information.
[0116] In step S502 of some embodiments, all node information is integrated, spliced into a target dialogue statement, and the target dialogue statement is output, thereby completing the collection of user information and clarifying the user's intention information.
[0117] Understandably, suppose the chatbot has three dialogue nodes: one for asking age, one for asking about insurance type, and one for asking about name. The node for asking age stores the node information as 35 years old, the node for asking about insurance type stores the node information as childcare insurance, and the node for asking about name stores the node information as Zhang San. The final output target dialogue statement is "Zhang San, 35 years old, wants childcare insurance," thus completing the clarification dialogue with the user.
[0118] To more clearly illustrate the process of dialogue node processing, a specific example will be provided below.
[0119] Example 1:
[0120] Please see Figure 6 , Figure 6 This is an optional schematic diagram of a dialogue node processing method provided in a specific example of this application.
[0121] In one embodiment, the chatbot has four dialogue nodes: a name dialogue node for asking for a name, an age dialogue node for asking for an age, a gender dialogue node for asking for a gender, and an insurance dialogue node for asking for an insurance type. The name dialogue node is the first node in the entire dialogue process, and the insurance dialogue node is the last node. The branch intent of the name dialogue node is "May I ask your name?", and the clarification statement is "May I ask your name?". The branch intent of the age dialogue node is "May I ask your age?", the fallback intent is "My name is XX / My name is XX", and the clarification statement is "May I ask your...". The gender dialogue node's branching intent is "What is your gender?", its fallback intent is "My surname is XX", "Actually, my age is XX / I am XX years old", and its clarifying statement is "What is your gender?". The insurance dialogue node's branching intent is "What type of insurance do you want?", its fallback intent is "I am male / female", "Actually, my age is XX / I am XX years old", and "My surname is XX", and its clarifying statement is "What type of insurance do you need to know about?". The current dialogue node is the insurance dialogue node, and the name dialogue node stores the node information "Li Si". The age dialogue node stores... The stored node information is "26 years old," and the stored node information for the gender dialogue node is "male." The current dialogue node outputs the clarifying statement, "What kind of insurance do you need to know about?" The user replies, "I just misspoke my age; I want education insurance." At this point, the dialogue information matches one of the fallback intentions of the insurance dialogue node. The age dialogue node that matches this fallback intention is identified, and the insurance dialogue node is redirected to the age dialogue node. This age dialogue node outputs the clarifying statement, "What is your age?" The user replies, "Actually, I'm 28 years old." The node information stored in the age dialogue node is then updated directly based on the dialogue information, changing the node information from "26 years old" to "28 years old." Afterward, it is found that the subsequent gender dialogue node stores node information. The process then proceeds to the insurance dialogue node, identifies the tail node identifier of the insurance dialogue node, and confirms the end of the dialogue process. Thus, the dialogue between the chatbot and the user ends. The chatbot collects the node information stored in each dialogue node, integrates the node information, and outputs the target statement, "Li Si, 28 years old, male, wants to know about education insurance," achieving the redirection of dialogue nodes and the updating of the stored information, thereby improving the user experience.
[0122] Please see Figure 7 This application also provides a dialogue node processing apparatus to implement the above-described dialogue node processing method. The apparatus includes:
[0123] The intent acquisition module 801 is used to acquire the user's dialogue information and the node intent pre-configured for the current dialogue node, wherein the node intent includes the branch intent and the back intent of the current dialogue node.
[0124] The intent matching module 802 is used to match the dialogue information with the fallback intent when it is determined that the dialogue information does not match the branch intent of the current dialogue node, and obtain the matching result.
[0125] The node jump module 803 is used to jump the current dialogue node to the historical dialogue node corresponding to the fallback intention when the matching result is that the dialogue information matches the fallback intention;
[0126] The historical intent module 804 is used to obtain the node intent of historical dialogue nodes and perform node processing on historical dialogue nodes based on dialogue information and the node intent of historical dialogue nodes.
[0127] The specific implementation of this dialogue node processing device is basically the same as the specific embodiment of the dialogue node processing method described above, and will not be repeated here.
[0128] This application also provides an electronic device, which includes: a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for communication between the processor and the memory. When the program is executed by the processor, it implements the aforementioned dialogue node processing method. This electronic device can be any smart terminal, including tablet computers, in-vehicle computers, etc.
[0129] Please see Figure 8 , Figure 8 The hardware structure of an electronic device according to another embodiment is illustrated. The electronic device includes:
[0130] The processor 901 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application.
[0131] The memory 902 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 902 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 902 and is called and executed by the processor 901 using the dialogue node processing method of the embodiments of this application.
[0132] The input / output interface 903 is used to implement information input and output;
[0133] The communication interface 904 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0134] Bus 905 transmits information between various components of the device (e.g., processor 901, memory 902, input / output interface 903, and communication interface 904);
[0135] The processor 901, memory 902, input / output interface 903, and communication interface 904 are connected to each other within the device via bus 905.
[0136] This application embodiment also provides a storage medium, which is a computer-readable storage medium for computer-readable storage. The storage medium stores one or more programs, which can be executed by one or more processors to implement the above-described dialogue node processing method.
[0137] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0138] The dialogue node processing method, device, electronic device, and storage medium provided in this application embodiment acquire user dialogue information and pre-configured node intents for the current dialogue node, thereby determining the branch intent and fallback intent of the current dialogue node. When it is determined that the dialogue information does not match the branch intent of the current dialogue node, the dialogue information is matched with the fallback intent of the current dialogue node to determine whether the dialogue information meets the fallback condition of the current dialogue node and obtain a matching result. When the matching result is that the dialogue information matches the fallback intent, the current dialogue node is jumped to the historical dialogue node corresponding to the fallback intent, thereby realizing the node jump. Finally, the node information of the historical dialogue node is acquired, and the historical dialogue node is processed according to the dialogue information and the node intent of the historical dialogue node. By setting fallback intents, the working efficiency of the chatbot is improved, the user's desired information is accurately understood, multiple jumps of dialogue nodes are realized, and it is applicable to more application scenarios.
[0139] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.
[0140] It will be understood by those skilled in the art that Figure 1-6 The technical solutions shown do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.
[0141] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0142] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.
[0143] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. 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 apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0144] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0145] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0146] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0147] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0148] If the integrated unit is implemented as a software functional unit 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 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 storage medium and includes multiple 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 various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0149] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.
Claims
1. A dialog node processing method, characterized by, The method comprises: obtaining dialogue information of a user and a node intention preconfigured for a current dialogue node, wherein the node intention comprises a branch intention of the current dialogue node and a fallback intention of the current dialogue node, and the priority of the branch intention of the current dialogue node is higher than the priority of the fallback intention of the current dialogue node; when it is determined that the dialogue information does not match the branch intention of the current dialogue node, matching the dialogue information with the fallback intention to obtain a matching result; when the matching result is that the dialogue information matches the fallback intention, jumping the current dialogue node to a historical dialogue node corresponding to the fallback intention; obtaining a node intention of the historical dialogue node, and performing node processing on the historical dialogue node according to the dialogue information and the node intention of the historical dialogue node, comprising: when it is determined that the dialogue information matches the branch intention of the historical dialogue node, updating historical dialogue information stored by the historical dialogue node according to the dialogue information; when it is determined that the dialogue information does not match the branch intention of the historical dialogue node, matching the dialogue information with a fallback intention of the historical dialogue node; and when it is determined that the dialogue information does not match the branch intention of the historical dialogue node and the dialogue information matches the fallback intention of the historical dialogue node, jumping the historical dialogue node to a dialogue node corresponding to the fallback intention.
2. The dialog node processing method of claim 1, wherein, After the matching of the dialogue information with the fallback intention to obtain a matching result, the method further comprises: when the matching result is that the dialogue information does not match the fallback intention, outputting a clarification statement of the current dialogue node, wherein the clarification statement is used to clarify the branch intention of the current dialogue node.
3. The dialog node processing method of claim 1, wherein, The node processing on the historical dialogue node according to the dialogue information and the node intention of the historical dialogue node further comprises: when it is determined that the dialogue information does not match the branch intention of the historical dialogue node and the dialogue information does not match the fallback intention of the historical dialogue node, outputting a clarification statement of the historical dialogue node.
4. The dialog node processing method of claim 1, wherein, The method further comprises: in a case where the node intention of the current dialogue node comprises a plurality of fallback intentions and the dialogue information matches at least one of the fallback intentions, jumping the current dialogue node to a historical dialogue node corresponding to the at least one of the fallback intentions.
5. The dialog node processing method of claim 1, wherein, Before the node processing on the historical dialogue node according to the dialogue information and the node intention of the historical dialogue node, one of the following is further included: in a case where the branch intention of the historical dialogue node matches the fallback intention of the current dialogue node, updating historical dialogue information stored by the historical dialogue node according to the dialogue information; in a case where the branch intention of the historical dialogue node does not match the fallback intention of the current dialogue node, outputting a clarification statement of the historical dialogue node.
6. The dialog node processing method of claim 1, wherein, After the jumping of the current dialogue node to the historical dialogue node corresponding to the fallback intention, the method further comprises: clearing historical dialogue information stored by the historical dialogue node.
7. The dialog node processing method of claim 1, wherein, The method further includes: respectively acquiring node information of all dialogue nodes, wherein the node information is obtained by processing the dialogue information of the user by the dialogue nodes, and all the dialogue nodes at least include the current dialogue node and the historical dialogue node; generating and outputting a target dialogue sentence according to all the node information.
8. A dialog node processing apparatus characterized by comprising: The device includes: an intention acquisition module configured to acquire dialogue information of a user and a node intention pre-configured for a current dialogue node, wherein the node intention includes a branch intention of the current dialogue node and a fallback intention of the current dialogue node, and the priority of the branch intention of the current dialogue node is higher than that of the fallback intention of the current dialogue node; an intention matching module configured to match the dialogue information with the fallback intention when it is determined that the dialogue information does not match the branch intention of the current dialogue node, to obtain a matching result; a node jump module configured to jump the current dialogue node to a historical dialogue node corresponding to the fallback intention when the matching result is that the dialogue information matches the fallback intention; a historical intention module configured to acquire a node intention of the historical dialogue node, and to perform node processing on the historical dialogue node according to the dialogue information and the node intention of the historical dialogue node, including: updating historical dialogue information stored by the historical dialogue node according to the dialogue information when it is determined that the dialogue information matches a branch intention of the historical dialogue node; matching the dialogue information with a fallback intention of the historical dialogue node when it is determined that the dialogue information does not match the branch intention of the historical dialogue node; and jumping the historical dialogue node to a dialogue node corresponding to the fallback intention when it is determined that the dialogue information does not match the branch intention of the historical dialogue node and the dialogue information matches the fallback intention of the historical dialogue node.
9. An electronic device, comprising: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the dialogue node processing method of any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program, the computer program comprising instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 9. The computer program is executed by the processor to implement the dialogue node processing method of any one of claims 1 to 7.
Citation Information
Patent Citations
Conversation node rollback method and device of conversation robot, electronic equipment and medium
CN115062130A