CN114428844A - Dialogue management method, dialogue management system, dialogue management apparatus, and storage medium - Google Patents

Dialogue management method, dialogue management system, dialogue management apparatus, and storage medium Download PDF

Info

Publication number
CN114428844A
CN114428844A CN202210103293.0A CN202210103293A CN114428844A CN 114428844 A CN114428844 A CN 114428844A CN 202210103293 A CN202210103293 A CN 202210103293A CN 114428844 A CN114428844 A CN 114428844A
Authority
CN
China
Prior art keywords
node
task
current
user
dialog
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210103293.0A
Other languages
Chinese (zh)
Inventor
张潇君
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Liulishuo Information Technology Co ltd
Original Assignee
Shanghai Liulishuo Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Liulishuo Information Technology Co ltd filed Critical Shanghai Liulishuo Information Technology Co ltd
Priority to CN202210103293.0A priority Critical patent/CN114428844A/en
Publication of CN114428844A publication Critical patent/CN114428844A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4498Finite state machines

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Artificial Intelligence (AREA)
  • Mathematical Physics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Human Computer Interaction (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Machine Translation (AREA)

Abstract

A session management method, a session management system, a device and a storage medium, wherein the session management method comprises: performing semantic analysis on the current input content of the user to obtain corresponding current user semantic information; acquiring current conversation state information of a user from stored state information of the user according to the semantic information of the current user; determining a current node where a current conversation is located from a stored conversation resource framework through query, jumping to a corresponding destination node when a jumping condition of the current node is triggered, and acquiring output content of the destination node from the conversation resource framework; the dialogue resource framework is a multi-level finite state machine structure and comprises a plurality of dialogue nodes, and each dialogue node jumps based on a preset jump condition; and generating reply content corresponding to the current input content of the user according to the current conversation state information of the user and the output content of the destination node. By adopting the scheme, the whole conversation process can be effectively controlled.

Description

Dialogue management method, dialogue management system, dialogue management apparatus, and storage medium
Technical Field
The embodiment of the specification relates to the technical field of human-computer interaction, in particular to a conversation management method, a conversation management system, a conversation management device and a storage medium.
Background
A dialog system is a system for a machine to understand human language intention and to perform a specific task or make a reply through human-computer interaction, and can be generally classified into: task-based dialog systems, question-and-answer-based dialog systems, and chat-based dialog systems. Wherein: the task-based dialog system is suitable for scenes with explicit tasks; the question-answering type dialogue system is mainly used for answering user questions; the chatty type dialogue system has no specific target and is often used for virtual companions.
Currently, end-to-end dialog systems are obtained mainly by training the algorithmic model with a large amount of data. However, with the trained dialog system, when the dialog system acquires given input data, the corresponding result is directly output, and it is difficult to control the progress of the dialog.
Disclosure of Invention
In view of this, embodiments of the present disclosure provide a session management method, a session management system, a session management apparatus, and a storage medium, which can effectively control the whole session process.
First, an embodiment of the present specification provides a session management method, including:
performing semantic analysis on the current input content of the user to obtain corresponding current user semantic information;
acquiring current conversation state information of the user from the stored state information of the user according to the current user semantic information; determining a current node where a current conversation is located from a stored conversation resource framework through query, jumping to a corresponding destination node when a jumping condition of the current node is triggered, and acquiring output content of the destination node from the conversation resource framework; the dialogue resource architecture is a multi-level finite state machine structure and comprises a plurality of dialogue nodes, and each dialogue node skips based on a preset skipping condition;
and generating current reply content corresponding to the current input content of the user according to the current conversation state information of the user and the output content of the destination node.
Optionally, the dialogue resource framework includes a plurality of dialogue nodes of different types, and among the dialogue nodes of different types, a jump is performed based on a preset jump condition.
Optionally, the plurality of session nodes are adapted to jump to a unique destination node based on a preset unique jump condition, or trigger the current session to jump from a current node to a different destination node based on the user semantic information.
Optionally, the dialog management method further includes: and storing the reply content as historical dialogue information of the user as a part of the state information of the user so as to determine a destination node of the next round of jumping.
Optionally, the types of the conversation node include at least two of: a task-based node associated with a task-based dialog; question-answer type nodes associated with question-answer type conversations; topic type nodes related to chat type conversations.
Optionally, the topic type node includes a plurality of sub-topic type nodes, and any one of the plurality of sub-topic type nodes is adapted to jump to another sub-topic node of the topic type node, or jump to a task type node, a question-answer type node, or another topic type node based on a corresponding jump condition.
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-type node, or another task-type node based on a corresponding jump condition, where: the task frame comprises a task slot sequence which is formed by a plurality of task slots according to a preset sequence;
the dialog management method further includes:
and jumping to a corresponding task frame from the task node unit according to the semantic information of the current user, and sequentially filling a task slot sequence in the task frame according to the preset sequence.
Optionally, at least one task slot in the sequence of task slots comprises: the task processing system comprises a task sub-node unit and a sub-task frame coupled with the task sub-node unit, wherein the sub-task frame comprises a sub-task slot sequence formed by a plurality of sub-task slots according to a preset sequence;
the dialog management method further includes:
acquiring current input content corresponding to the previous-round reply content of a user to obtain corresponding current user semantic information;
acquiring current conversation state information of the user from the stored state information of the user according to the semantic information of the current user; and determining a current task node unit where a current dialog is located from a stored dialog resource framework through query, and sequentially filling a subtask slot sequence in the subtask frame according to the preset sequence when a skip condition of the current task node unit is triggered. Optionally, the question-answer type dialogue node comprises a plurality of question-answer type nodes adapted to handle abnormal dialogue, each of the question-answer type nodes being adapted to be coupled with a matching task type node or topic type node;
the dialog management method further includes: according to the user semantic information, jumping from the current task type node or topic type node to a matched sub question and answer type node suitable for processing abnormal conversation;
responding to the user semantic information, and acquiring output contents of the sub question and answer type nodes suitable for processing abnormal conversations;
generating reply content corresponding to the input content of the user according to the current conversation state information of the user and the output content of the question-answer type node suitable for processing the abnormal conversation, and responding to the corresponding jump condition and returning to the task type node or the topic type node coupled with the question-answer type node suitable for processing the abnormal conversation.
Optionally, the dialog management method further includes: and acquiring content in a preset format, and converting the content in the preset format into a dialogue node in the dialogue resource architecture and a skip condition between the dialogue nodes.
Correspondingly, an embodiment of the present specification further provides a dialog management system, including: resource architecture module, semantic processing module, state management module, dialogue strategy module and reply generation module, wherein:
the resource architecture module is suitable for storing a dialogue resource architecture, the dialogue resource architecture is a multi-level finite state machine structure and comprises a plurality of dialogue nodes, and each dialogue node jumps based on a preset jump condition;
the semantic processing module is suitable for performing semantic analysis on the current input content of the user to obtain corresponding current user semantic information;
the state management module is suitable for storing the state information of the user;
the conversation strategy module is suitable for acquiring the current conversation state information of the user from the state information of the user stored by the state management module according to the current user semantic information; determining a current node where a current conversation is located from a conversation resource framework stored by the resource framework module through query, jumping to a corresponding destination node when a jumping condition of the current node is triggered, and acquiring output content of the destination node from the conversation resource framework;
and the reply generation module is suitable for generating current reply content corresponding to the input content of the current user according to the current conversation state information of the user and the output content of the destination node.
Optionally, the dialogue resource framework comprises a plurality of dialogue nodes of different types, and the dialogue nodes of different types are adapted to jump based on a preset jump condition.
Optionally, the plurality of session nodes are adapted to jump to a unique destination node based on a preset unique jump condition, or trigger the current session to jump from a current node to a different destination node based on the user semantic information.
Optionally, the state management module is further adapted to store the reply content as historical dialog information of the user, as a part of the state information of the user, so as to determine a destination node of a next hop.
Optionally, the types of the conversation node include at least two of: a task-based node associated with a task-based dialog; question-answer type nodes associated with question-answer type conversations; topic type nodes associated with chat type conversations.
Optionally, 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 another sub-topic node of the topic type node, or jump to a task type node, a question-answer type node, or another topic type node, based on a corresponding jump condition.
Optionally, the task-based node includes a task node unit and a task frame coupled to the node unit, and is adapted to jump to a topic-based node, a question-and-answer-based node, or other task-based nodes based on a corresponding jump condition, where: the task frame comprises a task slot sequence which is formed by a plurality of task slots according to a preset sequence;
and the dialogue strategy module is also suitable for jumping to a corresponding task frame from the task node unit according to the current user semantic information, and sequentially filling a task slot sequence in the task frame according to the preset sequence.
Optionally, at least one task slot in the sequence of task slots comprises: the task processing system comprises a task sub-node unit and a sub-task frame coupled with the task sub-node unit, wherein the sub-task frame comprises a sub-task slot sequence consisting of a plurality of sub-task slots according to a preset sequence;
the semantic processing module is also suitable for acquiring the current input content corresponding to the previous-round recovery content of the user to obtain the corresponding current user semantic information;
the conversation strategy module is also used for acquiring the current conversation state information of the user from the stored state information of the user according to the current user semantic information; and determining a current task node unit where a current dialog is located from a stored dialog resource framework through query, and sequentially filling a subtask slot sequence in the subtask frame according to the preset sequence when a skip condition of the current task node unit is triggered. Optionally, the question-answer type dialogue node comprises a plurality of question-answer type nodes adapted to handle abnormal dialogue, each of the question-answer type nodes being adapted to be coupled with a matching task type node or topic type node; the session policy module is configured to, in response to the received request,
the dialogue strategy module is also suitable for jumping from the current task type node or topic type node to a matched sub question and answer type node which is suitable for processing abnormal dialogue according to the current user semantic information; responding to the semantic information of the current user, and acquiring the output content of the sub-question-answer type node suitable for processing the abnormal conversation; responding to a preset jump condition, and returning to a task type node or a topic type node coupled with the question answering type node suitable for processing the abnormal conversation;
the reply generation module is also suitable for generating reply contents corresponding to the input contents of the current user according to the current conversation state information of the user and the output contents of the sub question answering type nodes suitable for processing abnormal conversations.
Optionally, the dialog management system further comprises: and the content loading module is suitable for acquiring the content in the preset format and converting the content in the preset format into the conversation nodes in the conversation resource architecture and the jump conditions between the conversation nodes.
Embodiments of the present specification further provide a dialog management device, including a memory and a processor, where the memory is adapted to store one or more computer instructions, and the processor executes the computer instructions to perform the steps of the dialog management method according to any one of the preceding embodiments.
Embodiments of the present specification also provide a readable storage medium, on which computer instructions are stored, the computer instructions being executed to perform the steps of the dialog management method according to any one of the preceding embodiments.
By adopting the dialog management method provided in the embodiment of the present specification, the adopted dialog resource architecture is a multi-level finite state machine structure and includes a plurality of dialog nodes, so that, based on the current user semantic information obtained from the current input content of the user, the corresponding dialog nodes and the skip conditions between the dialog nodes can be obtained, so that when the skip conditions of the corresponding dialog nodes are triggered, the corresponding destination nodes can be skipped to, the output content of the destination nodes is obtained from the dialog resource architecture, and further, the current reply content corresponding to the current input content of the user can be generated according to the current dialog state information of the user and the output content of the destination nodes, so as to realize the dialog interaction with the user, and through the dialog resource architecture of the multi-level finite state machine structure and the skip conditions preset between each dialog node in the dialog resource architecture, the whole conversation process can be effectively controlled.
Furthermore, the dialogue resource architecture comprises a plurality of dialogue nodes of different types, and the dialogue nodes of different types are suitable for jumping based on preset jumping conditions, so that jumping of different types of dialogue nodes and fusion of multi-type dialogue nodes in a dialogue process can be realized, and user interaction experience is improved.
Furthermore, the current reply content is stored as the historical dialogue information of the user and is used as a part of the state information of the user to determine the destination node of the next round of skipping, so that multi-round dialogue can be realized, and the destination node of the next round of skipping is confirmed through the reply content of the previous round, so that the contents of the multi-round dialogue have continuity, and the interactive experience of the user is further improved.
Further, the question-answer type dialogue node comprises a plurality of question-answer type nodes which are suitable for processing abnormal dialogue, and each question-answer type node is suitable for being coupled with a matched task type node or topic type node; the dialogue management method further comprises the step of jumping from the current task type node or topic type node to a matched sub question and answer type node suitable for processing abnormal dialogue according to the current user semantic information; responding to the semantic information of the current user, and acquiring the output content of the sub-question-answer type node suitable for processing the abnormal conversation; according to the current dialogue state information of the user and the output content of the question answering type node suitable for processing the abnormal dialogue, generating reply content corresponding to the input content of the current user, and responding to a corresponding jumping condition, and returning to a task type node or a topic type node coupled with the question answering type node suitable for processing the abnormal dialogue. As can be seen from the above, by coupling the task type node or topic type node with the matched question-answer type node suitable for exception handling, at any stage of the session process, when an exception session is received, guidance control is performed by handling the exception question-answer type session node, so that after the session process corresponding to the exception session is finished, the session process corresponding to the original session node is returned, thereby improving flexibility of the session interaction process, flexibly coping with various user input contents, and further improving user interaction experience.
Furthermore, by acquiring the content in the preset format and converting the content in the preset format into the conversation nodes in the conversation resource architecture and the jump conditions between the conversation nodes, the operation or maintenance personnel of the conversation management system can customize the conversation process, and continuously expand and enrich the conversation resource architecture.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present specification, the drawings needed to be used in the embodiments of the present specification or in the description of the prior art will be briefly described below, it is obvious that the drawings described below are only some embodiments of the present specification, and it is also possible for a person skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a flow chart illustrating a method for session management in an embodiment of the present specification;
FIG. 2 is a schematic structural diagram illustrating a dialogue resource architecture in an embodiment of the present specification;
FIG. 3 is a process diagram illustrating a multi-turn dialog process in an embodiment of the present disclosure;
FIG. 4 is a schematic diagram illustrating a specific structure of a processing session resource architecture in an embodiment of the present specification;
FIG. 5 is a schematic structural diagram illustrating a dialog management system in an embodiment of the present specification;
fig. 6 shows a schematic structural diagram of a session management device in an embodiment of the present specification.
Detailed Description
As described in the background art, with a dialog system trained with a large amount of data, when the dialog system acquires given input data, a corresponding result is directly output, and it is difficult to control the dialog process.
In order to solve the above problem, an embodiment of the present specification provides a dialog management method, where an adopted dialog resource architecture is a multi-level finite state machine structure and includes a plurality of dialog nodes, so that, based on current user semantic information obtained from current input content of a user, a corresponding dialog node and a skip condition between dialog nodes can be obtained, so that when the skip condition of the corresponding dialog node is triggered, a corresponding destination node can be skipped, output content of the destination node is obtained from the dialog resource architecture, and further, according to current dialog state information of the user and output content of the destination node, current reply content corresponding to current input content of the user can be generated, dialog interaction with the user is realized, and through the dialog resource architecture of the multi-level finite state machine structure, and the preset jump condition between each dialogue node in the dialogue resource architecture can effectively control the whole dialogue process.
To enable those skilled in the art to better understand the principles and advantages of the dialog management method of the embodiments of the present description and to implement them, the following description is given by way of example of specific embodiments with reference to the accompanying drawings.
Referring to a flowchart of a dialog management method in this embodiment described in fig. 1, in some embodiments of this specification, a dialog process may be specifically controlled according to the following steps:
and S11, performing semantic analysis on the current input content of the user to obtain corresponding current user semantic information.
In specific implementation, for different types of current input contents of users, corresponding semantic analysis processing can be performed on the current input contents of the users to obtain corresponding semantic information of the users.
For example, if the type of the currently input content of the user is text data, the semantics expressed by the user can be obtained directly through natural language processing; if the type of the currently input content of the user is voice data, the voice data may be converted into text data (for example, the voice may be converted into the text data by using an Automatic Speech Recognition (ASR) technology), and then natural language processing may be performed on the converted text data to obtain the user semantic information.
It will be appreciated that the user's current input content may also be other types of data, such as video data, from which the user's voice data may be extracted and converted to text data. The embodiment of the present specification does not limit the specific form of the user input content, as long as semantic analysis can be performed on the user input content.
S12, acquiring the current dialogue state information of the user from the stored state information of the user according to the current user semantic information; and determining a current node where a current dialog is located from a stored dialog resource framework through query, jumping to a corresponding destination node when a jumping condition of the current node is triggered, and acquiring output content of the destination node from the dialog resource framework.
The dialogue resource architecture can be a multi-level finite state machine structure, wherein the dialogue resource architecture comprises a plurality of dialogue nodes, and each dialogue node jumps based on a preset jump condition.
In specific implementation, according to the current input content of the user, corresponding current user semantic information is obtained, and through the current user semantic information, the current dialogue state information of the user can be obtained from the stored state information of the user, namely the intention expressed by the user is determined.
In addition, in other embodiments, to facilitate management of session progress of different users, an Identity (ID) identification may be established for the user, and when input content of the user is received, the ID identification of the user may be stored to the state information of the user together with the input content as part of the user state information.
In a specific implementation, a current node where a current dialog is located, that is, a current node corresponding to the user semantic information, may be determined from a stored dialog resource architecture through a query operation. More specifically, because the dialog resource framework is a multi-level finite state machine structure and includes a plurality of dialog nodes, the corresponding dialog node can be obtained from the dialog resource framework as the current node through query operation according to the user semantic information and the current dialog state information of the user. And then, when the jump condition of the current node is triggered, based on a preset trigger condition, the conversation process can jump from the current node to a corresponding destination node, and the output content of the destination node is obtained from the conversation resource structure.
It should be noted that, in a specific implementation, the state information of the user and the session resource framework may both be stored in the same device, for example, both are stored in the local, or both are stored in the cloud, or may be stored in different devices, for example, the state information of the user may be stored in the local, and the session resource framework may be stored in the cloud server. The user's state information and dialog resource framework may be retrieved from the corresponding storage location upon receiving the user input.
And S13, generating the current reply content corresponding to the current input content of the user according to the current dialog state information of the user and the output content of the destination node.
Specifically, via steps S11 and S12, the current dialog state information of the user and the output content of the destination node can be determined based on the current user semantic information, and the current reply content corresponding to the current input content of the user can be determined according to the meanings expressed by the two.
Therefore, the whole conversation process can be effectively controlled through the conversation resource framework of the multilayer finite-state machine structure and the preset jump condition between each conversation node in the conversation resource framework.
In an embodiment of the present specification, as described above, the dialog resource architecture is a multi-level finite state machine structure, and includes a plurality of dialog nodes, where each dialog node jumps based on a preset jump condition. As an alternative example, the dialogue resource framework may comprise a plurality of different types of dialogue nodes, and the plurality of different types of dialogue nodes are adapted to jump based on a preset jump condition. That is to say, the dialogue resource architecture can store dialogue nodes of different types, and different dialogue nodes can jump according to preset jump conditions, so that jump of different types of dialogue nodes and fusion of multi-type dialogue nodes in a dialogue process can be realized, and user interaction experience is improved.
Referring to a schematic structural diagram of a session resource architecture in the embodiment of the present specification shown in fig. 2, in some embodiments of the present specification, a session resource structure 20 may include a plurality of session nodes 21 to 2n of different types, where the specific structure of the session nodes of different types may be the same or different. For example, conversation node 21 may include sub-conversation nodes 211 through 21A, and any one of the conversation nodes 211 through 21A may include a plurality of node units, e.g., sub-conversation node 211 includes node unit U11, sub-conversation node 212 includes node units U12, …, sub-conversation node 21A includes node unit U11; the conversation node 22 may include a node unit U21 and a task frame 221 coupled with the node unit U21; the dialogue node 2n may include sub-dialogue nodes 2n1 to 2nB, and any of the sub-dialogue nodes 2n1 to 2nB may include question-answer pairs; wherein n, A, B and X are integers which are more than zero.
It should be noted that, for convenience of explanation, only an example in which the sub-dialog nodes 211 to 21A have one node unit is shown in fig. 2. In a specific implementation, each sub-dialog node may also include a plurality of node units.
In particular implementations, as shown in fig. 2, when a jump condition of a node element and/or a conversation node is triggered, a conversation process may jump between each conversation node, e.g., the conversation process may jump from node element U11 in sub-conversation node 211 to conversation node 22; it is also possible to jump from conversation node 21A to node element U21 in conversation node 22.
It is understood that the above-mentioned jumping between session nodes in the session process is only an example, and in a specific implementation, the session process may jump between session nodes based on corresponding jumping conditions, for example, the session process may jump directly from the session node 21 to the session node 2 n.
When the contents of each session node in the session resource architecture are configured, the session process can jump between the session nodes according to corresponding jump modes, that is, the session process can jump from the current node to the destination node by adopting different jump modes.
In some examples, the plurality of conversation nodes are adapted to jump to a unique destination node based on a preset unique jump condition, as in fig. 2, a conversation process may jump from node unit U11 in sub-conversation node 21A to node unit U12 in sub-conversation node 212, that is, when the jump condition of the current node is triggered, the conversation process can jump to the unique destination node only from the current node; in other examples, the dialog nodes are adapted to trigger the current dialog to jump from the current node to a different destination node based on the current user semantic information, that is, when a jump condition of the current node is triggered, one of the destination nodes that can jump can be selected to jump from a plurality of destination nodes that can jump according to the current user semantic information, as in fig. 2, when a jump condition of the node unit U21 is triggered, a dialog process can jump from the task frame 221 to the sub-dialog node 2n1 or to the sub-dialog node 2n2 according to the current user semantic information.
In specific implementation, when the current reply content corresponding to the current input content of the user is generated, the dialog process can be completed, so that a single-turn dialog can be realized by adopting the dialog management method in the embodiment.
On this basis, the above embodiments can be further expanded and optimized according to specific application scenarios and practical situations. For example, for some interaction scenarios, multiple continuous rounds of conversations may be required, so that the depth, breadth and continuity of interaction may be improved, and the user interaction experience may be enhanced. For this reason, the dialog management method provided in the embodiments of the present specification may further include: and storing the current reply content as historical conversation information of the user, wherein the current reply content is used as a part of state information of the user to be used for determining a target node of next round of skipping, so that multi-round conversation can be realized, and the target node of next round of skipping is confirmed through the reply content of the previous round, so that the multi-round conversation content has continuity, and the user interaction experience is further improved.
Referring to a process diagram of a multi-turn conversation process in an embodiment of this specification shown in fig. 3, as shown in fig. 3, a current conversation process is in a tth turn, and current conversation state information of a user in the tth turn can be determined according to current input content of the user and conversation state information of the user in a previous turn of the conversation process, where the current conversation state information of the user in the tth turn of the conversation process includes an intention "info" and corresponding LOCATION information "LOCATION? ", the user may reply differently, i.e., input different content, based on the output content of the current node e.
If the user inputs the content "Yes", the corresponding user semantic information is judged to be "Yes _ ANSWER", a jump condition between a current node e and a target node j is triggered, a conversation process jumps from the current node e to the target node j in a t +1 th wheel conversation process, an "I like Shanghai to" is output according to the target node j and the current conversation state information of the user, and the "I like Shanghai to" is stored as historical conversation information and is used as a part of the user state information in the t +1 th wheel conversation process.
If the user inputs the content No, the corresponding user semantic information is judged to be NO _ ANSWER, a jump condition between the current node e and the destination node k is triggered, the conversation process jumps from the current node e to the destination node k in the t +1 th wheel conversation process, according to the destination node k and the current conversation state information of the user, All right is output, and All right is stored as historical conversation information and is used as a part of the user state information in the t +1 th wheel conversation process.
If the user does not answer the question, but asks a special question, "Where are you from? "the corresponding user semantic information is judged as" REQUEST _ HOMETOWN ", wherein" REQUEST "represents intention, and" HOMETOWN "represents the target of inquiry, at this time, a jump condition between the current node e and the destination node l is triggered, the dialogue process jumps from the current node e to the destination node l in the t +1 th wheel dialogue process, namely to other topic type nodes, and outputs" I am from america.
In some embodiments, if the dialogue resource module is not configured with "Where are you from? "corresponding session node, at this time, the t +1 th session can be terminated, and when the user input content is received again, a new session process is started.
Wherein t, e, j, k and l are integers which are more than 0, and j, k and l are not equal to each other.
It should be noted that, the jumping process of the node dialog in fig. 3 is only an example, and does not limit the specific jumping manner of the dialog node in the embodiment of the present specification. In specific implementation, different types of session nodes can be configured in the session resource architecture according to different application scenarios, so as to implement fusion and hopping of the different types of session nodes. In some embodiments of the present description, the types of conversation nodes include at least two of: a task-based node associated with a task-based dialog; question-answer type nodes associated with question-answer type conversations; topic type nodes related to chat type conversations.
As a specific example, in the teaching in the live broadcasting form, according to the teaching content, the learner is required to complete a corresponding task or perform a question-answer communication with the learner, and the learner is allowed to ask any question in or out of the classroom, so that it is necessary to simultaneously implement three types of dialogue nodes and implement a jump between the three types of dialogue nodes, thereby ensuring the flexibility in the live broadcasting teaching process, more effectively improving the live broadcasting teaching effect, and improving the experience of the student user.
In specific implementation, the internal structures of the conversation nodes with different types can be different, and the conversation process can select a corresponding jump mode according to the specific conversation node and jump from the current conversation node to the target conversation node.
Referring to a specific structural diagram of a dialog resource architecture in the embodiment of the present specification shown in fig. 4, the dialog resource structure 40 may include a Task-type node Task related to a Task-type dialog, a Topic-type node Topic related to a chat-type dialog, and optionally, a question-and-answer-type node QA related to a question-and-answer-type dialog.
The Topic type nodes Topic can comprise Sub-Topic type nodes Sub-Topic 1-Sub-Topic, and any Sub-Topic node in the Sub-Topic type nodes is suitable for jumping to other Sub-Topic nodes of the Topic type node based on corresponding jumping conditions, or jumping to task type nodes, question and answer type nodes or other Topic type nodes.
With continued reference to fig. 4, each Sub-topic type node in Sub-topic type nodes Sub topic 1-Sub topic may include a plurality of node units, and based on the position of each node Unit in the topic type node, the node units may include a Start node Unit, an intermediate node Unit, and an End node Unit, and a conversation process corresponding to each Sub-topic type node starts from the Start node Unit, passes through the intermediate node Unit, and ends to the End node Unit, for example, Sub-topic type node Sub topic1 may include a Start node Unit1, a plurality of intermediate node units, and an End node Unit, where m is an integer greater than 0.
In specific implementation, any sub-Topic type node can be selected from the Topic type nodes Topic, when a conversation process corresponding to the sub-Topic type node is executed, according to a corresponding jump condition, the conversation process can jump to a Task type node Task or a question-answer type node QA or other Topic type nodes, or when the conversation process corresponding to one sub-Topic type node is completed, the conversation process jumps to other sub-Topic type nodes of the Topic type node from the current sub-Topic type node. As shown in fig. 4, the Sub-Topic type node Sub Topic1 may be used as the current dialogue node, and when the corresponding node unit in the Sub-Topic type node Sub Topic1 is executed, the dialogue process may jump from the Sub-Topic type node Sub Topic1 to the Sub-Topic type node Sub Topic2, or may jump from the Sub-Topic type node Sub Topic1 to the Task type node Task, or may jump from the Sub Topic1 to the question and answer type node QA when the corresponding jump condition is triggered. When the dialogue process jumps from Sub topic1 to question-answer type node QA, after the dialogue process corresponding to question-answer type node QA is completed, the dialogue process needs to return to Sub topic type node Sub topic 1.
With continued reference to fig. 4, the Task-type node Task may include a Task node unit and a Task Frame coupled to the Task node unit, adapted to jump to a topic-type node, question-and-answer-type node, or other Task-type node based on a corresponding jump condition wherein: the task frame comprises a task slot sequence which is formed by a plurality of task slots according to a preset sequence. In particular implementations, as shown in FIG. 4, based on the location of a task node element in a task-type node, the task node element may include a Start node element Start Unit2 and an intermediate node element Unit 21; the task Frame may include a task Slot sequence T1 composed according to a preset order, and the task Slot sequence T1 may include task slots Slot1, Slot2, Slot3, …, Slot, …, and Slot, where any task Slot in the task Slot sequence T1 may be represented by a task Slot, different contents are set in the task Slot, and different task type nodes may be formed, where i and q are integers greater than 0, and i is not greater than q.
Correspondingly, when a dialog process corresponding to the Task node Task is executed, according to the current user semantic information, the Task node unit can jump to a corresponding Task frame, and Task slot sequences in the Task frame are sequentially filled according to the preset sequence. Continuing to refer to fig. 4, according to the semantic information of the current user, the dialog process can jump from the intermediate node Unit21 to the Task Frame, and automatically fill the Task slot Sloti, and when the Task slot Sloti is filled, the dialog process corresponding to the Task-type node Task is completed.
In particular implementations, a user may continuously present a number of related questions to at least one of the task slots Sloti while filling it. Thus, in some embodiments of the present description, at least one task slot of the sequence of task slots comprises: the task node unit comprises a task sub-node unit and a sub-task frame coupled with the task node unit, wherein the sub-task frame comprises a sub-task slot sequence which is formed by a plurality of sub-task slots according to a preset sequence. With reference to fig. 4, at least one task slot Sloti in the task slot sequence Frame may include at least a task Sub-node Unit2i and a Sub-task Frame Sub-Frame coupled to the task Sub-node Unit22, where the Sub-task Frame Sub-Frame may include a Sub-task slot sequence ST1 formed by Sub-task slots Sloti1, Sloti2, Sloti3, …, Sloti, …, and Slotg in sequence, where any Sub-task slot in the Sub-task slot sequence ST1 may be represented by Sloti, where p and g are both integers greater than 0 and p is equal to or less than g.
In specific implementation, when the task slot in the task Frame is filled, the current round of conversation process is completed, corresponding reply content is generated, and the current input content corresponding to the previous round of reply content of the user can be obtained to obtain corresponding current user semantic information; acquiring current conversation state information of the user from the stored state information of the user according to the semantic information of the current user; and determining a current task node unit where a current dialog is located from a stored dialog resource framework through query, and sequentially filling a subtask slot sequence in the subtask frame according to the preset sequence when a skip condition of the current task node unit is triggered.
Continuing to refer to fig. 4, when the conversation process jumps to the Task-type node, the conversation process corresponding to the intermediate node Unit21 may be executed, and when the Task slot Sloti in the Task-type node Task is completely filled, the corresponding reply content may be given; based on the reply content, the current semantic information of the user corresponding to the content input again by the user can be obtained, the conversation process corresponding to the Unit2i of the intermediate node is executed, after the Task slot slotp in the Task node Task is completely filled, the conversation process is completed, and when the corresponding skipping condition is triggered, the conversation process can skip to the question-answer node QA or the Topic node Topic or other Task nodes Task by the current Task node Task.
In specific implementation, when a session process corresponding to a current node (for example, a session node of a type task node or a topic node) is performed, an abnormal session node may occur, and at this time, the session process may jump out a session content corresponding to the current session node, jump to a session content corresponding to the abnormal session node to perform session interaction with a user, execute abnormal session processing, and after the abnormal session process is completed, return to the original session node to continue the session interaction.
Based thereon, with continued reference to FIG. 4, the question-answer node QA may comprise a plurality of sub-question-answer nodes adapted to handle exception conversations, each of which is adapted to be coupled with a matching Task-type node Task or Topic-type node Topic. Each sub-question-answer type node may exist in the form of a question-answer pair, each question-answer pair may include a question Q and a reply content a corresponding to the question Q, and Q, A in each question-answer pair may be different. For example, question Q1 corresponds to reply content a1, question Q2 corresponds to reply a2 content, …, question Qv corresponds to reply content Av, …, question Qs corresponds to reply content As, wherein question Qv is used for representing any question in question-answering node QA, reply content Av is used for representing any reply content corresponding to question Qv in question-answering node QA, wherein v and s are integers greater than 0, and v is less than or equal to s.
Correspondingly, based on the dialogue resource structure, when abnormal dialogue content occurs, the current dialogue content can be determined to be the abnormal dialogue content according to the user semantic information, and the current node is jumped to the matched sub question-answer type node suitable for abnormal processing; responding to the semantic information of the user, and acquiring the output content of the question-answering node suitable for exception handling; and then, generating reply content corresponding to the input content of the user according to the current dialog state information of the user and the output content of the exception-handling question-answer type node, and responding to a preset jump condition and returning to a task type node or a topic type node coupled with the exception-handling question-answer type node.
As shown in fig. 4, when an abnormal dialogue occurs, based on the user semantic information, the dialogue process can jump from the Topic node Topic to the question-answer node QA, and determine the corresponding question-answer pair Qv-Av, in response to the user semantic information, obtain the reply content Av in the question-answer pair, then, based on the current dialogue state information of the user and the output content Av of the sub question-answer node, generate the corresponding reply content, and in response to the corresponding jump condition, the dialogue process returns to the original Topic node Topic; or, the dialogue process may jump from the Task node Task to the 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 Task.
Therefore, by coupling the task type node or the topic type node with the matched question-answer type node suitable for exception handling, at any stage of a conversation process, when an exception conversation is received, guidance control can be carried out through the question-answer type conversation node used for handling the exception, and after the exception question-answer type conversation node is handled, the conversation process corresponding to the original conversation node is returned, so that the flexibility of the conversation interaction process can be improved, various user input contents can be flexibly handled, and the user interaction experience is further improved.
Referring to fig. 4, the following describes the jumping process between session nodes in detail by a specific example.
In a specific implementation, the current state information of the user may be determined according to the current user semantic information, and the corresponding type of session node information may be obtained from the session resource framework 40 as the current session node according to the current user semantic information and the current state information.
As a specific example, if the user input content is about food (food) in different countries, and the Topic type node Topic in the dialogue resource framework 40 is a dialogue scene about the food, the Topic type node Topic may be used as a current dialogue node, and furthermore, Sub topics 1-Sub topics inside the Topic type node Topic may be corresponding specific dialogue scenes such as Chinese food (Chinese food), American food (American food), and the like.
If Sub Topic1 in the Topic type node Topic is a dialogue scene related to a Chinese food, when a dialogue relates to a Chinese food, the Sub Topic1 may enter the Sub dialogue node by the Start node Unit Start Unit1, determine a corresponding intermediate node Unit according to a user input content, and output a reply content corresponding to the user input content by the node Unit End Unit.
As a specific example, the user enters the content "I like Chinese food". When a conversation process of a corresponding node Unit in Sub Topic1 is executed, corresponding reply contents "I all like Chinese food.i wave to have a medium, do you have a sugar collections", are generated, and corresponding jump conditions are triggered, the conversation process can jump to a Start node Unit2 of a Task node Task from an intermediate node Unit in Sub Topic1, and enter a conversation process corresponding to the node Unit 21.
At this time, the user inputs content "the is a retaurant near the task slot, we can eat other", and the dialog process may fill the task slot Sloti in the task Frame according to the content input again by the user, where retaurant, school, and eat may be regarded as 3 predefined task slots, and generate a corresponding reply "OK." based on the content input again by the user, thereby ending the dialog process. Alternatively, for eat in a task slot, the user enters the content "we can eat duck, can you eat spicy duck", where duck, spicy can be seen as 2 predefined subtask slots, and the system can reply to "Ok, let us go.".
With continued reference to fig. 4, when the conversation process is at the subtopic node Sub topic1 or topic node Task, i.e. the conversation process is a conversation scene about the Chinese food, if the user inputs a content unrelated to the Chinese food, for example, the user inputs a content "what is your favorite Chinese star? ", the current dialog is an abnormal dialog, the dialog process can jump from the Sub-topic type node Sub topic1 or topic type node Task to the question-answer type node QA, and select the corresponding question-answer pair, reply to" None ", and return to the Sub-topic type node Sub topic1 or topic type node Task based on the corresponding jump condition.
In another example, when the conversation process corresponding to the Sub-Topic type node Sub Topic1 is completed, the conversation process can also jump from the Sub Topic type system but Sub Topic1 to the intermediate node Unit in Sub Topic type 2, and the conversation process about the America food is performed.
It is understood that the above-mentioned conversation process is in english as an example, in a specific implementation, the conversation process may also adopt other languages, for example, languages such as chinese and french, and the present specification does not limit the specific language types.
It should be noted that the structural schematic diagram of the dialog resource framework is only an example, the types of the dialog nodes included in the dialog resource framework and the sub-dialog nodes included in each dialog node may be configured according to actual requirements, and the embodiment of the present specification does not limit the specific representation form of the dialog resource framework nor the specific content of each dialog node.
With the increase of user input content and conversation times, the fields and topics related to conversation processes are becoming richer, and therefore, by obtaining the content in the preset format and converting the content in the preset format into conversation nodes in the conversation resource framework and the skip conditions among the conversation nodes, the operation or maintenance personnel of the conversation management system can customize the conversation processes, continuously expand and enrich the conversation resource framework, and therefore the method and the system can be suitable for more application scenarios.
For the dialog nodes with different types, the preset formats of the corresponding input contents can be different.
If the type of the session node is a task node, as an optional example, the preset format of the corresponding content is as follows: task [ num ] yaml, where task [ num ] is used to specify the name of the task-type node.
As a specific example, the content in the preset format corresponding to the task-type node may be:
1#task1.yaml
2---
3 type:intro_prompt
4 name:task1_prompt
5 image_name:task1.jpg
6 utterance:
7 paraphrass:
8 expected_intent_contents:
9…
10 tactic_content:
11…
12---
wherein, the 3 rd to 5 th lines define the type (type) of the dialogue node, the name (name) of the dialogue node and the name (image _ name: task1.jpg) of the mapping resource of the dialogue node; "- - -" in lines 2 and 12 indicates the start and end of a monograph conversation; line 6 and line 7 define two expression forms of the dialogue content in the dialogue node of the type; line 8 defines the semantic form of the user-intended reply content for this type of dialog, with "…" in lines 9 and 11 indicating the omission of content; line 10 defines the dialog strategy for the exception dialog handling.
As a specific example, an operator or maintenance person (e.g., a teacher in educational training) may fill in corresponding task-type dialog content in line 6, wherein specific task scene content may be shown, such as a teacher entering "Now, leave title, and get overview on how to show title to other"; and setting another expression form of the task dialog content on line 7, for example, a teacher enters "Pthread answer the two queries on the side" therein; and presents the expected reply content, for example, fills in the expected reply content of the user at line 8, and handles the abnormal dialog process according to the content set at line 10 when the abnormal dialog definition information is received.
In specific implementation, when a preset format corresponding to the task-type node is set, the preset format may be converted into a session node in a session resource architecture, where semantic information of a user may be used as a trigger condition of the corresponding session node, and content in the 10 th row may be used as a session policy during exception handling.
If the type of the dialogue node is a question-answer type node, the preset format of the corresponding content is as follows: qa.yaml. As a specific example, the content of the preset format corresponding to the question-answering node may be:
1#QA.yaml
2---
3 type:qa
4 name:qa_list
5 question:
6 answer:
7---
wherein, lines 3 to 4 define the type (type) of the dialogue node, the name (name) of the dialogue node; the "- - -" in lines 2 and 7 indicate the start and end of the monograph dialog; line 5 defines the dialogue problem for this type of dialogue node; line 6 defines the reply content for this type of dialogue node.
As a specific example, an operator or maintenance person (e.g., a teacher in educational training) may populate the corresponding question-and-answer type dialog content on line 5, Where a specific question-and-answer scenario task may be shown, e.g., Where a teacher enters "Where are you from? "; and presents the corresponding reply content, e.g., fills the reply content "I am from shanghai.
In specific implementation, when a preset format corresponding to the question-and-answer type node is set, the preset format may be converted into a dialogue node in a dialogue resource architecture, where the content corresponding to the 5 th row may be used as a trigger condition of the corresponding dialogue node, and the reply content corresponding to the 6 th row may be used as the output content of the dialogue node.
If the type of the session node is a chat-type node, as a specific example, the content in the preset format corresponding to the chat-type node may be:
1 type:topic
2 name:nevigation_01
3 utterance:
4 target_topics:
5 auto_reply:
6 default:
7 off_topic:
8 otherwise:nevigation_02
wherein, the 1 st to 2 nd lines respectively define the type (type) and name (name: navigation _01) of the dialogue node; line 3 defines the specific session content of this type of session node; line 4 defines the target topic for that type of conversation node; line 5 defines the auto-reply content of this type of session node; line 6 defines the default reply content for this type of conversation node; line 7 defines the reply when the user deviates from the dialogue node; line 8 defines the destination node name (other: connectivity _02) of the hop.
As a specific example, an operator or maintenance person may fill in corresponding question-and-answer type dialog content on line 3, wherein specific topic scene tasks may be shown, such as entering therein "If you have an open time at weekend and do not have the mobile to cook, what will you like to do? "; and fills the target topic of the 4 th row as [ "eat out", "order takeout" ]; and gives corresponding reply content, for example, fill the auto reply content "the is a row duck retaurant near" on line 5; setting corresponding default reply content according to the reply built-in of the 5 th line, for example, setting the default reply content of the 6 th line as "Great, eat out is a nic way for medium"; after the target topic content matched with the 4 th line is obtained, a jump condition is set, the next topic (navigation _02) in the 8 th line is entered, if the reply content of the user deviates from the current topic, the current conversation can be ended by setting the content of the 7 th line, for example, the content of the 7 th line can be filled with "That is ok.".
In a specific implementation, when a preset format corresponding to the topic type node is set, the preset format may be converted into a conversation node in a conversation resource architecture, where the content corresponding to the 5 th row may be used as the output content of the conversation node, and the content corresponding to the 7 th row may be used as the reply when the reply content of the user deviates from the current conversation node.
In some embodiments of the present specification, the content in the preset format may also be directly converted into the dialog nodes in the dialog resource architecture, that is, the dialog nodes include the skip conditions between the dialog nodes and the output content of the dialog nodes.
As can be seen from the foregoing, because the preset formats of the input contents corresponding to the different types of session nodes are different, for a specific type of session node, when converting the input contents in the preset format into a session node, the format of the input contents also needs to be converted, and when the format of the input contents is not consistent with the preset format, a feedback is given to remind an operator or a maintenance person to input the contents in the preset format corresponding to the type of the session node.
In a specific implementation, the dialog management method provided in the embodiment of the present disclosure may be applied to any field requiring dialog management, and accordingly, the content in the preset format may be derived from a text related to any field requiring dialog management. For example, the dialog management method provided by the embodiment of the present specification can be applied to the fields of education and professional, customer service, and the like.
Correspondingly, the present specification also provides a dialog management system corresponding to the dialog management method, and the dialog management system may adopt the dialog management method in the above embodiment to manage the dialog process. To enable those skilled in the art to better understand and implement the dialog management system of the embodiments of the present description, the following description is given by way of example of specific embodiments with reference to the accompanying drawings.
Referring to a schematic structural diagram of a dialog management system in an embodiment of the present specification shown in fig. 5, in some embodiments of the present specification, a dialog management system 50 may include a resource architecture module 51, a semantic processing module 52, a state management module 53, a dialog policy module 54, and a reply generation module 55, where:
the resource architecture module 51 is adapted to store a session resource architecture, where the session resource architecture is a multi-level finite state machine structure and includes a plurality of session nodes, and each session node skips based on a preset skipping condition;
the semantic processing module 52 is adapted to perform semantic analysis on the current input content of the user to obtain corresponding user semantic information;
the status management module 53 is adapted to store the status information of the user;
the dialog policy module 54 is adapted to obtain the current dialog state information of the user from the state information of the user stored in the state management module 53 according to the current user semantic information; determining a current node where a current dialog is located from a dialog resource framework stored in the resource framework module 51 through query, skipping to a corresponding destination node when a skipping condition of the current node is triggered, and acquiring output content of the destination node from the dialog resource framework;
the reply generation module 55 is adapted to generate a current reply content corresponding to the current input content of the user according to the current dialog state information of the user and the output content of the destination node.
The working principle of the dialog management system 50 is briefly described below with reference to fig. 5:
when receiving the user input content, the semantic processing module 52 performs semantic analysis on the current user input content to obtain corresponding current user semantic information; according to the semantic information of the current user, the dialog policy module 54 can obtain the current dialog state information of the user from the state information of the user stored in the state management module 53, and determine the intention expressed by the user; meanwhile, the dialog policy module 54 may determine, according to the current user semantic information, a current node where a current dialog is located from a dialog resource framework stored in the resource framework module 51 by querying the resource framework module 51, and when a skip condition of the current node is triggered, skip to a corresponding destination node, and obtain output content of the destination node from the dialog resource framework; thereafter, the reply generation module 55 may generate a current reply content corresponding to the current user input content according to the current dialog state information output by the state management module 53 and the output content of the destination node.
Therefore, by adopting the dialogue management system, the whole dialogue process can be effectively controlled through the dialogue resource framework of the multi-level finite state machine structure and the preset jump condition between the dialogue nodes in the dialogue resource framework.
In this embodiment of the present specification, as described above, the session resource architecture is a multi-level finite state machine structure, and includes a plurality of session nodes, where each session node jumps based on a preset jump condition. As an alternative example, the dialogue resource framework may comprise a plurality of different types of dialogue nodes, and the plurality of different types of dialogue nodes are adapted to jump based on a preset jump condition. That is to say, the dialogue resource architecture can store dialogue nodes of different types, and the dialogue nodes of different types can jump according to preset jump conditions, so that jump of different types of dialogue nodes and fusion of multi-type dialogue nodes in a dialogue process can be realized, and user interaction experience is improved.
The specific structure of the dialog resource framework may refer to the schematic structure diagram of the dialog resource framework in fig. 2, which is not described herein again.
When the contents of each session node in the session resource architecture are configured, the session process can jump between different session nodes according to corresponding jump modes, that is, the session process can jump from the current node to the destination node by adopting different jump modes.
In some examples, the plurality of conversation nodes are adapted to jump to a unique destination node based on a preset unique jump condition; in other examples, the plurality of conversation nodes are adapted to trigger the current conversation to jump from a current node to a different destination node based on the user semantic information. The jump process between each session node may refer to the corresponding descriptions in fig. 2 and fig. 4.
In a specific implementation, when the current reply content corresponding to the current input content of the user is generated, the dialog process can be completed, and therefore, by using the dialog management system described in the above embodiment, a single-round dialog can be realized.
On this basis, the above embodiments can be further expanded and optimized according to specific application scenarios and practical situations. For example, for some interaction scenarios, multiple continuous rounds of conversations may be required, so that the depth, breadth and continuity of interaction may be improved, and the user interaction experience may be enhanced. To implement multiple turns of dialog, with continued reference to fig. 5, the current reply content generated by the reply generation module 55 may also be output to the state management module 53 (as shown by a dashed line in fig. 5), and the state management module 53 is further adapted to store the current reply content as the historical dialog information of the user, as part of the state information of the user, so as to be used for determining a destination node of a next turn of jump.
For the storage process of the current reply content and the specific process of implementing multiple rounds of conversations, reference may be made to fig. 3, which is not described herein again.
In specific implementation, different types of session nodes can be configured in the session resource architecture according to different application scenarios, so as to implement fusion and hopping of the different types of session nodes. In some embodiments of the present description, the types of conversation nodes include at least two of: a task-based node associated with a task-based dialog; question-answer type nodes associated with question-answer type conversations; topic type nodes related to chat type conversations. Reference may be made to the description of the related parts above, which are not repeated herein.
In specific implementation, the internal structures of the conversation nodes with different types can be different, and the conversation process can select a corresponding jump mode according to the specific conversation node and jump from the current conversation node to the target conversation node.
The topic type node comprises a plurality of sub-topic type nodes, and any sub-topic node in the plurality of sub-topic type nodes is suitable for jumping to other sub-topic nodes of the topic type node based on corresponding jumping conditions, or jumping to a task type node, a question-answer type node or other topic type nodes.
For a task type node, the task type node comprises a task node unit and a task frame coupled with the node unit, and is suitable for jumping to a topic type node, a question-answer type node or other task type nodes based on corresponding jumping conditions, wherein: the task frame comprises a task slot sequence which is formed by a plurality of task slots according to a preset sequence; correspondingly, the dialogue strategy module is also suitable for jumping to a corresponding task frame from the task node unit according to the current user semantic information, and sequentially filling a task slot sequence in the task frame according to the preset sequence.
In particular implementations, a user may present multiple related questions to at least one of the task slots in succession while filling the task slots. Thus, in some embodiments of the present description, at least one task slot of the sequence of task slots comprises: the task node unit comprises a task sub-node unit and a sub-task frame coupled with the task node unit, wherein the sub-task frame comprises a sub-task slot sequence which is formed by a plurality of sub-task slots according to a preset sequence; correspondingly, the semantic processing module is also suitable for acquiring the current input content corresponding to the previous-cycle content of the user to obtain the corresponding current user semantic information; the conversation strategy module is also used for acquiring the current conversation state information of the user from the stored state information of the user according to the current user semantic information; and determining a current task node unit where a current dialog is located from a stored dialog resource framework through query, and sequentially filling a subtask slot sequence in the subtask frame according to the preset sequence when a skip condition of the current task node unit is triggered.
Based on this, the question-answer type dialogue node comprises a plurality of question-answer type nodes which are suitable for processing abnormal dialogue, and each question-answer type node is suitable for being coupled with a matched task type node or topic type node; correspondingly, the dialogue strategy module is also suitable for jumping from the current task type node or topic type node to the matched sub question and answer type node which is suitable for processing abnormal dialogue according to the current user semantic information; responding to the semantic information of the current user, and acquiring the output content of the sub-question-answer type node suitable for processing the abnormal conversation; responding to a preset jump condition, and returning to a task type node or a topic type node coupled with the question answering type node suitable for processing the abnormal conversation; the reply generation module is also suitable for generating reply contents corresponding to the input contents of the current user according to the current conversation state information of the user and the output contents of the sub question answering type nodes suitable for processing abnormal conversations.
In specific implementation, when a session process corresponding to a current node (for example, a session node of a type task node or a topic node) is performed, an abnormal session node may occur, and at this time, the session process may jump out a session content corresponding to the current session node, jump to a session content corresponding to the abnormal session node to perform session interaction with a user, execute abnormal session processing, and after the abnormal session process is completed, return to the original session node to continue the session interaction. In this regard, the question-and-answer type conversation node includes a plurality of question-and-answer type nodes adapted to handle exception conversations, each of the question-and-answer type nodes adapted to couple with a matching task-type node or topic-type node. Accordingly, with continued reference to fig. 5, based on the dialogue resource structure, when abnormal dialogue content occurs, the dialogue policy module 54 is further adapted to determine that the current dialogue content is abnormal dialogue content according to the current user semantic information, and jump from the current task type node or topic type node to a matched sub question and answer type node adapted to handle abnormal dialogue; responding to the semantic information of the current user, and acquiring the output content of the sub-question-answer type node suitable for processing the abnormal conversation; then, the reply generation module 55 may generate a current reply content corresponding to the current input content of the user according to the current dialog state information of the user and the output content of the sub question-answer type node adapted to handle the abnormal dialog; after the dialog process corresponding to the abnormal dialog is completed, the dialog policy module 54 is further adapted to respond to a preset jump condition and return to the task type node or topic type node coupled to the sub question and answer type node adapted to handle the abnormal dialog.
Therefore, by coupling the task type node or the topic type node with the matched question-answer type node suitable for exception handling, at any stage of a conversation process, when an exception conversation is received, guidance control can be carried out through the question-answer type conversation node used for handling the exception, and after the exception question-answer type conversation node is handled, the conversation process corresponding to the original conversation node is returned, so that the flexibility of the conversation interaction process can be improved, various user input contents can be flexibly handled, and the user interaction experience is further improved.
The specific composition of each type of session node, the skip process between each type of session node, and the abnormal session handling process may refer to the content described in fig. 4, and are not described herein again.
As the user inputs content and the number of conversations increases, the areas and topics involved in the conversation process become richer, and for this reason, with continued reference to fig. 5, the conversation management system 50 may further include: the content loading module 56 is adapted to obtain the content in the preset format, and convert the content in the preset format into the session node in the session resource framework and the skip condition between the session nodes.
And for the conversation nodes with different types, the preset formats of the corresponding contents are different. For the preset format corresponding to each type of session node, refer to the foregoing embodiments, and are not described herein again.
In some embodiments of the present specification, the content in the preset format may also be directly converted into the dialog nodes in the dialog resource architecture, that is, the dialog nodes include the skip conditions between the dialog nodes and the output content of the dialog nodes.
Therefore, by adopting the dialogue management system in the embodiment, the control on the dialogue process can be realized, and by storing the reply content as the historical dialogue information of the user, multiple rounds of dialogue can be realized, the multiple rounds of dialogue content can be consistent, and the user interaction experience can be further improved.
Embodiments of the present specification further provide a dialog management device for controlling a dialog process, and as shown in fig. 6, the dialog management device 60 may include a memory 61 and a processor 62, where the memory 61 is adapted to store one or more computer instructions, and the processor 72 executes the computer instructions to perform the steps of the dialog management method according to any one of the foregoing embodiments.
In a specific implementation, as shown in fig. 6, the dialog management device 60 may further include an expansion interface 63, which is adapted to connect with other devices to implement data interaction.
In a specific implementation, as shown in fig. 6, the dialog management device 60 may further include a display 64 adapted to display reply content corresponding to the user input content.
The session management device 60 may specifically be a general-purpose or special-purpose computer device, and more specifically, may be a server or a computer terminal, and may be, for example, a personal computer device, a portable terminal device, or the like.
In a particular implementation, the memory 61, processor 62, expansion interface 63, and display 64 may be connected by a bus.
In a Specific implementation, the processor may be implemented by a Processing chip such as a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a Field Programmable Gate Array (FPGA), or an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement the embodiments of the present specification.
The Memory may include a Random Access Memory (RAM) Memory, and may also include a Non-Volatile Memory (NVM), such as at least one disk Memory.
The present specification further provides a computer readable storage medium, on which computer instructions are stored, and when the computer instructions are executed, the steps of the dialog management method according to any one of the foregoing embodiments may be executed. The computer readable storage medium may be various suitable readable storage media such as an optical disc, a mechanical hard disc, a solid state hard disc, and the like. The steps of the dialog management method according to any one of the foregoing embodiments are executed by the instructions stored in the computer-readable storage medium, which are not described herein again.
The computer-readable storage medium may include, for example, any suitable type of memory unit, memory device, memory article, memory medium, storage device, storage article, storage medium and/or storage unit, for example, memory, removable or non-removable media, erasable or non-erasable media, writeable or re-writeable media, digital or analog media, hard disk, floppy disk, compact disk read Only memory (CD-ROM), compact disk recordable (CD-R), compact disk Rewriteable (CD-RW), optical disk, magnetic media, magneto-optical media, removable memory cards or disks, various types of Digital Versatile Disk (DVD), a tape, a cassette, or the like.
The computer instructions may include any suitable type of code, e.g., source code, compiled code, interpreted code, executable code, static code, dynamic code, encrypted code, and the like, implemented using any suitable high-level, low-level, object-oriented, visual, compiled and/or interpreted programming language
Although the embodiments of the present specification are disclosed above, the embodiments of the present specification are not limited thereto. Various changes and modifications may be effected by one skilled in the art without departing from the spirit and scope of the embodiments herein described, and it is intended that the scope of the embodiments herein described be limited only by the scope of the appended claims.

Claims (22)

1. A dialog management method, comprising:
performing semantic analysis on the current input content of the user to obtain corresponding current user semantic information;
acquiring current conversation state information of the user from the stored state information of the user according to the semantic information of the current user; determining a current node where a current conversation is located from a stored conversation resource framework through query, jumping to a corresponding destination node when a jumping condition of the current node is triggered, and acquiring output content of the destination node from the conversation resource framework; the dialogue resource architecture is a multi-level finite state machine structure and comprises a plurality of dialogue nodes, and each dialogue node jumps based on a preset jump condition;
and generating current reply content corresponding to the current input content of the user according to the current conversation state information of the user and the output content of the destination node.
2. The dialog management method according to claim 1, wherein the dialog resource framework comprises a plurality of dialog nodes of different types, and a jump between dialog nodes between the plurality of dialog nodes of different types is adapted to be performed based on a preset jump condition.
3. The session management method according to claim 1, wherein the session nodes are adapted to jump to a unique destination node based on a preset unique jump condition, or trigger the current session to jump from a current node to a different destination node based on the current user semantic information.
4. The dialog management method according to claim 2 or 3, further comprising:
and storing the current reply content as historical dialogue information of the user, wherein the historical dialogue information is used as a part of state information of the user to determine a destination node of the next round of jumping.
5. The session management method according to claim 4, wherein the types of the session nodes include at least two of:
a task-based node associated with a task-based dialog;
question-answer type nodes associated with question-answer type conversations;
topic type nodes related to chat type conversations.
6. The session management method according to claim 5, wherein the topic type node comprises 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 type nodes of the topic type node, or jump to task type node, question answering type node or other topic type nodes based on the corresponding jump condition.
7. The dialog management method according to claim 5, wherein the task-based node comprises a task node unit and a task frame coupled to the node unit, adapted to jump to a topic-based node, a question-and-answer-based node, or other task-based nodes based on corresponding jump conditions, wherein: the task frame comprises a task slot sequence which is formed by a plurality of task slots according to a preset sequence;
the dialog management method further includes:
and jumping to a corresponding task frame from the task node unit according to the semantic information of the current user, and sequentially filling a task slot sequence in the task frame according to the preset sequence.
8. The dialog management method of claim 7 wherein at least one task slot in the sequence of task slots comprises: the task processing system comprises a task sub-node unit and a sub-task frame coupled with the task sub-node unit, wherein the sub-task frame comprises a sub-task slot sequence consisting of a plurality of sub-task slots according to a preset sequence;
the dialog management method further includes:
acquiring current input content corresponding to the previous-round reply content of a user to obtain corresponding current user semantic information;
acquiring current conversation state information of the user from the stored state information of the user according to the semantic information of the current user; and determining a current task node unit where a current dialog is located from a stored dialog resource framework through query, and sequentially filling a subtask slot sequence in the subtask frame according to the preset sequence when a skip condition of the current task node unit is triggered.
9. The dialog management method according to claim 5, characterized in that said question-answer dialog nodes comprise a plurality of question-answer type nodes adapted to handle exception dialogs, each of said question-answer type nodes being adapted to be coupled with a matching task type node or topic type node;
the dialog management method further includes:
according to the semantic information of the current user, skipping from the current task type node or topic type node to a matched sub question-answer type node suitable for processing abnormal conversations;
responding to the semantic information of the current user, and acquiring the output content of the sub-question-answer type node suitable for processing the abnormal conversation;
according to the current dialogue state information of the user and the output content of the question answering type node suitable for processing the abnormal dialogue, generating reply content corresponding to the input content of the current user, and responding to a corresponding jumping condition, and returning to a task type node or a topic type node coupled with the question answering type node suitable for processing the abnormal dialogue.
10. The dialog management method of claim 1 further comprising:
and acquiring content in a preset format, and converting the content in the preset format into a dialogue node in the dialogue resource architecture and a skip condition between the dialogue nodes.
11. A dialog management system, comprising: resource architecture module, semantic processing module, state management module, dialogue strategy module and reply generation module, wherein:
the resource architecture module is suitable for storing a dialogue resource architecture, the dialogue resource architecture is a multi-level finite state machine structure and comprises a plurality of dialogue nodes, and each dialogue node jumps based on a preset jump condition;
the semantic processing module is suitable for performing semantic analysis on the current input content of the user to obtain corresponding current user semantic information;
the state management module is suitable for storing the state information of the user;
the conversation strategy module is suitable for acquiring the current conversation state information of the user from the state information of the user stored by the state management module according to the current user semantic information; determining a current node where a current conversation is located from a conversation resource framework stored by the resource framework module through query, jumping to a corresponding destination node when a jumping condition of the current node is triggered, and acquiring output content of the destination node from the conversation resource framework;
and the reply generation module is suitable for generating current reply content corresponding to the current input content of the user according to the current conversation state information of the user and the output content of the destination node.
12. The dialog management system of claim 11 wherein the dialog resource framework comprises a plurality of different types of dialog nodes, and wherein dialog nodes between the plurality of different types of dialog nodes are adapted to jump based on a preset jump condition.
13. The system according to claim 11, wherein the plurality of session nodes are adapted to jump to a unique destination node based on a predetermined unique jump condition or trigger the current session to jump from a current node to a different destination node based on the user semantic information.
14. The dialog management system according to claim 12 or 13, wherein the state management module is further adapted to store the current reply content as historical dialog information of the user as part of the user's state information for determining a destination node for a next round of jumping.
15. The session management system of claim 14, wherein the types of session nodes include at least two of:
a task-based node associated with a task-based dialog;
question-answer type nodes associated with question-answer type conversations;
topic type nodes related to chat type conversations.
16. The system according to claim 15, wherein the topic type node comprises 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 type nodes of the topic type node, or jump to task type node, question answering type node or other topic type nodes based on the corresponding jump condition.
17. The dialog management system of claim 15 wherein the task-based node comprises a task node element and a task frame coupled to the node element adapted to jump to a topic-based node, a question-and-answer-based node, or other task-based node based on a corresponding jump condition, wherein: the task frame comprises a task slot sequence which is formed by a plurality of task slots according to a preset sequence;
and the dialogue strategy module is also suitable for jumping to a corresponding task frame from the task node unit according to the current user semantic information, and sequentially filling a task slot sequence in the task frame according to the preset sequence.
18. The dialog management system of claim 15 wherein at least one task slot in the sequence of task slots comprises: the task processing system comprises a task sub-node unit and a sub-task frame coupled with the task sub-node unit, wherein the sub-task frame comprises a sub-task slot sequence consisting of a plurality of sub-task slots according to a preset sequence;
the semantic processing module is also suitable for acquiring the current input content corresponding to the previous-round recovery content of the user to obtain the corresponding current user semantic information;
the dialogue strategy module is also used for acquiring the current dialogue state information of the user from the stored state information of the user according to the current user semantic information; and determining a current task node unit where a current dialog is located from a stored dialog resource framework through query, and sequentially filling a subtask slot sequence in the subtask frame according to the preset sequence when a skip condition of the current task node unit is triggered.
19. The dialog management system of claim 15 wherein the question-and-answer type dialog nodes comprise a plurality of question-and-answer type nodes adapted to handle exception dialogs, each of the question-and-answer type nodes adapted to couple with a matching task-type node or topic-type node;
the dialogue strategy module is also suitable for jumping from the current task type node or topic type node to a matched sub question and answer type node which is suitable for processing abnormal dialogue according to the current user semantic information; responding to the semantic information of the current user, and acquiring the output content of the sub-question-answer type node suitable for processing the abnormal conversation; responding to a preset jump condition, and returning to a task type node or a topic type node coupled with the question answering type node suitable for processing the abnormal conversation;
the reply generation module is also suitable for generating current reply content corresponding to the input content of the current user according to the current conversation state information of the user and the output content of the sub question answering type node suitable for processing abnormal conversation.
20. The dialog management system of claim 11 further comprising: and the content loading module is suitable for acquiring the content in the preset format and converting the content in the preset format into the conversation nodes in the conversation resource architecture and the jump conditions between the conversation nodes.
21. A dialog management device comprising a memory and a processor, wherein the memory is adapted to store one or more computer instructions, characterized in that the processor, when executing the computer instructions, is adapted to perform the steps of the dialog management method of any of claims 1 to 10.
22. A computer readable storage medium having stored thereon computer instructions, characterized in that said computer instructions when executed perform the steps of the dialog management method according to any of the claims 1 to 10.
CN202210103293.0A 2022-01-27 2022-01-27 Dialogue management method, dialogue management system, dialogue management apparatus, and storage medium Pending CN114428844A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210103293.0A CN114428844A (en) 2022-01-27 2022-01-27 Dialogue management method, dialogue management system, dialogue management apparatus, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210103293.0A CN114428844A (en) 2022-01-27 2022-01-27 Dialogue management method, dialogue management system, dialogue management apparatus, and storage medium

Publications (1)

Publication Number Publication Date
CN114428844A true CN114428844A (en) 2022-05-03

Family

ID=81312924

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210103293.0A Pending CN114428844A (en) 2022-01-27 2022-01-27 Dialogue management method, dialogue management system, dialogue management apparatus, and storage medium

Country Status (1)

Country Link
CN (1) CN114428844A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115374266A (en) * 2022-10-27 2022-11-22 深圳市人马互动科技有限公司 Interaction method, device, equipment and storage medium based on plot interaction node
CN115408511A (en) * 2022-11-02 2022-11-29 深圳市人马互动科技有限公司 Interactive node skipping method and component and conversation development system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115374266A (en) * 2022-10-27 2022-11-22 深圳市人马互动科技有限公司 Interaction method, device, equipment and storage medium based on plot interaction node
CN115408511A (en) * 2022-11-02 2022-11-29 深圳市人马互动科技有限公司 Interactive node skipping method and component and conversation development system

Similar Documents

Publication Publication Date Title
CN106548773B (en) Child user searching method and device based on artificial intelligence
CN106503156B (en) Man-machine interaction method and device based on artificial intelligence
CN114428844A (en) Dialogue management method, dialogue management system, dialogue management apparatus, and storage medium
CN108509591B (en) Information question-answer interaction method and system, storage medium, terminal and intelligent knowledge base
CN110704594A (en) Task type dialogue interaction processing method and device based on artificial intelligence
US20080160487A1 (en) Modularized computer-aided language learning method and system
US20070294619A1 (en) Generating media presentations
CN109948151A (en) The method for constructing voice assistant
CN110610627A (en) Heuristic poetry learning method and device
CN111462726B (en) Method, device, equipment and medium for answering out call
Rozga Practical bot development: Designing and building bots with Node. js and microsoft bot framework
Sabharwal et al. Developing Cognitive Bots Using the IBM Watson Engine: Practical, Hands-on Guide to Developing Complex Cognitive Bots Using the IBM Watson Platform
CN106909677B (en) Method and device for generating question
CN115827838A (en) Dialog generation method and system based on story continuous writing and dynamic knowledge base
CN116543082A (en) Digital person generation method and device and digital person generation system
CN117216219A (en) Thinking chain reasoning method, device, equipment and storage medium
CN111858874A (en) Conversation service processing method, device, equipment and computer readable storage medium
CN112069830A (en) Intelligent conversation method and device
Iuppa et al. Bringing Hollywood storytelling techniques to branching storylines for training applications
CN110111793A (en) Processing method, device, storage medium and the electronic device of audio-frequency information
CN113886427A (en) Conversation processing method and device and electronic equipment
CN110286893B (en) Service generation method, device, equipment, system and storage medium
US20240087465A1 (en) Interactively teaching/improving language skills by generating a visually connected sequence of images
CN113420566B (en) Method, device and medium for judging reasonability of long-term semantics
CN117556864B (en) Information processing method, electronic device, and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination