CN115495562A - Dialogue processing method, dialogue processing device, electronic equipment and storage medium - Google Patents
Dialogue processing method, dialogue processing device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN115495562A CN115495562A CN202211067739.5A CN202211067739A CN115495562A CN 115495562 A CN115495562 A CN 115495562A CN 202211067739 A CN202211067739 A CN 202211067739A CN 115495562 A CN115495562 A CN 115495562A
- Authority
- CN
- China
- Prior art keywords
- node
- dialogue
- configuration data
- dialog
- condition
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/33—Querying
- G06F16/332—Query formulation
- G06F16/3329—Natural language query formulation or dialogue systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/33—Querying
- G06F16/3331—Query processing
- G06F16/334—Query execution
- G06F16/3344—Query execution using natural language analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/33—Querying
- G06F16/338—Presentation of query results
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/34—Browsing; Visualisation therefor
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computational Linguistics (AREA)
- Artificial Intelligence (AREA)
- Mathematical Physics (AREA)
- Human Computer Interaction (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The present disclosure relates to a dialog processing method, apparatus, electronic device, and storage medium, the method comprising: receiving a dialogue message sent by a terminal; acquiring operation trigger information corresponding to at least one conversation node; under the condition that the dialogue message meets a target trigger condition corresponding to the target dialogue node, executing operation corresponding to the execution trigger condition based on an execution trigger condition corresponding to at least one execution dialogue node to obtain a reply message corresponding to the dialogue message; and sending a reply message to the terminal. By using the embodiment of the disclosure, the coupling degree between the front-end configuration and the back-end processing in the dialogue processing architecture can be reduced, and the expandability of the back-end dialogue processing engine is improved.
Description
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for processing a dialog, an electronic device, and a storage medium.
Background
With the development of computer and internet technologies, multi-turn dialog systems are widely used in various scenes.
In the related art, a complete set of multiple rounds of dialogs may be configured through a front-end page, and may specifically exist in a graph form or a tree form, where the graph or the tree includes multiple nodes, and the distribution represents one step or multiple steps in the dialog processing. The data structures stored in the server back-end processing engine and the implementation are not the same for different forms of multi-turn conversations.
In the related art, the front-end configuration form corresponding to the multi-turn dialog system has strong coupling with the back-end processing engine.
Disclosure of Invention
The present disclosure provides a dialog processing method, apparatus, electronic device, and storage medium, to at least solve the problem in the related art that the coupling between a front-end configuration form corresponding to a multi-turn dialog system and a back-end processing engine is strong. The technical scheme of the disclosure is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a dialog processing method, including:
receiving a dialogue message sent by a terminal;
acquiring operation trigger information corresponding to at least one session node, wherein the operation trigger information corresponding to each session node in the at least one session node is generated based on page configuration data conversion corresponding to each session node, and the operation trigger information corresponding to each session node comprises a trigger condition corresponding to each session node and an operation corresponding to the trigger condition;
under the condition that the dialogue message meets a target trigger condition corresponding to a target dialogue node, executing operation corresponding to the execution trigger condition based on an execution trigger condition corresponding to at least one execution dialogue node to obtain a reply message corresponding to the dialogue message, wherein the at least one execution dialogue node is a dialogue node required for replying the dialogue message, and the target dialogue node is an initial node in the at least one execution dialogue node;
and sending the reply message to the terminal.
In some possible designs, the obtaining operation trigger information corresponding to the at least one dialog node includes:
receiving page configuration data corresponding to the at least one session node;
traversing the at least one conversation node;
and converting the page configuration data corresponding to the traversed session node to obtain operation triggering information corresponding to the traversed session node.
In some possible designs, the converting the page configuration data corresponding to the traversed dialog node to obtain the operation trigger information corresponding to the traversed dialog node includes:
under the condition that the traversed conversation node is a conversation input node, acquiring input condition configuration data and operation configuration data corresponding to the conversation input node based on page configuration data corresponding to the conversation input node;
converting the input condition configuration data to obtain a trigger condition corresponding to the dialogue input node;
converting the operation configuration data to obtain an operation corresponding to the conversation input node;
and generating operation triggering information corresponding to the conversation input node according to the triggering condition corresponding to the conversation input node and the operation corresponding to the conversation input node.
In some possible designs, the converting the page configuration data corresponding to the traversed dialog node to obtain the operation trigger information corresponding to the traversed dialog node includes:
determining at least two judgment branches corresponding to the judgment nodes and judgment condition configuration data and operation configuration data corresponding to each of the at least two judgment branches based on page configuration data corresponding to the judgment nodes under the condition that the traversed conversation nodes are the judgment nodes;
converting the judging condition configuration data corresponding to each judging branch to obtain a triggering condition corresponding to each judging branch;
converting the operation configuration data corresponding to each judgment branch to obtain the operation corresponding to each judgment branch;
and generating operation triggering information corresponding to the judgment node according to the triggering condition corresponding to each judgment branch and the operation corresponding to each judgment branch.
In some possible designs, the converting the page configuration data corresponding to the traversed session node to obtain the operation trigger information corresponding to the traversed session node includes:
under the condition that the traversed dialog node is a default execution dialog node, acquiring operation configuration data corresponding to the default execution dialog node based on page configuration data corresponding to the default execution dialog node;
converting the operation configuration data to obtain an operation corresponding to the default execution dialogue node;
determining an automatic trigger condition as a trigger condition corresponding to the default execution dialogue node;
and generating operation triggering information corresponding to the default execution dialogue node according to the automatic triggering condition and the operation corresponding to the default execution dialogue node.
In some possible designs, the converting the page configuration data corresponding to the traversed dialog node to obtain the operation trigger information corresponding to the traversed dialog node includes:
under the condition that the traversed session node is a slot filling node, determining at least one slot position corresponding to the slot filling node and slot filling condition configuration data and operation configuration data corresponding to each slot position in the at least one slot position based on page configuration data corresponding to the slot filling node;
converting the slot filling condition configuration data corresponding to each slot position to obtain a triggering condition corresponding to each slot position;
converting the operation configuration data corresponding to each slot position to obtain an operation corresponding to each slot position;
and generating operation triggering information corresponding to the slot filling node according to the triggering condition corresponding to each slot position and the operation corresponding to each slot position.
In some possible designs, when the dialog message satisfies a target trigger condition corresponding to a target dialog node, based on an execution trigger condition corresponding to at least one execution dialog node, executing an operation corresponding to the execution trigger condition to obtain a reply message corresponding to the dialog message, where the executing includes:
under the condition that the dialogue message meets the target trigger condition, determining the target dialogue node as a current execution dialogue node, and determining the target trigger condition as a current execution trigger condition;
executing the operation corresponding to the current execution trigger condition to obtain an operation result;
under the condition that the operation result does not comprise the reply message, re-determining a next dialog node corresponding to the currently-executed dialog node in the graph dialog structure as the currently-executed dialog node;
and re-determining the trigger condition corresponding to the operation result in the trigger conditions corresponding to the currently executed dialog node as the currently executed trigger condition, and starting to execute the step of obtaining the operation result from the execution of the operation corresponding to the currently executed trigger condition until the operation result comprises the reply message.
In some possible designs, the at least one dialog node is a dialog node in a tree-shaped dialog structure, and the obtaining operation trigger information corresponding to the at least one dialog node includes:
receiving page configuration data corresponding to a dialog node in the tree-shaped dialog structure, wherein the tree-shaped dialog structure comprises a root dialog node and a sub-dialog node;
determining the root dialog node and at least one sub-dialog node set according to the tree dialog structure, wherein each sub-dialog node set in the at least one sub-dialog node set comprises sub-dialog nodes corresponding to the same parent dialog node;
converting the page configuration data corresponding to the root session node to obtain operation triggering information corresponding to the root session node;
traversing the at least one set of sub-dialog nodes;
and converting the page configuration data corresponding to each sub-dialogue node in the traversed sub-dialogue node set to obtain operation trigger information corresponding to the traversed sub-dialogue node set, wherein the operation trigger information corresponding to the traversed sub-dialogue node set is the operation trigger information corresponding to each sub-dialogue node.
In some possible designs, the page configuration data corresponding to the root session node includes admission condition configuration data and operation configuration data corresponding to the root session node, and the converting process is performed on the page configuration data corresponding to the root session node to obtain operation trigger information corresponding to the root session node, including:
converting the admission condition configuration data to obtain a triggering condition corresponding to the root session node;
converting the operation configuration data to obtain an operation corresponding to the root session node;
and generating operation triggering information corresponding to the root dialogue node according to the triggering condition corresponding to the root dialogue node and the operation corresponding to the root dialogue node.
In some possible designs, the converting the page configuration data corresponding to each sub-session node in the traversed sub-session node set to obtain the operation trigger information corresponding to the traversed sub-session node set includes:
determining admission condition configuration data and operation configuration data corresponding to each sub-dialogue node based on page configuration data corresponding to each sub-dialogue node;
converting admission condition configuration data corresponding to each sub-dialogue node to obtain a triggering condition corresponding to each sub-dialogue node;
converting the operation configuration data corresponding to each sub-dialogue node to obtain the operation corresponding to each sub-dialogue node;
and generating operation trigger information corresponding to the traversed sub-dialogue node set based on the trigger condition corresponding to each sub-dialogue node and the operation corresponding to each sub-dialogue node.
In some possible designs, when the dialog message satisfies a target trigger condition corresponding to a target dialog node, based on an execution trigger condition corresponding to at least one execution dialog node, executing an operation corresponding to the execution trigger condition to obtain a reply message corresponding to the dialog message, where the executing includes:
determining the target dialogue node as an execution dialogue node and determining the target trigger condition as an execution trigger condition under the condition that the dialogue message meets the target trigger condition;
and executing the operation corresponding to the execution trigger condition to obtain the reply message.
According to a second aspect of the embodiments of the present disclosure, there is provided a dialogue processing apparatus including:
a dialogue message receiving module configured to execute a dialogue message transmitted by a receiving terminal;
the node information acquisition module is configured to execute operation trigger information corresponding to at least one session node, wherein the operation trigger information corresponding to each session node in the at least one session node is generated based on page configuration data conversion corresponding to each session node, and the operation trigger information corresponding to each session node comprises a trigger condition corresponding to each session node and an operation corresponding to the trigger condition;
the reply message generation module is configured to execute, when the dialogue message meets a target trigger condition corresponding to a target dialogue node, an operation corresponding to the execution trigger condition based on an execution trigger condition corresponding to at least one execution dialogue node, so as to obtain a reply message corresponding to the dialogue message, wherein the at least one execution dialogue node is a dialogue node required for replying the dialogue message, and the target dialogue node is an initial node in the at least one execution dialogue node;
a reply message sending module configured to execute sending the reply message to the terminal.
In some possible designs, the at least one dialogue node is a dialogue node in a graph dialogue structure, and the node information acquisition module includes:
the configuration data receiving submodule is configured to receive the page configuration data corresponding to the at least one dialogue node;
a conversation node traversal submodule configured to perform traversal of the at least one conversation node;
and the configuration data conversion sub-module is configured to perform conversion processing on the page configuration data corresponding to the traversed dialogue node to obtain operation trigger information corresponding to the traversed dialogue node.
In some possible designs, the configuration data conversion submodule includes:
the configuration data acquisition unit is configured to execute the step of acquiring input condition configuration data and operation configuration data corresponding to the dialogue input node based on page configuration data corresponding to the dialogue input node under the condition that the traversed dialogue node is the dialogue input node;
the trigger condition conversion unit is configured to execute conversion processing on the input condition configuration data to obtain a trigger condition corresponding to the dialogue input node;
the operation conversion unit is configured to execute conversion processing on the operation configuration data to obtain an operation corresponding to the conversation input node;
a node information generating unit configured to execute an operation corresponding to the dialog input node according to a trigger condition corresponding to the dialog input node and the operation corresponding to the dialog input node, and generate operation trigger information corresponding to the dialog input node.
In some possible designs, the configuration data obtaining unit is further configured to determine, based on the page configuration data corresponding to the determination node, at least two determination branches corresponding to the determination node, and determination condition configuration data and operation configuration data corresponding to each of the at least two determination branches, in a case that the traversed session node is a determination node;
the trigger condition conversion unit is further configured to perform conversion processing on the judgment condition configuration data corresponding to each judgment branch to obtain a trigger condition corresponding to each judgment branch;
the operation conversion unit is further configured to perform conversion processing on the operation configuration data corresponding to each judgment branch to obtain an operation corresponding to each judgment branch;
the node information generating unit is further configured to execute an operation corresponding to each judgment branch according to the trigger condition corresponding to each judgment branch and the operation corresponding to each judgment branch, and generate operation trigger information corresponding to the judgment node.
In some possible designs, the configuration data obtaining unit is further configured to, in a case that the traversed dialog node is a default execution dialog node, obtain, based on the page configuration data corresponding to the default execution dialog node, operation configuration data corresponding to the default execution dialog node;
the operation conversion unit is further configured to perform conversion processing on the operation configuration data to obtain an operation corresponding to the default execution dialogue node;
the configuration data conversion sub-module further includes: a trigger condition determination unit configured to perform determination of an automatic trigger condition as a trigger condition corresponding to the default execution dialogue node;
the node information generating unit is further configured to execute operations corresponding to the default execution dialogue node according to the automatic trigger condition and the default execution dialogue node, and generate operation trigger information corresponding to the default execution dialogue node.
In some possible designs, the configuration data obtaining unit is further configured to determine, based on the page configuration data corresponding to the slot filling node, at least one slot corresponding to the slot filling node, and slot filling condition configuration data and operation configuration data corresponding to each slot in the at least one slot, in a case that the traversed session node is a slot filling node;
the trigger condition conversion unit is further configured to perform conversion processing on the slot filling condition configuration data corresponding to each slot position to obtain a trigger condition corresponding to each slot position;
the operation conversion unit is further configured to perform conversion processing on the operation configuration data corresponding to each slot position to obtain an operation corresponding to each slot position;
the node information generating unit is further configured to execute operations corresponding to the slot positions according to the triggering conditions corresponding to the slot positions and the slot positions, and generate operation triggering information corresponding to the slot filling node.
In some possible designs, the reply message generation module includes:
an execution dialog node determination submodule configured to perform, in a case where the dialog message satisfies the target trigger condition, determining the target dialog node as a current execution dialog node and determining the target trigger condition as a current execution trigger condition;
the operation execution sub-module is configured to execute the operation corresponding to the current execution trigger condition to obtain an operation result;
the execution dialogue node updating submodule is configured to re-determine a next dialogue node corresponding to the current execution dialogue node in the graph dialogue structure as a current execution dialogue node under the condition that the operation result does not include the reply message;
and the execution trigger condition determining submodule is configured to execute a trigger condition corresponding to the operation result in the trigger condition corresponding to the currently-executed dialogue node, re-determine the trigger condition as the currently-executed trigger condition, and start execution from the operation executing submodule until the operation result comprises the reply message.
In some possible designs, the at least one conversation node is a conversation node in a tree-like conversation structure, and the node information obtaining module includes:
the configuration data receiving submodule is configured to execute receiving of page configuration data corresponding to the conversation nodes in the tree-shaped conversation structure, and the tree-shaped conversation structure comprises a root conversation node and sub conversation nodes;
a conversation node classification submodule configured to execute determining the root conversation node and at least one set of child conversation nodes according to the tree conversation structure, wherein each set of child conversation nodes in the at least one set of child conversation nodes includes child conversation nodes corresponding to the same parent conversation node;
the root node information conversion submodule is configured to execute conversion processing on the page configuration data corresponding to the root session node to obtain operation trigger information corresponding to the root session node;
a node set traversal submodule configured to perform traversal of the at least one sub-dialog node set;
and the sub-node information conversion sub-module is configured to perform conversion processing on page configuration data corresponding to each sub-dialogue node in the traversed sub-dialogue node set to obtain operation trigger information corresponding to the traversed sub-dialogue node set, wherein the operation trigger information corresponding to the traversed sub-dialogue node set is the operation trigger information corresponding to each sub-dialogue node.
In some possible designs, the page configuration data corresponding to the root session node includes admission condition configuration data and operation configuration data corresponding to the root session node, and the root node information conversion sub-module includes:
the trigger condition conversion unit is configured to execute conversion processing on the admission condition configuration data to obtain a trigger condition corresponding to the root session node;
the operation conversion unit is configured to execute conversion processing on the operation configuration data to obtain an operation corresponding to the root session node;
and the root node information generating unit is configured to execute the operation according to the triggering condition corresponding to the root dialogue node and the operation corresponding to the root dialogue node and generate the operation triggering information corresponding to the root dialogue node.
In some possible designs, the child node information conversion sub-module includes:
the sub-node configuration data determining unit is configured to execute determining admission condition configuration data and operation configuration data corresponding to each sub-conversation node based on page configuration data corresponding to each sub-conversation node;
the trigger condition conversion unit is configured to execute conversion processing on admission condition configuration data corresponding to each sub-dialogue node to obtain a trigger condition corresponding to each sub-dialogue node;
the operation conversion unit is configured to perform conversion processing on operation configuration data corresponding to each sub-dialogue node to obtain an operation corresponding to each sub-dialogue node;
and the child node information generating unit is configured to execute operation triggering information corresponding to the traversed child dialogue node set based on the triggering condition corresponding to each child dialogue node and the operation corresponding to each child dialogue node.
In some possible designs, the reply message generation module includes:
an execution dialogue node determination submodule configured to determine the target dialogue node as an execution dialogue node and determine the target trigger condition as an execution trigger condition if the dialogue message satisfies the target trigger condition;
and the operation execution sub-module is configured to execute the operation corresponding to the execution trigger condition to obtain the reply message.
According to a third aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including: a processor; a memory for storing the processor-executable instructions; wherein the processor is configured to execute the instructions to implement the dialog processing method according to any of the above first aspects.
According to a fourth aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium, wherein instructions of the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the dialog processing method of any one of the first aspect of the embodiments of the present disclosure.
According to a fifth aspect of the embodiments of the present disclosure, there is provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the dialog processing method of any one of the first aspects of the embodiments of the present disclosure.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
under the conversion mode, the system can determine the target trigger condition met by the dialogue message sent by the terminal from the operation trigger information generated by conversion, and further trigger the operation required to be executed for replying the dialogue message, so that the reply message is generated and sent to the terminal, the coupling degree between front-end configuration and back-end processing in a dialogue processing architecture is effectively reduced, and the expandability of a back-end dialogue processing engine is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
FIG. 1 is a schematic diagram of an application environment shown in accordance with an exemplary embodiment;
FIG. 2 is a flow diagram illustrating a single round of session processing by a server;
FIG. 3 illustrates a diagram of a multi-turn dialog technique architecture based on a rules engine implementation;
FIG. 4 is a flowchart illustrating a dialog processing method in accordance with an exemplary embodiment;
FIG. 5 is a flowchart illustrating a dialog processing method in accordance with an exemplary embodiment;
FIG. 6 is a schematic diagram illustrating a dialog configuration page of a graphical dialog structure;
FIG. 7 is a flowchart three illustrating a method of dialog processing according to an exemplary embodiment;
FIG. 8 is a schematic diagram of a dialog configuration page illustrating a tree-shaped dialog structure
FIG. 9 is a block diagram illustrating a dialog processing device according to an exemplary embodiment;
FIG. 10 is a block diagram illustrating an electronic device for conversation processing in accordance with an exemplary embodiment.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the foregoing drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in other sequences than those illustrated or described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
It should be noted that, the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for presentation, analyzed data, etc.) referred to in the present disclosure are information and data authorized by the user or sufficiently authorized by each party.
Referring to fig. 1, fig. 1 is a schematic diagram illustrating an application environment according to an exemplary embodiment, which may include a terminal 100, a server 200, and a terminal 300, as shown in fig. 1.
The terminal 100 may be used to provide multiple rounds of dialog development services to any one user. Specifically, the terminal 100 may include, but is not limited to, a smart phone, a desktop computer, a tablet computer, a notebook computer, a smart speaker, a digital assistant, an Augmented Reality (AR)/Virtual Reality (VR) device, a smart wearable device, and other types of electronic devices, and may also be software running on the electronic devices, such as an application program. Optionally, the operating system running on the electronic device may include, but is not limited to, an android system, an IOS system, linux, windows, and the like.
In an optional embodiment, the server 200 may provide a background service for the terminal 100, receive the page configuration data of the session node sent by the terminal 100, and convert to generate corresponding operation trigger information, such as a rule object corresponding to the session node. Optionally, a rules engine is installed in the server 200. Alternatively, the rules engine may be any rules engine including, but not limited to, easy-rules engines, drool rules engines.
In the rules engine, one or more sets of objects with conditions and operations may be created and stored in a collection and then run, and upon satisfaction of the conditions, the operations may be executed. Each simple rule object (rule) has a condition and a number of operations. A compound rule object can be a variety of combinations of simple rule objects, a compound rule is also a rule whose conditions and actions consist of simple rules, such as: and after the conditions of all the simple rules are met, executing the operations of all the simple rules, or meeting the condition of one of the simple rules, and only executing the operation of the simple rule.
Specifically, the server 200 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a CDN (Content Delivery Network), a big data and artificial intelligence platform, and the like.
In an alternative embodiment, the terminal 300 may send a dialog message to the server 200, and the server 200 generates a reply message corresponding to the dialog message based on the rule engine and the converted operation trigger information, and sends the reply message to the terminal 300, thereby implementing the automatic dialog process.
In one example, as shown in fig. 2, a flow diagram illustrating a single round of session processing by a server is shown. A single round of dialogue consists of several trigger conditions, slots, outputs and node flows. The whole Dialog process can be abstractly summarized as user utterance input, NLU (Natural Language Understanding) processes the user input, DM (Dialog Management) judges whether a trigger condition is satisfied, if a trigger condition is satisfied, a series of operations (such as a slot filling operation) triggered based on the trigger condition are performed, and finally a result is output. The DM is used for conversation management of a multi-turn conversation system, controls the process of man-machine conversation, records conversation states and historical information, analyzes user requirements, and achieves the purpose of a user through calculation and decision.
The multi-turn dialog is that the current state and the context information are recorded additionally on the basis of a single turn of dialog, and the structure of the single turn of dialog just meets the condition of using a rule engine. In one example, as shown in FIG. 3, a multi-turn dialog technology architecture diagram based on a rules engine implementation is illustrated. Alternatively, the multi-turn dialog engine 30 in fig. 3 is installed in the server 200, the client 31 is installed in the terminal 300, and the service configuration data may be configured in the terminal 100 by a developer. In the technical architecture shown in fig. 3, the multi-turn dialog engine uses a rule engine (rule engine) including an easy-rules component as a kernel, and the kernel and the page configuration structure of the multi-turn dialog engine are independent and do not affect each other. The input stream translates the configuration data of the page configured session node into the corresponding rule. The user via the client 31 may send a request stream to the server 200, which includes the dialog messages sent by the user. The multi-turn dialog engine processes according to the converted rule to generate a reply message, and sends the reply message to the client 31 through the output stream.
In addition, it should be noted that fig. 1 shows only one application environment provided by the present disclosure, and in practical applications, other application environments may also be included, for example, more terminals may be included.
In the embodiment of the present specification, the terminal 100, the server 200, and the terminal 300 may be directly or indirectly connected through wired or wireless communication, and the disclosure is not limited herein.
Fig. 4 is a flowchart illustrating a dialog processing method according to an example embodiment. Optionally, the dialogue processing method is applied to an electronic device. Optionally, the electronic device is a server. As shown in fig. 4, the method may include the following steps (410-440).
And step 410, receiving the dialogue message sent by the terminal.
Optionally, the dialog message is a dialog message input by a user at the terminal. Optionally, a client corresponding to the target application is installed in the terminal. The client may include a chat system, such as a customer service system.
Optionally, the dialog message is a dialog message corresponding to the first user account.
Optionally, the operation trigger information corresponding to each session node in the at least one session node is generated based on the page configuration data conversion corresponding to each session node. Optionally, the operation trigger information corresponding to each session node includes a trigger condition corresponding to each session node and an operation corresponding to the trigger condition.
Optionally, the page configuration data is generated based on a configuration operation performed by the target object in the front-end configuration page of the session node. The front-end configuration page may be a webpage displayed by the terminal, where the terminal is a configuration terminal. Based on the front-end configuration page, selection operation and configuration operation aiming at the at least one dialogue node can be received, and the configuration terminal responds to the selection operation and the configuration operation to generate page configuration data corresponding to the at least one dialogue node.
Optionally, the user may also select a related option in the front-end configuration page and input related information, after receiving the target selection option and the input configuration information, the configuration terminal may send the target selection option and the input configuration information to the server, and the server may refine the page configuration data corresponding to the at least one session node according to the target selection option and the input configuration information. The embodiment of the present disclosure does not limit the generation manner of the page configuration data.
Optionally, the front-end configuration page may be a front-end configuration page in different configuration modes, for example, a graph-structured dialog configuration page and a tree-structured dialog configuration page, where front-end configuration logics corresponding to different structures are different. Accordingly, the at least one dialog node corresponds to at least one form of dialog structure, including but not limited to graphical dialog structures and tree dialog structures.
Optionally, the operation trigger information is combination information of a trigger condition and an operation corresponding to the dialog node, and may specifically be a data structure object including the trigger condition and the operation. Optionally, the operation trigger information includes a rule object. The rule object is a data object that can be processed by a rule engine deployed in a server, and may include a trigger condition corresponding to the dialog condition and at least one operation corresponding to the trigger condition.
Alternatively, the rule objects are divided into simple rule objects and complex rule objects. Each simple rule object corresponds to a condition and at least one operation corresponding to the condition. A composite rule object may be a combination of rule objects formed from at least two simple rule objects.
Optionally, the rule object is operation trigger information corresponding to the session node. The correspondence between the session nodes and the rule objects is flexible and changeable, one session node may correspond to one simple rule object or one composite rule object, and a plurality of session nodes may correspond to a common composite rule object, which is not limited in the embodiments of the present disclosure.
Page configuration data corresponding to a dialog node in different dialog structures and conversion modes thereof may be different, and a process of converting the page configuration data into operation trigger information under the two dialog structures will be described below by taking a graphic dialog structure and a tree-shaped dialog structure as examples.
In a possible embodiment, the at least one dialogue node is a dialogue node in a graph dialogue structure; accordingly, as shown in fig. 5, the process of acquiring the operation trigger information corresponding to the at least one session node includes the following steps (421 to 423), and fig. 5 is a flowchart of a session processing method according to an exemplary embodiment.
In step 421, page configuration data corresponding to at least one session node is received.
The generation process of the page configuration data has been described in the foregoing, and is not described herein again, and an example is listed below to facilitate understanding by those skilled in the art.
In one example, as shown in FIG. 6, a diagram of a dialog configuration page of a graphical dialog structure is illustrated. The graphic dialog structure configuration page 60 shown in fig. 6 includes a dialog configuration region 61 and a node configuration region 62. A dialog node selection menu 611 may be displayed in the dialog configuration region 61, in which various preset types of dialog nodes are displayed, and specifically, the dialog nodes may include a dialog input node, a judgment node, a service call node, a function node, an assignment node, a reply node, and a slot filling node. The user can select a dialog node of a desired configuration through the node selection menu 611 and drag it into the dialog configuration region 61 for connection configuration. As shown in fig. 6, a configured graph dialog structure 612, specifically a dialog node structure corresponding to the leave-asking dialog process is shown, which includes a leave-asking trigger node, a leave-asking information collection node, and a leave-asking application submission node. The leave-asking triggering node is an input node, the leave-asking information collecting node is a slot filling node, and the leave-asking application submitting node is a reply node. The user may configure the selected session node through the node configuration area 62, for example, after the user selects the leave application submission node, the user may configure the trigger condition and operation of the leave application submission node through the node configuration area 62, so as to generate the page configuration data of the leave application submission node.
At step 422, at least one conversation node is traversed.
For each dialog node in the graph dialog structure, the device may generate operation trigger information for each dialog node, for example, construct a rule object, and therefore, it is necessary to traverse the at least one dialog node, determine a trigger condition and an operation corresponding to each dialog node, and generate corresponding operation trigger information, for example, a rule object. Alternatively, the last operation of each rule object may be to notify the rule engine in the server to execute the next rule.
Step 423, performing conversion processing on the page configuration data corresponding to the traversed session node to obtain operation trigger information corresponding to the traversed session node.
By traversing each session node in the at least one session node and converting the page configuration data corresponding to each traversed session node, the operation trigger information corresponding to each session node can be obtained, and the uniform conversion of the page configuration data at the back end is realized, so that the back-end server can realize session processing according to the operation trigger information after the uniform conversion, the coupling degree between the front-end configuration and the back-end processing in a session processing architecture is effectively reduced, and the expandability of a back-end session processing engine is improved.
Optionally, at least one type of session node corresponds to the graphic session structure, including but not limited to a session input node, a judgment node, a default execution node and a slot filling node. Optionally, the default execution node refers to a session node that can be directly executed without determining a trigger condition or having no trigger condition. Optionally, the default execution node includes a service call node, a function node, an assignment node, a reply node, and the like corresponding to the graph dialog structure.
The corresponding conversion method may be different for different types of session nodes, which is described below.
Under the condition that the traversed conversation node is a conversation input node, acquiring input condition configuration data and operation configuration data corresponding to the conversation input node based on page configuration data corresponding to the conversation input node; converting the input condition configuration data to obtain a trigger condition corresponding to the dialogue input node; converting the operation configuration data to obtain an operation corresponding to the dialogue input node; and generating operation triggering information corresponding to the dialogue input node according to the triggering condition corresponding to the dialogue input node and the operation corresponding to the dialogue input node.
Optionally, the input condition configuration data is trigger condition data configured by the target object for the dialog input node, for example, an intention recognition result corresponding to the dialog message belongs to the target intention, and the dialog message includes a preset keyword and other conditions. Optionally, the operation configuration data is data configured by the target object for the dialog input node to perform a corresponding operation, such as performing a next operation on the dialog input node. The embodiment of the present application does not limit the form and content of the input condition configuration data and the operation configuration data. When the conversion is carried out, the input condition configuration data can be converted into the trigger condition in the rule object, the operation configuration data can be converted into the operation in the rule object, and then the rule object corresponding to the conversation input node (namely the operation trigger information corresponding to the conversation input node) can be generated in a combined mode according to the trigger condition and the operation, so that the conversion of the page configuration data corresponding to the conversation input node is realized. Optionally, the rule object corresponding to the dialog input node is a simple rule object.
In one implementation, the dialog input node is converted into a simple rule object whose trigger condition is the trigger condition of the dialog input node, which operates to notify the rule engine to execute the next rule.
By converting the input condition configuration data corresponding to the session input node into the trigger condition in the operation trigger information and converting the operation configuration data corresponding to the session input node into the operation in the operation trigger information, the uniform conversion of the page configuration data corresponding to the session input node can be realized, the complete information of the page configuration data can be reserved, and the accuracy and the comprehensiveness of the conversion of the page configuration data are improved.
Determining at least two judgment branches corresponding to the judgment node and judgment condition configuration data and operation configuration data corresponding to each judgment branch in the at least two judgment branches based on page configuration data corresponding to the judgment node under the condition that the traversed conversation node is the judgment node; converting the judging condition configuration data corresponding to each judging branch to obtain a triggering condition corresponding to each judging branch; converting the operation configuration data corresponding to each judgment branch to obtain the operation corresponding to each judgment branch; and generating operation triggering information corresponding to the judgment node according to the triggering condition corresponding to each judgment branch and the operation corresponding to each judgment branch.
Optionally, there are at least two decision branches for each decision node. For example, for the judgment of two categories such as yes or no, numerical value and the like, two judgment branches are provided, which respectively represent two different situations. For example, for the judgment of multiple categories such as grades or specific data, there are multiple judgment branches, which represent different situations. Each judgment branch has corresponding judgment condition configuration data, where the judgment condition configuration data is trigger condition data configured for the corresponding judgment branch by a target object, for example, the judged data is greater than or equal to a threshold, and for example, the judged data is preset data. Optionally, the operation configuration data is data configured by the target object for the corresponding judgment branch and used for executing a corresponding operation, for example, the corresponding operation under the judgment branch is an operation of executing a next session node, or an operation of retrieving the target data. The embodiment of the present application does not limit the setting of the above-mentioned judgment branches, and the form and content of the judgment condition configuration data and the operation configuration data corresponding to each judgment branch. When the conversion is performed, the judgment condition configuration data corresponding to each judgment branch can be converted into the trigger condition in the rule object corresponding to each judgment branch, the operation configuration data corresponding to each judgment branch is converted into the operation in the rule object corresponding to each judgment branch, the trigger condition and the operation corresponding to each judgment branch are combined to generate a simple rule object corresponding to each judgment branch, and then the simple rule objects corresponding to each judgment branch are combined to generate a composite rule object corresponding to the judgment node (namely, the operation trigger information corresponding to the judgment node), so that the conversion of the page configuration data corresponding to the judgment node is realized. Optionally, the rule object corresponding to the determination node is a composite rule object.
In an actual application, the specific way of converting the judgment node into the composite rule object is as follows: converting the simple rules into a plurality of simple rules according to the number of the judgment conditions, wherein the triggering condition of each simple rule is the corresponding judgment condition, the operation is to inform the rule engine to execute the next rule, the triggering condition of the composite rule object is to select a simple rule corresponding to the met condition, and then the operation of the composite rule is to execute the operation of the selected simple rule.
By converting the input condition configuration data corresponding to each judgment branch in the judgment node into the trigger condition in the operation trigger information and converting the operation configuration data corresponding to each judgment branch in the judgment node into the operation in the operation trigger information, the uniform conversion of the page configuration data corresponding to the judgment node can be realized, the complete information of the page configuration data can be reserved, and the accuracy and the comprehensiveness of the page configuration data conversion are improved.
Under the condition that the traversed conversation node is the default execution conversation node, acquiring operation configuration data corresponding to the default execution conversation node based on page configuration data corresponding to the default execution conversation node; converting the operation configuration data to obtain an operation corresponding to a default execution dialogue node; determining the automatic trigger condition as a trigger condition corresponding to a default execution dialogue node; and generating operation triggering information corresponding to the default execution dialogue node according to the automatic triggering condition and the operation corresponding to the default execution dialogue node.
Optionally, the operation configuration data corresponding to the default execution dialog node is data configured by the target object for the default execution dialog node and used for executing a corresponding operation, such as executing operations of service call, assignment, function call, reply, and the like. The embodiment of the present application does not limit the form and content of the above operation configuration data. When the conversion is carried out, because the default execution dialogue node is the directly executed dialogue node, the automatic trigger condition can be used as the trigger condition in the rule object, the operation configuration data can be converted into the operation in the rule object, and the rule object corresponding to the default execution dialogue node (namely the operation trigger information corresponding to the default execution dialogue node) can be generated in a combined mode according to the automatic trigger condition and the operation, so that the conversion of the page configuration data corresponding to the default execution dialogue node is realized. Optionally, the rule object corresponding to the execution dialog node is a simple rule object by default.
In one practical application, the service invocation node is converted into a simple rule object, the trigger condition of the rule object is always true (true), namely the trigger condition is met, and the operation is to invoke an external service and inform the rule engine to execute the next rule. The function node, the assignment node, the reply node and the service call node are similar and are converted into simple rule objects, the trigger condition is true forever, namely the trigger condition is met, and the operation is the operation corresponding to the function node, the assignment node and the reply node respectively and the notification rule engine to execute the next rule.
By taking the automatic trigger condition as the trigger condition in the operation trigger information corresponding to the default execution session node and converting the operation configuration data corresponding to the default execution session node into the operation in the operation trigger information, the unified conversion of the page configuration data corresponding to the default execution session node can be realized, the complete information of the page configuration data can be reserved, and the accuracy and the comprehensiveness of the page configuration data conversion are improved.
Under the condition that the traversed session node is a slot filling node, determining at least one slot position corresponding to the slot filling node, and slot filling condition configuration data and operation configuration data corresponding to each slot position in the at least one slot position based on page configuration data corresponding to the slot filling node; converting the slot filling condition configuration data corresponding to each slot position to obtain a triggering condition corresponding to each slot position; converting the operation configuration data corresponding to each slot position to obtain an operation corresponding to each slot position; and generating operation triggering information corresponding to the slot filling node according to the triggering condition corresponding to each slot position and the operation corresponding to each slot position.
Optionally, each slot filling node corresponds to at least one slot. The slot is information required to be completed in a multi-turn conversation process, for example, preliminary user intention is converted into information required to be completed by a definite user instruction, for example, a slot for extracting a keyword from a user utterance is a word slot, and a slot filled by using related information and other scene information is an interface slot. Each slot position has corresponding slot filling condition configuration data, and the slot filling condition configuration data is trigger condition data configured for the corresponding slot position by a target object, for example, the slot position data is empty, and for example, the slot position data is overdue. Optionally, the operation configuration data is data configured by the target object for the corresponding slot to perform the corresponding slot filling operation, for example, the corresponding operation at a certain slot is an operation to fill the slot data. The embodiment of the present application does not limit the setting of the slot positions, and the form and content of the slot filling condition configuration data and the operation configuration data corresponding to each slot position. When the conversion is performed, the slot filling condition configuration data corresponding to each slot position can be converted into the trigger condition in the rule object corresponding to each slot position, the operation configuration data corresponding to each slot position is converted into the operation in the rule object corresponding to each slot position, the trigger condition and the operation corresponding to each slot position are combined to generate the simple rule object corresponding to each slot position, and the simple rule objects corresponding to each slot position are combined to generate the composite rule object corresponding to the slot filling node (i.e. the operation trigger information corresponding to the slot filling node), so that the conversion of the page configuration data corresponding to the slot filling node is realized. Optionally, the rule object corresponding to the slot filling node is a composite rule object.
In a practical application, a slot filling node is converted into a composite rule object, each slot corresponds to a simple rule object, the triggering condition is whether the slot is filled with a value, the operation is a slot filling operation, and a rule engine is informed to execute the next rule.
By converting the slot filling condition configuration data corresponding to each slot position in the slot filling node into the trigger condition in the operation trigger information and converting the operation configuration data corresponding to each slot position in the slot filling node into the operation in the operation trigger information, the unified conversion of the page configuration data corresponding to the slot filling node can be realized, the complete information of the page configuration data can be reserved, and the accuracy and the comprehensiveness of the page configuration data conversion are improved.
The conversion of different types of dialogue nodes in the graphic dialogue structure can be realized through the conversion.
In another possible embodiment, at least one of the conversation nodes is a conversation node in a tree-like conversation structure; accordingly, as shown in fig. 7, the process of acquiring the operation trigger information corresponding to the at least one session node includes the following steps (42 a to 42 e), and fig. 7 is a flowchart three illustrating a session processing method according to an exemplary embodiment.
And 42a, receiving page configuration data corresponding to the conversation nodes in the tree-shaped conversation structure.
Optionally, the tree dialog structure comprises a root dialog node and a child dialog node. The generation process of the page configuration data has already been described above, and is not described herein again, and a specific example is described below to facilitate understanding by those skilled in the art.
In one example, as shown in FIG. 8, a diagram of a dialog configuration page of a tree dialog structure is illustrated. The tree dialog configuration page 80 shown in fig. 8 includes a tree dialog configuration area 81, an option area 82, and a variable list 83. The tree dialogue configuration area 81 shows a configured tree dialogue structure 811, and particularly, a tree node structure corresponding to a car renting dialogue flow, where the tree node structure includes a root node 8111, sub nodes 8112 corresponding to the root node 8111, and sub nodes 8113 of the sub nodes 8112. The option area 82 includes a flow segment detection button 821, a version record viewing button 822, and a validation button 823. The user can perform the flow segment detection by clicking the flow segment detection button 821, and the flow segment version management can be realized by the version record viewing button 822 and the validation button 823. The variable list 83 shows defined global variables.
And 42b, determining a root conversation node and at least one sub conversation node set according to the tree conversation structure.
Optionally, the root dialog node and the at least one set of child dialog nodes are determined according to a parent-child relationship between each pair of dialog nodes in the tree-shaped dialog structure. Optionally, the root conversation node has no parent conversation node.
Optionally, each set of child dialog nodes in the at least one set of child dialog nodes includes child dialog nodes corresponding to the same parent dialog node. For any set of child conversation nodes, all of the child conversation nodes in the set correspond to a common parent conversation node. For example, a tree dialog structure includes a root node A1, child nodes a11 and a12 corresponding to the root node A1, child nodes a111 and a112 corresponding to the child node a11, and child nodes a121 and a122 corresponding to the child node a12, where a set of the child nodes includes { a11 and a12}, { a111 and a121}, { a121 and a122}.
And 42c, converting the page configuration data corresponding to the root session node to obtain operation triggering information corresponding to the root session node.
Optionally, the page configuration data corresponding to the root session node includes admission condition configuration data and operation configuration data corresponding to the root session node. The operation configuration data is used for indicating at least one operation corresponding to the root dialogue node.
Correspondingly, converting the entry condition configuration data to obtain a trigger condition corresponding to the root session node; converting the operation configuration data to obtain an operation corresponding to the root session node; and generating operation triggering information corresponding to the root dialogue node according to the triggering condition corresponding to the root dialogue node and the operation corresponding to the root dialogue node.
Optionally, the admission condition configuration data corresponding to the root session node is admission condition data configured for the root session node by a target object, for example, an intention identification result corresponding to a session message belongs to a target intention, and the session message includes admission conditions such as a preset keyword. Optionally, the operation configuration data corresponding to the root session node is data configured by the target object for the root session node and used for executing a corresponding operation, such as performing operations of service call, judgment, slot filling, function call, assignment, reply, and the like. The embodiment of the present application does not limit the form and content of the admission condition configuration data and the operation configuration data. When the conversion is performed, the admission condition configuration data can be converted into the trigger condition in the rule object, the operation configuration data can be converted into the operation in the rule object, and then the rule object corresponding to the root session node (i.e. the operation trigger information corresponding to the root session node) can be generated through combination according to the trigger condition and the operation, so that the conversion of the page configuration data corresponding to the root session node is realized. Optionally, the rule object corresponding to the root dialog node is a simple rule object.
Of course, the rule object corresponding to the root dialog node may also be a composite rule object, and the rule object corresponding to the current root dialog node is combined with the rule objects corresponding to other root dialog nodes to generate a composite rule object corresponding to each root dialog node.
The access condition configuration data corresponding to the root session node is converted into the trigger condition in the operation trigger information, and the operation configuration data corresponding to the root session node is converted into the operation in the operation trigger information, so that the uniform conversion of the page configuration data corresponding to the root session node can be realized, the complete information of the page configuration data can be reserved, and the accuracy and the comprehensiveness of the conversion of the page configuration data are improved.
If the page configuration data corresponding to the sub-session nodes are to be converted, at least one sub-session node set needs to be traversed, so that each sub-session node in each sub-session node set is traversed, and the page configuration data corresponding to each sub-session node is converted.
And 42e, converting the page configuration data corresponding to each sub-session node in the traversed sub-session node set to obtain operation triggering information corresponding to the traversed sub-session node set.
Optionally, the operation trigger information corresponding to the traversed sub-dialog node set is the operation trigger information corresponding to each sub-dialog node.
Based on the configuration, the operation trigger information corresponding to the root node in the tree-shaped dialogue structure and the operation trigger information corresponding to the child dialogue nodes with the same father node in the tree-shaped dialogue structure can be generated, so that the comprehensive conversion of the page configuration data corresponding to each node in the tree-shaped dialogue structure can be realized, the connection relation among the nodes in the tree-shaped dialogue structure can be reserved, and the accuracy and the comprehensiveness of the page configuration data conversion are improved.
Optionally, the implementation process of the step 42e may include: determining admission condition configuration data and operation configuration data corresponding to each sub-dialogue node based on page configuration data corresponding to each sub-dialogue node; converting admission condition configuration data corresponding to each sub-session node to obtain a triggering condition corresponding to each sub-session node; converting the operation configuration data corresponding to each sub-dialogue node to obtain the operation corresponding to each sub-dialogue node; and generating operation trigger information corresponding to the traversed sub-dialogue node set based on the trigger condition corresponding to each sub-dialogue node and the operation corresponding to each sub-dialogue node.
Optionally, for any sub-session node set, at least one sub-session node is included therein. The page configuration data corresponding to each sub-session node may include admission condition configuration data and operation configuration data corresponding to each sub-session node. Therefore, the admission condition configuration data and the operation configuration data corresponding to each sub-session node can be determined based on the page configuration data corresponding to each sub-session node. The admission condition configuration data corresponding to the sub-session node is trigger condition data configured for the corresponding sub-session node by the target object, for example, the slot bit data is empty, the judged data is greater than a preset threshold, and for example, the slot bit data is expired. Optionally, the operation configuration data is data configured by the target object for the corresponding sub-dialog node and used for executing a corresponding operation, such as performing operations of service call, slot filling, function call, assignment, reply, and the like. The embodiment of the present application does not limit the form and content of the admission condition configuration data and the operation configuration data. For any sub-session node set, during conversion, the admission condition configuration data corresponding to each sub-session node can be converted into the trigger condition in the rule object corresponding to each sub-session node, the operation configuration data corresponding to each sub-session node is converted into the operation in the rule object corresponding to each sub-session node, the trigger condition and the operation corresponding to each sub-session node are combined to generate the simple rule object corresponding to each sub-session node, the simple rule objects corresponding to each sub-session node in the sub-session node set are combined to generate the composite rule object corresponding to the sub-session node set (i.e. the operation trigger information corresponding to the sub-session node set), and after traversal of at least one sub-session node set is completed, the composite rule object corresponding to each sub-session node set can be obtained, so that conversion of the page configuration data corresponding to each sub-session node in the tree-structured data is realized.
In a practical application, each conversation node is constructed into a simple rule object aiming at multiple rounds of conversations with a tree structure, the trigger condition is an admission condition of the conversation node, and the operation is at least one preset operation corresponding to the conversation node. Combining the simple rule objects corresponding to the child nodes of each conversation node into a composite rule object, wherein the trigger condition of the composite rule object is composed of the trigger conditions of the child rule objects, finding the child rule objects meeting the trigger conditions, executing the operation of the child rule objects, and recording the current rule object; after receiving new dialogue information, finding out its sub-node according to the dialogue node hit by the last dialogue information to form compound rule object, then executing the compound rule, and repeating the above steps until reaching the leaf node. Leaf nodes are end dialog nodes in the tree dialog structure, with no children. If there is an operation of configuration jumping to another node in a certain session node, which destroys the tree traversal structure, the last operation in the rule object corresponding to the session node needs to be set to notify the rule engine to execute the next rule object, where the next rule object is the rule object corresponding to the session node to be jumped to.
The access condition configuration data corresponding to each sub-session node in the sub-session node set is converted into the trigger condition in the operation trigger information, and the operation configuration data corresponding to each sub-session node is converted into the operation in the operation trigger information, so that the uniform conversion of the page configuration data corresponding to each sub-session node in the sub-session node set can be realized, the complete information of the page configuration data can be reserved, and the accuracy and the comprehensiveness of the page configuration data conversion are improved.
And 430, executing the operation corresponding to the execution trigger condition based on the execution trigger condition corresponding to the at least one execution dialogue node under the condition that the dialogue message meets the target trigger condition corresponding to the target dialogue node, so as to obtain a reply message corresponding to the dialogue message.
Optionally, at least one executing conversation node is a conversation node required to reply to a conversation message. Optionally, the target dialogue node is an initiation node of the at least one executing dialogue node.
Optionally, the execution trigger condition refers to a hit trigger condition in the trigger conditions corresponding to the execution dialog node.
Optionally, the target trigger condition includes that an intention identification type corresponding to the dialog message belongs to a preset intention type. Optionally, the dialog message is subjected to intent recognition processing to obtain an intent recognition type corresponding to the dialog message, and if the intent recognition type belongs to the preset intent type, a trigger condition that the intent recognition type corresponding to the dialog message belongs to the preset intent type may be determined as a target trigger condition, and then a dialog node corresponding to the target trigger condition is determined as a target dialog node.
In a graph dialogue structure, each dialogue node has a preset connection relation, after the target dialogue node is determined, the target dialogue node can be used as an initial node, whether an operation result obtained by the current execution operation meets a trigger condition of the next dialogue node or not is sequentially judged according to the connection relation between the target dialogue node and other dialogue nodes in the graph dialogue structure, if yes, the met trigger condition is determined as the execution trigger condition, and the operation corresponding to the execution trigger condition is executed until the operation result obtained currently comprises a reply message corresponding to the dialogue message.
In a possible embodiment, the at least one dialogue node is a dialogue node in a graph dialogue structure; accordingly, as shown in fig. 5, the implementation of step 430 may include the following steps (431 to 434).
And 431, in the case that the dialog message meets the target trigger condition, determining the target dialog node as the current execution dialog node, and determining the target trigger condition as the current execution trigger condition.
Optionally, the currently executed dialog node refers to a currently executed dialog node in dialog nodes required for replying to the dialog message. For a currently executed dialog node, the corresponding operation trigger information may include one or more trigger conditions, where the currently executed trigger condition refers to a hit trigger condition in the trigger conditions corresponding to the currently executed dialog node.
And step 432, executing the operation corresponding to the current execution trigger condition to obtain an operation result.
If the current execution trigger condition is hit, the corresponding operation, namely the operation corresponding to the current execution trigger condition, is triggered to be executed, so that an operation result is obtained.
Optionally, in the graph dialog structure, the currently executed dialog node is not necessarily a reply node, and in a case that the currently executed dialog node is not a reply node, an operation corresponding to the currently executed dialog node is executed. The operation corresponding to the currently executed dialog node at least includes an operation of notifying the rule engine to execute the next rule object, and in addition, may also include operations such as service call, slot filling, assignment, function call, judgment and the like (if existing in the configuration, if not, only includes an operation of notifying the rule engine to execute the next rule object).
And under the condition that the current execution conversation node is a reply node, obtaining the reply message after executing the corresponding operation of the current execution conversation node.
In the case where the operation result does not include a reply message, execution starts at step 434. In case the operation result comprises a reply message, step 440 is performed.
In step 434, the next dialog node corresponding to the currently executed dialog node in the graph dialog structure is determined as the currently executed dialog node again.
Step 435, re-determining the trigger condition corresponding to the operation result in the trigger conditions corresponding to the currently executed session node as the currently executed trigger condition.
And is performed from step 432 above until the result of the operation includes a reply message.
In a graph dialogue structure, the operation corresponding to the target trigger condition can be executed by searching the target trigger condition met by the dialogue node, the target dialogue node corresponding to the target trigger condition is used as an initial node to traverse downwards, whether the current operation structure meets the trigger condition of the next dialogue node or not is judged, and then the operation corresponding to the next trigger condition is executed under the condition of meeting until a reply message is generated, so that the reply of the dialogue message is realized, the dialogue processing efficiency is improved, the device can normally and accurately reply the message based on the converted operation trigger information, and the dialogue processing mode can support the decoupling between the front-end configuration and the back-end processing and support the expandability of a back-end dialogue processing engine.
Optionally, in the tree-shaped dialog structure, at least one preset operation is configured in each dialog node, and the reply message may be generated after the execution of the at least one preset operation corresponding to each dialog node is completed. I.e. each conversation node will have a corresponding reply message output. Therefore, after determining the target session node corresponding to the session message in the tree-shaped session structure, at least one preset operation corresponding to the target session node may be executed, that is, a reply message corresponding to the session message may be generated, and the target session node may be recorded, and after a next session message is sent, a trigger condition corresponding to a next session message may be searched from operation trigger information corresponding to a sub-session node corresponding to a last hit session node, and then the target session node is determined again, and at least one preset operation corresponding to the re-determined target session node is executed, so that a new reply message is generated until no new session message is received.
In another possible embodiment, at least one of the conversation nodes is a conversation node in a tree-like conversation structure; accordingly, as shown in fig. 7, the implementation of step 430 may include the following steps (43 a to 43 b).
In step 43a, in case the dialog message satisfies the target trigger condition, the target dialog node is determined as the execution dialog node, and the target trigger condition is determined as the execution trigger condition.
After receiving new dialogue information, finding out its sub-node according to the dialogue node hit by the last dialogue information to form compound rule object, then executing the compound rule, and repeating the above steps until reaching leaf node.
And 43b, executing the operation corresponding to the trigger condition to obtain the reply message.
Under the tree-shaped dialogue structure, by searching for the target trigger condition met by the dialogue node, the execution dialogue node and the execution trigger condition which are required to be executed for replying the dialogue message can be determined, the reply message can be generated by executing the operation corresponding to the execution trigger condition, the reply of the dialogue message is realized, the dialogue processing efficiency is improved, the device can be ensured to normally and accurately reply the message based on the converted operation trigger information, the decoupling between the front-end configuration and the back-end processing can be realized by the dialogue processing mode, and the expandability of a back-end dialogue processing engine is supported.
To sum up, according to the technical scheme provided by the embodiment of the present disclosure, the page configuration data corresponding to the session node is converted into the operation trigger information including the trigger condition and the corresponding operation, so that the general conversion of the session node configuration data can be realized.
The multi-turn dialog is a typical application scenario corresponding to the embodiment of the disclosure, and in the scenario, by applying the technical scheme provided by the embodiment of the disclosure, conditions (conditions) and operations (actions) of the multi-turn dialog can be abstracted to form simple rules, the simple rules are combined into composite rules, the architecture layering of the multi-turn dialog system can be realized through rule engine scheduling rules, the structure of the dialog engine and the page configuration is decoupled, the expansibility and the easy maintainability of the dialog engine are enhanced, the multi-turn dialog in various structural forms can be specifically supported, and the online upgrade of the system is supported.
Fig. 9 is a block diagram illustrating a dialog processing device according to an example embodiment. Referring to fig. 9, the apparatus includes:
a dialogue message receiving module 910 configured to execute a dialogue message transmitted by a receiving terminal;
a node information obtaining module 920, configured to perform obtaining operation trigger information corresponding to at least one session node, where the operation trigger information corresponding to each session node in the at least one session node is generated based on conversion of page configuration data corresponding to each session node, and the operation trigger information corresponding to each session node includes a trigger condition corresponding to each session node and an operation corresponding to the trigger condition;
a reply message generation module 930 configured to execute, when the dialog message satisfies a target trigger condition corresponding to a target dialog node, an operation corresponding to the execution trigger condition based on an execution trigger condition corresponding to at least one execution dialog node, where the at least one execution dialog node is a dialog node required for replying to the dialog message, and the target dialog node is an initial node in the at least one execution dialog node;
a reply message sending module 940 configured to perform sending the reply message to the terminal.
In some possible designs, the at least one dialogue node is a dialogue node in a graph dialogue structure, and the node information acquisition module includes:
the configuration data receiving submodule is configured to receive page configuration data corresponding to the at least one dialogue node;
a conversation node traversal submodule configured to perform traversal of the at least one conversation node;
and the configuration data conversion sub-module is configured to perform conversion processing on the page configuration data corresponding to the traversed dialogue node to obtain operation trigger information corresponding to the traversed dialogue node.
In some possible designs, the configuration data conversion submodule includes:
the configuration data acquisition unit is configured to execute the step of acquiring input condition configuration data and operation configuration data corresponding to the dialogue input node based on page configuration data corresponding to the dialogue input node under the condition that the traversed dialogue node is the dialogue input node;
the trigger condition conversion unit is configured to execute conversion processing on the input condition configuration data to obtain a trigger condition corresponding to the dialogue input node;
the operation conversion unit is configured to execute conversion processing on the operation configuration data to obtain an operation corresponding to the dialogue input node;
and the node information generating unit is configured to execute operation triggering information corresponding to the dialogue input node according to the triggering condition corresponding to the dialogue input node and the operation corresponding to the dialogue input node.
In some possible designs, the configuration data obtaining unit is further configured to determine, based on the page configuration data corresponding to the judgment node, at least two judgment branches corresponding to the judgment node, and the judgment condition configuration data and the operation configuration data corresponding to each of the at least two judgment branches, in a case where the traversed session node is a judgment node;
the trigger condition conversion unit is further configured to perform conversion processing on the judgment condition configuration data corresponding to each judgment branch to obtain a trigger condition corresponding to each judgment branch;
the operation conversion unit is further configured to perform conversion processing on the operation configuration data corresponding to each judgment branch to obtain an operation corresponding to each judgment branch;
the node information generating unit is further configured to execute an operation corresponding to each judgment branch according to the trigger condition corresponding to each judgment branch and the operation corresponding to each judgment branch, and generate operation trigger information corresponding to the judgment node.
In some possible designs, the configuration data obtaining unit is further configured to, in a case that the traversed dialog node is a default execution dialog node, obtain, based on the page configuration data corresponding to the default execution dialog node, operation configuration data corresponding to the default execution dialog node;
the operation conversion unit is further configured to perform conversion processing on the operation configuration data to obtain an operation corresponding to the default execution dialogue node;
the configuration data conversion sub-module further includes: a trigger condition determination unit configured to perform determination of an automatic trigger condition as a trigger condition corresponding to the default execution dialogue node;
the node information generating unit is further configured to execute operations corresponding to the default execution dialogue node according to the automatic trigger condition and the default execution dialogue node, and generate operation trigger information corresponding to the default execution dialogue node.
In some possible designs, the configuration data obtaining unit is further configured to determine, based on the page configuration data corresponding to the slot filling node, at least one slot corresponding to the slot filling node, and slot filling condition configuration data and operation configuration data corresponding to each slot in the at least one slot, when the traversed session node is a slot filling node;
the trigger condition conversion unit is further configured to perform conversion processing on the slot filling condition configuration data corresponding to each slot position to obtain a trigger condition corresponding to each slot position;
the operation conversion unit is further configured to perform conversion processing on the operation configuration data corresponding to each slot position to obtain an operation corresponding to each slot position;
the node information generating unit is further configured to execute operations corresponding to each slot position according to the triggering condition corresponding to each slot position and each slot position, and generate operation triggering information corresponding to the slot filling node.
In some possible designs, the reply message generation module includes:
an execution dialog node determination submodule configured to perform, in a case where the dialog message satisfies the target trigger condition, determining the target dialog node as a current execution dialog node and determining the target trigger condition as a current execution trigger condition;
the operation execution sub-module is configured to execute the operation corresponding to the current execution trigger condition to obtain an operation result;
the execution dialogue node updating submodule is configured to re-determine a next dialogue node corresponding to the current execution dialogue node in the graph dialogue structure as a current execution dialogue node under the condition that the operation result does not include the reply message;
and the execution trigger condition determining submodule is configured to execute the trigger condition corresponding to the operation result in the trigger condition corresponding to the currently executed dialog node, re-determine the trigger condition as the currently executed trigger condition, and start execution from the operation executing submodule until the operation result comprises the reply message.
In some possible designs, the at least one conversation node is a conversation node in a tree-shaped conversation structure, and the node information obtaining module includes:
the configuration data receiving submodule is configured to execute receiving of page configuration data corresponding to the conversation nodes in the tree-shaped conversation structure, and the tree-shaped conversation structure comprises a root conversation node and sub conversation nodes;
a conversation node classification submodule configured to perform determining the root conversation node and at least one set of child conversation nodes according to the tree conversation structure, each set of child conversation nodes in the at least one set of child conversation nodes including child conversation nodes corresponding to a same parent conversation node;
the root node information conversion submodule is configured to execute conversion processing on the page configuration data corresponding to the root session node to obtain operation trigger information corresponding to the root session node;
a node set traversal submodule configured to perform traversal of the at least one sub-dialog node set;
and the sub-node information conversion sub-module is configured to perform conversion processing on page configuration data corresponding to each sub-dialogue node in the traversed sub-dialogue node set to obtain operation trigger information corresponding to the traversed sub-dialogue node set, wherein the operation trigger information corresponding to the traversed sub-dialogue node set is the operation trigger information corresponding to each sub-dialogue node.
In some possible designs, the page configuration data corresponding to the root session node includes admission condition configuration data and operation configuration data corresponding to the root session node, and the root node information conversion sub-module includes:
the trigger condition conversion unit is configured to execute conversion processing on the admission condition configuration data to obtain a trigger condition corresponding to the root session node;
the operation conversion unit is configured to execute conversion processing on the operation configuration data to obtain an operation corresponding to the root session node;
and the root node information generating unit is configured to execute the operation according to the triggering condition corresponding to the root dialogue node and the operation corresponding to the root dialogue node and generate the operation triggering information corresponding to the root dialogue node.
In some possible designs, the child node information conversion sub-module includes:
the sub-node configuration data determining unit is configured to execute the steps of determining admission condition configuration data and operation configuration data corresponding to each sub-conversation node based on page configuration data corresponding to each sub-conversation node;
the trigger condition conversion unit is configured to execute conversion processing on the admission condition configuration data corresponding to each sub-dialogue node to obtain a trigger condition corresponding to each sub-dialogue node;
the operation conversion unit is configured to perform conversion processing on operation configuration data corresponding to each sub-dialogue node to obtain an operation corresponding to each sub-dialogue node;
and the child node information generating unit is configured to execute operation triggering information corresponding to the traversed child dialogue node set based on the triggering condition corresponding to each child dialogue node and the operation corresponding to each child dialogue node.
In some possible designs, the reply message generation module includes:
an execution dialogue node determination submodule configured to determine the target dialogue node as an execution dialogue node and determine the target trigger condition as an execution trigger condition if the dialogue message satisfies the target trigger condition;
and the operation execution sub-module is configured to execute the operation corresponding to the execution trigger condition to obtain the reply message.
To sum up, according to the technical scheme provided by the embodiment of the present disclosure, the page configuration data corresponding to the session node is converted into the operation trigger information including the trigger condition and the corresponding operation, so that the general conversion of the session node configuration data can be realized.
It should be noted that, when the apparatus provided in the foregoing embodiment implements the functions thereof, the division of each functional module is merely used as an example, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments for details, which are not described herein again.
Fig. 10 is a block diagram illustrating an electronic device for dialog processing, which may be a terminal, according to an exemplary embodiment, and an internal structure thereof may be as shown in fig. 10. The electronic device comprises a processor, a memory, a network interface, a display screen and an input device which are connected through a system bus. Wherein the processor of the electronic device is configured to provide computing and control capabilities. The memory of the electronic equipment comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program to run on the non-volatile storage medium. The network interface of the electronic device is used for connecting and communicating with an external terminal through a network. The computer program is executed by a processor to implement a dialog processing method. The display screen of the electronic equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the electronic equipment, an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in fig. 10 is a block diagram of only a portion of the structure associated with the disclosed aspects and does not constitute a limitation on the electronic devices to which the disclosed aspects apply, and that a particular electronic device may include more or fewer components than shown in the figures, or combine certain components, or have a different arrangement of components.
In an exemplary embodiment, there is also provided an electronic device including: a processor; a memory for storing the processor-executable instructions; wherein the processor is configured to execute the instructions to implement a dialog processing method as in the embodiments of the present disclosure.
In an exemplary embodiment, there is also provided a computer-readable storage medium in which instructions, when executed by a processor of an electronic device, enable the electronic device to perform a dialog processing method in an embodiment of the present disclosure.
In an exemplary embodiment, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the dialog processing method in the embodiments of the present disclosure.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above may be implemented by hardware instructions of a computer program, which may be stored in a non-volatile computer-readable storage medium, and when executed, the computer program may include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), rambus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims (14)
1. A method for processing a conversation, the method comprising:
receiving a dialogue message sent by a terminal;
acquiring operation trigger information corresponding to at least one session node, wherein the operation trigger information corresponding to each session node in the at least one session node is generated based on page configuration data conversion corresponding to each session node, and the operation trigger information corresponding to each session node comprises a trigger condition corresponding to each session node and an operation corresponding to the trigger condition;
under the condition that the dialogue message meets a target trigger condition corresponding to a target dialogue node, executing operation corresponding to the execution trigger condition based on the execution trigger condition corresponding to at least one execution dialogue node to obtain a reply message corresponding to the dialogue message, wherein the at least one execution dialogue node is a dialogue node required for replying the dialogue message, and the target dialogue node is an initial node in the at least one execution dialogue node;
and sending the reply message to the terminal.
2. The method according to claim 1, wherein the at least one session node is a session node in a graph session structure, and the obtaining operation trigger information corresponding to the at least one session node comprises:
receiving page configuration data corresponding to the at least one dialogue node;
traversing the at least one conversation node;
and converting the page configuration data corresponding to the traversed session node to obtain operation trigger information corresponding to the traversed session node.
3. The method according to claim 2, wherein the converting the page configuration data corresponding to the traversed session node to obtain the operation trigger information corresponding to the traversed session node includes:
under the condition that the traversed dialog node is a dialog input node, acquiring input condition configuration data and operation configuration data corresponding to the dialog input node based on page configuration data corresponding to the dialog input node;
converting the input condition configuration data to obtain a trigger condition corresponding to the dialogue input node;
converting the operation configuration data to obtain an operation corresponding to the conversation input node;
and generating operation triggering information corresponding to the dialogue input node according to the triggering condition corresponding to the dialogue input node and the operation corresponding to the dialogue input node.
4. The method according to claim 2, wherein the converting the page configuration data corresponding to the traversed session node to obtain the operation trigger information corresponding to the traversed session node includes:
determining at least two judgment branches corresponding to the judgment node and judgment condition configuration data and operation configuration data corresponding to each judgment branch in the at least two judgment branches based on page configuration data corresponding to the judgment node under the condition that the traversed conversation node is a judgment node;
converting the judging condition configuration data corresponding to each judging branch to obtain a triggering condition corresponding to each judging branch;
converting the operation configuration data corresponding to each judgment branch to obtain the operation corresponding to each judgment branch;
and generating operation triggering information corresponding to the judgment node according to the triggering condition corresponding to each judgment branch and the operation corresponding to each judgment branch.
5. The method according to claim 2, wherein the converting the page configuration data corresponding to the traversed session node to obtain the operation trigger information corresponding to the traversed session node includes:
under the condition that the traversed dialog node is a default execution dialog node, acquiring operation configuration data corresponding to the default execution dialog node based on page configuration data corresponding to the default execution dialog node;
converting the operation configuration data to obtain an operation corresponding to the default execution dialogue node;
determining an automatic trigger condition as a trigger condition corresponding to the default execution dialogue node;
and generating operation triggering information corresponding to the default execution dialogue node according to the automatic triggering condition and the operation corresponding to the default execution dialogue node.
6. The method according to claim 2, wherein the converting the page configuration data corresponding to the traversed session node to obtain the operation trigger information corresponding to the traversed session node includes:
under the condition that the traversed session node is a slot filling node, determining at least one slot position corresponding to the slot filling node and slot filling condition configuration data and operation configuration data corresponding to each slot position in the at least one slot position based on page configuration data corresponding to the slot filling node;
converting the slot filling condition configuration data corresponding to each slot position to obtain a triggering condition corresponding to each slot position;
converting the operation configuration data corresponding to each slot position to obtain an operation corresponding to each slot position;
and generating operation triggering information corresponding to the slot filling node according to the triggering condition corresponding to each slot position and the operation corresponding to each slot position.
7. The method according to any one of claims 2 to 6, wherein, in a case that the dialog message satisfies a target trigger condition corresponding to a target dialog node, based on an execution trigger condition corresponding to at least one execution dialog node, executing an operation corresponding to the execution trigger condition to obtain a reply message corresponding to the dialog message, includes:
under the condition that the dialogue message meets the target trigger condition, determining the target dialogue node as a current execution dialogue node, and determining the target trigger condition as a current execution trigger condition;
executing the operation corresponding to the current execution trigger condition to obtain an operation result;
under the condition that the operation result does not comprise the reply message, re-determining a next dialog node corresponding to the currently-executed dialog node in the graph dialog structure as the currently-executed dialog node;
and re-determining the trigger condition corresponding to the operation result in the trigger conditions corresponding to the currently executed dialog node as the currently executed trigger condition, and starting to execute the step of obtaining the operation result from the execution of the operation corresponding to the currently executed trigger condition until the operation result comprises the reply message.
8. The method according to claim 1, wherein the at least one session node is a session node in a tree-shaped session structure, and the obtaining operation trigger information corresponding to the at least one session node comprises:
receiving page configuration data corresponding to a dialog node in the tree-shaped dialog structure, wherein the tree-shaped dialog structure comprises a root dialog node and a sub-dialog node;
determining the root dialog node and at least one sub dialog node set according to the tree dialog structure, wherein each sub dialog node set in the at least one sub dialog node set comprises sub dialog nodes corresponding to the same parent dialog node;
converting the page configuration data corresponding to the root session node to obtain operation triggering information corresponding to the root session node;
traversing the at least one set of sub-dialog nodes;
and converting the page configuration data corresponding to each sub-dialogue node in the traversed sub-dialogue node set to obtain operation trigger information corresponding to the traversed sub-dialogue node set, wherein the operation trigger information corresponding to the traversed sub-dialogue node set is the operation trigger information corresponding to each sub-dialogue node.
9. The method according to claim 7, wherein the page configuration data corresponding to the root session node includes admission condition configuration data and operation configuration data corresponding to the root session node, and the converting the page configuration data corresponding to the root session node to obtain the operation trigger information corresponding to the root session node includes:
converting the admission condition configuration data to obtain a triggering condition corresponding to the root session node;
converting the operation configuration data to obtain an operation corresponding to the root session node;
and generating operation triggering information corresponding to the root dialogue node according to the triggering condition corresponding to the root dialogue node and the operation corresponding to the root dialogue node.
10. The method according to claim 7, wherein the converting the page configuration data corresponding to each sub-session node in the traversed sub-session node set to obtain the operation trigger information corresponding to the traversed sub-session node set includes:
determining admission condition configuration data and operation configuration data corresponding to each sub-dialogue node based on page configuration data corresponding to each sub-dialogue node;
converting admission condition configuration data corresponding to each sub-dialogue node to obtain a triggering condition corresponding to each sub-dialogue node;
converting the operation configuration data corresponding to each sub-dialogue node to obtain the operation corresponding to each sub-dialogue node;
and generating operation trigger information corresponding to the traversed sub-dialogue node set based on the trigger condition corresponding to each sub-dialogue node and the operation corresponding to each sub-dialogue node.
11. The method according to any one of claims 8 to 10, wherein, in a case that the dialog message satisfies a target trigger condition corresponding to a target dialog node, based on an execution trigger condition corresponding to at least one execution dialog node, executing an operation corresponding to the execution trigger condition to obtain a reply message corresponding to the dialog message, includes:
under the condition that the dialogue message meets the target trigger condition, determining the target dialogue node as an execution dialogue node, and determining the target trigger condition as an execution trigger condition;
and executing the operation corresponding to the execution trigger condition to obtain the reply message.
12. A conversation processing apparatus, comprising:
a dialogue message receiving module configured to execute a dialogue message transmitted by a receiving terminal;
the node information acquisition module is configured to execute operation trigger information corresponding to at least one session node, wherein the operation trigger information corresponding to each session node in the at least one session node is generated based on page configuration data conversion corresponding to each session node, and the operation trigger information corresponding to each session node comprises a trigger condition corresponding to each session node and an operation corresponding to the trigger condition;
the reply message generation module is configured to execute, when the dialogue message meets a target trigger condition corresponding to a target dialogue node, an operation corresponding to the execution trigger condition based on an execution trigger condition corresponding to at least one execution dialogue node, so as to obtain a reply message corresponding to the dialogue message, wherein the at least one execution dialogue node is a dialogue node required for replying the dialogue message, and the target dialogue node is an initial node in the at least one execution dialogue node;
a reply message sending module configured to execute sending the reply message to the terminal.
13. An electronic device, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the dialog processing method of any of claims 1 to 11.
14. A computer-readable storage medium, wherein instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the conversation processing method of any one of claims 1 to 11.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211067739.5A CN115495562A (en) | 2022-09-01 | 2022-09-01 | Dialogue processing method, dialogue processing device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211067739.5A CN115495562A (en) | 2022-09-01 | 2022-09-01 | Dialogue processing method, dialogue processing device, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115495562A true CN115495562A (en) | 2022-12-20 |
Family
ID=84468811
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211067739.5A Pending CN115495562A (en) | 2022-09-01 | 2022-09-01 | Dialogue processing method, dialogue processing device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115495562A (en) |
-
2022
- 2022-09-01 CN CN202211067739.5A patent/CN115495562A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108304201B (en) | Object updating method, device and equipment | |
US20160034558A1 (en) | Generating a clustering model and clustering based on the clustering model | |
CN108521858A (en) | The device identifier relevant operation processing of packet-based data communication | |
CN111400518A (en) | Method, device, terminal, server and system for generating and editing works | |
CN113826089A (en) | Contextual feedback with expiration indicators for natural understanding systems in chat robots | |
CN111817984A (en) | Message sending method, device, equipment and storage medium | |
CN115629743A (en) | Service component arranging method, service scheduling method and device, electronic equipment and storage medium | |
CN115328611A (en) | Virtual machine management method, device, server and readable storage medium | |
CN113360300B (en) | Interface call link generation method, device, equipment and readable storage medium | |
CN114385382A (en) | Light application access method and device, computer equipment and storage medium | |
CN118194880A (en) | Method and device for recommending speaking operation based on large model, storage medium and electronic equipment | |
US11645138B2 (en) | Diagnosing and resolving technical issues | |
CN117059095B (en) | IVR-based service providing method and device, computer equipment and storage medium | |
CN117744651A (en) | Method and device for extracting slot position information of language large model fusion NLU | |
CN117216206A (en) | Session processing method and device, electronic equipment and storage medium | |
CN116149632A (en) | Business logic customizing method and device, computer equipment and storage medium | |
CN115495562A (en) | Dialogue processing method, dialogue processing device, electronic equipment and storage medium | |
CN116382640A (en) | Method, device, equipment and storage medium for managing micro-service | |
US20230004555A1 (en) | Automatically and incrementally specifying queries through dialog understanding in real time | |
CN114969299A (en) | Conversation management method and device, computer equipment and storage medium | |
CN109189912A (en) | The update method and device of user's consulting statement library | |
CN116841505A (en) | Index generation method, device, computer equipment and storage medium | |
CN111966506A (en) | Content sharing method based on different application programs and computer equipment | |
CN113906411A (en) | Contextual feedback for natural understanding systems in chat robots | |
CN111275563A (en) | WeChat action-based generation method and system of interpersonal relationship 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 |