Dialogue management method, dialogue management system and device, and storage medium
By using a multi-level finite state machine structure for dialogue resource architecture and semantic analysis, the problem of difficult control of dialogue process in dialogue systems is solved, and the coherence of dialogue and interactive experience are improved. It is suitable for task-oriented, question-and-answer, and casual conversation dialogue systems.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-27
- Publication Date
- 2026-03-17
AI Technical Summary
Existing dialogue systems struggle to control the dialogue process after acquiring input data, resulting in disjointed conversations and a poor user experience.
A dialogue resource architecture with a multi-level finite state machine structure is adopted. The dialogue process is controlled by semantic analysis and the jump conditions of dialogue nodes to generate corresponding response content. Historical information is stored in the dialogue resource architecture to achieve the continuity of multi-turn dialogue.
It achieves effective control and continuity of the dialogue process, enhances the user interaction experience, can flexibly respond to various user inputs, and improves the flexibility of the dialogue system and the ability to integrate multiple types of dialogue nodes.
Smart Images

Figure CN114428844B_ABST
Abstract
Description
Technical Field
[0001] The embodiments in this specification relate to the field of human-computer interaction technology, and in particular to a dialogue management method, a dialogue management system and device, and a storage medium. Background Technology
[0002] A dialogue system is a system that enables machines to understand human language intent and perform specific tasks or make responses through human-computer interaction. Based on the purpose of the dialogue, dialogue systems can generally be divided into: task-oriented dialogue systems, question-and-answer dialogue systems, and casual conversation dialogue systems. Specifically: task-oriented dialogue systems are suitable for scenarios with clear tasks; question-and-answer dialogue systems are mainly used to answer user questions; and casual conversation dialogue systems have no specific goal and are often used for virtual companionship.
[0003] Currently, end-to-end dialogue systems are mainly obtained by training algorithm models with large amounts of data. However, when using a trained dialogue system, it directly outputs the corresponding result when it receives given input data, making it difficult to control the dialogue process. Summary of the Invention
[0004] In view of this, embodiments of this specification provide a dialogue management method, a dialogue management system and device, and a storage medium, which can effectively control the entire dialogue process.
[0005] First, this specification provides a dialogue management method, including:
[0006] Perform semantic analysis on the user's current input to obtain the corresponding semantic information of the current user;
[0007] Based on the current user semantic information, the system retrieves the user's current dialogue state information from the stored user state information; and through querying, it determines the current node of the current dialogue from the stored dialogue resource architecture, and when the jump condition of the current node is triggered, jumps to the corresponding destination node, and retrieves the output content of the destination node from the dialogue resource architecture; wherein, the dialogue resource architecture is a multi-level finite state machine structure, including multiple dialogue nodes, and each dialogue node jumps to the other based on preset jump conditions;
[0008] Based on the user's current dialogue state information and the output content of the target node, generate the current response content corresponding to the user's current input content.
[0009] Optionally, the dialogue resource architecture includes multiple dialogue nodes of different types, and the dialogue nodes of the multiple dialogue nodes of different types are adapted to jump to each other based on preset jump conditions.
[0010] Optionally, the multiple dialogue nodes are adapted to jump to a single destination node based on a pre-set unique jump condition, or to trigger the current dialogue to jump from the current node to a different destination node based on the user semantic information.
[0011] Optionally, the dialogue management method further includes: storing the reply content as the user's historical dialogue information, as part of the user's status information, to determine the target node for the next round of navigation.
[0012] Optionally, the types of dialogue nodes include at least two of the following: task-type nodes related to task-type dialogues; question-and-answer nodes related to question-and-answer dialogues; and topic-type nodes related to casual conversation dialogues.
[0013] Optionally, the topic-type node includes multiple sub-topic-type nodes, and any one of the multiple sub-topic-type nodes is suitable for jumping to other sub-topic-type nodes of the topic-type node, or jumping to a task-type node, a question-and-answer-type node, or other topic-type nodes based on the corresponding jump conditions.
[0014] Optionally, the task-type node includes a task node unit and a task frame coupled to the node unit, and is adapted to jump to a topic-type node, a question-and-answer node or other task-type node based on the corresponding jump conditions, wherein: the task frame includes a task slot sequence composed of multiple task slots in a preset order;
[0015] The dialogue management method also includes:
[0016] Based on the current user semantic information, the user jumps from the task node unit to the corresponding task frame and fills the task slot sequence in the task frame in the preset order.
[0017] Optionally, at least one task slot in the task slot sequence includes: a task sub-node unit and a sub-task frame coupled to the task sub-node unit, wherein the sub-task frame includes a sub-task slot sequence composed of multiple sub-task slots in a preset order;
[0018] The dialogue management method also includes:
[0019] Obtain the current input content of the user based on the previous round of replies, and obtain the corresponding semantic information of the current user;
[0020] Based on the current user semantic information, the current dialogue state information of the user is obtained from the stored user state information; and by querying, the current task node unit where the current dialogue is located is determined from the stored dialogue resource architecture, and when the jump condition of the current task node unit is triggered, the subtask slot sequence in the subtask frame is filled sequentially according to the preset order. Optionally, the question-and-answer dialogue node includes multiple sub-question-and-answer nodes suitable for handling abnormal dialogues, and each sub-question-and-answer node is suitable for coupling with a matching task node or topic node;
[0021] The dialogue management method further includes: based on the user semantic information, jumping from the current task-type node or topic-type node to a matching sub-question-answer type node suitable for handling abnormal dialogue;
[0022] And in response to the user semantic information, obtain the output content of the sub-question-answering node suitable for handling abnormal dialogue;
[0023] Based on the user's current dialogue state information and the output content of the sub-question-answering node suitable for handling abnormal dialogues, generate response content corresponding to the user's input content, and in response to the corresponding jump condition, return to the task node or topic node coupled to the sub-question-answering node suitable for handling abnormal dialogues.
[0024] Optionally, the dialogue management method further includes: obtaining content in a preset format and converting the content in the preset format into dialogue nodes and jump conditions between dialogue nodes in the dialogue resource architecture.
[0025] Accordingly, embodiments of this specification also provide a dialogue management system including: a resource architecture module, a semantic processing module, a state management module, a dialogue strategy module, and a response generation module, wherein:
[0026] The resource architecture module is suitable for storing the dialogue resource architecture, which is a multi-level finite state machine structure, including multiple dialogue nodes, and the dialogue nodes jump between each other based on preset jump conditions.
[0027] The semantic processing module is adapted to perform semantic analysis on the user's current input content to obtain the corresponding current user semantic information;
[0028] The status management module is adapted to store the user's status information;
[0029] The dialogue strategy module is adapted to obtain the current dialogue state information of the user from the state information stored in the state management module based on the current user semantic information; and to determine the current node of the current dialogue from the dialogue resource architecture stored in the resource architecture module by querying, and to jump to the corresponding destination node when the jump condition of the current node is triggered, and to obtain the output content of the destination node from the dialogue resource architecture.
[0030] The response generation module is adapted to generate current response content corresponding to the current user's input content based on the user's current dialogue state information and the output content of the target node.
[0031] Optionally, the dialogue resource architecture includes multiple dialogue nodes of different types, and the multiple dialogue nodes of different types are adapted to jump between each other based on preset jump conditions.
[0032] Optionally, the multiple dialogue nodes are adapted to jump to a single destination node based on a pre-set unique jump condition, or to trigger the current dialogue to jump from the current node to a different destination node based on the user semantic information.
[0033] Optionally, the status management module is also adapted to store the reply content as the user's historical dialogue information, as part of the user's status information, in order to determine the target node for the next round of navigation.
[0034] Optionally, the types of dialogue nodes include at least two of the following: task-type nodes related to task-type dialogues; question-and-answer nodes related to question-and-answer dialogues; and topic-type nodes related to casual conversation dialogues.
[0035] Optionally, the topic-type node includes multiple sub-topic-type nodes, and any one of the multiple sub-topic-type nodes is suitable for jumping to other sub-topic-type nodes of the topic-type node, or jumping to a task-type node, a question-and-answer-type node, or other topic-type nodes based on the corresponding jump conditions.
[0036] Optionally, the task-type node includes a task node unit and a task frame coupled to the node unit, and is adapted to jump to a topic-type node, a question-and-answer node or other task-type node based on the corresponding jump conditions, wherein: the task frame includes a task slot sequence composed of multiple task slots in a preset order;
[0037] The dialogue strategy module is also adapted to jump from the task node unit to the corresponding task frame according to the current user semantic information, and fill the task slot sequence in the task frame in the preset order.
[0038] Optionally, at least one task slot in the task slot sequence includes: a task sub-node unit and a sub-task frame coupled to the task sub-node unit, wherein the sub-task frame includes a sub-task slot sequence composed of multiple sub-task slots in a preset order;
[0039] The semantic processing module is also adapted to obtain the current input content of the user based on the previous round of reply content, and obtain the corresponding current user semantic information;
[0040] The dialogue strategy module further obtains the user's current dialogue state information from the stored user state information based on the current user's semantic information; and determines the current task node unit where the current dialogue is located from the stored dialogue resource architecture through querying, and when the jump condition of the current task node unit is triggered, sequentially fills the subtask slot sequence in the subtask frame according to the preset order. Optionally, the question-and-answer dialogue node includes multiple sub-question-and-answer nodes suitable for handling abnormal dialogues, and each sub-question-and-answer node is suitable for coupling with a matching task node or topic node; the dialogue strategy module,
[0041] The dialogue strategy module is further adapted to jump from the current task node or topic node to a matching sub-question-answer node suitable for handling abnormal dialogue based on the current user semantic information; and to obtain the output content of the sub-question-answer node suitable for handling abnormal dialogue in response to the current user semantic information; and to return to the task node or topic node coupled to the sub-question-answer node suitable for handling abnormal dialogue in response to a preset jump condition.
[0042] The response generation module is also adapted to generate response content corresponding to the current user's input content based on the user's current dialogue state information and the output content of the sub-question-answer type node suitable for handling abnormal dialogues.
[0043] Optionally, the dialogue management system further includes: a content loading module, adapted to acquire content in a preset format and convert the content in the preset format into dialogue nodes and jump conditions between dialogue nodes in the dialogue resource architecture.
[0044] This specification also provides a dialogue management device, including a memory and a processor, wherein the memory is adapted to store one or more computer instructions, and when the processor executes the computer instructions, it performs the steps of the dialogue management method described in any of the foregoing embodiments.
[0045] This specification also provides a readable storage medium storing computer instructions that, when executed, perform the steps of the dialogue management method described in any of the foregoing embodiments.
[0046] The dialogue management method provided in the embodiments of this specification employs a multi-level finite state machine architecture, which includes multiple dialogue nodes. Therefore, based on the current user semantic information obtained from the user's current input, the corresponding dialogue nodes and the transition conditions between dialogue nodes can be obtained. Thus, when the transition condition of the corresponding dialogue node is triggered, the user can jump to the corresponding destination node and obtain the output content of the destination node from the dialogue resource architecture. Furthermore, based on the user's current dialogue state information and the output content of the destination node, the user can generate a current response content corresponding to the user's current input, thereby realizing dialogue interaction with the user. Moreover, through the multi-level finite state machine dialogue resource architecture and the preset transition conditions between each dialogue node in the dialogue resource architecture, the entire dialogue process can be effectively controlled.
[0047] Furthermore, the dialogue resource architecture includes multiple dialogue nodes of different types, and these multiple dialogue nodes of different types are suitable for switching between each other based on preset switching conditions. Therefore, it can realize the switching between different types of dialogue nodes and the fusion of multiple types of dialogue nodes in the dialogue process, thereby improving the user interaction experience.
[0048] Furthermore, by storing the current response content as the user's historical dialogue information and as part of the user's status information to determine the target node for the next round of navigation, multi-round dialogues can be achieved. The target node for the next round of navigation is confirmed by the response content of the previous round, making the multi-round dialogue content coherent and further improving the user interaction experience.
[0049] Furthermore, the question-and-answer dialogue node includes multiple sub-question-and-answer nodes suitable for handling abnormal dialogues, each of the sub-question-and-answer nodes being adapted to be coupled to a matching task node or topic node; the dialogue management method further includes, based on the current user's semantic information, jumping from the current task node or topic node to a matching sub-question-and-answer node suitable for handling abnormal dialogues; and, in response to the current user's semantic information, obtaining the output content of the sub-question-and-answer node suitable for handling abnormal dialogues; generating response content corresponding to the current user's input content based on the user's current dialogue state information and the output content of the sub-question-and-answer node suitable for handling abnormal dialogues; and, in response to a corresponding jump condition, returning to the task node or topic node coupled to the sub-question-and-answer node suitable for handling abnormal dialogues. As shown above, by coupling task-type nodes or topic-type nodes with matching question-and-answer nodes suitable for exception handling, at any stage of the dialogue process, when an abnormal dialogue is received, the question-and-answer dialogue node that handles the exception can guide and control the process, so that after the dialogue process corresponding to the abnormal dialogue is handled, the process returns to the dialogue process corresponding to the original dialogue node. This improves the flexibility of the dialogue interaction process, flexibly responds to various user input contents, and further enhances the user interaction experience.
[0050] Furthermore, by acquiring content in a preset format and converting the preset format content into dialogue nodes and jump conditions between dialogue nodes in the dialogue resource architecture, the operators or maintenance personnel of the dialogue management system can customize the dialogue process and continuously expand and enrich the dialogue resource architecture. Attached Figure Description
[0051] To more clearly illustrate the technical solutions of the embodiments of this specification, the drawings used in the description of the embodiments of this specification or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0052] Figure 1 A flowchart of a dialogue management method according to an embodiment of this specification is shown;
[0053] Figure 2 This specification shows a schematic diagram of a dialogue resource architecture in an embodiment of the present specification;
[0054] Figure 3 This specification illustrates a schematic diagram of a multi-turn dialogue process in an embodiment of the present specification.
[0055] Figure 4 This specification shows a schematic diagram of a specific structure of a dialogue resource processing architecture in an embodiment of the present specification;
[0056] Figure 5 A schematic diagram of the structure of a dialogue management system according to an embodiment of this specification is shown;
[0057] Figure 6 A schematic diagram of the structure of a dialogue management device according to an embodiment of this specification is shown. Detailed Implementation
[0058] As described in the background section, dialogue systems trained with a large amount of data directly output the corresponding results when they receive predetermined input data, making it difficult to control the dialogue process.
[0059] To address the aforementioned issues, this specification provides a dialogue management method. The adopted dialogue resource architecture is a multi-level finite state machine structure, including multiple dialogue nodes. Therefore, based on the current user semantic information obtained from the user's current input, the corresponding dialogue nodes and the transition conditions between them can be obtained. Thus, when the transition condition of the corresponding dialogue node is triggered, the user can jump to the corresponding destination node and obtain the output content of the destination node from the dialogue resource architecture. Furthermore, based on the user's current dialogue state information and the output content of the destination node, a current response content corresponding to the user's current input can be generated, realizing dialogue interaction with the user. Moreover, through the multi-level finite state machine structure of the dialogue resource architecture and the preset transition conditions between each dialogue node in the dialogue resource architecture, the entire dialogue process can be effectively controlled.
[0060] To enable those skilled in the art to better understand the principles and advantages of the dialogue management method in the embodiments of this specification and to implement it, the following description is provided with reference to the accompanying drawings and specific embodiments.
[0061] Reference Figure 1 A flowchart of a dialogue management method described in the embodiments of this specification is provided. In some embodiments of this specification, the dialogue process can be controlled according to the following steps:
[0062] S11, perform semantic analysis on the user's current input to obtain the corresponding semantic information of the current user.
[0063] In practice, for different types of user input content, corresponding semantic analysis processing can be performed on the user input content to obtain corresponding user semantic information.
[0064] For example, if the user's current input is text data, the semantics expressed by the user can be obtained directly through natural language processing; if the user's current input is voice data, the voice data can be converted into text data first (for example, speech recognition (ASR) technology can be used to convert speech into text data), and then natural language processing can be performed on the converted text data to obtain the user's semantic information.
[0065] It is understood that the user's current input can also be other types of data, such as video data, from which the user's voice data can be extracted and converted into text data. This specification does not limit the specific form of the user input, as long as semantic analysis of the user input is possible.
[0066] S12, based on the current user semantic information, obtain the user's current dialogue state information from the stored user state information; and determine the current node of the current dialogue from the stored dialogue resource architecture through query, and jump to the corresponding destination node when the jump condition of the current node is triggered, and obtain the output content of the destination node from the dialogue resource architecture.
[0067] The dialogue resource architecture can be a multi-level finite state machine structure, which includes multiple dialogue nodes, and the dialogue nodes can jump between each other based on preset jump conditions.
[0068] In practice, based on the user's current input, the corresponding current user semantic information is obtained. Through the current user semantic information, the user's current dialogue state information can be obtained from the stored user state information, that is, the user's expressed intent can be determined.
[0069] In addition, in some other embodiments, to facilitate the management of the dialogue process of different users, an identity (ID) identifier can be established for the user. When the user's input content is received, the user's ID identifier and the input content can be stored together in the user's status information as part of the user status information.
[0070] In practical implementation, a query operation can be used to determine the current node of the current dialogue from the stored dialogue resource architecture, that is, to determine the current node corresponding to the user's semantic information. More specifically, since the dialogue resource architecture is a multi-level finite state machine structure and contains multiple dialogue nodes, the corresponding dialogue node can be obtained from the dialogue resource architecture as the current node through a query operation based on the user's semantic information and the user's current dialogue state information. Subsequently, when the jump condition of the current node is triggered, based on the preset trigger condition, the dialogue process can jump from the current node to the corresponding destination node and obtain the output content of the destination node from the dialogue resource structure.
[0071] It should be noted that, in specific implementations, the user's status information and dialogue resource architecture can both be stored on the same device, such as both locally, or both in the cloud, or they can be stored on different devices. For example, the user's status information can be stored locally, and the dialogue resource architecture can be stored on a cloud server. Then, when user input is received, the user's status information and dialogue resource architecture can be retrieved from the corresponding storage locations.
[0072] S13, Based on the user's current dialogue state information and the output content of the target node, generate the current response content corresponding to the user's current input content.
[0073] Specifically, through steps S11 and S12, the user's current dialogue state information and the output content of the target node can be determined based on the current user semantic information. According to the meaning expressed by the two, the current response content corresponding to the user's current input content can be determined.
[0074] As can be seen from the above, the dialogue resource architecture of the multi-level finite state machine structure, and the preset jump conditions between each dialogue node in the dialogue resource architecture, can effectively control the entire dialogue process.
[0075] In the embodiments described in this specification, as previously stated, the dialogue resource architecture is a multi-level finite state machine structure, including multiple dialogue nodes, with transitions between each dialogue node based on preset transition conditions. As an optional example, the dialogue resource architecture may include multiple dialogue nodes of different types, and these multiple types of dialogue nodes are adapted to transition between each other based on preset transition conditions. That is, the dialogue resource architecture can store dialogue nodes of different types, and different dialogue nodes can transition according to preset transition conditions, thereby enabling transitions between different types of dialogue nodes and the fusion of multiple types of dialogue nodes during the dialogue process, improving the user interaction experience.
[0076] Reference Figure 2 The diagram shown is a schematic representation of a dialogue resource architecture in an embodiment of this specification. In some embodiments of this specification, the dialogue resource structure 20 may include multiple dialogue nodes 21 to 2n of different types. The specific structures of dialogue nodes of different types may be the same or different. For example, dialogue node 21 may include sub-dialogue nodes 211 to 21A, and any one of the sub-dialogue nodes 211 to 21A may include multiple node units. For example, sub-dialogue node 211 includes node unit U11, sub-dialogue node 212 includes node unit U12, ..., sub-dialogue node 21A includes node unit U11; dialogue node 22 may include node unit U21 and a task frame 221 coupled to node unit U21; dialogue node 2n may include sub-dialogue nodes 2n1 to 2nB, and any one of the sub-dialogue nodes 2n1 to 2nB may include a question-answer pair; where n, A, B, and X are all integers greater than zero.
[0077] It should be noted that, for ease of explanation, in Figure 2 The diagram only shows an example where sub-dialogue nodes 211 to 21A have one node unit. In a specific implementation, each sub-dialogue node may also include multiple node units.
[0078] In specific implementation, such as Figure 2 As shown, when the jump conditions of node units and / or dialogue nodes are triggered, the dialogue process can jump between dialogue nodes. For example, the dialogue process can jump from node unit U11 in sub-dialogue node 211 to dialogue node 22; it can also jump from dialogue node 21A to node unit U21 in dialogue node 22.
[0079] It is understandable that the jumps between dialogue nodes in the above dialogue process are only illustrative examples. In actual implementation, the dialogue process can also jump between dialogue nodes based on the corresponding jump conditions. For example, the dialogue process can jump directly from dialogue node 21 to dialogue node 2n.
[0080] Once the content of each dialogue node in the dialogue resource architecture is configured, the dialogue process can jump between dialogue nodes according to the corresponding jump method. In other words, the dialogue process can use different jump methods to jump from the current node to the destination node.
[0081] In some examples, the multiple dialogue nodes are adapted to jump to a single destination node based on a pre-defined unique jump condition, such as... Figure 2In this context, the dialogue process can jump from node unit U11 in sub-dialogue node 21A to node unit U12 in sub-dialogue node 212. That is, when the jump condition of the current node is triggered, the dialogue process can only jump from the current node to a single destination node. In other examples, the multiple dialogue nodes are adapted to trigger the current dialogue to jump from the current node to different destination nodes based on the current user's semantic information. That is, when the jump condition of the current node is triggered, one of the multiple jumpable destination nodes can be selected for jump based on the current user's semantic information, such as... Figure 2 In the context of the task frame 221, when the jump condition of the node unit U21 is triggered, the dialogue process can jump from the task frame 221 to the sub-dialogue node 2n1 or to the sub-dialogue node 2n2, based on the current user semantic information.
[0082] In practice, the dialogue process can be completed when the current response content corresponding to the user's current input content is generated. Therefore, the dialogue management method described in the above embodiments can realize single-turn dialogue.
[0083] Based on this, the above embodiments can be further expanded and optimized according to specific application scenarios and actual conditions. For example, some interaction scenarios may require continuous multi-turn dialogues, which can improve the depth, breadth, and coherence of the interaction and enhance the user interaction experience. Therefore, the dialogue management method provided in the embodiments of this specification may further include: storing the current reply content as the user's historical dialogue information, as part of the user's state information, to determine the target node for the next round of jumps. This enables multi-turn dialogues, and the target node for the next round of jumps is confirmed by the reply content of the previous round, making the multi-turn dialogue content coherent and further improving the user interaction experience.
[0084] Reference Figure 3 The diagram shown in this specification illustrates a multi-turn dialogue process in an embodiment of the invention. Figure 3 As shown, the current dialogue process is in round t. Based on the user's current input and the user's dialogue state information in the previous round, the user's current dialogue state information in round t can be determined. The user's current dialogue state information in round t includes the intent "INFORM" and the corresponding location information "LOCATION = Shanghai". The output content of the current node e in round t is determined to be "Do you like this city?". The user can make different responses based on the output content of the current node e, that is, input different content.
[0085] If the user inputs "Yes", the corresponding user semantic information will be judged as "YES_ANSWER", triggering the jump condition between the current node e and the destination node j. The dialogue process jumps from the current node e to the destination node j in the (t+1)th round of the dialogue process. Based on the destination node j and the user's current dialogue state information, "I like Shanghai too." is output, and "I like Shanghai too." is stored as historical dialogue information as part of the user state information in the (t+1)th round of the dialogue process.
[0086] If the user inputs "No", the corresponding user semantic information will be judged as "NO_ANSWER", triggering the jump condition between the current node e and the destination node k. The dialogue process jumps from the current node e to the destination node k in the (t+1)th round of the dialogue process. Based on the destination node k and the user's current dialogue state information, "All right." is output and stored as historical dialogue information as part of the user state information in the (t+1)th round of the dialogue process.
[0087] If the user does not answer the question but instead asks a special question, "Where are you from?", the corresponding user semantic information is judged as "REQUEST_HOMETOWN", where "REQUEST" represents the intent and "HOMETOWN" represents the target of the query. At this time, the jump condition between the current node e and the target node l is triggered, and the dialogue process jumps from the current node e to the target node l in the (t+1)th round of the dialogue process, that is, jumps to another topic-type node, and outputs "I am from America.", and can store "I am from America." as historical dialogue information as part of the user state information in the (t+1)th round of the dialogue process.
[0088] In some embodiments, if the dialogue resource module does not have a dialogue node corresponding to "Where are you from?", the t+1th round of dialogue can be terminated, and a new dialogue process can be started when user input is received again.
[0089] Where t, e, j, k, and l are all integers greater than 0, and j, k, and l are all distinct.
[0090] It should be noted that, Figure 3The node-based dialogue transition process described herein is merely illustrative and does not limit the specific transition methods of dialogue nodes in the embodiments of this specification. In actual implementation, different types of dialogue nodes can be configured in the dialogue resource architecture according to different application scenarios to achieve the fusion and transition of different types of dialogue nodes. In some embodiments of this specification, the types of dialogue nodes include at least two of the following: task-type nodes related to task-type dialogues; question-and-answer nodes related to question-and-answer dialogues; and topic-type nodes related to casual conversation dialogues.
[0091] As a specific example, in live-streamed teaching, learners may be required to complete corresponding tasks or engage in Q&A sessions based on the teaching content. Learners should also be allowed to ask any questions about the content, whether inside or outside the classroom. Therefore, it is necessary to implement three types of dialogue nodes simultaneously, as well as the switching between these three types of dialogue nodes, to ensure flexibility in the live-streamed teaching process, more effectively improve the teaching results, and enhance the student user experience.
[0092] In practice, the internal structure of different types of dialogue nodes may be different. The dialogue process can choose the appropriate jump method according to the specific dialogue node and jump from the current dialogue node to the destination dialogue node.
[0093] Reference Figure 4 The diagram shown is a specific structural diagram of a dialogue resource architecture in an embodiment of this specification. The dialogue resource structure 40 may include task nodes related to task-type dialogue, topic nodes related to casual conversation, and optionally, question-and-answer nodes related to question-and-answer dialogue.
[0094] The topic node can include sub-topic nodes Sub topic1 to Sub topicm. Any one of the sub-topic nodes is suitable for jumping to other sub-topic nodes of the topic node based on the corresponding jump conditions, or jumping to task nodes, question-and-answer nodes or other topic nodes.
[0095] Continue to refer to Figure 4Each sub-topic node (Sub topic1 to Sub topicm) can include multiple node units. Based on the position of each node unit in the topic node, the node unit can include a start node unit, an intermediate node unit, and an end node unit. The dialogue process corresponding to each sub-topic node starts from the start node unit, passes through the intermediate node units, and ends at the end node unit. For example, the sub-topic node Sub topic1 can include a start node unit StartUnit1, multiple intermediate node units Unit, and an end node unit End Unit, where m is an integer greater than 0.
[0096] In practical implementation, any sub-topic node can be selected from the Topic node. When the dialogue process corresponding to the sub-topic node is executed, the dialogue process can jump to the Task node, the QA node, or other topic nodes according to the corresponding jump conditions. Alternatively, when the dialogue process corresponding to one of the sub-topic nodes is completed, the dialogue process jumps from the current sub-topic node to other sub-topic nodes of the same topic node. For example... Figure 4 As shown, the sub-topic node SubTopic1 can be used as the current dialogue node. When executing the corresponding node unit in SubTopic1, if the corresponding jump condition is triggered, the dialogue process can jump from SubTopic1 to SubTopic2, or from SubTopic1 to Task, or from SubTopic1 to Question-and-Answer (QA) node. When the dialogue process jumps from SubTopic1 to QA, after completing the dialogue process corresponding to QA, the dialogue process needs to return to SubTopic1.
[0097] Continue to refer to Figure 4 A task-type node (Task) may include a task node unit and a task frame coupled to the task node unit, suitable for jumping to a topic-type node, a question-and-answer node, or other task-type nodes based on corresponding jump conditions. The task frame includes a sequence of task slots composed of multiple task slots arranged in a preset order. In specific implementations, such as... Figure 4As shown, based on the position of the task node unit in the task-type node, the task node unit may include a start node unit Start Unit2 and an intermediate node unit Unit21; the task frame may include a task slot sequence T1 composed in a preset order. The task slot sequence T1 may include task slots Slot1, Slot2, Slot3, ..., Sloti, ..., Slotq. Among them, any task slot in the task slot sequence T1 can be represented by task slot Sloti. Different content can be set in task slot Sloti to form different task-type nodes. Here, i and q are both integers greater than 0, and i≤q.
[0098] Accordingly, when executing the dialogue process corresponding to a task node (Task), based on the current user semantic information, the system can jump from the task node unit to the corresponding task frame, and sequentially fill the task slot sequence in the task frame according to the preset order. (Continue to refer to...) Figure 4 Based on the current user semantic information, the dialogue process can jump from the intermediate node unit Unit21 to the task frame Frame and automatically fill the task slot Sloti. When the task slot Sloti is filled, the dialogue process corresponding to the task node Task is completed.
[0099] In practice, when filling task slots, users may continuously ask multiple related questions about at least one task slot. Therefore, in some embodiments of this specification, at least one task slot in the task slot sequence includes: a task sub-node unit and a sub-task frame coupled to the task node unit, wherein the sub-task frame includes a sub-task slot sequence composed of multiple sub-task slots in a preset order. (Continue to refer to...) Figure 4 At least one task slot Sloti in the task slot sequence frame may include at least a task sub-node unit Unit2i and a sub-task frame Sub Frame coupled to the task sub-node unit Unit2i. The sub-task frame Sub Frame may include a sub-task slot sequence ST1 composed of sub-task slots Sloti1, Sloti2, Sloti3, ..., Slotip, ..., Slotg in sequence. Slotip can be used to represent any sub-task slot in the sub-task slot sequence ST1. p and g are both integers greater than 0, and p ≤ g.
[0100] In specific implementation, when the task slots in the task frame are filled, the current round of dialogue is completed and corresponding response content is generated. The system can obtain the current input content of the user based on the previous round of response content to obtain the corresponding current user semantic information. Based on the current user semantic information, the system obtains the user's current dialogue state information from the stored user state information. Furthermore, by querying, the system determines the current task node unit where the current dialogue is located from the stored dialogue resource architecture, and when the jump condition of the current task node unit is triggered, the system fills the subtask slot sequence in the subtask frame in the preset order.
[0101] Continue to refer to Figure 4 When the dialogue process jumps to a task-type node, the dialogue process corresponding to the intermediate node unit Unit21 can be executed. When the task slot Sloti in the task-type node Task is fully filled, the corresponding response content will be given. Based on the response content, the current semantic information of the user corresponding to the user's input content can be obtained, and the dialogue process corresponding to the intermediate node unit Unit2i can be executed. After the task slot Slotip in the task-type node Task is fully filled, the dialogue process is completed. When the corresponding jump condition is triggered, the dialogue process can jump from the current task-type node Task to the question-and-answer node QA, the topic node Topic, or other task nodes Task.
[0102] In practice, during the dialogue process corresponding to the current node (e.g., a task-type node or a topic-type node), an abnormal dialogue node may occur. In this case, the dialogue process can exit the dialogue content corresponding to the current dialogue node and jump to the dialogue content corresponding to the abnormal dialogue node to interact with the user and perform abnormal dialogue processing. After the abnormal dialogue process is completed, it can return to the original dialogue node and continue the dialogue interaction.
[0103] Based on this, continue to refer to Figure 4The question-and-answer node QA can include multiple sub-question-and-answer nodes suitable for handling abnormal dialogues. Each sub-question-and-answer node is suitable for coupling with a matching task node or topic node. Each sub-question-and-answer node can exist in the form of a question-and-answer pair. Each question-and-answer pair can include a question Q and a corresponding response A, and Q and A in each question-and-answer pair can be different. For example, question Q1 corresponds to response A1, question Q2 corresponds to response A2, ..., question Qv corresponds to response Av, ..., question Qs corresponds to response As. Question Qv represents any question in the question-and-answer node QA, and response Av represents any response in the question-and-answer node QA corresponding to question Qv. v and s are both integers greater than 0, and v ≤ s.
[0104] Accordingly, based on the dialogue resource structure, when abnormal dialogue content occurs, the current dialogue content can be determined as abnormal based on the user semantic information, and the current node can be redirected to a matching sub-question-answer node suitable for abnormal handling; and in response to the user semantic information, the output content of the question-answer node suitable for abnormal handling can be obtained; then, based on the user's current dialogue state information and the output content of the question-answer node for abnormal handling, a response content corresponding to the user's input content can be generated, and in response to preset redirection conditions, the system can return to the task node or topic node coupled to the question-answer node for abnormal handling.
[0105] like Figure 4 As shown, when an abnormal dialogue occurs, based on user semantic information, the dialogue process can jump from a Topic node to a Question-Answer node (QA), determine the corresponding question-answer pair Qv-Av, and in response to the user semantic information, obtain the response content Av from the question-answer pair. Then, based on the user's current dialogue state information and the output content Av of the sub-question-answer node, generate the corresponding response content, and in response to the corresponding jump condition, the dialogue process returns to the original Topic node; or, the dialogue process can jump from a Task node to a Question-Answer node (QA), and when the dialogue process corresponding to the Question-Answer node QA is completed, the dialogue process returns to the original Task node.
[0106] Therefore, by coupling task-type or topic-type nodes with matching question-and-answer nodes suitable for exception handling, at any stage of the dialogue process, when an abnormal dialogue is received, guidance and control can be performed through the question-and-answer dialogue node used to handle the exception. After the question-and-answer dialogue node that handles the exception is completed, the dialogue process corresponding to the original dialogue node is returned. This can improve the flexibility of the dialogue interaction process, flexibly respond to various user input contents, and further enhance the user interaction experience.
[0107] The following is for reference Figure 4 This section uses a specific example to explain in detail the process of switching between dialogue nodes.
[0108] In practice, the current user's current state information can be determined based on the current user's semantic information. Based on the current user's semantic information and current state information, the corresponding type of dialogue node information can be obtained from the dialogue resource architecture 40 as the current dialogue node.
[0109] As a specific example, if the user input is about food from different countries, and the Topic node in the dialogue resource architecture 40 is a dialogue scenario about food, then the Topic node can be used as the current dialogue node. Furthermore, the Sub topic1 to Sub topicm within the Topic node can be specific dialogue scenarios such as Chinese food or American food.
[0110] If Sub topic1 in a Topic node is a dialogue scenario about Chinese food, when the dialogue involves Chinese food, the user can enter the sub-dialogue node Sub topic1 through the Start Unit1, determine the corresponding intermediate unit Unit based on the user input, and output the response content corresponding to the user input content through the End Unit.
[0111] As a specific example, the user inputs "I like Chinese food". When the dialogue process of the corresponding node unit in Sub Topic1 is executed, the corresponding response "I also like Chinese food. I want to have a meal, do you have some suggestions." is generated. When the corresponding jump condition is triggered, the dialogue process can jump from the intermediate node unit in Sub Topic1 to the starting node unit Start Unit2 of the task node, and then enter the dialogue process corresponding to node unit Unit21.
[0112] At this point, if the user enters "There is a restaurant near the school, we can eat there.", the dialogue process can fill the task slots in the task frame (Frame) based on the user's subsequent input. Here, "restaurant," "school," and "eat" can be considered three predefined task slots. Based on the user's further input, the system generates the corresponding response "OK." and ends the dialogue process. Alternatively, for the task slot "eat," if the user enters "we can eat duck, can you eat spicy duck.", where "duck" and "spicy" can be considered two predefined sub-task slots, the system can respond with "Ok, let us go."
[0113] Continue to refer to Figure 4 When the dialogue is at a sub-topic node (Sub topic1) or a topic node (Task), meaning the dialogue is about Chinese food, if the user enters content unrelated to Chinese food, such as "Who is your favorite Chinese star?", it indicates an abnormal dialogue. The dialogue can then jump from the sub-topic node (Sub topic1) or the topic node (Task) to the question-and-answer node (QA), select the corresponding question-and-answer pair, reply with "None", and return to the sub-topic node (Sub topic1) or the topic node (Task) based on the corresponding jump conditions.
[0114] In another example, when the dialogue process of the sub-topic node Sub Topic1 is completed, the dialogue process can also jump from Sub Topic1 to the intermediate node Unit in Sub Topic2 to conduct a dialogue process about American food.
[0115] It is understood that the above dialogue process is based on English as an example. In specific implementation, the dialogue process can also use other languages, such as Chinese, French, etc. This instruction manual does not limit the specific language type.
[0116] It should be noted that the above schematic diagram of the dialogue resource architecture is only an example. The types of dialogue nodes included in the dialogue resource architecture and the sub-dialogue nodes included in each dialogue node can be configured according to actual needs. The embodiments in this specification do not limit the specific form of the dialogue resource architecture, nor do they limit the specific content of each dialogue node.
[0117] As user input and the number of conversations increase, the areas and topics involved in the conversation process become increasingly diverse. To address this, content in a preset format can be acquired and converted into conversation nodes and transition conditions between them within the conversation resource architecture. This allows the operators or maintenance personnel of the conversation management system to customize the conversation process, continuously expand and enrich the conversation resource architecture, and thus adapt to more application scenarios.
[0118] For different types of dialogue nodes, the preset format of their corresponding input content can be different.
[0119] If the type of the dialog node is a task node, as an optional example, the default format of its corresponding content is: task[num].yaml, where task[num] is used to specify the name of the task node.
[0120] As a specific example, the content of a task-type node in a preset format can be:
[0121] 1#task1.yaml
[0122] 2---
[0123] 3 type: intro_prompt
[0124] 4. Name: task1_prompt
[0125] 5 image_name:task1.jpg
[0126] 6 utterance:
[0127] 7 paraphrass:
[0128] 8 expected_intent_contents:
[0129] 9…
[0130] 10 tactic_content:
[0131] 11…
[0132] 12---
[0133] Lines 3 to 5 define the type of the dialogue node, the name of the dialogue node, and the image resource name of the dialogue node (image_name: task1.jpg); the "---" in lines 2 and 12 indicates the start and end of a single dialogue; lines 6 and 7 define two forms of expression for the dialogue content in this type of dialogue node; line 8 defines the semantic form of the user's expected response content for this type of dialogue; the "..." in lines 9 and 11 indicates content omission; and line 10 defines the dialogue strategy for handling abnormal dialogues.
[0134] As a concrete example, operations or maintenance personnel (such as teachers in training) can fill in the corresponding task-oriented dialogue content in line 6, which can show the specific task scenario, such as a teacher entering "Now, please tell me the benefit of being grateful and give him advice on how to show gratitude to others."; and set another expression of the task dialogue content in line 7, such as a teacher entering "Please answer these two questions on the side."; and provide the expected response content, such as filling in the user's expected response content in line 8, and handling the abnormal dialogue process according to the content set in line 10 when abnormal dialogue semantic information is received.
[0135] In practical implementation, when the preset format corresponding to the task-type node is set, it can be converted into a dialogue node in the dialogue resource architecture. In this case, user semantic information can be used as the triggering condition for the corresponding dialogue node, and the content in line 10 can be used as the dialogue strategy when handling exceptions.
[0136] If the dialogue node is a question-and-answer node, its default content format is: QA.yaml. As a specific example, the default content format for a question-and-answer node could be:
[0137] 1#QA.yaml
[0138] 2---
[0139] 3 type: qa
[0140] 4. Name: qa_list
[0141] 5 questions:
[0142] 6 answers:
[0143] 7---
[0144] Lines 3 and 4 define the type and name of the dialogue node; the "---" in lines 2 and 7 indicate the start and end of a single dialogue; line 5 defines the dialogue question for this type of dialogue node; and line 6 defines the response content for this type of dialogue node.
[0145] As a specific example, operations or maintenance personnel (such as teachers conducting training) can fill in the corresponding question-and-answer dialogue content in line 5, which can show the specific question-and-answer scenario task, such as a teacher entering "Where are you from?" and giving the corresponding reply content, such as filling in the reply content "I am from Shanghai" in line 6.
[0146] In practice, when the preset format corresponding to the question-and-answer node is set, it can be converted into a dialogue node in the dialogue resource architecture. The content corresponding to the 5th line can be used as the trigger condition for the corresponding dialogue node, and the reply content corresponding to the 6th line can be used as the output content of the dialogue node.
[0147] If the dialogue node is of the chat type, as a specific example, the content of the chat type node in the default format can be:
[0148] 1 type: topic
[0149] 2. Name: Nevigation_01
[0150] 3 utterance:
[0151] 4 target_topics:
[0152] 5 auto_reply:
[0153] 6 default:
[0154] 7 off_topic:
[0155] 8 otherwise: nevigation_02
[0156] Lines 1 and 2 define the type and name of the dialogue node (name: nevigation_01), respectively; line 3 defines the specific dialogue content of this type of dialogue node; line 4 defines the target topic of this type of dialogue node; line 5 defines the automatic reply content of this type of dialogue node; line 6 defines the default reply content of this type of dialogue node; line 7 defines the reply when the user deviates from the dialogue node; and line 8 defines the name of the destination node for the jump (otherwise: nevigation_02).
[0157] As a specific example, operations or maintenance personnel can fill in the corresponding question-and-answer dialogue content in line 3, which can show the specific topic scenario task, such as entering "If you have enough time at weekend and do not have the mood to cook, what will you like to do?"; and fill in the target topic in line 4 as ["eat out", "order takeout"]; and provide corresponding reply content, such as filling in the automatic reply content "There is a roast duck restaurant nearby." in line 5; based on the built-in reply in line 5, set the corresponding default reply content, such as setting the default reply content in line 6 to "Great, eat out is an nice way for meal."; after obtaining the target topic content that matches line 4, set the jump condition to enter the next topic in line 8 (nevigation_02). If the user's reply content deviates from the current topic, the current dialogue can be ended by setting the content in line 7, for example, the content in line 7 can be filled in as "That is ok."
[0158] In practice, when the preset format corresponding to the topic-type node is set, it can be converted into a dialogue node in the dialogue resource architecture. The content corresponding to the 5th line can be used as the output content of the dialogue node, and the content corresponding to the 7th line can be used as the reply when the user's reply deviates from the current dialogue node.
[0159] In some embodiments of this specification, the content in the preset format can also be directly converted into a dialogue node in the dialogue resource architecture. That is, the dialogue node includes the jump conditions between dialogue nodes and the output content of the dialogue node.
[0160] As can be seen from the foregoing, since the preset formats of the input content corresponding to different types of dialogue nodes are different, for a specific type of dialogue node, when converting the input content of the preset format into a dialogue node, it is also necessary to convert the format of the input content. When the format of the input content is inconsistent with the preset format, feedback is given to remind the operation or maintenance personnel to input the content of the preset format corresponding to the type of dialogue node.
[0161] In practical implementation, the dialogue management method provided in the embodiments of this specification can be applied to any field that requires dialogue management. Accordingly, the content of the preset format can originate from any text related to the field requiring dialogue management. For example, the dialogue management method provided in the embodiments of this specification can be applied to the fields of education and customer service.
[0162] Accordingly, this specification also provides a dialogue management system corresponding to the above-described dialogue management method. This dialogue management system can employ the dialogue management method described in the above embodiments to manage the dialogue process. To enable those skilled in the art to better understand and implement the dialogue management system of the embodiments of this specification, specific examples are provided below with reference to the accompanying drawings.
[0163] Reference Figure 5 The diagram shown is a structural schematic of a dialogue management system according to an embodiment of this specification. In some embodiments of this specification, the dialogue management system 50 may include a resource architecture module 51, a semantic processing module 52, a state management module 53, a dialogue strategy module 54, and a response generation module 55, wherein:
[0164] The resource architecture module 51 is adapted to store the dialogue resource architecture, which is a multi-level finite state machine structure, including multiple dialogue nodes, and the dialogue nodes jump between each other based on preset jump conditions.
[0165] The semantic processing module 52 is adapted to perform semantic analysis on the user's current input content to obtain the corresponding user semantic information;
[0166] The status management module 53 is adapted to store the user's status information;
[0167] The dialogue strategy module 54 is adapted to obtain the current dialogue state information of the user from the state information stored in the state management module 53 according to the current user semantic information; and to determine the current node of the current dialogue from the dialogue resource architecture stored in the resource architecture module 51 by querying, and to jump to the corresponding destination node when the jump condition of the current node is triggered, and to obtain the output content of the destination node from the dialogue resource architecture.
[0168] The response generation module 55 is adapted to generate current response content corresponding to the user's current input content based on the user's current dialogue state information and the output content of the target node.
[0169] The following is for reference Figure 5 Briefly describe the working principle of the dialogue management system 50:
[0170] When user input is received, the semantic processing module 52 performs semantic analysis on the current user input to obtain corresponding current user semantic information. Based on the current user semantic information, the dialogue strategy module 54 can obtain the user's current dialogue state information from the user's state information stored in the state management module 53 to determine the user's expressed intent. Simultaneously, the dialogue strategy module 54 can determine the current node of the current dialogue from the dialogue resource architecture stored in the resource architecture module 51 by querying the resource architecture module 51 based on the current user semantic information. When the jump condition of the current node is triggered, it jumps to the corresponding destination node and obtains the output content of the destination node from the dialogue resource architecture. Afterward, the response generation module 55 generates current response content corresponding to the current user input based on the current dialogue state information output by the state management module 53 and the output content of the destination node.
[0171] Therefore, by adopting the above-mentioned dialogue management system, through the dialogue resource architecture of the multi-level finite state machine structure and the preset jump conditions between each dialogue node in the dialogue resource architecture, the entire dialogue process can be effectively controlled.
[0172] In the embodiments described in this specification, as previously stated, the dialogue resource architecture is a multi-level finite state machine structure, including multiple dialogue nodes, with transitions between each dialogue node based on preset transition conditions. As an optional example, the dialogue resource architecture may include multiple dialogue nodes of different types, and these multiple types of dialogue nodes are adapted to transition between each other based on preset transition conditions. That is, the dialogue resource architecture can store dialogue nodes of different types, and these different types of dialogue nodes can transition according to preset transition conditions, thereby enabling transitions between different types of dialogue nodes and the fusion of multiple types of dialogue nodes during the dialogue process, improving the user interaction experience.
[0173] The specific structure of the dialogue resource architecture can be found by referring to Figure 2 The structural diagram of the Chinese Dialogue resource architecture is not described in detail here.
[0174] Once the content of each dialogue node in the dialogue resource architecture is configured, the dialogue process can jump between different dialogue nodes according to the corresponding jump method. In other words, the dialogue process can use different jump methods to jump from the current node to the destination node.
[0175] In some examples, the multiple dialogue nodes are adapted to jump to a single destination node based on a pre-defined unique jump condition; in other examples, the multiple dialogue nodes are adapted to trigger the current dialogue to jump from the current node to a different destination node based on the user semantic information. The jump process between each dialogue node can be described in detail below. Figure 2 and Figure 4 The corresponding description in the text.
[0176] In practice, the dialogue process is completed when the current response content corresponding to the user's current input content is generated. Therefore, the dialogue management system described in the above embodiments can realize single-turn dialogue.
[0177] Based on this, the above embodiments can be further expanded and optimized according to specific application scenarios and actual conditions. For example, some interaction scenarios may require continuous multi-turn dialogues, which can improve the depth, breadth, and coherence of the interaction, thereby enhancing the user experience. To achieve multi-turn dialogues, continue to refer to... Figure 5 The current reply content generated by the reply generation module 55 can also be output to the status management module 53 (e.g., ...). Figure 5 As shown by the dashed line in the middle, the status management module 53 is also adapted to store the current reply content as the user's historical dialogue information, as part of the user's status information, in order to determine the target node for the next round of jump.
[0178] The storage process for the current response content and the specific process for implementing multi-turn dialogues can be found in [reference needed]. Figure 3 This will not be elaborated upon here.
[0179] In practical implementation, different types of dialogue nodes can be configured in the dialogue resource architecture according to different application scenarios to achieve the fusion and switching between different types of dialogue nodes. In some embodiments of this specification, the types of dialogue nodes include at least two of the following: task-type nodes related to task-type dialogues; question-and-answer nodes related to question-and-answer dialogues; and topic-type nodes related to casual conversation dialogues. For details, please refer to the descriptions in the relevant sections above, which will not be repeated here.
[0180] In practice, the internal structure of different types of dialogue nodes may be different. The dialogue process can choose the appropriate jump method according to the specific dialogue node and jump from the current dialogue node to the destination dialogue node.
[0181] Among them, for topic-type nodes, the topic-type node includes multiple sub-topic-type nodes. Any one of the multiple sub-topic-type nodes is suitable for jumping to other sub-topic-type nodes of the topic-type node, or jumping to task-type nodes, question-and-answer-type nodes or other topic-type nodes based on the corresponding jump conditions.
[0182] For a task-type node, the task-type node includes a task node unit and a task frame coupled to the node unit, and is adapted to jump to a topic-type node, a question-and-answer node or other task-type node based on the corresponding jump conditions, wherein: the task frame includes a sequence of task slots composed of multiple task slots in a preset order; correspondingly, the dialogue strategy module is also adapted to jump from the task node unit to the corresponding task frame according to the current user semantic information, and fill the sequence of task slots in the task frame in the preset order.
[0183] In practical implementation, when filling task slots, users may continuously ask multiple related questions for at least one task slot. Therefore, in some embodiments of this specification, at least one task slot in the task slot sequence includes: a task sub-node unit and a sub-task frame coupled to the task node unit, the sub-task frame including a sub-task slot sequence composed of multiple sub-task slots in a preset order; correspondingly, the semantic processing module is also adapted to obtain the current input content of the user based on the previous round of response content to obtain the corresponding current user semantic information; the dialogue strategy module also obtains the user's current dialogue state information from the stored user state information according to the current user semantic information; and determines the current task node unit where the current dialogue is located from the stored dialogue resource architecture through query, and when the jump condition of the current task node unit is triggered, fills the sub-task slot sequence in the sub-task frame in the preset order.
[0184] Based on this, the question-and-answer dialogue node includes multiple sub-question-and-answer nodes suitable for handling abnormal dialogues, and each sub-question-and-answer node is adapted to be coupled to a matching task node or topic node; correspondingly, the dialogue strategy module is also adapted to jump from the current task node or topic node to the matching sub-question-and-answer node suitable for handling abnormal dialogues according to the current user's semantic information; and to obtain the output content of the sub-question-and-answer node suitable for handling abnormal dialogues in response to the current user's semantic information; and to return to the task node or topic node coupled to the sub-question-and-answer node suitable for handling abnormal dialogues in response to a preset jump condition; the reply generation module is also adapted to generate reply content corresponding to the current user's input content according to the user's current dialogue state information and the output content of the sub-question-and-answer node suitable for handling abnormal dialogues.
[0185] In practical implementation, during the dialogue process corresponding to the current node (e.g., a task-type node or a topic-type node), an abnormal dialogue node may occur. In this case, the dialogue process can exit the dialogue content corresponding to the current node and jump to the dialogue content corresponding to the abnormal dialogue node to interact with the user, performing abnormal dialogue handling. After handling the abnormal dialogue, it can return to the original dialogue node to continue the dialogue interaction. Based on this, the question-and-answer dialogue node includes multiple sub-question-and-answer nodes suitable for handling abnormal dialogues, and each sub-question-and-answer node is suitable for coupling with a matching task-type node or topic-type node. Accordingly, continuing to refer to... Figure 5 Based on the dialogue resource structure, when abnormal dialogue content occurs, the dialogue strategy module 54 is further adapted to determine that the current dialogue content is abnormal based on the current user semantic information, and jump from the current task-type node or topic-type node to a matching sub-question-answer type node suitable for handling the abnormal dialogue; and in response to the current user semantic information, obtain the output content of the sub-question-answer type node suitable for handling the abnormal dialogue; then, the response generation module 55 can generate the current response content corresponding to the user's current input content based on the user's current dialogue state information and the output content of the sub-question-answer type node suitable for handling the abnormal dialogue; after the dialogue process corresponding to the abnormal dialogue is completed, the dialogue strategy module 54 is further adapted to return to the task-type node or topic-type node coupled to the sub-question-answer type node suitable for handling the abnormal dialogue in response to a preset jump condition.
[0186] Therefore, by coupling task-type or topic-type nodes with matching question-and-answer nodes suitable for exception handling, at any stage of the dialogue process, when an abnormal dialogue is received, guidance and control can be performed through the question-and-answer dialogue node used to handle the exception. After the question-and-answer dialogue node that handles the exception is completed, the dialogue process corresponding to the original dialogue node is returned. This can improve the flexibility of the dialogue interaction process, flexibly respond to various user input contents, and further enhance the user interaction experience.
[0187] The specific composition of each type of dialogue node, the jump process between dialogue nodes, and the abnormal dialogue handling process can be found in [reference needed]. Figure 4 The content described will not be repeated here.
[0188] As user input and the number of conversations increase, the areas and topics covered in the conversations become increasingly diverse. Therefore, we will continue to refer to... Figure 5 The dialogue management system 50 may further include: a content loading module 56, adapted to acquire content in a preset format and convert the content in the preset format into dialogue nodes and jump conditions between dialogue nodes in the dialogue resource architecture.
[0189] The preset format of the content differs for different types of dialogue nodes. The preset formats for each type of dialogue node are described in the aforementioned embodiments and will not be repeated here.
[0190] In some embodiments of this specification, the content in the preset format can also be directly converted into a dialogue node in the dialogue resource architecture. That is, the dialogue node includes the jump conditions between dialogue nodes and the output content of the dialogue node.
[0191] Therefore, the dialogue management system described in the above embodiments can not only control the dialogue process, but also enable multi-turn dialogues by storing the reply content as the user's historical dialogue information, and make the multi-turn dialogue content coherent, thereby further improving the user interaction experience.
[0192] This specification also provides an embodiment of a dialogue management device for controlling the dialogue process, such as... Figure 6 As shown, the dialogue management device 60 may include a memory 61 and a processor 62, wherein the memory 61 is adapted to store one or more computer instructions, and when the processor 72 executes the computer instructions, it performs the steps of the dialogue management method described in any of the foregoing embodiments.
[0193] In specific implementation, such as Figure 6 As shown, the dialogue management device 60 may also include an expansion interface 63, which is suitable for connecting with other devices to realize data interaction.
[0194] In specific implementation, such as Figure 6 As shown, the dialogue management device 60 may further include a display 64, adapted to display response content corresponding to the user input content.
[0195] The dialogue management device 60 can be a general-purpose or dedicated computer device, or more specifically, a server or computer terminal, such as a personal computer or portable terminal device.
[0196] In a practical implementation, the memory 61, processor 62, expansion interface 63, and display 64 can be connected via a bus.
[0197] In specific implementations, the processor can be implemented by processing chips such as a central processing unit (CPU), a graphics processing unit (GPU), or a field-programmable gate array (FPGA), or by an application-specific integrated circuit (ASIC) or one or more integrated circuits configured to implement the embodiments of this specification.
[0198] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device.
[0199] This specification also provides a computer-readable storage medium storing computer instructions, which, when executed, can perform the steps of the dialogue management method described in any of the foregoing embodiments. The computer-readable storage medium can be any suitable readable storage medium such as an optical disc, a hard disk drive, or a solid-state drive. The instructions stored on the computer-readable storage medium execute the steps of the dialogue management method described in any of the foregoing embodiments, and will not be elaborated further here.
[0200] The computer-readable storage medium may include, for example, any suitable type of memory cell, memory device, memory article, memory medium, storage device, storage article, storage medium and / or storage cell, such as memory, removable or non-removable medium, erasable or non-erasable medium, writable or rewritable medium, digital or analog medium, hard disk, floppy disk, optical disc read-only memory (CD-ROM), recordable optical disc (CD-R), rewritable optical disc (CD-RW), optical disc, magnetic medium, magneto-optical medium, removable memory card or disk, various types of digital universal optical disc (DVD), magnetic tape, cassette tape, etc.
[0201] Computer instructions may include any suitable type of code implemented using any appropriate high-level, low-level, object-oriented, visual, compiled, and / or interpreted programming language, such as source code, compiled code, interpreted code, executable code, static code, dynamic code, encrypted code, etc.
[0202] While the embodiments disclosed in this specification are as described above, they are not limited thereto. Any person skilled in the art can make various modifications and alterations without departing from the spirit and scope of the embodiments in this specification. Therefore, the scope of protection of the embodiments in this specification should be determined by the scope defined in the claims.
Claims
1. A dialogue management method characterized by, Comprise: performing semantic analysis on the current input content of the user to obtain corresponding current user semantic information; According to the current user semantic information, the current dialogue state information of the user is obtained from the stored state information of the user; And through the query, the current node where the current dialogue is located is determined from the stored dialogue resource architecture, and when the jump condition of the current node is triggered, jump to the corresponding destination node, and obtain the output content of the destination node from the dialogue resource architecture; wherein the dialogue resource architecture is a multi-level finite state machine structure, comprising a plurality of dialogue nodes, and the dialogue nodes are jumped based on the preset jump condition; wherein the dialogue resource architecture comprises a plurality of dialogue nodes of different types, and the dialogue nodes of different types are adapted to jump based on the preset jump condition, and the types of the dialogue nodes include at least two of the following: task type node related to task type dialogue; question and answer type node related to question and answer type dialogue; topic type node related to casual conversation type dialogue; According to the current dialogue state information of the user and the output content of the destination node, the current reply content corresponding to the current input content of the user is generated.
2. The dialogue management method according to claim 1, characterized by, The plurality of dialogue nodes are adapted to jump to a unique destination node based on a unique preset jump condition, or trigger the current dialogue to jump from the current node to a different destination node based on the current user semantic information.
3. The dialogue managing method according to claim 1 or 2, characterized by, Also include: Store the current reply content as the historical dialogue information of the user as part of the state information of the user, to determine the destination node of the next round of jump.
4. The dialogue managing method according to claim 3, characterized by, The topic type node includes a plurality of sub-topic type nodes, and any sub-topic node in the plurality of sub-topic type nodes is adapted to jump to other sub-topic nodes of the topic type node based on the corresponding jump condition, or jump to the task type node, the question and answer type node or other topic type node.
5. The dialogue managing method according to claim 3, characterized by, The task type node includes a task node unit and a task frame coupled to the node unit, and is adapted to jump to the topic type node, the question and answer type node or other task type node based on the corresponding jump condition, wherein: the task frame includes a task slot sequence composed of a plurality of task slots in a preset order; The dialogue management method further comprises: According to the current user semantic information, jump from the task node unit to the corresponding task frame, and fill the task slot sequence in the task frame in the preset order.
6. The dialogue managing method according to claim 5, characterized by, At least one task slot in the task slot sequence includes a task sub-node unit and a sub-task frame coupled to the task sub-node unit, and the sub-task frame includes a sub-task slot sequence composed of a plurality of sub-task slots in a preset order; The dialogue management method further comprises: Obtain the current input content of the user based on the previous round of reply content to obtain the corresponding current user semantic information; According to the current user semantic information, current dialogue state information of the user is obtained from the stored state information of the user, and through querying, a current task node unit in which the current dialogue is located is determined from the stored dialogue resource architecture, and when a jump condition of the current task node unit is triggered, sub-task slot sequences in the sub-task frame are sequentially filled in the preset order.
7. The dialogue managing method according to claim 3, characterized by, The question and answer type node includes a plurality of sub-question and answer type nodes adapted to process abnormal dialogues, and each of the sub-question and answer type nodes is adapted to be coupled with a matched task type node or a topic type node; The dialogue management method further includes: According to the current user semantic information, the current dialogue state information of the user is obtained from the stored state information of the user, and through querying, a current task node unit in which the current dialogue is located is determined from the stored dialogue resource architecture, and when a jump condition of the current task node unit is triggered, sub-task slot sequences in the sub-task frame are sequentially filled in the preset order. According to the current user semantic information, the current dialogue state information of the user is obtained from the stored state information of the user, and through querying, a current task node unit in which the current dialogue is located is determined from the stored dialogue resource architecture, and when a jump condition of the current task node unit is triggered, sub-task slot sequences in the sub-task frame are sequentially filled in the preset order. Further includes:
8. The dialogue managing method according to claim 1, characterized by, Obtaining content in a preset format and converting the content in the preset format into dialogue nodes in the dialogue resource architecture and jump conditions between the dialogue nodes. Includes:
9. A dialogue management system, characterized by The resource architecture module, the semantic processing module, the state management module, the dialogue strategy module, and the reply generation module, wherein: The resource architecture module is adapted to store a dialogue resource architecture, the dialogue resource architecture is a multi-level finite state machine structure, includes a plurality of dialogue nodes, and the dialogue nodes are jumped based on preset jump conditions; wherein the dialogue resource architecture includes a plurality of dialogue nodes of different types, the dialogue nodes of different types are adapted to be jumped based on preset jump conditions between the dialogue nodes, and the types of the dialogue nodes include at least two of the following: a task type node related to a task type dialogue; a question and answer type node related to a question and answer type dialogue; a topic type node related to a casual type dialogue; The semantic processing module is adapted to perform semantic analysis on current user input content to obtain corresponding current user semantic information; The state management module is adapted to store state information of the user; The dialogue strategy module is adapted to obtain current dialogue state information of the user from the state information of the user stored in the state management module according to the current user semantic information, and determine a current node in which a current dialogue is located from the dialogue resource architecture stored in the resource architecture module through querying, and jump to a corresponding destination node when a jump condition of the current node is triggered, and obtain output content of the destination node from the dialogue resource architecture; The reply generation module is adapted to generate current reply content corresponding to the current user input content according to the current dialogue state information of the user and the output content of the destination node. 10. The dialogue management system according to claim 9, characterized by, The plurality of dialogue nodes are adapted to jump to a unique destination node based on a pre-set unique jump condition, or trigger the current dialogue to jump from a current node to a different destination node based on the user semantic information.
11. The dialogue management system according to claim 9 or 10, characterized in that, The state management module is further adapted to store the current reply content as the historical dialogue information of the user, as part of the state information of the user, for determining the destination node of the next round of jump.
12. The dialogue management system according to claim 11, characterized in that, The topic type node includes a plurality of sub-topic type nodes, any one of the plurality of sub-topic nodes is adapted to jump to other sub-topic nodes of the topic type node, or jump to a task type node, a question and answer type node or other topic type nodes based on a corresponding jump condition.
13. The dialogue management system of claim 11, wherein, The task type node includes a task node unit and a task frame coupled with the node unit, and is adapted to jump to a topic type node, a question and answer type node or other task type nodes based on a corresponding jump condition, wherein: the task frame includes a task slot sequence composed of a plurality of task slots in a pre-set order; The dialogue strategy module is further adapted to jump from the task node unit to the corresponding task frame according to the current user semantic information, and sequentially fill the task slot sequence in the task frame in the pre-set order.
14. The dialogue management system according to claim 13, characterized by, At least one task slot in the task slot sequence includes a task sub-node unit and a sub-task frame coupled with the task sub-node unit, and the sub-task frame includes a sub-task slot sequence composed of a plurality of sub-task slots in a pre-set order; The semantic processing module is further adapted to obtain the corresponding current user semantic information based on the user's current input content corresponding to the reply content of the last round; The dialogue strategy module is further adapted to obtain the current dialogue state information of the user from the stored state information of the user according to the current user semantic information, and determine the current task node unit in which the current dialogue is located by querying the stored dialogue resource architecture, and sequentially fill the sub-task slot sequence in the sub-task frame in the pre-set order when the jump condition of the current task node unit is triggered.
15. The dialogue management system of claim 11, wherein, The question and answer type node includes a plurality of sub-question and answer type nodes adapted to handle abnormal dialogues, and each of the sub-question and answer type nodes is adapted to be coupled with a matched task type node or topic type node; The dialogue strategy module is further adapted to jump from the current task type node or topic type node to the matched sub-question and answer type node adapted to handle abnormal dialogues according to the current user semantic information; and in response to the current user semantic information, obtain the output content of the sub-question and answer type node adapted to handle abnormal dialogues; and in response to a pre-set jump condition, return to the task type node or topic type node coupled with the sub-question and answer type node adapted to handle abnormal dialogues; The reply generation module is further adapted to generate the current reply content corresponding to the current user input content according to the current dialogue state information of the user and the output content of the sub-question and answer type node adapted to handle abnormal dialogues. 16.The dialogue management system of claim 9, wherein, Further comprising: A content loading module is adapted to acquire content in a preset format and convert the content in the preset format into dialogue nodes and transition conditions between dialogue nodes in the dialogue resource architecture.
17. A dialogue management device comprising a memory and a processor, wherein, The memory is adapted to store one or more computer instructions, and the processor executes the computer instructions to perform the steps of the dialogue management method in any one of claims 1 to 8.
18. A computer readable storage medium having stored thereon computer instructions, wherein, The computer instructions perform the steps of the dialogue management method in any one of claims 1 to 8 when executed.
Citation Information
Patent Citations
Processing method of session information, server and computer readable storage medium
CN106911812A
Conversation process customization method and device
CN111145745A