Intelligent dialogue method, device, equipment and storage medium

By introducing a dialogue management knowledge base for named entity recognition and inductive reasoning, the problem of inaccurate response sentences in the intelligent dialogue system is solved, and the quality of dialogue is improved.

CN117009469BActive Publication Date: 2025-09-09TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211017859.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-24
Publication Date
2025-09-09
Estimated Expiration
2042-08-24

AI Technical Summary

Technical Problem

The response sentences in existing intelligent dialogue systems are not accurate enough, resulting in poor dialogue quality and frequent irrelevant answers.

Method used

A dialogue management knowledge base is introduced, including dialogue state knowledge and dialogue behavior knowledge, to generate reasonable response sentences by performing named entity recognition, slot filling and inductive reasoning on the input sentences.

Benefits of technology

It improves the quality of conversation, avoids irrelevant answers, and generates more reasonable and accurate response statements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117009469B_ABST
    Figure CN117009469B_ABST
Patent Text Reader

Abstract

This application discloses an intelligent dialogue method, apparatus, device, and storage medium, belonging to the field of artificial intelligence technology. This application introduces additional information, namely a dialogue management knowledge base; wherein, the dialogue management knowledge base includes dialogue state knowledge and dialogue behavior knowledge. During the current round of dialogue, after obtaining the input statement of the target object, this application first performs a series of processing on the input statement to obtain the initial dialogue state data of the current round; then, based on the dialogue management knowledge base, the initial dialogue state data is corrected, and further based on the corrected dialogue state data, the input statement, and the dialogue management knowledge base, the dialogue behavior data of the current round is obtained. By introducing additional information, the recognition of dialogue state and dialogue behavior can be made more reasonable and accurate. Based on the reasonable and accurate dialogue state recognition results and dialogue behavior recognition results, more reasonable response statements can be generated, significantly improving the quality of the dialogue.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to an intelligent dialogue method, apparatus, device and storage medium. Background Art

[0002] With the rapid development of science, technology, and the economy, society is gradually shifting towards a service-oriented society, striving to better serve its users. Based on this philosophy, artificial intelligence (AI) technology has played a significant role in numerous fields. Intelligent dialogue is a key application area of ​​AI technology, enabling users to interact with intelligent devices equipped with intelligent interaction capabilities.

[0003] Typically, intelligent dialogue is implemented based on an intelligent dialogue system (dialogue system). For example, the dialogue system, relying on AI technology, can provide services such as information query, emotional chat, knowledge question and answer, and task dialogue.

[0004] The ability of a dialogue system to output accurate responses to a subject is a key factor influencing the quality of human-computer dialogue. Currently, due to the limited information available when generating responses during a conversation, there are many instances of irrelevant answers, resulting in poor dialogue quality. Therefore, how to output high-quality responses to subjects during intelligent dialogue has become a pressing issue for those skilled in the art. Summary of the Invention

[0005] The embodiments of the present application provide an intelligent conversation method, apparatus, device, and storage medium that can improve conversation quality. The technical solution is as follows:

[0006] In one aspect, an intelligent dialogue method is provided, the method comprising:

[0007] Get the input statement of the target object in the current round;

[0008] Identifying the target object's dialogue intention in the current round based on the input sentence;

[0009] Performing named entity recognition on the input sentence to obtain named entities appearing in the input sentence;

[0010] Filling slots based on the target object's conversational intent in the current round and named entities appearing in the input sentence to obtain initial conversational state data for the current round; wherein the initial conversational state data includes slots determined based on the input sentence and slot values ​​that match the slots;

[0011] The initial dialogue state data is modified based on a dialogue management knowledge base to obtain modified dialogue state data; wherein the dialogue management knowledge base includes dialogue state knowledge and dialogue act knowledge; the dialogue state knowledge is used to constrain the relationship between different dialogue states; and the dialogue act knowledge is used to constrain the relationship between different dialogue acts;

[0012] Based on the corrected dialogue state data, the input sentence, and the dialogue management knowledge base, obtaining dialogue act data for the current round; wherein the dialogue act data is used to represent the dialogue intention of the dialogue system in the current round;

[0013] generating a response sentence that matches the input sentence in the current round based on the corrected dialogue state data and the dialogue behavior data;

[0014] Output the reply sentence to the target object.

[0015] In another aspect, an intelligent dialogue device is provided, comprising:

[0016] an acquisition unit, configured to acquire an input sentence of a target object in a current round;

[0017] A first processing unit is configured to identify the target object's dialogue intent in the current round based on the input sentence; perform named entity recognition on the input sentence to obtain named entities appearing in the input sentence; and fill slots based on the target object's dialogue intent in the current round and the named entities appearing in the input sentence to obtain initial dialogue state data for the current round; wherein the initial dialogue state data includes slots determined based on the input sentence and slot values ​​matching the slots;

[0018] a second processing unit configured to modify the initial dialogue state data based on a dialogue management knowledge base to obtain modified dialogue state data; wherein the dialogue management knowledge base includes dialogue state knowledge and dialogue act knowledge; the dialogue state knowledge is used to constrain relationships between different dialogue states; and the dialogue act knowledge is used to constrain relationships between different dialogue acts;

[0019] a third processing unit configured to obtain dialogue act data for a current round based on the corrected dialogue state data, the input sentence, and the dialogue management knowledge base; wherein the dialogue act data is used to represent the dialogue intention of the dialogue system in the current round;

[0020] a generating unit configured to generate a response sentence that matches the input sentence in a current round based on the corrected dialogue state data and the dialogue behavior data;

[0021] The sending unit is configured to output the reply statement to the target object.

[0022] In some possible implementations, the first processing unit is configured to:

[0023] Performing intent recognition, named entity recognition, and slot filling on the input sentence based on a natural language understanding model to obtain the initial dialogue state data; the natural language understanding model is obtained by retraining a pre-trained deep learning model based on the dialogue corpus;

[0024] The updating process of the natural language understanding model includes:

[0025] Obtaining dialogue status data after multiple rounds of corrections during the dialogue process;

[0026] Based on the multiple rounds of revised dialogue state data, the model parameters of the natural understanding model are updated.

[0027] In some possible implementations, the second processing unit is configured to:

[0028] In response to not retrieving an instance matching the input sentence based on the initial dialog state data, replacing slot values ​​in the initial dialog state data according to target priority order to obtain updated dialog state data;

[0029] In response to not retrieving an instance matching the input sentence based on the updated dialog state data, continuing to replace the slot value until an instance matching the input sentence is retrieved;

[0030] Using the retrieved instance as an explanation for abductive reasoning, determining the satisfiability of the dialogue state knowledge in the dialogue management knowledge base as a rule of abductive reasoning and expressed in a first-order logic language;

[0031] In response to the satisfiability value of the target dialog state knowledge being a target value, the last updated dialog state data is used as the revised dialog state data.

[0032] In some possible implementations, the second processing unit is configured to:

[0033] determining a first type of slot whose slot value is empty in the initial conversation state data, and preferentially assigning a slot value to the first type of slot to obtain updated conversation state data;

[0034] In response to not retrieving an instance matching the input statement based on the updated dialog state data, continue to assign new slot values ​​to the first type of slots in an enumeration manner;

[0035] In response to not retrieving an instance matching the input statement by specifying a slot value for the first type of slot, continue replacing the slot value of the second type of slot until an instance matching the input statement is retrieved, the second type of slot being a slot with a non-empty slot value in the initial dialog state data.

[0036] On the other hand, a computer device is provided, comprising a processor and a memory, wherein the memory stores at least one program code, and the at least one program code is loaded and executed by the processor to implement the above-mentioned intelligent dialogue method.

[0037] On the other hand, a computer-readable storage medium is provided, in which at least one program code is stored. The at least one program code is loaded and executed by a processor to implement the above-mentioned intelligent dialogue method.

[0038] On the other hand, a computer program product or computer program is provided, which includes computer program code, which is stored in a computer-readable storage medium. A processor of a computer device reads the computer program code from the computer-readable storage medium, and the processor executes the computer program code, so that the computer device performs the above-mentioned intelligent dialogue method.

[0039] The intelligent dialogue solution provided by the embodiments of the present application introduces additional information, namely a dialogue management knowledge base. The dialogue management knowledge base includes dialogue state knowledge and dialogue act knowledge. The dialogue state knowledge is used to constrain the relationships between different dialogue states, and the dialogue act knowledge is used to constrain the relationships between different dialogue acts. In the current round of dialogue, after obtaining the input statement of the target object, the embodiments of the present application first perform a series of processing on the input statement to obtain initial dialogue state data for the current round. The initial dialogue state data includes slots determined based on the input statement and slot values ​​matched to the slots. Next, the initial dialogue state data is corrected based on the dialogue management knowledge base, and the dialogue act data for the current round is further obtained based on the corrected dialogue state data, the input statement, and the dialogue management knowledge base. The dialogue act data is used to represent the dialogue system's dialogue intent in the current round. The introduction of additional information can make the recognition of dialogue states and dialogue acts more reasonable and accurate. Based on the reasonable and accurate dialogue state recognition results and dialogue act recognition results, more reasonable response statements can be generated, avoiding irrelevant answers and significantly improving the quality of dialogue. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0041] Figure 1 is a schematic diagram of an implementation environment involved in an intelligent dialogue according to an exemplary embodiment;

[0042] Figure 2 is a system structure block diagram of an intelligent dialogue solution according to an exemplary embodiment;

[0043] Figure 3 is a schematic diagram showing a flow of an intelligent dialogue according to an exemplary embodiment;

[0044] Figure 4 is a diagram illustrating a dialogue according to an exemplary embodiment;

[0045] Figure 5 is another dialogue diagram according to an exemplary embodiment;

[0046] Figure 6 is a flow chart showing an intelligent dialogue method according to an exemplary embodiment;

[0047] Figure 7 is a schematic structural diagram of an intelligent dialogue device according to an exemplary embodiment;

[0048] Figure 8 The figure is a schematic structural diagram of a computer device according to an exemplary embodiment. DETAILED DESCRIPTION

[0049] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.

[0050] In this application, the terms "first," "second," and the like are used to distinguish identical or similar items having substantially the same role and function. It should be understood that "first," "second," and "nth" do not have a logical or temporal dependency, nor do they limit the quantity or execution order. It should also be understood that although the following description uses the terms "first," "second," and the like to describe various elements, these elements should not be limited by these terms.

[0051] These terms are simply used to distinguish one element from another. For example, a first element can be referred to as a second element, and similarly, a second element can be referred to as a first element, without departing from the scope of various examples. Both the first element and the second element can be elements, and in some cases, can be separate and different elements.

[0052] Here, at least one refers to one or more than one. For example, at least one element can be one element, two elements, three elements, or any other integer greater than or equal to one. And multiple refers to two or more than two. For example, multiple elements can be two elements, three elements, or any other integer greater than or equal to two.

[0053] It should be noted that the information (including but not limited to the object device information, object personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in this application are all authorized by the object or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions.

[0054] The intelligent dialogue solution provided in the embodiments of this application involves artificial intelligence technology.

[0055] Artificial Intelligence (AI) refers to the theories, methods, techniques, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, to perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that seeks to understand the essence of intelligence and produce new intelligent machines that can respond in a manner similar to human intelligence. AI also studies the design principles and implementation methods of various intelligent machines, enabling them to possess the capabilities of perception, reasoning, and decision-making.

[0056] Artificial intelligence (AI) technology is a comprehensive discipline encompassing a wide range of fields, encompassing both hardware and software technologies. Foundational AI technologies generally include sensors, specialized AI chips, cloud computing, distributed storage, big data processing, operating / interaction systems, and mechatronics. AI software technologies primarily encompass computer vision, speech processing, natural language processing, and machine learning / deep learning.

[0057] Natural language processing (NLP) is a key area of ​​research in computer science and artificial intelligence. It studies the theories and methods that enable effective communication between humans and computers using natural language. Natural language processing (NLP) integrates linguistics, computer science, and mathematics. Therefore, research in this field involves natural language—the language we use in everyday life—and is closely linked to the study of linguistics. Natural language processing technologies typically include text processing, semantic understanding, machine translation, robotic question answering, and knowledge graphs.

[0058] Machine learning (ML) is a multidisciplinary field that encompasses probability theory, statistics, approximation theory, convex analysis, and algorithmic complexity theory. It specifically studies how computers can simulate or implement human learning behaviors to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is at the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications span all areas of AI. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and learning through demonstration.

[0059] With the research and advancement of artificial intelligence technology, artificial intelligence technology has been studied and applied in many fields, such as common smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, unmanned driving, autonomous driving, drones, robots, smart medical care, smart customer service, etc. It is believed that with the development of technology, artificial intelligence technology will be applied in more fields and play an increasingly important role.

[0060] The intelligent dialogue solution provided in the embodiments of this application may involve technologies such as natural language processing and machine learning of artificial intelligence, which are specifically illustrated by the following embodiments.

[0061] The following first introduces some key terms or abbreviations involved in the embodiments of this application.

[0062] Dialogue Act: It is inspired by the behavioral characteristics of human conversations.

[0063] For example, the aforementioned behavioral features are broadly categorized into four categories: answering, directing, guiding, and greeting. A dialog behavior represents the intent of each sentence during a conversation. Alternatively, a dialog behavior represents the conversational intent of either the subject or the system during a conversation. Furthermore, the categorization of dialog behaviors can be tailored to specific conversational tasks, and this application does not impose any limitations thereon.

[0064] Slot-filling: Understanding the conversational context and, based on the conversational intent of the current turn object, determining slots based on the object's input statements in the current turn and filling these slots with slot values.

[0065] Turn: Typically, a conversation round consists of a sentence input by the subject and a sentence immediately followed by the dialogue system's response.

[0066] Dialogue State: In this article, it refers to the slots and corresponding slot values ​​determined based on the sentences input by the object.

[0067] The following introduces the implementation environment involved in the intelligent dialogue solution provided in the embodiment of the present application.

[0068] The implementation environment of the intelligent dialogue solution provided in the embodiment of the present application includes a terminal, a server and a knowledge base. Figure 1 FIG1 is a schematic diagram of an implementation environment of an intelligent dialogue according to an exemplary embodiment. Figure 1 The implementation environment includes: a terminal 101, a dialogue system server 102, a data management server 103, a dialogue management knowledge base 104 and a public knowledge base 105.

[0069] The terminal 101 may be, but is not limited to, a smartphone, tablet computer, laptop computer, desktop computer, smart speaker, smart watch, smart robot, etc. The terminal 101 and the dialogue system server 102 are directly or indirectly connected via a communication network (e.g., the Internet) in a wired or wireless communication manner, which is not limited in this application.

[0070] For example, an application (also called a client) supporting intelligent conversation is installed on the terminal 101. In some possible implementations, the application includes but is not limited to the following categories: an application specifically used for intelligent conversation; or a social application supporting intelligent conversation; or a mini-program supporting intelligent conversation. A mini-program is an application that can be used without downloading and installing. The mini-program is embedded as a sub-application in another application (also called a parent application) and provides a variety of services by running the sub-application in the parent application.

[0071] In the embodiments of the present application, the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides cloud computing services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), as well as cloud servers for basic cloud computing services such as big data and artificial intelligence platforms.

[0072] In addition, the dialogue system server 102 and the data management server 103 are respectively connected to the dialogue management knowledge base 104, and the public knowledge base 105 is connected to the data management server 103. The dialogue system server 102 and the data management server 103 each include at least one processor, memory, and at least two I / O (Input / Output) devices.

[0073] In some possible implementations, terminal 101 includes a computer that implements the systems and techniques described herein to provide interaction with an object. The computer includes a display device for displaying information to the object, such as a CRT (Cathode Ray Tube) or LCD (Liquid Crystal Display), as well as a keyboard and a pointing device (e.g., a mouse or trackball), through which the object can provide input to the computer. Other types of devices can also be used to provide interaction with the object; for example, the feedback provided to the object can be any form of sensory feedback, such as visual feedback, auditory feedback, or tactile feedback, and input from the object can be received in any form (including acoustic input, voice input, or tactile input). The systems and techniques described herein can be implemented in a computing system that includes a front-end component, such as a user computer with a graphical user interface or a web browser, through which the object can interact with the computer.

[0074] The following introduces the application scenarios of the intelligent dialogue solution provided in the embodiments of the present application.

[0075] In some possible implementations, the intelligent dialogue method provided by the embodiments of this application is applied to task scenarios. Task-based dialogues are designed to complete a specific task. For example, booking an airline ticket requires not only responding to the subject but also querying ticket availability and performing corresponding actions. That is, task-based dialogues have a task objective. For task-based dialogues, the subject might input a sentence like, "Book me a flight from City A to City B tomorrow."

[0076] In combination with the above description, the intelligent dialogue solution provided in the embodiment of the present application is explained in detail through the following implementation method.

[0077] Figure 2 This is a system structure diagram of an intelligent dialogue solution according to an exemplary embodiment. Figure 2 Yes Figure 1 The structures of the dialogue system server 102 (referred to as dialogue system), the data management server 103 and the dialogue management knowledge base 104 are further introduced in detail.

[0078] See also Figure 2 The dialogue system server 102 includes a processor 1021, a memory 1022, and two I / O devices. The dialogue system server 102 is connected to the terminal 101 via an I / O device 1023. The dialogue system server 102 is connected to the dialogue management knowledge base 104 via an I / O device 1024. The processor 1021 and the memory 1022 are connected via a data bus 1025.

[0079] In some possible implementations, memory 1022 includes a natural language understanding module 11, a dialogue management module 12, a natural language generation module 13, an output module 14, and a first update module 15. The first update module is also referred to herein as a dictionary update module. The dialogue management module 12 includes an entity linking module 121, an inductive learning module 122, a second update module 123, and a dialogue act optimization module 124.

[0080] Continue to see Figure 2 The data management server 103 includes a processor 1031, a memory 1032, and two I / O devices. The data management server 103 is connected to the dialogue management knowledge base 104 via the I / O device 1033, and is connected to the public knowledge base 105 via the I / O device 1034. The processor 1031 and the memory 1032 are connected via a data bus 1035.

[0081] In some possible implementations, the memory 1032 includes a knowledge reuse module 21 , a knowledge merging module 22 , and a knowledge version management module 23 .

[0082] The functions and roles of each of the above modules will be elaborated in detail later.

[0083] In some other possible implementations, the dialogue management knowledge base 104 includes a dialogue state knowledge base and a dialogue act knowledge base. The dialogue state knowledge base includes dialogue state knowledge expressed in first-order logic, while the dialogue act knowledge base includes dialogue act knowledge expressed in propositional logic.

[0084] In the embodiments of this application, dialog state knowledge is used to constrain the relationships between different dialog states; in other words, dialog state knowledge is a specification of the relationships between dialog acts. Dialogue act knowledge is used to constrain the relationships between different dialog states; in other words, dialog act knowledge is a specification of the relationships between dialog acts.

[0085] Figure 3 This is a flow chart of an intelligent dialogue according to an exemplary embodiment. Figure 2 The system structure diagram shown in Figure 3 This section introduces the process of intelligent dialogue.

[0086] 301. Obtain a dialogue corpus and a multi-source public knowledge base.

[0087] In some possible implementations, the intelligent dialogue solutions provided by embodiments of this application are applied in task-based dialogue scenarios. The aforementioned dialogue corpus is a task-related topic corpus, which is not a limitation of this application. Compared to large-scale public dialogue corpora, the aforementioned dialogue corpus contains fewer samples and is also referred to as a proprietary dataset.

[0088] Among them, the knowledge base is the basic data resource for many natural language processing tasks. The above-mentioned public knowledge base refers to the online open source knowledge base. For example, the online open source knowledge base from multiple sources can be obtained through web crawler technology to form the above-mentioned multi-source public knowledge base.

[0089] 302. The data management server imports a multi-source public knowledge base and runs a knowledge reuse module of the data management server.

[0090] After acquiring a multi-source public knowledge base, that is, knowledge from multiple data sources, the acquired knowledge is preprocessed by running the knowledge reuse module of the data management server. Data preprocessing includes, but is not limited to, data cleaning, and this application does not impose any limitations thereon. The preprocessed dialogue state knowledge is then classified according to keywords from different fields to obtain dialogue state knowledge from different fields; this dialogue state knowledge is also referred to as dialogue state common sense knowledge. Furthermore, first-order logic is used to re-describe the preprocessed dialogue state knowledge, described in natural language, by field, to form a dialogue state knowledge base. Furthermore, propositional logic is used to re-describe the preprocessed dialogue act knowledge, described in natural language, to form a dialogue act knowledge base.

[0091] Taking data cleaning as an example of data preprocessing, the knowledge reuse module of the data management server first cleans the data of the multi-source public knowledge base, then retrieves relevant knowledge based on the keywords of different fields, and rewrites the preprocessed knowledge using the specified logical language. Among them, the dialogue state knowledge is rewritten in the first-order logic language, and the dialogue behavior knowledge is rewritten in the propositional logic language. The sample dialogue state knowledge of the dialogue state knowledge base is as follows: Figure 4 As shown in the figure, the sample dialogue behavior knowledge of the dialogue behavior knowledge base is as follows Figure 5 shown.

[0092] In some possible implementations, dialogue behaviors include those on the subject side and those on the dialogue system side. Dialogue behaviors on the dialogue system side can be broadly categorized as: greeting, notification, request, successful notification, failed notification, guidance, confirmation, negation, correction, and farewell. Dialogue behaviors on the subject side can be broadly categorized as: notification, request, negation of intent, negation of proposition, confirmation of proposition, choice, thanks, and farewell.

[0093] For dialogue behaviors on the dialogue system side, a notification refers to a specific slot within a domain and its corresponding slot value. It is a response to an object's notification, request, negation of intent, or negation of a proposition. Notification success and failure are responses to an object's confirmation proposition. A negation of intent can also be the cancellation of a previously made reservation. A negation of a proposition is the negation of a proposition that has determined an object or condition, after the dialogue system responds with a response such as "BB Restaurant at AA location meets your requirements. Is that okay?" A confirmation proposition is a request to change the slot value in a dialogue state where the slot value is not empty. A request generally refers to a proposition that fills in a slot value in a dialogue state where the slot value is empty.

[0094] 303. Run the knowledge merging module of the data management server.

[0095] Since knowledge from different sources may have different representations of the same concept, for example, "University A" and "University A in Province S" refer to the same concept but have different representations, that is, the two have the same meaning but different expressions. For this reason, the embodiment of the present application uses a knowledge merging module to achieve conceptual unification and alignment of knowledge from different sources.

[0096] In some possible implementations, the concept set of the dialog state knowledge base is a superset of the set of dialog state slots and their corresponding slot values; the concept set of the dialog act knowledge base is a superset of the set of dialog act instances. Here, an intent is an instance of a dialog act, and a dialog act is a higher-level concept of an intent.

[0097] In addition to the aforementioned slot sets and corresponding slot value sets, the concept set of the dialog state knowledge base also includes other concepts. These concepts are used to connect slots and slot values ​​in different domains. For example, for the slot "restaurant-location," there are countless corresponding slot values, but they all belong to a specific "province," "city," or "street." The "province," "city," and "street" here are concepts outside the two aforementioned sets but still belong to the concept set of the dialog state knowledge base.

[0098] In other possible implementations, when conceptually unifying and aligning knowledge from different sources, a small number of aligned concept pairs can be collected in advance through manual judgment as alignment seeds. For example, a small number of concept pairs about dialogue states and a small number of concept pairs about dialogue behaviors can be determined; then, more aligned concept pairs can be automatically mined based on the alignment seeds to align the concepts of dialogue states and dialogue behaviors from different sources of knowledge.

[0099] In some other possible implementations, automatically mining more aligned concept pairs based on alignment seeds can be achieved in the following ways: using alignment seeds to embed concepts about conversation states and conversation behaviors from different sources of knowledge into a unified vector space, and then completing alignment in the unified vector space based on the semantic distance between concepts; in addition, each newly obtained aligned concept pair will contribute to the next alignment as an alignment seed. Alternatively, the concept pairs to be aligned are determined based on the alignment seeds, such as by replacing a concept in the alignment seeds to obtain the concept pairs to be aligned, which is not limited in this application. Afterwards, for the two concepts in the concept pair to be aligned, whether they belong to the concept pair that needs to be aligned is determined based on the structural similarity between the two. For example, the structural similarity can be measured by whether the two have similar neighboring concepts in their respective knowledge bases, which is also not limited in this application.

[0100] In summary, the embodiments of the present application implement the concept of aligning knowledge from different sources about dialogue states and dialogue behaviors using semi-supervised learning.

[0101] 304. Run the knowledge version management module of the data management server.

[0102] Among them, the knowledge version management module is responsible for updating the dialogue management knowledge base, that is, checking the logical differences between the new and old versions of knowledge, and uploading the updated part of the new version compared to the old version to the dialogue management knowledge base. It should be noted that the knowledge update in this step is implemented on the data management server. The difference from checking the knowledge version in step 307 below is that the dialogue system server is used to run the dialogue system service, and what is stored on it is a certain version of knowledge, which is not updated in real time. The knowledge version is only checked by opening a thread polling during maintenance, and if a new version of knowledge exists, the new version of knowledge is obtained from the data management server.

[0103] 305. The dialogue system server uses the dialogue corpus to fine-tune the natural language understanding module and the natural language generation module.

[0104] In some possible implementations, the natural language understanding module and the natural language generation module are trained using a pre-training and fine-tuning approach. For example, both the natural language understanding module and the natural language generation module are deep learning models pre-trained on a large-scale public dialogue corpus, such as the BERT (Bidirectional Encoder Representation from Transformers) model. Subsequently, the two BERT models are fine-tuned using a pre-labeled dialogue corpus to obtain the natural language understanding module and the natural language generation module.

[0105] In other possible implementations, the natural language understanding module takes as input natural language text, such as the subject's speech in the current turn, and outputs the subject's speech intent and propositional entity recognition results. Slots are then filled based on the subject's speech intent and named entity recognition results, resulting in a dialog state recognition result. The natural language generation module takes as input the dialog system's dialogue behavior in the current turn and the dialog state recognition results, and outputs a reasonable response to the subject's speech in the current turn.

[0106] 306. The dialogue system server starts the dialogue system service.

[0107] Among them, starting the dialogue system service is also called enabling the dialogue system service or running the dialogue system service. Figure 2 As shown, the natural language text input by the object passes through the natural language understanding module and the dialogue management module to obtain the dialogue state data and dialogue behavior data after knowledge correction, and then passes it to the natural language generation module to generate a reasonable response to the object's speech in the current round. The generated response is then returned to the object in natural language form through the output module.

[0108] 307. The dialogue system server starts a thread polling to check the knowledge version and determine whether a new version of the knowledge exists; in response to no new version of the knowledge being detected, the dialogue system service is run; in response to a new version of the knowledge being detected, it is determined whether there is an ongoing dialogue; in response to no ongoing dialogue, the dialogue system service is paused and the first update module is run; in response to the existence of an ongoing dialogue, a prompt is given for the dialogue system service to be paused, and after the time is reached, the dialogue system service is paused and the first update module is run.

[0109] In this embodiment of the present application, in response to detecting a new version of knowledge through thread polling and an ongoing conversation, a time is set to suspend the dialogue system service and the recipient is notified. After the set time is reached, the dialogue system service is suspended, and the first update module is executed to update the dialogue management knowledge base. After the knowledge base update is complete, the dialogue system server resumes operation.

[0110] In summary, the present embodiment discloses an intelligent dialogue solution based on a knowledge base and abductive learning. First, the present embodiment generates a knowledge base suitable for open-domain dialogue under weak supervision, namely the aforementioned dialogue management knowledge base, through a knowledge reuse module, a knowledge merging module, and access to a multi-source public knowledge base. Then, the abductive learning module performs abductive reasoning on the output of the natural language understanding module in conjunction with the dialogue management knowledge base, obtaining a revised dialogue state recognition result. Furthermore, the dialogue behavior optimization module infers the dialogue behavior of the current dialogue system based on the revised dialogue state recognition result, the input statement of the current round, and the dialogue management knowledge base. This intelligent dialogue solution, combined with an external knowledge base, not only reduces the model's dependence on labeled data but also, through abductive reasoning, generates more reasonable dialogue states and dialogue behaviors, ultimately resulting in more reasonable response statements, thereby improving dialogue quality. Furthermore, the dialogue state knowledge expressed in first-order logic and the dialogue behavior knowledge expressed in propositional logic are more targeted, have strong expressiveness, strong reasoning performance, and are reusable and low maintenance. In other words, it can improve the robustness and interpretability of dialogue state recognition and dialogue act recognition in weakly supervised situations.

[0111] In addition, the natural language understanding module and the natural language generation module can also use other sequence-to-sequence deep learning models, which is not limited in this application.

[0112] Figure 6 This is a flow chart of an intelligent dialogue method according to an exemplary embodiment. The execution subject of this method is the dialogue system server, see Figure 6 , the method comprising:

[0113] 601. The dialogue system server obtains the input sentence of the target object in the current round.

[0114] During the conversation, the target object inputs natural language text through the terminal, which is referred to as an input sentence in this article. In other words, the input sentence is in natural language form.

[0115] 602. The dialogue system server identifies the dialogue intent of the target object in the current round based on the input sentence; performs named entity recognition on the input sentence to obtain the named entities appearing in the input sentence; fills the slots according to the dialogue intent of the target object in the current round and the named entities appearing in the input sentence to obtain initial dialogue state data, and obtains the initial dialogue state data of the current round; wherein the initial dialogue state data includes the slots determined based on the input sentence and the slot values ​​that match the slots.

[0116] This step is performed by Figure 2The natural language understanding module 11 shown is completed. In some possible implementations, the natural language understanding module 11 performs a series of processing on the input sentence in the following manner to obtain the initial dialogue state data of the current round.

[0117] Before performing intent recognition, it is necessary to predefine intent categories. For example, the definition of intent categories can be set according to specific tasks or specific scenarios. For example, intents can include categories such as ordering takeout, booking a hotel, booking tickets, booking movie tickets, or booking air tickets, etc. This application does not impose any restrictions here.

[0118] In other possible implementations, when performing intent recognition, the target subject's intent for the current round of conversation can be identified based solely on the input statement, or based on the input statement and related historical conversations, which are not limited in this application. The historical conversations mentioned above refer to conversations between the target subject and the dialogue system server prior to the current round.

[0119] Among them, named entity recognition, also known as proper name recognition, refers to the identification of entities with specific meanings in the text, such as names of people, places, organizations or proper nouns.

[0120] In an embodiment of the present application, after the intent recognition results and named entities are obtained based on the natural language understanding module 11, the slot filling can be performed. For example, the slots corresponding to each intent category can be pre-defined, and this application does not limit this. After the slots are determined, the slot filling can be completed based on the recognized named entities. In addition, during the slot filling process, it may be possible that certain slot values ​​cannot be recognized. In this case, the slot filling can also be completed based on slot prediction, wherein slot prediction means that when certain slot values ​​cannot be recognized in the input sentence, the dialogue system server first needs to make a prediction, rather than directly obtaining these slot values ​​by interacting with the target object.

[0121] In some other possible implementations, after the named entity is recognized, in order to subsequently generate a more reasonable reply statement, Figure 2 The entity linking module 121 shown completes word disambiguation through entity linking so that the dialogue system server can understand the semantics of the input sentence more accurately, which is not limited in this application.

[0122] 603. The dialogue system server modifies the initial dialogue state data based on the dialogue management knowledge base to obtain modified dialogue state data; wherein the dialogue management knowledge base includes dialogue state knowledge and dialogue behavior knowledge; the dialogue state knowledge is used to constrain the relationship between different dialogue states; and the dialogue behavior knowledge is used to constrain the relationship between different dialogue behaviors.

[0123] This step is performed by Figure 2 The reverse learning module 122 shown is completed. In the embodiment of the present application, the input of the reverse learning module 122 is the dialogue management knowledge base (using logical language to represent knowledge) and the initial conversation state data (initial dialogue state recognition result), and the output is the corrected dialogue state data, that is, the corrected dialogue state recognition result. Exemplarily, the reverse learning module 122 in the embodiment of the present application is a model that combines machine learning and logical reasoning methods. Exemplarily, the reverse learning module 122 uses the dialogue state knowledge base to correct the natural language understanding model, wherein the direct correction is to the dialogue state recognition result finally output by the natural language understanding model. However, during the learning process, this correction will use the backpropagation method to correct the model parameters of the natural language understanding model.

[0124] Among them, abductive learning is also called abductive reasoning. Given observed facts and background knowledge, finding a hypothesis that can explain the observed facts and is consistent with the background knowledge is logically called abductive reasoning. In other words, the meaning of abductive reasoning is the process of selectively inferring certain hypotheses to explain phenomena based on background knowledge. For example, the reasoning pattern of abductive reasoning can be described as α→β, where α→β belongs to the rules in the knowledge base, that is, corresponding to the above-mentioned background knowledge; β belongs to the phenomenon, that is, corresponding to the above-mentioned observed facts; α is the explanation of β, that is, a hypothetical explanation that can explain the phenomenon. Abductive learning can be regarded as a special kind of weakly supervised learning, in which the supervised information comes not only from the real labels, but also from logical reasoning. Furthermore, abductive learning can be regarded as an enhanced version of weakly supervised learning. If there is good knowledge, even if there is not enough labeled or unlabeled data, a good model can be learned.

[0125] In some possible implementations, the initial dialog state data is modified based on the dialog management knowledge base to obtain the modified dialog state data, including but not limited to the following methods:

[0126] 6031. In response to not retrieving an instance matching the input statement based on the initial dialog state data, replace the slot values ​​in the initial dialog state data according to the target priority order to obtain updated dialog state data.

[0127] Exemplarily, instances matching the input sentence may be retrieved from a database, wherein the database stores knowledge in the form of (concept, attribute, instance) triples, which is not limited in this application.

[0128] 6032. In response to not retrieving an instance that matches the input statement based on the updated dialog state data, continue to replace the slot value until an instance that matches the input statement is retrieved; using the retrieved instance as an explanation for abductive reasoning, determine the satisfiability of the dialog state knowledge in the dialog management knowledge base as a rule for abductive reasoning and expressed in a first-order logic language.

[0129] Exemplarily, replacing slot values ​​in the initial dialogue state data in target priority order includes, but is not limited to, the following methods: determining a first-category slot whose slot value in the initial dialogue state data is empty, and preferentially assigning a slot value to the first-category slot; accordingly, in response to not retrieving an instance matching the input statement based on the updated dialogue state data, continuing to replace the slot value until an instance matching the input statement is retrieved, including: in response to not retrieving an instance matching the input statement based on the updated dialogue state data, continuing to assign new slot values ​​to the first-category slots in an enumeration manner; in response to not retrieving an instance matching the input statement by assigning a slot value to the first-category slot, continuing to replace the slot value of the second-category slot until an instance matching the input statement is retrieved, wherein the second-category slot is a slot whose slot value in the initial dialogue state data is not empty.

[0130] It should be noted that if a propositional formula is not a perpetually false form, it is called satisfiable. The satisfiability problem is used to determine whether a propositional formula is satisfiable.

[0131] 6033. In response to the satisfiability value of the target dialogue state knowledge being the target value, the last updated dialogue state data is used as the revised dialogue state data.

[0132] For example, the target value in the embodiment of the present application is 1, and the present application does not impose any limitation thereto.

[0133] The following combination Figure 4 The functions and effects of the inductive learning module 122 are illustrated with examples.

[0134] Figure 4 The intention of the dialogue listed in the example is to make a restaurant reservation, and the relevant slots have been determined and initially filled ( Figure 4 The dotted box on the left in the middle) corresponds to the initial dialogue state data mentioned above; then, use Figure 4 However, due to the lack of knowledge in the natural language understanding module when identifying the dialogue state, it is likely that no qualified instance will be retrieved. Figure 4, the natural language understanding module identifies the demand as looking for a "restaurant environment" with a "parking lot". Due to the lack of knowledge, the natural language understanding module does not understand that "restaurants have their own parking lots" and "restaurant locations (such as shopping malls) have parking lots" are the same thing, so Figure 4 The "local environment" is identified as "NULL". Using this dialog state recognition result, no instance that meets the requirements can be retrieved. However, Figure 4 The example shown, AA Restaurant, actually meets the requirements. Since no matching examples were found, the calculated satisfiability is 0.

[0135] In the case that the dialogue system server cannot retrieve an instance that meets the requirements, the embodiment of the present application uses an inverse learning module to solve the problem of not being able to retrieve an instance that meets the requirements.

[0136] For example, the slot values ​​in the dialog state recognition result can be replaced by enumeration, for example, the slot with an empty slot value, that is, the slot "location environment", can be replaced with an enumerated slot value, such as "parking lot" or "no parking lot". If the slot value "no parking lot" is specified for the slot, then no instance that meets the requirements can be retrieved based on the updated dialog state recognition result. If the slot value "parking lot" is specified for the slot, then the instance AA restaurant that meets the requirements can be retrieved based on the updated dialog state recognition result. Then, the retrieved instance AA restaurant is used as an explanation for abductive reasoning to calculate the satisfiability of the dialog state knowledge as a rule of abductive reasoning in the dialog state knowledge base, where the knowledge related to the parking lot is "In(restaurant, shopping mall)∧Has(shopping mall, parking lot)→Has(restaurant, parking lot)", where ∧ is a conjunction, similar to "and"; → is an implication, similar to "deduce". According to 1∧1→1, the satisfiability of the knowledge is 1, which meets the conditions. This can achieve reasonable correction of the current dialogue state recognition results.

[0137] Among them, "In(restaurant, shopping mall)" means that the restaurant is located in a shopping mall, and "Has(restaurant, parking lot)" means that the restaurant's "restaurant environment" has a parking lot. It should be noted that the whole of In(restaurant, shopping mall)∧Has(shopping mall, parking lot)→Has(restaurant, parking lot) is a compound proposition, in which Has(restaurant, parking lot) is the conclusion and In(restaurant, shopping mall)∧Has(shopping mall, parking lot) is the premise. When both the premise and the conclusion are true, the compound proposition is true. In addition, the premise itself is also in the form of a conforming proposition connected by a conjunction; the corresponding compound proposition is true if and only if both propositions connected by the conjunction are true.

[0138] In the embodiment of the present application, the natural language understanding model is obtained by retraining a pre-trained deep learning model based on the dialogue data. For example, the natural language understanding module is a pre-trained and fine-tuned BERT model. The updating process of the natural language understanding model includes but is not limited to the following methods: obtaining multiple rounds of dialogue state data after correction during the dialogue process; updating the model parameters of the natural language understanding model based on the multiple rounds of correction dialogue state data. The updating process is performed by Figure 4 The second update module 123 in the dialog system is completed. That is, the input of the second update module 123 is the corrected dialog state recognition result of the current round. By starting the fine-tuning thread for the natural language understanding module, the natural language understanding module is updated during the knowledge update period of the dialog system server. This application does not impose any restrictions on this.

[0139] 604. The dialogue system server obtains the dialogue behavior data of the current round based on the corrected dialogue state data, the input sentence, and the dialogue management knowledge base; wherein the dialogue behavior data is used to represent the dialogue intention of the dialogue system in the current round.

[0140] This step is performed by Figure 2 The dialog act optimization module 124 is shown as complete. Exemplarily, the input to the dialog act optimization module 124 is the corrected dialog state recognition result for the current round, the input statement of the target object for the current round, and the dialog act knowledge base. The output is the dialog act for the dialog system server for the current round. In this embodiment of the present application, the dialog act knowledge is if-then dialog act knowledge, where "if-then" represents a logical formula, indicating that if condition A is met, action B is executed.

[0141] The following combination Figure 5 The functions and effects of the dialogue behavior optimization module 124 are described with examples.

[0142] like Figure 5 As shown, in the first round of dialogue, "Help me make a reservation for a Sichuan restaurant within 1km from here" comes from the object, and the corresponding dialogue behavior on the object side is "request". The dialogue system server cannot retrieve an instance that meets the conditions, and replies "Sorry, there is no Sichuan restaurant within 1km" based on the search results. The corresponding dialogue behavior on the object side is "notification failure". Figure 5 The dialogue act knowledge shown is “Notify failure → Guide”. The dialogue act optimization module 124 determines that the dialogue act on the dialogue system side in this round is “Guide”. Therefore, the dialogue system follows the guidance sentence “Do you need to relax the conditions?”

[0143] In the second round of dialogue, the user modifies the condition and informs the dialogue system of the new condition "within 5km". The corresponding dialogue behavior on the object side is "confirmation of proposition". Figure 5Given the dialog act knowledge of "Confirm proposition → Modify" and "Confirm proposition → Confirm," the dialog act optimization module 124 determines that the dialog act on the dialog system side in this round is "Modify" and "Confirm." Therefore, the dialog system replies, "Okay, reservation for a Sichuan restaurant within 5 km? Any other requests?" Finally, the dialog system asks the subject again, "Any other requests?" The subject replies, "Yes, no more." The corresponding dialog act on the subject side is "Confirm Intention."

[0144] 605. The dialogue system server generates a response statement that matches the input statement in the current round based on the corrected dialogue state data and dialogue behavior data.

[0145] This step is performed by Figure 2 The natural language generation module 13 shown is completed, wherein the above reply sentence is in natural language form and is a reasonable reply to the input sentence input by the target object through the terminal.

[0146] In some possible implementations, the natural language generation module is a deep learning model pre-trained on a large-scale public dialogue corpus, such as the BERT model. This deep learning model is then fine-tuned using a pre-labeled dialogue corpus to generate the natural language generation module described above. For example, the labeled dialogue corpus used to train the natural language generation module is labeled dialogue corpus with labeled dialogue states and dialogue acts.

[0147] 606. The dialogue system server outputs a reply statement to the target object.

[0148] This step is performed by Figure 2 The output module 14 shown is completed, and the output module 14 is responsible for converting the reply statement into a corresponding output format and outputting it to the terminal of the target object.

[0149] In some other possible implementations, Figure 2 The system also includes a first update module 15, also known as a dictionary update module. Exemplarily, this module is responsible for updating the named entity dictionary, intent dictionary, and dialogue act dictionary. After the updates are complete, the dialogue system service is enabled. Note that the dictionaries used by the dialogue system server are static until the next update.

[0150] The intelligent dialogue solution provided by the embodiments of the present application introduces additional information, namely a dialogue management knowledge base. The dialogue management knowledge base includes dialogue state knowledge and dialogue act knowledge. The dialogue state knowledge is used to constrain the relationships between different dialogue states, and the dialogue act knowledge is used to constrain the relationships between different dialogue acts. In the current round of dialogue, after obtaining the input statement of the target object, the embodiments of the present application first perform a series of processing on the input statement to obtain initial dialogue state data for the current round. The initial dialogue state data includes slots determined based on the input statement and slot values ​​matched to the slots. Next, the initial dialogue state data is corrected based on the dialogue management knowledge base, and the dialogue act data for the current round is further obtained based on the corrected dialogue state data, the input statement, and the dialogue management knowledge base. The dialogue act data is used to represent the dialogue system's dialogue intent in the current round. The introduction of additional information can make the recognition of dialogue states and dialogue acts more reasonable and accurate. Based on the reasonable and accurate dialogue state recognition results and dialogue act recognition results, more reasonable response statements can be generated, avoiding irrelevant answers and significantly improving the quality of dialogue.

[0151] In summary, the present embodiment discloses an intelligent dialogue solution based on a knowledge base and abductive learning. First, the present embodiment generates a knowledge base suitable for open-domain dialogue under weak supervision, namely the aforementioned dialogue management knowledge base, through a knowledge reuse module, a knowledge merging module, and access to a multi-source public knowledge base. Then, the abductive learning module performs abductive reasoning on the output of the natural language understanding module in conjunction with the dialogue management knowledge base, obtaining a revised dialogue state recognition result. Furthermore, the dialogue behavior optimization module infers the dialogue behavior of the current dialogue system based on the revised dialogue state recognition result, the input statement of the current round, and the dialogue management knowledge base. This intelligent dialogue solution, combined with an external knowledge base, not only reduces the model's dependence on labeled data but also, through abductive reasoning, generates more reasonable dialogue states and dialogue behaviors, ultimately resulting in more reasonable response statements, thereby improving dialogue quality. Furthermore, the dialogue state knowledge expressed in first-order logic and the dialogue behavior knowledge expressed in propositional logic are more targeted, have strong expressiveness, strong reasoning performance, and are reusable and low maintenance. In other words, it can improve the robustness and interpretability of dialogue state recognition and dialogue act recognition in weakly supervised situations.

[0152] Figure 7 FIG is a structural diagram of an intelligent dialogue device according to an exemplary embodiment. Figure 7 , the device comprises:

[0153] The acquisition unit 701 is configured to acquire the input sentence of the target object in the current round;

[0154] The first processing unit 702 is configured to identify the target object's dialogue intent in the current round based on the input sentence; perform named entity recognition on the input sentence to obtain named entities appearing in the input sentence; and fill in slots based on the target object's dialogue intent in the current round and the named entities appearing in the input sentence to obtain initial dialogue state data for the current round; wherein the initial dialogue state data includes slots determined based on the input sentence and slot values ​​matching the slots;

[0155] The second processing unit 703 is configured to modify the initial dialogue state data based on a dialogue management knowledge base to obtain modified dialogue state data; wherein the dialogue management knowledge base includes dialogue state knowledge and dialogue act knowledge; the dialogue state knowledge is used to constrain the relationship between different dialogue states; and the dialogue act knowledge is used to constrain the relationship between different dialogue acts.

[0156] The third processing unit 704 is configured to obtain dialogue act data for the current round based on the corrected dialogue state data, the input sentence, and the dialogue management knowledge base; wherein the dialogue act data is used to represent the dialogue intention of the dialogue system in the current round;

[0157] A generating unit 705 is configured to generate a reply sentence that matches the input sentence in the current round based on the corrected dialogue state data and the dialogue behavior data;

[0158] The sending unit 706 is configured to output the reply statement to the target object.

[0159] The intelligent dialogue solution provided by the embodiments of the present application introduces additional information, namely a dialogue management knowledge base. The dialogue management knowledge base includes dialogue state knowledge and dialogue act knowledge. The dialogue state knowledge is used to constrain the relationships between different dialogue states, and the dialogue act knowledge is used to constrain the relationships between different dialogue acts. In the current round of dialogue, after obtaining the input statement of the target object, the embodiments of the present application first perform a series of processing on the input statement to obtain initial dialogue state data for the current round. The initial dialogue state data includes slots determined based on the input statement and slot values ​​matched to the slots. Next, the initial dialogue state data is corrected based on the dialogue management knowledge base, and the dialogue act data for the current round is further obtained based on the corrected dialogue state data, the input statement, and the dialogue management knowledge base. The dialogue act data is used to represent the dialogue system's dialogue intent in the current round. The introduction of additional information can make the recognition of dialogue states and dialogue acts more reasonable and accurate. Based on the reasonable and accurate dialogue state recognition results and dialogue act recognition results, more reasonable response statements can be generated, avoiding irrelevant answers and significantly improving the quality of dialogue.

[0160] In some possible implementations, the dialog management knowledge base includes a dialog state knowledge base and a dialog act knowledge base; and the apparatus further includes:

[0161] The data management unit is configured to acquire knowledge from multiple data sources and perform data preprocessing on the acquired knowledge; classify the preprocessed dialogue state knowledge according to keywords in different fields to obtain dialogue state knowledge in different fields; use first-order logic language to redescribe the preprocessed dialogue state knowledge described in natural language according to different fields to form the dialogue state knowledge base; and use propositional logic language to redescribe the preprocessed dialogue behavior knowledge described in natural language to form the dialogue behavior knowledge base.

[0162] In some possible implementations, the first processing unit is configured to:

[0163] Performing intent recognition, named entity recognition, and slot filling on the input sentence based on a natural language understanding model to obtain the initial dialogue state data; the natural language understanding model is obtained by retraining a pre-trained deep learning model based on the dialogue corpus;

[0164] The updating process of the natural language understanding model includes:

[0165] Obtaining dialogue status data after multiple rounds of corrections during the dialogue process;

[0166] Based on the multiple rounds of revised dialogue state data, the model parameters of the natural understanding model are updated.

[0167] In some possible implementations, the second processing unit is configured to:

[0168] In response to not retrieving an instance matching the input sentence based on the initial dialog state data, replacing slot values ​​in the initial dialog state data according to target priority order to obtain updated dialog state data;

[0169] In response to not retrieving an instance matching the input sentence based on the updated dialog state data, continuing to replace the slot value until an instance matching the input sentence is retrieved;

[0170] Using the retrieved instance as an explanation for abductive reasoning, determining the satisfiability of the dialogue state knowledge in the dialogue management knowledge base as a rule of abductive reasoning and expressed in a first-order logic language;

[0171] In response to the satisfiability value of the target dialog state knowledge being a target value, the last updated dialog state data is used as the revised dialog state data.

[0172] In some possible implementations, the second processing unit is configured to:

[0173] determining a first type of slot whose slot value is empty in the initial conversation state data, and preferentially assigning a slot value to the first type of slot to obtain updated conversation state data;

[0174] In response to not retrieving an instance matching the input statement based on the updated dialog state data, continue to assign new slot values ​​to the first type of slots in an enumeration manner;

[0175] In response to not retrieving an instance matching the input statement by specifying a slot value for the first type of slot, continue replacing the slot value of the second type of slot until an instance matching the input statement is retrieved, the second type of slot being a slot with a non-empty slot value in the initial dialog state data.

[0176] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present disclosure, and will not be described in detail here.

[0177] It should be noted that the intelligent dialogue device provided in the above embodiments is merely illustrated by the division of the aforementioned functional modules when conducting intelligent dialogue. In actual applications, the aforementioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to perform all or part of the functions described above. Furthermore, the intelligent dialogue device provided in the above embodiments and the intelligent dialogue method embodiment are based on the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0178] Figure 8 : It is a structural diagram of a computer device 800 provided in an embodiment of the present application. The computer 800 can be the aforementioned dialogue system server or data management server. The computer device 800 may have relatively large differences due to different configurations or performances, and may include one or more processors (Central Processing Units, CPU) 801 and one or more memories 802, wherein the memory 802 stores at least one program code, and the at least one program code is loaded and executed by the processor 801 to implement the intelligent dialogue method provided by the above-mentioned various method embodiments. Of course, the computer device 800 may also have components such as a wired or wireless network interface, a keyboard, and an input and output interface for input and output. The computer device 800 may also include other components for implementing device functions, which will not be described here.

[0179] In an exemplary embodiment, a computer-readable storage medium is also provided, such as a memory including program code. The program code can be executed by a processor in a computer device to implement the intelligent dialogue method in the above embodiment. For example, the computer-readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), a magnetic tape, a floppy disk, or an optical data storage device.

[0180] In an exemplary embodiment, a computer program product or computer program is also provided, which includes computer program code, which is stored in a computer-readable storage medium. A processor of a computer device reads the computer program code from the computer-readable storage medium, and the processor executes the computer program code, so that the computer device performs the above-mentioned intelligent dialogue method.

[0181] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or by a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, which may be a read-only memory, a disk, or an optical disk, etc.

[0182] The above description is merely an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. An intelligent dialogue method, characterized in that: The method comprises: Get the input statement of the target object in the current round; Identifying the target object's dialogue intention in the current round based on the input sentence; Performing named entity recognition on the input sentence to obtain named entities appearing in the input sentence; Filling slots based on the target object's conversational intent in the current round and named entities appearing in the input sentence to obtain initial conversational state data for the current round; wherein the initial conversational state data includes slots determined based on the input sentence and slot values ​​that match the slots; The initial dialogue state data is modified based on a dialogue management knowledge base to obtain modified dialogue state data; wherein the dialogue management knowledge base includes dialogue state knowledge and dialogue act knowledge; the dialogue state knowledge is used to constrain the relationship between different dialogue states; and the dialogue act knowledge is used to constrain the relationship between different dialogue acts; Acquire dialogue act data for the current round based on the corrected dialogue state data, the input sentence, and the dialogue management knowledge base; wherein the dialogue act data is used to represent the dialogue intention of the dialogue system in the current round; generating a response sentence that matches the input sentence in the current round based on the corrected dialogue state data and the dialogue behavior data; Output the reply sentence to the target object.

2. The method according to claim 1, characterized in that The dialogue management knowledge base includes a dialogue state knowledge base and a dialogue act knowledge base; the method further includes: Acquire knowledge from multiple data sources and perform data preprocessing on the acquired knowledge; Classify the preprocessed dialogue state knowledge according to the keywords in different fields to obtain dialogue state knowledge in different fields; Using first-order logic language, re-describing the dialogue state knowledge described in natural language after pre-processing according to the domain to form the dialogue state knowledge base; The dialogue act knowledge described in natural language after preprocessing is re-described using propositional logic language to form the dialogue act knowledge base.

3. The method according to claim 1, characterized in that The method further comprises: Performing intent recognition, named entity recognition, and slot filling based on a natural language understanding model to obtain the initial dialogue state data; the natural language understanding model is obtained by retraining a pre-trained deep learning model based on the dialogue data; The updating process of the natural language understanding model includes: Obtaining dialogue state data after multiple rounds of corrections during the dialogue process; Based on the multiple rounds of revised dialogue state data, the model parameters of the natural language understanding model are updated.

4. The method according to claim 1, wherein The step of correcting the initial dialogue state data based on the dialogue management knowledge base to obtain corrected dialogue state data includes: In response to not retrieving an instance matching the input sentence based on the initial dialog state data, replacing slot values ​​in the initial dialog state data according to target priority order to obtain updated dialog state data; In response to not retrieving an instance matching the input sentence based on the updated dialog state data, continuing to replace the slot value until an instance matching the input sentence is retrieved; Using the retrieved instance as an explanation for abductive reasoning, determining the satisfiability of the dialogue state knowledge in the dialogue management knowledge base as a rule for abductive reasoning and expressed in a first-order logic language; In response to the satisfiability value of the target dialog state knowledge being a target value, the last updated dialog state data is used as the revised dialog state data.

5. The method according to claim 4, characterized in that The replacing the slot values ​​in the initial dialog state data according to the target priority order includes: determining a first type of slot whose slot value is empty in the initial conversation state data, and preferentially assigning a slot value to the first type of slot; In response to not retrieving an instance matching the input sentence based on the updated dialog state data, continuing to replace the slot value until an instance matching the input sentence is retrieved, comprising: In response to not retrieving an instance matching the input statement based on the updated dialog state data, continue to assign new slot values ​​to the first type of slots in an enumeration manner; In response to not retrieving an instance matching the input statement by specifying a slot value for the first type of slot, continue replacing the slot value of the second type of slot until an instance matching the input statement is retrieved, the second type of slot being a slot with a non-empty slot value in the initial dialog state data.

6. An intelligent dialogue device, characterized in that: The device comprises: an acquisition unit, configured to acquire an input sentence of a target object in a current round; A first processing unit is configured to identify the target object's dialogue intent in the current round based on the input sentence; perform named entity recognition on the input sentence to obtain named entities appearing in the input sentence; and fill slots based on the target object's dialogue intent in the current round and the named entities appearing in the input sentence to obtain initial dialogue state data for the current round; wherein the initial dialogue state data includes slots determined based on the input sentence and slot values ​​matching the slots; a second processing unit configured to modify the initial dialogue state data based on a dialogue management knowledge base to obtain modified dialogue state data; wherein the dialogue management knowledge base includes dialogue state knowledge and dialogue act knowledge; the dialogue state knowledge is used to constrain relationships between different dialogue states; and the dialogue act knowledge is used to constrain relationships between different dialogue acts; a third processing unit configured to obtain dialogue act data for a current round based on the corrected dialogue state data, the input sentence, and the dialogue management knowledge base; wherein the dialogue act data is used to represent the dialogue intention of the dialogue system in the current round; a generating unit configured to generate a response sentence that matches the input sentence in a current round based on the corrected dialogue state data and the dialogue behavior data; The sending unit is configured to output the reply statement to the target object.

7. The device according to claim 6, characterized in that The dialogue management knowledge base includes a dialogue state knowledge base and a dialogue act knowledge base; the device also includes: The data management unit is configured to acquire knowledge from multiple data sources and perform data preprocessing on the acquired knowledge; classify the preprocessed dialogue state knowledge according to keywords in different fields to obtain dialogue state knowledge in different fields; use first-order logic language to redescribe the preprocessed dialogue state knowledge described in natural language according to different fields to form the dialogue state knowledge base; and use propositional logic language to redescribe the preprocessed dialogue behavior knowledge described in natural language to form the dialogue behavior knowledge base.

8. A computer device, characterized in that: The device includes a processor and a memory, wherein at least one program code is stored in the memory, and the at least one program code is loaded and executed by the processor to implement the intelligent dialogue method according to any one of claims 1 to 5.

9. A computer-readable storage medium, characterized in that The storage medium stores at least one program code, and the at least one program code is loaded and executed by the processor to implement the intelligent dialogue method according to any one of claims 1 to 5.

10. A computer program product, characterized in that The computer program product includes a computer program code, which is stored in a computer-readable storage medium. A processor of a computer device reads the computer program code from the computer-readable storage medium, and the processor executes the computer program code, so that the computer device performs the intelligent dialogue method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Intention recognition response method and device, equipment and storage medium

    CN114817467A

  • End-to-end multi-field task type dialogue generation method based on knowledge base enhancement

    CN114860914A