Multi-round dialogue management method and device, equipment and storage medium
By generating graphical node controls and receiving code instructions to build chatbot instances, the problem of maintaining rule-based dialogue management systems is solved, user satisfaction and system scalability are improved, and the high accuracy requirements of financial transaction scenarios are met.
Patent Information
- Application Number
- CN202310837387.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-07
- Publication Date
- 2026-01-16
- Estimated Expiration
- 2043-07-07
AI Technical Summary
Rule-based dialogue management systems are difficult to maintain in financial transaction scenarios, leading to reduced user satisfaction. Existing technologies cannot effectively extend and maintain the code, causing the system to fail to meet the high accuracy requirements of serious business scenarios.
By acquiring the state relationships of the dialogue state machine, graphical node controls are generated, and code instructions are received to build chatbot instances. Users can edit and modify condition variables and clarification scripts on the interface, thus achieving scalability and maintainability of dialogue management.
It achieves good scalability and maintainability of the dialogue management system, improves user satisfaction with financial transaction consultation, and meets the high accuracy requirements of serious business scenarios.
Smart Images

Figure CN116821305B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of human-computer interaction, and in particular to a multi-round dialogue management method and device, equipment and a storage medium. BACKGROUND
[0002] In a financial transaction scenario, when a user uses a human-computer multi-round dialogue method for consultation, the next dialogue can be carried out only when the user's intention is confirmed 100%. However, the probability type dialogue management has a failure probability, and the rule type dialogue management ensures the precision rate by sacrificing the recall rate to achieve a precision rate close to 100%.
[0003] Human-computer multi-round dialogue refers to the back-and-forth multi-round dialogue between a person holding a dialogue state and a machine. The core modules for implementing multi-round dialogue on the machine side include natural language understanding (NLU) and dialogue management (DM). The NLU module is responsible for extracting the intention behind the dialogue data input by the user (such as what to do, what not to do), as well as the entity information contained in each intention (such as the specific amount of money, the time), and the context information of the computer system (such as basic information found in the user's account, order records, etc.). The NLU module can "digitize" the user's natural language, making it programmable for the computer to complete the dialogue (such as when the order amount is 300 yuan, telling that adding 100 yuan can enjoy what discount), and the logic completed by the computer here is dialogue management.
[0004] Currently, there are mainly two forms of dialogue management design, namely probability type and rule type. Among them, the probability type has Rasa, convlab, etc. directly using known actual dialogue processes for end-to-end training models. However, for more serious business scenarios (such as bank business handling scenarios), a precision rate close to 100% is required, and such scenarios usually sacrifice the recall rate to ensure the precision rate, that is, in the case where the user's intention cannot be confirmed 100%, the next dialogue is not carried out. Therefore, the probability model with a failure probability is not suitable for serious scenarios, and the dialogue management design in serious business scenarios generally adopts the rule type. However, since it is an open natural language environment, limited rules cannot cover all possible scenarios, resulting in more and more "hardcoded" codes of the rule type dialogue management system without scalability design, so that it eventually cannot be maintained, leading to a decrease in user satisfaction for financial transaction consultation. SUMMARY
[0005] The main purpose of the embodiments of the present application is to provide a multi-round dialogue management method, device, equipment and storage medium, aiming to solve the technical problem that the rule-based dialogue management system is difficult to maintain, and improve the satisfaction of users on financial transaction consultation.
[0006] In a first aspect, the embodiments of the present application provide a multi-round dialogue management method, which comprises the following steps:
[0007] Obtain a state relationship of a dialogue state machine, wherein the state relationship comprises a plurality of state nodes and a jump relationship between the state nodes;
[0008] Generate a plurality of graphical node controls on a product layer interface according to the state relationship, wherein the plurality of node controls correspond to the plurality of state nodes one by one;
[0009] Receive a code instruction corresponding to the node control to construct a dialogue robot instance;
[0010] Receive dialogue data and perform intent analysis on the dialogue data to obtain a dialogue intent;
[0011] When the dialogue intent hits a preset hit condition of the dialogue robot instance, perform multi-round dialogue management according to the code instruction corresponding to the node control in the dialogue robot instance.
[0012] In some embodiments, the code instruction corresponding to each node control comprises a condition variable, and each node control comprises a condition editing control;
[0013] After receiving the code instruction corresponding to the node control, the method further comprises:
[0014] Receive condition information input through the condition editing control;
[0015] Modify the corresponding condition variable in the code instruction according to the condition information.
[0016] In some embodiments, after receiving the code instruction corresponding to the node control, the method further comprises:
[0017] Receive a condition adding instruction for the node control, and newly create a condition editing control in the node control;
[0018] Receive newly added condition information input through the newly created condition editing control, and generate newly added condition code in the code instruction corresponding to the node control according to the newly added condition information.
[0019] In some embodiments, the code instruction corresponding to each node control comprises a clarification rhetoric variable, and each node control further comprises a clarification rhetoric editing control;
[0020] After receiving the code instruction corresponding to the node control, the method further includes:
[0021] receiving a clarification rhetoric input through the clarification rhetoric editing control;
[0022] modifying a corresponding clarification rhetoric variable in the code instruction according to the clarification rhetoric.
[0023] In some embodiments, the generating a plurality of graphical node controls on the product layer interface according to the state relationship includes:
[0024] obtaining a judgment condition type corresponding to the state node;
[0025] generating the graphical node control on the product layer interface according to the judgment condition type.
[0026] In some embodiments, the judgment condition type includes a nested condition type; and the generating the graphical node control on the product layer interface according to the judgment condition type includes:
[0027] when the judgment condition type corresponding to the state node is a nested condition type, generating an outer layer node control and at least one inner layer node control subordinate to the outer layer node control on the product layer interface;
[0028] wherein the outer layer node control includes an outer layer condition editing control, and each of the inner layer node controls includes an inner layer condition editing control.
[0029] In some embodiments, before the obtaining the state relationship of the dialog state machine, the method further includes:
[0030] generating a state node on a specification layer interface;
[0031] receiving operation information of the state node, the operation information including drag operation information, delete operation information, add operation information, jump relationship setting operation information, and state configuration operation information;
[0032] constructing the dialog state machine according to the operation information.
[0033] In a second aspect, an embodiment of the present application provides a multi-round dialogue management device, and the device includes:
[0034] an obtaining module, configured to obtain a state relationship of a dialog state machine, the state relationship including a plurality of state nodes and a jump relationship between the state nodes;
[0035] The generating module is configured to generate a plurality of graphical node controls at a product layer interface according to the state relationship, the plurality of node controls corresponding to the plurality of state nodes one by one.
[0036] The receiving module is configured to receive code instructions corresponding to the node controls to construct a dialog robot instance.
[0037] The intent analysis module is configured to receive dialog data and perform intent analysis on the dialog data to obtain a dialog intent.
[0038] The dialog management module is configured to perform multi-round dialog management according to the code instructions corresponding to the node controls in the dialog robot instance when the dialog intent hits a preset hit condition of the dialog robot instance.
[0039] In a third aspect, an electronic device is provided, including a memory and a processor, the memory storing a computer program or instructions, and the processor implementing the multi-round dialog management method according to the first aspect when executing the computer program or instructions.
[0040] In a fourth aspect, a computer readable storage medium is provided, the computer readable storage medium storing a computer program or instructions, and the computer program or instructions being executed by a processor to implement the multi-round dialog management method according to the first aspect.
[0041] The multi-round dialog management method, device, equipment and storage medium provided by the embodiments of the present application can obtain the state relationship of a dialog state machine, and then generate a plurality of graphical node controls at a product layer interface according to the state relationship, receive code instructions corresponding to the node controls to construct a dialog robot instance for multi-round dialog management, so as to divide the code implementing the multi-round dialog control logic into code instructions corresponding to the plurality of node controls, and when the state in the dialog state machine needs to be modified, the corresponding code instructions can be modified by using the graphical node controls, which can facilitate the extension, maintenance and reuse of the code instructions used for dialog management, so that the dialog management system has good expansibility, and the technical problem that the rule-based dialog management system is difficult to maintain is solved. BRIEF DESCRIPTION OF DRAWINGS
[0042] Figure 1 is a schematic diagram of a dialog system architecture;
[0043] Figure 2 is a flowchart of the multi-round dialog management method provided by the embodiments of the present application;
[0044] Figure 3 is a schematic diagram of a rule layer interface provided by the embodiments of the present application;
[0045] Figure 4 is a schematic diagram of an architecture of a dialogue state machine provided by an embodiment of the present application;
[0046] Figure 5 is a schematic diagram of a product layer interface generating a graphical node control provided by an embodiment of the present application;
[0047] Figure 6 is a schematic diagram of a multi-turn dialogue management device provided by an embodiment of the present application;
[0048] Figure 7 is a schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0049] In order to make the objects, technical solutions and advantages of the present application clearer, the present application is further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application.
[0050] It should be noted that although the functional modules are divided in the device schematic diagram, and the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a manner different from the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification and claims and the above-described drawings are used to distinguish similar objects, and do not necessarily describe a specific order or sequence.
[0051] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present application belongs. The terms used herein are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.
[0052] In order to better understand the technical solutions of the embodiments of the present application, the technical terms involved in the embodiments of the present application will be explained first.
[0053] Natural Language Understanding (NLU), NLU is commonly known as man-machine dialogue. A branch discipline of artificial intelligence. Research on simulating human language communication process with electronic computer, so that computer can understand and use human social natural language such as Chinese and English, realize natural language communication between man and machine, replace part of brain labor of human, including querying data, answering questions, abstracting literature, compiling data and all processing of natural language information.
[0054] Intention recognition: classify the query into the corresponding intention category, determine which domain the question belongs to. The method of intention recognition includes: 1) rule method based on dictionary and template, different intentions have different domain dictionaries, such as book name, song name, product name, etc. According to the matching degree or overlapping degree of user's intention and dictionary to determine; 2) based on machine learning model to distinguish user's intention, through machine learning and deep learning method, train and learn the domain corpus which has been labeled, get the model of intention recognition. After testing set, get the classification of corpus.
[0055] Dialog management (DM): DM controls the process of human-computer dialogue. DM decides the reaction to the user according to the dialogue history information. The most common application is still task-driven multi-round dialogue. Users have clear purposes such as ordering meals and booking tickets. User demand is complex and has many restrictions. It may need to be stated in multiple rounds. On the one hand, users can constantly modify or improve their needs during the dialogue process. On the other hand, when the user's stated needs are not specific or clear enough, the machine can help the user find a satisfactory result by asking, clarifying or confirming.
[0056] Dialogue system: dialogue system is a human-computer interaction system based on dialogue (CUI: Conversational User Interface). Please refer to Figure 1 The dialogue system consists of five main parts: 1) automatic speech recognition (ASR) converts the original speech signal into text information; 2) natural language understanding (NLU) converts the recognized text information into semantic representation that machines can understand; 3) dialog management (DM) determines what action the system should take based on the state of the dialogue. The action here can be understood as what the machine needs to express; 4) natural language generation (NLG) converts system actions into natural language text; 5) text to speech (TTS) converts natural language text into speech output to the user. Of course, the input and output of some dialogue systems may not be speech, but text, so not every dialogue system contains the two modules of automatic speech recognition (ASR) and text to speech (TTS).
[0057] State machine: a directed graph consisting of a set of nodes and a set of corresponding transition functions. A state machine "runs" by responding to a series of events. Each event is within the control of a transition function belonging to the "current" node, where the function's domain is a subset of the nodes. The function returns the "next" (perhaps the same) node. At least one of these nodes must be a final state, at which the state machine stops. A state machine includes four elements, namely, the current state, the condition, the action, and the next state, wherein the current state and the condition are causes, and the action and the next state are effects. Details are as follows: 1) current state: refers to the current state; 2) condition: also known as "event", when a condition is met, an action will be triggered or a state transition will be performed once; 3) action: the action performed after the condition is met. After the action is performed, it can be migrated to a new state, or it can still remain in the original state. Action is not necessary. When the condition is met, no action can be performed, and the state can be directly migrated to a new state; 4) next state: the new state to be migrated after the condition is met. The "next state" is relative to the "current state". Once the "next state" is activated, it becomes a new "current state".
[0058] Slot: a slot is information needed to complete the conversion of the preliminary user intent into an explicit user instruction in the multi-round dialogue process. A slot corresponds to a kind of information needed to be obtained in the processing of a matter. The slot filled with keywords in the user's speech is called a word slot, and the slot filled with user portraits and other scene information is called an interface slot. For example, the user inputs "I will take a train to Shanghai tomorrow". Among them, "tomorrow" and "Shanghai" are filled into the word slots named "departure time" and "destination", respectively, and the current location is filled into the interface slot named "departure place". In essence, a slot group (also referred to as "slot" in the foregoing) corresponds to a kind of information. The same kind of information can have multiple ways of obtaining, that is, the same slot group can correspond to multiple slot filling ways (i.e. "slot position"), and there can be a concept of priority between different slot filling ways. Taking "ticket booking" as an example, the "departure place" slot contains three filling ways, one word slot and two interface slots. Naturally, the priority of the word slot is the highest, followed by the "departure place" implied in the schedule, and then the current location.
[0059] Clarification technique: there is another concept at the same level as the slot group (i.e. a kind of information), which is called a clarification technique. The clarification technique is a question used by the dialogue robot when it wants to obtain a certain information. For example, the clarification technique corresponding to "destination" is "Which place do you want to start from?", and the clarification technique corresponding to "departure time" is "What time do you want to start?". It is obvious that the clarification technique is at the same level as the slot group rather than the slot position.
[0060] Hardcode: a software development practice of embedding data directly into the source code of a program or other executable object, as opposed to obtaining data from an external source or generating it at runtime. Hardcoded data can usually only be modified by editing the source code and recompiling the executable, although changes can be made in memory or on disk using a debugger or a hex editor.
[0061] In a financial transaction scenario, when a user uses a human-computer multi-turn dialogue for consultation, the intention of the user is confirmed at 100%, and the next dialogue can be performed. However, the probability type dialogue management has a failure probability, and the rule type dialogue management ensures the precision rate by sacrificing the recall rate to achieve a precision rate close to 100%.
[0062] At present, the dialogue management design mainly has two forms of probability type and rule type. Among them, the probability type has Rasa, convlab and other models directly trained end to end with known actual dialogue process. However, for more serious business scenarios (such as bank business handling scenarios), a precision rate close to 100% is required, and such scenarios usually sacrifice the recall rate to ensure the precision rate, that is, in the case that the intention of the user cannot be confirmed at 100%, the next dialogue is not performed. Therefore, the probability model with a failure probability is not suitable for serious scenarios, and the dialogue management design in a serious business scenario generally adopts a rule type. However, since it is an open natural language environment, limited rules cannot cover all possible scenarios, resulting in more and more "hardcode" codes of the rule type dialogue management system without scalability design. Since "hardcode" is directly embedded in the program code, it needs to be recompiled every time the information is changed, and if there are such configuration information in multiple program codes, it is also more troublesome to modify, so that the program code of the dialogue management system cannot be maintained in the end, resulting in a decrease in user satisfaction for financial transaction consultation.
[0063] Therefore, the embodiments of the present application provide a multi-turn dialogue management method, device, equipment and storage medium, aiming to solve the technical problem that the rule type dialogue management system is difficult to maintain.
[0064] The multi-turn dialogue management method, device, equipment and storage medium provided by the embodiments of the present application are specifically explained by the following embodiments, and first, the multi-turn dialogue management method in the embodiments of the present application is described.
[0065] The embodiments of the present application can acquire and process related data based on artificial intelligence technology. Among them, artificial intelligence (Artificial Intelligence, AI) is the use of digital computers or digital computer controlled machines to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. Theory, method, technology and application system.
[0066] The artificial intelligence basic technology generally includes technologies such as sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction system, mechatronics, etc. The artificial intelligence software technology mainly includes computer vision technology, robot technology, biometric identification technology, speech processing technology, natural language processing technology, and machine learning / deep learning, etc.
[0067] The multi-turn dialogue management method provided by the embodiments of the present application relates to the technical field of artificial intelligence and human-computer interaction. The multi-turn dialogue management method provided by the embodiments of the present application can be applied to a terminal, can also be applied to a server end, and can also be software running in the terminal or the server end. In some embodiments, the terminal can be a smart phone, a tablet computer, a notebook computer, a desktop computer, etc.; the server end can be configured as an independent physical server, can also be configured as a server cluster or a distributed system composed of multiple physical servers, can also be configured as a cloud server providing basic cloud computing services such as cloud service, cloud database, cloud computing, cloud function, cloud storage, network service, cloud communication, middleware service, domain name service, security service, CDN, and big data and artificial intelligence platform; and the software can be an application implementing the multi-turn dialogue management method, etc., but is not limited to the above forms.
[0068] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in a distributed computing environment, in which tasks are performed by remote processing devices connected by a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media, including storage devices.
[0069] It should be noted that in various specific embodiments of the present application, when relevant processing needs to be performed on data related to the identity or characteristics of the user, such as user information, user behavior data, user history data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of such data will comply with relevant national and regional laws, regulations, and standards. In addition, when the embodiments of the present application need to obtain sensitive personal information of the user, the user's separate permission or separate consent will be obtained through a pop-up window or a jump to a confirmation page, and after obtaining the user's separate permission or separate consent, the necessary user-related data for the normal operation of the embodiments of the present application will be obtained.
[0070] Please refer to Figure 2 , Figure 2 A flowchart of a multi-round dialogue management method provided by an embodiment of the present application. As shown in Figure 2 , the multi-round dialogue management method provided by an embodiment of the present application includes but is not limited to steps S110-S150, which will be introduced one by one below.
[0071] Step S110: Obtain the state relationship of the dialogue state machine, wherein the state relationship includes a plurality of state nodes and the transition relationship between the state nodes.
[0072] It can be understood that the dialogue state machine of the embodiments of the present application can be a finite state machine, which is used to realize the logic control of the multi-round dialogue. Obtaining the state relationship of the dialogue state machine can be understood as obtaining the state nodes included in the state machine and the transition relationship between the state nodes, wherein the transition relationship includes the transition condition and the execution action. For example, Table 1 below is a state transition table of the state machine, which describes the state relationship contained in the state machine.
[0073] Table 1 State transition table
[0074]
[0075] Exemplarily, the dialogue state machine of the embodiments of the present application can be constructed through the following steps S101-S103:
[0076] Step S101: Generate a state node in a specification layer interface.
[0077] Exemplarily, the specification layer interface can be developed through a graphical user interface application development framework. The user can complete the construction of the state machine in the specification layer interface, including adding a state node, editing the judgment logic function corresponding to the state node, setting the transition relationship between the state nodes, etc.
[0078] Step S102: receiving operation information for the state node, the operation information including drag operation information, deletion operation information, addition operation information, jump relationship setting operation information and state configuration operation information.
[0079] It can be understood that the operation information for the state node described herein is an operation instruction input by a user through a keyboard, a mouse, a touch display screen and the like on the specification layer interface.
[0080] For example, the position of the state node on the specification layer interface is adjusted according to the received drag operation information for the state node, for example, the user can move the position of the state node on the specification layer interface through a drag operation, so that the currently dragged state node is located near another state node having a jump relationship.
[0081] For example, the state node in the specification layer interface is deleted according to the received deletion operation information for the state node, for example, the user can click to select the state node on the specification layer interface, and then select "delete", so that the selected state node is deleted.
[0082] For example, a new state node is created on the specification layer interface according to the received addition operation information for the state node, for example, a new state node is generated on the specification layer interface triggered by the user selecting "add state" on the specification layer interface.
[0083] For example, a jump relationship between state nodes is established on the specification layer interface according to the received jump relationship setting operation information for the state node, for example, the user can click to select two state nodes on the specification layer interface, and then set a connection line between the selected two state nodes, so as to represent the jump relationship between the two state nodes through the connection line, and the condition of the jump and the action performed when the jump condition is met can also be configured.
[0084] For example, the judgment logic information of the state node is configured according to the received state configuration operation information for the state node, for example, the user can click to select the state node on the specification layer interface, and then configure the selected state node, including the condition for judging on the current state node, and the action performed when the condition is met or the state node jumped to.
[0085] Step S103: constructing the dialogue state machine according to the operation information.
[0086] According to the received operation information, the construction of the dialogue state machine on the specification layer interface is completed, and then the state relationship of the dialogue state machine is obtained from the constructed dialogue state machine.
[0087] Please refer to Figure 3 , Figure 3FIG. 1 is a schematic diagram of a canonical layer interface provided by an embodiment of the present application. Figure 3 The illustrated dialog state machine includes a plurality of state nodes. In the context of dialog management, a state node can be understood as a dialog state, i.e., which step of the dialog is being performed. Each state node can be composed of one or more instruction blocks. An instruction block can include an if-then judgment logic function, which includes an atomic condition and an atomic action. For example, a user intent hits atomic condition 2 in state 1, and then atomic action 3 and atomic action 4 are executed (the action can be a jump to state 2). An instruction block can also include a script, which can be in an interpreted language (such as groovy for a java-based background and lua for a go-based background), can be arbitrarily complex, and can express any logic, branching, looping, reading and writing variables, initiating an http request, and of course can include a call to a judgment logic function.
[0088] It can be understood that the pre-designed atomic conditions and atomic actions are programmed and organized together to build a multi-round robot. For example, if the input intent "want to eat" satisfies the condition, then trigger the action to return the information "recommend several good restaurants near you".
[0089] Examples of several atomic conditions and atomic actions are described below.
[0090] A) "api_call_res" condition and "send_api" action
[0091] "send_api" is an http request, and "api_call_res" is a condition judgment on the http return content. This mechanism is used for DM to obtain external system information. For example, the user says to recharge 300 yuan, and the DM first queries the marketing system background to find out which discounts correspond to 300 yuan.
[0092] B) "json_path" condition and "set_json" action
[0093] This type of condition and action involves DM variable management. The variable life cycle of the DM is a complete session. There can be multiple variables, and the types can be very rich, so a json is used to express the set of all variables. The action "set_json" is to set the variable value, and the condition "json_path" is to judge the value of the variable.
[0094] C) "slot" condition and "set_slot" action
[0095] This kind of condition and action involves DM slot management. Slot is generally extracted from user question, or set by "set_slot" action. Condition "slot" means judging the value of slot.
[0096] D) "stay_gaps" condition and "gaps_plus_one", "gaps_clear" action This kind of condition and action involves int type variable in DM variable. It supports self-increment "gaps_plus_one", clear "gaps_clear", query "stay_gaps" of this type of variable. "gaps" means counting the number of dialog stay rounds for int type variable.
[0097] E) "is_begin_node" condition and "leave_begin_node" action
[0098] This kind of condition and action involves bool type variable in DM variable. For example, this variable is initially "true" when the first question of the user is received. It becomes "false" after the "leave_begin_node" action is executed (this action is generally configured before the end of each node). "is_begin_node" condition is used to obtain and judge this bool value. This condition indicates that the user question comes from which node (dialog state), which can be called "begin node". The judgment of the begin node is very important in the actual dialog details configuration. For example, some DM implementations only allow the begin node to define the NLU recognition range (filter NLU recognition result according to the range) and collect the user's intent and slot.
[0099] F) "hit_other_bot" condition
[0100] For the overall architecture of the dialog system, after NLU, there are many kinds of robots to execute dialog strategy. These robots will each define their own NLU recognition range to determine whether the user question fits the current dialog state of the robot. DM robot is only one of them, such as FAQ robot, etc. Finally, there is a convergence logic and returns to the user. Then DM perceives whether other robots fit the user question, which can enhance many important scenarios. "hit_other_bot" condition is used to judge this point. For example, DM determines through this condition that the user question fits the FAQ robot. Then DM can be configured not to do jump and other actions, and continue to clarify the current dialog state, such as: 1) Robot: What's your name? (DM clarification); 2) User: Which company are you? (Hit FAQ); 3) Robot: I am XX company. (Answer of FAQ robot); 4) Robot: What's your name? (DM clarifies again, pulls the user back to the task).
[0101] G) "condition_true" condition
[0102] If the condition is "true", several actions in the instruction block are executed unconditionally.
[0103] H) "jump" action
[0104] Indicates a state jump.
[0105] I) "fsm_break" action
[0106] Indicates to stop and return to the user.
[0107] J) "clear_session_data" action
[0108] Indicates to clear state information such as slots, variables, etc.
[0109] K) "speech" action
[0110] Indicates to send a robot speech to the user.
[0111] In one specific example, the user's input intent is to verify identity, and the machine verifies the identity based on the user's answers to height, weight, and the authenticity of the ID card. Among the three pieces of information of height, weight, and ID card, if the user answers correctly any two of them, it is passed, otherwise it is not passed. Based on the above background, the user and the customer service robot may have the following multi-round dialogue scenario:
[0112] User: Verify identity.
[0113] Customer service robot: How tall are you?
[0114] User: Don't say.
[0115] Customer service robot: How heavy are you?
[0116] User: 90.
[0117] Customer service robot: What is your ID card number?
[0118] User: 123XXXXXXX.
[0119] Customer service robot: Identity verification passed.
[0120] The above multi-round dialogue can be implemented by a state machine as shown in Figure 4 The state machine includes "identity verification entry", "determine whether identity verification is passed", "continue business" and other state nodes, and the logic control flow of the state machine can be as follows: Figure 4
[0121] Step 1: The user says "Verify identity", hits the "Verify identity" intent, and enters the "Verify identity entry" dialog state. The first instruction block of this dialog state is executed, a decision is made, and the dialog state "Decision verify identity passed" is jumped to.
[0122] Step 2: The NLU "Verify identity" result of the current user is passed into the CMN (Condition-Matching-Number) function. Since the user did not mention the height, weight, and ID card (i.e., "slot"), the CMN function returns "passed = false" (identity verification failed).
[0123] Step 3: The second instruction block of the "Decision verify identity passed" state is executed. Since "passed = true" is false, no action is taken, and the third instruction block is executed. Since "passed = false" is true, the clarification "How tall are you?" is returned to the user, and the dialog state is kept. Among the three slots that failed, the slot "height" is not asked, and the corresponding clarification is returned. It is recorded that the "height" has been asked.
[0124] Step 4: The user says "No". The second and third steps are executed, resulting in "passed = false" and returning the clarification "How heavy are you?". It is recorded that the "weight" has been asked.
[0125] Step 5: The user says "90". The second and third steps are executed, resulting in "passed = false" (only one of the three slots is mentioned), returning the clarification "What is your ID card number?", and recording that the "ID card" has been asked. It is recorded that "weight = 90" in NLU.
[0126] Step 6: The user says "123". The second and third steps are executed, resulting in "passed = true" (two of the three slots have been mentioned: weight and ID card), returning the clarification as empty, executing the second instruction block, and jumping to the "Continue business" dialog state.
[0127] Step S120: According to the state relationship, a plurality of graphical node controls are generated on the product layer interface, and the plurality of node controls correspond to the plurality of state nodes one by one.
[0128] The embodiment of the present application generates graphical node controls in the product layer interface based on the state relationship of the state machine displayed in the specification layer interface. The number of node controls in the product layer interface is the same as the number of state nodes in the specification layer interface, that is, the plurality of node controls in the product layer interface correspond to the plurality of state nodes in the specification layer interface one by one.
[0129] Please refer to Figure 5 , Figure 5 is a schematic diagram of the embodiment of the present application for generating graphical node controls in the product layer interface. In combination with the state machine shown in Figure 4 , the corresponding graphical node controls generated in the product layer interface can be as shown in Figure 5 , which include the node controls of "identity verification entry", "determine whether the identity verification is passed", and "continue business".
[0130] In some embodiments, the plurality of graphical node controls are generated in the product layer interface according to the state relationship, which is specifically implemented through the following steps S201-S202:
[0131] Step S201: Obtain the judgment condition type corresponding to the state node.
[0132] Step S202: Generate the graphical node control in the product layer interface according to the judgment condition type.
[0133] For example, Figure 4 The "determine whether the identity verification is passed" state node in the example contains the "CMN" function, that is, "determine whether M information has N true", and based on the judgment condition type contained in the state node, the graphical node control corresponding to the "CMN" type is generated in the product layer interface.
[0134] In some embodiments, the judgment condition type includes a nested condition type, and the graphical node control is generated in the product layer interface according to the judgment condition type, including: when the judgment condition type corresponding to the state node is a nested condition type, an outer node control and at least one inner node control subordinate to the outer node control are generated in the product layer interface; wherein the outer node control includes an outer condition editing control, and each inner node control includes an inner condition editing control.
[0135] It should be understood that the nested condition refers to a condition statement in another condition statement. For example, in the "CMN" function, the outer condition is "whether M information has N true", and the inner condition is composed of the judgment condition parameters corresponding to the M information.
[0136] For example, Figure 5In the example, in the node control of "judging whether the identity verification is passed", the outer node control is used to set the value of N, and the inner node control is used to set the condition parameters corresponding to the M information respectively.
[0137] Step S130: receiving a code instruction corresponding to the node control to construct a dialog robot instance.
[0138] It can be understood that the code instruction corresponding to the node control can be configured in the encapsulation layer. The user inputs the code instruction corresponding to each node control in the encapsulation layer interface to form a mapping relationship between the node control and the code instruction. In addition, the code instruction corresponding to the node control has strong reusability, and the code instruction can be saved as a template to be reused in the design of the state machine of other dialog management.
[0139] It can be understood that the code instruction corresponding to each node control includes a condition variable, and each node control includes a condition editing control. After the code instruction corresponding to the node control is received, the method further includes steps S301 and S302:
[0140] Step S301: receiving condition information input through the condition editing control;
[0141] Step S302: modifying the corresponding condition variable in the code instruction according to the condition information.
[0142] It can be understood that the condition editing control is used to modify the condition variable in the code instruction, and the system receives the condition information input through the condition editing control, and then modifies the corresponding condition variable in the code instruction according to the received condition information.
[0143] For example, Figure 5 In the example, the node control of "judging whether the identity verification is passed" has a condition editing control for modifying the value of "N" in the "CMN" function. The current value of "N" is "2". When the condition information for modifying the value of "N" to "1" is received, the condition variable "N" in the code instruction of the "CMN" function is modified to "1".
[0144] In some embodiments, after the code instruction corresponding to the node control is received, the method further includes steps S401-S403:
[0145] Step S401: receiving a condition adding instruction for the node control to newly create a condition editing control in the node control;
[0146] Step S402: receiving newly added condition information input through the newly created condition editing control;
[0147] Step S403: generating a new condition code in the code instruction corresponding to the node control according to the new condition information.
[0148] It can be understood that the user can also add or delete a judgment condition and an action corresponding to the judgment condition for the node control. When receiving the new condition information input by the newly created condition editing control, the system can also generate a new condition code in the code instruction corresponding to the node control according to the pre-set code template.
[0149] For example, for the node control of "judging whether the identity verification is passed", a condition information "mobile phone number" needs to be added. Then the user can select the node control on the product layer interface and select "add condition" to create a condition editing control in the node control, and then input the new condition information "mobile phone number" in the newly created condition editing control, so that the system generates a new condition code for "mobile phone number" according to the new condition information.
[0150] It can be understood that in the process of multiple rounds of dialogue, the robot often needs to return clarification rhetoric, so the code instruction corresponding to the node control can also include a clarification rhetoric variable. Correspondingly, the node control can also include a clarification rhetoric editing control for modifying the corresponding clarification rhetoric variable in the code instruction.
[0151] In some embodiments, after receiving the code instruction corresponding to the node control, the method of the embodiments of the present application further includes the following steps S501 and S502:
[0152] Step S501: receiving a clarification rhetoric input by the clarification rhetoric editing control;
[0153] Step S502: modifying the corresponding clarification rhetoric variable in the code instruction according to the clarification rhetoric.
[0154] In Figure 5 In the example shown, an "clarification rhetoric" input box is also set in each information line, through which the clarification rhetoric can be input, so that the system modifies the corresponding clarification rhetoric variable in the code instruction.
[0155] In some embodiments, the node control can also include a verification interface control for editing the link address of the external interface for verifying whether the user input word slot is correct in the code instruction.
[0156] In Figure 5In the illustrated example, a "verification interface" input box is also provided in each information line, through which an external link for verifying whether the word slot input by the user is correct can be input. For example, for the "height" information, the user's reply information "170" is sent to the external link in the node control, and the verification result returned by the external link is received to determine whether the height information "170" replied by the user is true.
[0157] Step S140: receiving dialogue data and performing intent analysis on the dialogue data to obtain a dialogue intent.
[0158] Step S150: when the dialogue intent hits a preset hit condition of the dialogue robot instance, performing multi-round dialogue management according to the code instructions corresponding to the node control in the dialogue robot instance.
[0159] For example, the received dialogue data of the user is "view business record", and the intent analysis is performed on "view business record" to obtain the need to "verify identity" first, that is, to hit the "verify identity" node of the dialogue robot instance. Figure 5 The "verify identity" node of the dialogue robot instance is logically controlled through the code instructions corresponding to the "verify identity" node, and then jumps from the "verify identity" node to the "determine whether the verification of the identity is passed" node. The "determine whether the verification of the identity is passed" node is logically controlled through the code instructions corresponding to the "determine whether the verification of the identity is passed" node. If it is passed, it jumps to the "continue business" node of the next step, otherwise, it returns the "verification of the identity fails" information to the user.
[0160] The method of the embodiment of the application provides a design idea of a layered multi-round dialogue state machine. The state relationship of the state machine is edited through the bottom "specification layer", the code instructions of each node are edited through the middle "encapsulation layer", and then the graphical node control is generated at the top "product layer". The condition variables, clarification dialogue variables and other information in the code instructions can be configured through the node control, so as to improve the expansion capability of the dialogue system through the product layer, improve the convenience of system maintenance, and avoid long-tail maintenance costs.
[0161] It should be noted that after the construction of the graphical node control of the product layer is completed, the complex configuration of the state machine of the specification layer can be deleted.
[0162] The multi-round dialogue management method provided by the embodiment of the application will be described below in combination with a specific application scenario.
[0163] The embodiment of the application can be applied to identity recognition in a financial transaction scenario. Specifically, dialogue data of a user is received, the dialogue data can be a business inquiry or a business query, intent analysis is performed on the dialogue data of the user, and it is determined that identity recognition is required, the identity recognition includes a name, a gender, and an ID number, if the identity recognition is passed, a reply to the inquiry or query request of the user is given, or a "identity recognition failure" information is returned to the user.
[0164] Based on the hierarchical idea of the embodiment of the application, a rule type DM is designed, which can meet the extremely low threshold front-end interface configuration scenario of the uppermost layer, if the interface is too simple and cannot meet the specific conversation, a high-level configuration interface can be opened downward, under the high-level configuration, the user can almost directly express the dialogue process with the code, and the Turing complete effect of expressing all conversations is achieved. Of course, the advanced interface has high threshold and complex conversation expression, but the complex part in the advanced interface can be continuously extracted into general components on the low threshold product interface through engineering iteration, so that a large and agile dialogue system is obtained.
[0165] Please refer to Figure 6 In some possible embodiments of the application, a multi-round dialogue management device 800 is also provided, which can implement the multi-round dialogue management method described above, and the device 800 includes:
[0166] The acquisition module 801 is configured to acquire a state relationship of a dialogue state machine, the state relationship including a plurality of state nodes and a jump relationship between the state nodes;
[0167] The generation module 802 is configured to generate a plurality of graphical node controls on a product layer interface according to the state relationship, the plurality of node controls corresponding to the plurality of state nodes one by one;
[0168] The receiving module 803 is configured to receive a code instruction corresponding to the node control, to construct a dialogue robot instance;
[0169] The intent analysis module 804 is configured to receive dialogue data and perform intent analysis on the dialogue data, to obtain a dialogue intent;
[0170] The dialogue management module 805 is configured to perform multi-round dialogue management according to the code instruction corresponding to the node control in the dialogue robot instance, when the dialogue intent hits a preset hit condition of the dialogue robot instance.
[0171] It should be noted that the specific implementation of the multi-round dialogue management device provided by the embodiment of the application is basically the same as the specific embodiments of the multi-round dialogue management method described above, and will not be repeated here.
[0172] The embodiment of the present application further provides an electronic device, which comprises a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the multi-round dialogue management method. The electronic device can be any intelligent terminal, such as a tablet computer or a vehicle-mounted computer.
[0173] Please refer to Figure 7 , Figure 7 A structural schematic diagram of an electronic device provided by the embodiment of the present application is shown in FIG. 1. The electronic device comprises:
[0174] The processor 1010 can be implemented in the form of a general central processing unit (CPU), a microprocessor, an application specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute related programs to implement the technical solutions provided by the embodiment of the present application.
[0175] The memory 1020 can be implemented in the form of a read only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1020 can store an operating system and other application programs. When the technical solutions provided by the embodiment of the present application are implemented by software or firmware, the related program codes are stored in the memory 1020 and are called and executed by the processor 1010 to implement the task prediction method of the embodiment of the present application.
[0176] The input / output interface 1030 is used to realize information input and output.
[0177] The communication interface 1040 is used to realize the communication interaction between the device and other devices. The communication can be realized by a wired manner (for example, a USB, a network cable, etc.) or a wireless manner (for example, a mobile network, WIFI, Bluetooth, etc.).
[0178] The bus 1050 is used to transmit information between various components (for example, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040) of the device.
[0179] The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other through the bus 1050 to realize the communication connection between them in the device.
[0180] The embodiment of the application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the multi-round dialogue management method.
[0181] The memory, as a non-transitory computer readable storage medium, can be used to store non-transitory software programs and non-transitory computer executable programs. In addition, the memory can include a high-speed random access memory, and can also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some embodiments, the memory can optionally include a memory remotely arranged relative to the processor, and these remote memories can be connected to the processor through a network. Examples of the above network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0182] The multi-round dialogue management method, device, equipment and storage medium provided by the embodiment of the application can obtain the state relationship of the dialogue state machine, and then generate a plurality of graphical node controls on a product layer interface according to the state relationship, receive code instructions corresponding to the node controls, and construct a dialogue robot instance for multi-round dialogue management, so that the code implementing the multi-round dialogue control logic is divided into code instructions corresponding to the plurality of node controls. When the state in the dialogue state machine needs to be modified, the corresponding code instructions can be modified by using the graphical node controls, and the code instructions used for dialogue management can be conveniently extended, maintained and reused, so that the dialogue management system has good expansibility, and the technical problem that a rule type dialogue management system is difficult to maintain is solved.
[0183] The embodiments described in the embodiments of the application are used to more clearly illustrate the technical solutions of the embodiments of the application, and do not constitute a limitation on the technical solutions provided by the embodiments of the application. Those skilled in the art can know that, with the evolution of technology and the appearance of new application scenarios, the technical solutions provided by the embodiments of the application are also applicable to similar technical problems.
[0184] Those skilled in the art can understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the application, and can include more or fewer steps than the figures shown, or combine certain steps, or different steps.
[0185] The device embodiments described above are only schematic, and the units described as separate components can or can not be physically separate, that is, can be located in one place, or can be distributed on multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the embodiments of the application.
[0186] Those skilled in the art can understand that all or some of the steps in the method disclosed above, the function modules / units in the system and the device can be implemented as software, firmware, hardware or appropriate combination thereof.
[0187] The terms "first", "second", "third", "fourth" and the like in the description of the application and in the claims hereof, if any, 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 use of the terms so termed herein is to be interpreted to only cover the embodiments of the application described herein and not a prior art. Moreover, the terms "comprising", "having", "including", and "containing" are to be construed open-ended terms (i.e., meaning "including, but not limited to,") unless otherwise noted to exclude such terms when equivalent terminology is used. Further, it is to be understood that the use of the term "or" can be used in the "inclusive" sense, meaning "and / or", unless otherwise indicated to be used in the "exclusive" sense, meaning "either / or".
[0188] It should be understood that, in the present application, "at least one" means one or more, and "multiple" means two or more. "And / or" is used to describe the relationship between associated objects, which means that there can be three relationships, for example, "A and / or B" can mean: only A, only B, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects. "At least one of the following" or similar expressions means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b or c can mean: "a", "b", "c", "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0189] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the above units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed objects can be indirect coupling or communication connection through some interfaces, devices or units, and can be electrical, mechanical or other forms.
[0190] The units described as separate components above can or can not be physically separate, and the components shown as units can or can not be physical units, i.e., can be located in one place, or can be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
[0191] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0192] If the integrated unit is realized in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application, essentially or the part that contributes to the prior art, or all or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes multiple instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods of the embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program storage media.
[0193] The preferred embodiments of the embodiments of the present application are described above with reference to the accompanying drawings, and the scope of the rights of the embodiments of the present application is not limited thereto. Any modifications, equivalent replacements and improvements made by those skilled in the art without departing from the scope and essence of the embodiments of the present application shall be within the scope of the rights of the embodiments of the present application.
Claims
1. A multi-turn dialogue management method, characterized in that, The method comprises the following steps: obtain the state relationship of the dialogue state machine, the state relationship comprising a plurality of state nodes and a jump relationship between the state nodes; obtain the judgment condition type corresponding to the state node; when the judgment condition type corresponding to the state node is a nested condition type, generate an outer layer node control and at least one inner layer node control subordinate to the outer layer node control on a product layer interface, wherein the outer layer node control comprises an outer layer condition editing control, and each inner layer node control comprises an inner layer condition editing control; receive a code instruction corresponding to the node control to construct a dialogue robot instance; receive dialogue data and perform intent analysis on the dialogue data to obtain a dialogue intent; when the dialogue intent hits a preset hit condition of the dialogue robot instance, perform multi-round dialogue management according to the code instruction corresponding to the node control in the dialogue robot instance.
2. The multi-turn dialogue management method of claim 1, wherein, The code instruction corresponding to each node control comprises a condition variable, and each node control comprises a condition editing control; after the receiving of the code instruction corresponding to the node control, the method further comprises: receive condition information input through the condition editing control; modify the corresponding condition variable in the code instruction according to the condition information.
3. The multi-turn dialogue management method of claim 1, wherein, after the receiving of the code instruction corresponding to the node control, the method further comprises: receive a condition adding instruction for the node control, and newly create a condition editing control in the node control; receive newly added condition information input through the newly created condition editing control, and generate newly added condition code in the code instruction corresponding to the node control according to the newly added condition information.
4. The multi-turn dialogue management method of claim 1, wherein, The code instruction corresponding to each node control comprises a clarification rhetoric variable, and each node control further comprises a clarification rhetoric editing control; after the receiving of the code instruction corresponding to the node control, the method further comprises: receive clarification rhetoric input through the clarification rhetoric editing control; modify the corresponding clarification rhetoric variable in the code instruction according to the clarification rhetoric.
5. The multi-turn dialogue management method of claim 1, wherein, Before the obtaining of the state relationship of the dialogue state machine, the method further comprises: generate a state node on a specification layer interface; receive operation information of the state node, the operation information comprising drag operation information, deletion operation information, addition operation information, jump relationship setting operation information and state configuration operation information; construct the dialogue state machine according to the operation information.
6. A multi-turn dialogue management apparatus characterized by comprising: The device is used to implement the method in any one of claims 1-5, and the device comprises: an obtaining module, configured to obtain the state relationship of the dialogue state machine, the state relationship comprising a plurality of state nodes and a jump relationship between the state nodes; a generating module, configured to generate a plurality of graphical node controls on a product layer interface according to the state relationship, the plurality of node controls corresponding to the plurality of state nodes one by one; a receiving module, configured to receive a code instruction corresponding to the node control to construct a dialogue robot instance; an intent analysis module, configured to receive dialogue data and perform intent analysis on the dialogue data to obtain a dialogue intent; The dialogue management module is configured to perform multi-round dialogue management according to code instructions corresponding to the node control in the dialogue robot instance when the dialogue intent hits preset hitting conditions of the dialogue robot instance.
7. An electronic device, comprising: A computer readable storage medium having stored thereon computer programs or instructions, which when executed by a processor, implement the method of any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, A computer readable storage medium having stored thereon computer programs or instructions, which when executed by a processor, implement the method of any one of claims 1 to 5.
Citation Information
Patent Citations
Multi-round dialogue processing method and device, electronic equipment and storage medium
CN111753061A
Conversation management method and system, equipment and storage medium
CN111930912A