Conversation interaction method and device, electronic equipment and storage medium

By determining the dialogue interaction example based on the intent search results and interacting with the current and historical dialogue data, the logical errors and reuse difficulty problems caused by manual addition of process branches are solved, and efficient and intelligent dialogue interaction is achieved.

CN119415653APending Publication Date: 2025-02-11IFLYTEK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411513461.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-28
Publication Date
2025-02-11

AI Technical Summary

Technical Problem

In the prior art, manual addition of process branches is prone to logical errors or omissions, resulting in poor dialogue interactions and requires a lot of manual design and maintenance, making it difficult to reuse.

Method used

By obtaining the current dialogue data, determining the corresponding dialogue interaction example based on the intent search results, and performing dialogue interaction based on the dialogue interaction example, the current dialogue data and the historical dialogue interaction data, to achieve intelligent and flexible dialogue interaction switching.

Benefits of technology

It realizes highly applicable and accurate dialogue interaction, reduces the need for manual design and maintenance, improves the flexibility and adaptability of the system, avoids logical errors and omissions, and improves the intelligence level of dialogue interaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119415653A_ABST
    Figure CN119415653A_ABST
Patent Text Reader

Abstract

The invention provides a dialogue interaction method and device, electronic equipment and a storage medium. The method comprises the steps of obtaining current dialogue data; based on an intention retrieval result of the current dialogue data, determining a dialogue interaction example corresponding to the intention retrieval result; and based on the dialogue interaction example, the current dialogue data and the historical dialogue interaction data, performing dialogue interaction. According to the method, the device, the electronic equipment and the storage medium provided by the invention, the dialogue interaction example corresponding to the intention retrieval result is determined through the intention retrieval result of the current dialogue data, so that intelligent and flexible dialogue interaction switching of different interaction types is realized. And dialogue interaction is performed based on the dialogue interaction example, the current dialogue data and the historical dialogue interaction data, so that dialogue interaction with high applicability and accuracy is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of human-computer interaction technology, and in particular to a dialogue interaction method, device, electronic device and storage medium. Background Art

[0002] With the rapid development of artificial intelligence technology, AI-based intelligent interaction technology has been applied to many scenarios such as intelligent customer service. Among them, the dialogue interaction system is the key to improving the efficiency and quality of customer service. These systems usually need to handle multiple types of dialogue tasks, including task-based dialogues, consultation question-and-answer dialogues, and chat dialogues. In multiple rounds of dialogues, the above three types of dialogues often appear alternately. At present, the logic of the dialogue and the switching of different dialogue types are usually controlled based on the process canvas. That is, the process identification node, branch judgment node and other nodes work together to ensure the continuity and efficiency of the dialogue. Among them, the branch judgment node determines the response content or the next step of the dialogue process through preset logical judgment.

[0003] However, manually adding process branches is prone to logical errors or omissions, which will lead to poor dialogue interaction and require a lot of manpower for design and maintenance, making reuse difficult. Summary of the invention

[0004] The present invention provides a dialog interaction method, device, electronic device and storage medium, which are used to solve the defect in the prior art that manually adding process branches is prone to logical errors or omissions, which leads to unsmooth dialog interaction.

[0005] The present invention provides a dialogue interaction method, comprising: Get the current conversation data; Based on the intention retrieval result of the current conversation data, determining a conversation interaction example corresponding to the intention retrieval result; A conversation interaction is performed based on the conversation interaction example, the current conversation data and the historical conversation interaction data.

[0006] According to a dialog interaction method provided by the present invention, the dialog interaction is performed based on the dialog interaction example, the current dialog data and the historical dialog interaction data, including: Based on the current conversation data and the historical conversation interaction data, performing intent recognition on the intent retrieval result to obtain an intent recognition result; Based on the intention recognition result and the dialogue interaction example, a dialogue interaction is performed.

[0007] According to a dialog interaction method provided by the present invention, the dialog interaction is performed based on the intention recognition result and the dialog interaction example, including: If the intention recognition result is not empty, based on the intention recognition result and the dialog interaction example, slot completion is performed on the current dialog data to obtain slot completion interaction data for completing the slot value; Performing a dialog interaction based on the slot completion interaction data to obtain a slot completion result; An operation corresponding to the intention recognition result is performed based on the slot completion result to obtain a query result, and a dialogue interaction is performed based on the query result.

[0008] According to a dialog interaction method provided by the present invention, the dialog interaction is performed based on the intention recognition result and the dialog interaction example, further comprising: When the intention recognition result is empty and the first knowledge question-and-answer interaction is currently being conducted, knowledge guidance is conducted based on the current dialogue data to obtain guidance interaction data, and dialogue interaction is conducted based on the guidance interaction data; When the intention recognition result is empty and the current knowledge question and answer interaction is not the first time, intermediate step reasoning is performed based on the interaction response data of the previous round of knowledge question and answer interaction and the historical dialogue interaction data to obtain intermediate step data, and dialogue interaction is performed based on the intermediate step data.

[0009] According to a conversation interaction method provided by the present invention, performing intent recognition on the intent retrieval result based on the current conversation data and the historical conversation interaction data to obtain the intent recognition result includes: Based on the current conversation data and the historical conversation interaction data, performing intent confirmation on the intent retrieval result to obtain intent recognition interaction data; Based on the user intention reply data of the intention recognition interaction data, an intent recognition result is obtained.

[0010] According to a dialog interaction method provided by the present invention, the dialog interaction is performed based on the dialog interaction example, the current dialog data and the historical dialog interaction data, and then further includes: Get the user response data of the current round; Based on the user reply data, obtaining an interaction interruption judgment result; If the interaction interruption judgment result shows an interruption, a jump dialogue interaction is performed based on the user reply data, and after the jump dialogue interaction ends, a dialogue interaction is performed based on the interactive dialogue data of the current round.

[0011] The present invention also provides a dialog interaction device, comprising: Get unit, get current conversation data; an intention retrieval unit, which determines, based on the intention retrieval result of the current conversation data, a conversation interaction example corresponding to the intention retrieval result; The dialog interaction unit performs dialog interaction based on the dialog interaction example, the current dialog data and the historical dialog interaction data.

[0012] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any one of the above-mentioned conversation interaction methods is implemented.

[0013] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the conversation interaction method described in any one of the above methods is implemented.

[0014] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the above-mentioned dialog interaction methods.

[0015] The conversation interaction method, device, electronic device and storage medium provided by the present invention determine the conversation interaction example corresponding to the intention retrieval result through the intention retrieval result of the current conversation data, thereby realizing intelligent and flexible conversation interaction switching of different interaction types. Conversation interaction is performed based on the conversation interaction example, current conversation data and historical conversation interaction data, thereby realizing highly applicable and accurate conversation interaction. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0017] Figure 1 It is a flowchart of the dialogue interaction method provided by the present invention; Figure 2 It is a schematic diagram of the design of the intelligent body memory module provided by the present invention; Figure 3 It is a flowchart of the dialogue interaction planning method provided by the present invention; Figure 4 is a schematic diagram of a multi-agent collaboration-based dialogue interaction system provided by the present invention; Figure 5 It is a structural schematic diagram of the dialogue interaction device provided by the present invention; Figure 6 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0018] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0019] It should be noted that although the process canvas-based framework provides a certain degree of structured management for the dialogue system, it still has some challenges and limitations, which are specifically manifested in the following aspects: (1) Complex dialogue process design: As the number of dialogue scenarios increases, the manually added process branches will make the logic of the entire system extremely complex. This complexity not only increases the difficulty of maintenance, but may also affect the stability and reliability of the system. Manually adding process branches is prone to logical errors or omissions, which may result in the preset process routes not being fully covered. When the user's dialogue needs do not match any of the preset processes in the system, it will directly affect the user experience and cause the dialogue process to be blocked.

[0020] (2) Low degree of intelligence: In the current system, the degree of manual participation in the control process is relatively high. In order to achieve a good interactive experience, a large amount of manpower is required to design dialogue process branches. This reliance on manpower not only increases operating costs, but also limits the flexibility and adaptability of the system. As user behavior and needs continue to evolve, over-reliance on preset fixed process branches is not flexible enough and difficult to meet users' personalized needs.

[0021] (3) High resource maintenance cost and difficulty in reuse: A large amount of process logic needs to be developed and process resources need to be maintained. This not only involves intensive resource investment in process nodes and branches, but node identification relies on the maintenance of an enumerated intent library, which means that the system's understanding of user input is limited to defined intents and entities. As the conversation scenarios grow and change, the intent library needs to be constantly updated and expanded, which not only increases the cost of resource maintenance, but also increases the difficulty of system reuse and scene migration. In addition, due to the diversity of conversation scenarios, the same semantics may require different response strategies in different contexts, making it difficult for the system to be reused through simple expansion.

[0022] Therefore, the flexibility, adaptability, intelligence and accuracy of multi-round dialogue interaction based on the process canvas framework need to be further improved. In view of this problem, the present invention provides a dialogue interaction method to achieve intelligent, flexible, highly applicable and accurate dialogue interaction. Figure 1 is a flow chart of the dialog interaction method provided by the present invention, such as Figure 1 As shown, the method includes: Step 110, obtaining current conversation data; Specifically, the current user voice can be acquired through a voice pickup device, and the conversation text can be obtained by voice transcription of the user voice, that is, the current conversation data can be acquired. Alternatively, the text data input by the user can be directly acquired as the current conversation data.

[0023] It should be noted that the current conversation data here can be a conversation containing the intention to investigate, such as "Please help me check the balance of my bank card"; it can also be a knowledge question and answer type conversation, such as "Why can't my learning machine connect to the Internet"; it can also be a chat conversation, such as the wake-up word "Xiaofei, Xiaofei".

[0024] Step 120, based on the intention retrieval result of the current conversation data, determining a conversation interaction example corresponding to the intention retrieval result; Here, the intent retrieval result may refer to the candidate inquiry intention in the current conversation data, which may indicate that the user's current conversation data contains the inquiry intention, such as bank card processing and bank card balance inquiry. Generally speaking, inquiry task type conversations involve inquiry intentions, while chat conversations and knowledge question and answer conversations can be considered as not having inquiry intentions. Therefore, the intent retrieval result can be used to reflect the conversation type to which the user's current conversation data belongs. That is, when the intent retrieval result is not empty, the current conversation interaction data may belong to the inquiry task type conversation; when the intent retrieval result is empty, the current conversation interaction data may belong to the consulting question and answer conversation and the chat conversation.

[0025] In addition, the dialogue interaction examples here refer to the interaction instructions corresponding to different interaction types. It should be noted that with the complexity of the instructions, the ability of the large language model to follow long instructions will be greatly reduced. Therefore, the long instructions corresponding to the interaction type can be disassembled, which can be disassembled into intent recognition, slot value extraction, and knowledge question and answer. Therefore, the dialogue interaction examples here can be intent recognition and slot extraction, or interaction instructions corresponding to knowledge questions and answers. Therefore, the dialogue interaction instructions here can be used to instruct the large language model to generate corresponding interaction data according to the general interaction words, so as to conduct dialogue interaction based on the generated interaction data.

[0026] Specifically, the intent retrieval API can be called to perform intent retrieval on the current conversation data. The intent retrieval method here can adopt a retrieval enhancement method to select candidate intents as intent retrieval results. The intent retrieval result here can be empty or contain multiple candidate intents, which can be a candidate list. When there are multiple candidate intents in the current conversation data, the preset candidate intents can be used as intent retrieval results.

[0027] Then, based on the currently obtained intent retrieval results, the dialog interaction examples corresponding to the intent retrieval results can be matched from the pre-built resource library. For example, the API "search_intent_api" corresponding to the intent recognition tool can be called. This API is used to identify and extract relevant candidate intents and parameters corresponding to each candidate intent from the user's current conversation data. The parameters here can include dialog interaction examples corresponding to the candidate intent, slot descriptions, and other information.

[0028] Here, Table 1 is an example table of intent names and dialog interaction examples in the pre-built resource library, as shown in the following table: Table 1

[0029] As can be seen from Table 1, the pre-built resource library can include the intent name, the intent description corresponding to the intent name, the slot name corresponding to the intent name, the plug-in tool corresponding to the intent name, and the conversation interaction example Action corresponding to the intent name. It should be noted that the intent name, intent description, intent example, slot name, and plug-in tool can be stored as keys, and the corresponding conversation interaction examples can be stored as values ​​corresponding to the keys. That is, the resources in the pre-built resource library can be stored in key-value format.

[0030] It is understandable that the dialogue interaction example can be a general instruction, which does not need to be rewritten for each business, and can also provide more detailed execution actions for specific businesses. As a result, the dialogue interaction example can be used as a dynamic task instruction for the dialogue interaction data. By combining the current dialogue data and the historical dialogue interaction data, the intent recognition, slot guidance and extraction, and the query or processing of the business are completed, thereby completing the dialogue interaction. In addition, during the testing phase, the dialogue interaction data can be intervened and adjusted based on the modification of the dialogue interaction example to make the dialogue interaction smoother and more accurate. For example, when there is an error in the intent recognition and additional instruction intervention is required, the information description of the intent or slot can be improved, and the precautions can be noted in the dialogue interaction example.

[0031] It should be noted that when the intent retrieval result is empty, it means that the user's current interaction type is a casual chat conversation, and there is no need to specify a specific conversation interaction example to instruct the large language model to perform a conversation interaction.

[0032] It should also be noted that by using the intent retrieval results of the current conversation data, the conversation interaction examples corresponding to the intent retrieval results are determined, so as to achieve flexible switching to deal with different types of conversation interactions, enhance the ability to understand conversation interactions, improve the interactive experience in complex multi-round conversation scenarios, and avoid poor interactions.

[0033] Step 130: Perform a conversation interaction based on the conversation interaction example, the current conversation data, and the historical conversation interaction data.

[0034] Here, the historical conversation interaction data may include conversation data generated by users and conversation interactions.

[0035] Specifically, the agent can be scheduled to perform collaborative conversation based on conversation examples, current conversation data, and historical conversation data. When the intent search result is empty, a chat-type conversation can be performed based on the scheduled agent or any one of the multiple execution agents. The agent here refers to the one built based on the large language model.

[0036] Figure 2 Schematic diagram of the design of the intelligent memory module provided by the present invention. Figure 2 As shown, the memory module memory1 corresponding to the scheduling agent can be used to store the call instructions for calling each execution agent, as well as the dialogue interaction data (interaction history) between the user and each execution agent. The memory module memory2 for each execution agent can be used to store the dialogue interaction example local_prompt, the dialogue interaction data (interaction history) between the execution agent and the user, and the summary of the unfinished tasks of the execution agent, that is, the unfinished dialogue interaction examples of the execution agent. It should be noted that the interaction history of the scheduling agent is updated synchronously with the interaction history of different execution agents. That is, when executing to a specific agent, if it returns to the previous scheduling agent, the interaction history is shared synchronously. It should be emphasized that the interaction history synchronized between the scheduling agent and each execution agent only includes the outer dialogue between each agent and the user, and does not involve the thinking and planning process inside the agent.

[0037] It is understandable that by reflecting user behavior based on current conversation data and historical conversation interaction data, and reflecting textual business knowledge through current conversation interaction examples, self-driven conversation interaction based on user behavior and business knowledge is achieved. Conversation interaction examples can be used for conversation interactions in applications and multiple scenarios, without the need to manually add process branches for a single conversation scenario, thereby improving the adaptability, quality and adaptability of conversation interactions, while also improving the intelligence level of conversation interactions and reducing dependence on manual work.

[0038] The method provided by the embodiment of the present invention determines the dialogue interaction example corresponding to the intention retrieval result through the intention retrieval result of the current dialogue data, thereby realizing intelligent and flexible dialogue interaction switching of different interaction types. Based on the dialogue interaction example, the current dialogue data and the historical dialogue interaction data, dialogue interaction is performed, realizing highly applicable and accurate dialogue interaction.

[0039] Based on any of the above embodiments, step 130 includes: Based on the current conversation data and the historical conversation interaction data, performing intent recognition on the intent retrieval result to obtain an intent recognition result; Based on the intention recognition result and the dialogue interaction example, a dialogue interaction is performed.

[0040] Here, the historical conversation interaction data may be the content of historical interactive conversations with the user, which can be used to more clearly and accurately understand the interaction intent of the current conversation interaction data. Therefore, the intent recognition result here refers to the user intent reflected by the current conversation data, such as checking bank card balance, credit card bill, etc.

[0041] Specifically, the current conversation data, historical conversation interaction data and intention retrieval results can be input into the intention recognition agent, and the intention recognition agent can perform intention recognition on the current conversation data and historical conversation interaction data. The intention recognition here can be in the form of thinking first and then outputting to obtain the intention recognition result.

[0042] For example, Table 2 is a table of the intention recognition interaction dialogue without intention clarification, as shown in the following table: Table 2

[0043] In Table 2, the history is the dialogue between "Agent1" and the user. Here, "Agent1" can be an agent that performs any task. The current dialogue data is "reporting a lost credit card". "Agent2" represents the intent recognition agent. The content corresponding to Round 1 represents the thinking process and the corresponding conclusion of the intent recognition agent during the intent recognition process.

[0044] Furthermore, after obtaining the intention recognition result, the interactive dialogue type can be further determined based on the intention recognition result, so as to generate corresponding dialogue interaction data according to the dialogue interaction example corresponding to the interactive dialogue type. Conduct dialogue interaction through dialogue interaction data. For example, when the intention recognition result is empty, it means that the user's current interaction intention does not include the interaction of the task type, and it can be regarded as a knowledge question and answer type or a chat type interaction. When the intention recognition result is not empty, it means that the user's current interaction intention is a dialogue interaction of the task type, and then according to the dialogue interaction example corresponding to the task type, the corresponding dialogue interaction data is generated to conduct dialogue interaction.

[0045] Based on any of the foregoing embodiments, the performing a dialogue interaction based on the intention recognition result and the dialogue interaction example includes: If the intention recognition result is not empty, based on the intention recognition result and the dialog interaction example, slot completion is performed on the current dialog data to obtain slot completion interaction data for completing the slot value; Performing a dialog interaction based on the slot completion interaction data to obtain a slot completion result; An operation corresponding to the intention recognition result is performed based on the slot completion result to obtain a query result, and a dialogue interaction is performed based on the query result.

[0046] Specifically, when the intent recognition result is not empty, it means that the user's current interaction type is a task-checking type dialogue. For example, it can be a dialogue interaction for the handling or inquiry of the corresponding business. First, the slot completion agent can be instructed through a dialogue interaction example for slot completion to slot-complete the current dialogue data and obtain slot completion interaction data for completing the slot value. For example, the user says "I want to book a flight ticket for tomorrow." The slot corresponding to this intent recognition result includes the destination and the departure place, but the corresponding slot value is not detected in the user's current dialogue data. Therefore, based on the dialogue interaction example of slot completion, slot completion interaction data for completing missing slot values ​​can be generated to fill in the missing slot information. An example of slot completion interaction data is "Which city are you flying to?"

[0047] Then, based on the slot completion interaction data, a dialogue interaction is conducted with the user, and the slot completion result can be extracted from the user's reply data. For example, if the user answers "I want to go from Shanghai to Beijing", the slot completion result can be that the destination is Beijing and the departure place is Shanghai. Finally, the query and handling result can be obtained by performing a business query and handling operation corresponding to the intent recognition result on the slot completion result. The query and handling result is used as dialogue data for dialogue interaction. For example, the ticket query interface can be called to query tomorrow's tickets from Shanghai to Beijing, and the ticket query information can be returned to the user as interaction data.

[0048] Based on the method provided in the embodiment of the present invention, when the intent recognition result is not empty, the current dialogue data is slot-completed based on the intent recognition result and the dialogue interaction example to obtain slot-completed interaction data for completing the slot value, and a dialogue interaction is performed based on the slot-completed interaction data to obtain a slot-completed result; based on the slot-completed result, an operation corresponding to the intent recognition result is performed to obtain a query result, and a dialogue interaction is performed based on the query result, thereby ensuring that all necessary slot information corresponding to the user's intent recognition result is collected to complete the user's request, making information collection more efficient and accurate, and improving the user's interactive experience.

[0049] Based on any of the foregoing embodiments, the performing a dialogue interaction based on the intention recognition result and the dialogue interaction example further includes: When the intention recognition result is empty and the first knowledge question-and-answer interaction is currently being conducted, knowledge guidance is conducted based on the current dialogue data to obtain guidance interaction data, and dialogue interaction is conducted based on the guidance interaction data; When the intention recognition result is empty and the current knowledge question and answer interaction is not the first time, intermediate step reasoning is performed based on the interaction response data of the previous round of knowledge question and answer interaction and the historical dialogue interaction data to obtain intermediate step data, and dialogue interaction is performed based on the intermediate step data.

[0050] Here, the guided interaction data refers to the first step used to summarize the entire interaction process or point to the interaction content, so as to instruct the user to start performing corresponding operations according to the interaction content. In addition, the intermediate step data here refers to the interaction content used for distributed execution, which can be regarded as the decomposed steps in the total reply data corresponding to the current dialogue data.

[0051] Specifically, when the intention recognition result is empty, it means that the user's interaction intention does not include the intention to query or handle business, and it can be regarded as knowledge quiz or small talk. It should be explained that when it is identified as small talk, the dialogue interaction can be carried out based on the current dialogue data and historical dialogue data, without the need for interaction planning, and the dialogue interaction can be carried out according to the corresponding dialogue interaction example.

[0052] Therefore, when the intention recognition result is empty and the first knowledge question and answer interaction is currently being conducted, knowledge guidance can be performed based on the current dialogue data and the knowledge retrieval method to obtain guidance interaction data. Then, by using the guidance interaction data as the interaction content, a dialogue interaction is conducted with the user, and the interaction response data of the user interacting with the guidance interaction data is received. The next round of interactive dialogue is started, that is, when the intention recognition is empty and the current knowledge question and answer interaction is not the first time, the knowledge retrieval method is applied to perform intermediate step reasoning through the interaction response data of the previous round of knowledge question and answer interaction and the historical dialogue interaction data to obtain the intermediate step data, so as to ensure that the intermediate step data is more in line with the user's current needs and situations, while also avoiding the trouble caused by providing too much information to the user at one time. Then, a dialogue interaction is conducted based on the intermediate step data until the question raised by the user is solved. In one embodiment, Table 3 is an interactive dialogue table of the knowledge question and answer type, as shown in Table 3 below: Table 3

[0053] As shown in Table 3, after receiving the user's current dialogue data "Why does the software on my learning machine always prompt network abnormality", the guided interaction data is obtained in the first round Round1 to instruct the user to check whether the device system time has been changed. Then, in the subsequent rounds of interaction, the user is interacted with through the intermediate step data to instruct the user to step by step follow the intermediate step data until the problem is finally solved. It can be understood that in product after-sales service, troubleshooting knowledge is executed step by step. For example, the entire execution steps corresponding to the problem "The learning machine application prompts network abnormality" are "Step 1: Check whether the device system time has been changed (Settings-Date and Time-Turn on automatic date and time determination) to ensure that it is consistent with Beijing time; Step 2: Shut down and restart; Step 3: Turn off the router and wait for 15 minutes before turning it on again; Step 4: Please ignore the network, confirm the password and re-enter, and restart the learning machine Step 5: Troubleshooting is invalid and guide after-sales processing". If all the execution steps are output at once, it will be difficult for users to complete the troubleshooting of key information in a short time, reducing the success rate of self-service.

[0054] It should be noted that the guided interaction data and intermediate step data are obtained based on the knowledge retrieval method. The knowledge retrieval here can be achieved through the following methods: First, multi-source information collection and editing: integrate data from different sources, such as web pages, databases, documents, etc., and extract key information through natural language processing technology. By breaking down long documents into smaller text blocks, such as titles and content or FAQ (Frequently Asked Questions) titles and answers, it is easier to manage and retrieve. Then, indexing: create an index based on the disassembled text blocks to support efficient retrieval operations. The index can be a keyword index, a full-text index, and a vector retrieval using semantic word embeddings technology; finally, knowledge retrieval: based on technologies such as vector retrieval, calculate the semantic similarity between the user query and the documents in the index, and retrieve the top N most relevant results.

[0055] In addition, if the user's problem is still not solved after a series of dialogue interactions, some general solutions can be provided or the user can be advised to take other measures, such as contacting technical support.

[0056] The method provided in the embodiment of the present invention distinguishes the dialogue interaction type as knowledge question and answer interaction based on the intention recognition result to ensure smooth dialogue interaction. In addition, in the process of knowledge question and answer interaction, dialogue interaction is conducted by guiding interaction data and intermediate step data, that is, "total score" dialogue interaction, which can interact with users more effectively and gradually guide users to solve problems instead of providing lengthy answers at one time. This not only improves the user's dialogue interaction experience, but also makes the user problem solving process more efficient.

[0057] Based on any of the above embodiments, Figure 3 is a flow chart of the method for planning a dialog interaction provided by the present invention, such as Figure 3 As shown, the method includes: First, call the intent search tool to perform intent search on the current conversation data and determine whether the intent search result is empty. If the intent search result is empty, call the knowledge search API to perform knowledge search on the current conversation data and call the knowledge question and answer agent for conversation interaction. If the intent search result is not empty, call the intent recognition agent to perform intent recognition on the intent search result. Determine whether the intent recognition result is empty. If the intent recognition result is empty, call the knowledge search API to perform knowledge search on the current conversation data and call the knowledge question and answer agent for conversation interaction. If the intent recognition result is not empty, determine whether there is a slot in the intent recognition result. If there is no slot, call the tool and call the business system plug-in API to query and complete the conversation interaction. If there is a slot, call the slot extraction agent to complete the slot to extract the slot completion result. Then, call the tool and call the business system plug-in API to query and complete the conversation interaction.

[0058] Based on any of the above embodiments, the performing intent recognition on the intent retrieval result based on the current conversation data and the historical conversation interaction data to obtain the intent recognition result includes: Based on the current conversation data and the historical conversation interaction data, performing intent confirmation on the intent retrieval result to obtain intent recognition interaction data; Based on the user intention reply data of the intention recognition interaction data, an intent recognition result is obtained.

[0059] Specifically, in real business conversations, intent recognition often faces many complex situations such as the user's statement is ambiguous and needs clarification and guidance, or there are multiple intentions. Therefore, the intent recognition agent can generate intent recognition interaction data for confirming the intent retrieval results, and conduct dialogue interaction based on the intent recognition interaction data. Therefore, the final intent recognition result can be obtained based on the user intent reply data corresponding to the intent recognition interaction data. For example, Table 4 is an intent recognition interaction dialogue table in the case of intent clarification, as shown in the following table: Table 4

[0060] As shown in Table 4, when the current dialogue data is "Consult me ​​about a credit card issue", there is an ambiguous intent when performing intent recognition. In this case, the intent retrieval result can be confirmed by clarifying the intent, and the intent recognition interaction data can be obtained: "Excuse me, do you want a credit card or a credit card application? Please explain your question in detail" to perform a dialogue interaction. Then, based on the user's reply "Report a lost credit card", the final intent recognition result is determined to be "Report a lost credit card".

[0061] The method provided by the embodiment of the present invention, in the process of determining the intention recognition result, performs intent confirmation on the intention retrieval result through the current dialogue data and the historical dialogue interaction data to obtain the intention recognition interaction data, performs dialogue interaction based on the intention recognition interaction data, and obtains the intention recognition result with the user intention reply data based on the intention recognition interaction data, thereby realizing the dialogue interaction suitable for the intention clarification guidance process, obtaining the accurate intention recognition result, and realizing the intention confirmation in the case of ambiguous intention.

[0062] Based on any of the above embodiments, after step 130, the following steps may be further performed: Get the user response data of the current round; Based on the user reply data, obtaining an interaction interruption judgment result; If the interaction interruption judgment result shows an interruption, a jump dialogue interaction is performed based on the user reply data, and after the jump dialogue interaction ends, a dialogue interaction is performed based on the interactive dialogue data of the current round.

[0063] Specifically, in any current round of interaction, after interacting based on the current round of dialogue interaction data, obtain the user reply data of the current round. Then, the user reply data can be used to identify the intent. When the reply intent is inconsistent with the intent recognition result of the current round, the judgment result of the interaction interruption of the current round is that there is an interruption; when the reply intent is consistent with the intent recognition result of the current round, the judgment result of the interaction interruption of the current round is that there is no interruption. In detail, a field can be set in each dialogue interaction to indicate whether there is an abnormal interruption in the current task and whether the current task has ended. For example, after each dialogue interaction is performed, the normal dialogue ends, which can be used<task_end = True> If the conversation is interrupted, then<task_break = True> , otherwise it is false.

[0064] Furthermore, in the case where the result of the interaction interruption judgment shows an interruption, a jump dialogue interaction corresponding to the reply intention is performed based on the user reply data. After the jump dialogue interaction is ended, the dialogue interaction is continued based on the non-interaction dialogue data after the current round. For example, in the dialogue interaction process of intent confirmation in intent recognition, the slot completion interaction process, and the knowledge question and answer interaction process, there may be problems where users often do not follow the process to reply to questions. For example, the user will avoid talking about the guide and insert other business topics, so it is necessary to interrupt the current task and give priority to answering the latest questions, that is, give priority to answering the questions corresponding to the reply intention. After the jump dialogue interaction is ended, the dialogue interaction can then continue based on the interactive dialogue data at the time of the interruption.

[0065] For example, Table 5 is a table of dialogue interactions with abnormal interruptions, as shown in the following table: Table 5

[0066] Among them, Agent1 represents the scheduling agent, Agent2 represents the intent recognition agent, and Agent3 represents the slot completion agent. As can be seen from Table 5, in the historical dialogue, when Agent2 is used to conduct the dialogue interaction for intent confirmation, the user's reply data does not directly reply whether it is credit card processing or credit card loss reporting. Therefore, it can be judged that the current dialogue interaction has been abnormally interrupted, and the dialogue interaction is jumped based on the user's reply data "How do I know if the money is missing if the credit card is lost". In detail, the dialogue interaction can be planned by scheduling the agent Agent1, scheduling the intent recognition agent Agent2 for intent recognition, and scheduling the slot completion agent Agent3 for slot completion dialogue interaction based on the intent recognition result. After the dialogue interaction is conducted based on the bill query result, that is, after the jump dialogue interaction is completed, then, the dialogue interaction continues based on the interactive dialogue data when the interruption occurs, that is, the intention recognition agent Agent2 continues to ask the user "Do you want to report the loss of your credit card?"

[0067] The method provided by the embodiment of the present invention determines the interaction interruption based on the user reply data of the current round during the dialogue interaction process, and preferentially executes the jump dialogue interaction. After completing the challenge dialogue interaction, the current round of interactive dialogue is continued to achieve smooth and complete dialogue interaction, thereby providing users with more appropriate dialogue interaction.

[0068] Based on any of the above embodiments, Figure 4 is a schematic diagram of a multi-agent collaborative dialogue interaction system provided by the present invention, such as Figure 4As shown in the figure, the multi-agent includes a task scheduling agent, a task execution agent, the memory modules of each agent, and business tools, such as a calculator, a search tool, a code executor, a database query tool, and a business system docking interface. The task execution agent includes an intent recognition agent, a slot agent, and a knowledge question and answer agent. Among them, the memory module of each agent is used to store historical dialogues and historical instructions. The task scheduling agent is used to plan tasks based on the React method, Thought ->Action->Observation -...->Finish, that is, through a series of thinking, action, observation and other steps until the planning is completed. Among them, Thought is used to think about what should be done next; Action represents the action to be performed, which is mainly the plug-in tool defined in the task execution agent or Tool; Observation is used to return the final result of the task execution agent, such as the results of intent recognition and slot extraction, or the call result of the tool.

[0069] It should be noted that through the collaboration of 1 task scheduling agent and N task execution agents, each agent can have independent instruction planning. The planning agent can decompose large tasks into subtasks and perform task scheduling; the task agent will think and reflect on the process of task execution, and decide whether to continue to execute the task, or judge that the task is completed and terminate the operation.

[0070] In addition, each task execution agent can adopt API encapsulation design, that is, by plugging each execution agent into a plug-in for the global task scheduling agent to call. Therefore, the system provided by the embodiment of the present invention supports plug-and-play of plug-ins, improves the flexibility and scalability of the system, reduces the dependence on hard coding, and improves the fluency and automation of dialogue through intelligent components. In addition, the framework of resource and instruction design of each module, as well as the collaboration mechanism between agents, realizes highly integrated large-model task planning.

[0071] Based on any of the above embodiments, Figure 5 is a structural diagram of the dialog interaction device provided by the present invention, such as Figure 5 As shown, the device comprises: An acquisition unit 510 acquires current conversation data; An intention retrieval unit 520, based on the intention retrieval result of the current conversation data, determines a conversation interaction example corresponding to the intention retrieval result; The dialogue interaction unit 530 performs dialogue interaction based on the dialogue interaction example, the current dialogue data and the historical dialogue interaction data.

[0072] The device provided by the embodiment of the present invention determines the dialogue interaction example corresponding to the intention retrieval result through the intention retrieval result of the current dialogue data, thereby realizing intelligent and flexible dialogue interaction switching of different interaction types. Based on the dialogue interaction example, the current dialogue data and the historical dialogue interaction data, the dialogue interaction is carried out, thereby realizing a highly applicable and accurate dialogue interaction.

[0073] Based on any of the above embodiments, the dialog interaction unit is specifically used for: Based on the current conversation data and the historical conversation interaction data, performing intent recognition on the intent retrieval result to obtain an intent recognition result; Based on the intention recognition result and the dialogue interaction example, a dialogue interaction is performed.

[0074] Based on any of the above embodiments, the dialog interaction unit is further configured to: If the intention recognition result is not empty, based on the intention recognition result and the dialog interaction example, slot completion is performed on the current dialog data to obtain slot completion interaction data for completing the slot value; Performing a dialog interaction based on the slot completion interaction data to obtain a slot completion result; An operation corresponding to the intention recognition result is performed based on the slot completion result to obtain a query result, and a dialogue interaction is performed based on the query result.

[0075] Based on any of the above embodiments, the dialog interaction unit is further specifically configured to: When the intention recognition result is empty and the first knowledge question-and-answer interaction is currently being conducted, knowledge guidance is conducted based on the current dialogue data to obtain guidance interaction data, and dialogue interaction is conducted based on the guidance interaction data; When the intention recognition result is empty and the current knowledge question and answer interaction is not the first time, intermediate step reasoning is performed based on the interaction response data of the previous round of knowledge question and answer interaction and the historical dialogue interaction data to obtain intermediate step data, and dialogue interaction is performed based on the intermediate step data.

[0076] Based on any of the above embodiments, the dialog interaction unit is further specifically configured to: Based on the current conversation data and the historical conversation interaction data, performing intent confirmation on the intent retrieval result to obtain intent recognition interaction data; Based on the user intention reply data of the intention recognition interaction data, an intent recognition result is obtained.

[0077] Based on any of the above embodiments, the dialog interaction unit further includes a jump interaction unit, and the jump interaction unit is specifically used to: Get the user response data of the current round; Based on the user reply data, obtaining an interaction interruption judgment result; If the interaction interruption judgment result shows an interruption, a jump dialogue interaction is performed based on the user reply data, and after the jump dialogue interaction ends, a dialogue interaction is performed based on the interactive dialogue data of the current round.

[0078] Figure 6 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 6 As shown, the electronic device may include: a processor 610, a communications interface 620, a memory 630 and a communication bus 640, wherein the processor 610, the communications interface 620 and the memory 630 communicate with each other through the communication bus 640. The processor 610 may call the logic instructions in the memory 630 to execute the conversation interaction method, which includes: obtaining current conversation data; determining a conversation interaction example corresponding to the intention retrieval result based on the intention retrieval result of the current conversation data; and performing conversation interaction based on the conversation interaction example, the current conversation data and the historical conversation interaction data.

[0079] In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0080] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the conversation interaction method provided by the above-mentioned methods, which method includes: obtaining current conversation data; based on the intention retrieval result of the current conversation data, determining a conversation interaction example corresponding to the intention retrieval result; and performing conversation interaction based on the conversation interaction example, the current conversation data and historical conversation interaction data.

[0081] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the conversation interaction method provided by the above-mentioned methods, the method comprising: obtaining current conversation data; based on the intention retrieval result of the current conversation data, determining a conversation interaction example corresponding to the intention retrieval result; and performing a conversation interaction based on the conversation interaction example, the current conversation data and historical conversation interaction data.

[0082] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0083] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0084] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A conversation interaction method, characterized in that: include: Get the current conversation data; Based on the intention retrieval result of the current conversation data, determining a conversation interaction example corresponding to the intention retrieval result; A conversation interaction is performed based on the conversation interaction example, the current conversation data and the historical conversation interaction data.

2. The method for dialog interaction according to claim 1, characterized in that: The performing a dialogue interaction based on the dialogue interaction example, the current dialogue data, and the historical dialogue interaction data includes: Based on the current conversation data and the historical conversation interaction data, performing intent recognition on the intent retrieval result to obtain an intent recognition result; Based on the intention recognition result and the dialogue interaction example, a dialogue interaction is performed.

3. The method for dialog interaction according to claim 2, characterized in that: The performing a dialogue interaction based on the intention recognition result and the dialogue interaction example includes: If the intention recognition result is not empty, based on the intention recognition result and the dialog interaction example, slot completion is performed on the current dialog data to obtain slot completion interaction data for completing the slot value; Performing a dialog interaction based on the slot completion interaction data to obtain a slot completion result; An operation corresponding to the intention recognition result is performed based on the slot completion result to obtain a query result, and a dialogue interaction is performed based on the query result.

4. The method for dialog interaction according to claim 3, characterized in that: The performing a dialogue interaction based on the intention recognition result and the dialogue interaction example further includes: When the intention recognition result is empty and the first knowledge question-and-answer interaction is currently being conducted, knowledge guidance is conducted based on the current dialogue data to obtain guidance interaction data, and dialogue interaction is conducted based on the guidance interaction data; When the intention recognition result is empty and the current knowledge question and answer interaction is not the first time, intermediate step reasoning is performed based on the interaction response data of the previous round of knowledge question and answer interaction and the historical dialogue interaction data to obtain intermediate step data, and dialogue interaction is performed based on the intermediate step data.

5. The method for dialog interaction according to claim 2, characterized in that: The performing intent recognition on the intent retrieval result based on the current conversation data and the historical conversation interaction data to obtain an intent recognition result includes: Based on the current conversation data and the historical conversation interaction data, performing intent confirmation on the intent retrieval result to obtain intent recognition interaction data; Based on the user intention reply data of the intention recognition interaction data, an intent recognition result is obtained.

6. The dialog interaction method according to any one of claims 1 to 5, characterized in that: The performing a dialogue interaction based on the dialogue interaction example, the current dialogue data and the historical dialogue interaction data, further comprising: Get the user response data of the current round; Based on the user reply data, obtaining an interaction interruption judgment result; If the interaction interruption judgment result shows an interruption, a jump dialogue interaction is performed based on the user reply data, and after the jump dialogue interaction ends, a dialogue interaction is performed based on the interactive dialogue data of the current round.

7. A conversational interaction device, characterized in that: include: Get unit, get current conversation data; An intention retrieval unit, based on the intention retrieval result of the current conversation data, determines a conversation interaction example corresponding to the intention retrieval result; The dialog interaction unit performs dialog interaction based on the dialog interaction example, the current dialog data and the historical dialog interaction data.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the conversation interaction method according to any one of claims 1 to 6 is implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the conversation interaction method according to any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the conversation interaction method according to any one of claims 1 to 6 is implemented.