Conversation method and device, equipment, storage medium and program product

By adopting a dialogue management model based on a large language model in the task-based dialogue system, identifying intentions and slot values ​​and determining dialogue strategies, the problem of poor dialogue flexibility is solved, and the flexibility and openness of the dialogue system is improved, ensuring that The naturalness and intelligence of the dialogue process.

CN119293155APending Publication Date: 2025-01-10IFLYTEK CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411210441.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

The dialogue management module in the existing task-based dialogue system lacks flexibility and openness, making it difficult to deal with complex and changeable dialogue scenarios, resulting in poor dialogue flexibility.

Method used

A dialogue management model based on a large language model is adopted to identify intent and slot values ​​from the input information through the dialogue management model, determine dialogue strategies, and generate reply information. The model is based on general conversation data and sample data training in the target conversation field, and can cope with complex and changeable conversation scenarios while maintaining the accuracy of the conversation field.

Benefits of technology

It improves the flexibility and openness of the dialogue system, makes the dialogue process more natural and smooth, can accurately grasp the dialogue intention and perform strategic control with language intelligence close to humans, and improves the intelligence level of the task-based dialogue system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119293155A_ABST
    Figure CN119293155A_ABST
Patent Text Reader

Abstract

The invention provides a dialogue method and device, equipment, a storage medium and a program product. The dialogue method comprises the steps that an intention and a slot position value are recognized from input information; based on the intention and the slot position value, determining a dialogue strategy through a dialogue management model; wherein the dialogue management model is constructed on the basis of a large language model, the dialogue management model is trained on the basis of general dialogue data and sample dialogue data of a target dialogue field, and the target dialogue field refers to the dialogue field to which the input information belongs; and generating reply information of the input information based on the dialogue strategy. The dialogue flexibility can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of natural language processing, and in particular to a dialogue method, device, equipment, storage medium and program product. Background Art

[0002] With the rapid development of artificial intelligence, task-based dialogue systems have been widely used in intelligent customer service, intelligent assistants and other fields.

[0003] At present, the dialogue management module in the task-based dialogue system is generally implemented based on state machines, rules or shallow machine learning, and mostly relies on predefined state spaces and strategy sets. It lacks flexibility and openness and is difficult to cope with complex and changing dialogue scenarios. Therefore, there is a problem of poor dialogue flexibility. Summary of the invention

[0004] The present application provides a conversation method, apparatus, device, storage medium and program product to solve the problem of poor conversation flexibility.

[0005] According to a first aspect of an embodiment of the present application, a conversation method is provided, including:

[0006] Identify intent and slot values ​​from input information;

[0007] Based on the intention and the slot value, determining a dialogue strategy through a dialogue management model; wherein the dialogue management model is constructed based on a large language model, and the dialogue management model is trained based on general dialogue data and sample dialogue data of a target dialogue domain, and the target dialogue domain refers to the dialogue domain to which the input information belongs;

[0008] Based on the dialogue strategy, reply information of the input information is generated.

[0009] Optionally, the general conversation data includes unlabeled conversation data of multiple conversation fields; the sample conversation data of the target conversation field includes labeled conversation data of the target conversation field;

[0010] The training process of the dialogue management model includes:

[0011] Pre-training the dialogue management model based on the general dialogue data to obtain a pre-trained dialogue management model;

[0012] Based on the sample dialogue data in the target dialogue domain, the pre-trained dialogue management model is trained for dialogue strategy prediction to obtain a trained dialogue management model.

[0013] Optionally, the performing dialogue strategy prediction training on the pre-trained dialogue management model based on the sample dialogue data in the target dialogue domain to obtain the trained dialogue management model includes:

[0014] generating a first prompt word based on the sample conversation data in the target conversation domain;

[0015] The first prompt word is input into the pre-trained dialogue management model to obtain a trained dialogue management model, wherein the first prompt word is used to instruct the pre-trained dialogue management model to perform dialogue strategy prediction training based on sample dialogue data in the target dialogue domain.

[0016] Optionally, the dialogue management model includes a dialogue state tracking sub-model and a dialogue strategy learning sub-model; the dialogue state tracking sub-model includes a large language model; the dialogue strategy learning sub-model includes a large language model;

[0017] The determining of the dialogue strategy through the dialogue management model based on the intention and the slot value includes:

[0018] Based on the intention, the slot value and the historical dialog state, obtaining the current dialog state through the dialog state tracking sub-model;

[0019] Based on the current dialog state, a dialog strategy is determined by using the dialog strategy learning sub-model.

[0020] Optionally, the method further comprises:

[0021] In the case where the dialogue strategy cannot be determined by the dialogue management model, the dialogue strategy is determined by retrieving from external data and / or historical dialogue data of the input information based on the intention and the slot value.

[0022] Optionally, identifying the intent and the slot value from the input information includes:

[0023] Based on the input information, the intent and slot value are obtained through a natural language understanding model; wherein the natural language understanding model includes a large language model, and the natural language understanding model is trained based on the general conversation data and the intent annotation data of the target conversation field, and the intent annotation data includes data obtained by annotating the intent and slot value of the sample input data.

[0024] Optionally, generating reply information to the input information based on the dialogue strategy includes:

[0025] Based on the dialogue strategy, reply information of the input information is obtained through a natural language generation model, wherein the natural language generation model includes a large language model, and the natural language generation model is trained based on the general dialogue data.

[0026] Optionally, the method further comprises:

[0027] Based on the sample data, the sample intent and sample slot value are obtained through the natural language understanding model;

[0028] Based on the sample intent and the sample slot value, determining a sample dialogue strategy through the dialogue management model;

[0029] Based on the sample dialogue strategy, obtaining reply information of the sample data through a natural language generation model;

[0030] Based on the sample data and the reply information of the sample data, obtaining the actual conversation completion quality;

[0031] The natural language understanding model, the dialogue management model and the natural language generation model are trained based on the actual dialogue completion quality and the annotated dialogue completion quality corresponding to the sample data.

[0032] According to a second aspect of an embodiment of the present application, a conversation device is provided, including:

[0033] A recognition unit, used to recognize the intent and slot value from the input information;

[0034] a processing unit, configured to determine a dialogue strategy through a dialogue management model based on the intent and the slot value; wherein the dialogue management model is constructed based on a large language model, and the dialogue management model is trained based on general dialogue data and sample dialogue data of a target dialogue domain, and the target dialogue domain refers to the dialogue domain to which the input information belongs;

[0035] A generating unit is used to generate reply information of the input information based on the dialogue strategy.

[0036] According to a third aspect of an embodiment of the present application, there is provided an electronic device, including a memory and a processor;

[0037] The memory is connected to the processor and is used to store programs;

[0038] The processor is used to implement the dialogue method described in the first aspect by running the program in the memory.

[0039] According to a fourth aspect of an embodiment of the present application, a storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the dialogue method described in the first aspect is implemented.

[0040] According to a fifth aspect of an embodiment of the present application, a computer program product is provided, comprising computer program instructions, which, when executed by a processor, cause the processor to execute the dialogue method described in the first aspect.

[0041] In the present application, the intent and slot value are identified from the input information, and the dialogue strategy is determined by the dialogue management model based on the intent and slot value, wherein the dialogue management model is constructed based on the large language model, and the dialogue management model is trained based on the general dialogue data and the sample dialogue data of the target dialogue field. The target dialogue field refers to the dialogue field to which the input information belongs, and based on the dialogue action, the reply information of the input information is generated. The dialogue management model is trained based on the general dialogue data and the sample dialogue data of the target dialogue field. Since the dialogue management model is trained with the general dialogue data, it is not limited to a specific field, can cope with complex and changeable dialogue scenarios, and improve the flexibility and openness of the dialogue. Since the dialogue management model is trained with the sample dialogue data of the target dialogue field, it can improve the flexibility and openness of the dialogue without affecting the accuracy of the dialogue in the target dialogue field. Moreover, the dialogue management model is constructed based on the large language model. Thanks to the powerful semantic understanding and generation capabilities of the large language model, the dialogue management model can accurately grasp the dialogue intention, and perform strategy control with language intelligence close to that of humans, determine the dialogue strategy, and make the dialogue process more natural and smooth. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0043] Figure 1 A flowchart of a dialogue method provided in an embodiment of the present application;

[0044] Figure 2 A flowchart of a training process of a natural language understanding model provided in an embodiment of the present application;

[0045] Figure 3 A flowchart of a training process of a dialogue management model provided in an embodiment of the present application;

[0046] Figure 4A schematic diagram of a process of step 102 provided in an embodiment of the present application;

[0047] Figure 5 A flowchart of a dialogue method provided in an embodiment of the present application;

[0048] Figure 6 A schematic diagram of the structure of a conversation device provided in an embodiment of the present application;

[0049] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0050] At present, most task-based dialogue systems adopt a pipeline architecture, processing user requests in the order of natural language understanding (NLU), dialogue management (DM), and natural language generation (NLG). Although this architecture has certain modularity and interpretability, it still faces many challenges in practical applications. For example, the policy control flexibility of the DM module is insufficient, and it is difficult to cope with complex and changing dialogue scenarios. Therefore, how to improve the intelligence level of task-based dialogue systems is a key issue that needs to be solved in this field.

[0051] The DM module is the core of the task-based dialogue system. At present, the DM module is generally implemented based on state machines, rules or shallow machine learning. For example, in the DM module, a dialogue strategy optimization method based on reinforcement learning is adopted, such as the Deep Q-Network (DQN), to improve the flexibility and adaptability of policy control. However, most of the current DM modules rely on predefined state spaces and policy sets, lack flexibility and openness, cannot dynamically adapt to user needs, and have difficulty coping with complex and changing dialogue scenarios. Especially in open domain dialogues, it is difficult for existing DM modules to master multi-topic, cross-scenario context understanding and policy control. Therefore, there is a problem of poor dialogue flexibility.

[0052] In order to solve the problem of poor dialogue flexibility, the present application provides a dialogue method, apparatus, device, storage medium and program product.

[0053] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0054] Exemplary Implementation Environment

[0055] The conversation method according to the embodiment of the present disclosure can be executed by an electronic device such as a terminal device or a server, and the terminal device can be a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. The server can be an independent physical server, a server cluster composed of multiple physical servers, or a cloud server capable of cloud computing. The method can be implemented by a processor calling a computer-readable program instruction stored in a memory.

[0056] Exemplary Methods

[0057] See also Figure 1 In an exemplary embodiment, a conversation method is provided. Figure 1 As shown, the process of the dialogue method mainly includes:

[0058] Step 101, identifying intent and slot value from input information.

[0059] In an exemplary embodiment, the input information refers to a natural language sentence input by a user. For example, the input information is "how is the weather in city A today?"

[0060] In an exemplary embodiment, the intent refers to a category obtained by classifying the input information. For example, the input information is "how is the weather in city A today", and the intent is "ask about the weather".

[0061] In the exemplary embodiment, a slot refers to a parameter carried by an intent, and a slot value refers to a value corresponding to the slot. For example, the input information is "How is the weather in city A today", the intent is "Ask about the weather", the slots are "time" and "place", and the slot values ​​are "today" and "city A" respectively.

[0062] Currently, traditional NLU modules often rely on keyword matching or machine learning models, and the accuracy and generalization capabilities of intent recognition are limited.

[0063] In some embodiments, step 101 includes: based on the input information, obtaining the intent and slot value through a deep learning-based intent classification and slot filling model.

[0064] In an exemplary embodiment, the deep learning-based intent classification and slot filling model may include BERT (Bidirectional Encoder Representation from Transformers) or LSTM (Long Short-Term Memory).

[0065] Using deep learning-based intent classification and slot filling models can improve the accuracy of intent recognition compared to keyword matching or machine learning models.

[0066] In other embodiments, step 101 includes: obtaining intent and slot values ​​through a natural language understanding model based on input information.

[0067] Among them, the natural language understanding model includes a large language model. The natural language understanding model is trained based on general conversation data and intent annotation data in the target conversation field. The intent annotation data includes data obtained by annotating intent and slot values ​​of sample input data.

[0068] Compared with the intent classification and slot filling model based on deep learning, the natural language understanding model includes a large language model. The natural language understanding model is trained based on general conversation data and the intent annotation data of the target conversation domain. Since the natural language understanding model is trained with general conversation data, it is not limited to a specific domain and does not need to be limited by the scale of annotated data. It can cope with complex and changing conversation scenarios, improve the flexibility and openness of the conversation, improve the generalization ability of the natural language understanding model, and meet the requirements of open domain conversation. Since the natural language understanding model is trained with the intent annotation data of the target conversation domain, it can improve the flexibility and openness of the conversation without affecting the accuracy of intent recognition in the target conversation domain. Moreover, the natural language understanding model includes a large language model. Thanks to the powerful semantic understanding and generation capabilities of the large language model, the natural language understanding model can accurately understand the user's intent and improve the accuracy of intent recognition, especially when facing colloquial and non-standard input information.

[0069] In an exemplary embodiment, a large language model (LLM) refers to a deep learning model trained using a large amount of text data, which is intended to understand and generate natural language text.

[0070] The natural language understanding model includes a large language model. The natural language understanding model can perform deep semantic encoding on the input information and explore the implicit intentions and slot values ​​in the input information.

[0071] In some embodiments, the general conversation data includes unlabeled conversation data of multiple conversation domains. The target conversation domain refers to the conversation domain to which the input information belongs.

[0072] In an exemplary embodiment, the dialogue areas may include food, travel, accommodation, etc., and the dialogue areas may also include information query, device control, product recommendation, etc.

[0073] In some embodiments, the training process of the natural language understanding model includes: performing semi-supervised learning on the natural language understanding model based on intent annotation data and general conversation data in the target conversation domain to obtain a trained natural language understanding model.

[0074] In an exemplary embodiment, the basic idea of ​​semi-supervised learning is to use model assumptions on data distribution to establish a learner to label unlabeled samples.

[0075] In other embodiments, Figure 2 As shown in the figure, the training process of the natural language understanding model includes:

[0076] Step 201 , pre-training a natural language understanding model based on general conversation data to obtain a pre-trained natural language understanding model.

[0077] In an exemplary embodiment, step 201 may be to perform continuous pretraining of the natural language understanding model based on general conversation data to obtain a pretrained natural language understanding model. Through the continuous learning mechanism, the natural language understanding model can continuously absorb new knowledge, thereby obtaining a strong semantic understanding and generalization ability, breaking through the bottleneck of scarce annotated data, achieving continuous evolution of the performance of the natural language understanding model, and being able to fully learn the semantic information of conversation data in multiple conversation fields.

[0078] Step 202: Based on the intent annotation data of the target dialogue domain, the pre-trained natural language understanding model is trained for intent and slot value prediction to obtain a trained natural language understanding model.

[0079] In some embodiments, step 202 includes: based on the intent annotation data of the target dialogue domain, using full fine-tuning or parameter efficient fine-tuning, performing intent and slot value prediction training on the pre-trained natural language understanding model to obtain a trained natural language understanding model.

[0080] In other embodiments, step 202 includes: generating a second prompt word based on the intent annotation data of the target dialogue domain; inputting the second prompt word into a pre-trained natural language understanding model to obtain a trained natural language understanding model, wherein the second prompt word is used to instruct the pre-trained natural language understanding model to perform intent and slot value prediction training based on the intent annotation data of the target dialogue domain.

[0081] By using a small amount of intent-annotated data to generate the second prompt word, and performing instruction tuning on the pre-trained natural language understanding model based on the second prompt word, the natural language understanding model can quickly adapt to the intent system of task-based dialogue. The dialogue knowledge learned by instruction fine-tuning is highly interpretable and controllable. The behavior of the natural language understanding model can be accurately guided by designing the second prompt word, so that the natural language understanding model can meet the needs of different scenarios. Moreover, by injecting task-based dialogue domain knowledge into the natural language understanding model through instruction fine-tuning, the natural language understanding model can flexibly adapt to complex and changing dialogue scenarios and has stronger generalization ability. In addition, with the help of the few-shot learning ability of the large language model, the natural language understanding model can complete rapid migration and adaptation on very little intent-annotated data, reducing the training cost of the natural language understanding model.

[0082] Step 102: Determine the dialogue strategy through the dialogue management model based on the intent and the slot value.

[0083] Among them, the dialogue management model is built based on a large language model, and the dialogue management model is trained based on general dialogue data and sample dialogue data in the target dialogue domain. The target dialogue domain refers to the dialogue domain to which the input information belongs.

[0084] In the exemplary embodiment, the dialogue strategy refers to a system action, which is used to indicate how the dialogue system should respond to the user's request. The dialogue strategy is a machine-readable semantic expression, not a natural language. The types of dialogue strategies can include inquiry, confirmation and answer; the purpose of inquiry is to understand the information missing in the necessary slot; confirmation is to solve the fault tolerance problem, and the user is confirmed again before filling the slot; the answer is the final reply, which means the end of the dialogue. For example, the input information is "How is the weather in City A today", the intention is "Ask the weather", the slots are "time" and "location", and the slot values ​​are "today" and "city A" respectively. The dialogue strategy is "Answer (date = today, location = city A, content = sunny)", and the specific meaning of this dialogue strategy is "reply that the weather in City A today is sunny"; for another example, the input information is "How is the weather today", the intention is "Ask the weather", the slot is "time", and the slot values ​​are "today", and the dialogue strategy is "Ask Location ()", and the specific meaning of this dialogue strategy is "Ask the location".

[0085] The dialogue management model is trained based on general dialogue data and sample dialogue data from the target dialogue domain. Since the dialogue management model is trained with general dialogue data, it is not limited to a specific domain and can cope with complex and changeable dialogue scenarios, improving the flexibility and openness of the dialogue. Since the dialogue management model is trained with sample dialogue data from the target dialogue domain, it can improve the flexibility and openness of the dialogue without affecting the accuracy of the dialogue in the target dialogue domain. Moreover, the dialogue management model is built based on the large language model. Thanks to the powerful semantic understanding and generation capabilities of the large language model, the dialogue management model can accurately grasp the dialogue intention, and use language intelligence close to that of humans to control the strategy, determine the dialogue strategy, and make the dialogue process more natural and smooth. The dialogue management model is built based on the large language model. It is essentially an end-to-end generative model that can break the state space limitations and flexibly cope with unknown situations in open domain dialogues.

[0086] The dialogue management model in this application has mastered rich dialogue strategy knowledge through autonomous learning, and has the ability of multi-round interactive dialogue reasoning and decision-making. It can dynamically infer user intentions based on the discourse context, actively guide the flow of dialogue, and truly achieve knowledge-driven, active listening, and flexible response, making dialogue strategy control unprecedentedly flexible, open, and intelligent. It represents a major breakthrough in the field of task-based dialogue. With massive dialogue data as experience, it has multiple cognitive skills such as contextual reasoning, causal decision-making, and scene adaptation, and can achieve unprecedented natural, smooth, and efficient human-computer dialogue. It is expected to change the interaction paradigm of human-computer dialogue, bring a new experience improvement to industry applications such as intelligent customer service and virtual assistants, and mark a major step forward in human-computer dialogue towards a higher level of natural interaction.

[0087] In some embodiments, the general conversation data includes unlabeled conversation data in multiple conversation domains; and the sample conversation data in the target conversation domain includes labeled conversation data in the target conversation domain.

[0088] In some embodiments, the training process of the dialogue management model includes: performing semi-supervised learning on the dialogue management model based on sample dialogue data and general dialogue data in the target dialogue domain to obtain a trained dialogue management model.

[0089] In an exemplary embodiment, the basic idea of ​​semi-supervised learning is to use model assumptions on data distribution to establish a learner to label unlabeled samples.

[0090] In other embodiments, Figure 3 As shown in the figure, the training process of the dialogue management model includes:

[0091] Step 301: pre-train the dialogue management model based on the general dialogue data to obtain a pre-trained dialogue management model.

[0092] In an exemplary embodiment, step 301 may be to perform continuous pretraining of the dialogue management model based on general dialogue data to obtain a pretrained dialogue management model. Through the continuous learning mechanism, the dialogue management model can continuously absorb new knowledge, thereby obtaining a strong semantic understanding and generalization ability, breaking through the bottleneck of scarce annotated data, and realizing the continuous evolution of the performance of the dialogue management model. It can fully learn the language knowledge and dialogue strategies of dialogue data in multiple dialogue fields, and has a highly flexible and autonomous dialogue strategy control capability.

[0093] Step 302: Based on the sample dialogue data in the target dialogue domain, the pre-trained dialogue management model is trained for dialogue strategy prediction to obtain a trained dialogue management model.

[0094] Based on sample conversation data from the target conversation domain, the pre-trained conversation management model is trained for conversation strategy prediction to obtain a trained conversation management model, which can enable the conversation management model to quickly adapt to the task-based conversation domain and learn conversation strategies specific to the target conversation domain.

[0095] In some embodiments, step 302 includes: based on sample dialogue data in the target dialogue domain, using full fine-tuning or parameter efficient fine-tuning, performing dialogue strategy prediction training on the pre-trained dialogue management model to obtain a trained dialogue management model.

[0096] In other embodiments, step 302 includes: generating a first prompt word based on sample conversation data in the target conversation domain; inputting the first prompt word into a pre-trained conversation management model to obtain a trained conversation management model, wherein the first prompt word is used to instruct the pre-trained conversation management model to perform conversation strategy prediction training based on sample conversation data in the target conversation domain.

[0097] By using a small amount of sample dialogue data in the target dialogue domain to generate the first prompt word, and performing instruction tuning on the pre-trained dialogue management model based on the first prompt word, the dialogue management model can be quickly adapted to the task-based dialogue domain and learn the dialogue strategy specific to the target dialogue domain. The dialogue knowledge learned by instruction tuning is highly interpretable and controllable. The behavior of the dialogue management model can be accurately guided by designing the first prompt word, so that the dialogue management model can meet the needs of different scenarios. Moreover, by injecting task-based dialogue domain knowledge into the dialogue management model through instruction tuning, the dialogue management model can flexibly adapt to complex and changeable dialogue scenarios and has stronger generalization ability. In addition, with the few-shot learning ability of the large language model, the dialogue management model can complete rapid migration adaptation on very few sample dialogue data, reducing the training cost of the dialogue management model.

[0098] In an exemplary embodiment, the sample conversation data in the target conversation domain includes multiple rounds of conversations. For example, the first sentence in the multiple rounds of conversations is used as input, and the second sentence in the multiple rounds of conversations is used as annotation information; the first sentence and the second sentence in the multiple rounds of conversations are used as input, and the third sentence in the multiple rounds of conversations is used as annotation information; the first sentence, the second sentence, and the third sentence in the multiple rounds of conversations are used as input, and the fourth sentence in the multiple rounds of conversations is used as annotation information; and so on, sample conversation data in the target conversation domain is obtained according to the multiple rounds of conversations.

[0099] In some embodiments, the dialog management model includes a large language model. Step 102 includes: determining a dialog strategy based on the intent and the slot value by the dialog management model including a large language model.

[0100] In some other embodiments, the dialogue management model includes a dialogue state tracking sub-model and a dialogue strategy learning sub-model; the dialogue state tracking sub-model includes a large language model; and the dialogue strategy learning sub-model includes a large language model. Figure 4 As shown, step 102 includes:

[0101] Step 401, based on the intent, slot value and historical dialog state, obtain the current dialog state through the dialog state tracking sub-model.

[0102] In an exemplary embodiment, the current dialog state generally includes the slot filling status so far, the user actions (ie, intentions and slot values) during the current round of dialog, and historical dialog data of input information.

[0103] Step 402: Based on the current dialogue state, determine the dialogue strategy through the dialogue strategy learning sub-model.

[0104] Based on the intent, slot value and historical dialogue state, the current dialogue state is obtained through the dialogue state tracking sub-model. Based on the current dialogue state, the dialogue strategy is determined through the dialogue strategy learning sub-model. The dialogue state tracking sub-model and the dialogue strategy learning sub-model form a management chain for multiple rounds of dialogue, enabling the dialogue system to conduct more in-depth and coherent interactions, significantly improving the endurance of task-based dialogues. Moreover, the dialogue state tracking sub-model and the dialogue strategy learning sub-model can be trained more flexibly. Both the dialogue state tracking sub-model and the dialogue strategy learning sub-model are large language models that can accurately grasp the dialogue intent and perform strategy control with language intelligence close to that of humans, making the dialogue process more natural and smooth.

[0105] In some embodiments, the dialogue method further includes: when the dialogue strategy cannot be determined by the dialogue management model, based on the intention and slot value, retrieving from external data and / or historical dialogue data of input information to determine the dialogue strategy.

[0106] In an exemplary embodiment, the external data may include an external database, and may also include networked data obtained through a search engine.

[0107] When the dialogue management model cannot determine the dialogue strategy, the dialogue strategy is determined by retrieving historical dialogue data from external data and / or input information based on intent and slot values, which can flexibly respond to unknown situations in the dialogue.

[0108] Step 103: Generate reply information for the input information based on the dialogue strategy.

[0109] In an exemplary embodiment, the reply information of the input information refers to the reply of the dialogue system to the input information. The reply information of the input information is to convert the dialogue strategy into natural language text and output it in a way that the user can understand. For example, the input information is "How is the weather in City A today?", the intention is "Ask the weather", the slots are "time" and "location", and the slot values ​​are "today" and "city A" respectively. The dialogue strategy is "Answer (date = today, location = city A, content = sunny)", and the reply information of the input information is "Today, the weather in City A is sunny"; for another example, the input information is "How is the weather today?", the intention is "Ask the weather", the slot is "time", and the slot values ​​are "today" respectively. The dialogue strategy is "AskLocation()", and the reply information of the input information is "Please tell me the location of the query."

[0110] At present, the traditional NLG module is responsible for generating reply text according to the dialogue strategy instructions of the DM module. Most traditional NLG modules adopt retrieval or template-based methods, which make it difficult to generate truly natural language. The generated reply content is relatively stiff and formulaic, lacking in personalization and humanity.

[0111] In some embodiments, step 103 includes: based on the dialogue strategy, obtaining response information of the input information through a sequence-to-sequence deep learning model.

[0112] In an exemplary embodiment, the sequence-to-sequence deep learning model may include a Seq2Seq (Sequence to Sequence) model, and may also include a Transformer (a deep learning model based on a self-attention mechanism).

[0113] Using a sequence-to-sequence deep learning model can generate more fluent and natural response information compared to retrieval or template methods.

[0114] In other embodiments, step 103 includes: obtaining reply information to the input information through a natural language generation model based on the dialogue strategy.

[0115] Among them, the natural language generation model includes a large language model, and the natural language generation model is trained based on general conversation data.

[0116] Compared with sequence-to-sequence deep learning models, natural language generation models include large language models, which are trained based on general conversation data. Since general conversation data is used to train natural language generation models, they are not limited to specific fields and do not need to be limited by the scale of annotated data. They can cope with complex and changing conversation scenarios, improve the flexibility and openness of conversations, and improve the generalization ability of natural language generation models. They can meet the requirements of open domain conversations and enable natural language generation models to master the language style and strategy of conversation generation. Moreover, natural language generation models include large language models, which can achieve high controllability of natural language generation models by adjusting prompt words. Thanks to the powerful semantic understanding and generation capabilities of large language models, the response information generated by natural language generation models is fluent and coherent, achieving high-quality response generation.

[0117] In some embodiments, the training process of the natural language generation model includes: pre-training the natural language generation model based on general conversation data to obtain a pre-trained natural language generation model.

[0118] In an exemplary embodiment, the natural language generation model can be continuously pre-trained based on general conversation data to obtain a pre-trained natural language generation model. Through the continuous learning mechanism, the natural language generation model can continuously absorb new knowledge from task-based conversations, thereby continuously strengthening the conversation generation capability, breaking through the bottleneck of scarce annotated data, and achieving continuous evolution of the performance of the natural language generation model.

[0119] In an exemplary embodiment, the natural language generation model can be guided by the dialogue strategy and combined with the historical dialogue data of the input information to generate fluent and natural reply information close to humans, which can achieve a more humanized and personalized interaction experience.

[0120] At present, most task-based dialogue systems adopt pipeline modular design, each module is optimized separately, and lacks end-to-end joint modeling capabilities. This leads to insufficient connection between modules and difficulty in achieving global optimization. Directly adopting end-to-end deep learning models faces problems such as poor interpretability and sparse data, making it difficult to implement in practice.

[0121] In some embodiments, Figure 5 The dialogue method further comprises:

[0122] Step 501, based on the sample data, obtain the sample intent and sample slot value through the natural language understanding model.

[0123] Step 502: Based on the sample intent and the sample slot value, determine the sample dialogue strategy through the dialogue management model.

[0124] Step 503: Based on the sample dialogue strategy, response information of the sample data is obtained through a natural language generation model.

[0125] Step 504: obtaining actual conversation completion quality based on the sample data and the response information of the sample data.

[0126] In an exemplary embodiment, the actual dialogue completion quality may include a task success rate and may also include the number of interaction rounds.

[0127] In an exemplary embodiment, the fewer the number of interaction rounds, the better, and the higher the task success rate, the better, and the natural language understanding model, the dialogue management model, and the natural language generation model can be trained by these two goals.

[0128] In an exemplary embodiment, sample data is input into a natural language understanding model, and response information of the sample data is obtained through the natural language understanding model, the dialogue management model and the natural language generation model, which is a round of dialogue.

[0129] In an exemplary embodiment, the task success rate refers to the probability that the reply information of the sample data completes the task corresponding to the sample data.

[0130] Step 505 , based on the actual conversation completion quality and the labeled conversation completion quality corresponding to the sample data, the natural language understanding model, the conversation management model and the natural language generation model are trained.

[0131] In an exemplary embodiment, the completion quality of the annotation dialogue may include the annotation task success rate, and may also include the number of annotation interaction rounds.

[0132] In an exemplary embodiment, the success rate of the labeling task refers to the fact that there may be multiple response methods for sample data, some of which complete the tasks corresponding to the sample data, while some of which fail to complete the tasks corresponding to the sample data. The success rate of the labeling task can be calculated.

[0133] In an exemplary embodiment, the marked interaction round number may be a conversation round number preset according to sample data.

[0134] Based on the actual conversation completion quality and the labeled conversation completion quality corresponding to the sample data, the natural language understanding model, dialogue management model and natural language generation model are trained, and an end-to-end learning framework is constructed. The natural language understanding model, dialogue management model and natural language generation model are jointly optimized as a whole, and the synergy between the modules is explored as much as possible, so that the dialogue system achieves the best overall dialogue quality, breaking the limitations of the pipeline dialogue system and truly realizing end-to-end dialogue modeling.

[0135] In an exemplary embodiment, a natural language understanding model, a dialogue management model, and a natural language generation model are trained based on sample data and response information of the sample data. The natural language understanding model, the dialogue management model, and the natural language generation model may be trained by using at least one training method selected from reinforcement learning, supervised learning, and unsupervised learning.

[0136] In an exemplary embodiment, the natural language understanding model, the dialogue management model and the natural language generation model are trained based on sample data and the response information of the sample data. This can be based on reinforcement learning while integrating supervised learning and unsupervised learning to achieve joint optimization of the natural language understanding model, the dialogue management model and the natural language generation model.

[0137] In some embodiments, the process of the dialogue method mainly includes:

[0138] Based on the input information, the intent and slot value are obtained through the natural language understanding model; the natural language understanding model includes a large language model, and the natural language understanding model is trained based on general conversation data and intent annotation data of the target conversation domain. The target conversation domain refers to the conversation domain to which the input information belongs, and the intent annotation data includes data obtained by annotating the intent and slot value of the sample input data;

[0139] Based on the intent and slot value, the dialogue strategy is determined by the dialogue management model; wherein the dialogue management model is built based on the large language model, and the dialogue management model is trained based on the general dialogue data and the sample dialogue data of the target dialogue domain, and the target dialogue domain refers to the dialogue domain to which the input information belongs;

[0140] Based on the dialogue strategy, response information of the input information is obtained through a natural language generation model, wherein the natural language generation model includes a large language model, and the natural language generation model is trained based on general dialogue data.

[0141] The comprehensive introduction of large language models significantly improves the intelligence level of the dialogue system in core aspects such as semantic understanding, strategy control and language generation, and greatly improves the user experience.

[0142] The natural language understanding model includes a large language model. The natural language understanding model is trained based on general conversation data and the intention annotation data of the target conversation domain. Since the natural language understanding model is trained with general conversation data, it is not limited to a specific domain and does not need to be limited by the scale of annotated data. It can cope with complex and changing conversation scenarios, improve the flexibility and openness of the conversation, improve the generalization ability of the natural language understanding model, and meet the requirements of open domain conversation. Since the natural language understanding model is trained with the intention annotation data of the target conversation domain, it can improve the flexibility and openness of the conversation without affecting the accuracy of the intention recognition in the target conversation domain. Moreover, the natural language understanding model includes a large language model. Thanks to the powerful semantic understanding and generation capabilities of the large language model, the natural language understanding model can accurately understand the user's intention, especially when facing colloquial and non-standard input information, and improve the accuracy of intention recognition.

[0143] The dialogue management model is trained based on general dialogue data and sample dialogue data from the target dialogue domain. Since the dialogue management model is trained with general dialogue data, it is not limited to a specific domain and can cope with complex and changeable dialogue scenarios, improving the flexibility and openness of the dialogue. Since the dialogue management model is trained with sample dialogue data from the target dialogue domain, it can improve the flexibility and openness of the dialogue without affecting the accuracy of the dialogue in the target dialogue domain. Moreover, the dialogue management model is built based on the large language model. Thanks to the powerful semantic understanding and generation capabilities of the large language model, the dialogue management model can accurately grasp the dialogue intention, and use language intelligence close to that of humans to control the strategy, determine the dialogue strategy, and make the dialogue process more natural and smooth. The dialogue management model is built based on the large language model. It is essentially an end-to-end generative model that can break the state space limitations and flexibly cope with unknown situations in open domain dialogues.

[0144] The natural language generation model includes a large language model. The natural language generation model is trained based on general conversation data. Since the natural language generation model is trained using general conversation data, it is not limited to a specific field and does not need to be limited by the scale of annotated data. It can cope with complex and changing conversation scenarios, improve the flexibility and openness of conversations, and improve the generalization ability of the natural language generation model. It can meet the requirements of open domain conversations and enable the natural language generation model to master the language style and strategy of conversation generation. Moreover, the natural language generation model includes a large language model, which can achieve high controllability of the natural language generation model by adjusting the prompt words. Thanks to the powerful semantic understanding and generation capabilities of the large language model, the reply information generated by the natural language generation model is fluent and coherent, achieving high-quality reply generation.

[0145] In summary, in this application, the intent and slot value are identified from the input information, and based on the intent and slot value, the dialogue strategy is determined by the dialogue management model, wherein the dialogue management model is constructed based on the large language model, and the dialogue management model is trained based on the general dialogue data and the sample dialogue data of the target dialogue field. The target dialogue field refers to the dialogue field to which the input information belongs, and based on the dialogue action, the reply information of the input information is generated. The dialogue management model is trained based on the general dialogue data and the sample dialogue data of the target dialogue field. Since the dialogue management model is trained with the general dialogue data, it is not limited to a specific field, can cope with complex and changeable dialogue scenarios, and improve the flexibility and openness of the dialogue. Since the dialogue management model is trained with the sample dialogue data of the target dialogue field, it can improve the flexibility and openness of the dialogue without affecting the accuracy of the dialogue in the target dialogue field. Moreover, the dialogue management model is constructed based on the large language model. Thanks to the powerful semantic understanding and generation capabilities of the large language model, the dialogue management model can accurately grasp the dialogue intention, and perform strategy control with language intelligence close to that of humans, determine the dialogue strategy, and make the dialogue process more natural and smooth.

[0146] Exemplary Devices

[0147] Accordingly, the embodiment of the present application also provides a dialogue device, such as Figure 6 As shown, the dialogue device includes:

[0148] The identification unit 601 is used to identify the intent and the slot value from the input information;

[0149] A processing unit 602 is configured to determine a dialogue strategy through a dialogue management model based on the intent and the slot value; wherein the dialogue management model is constructed based on a large language model, and the dialogue management model is trained based on general dialogue data and sample dialogue data of a target dialogue domain, and the target dialogue domain refers to the dialogue domain to which the input information belongs;

[0150] The generating unit 603 is used to generate reply information of the input information based on the dialogue strategy.

[0151] Optionally, the general conversation data includes unlabeled conversation data of multiple conversation fields; the sample conversation data of the target conversation field includes labeled conversation data of the target conversation field;

[0152] The dialogue device also includes:

[0153] The dialogue management model training unit is used to pre-train the dialogue management model based on the general dialogue data to obtain a pre-trained dialogue management model; based on the sample dialogue data of the target dialogue field, the pre-trained dialogue management model is trained for dialogue strategy prediction to obtain a trained dialogue management model.

[0154] Optionally, the dialogue management model training unit is specifically used to generate a first prompt word based on sample dialogue data in the target dialogue domain; input the first prompt word into the pre-trained dialogue management model to obtain a trained dialogue management model, wherein the first prompt word is used to instruct the pre-trained dialogue management model to perform dialogue strategy prediction training based on sample dialogue data in the target dialogue domain.

[0155] Optionally, the dialogue management model includes a dialogue state tracking sub-model and a dialogue strategy learning sub-model; the dialogue state tracking sub-model includes a large language model; the dialogue strategy learning sub-model includes a large language model;

[0156] The processing unit 602 is specifically configured to obtain a current dialogue state through the dialogue state tracking submodel based on the intention, the slot value and the historical dialogue state; and determine a dialogue strategy through the dialogue strategy learning submodel based on the current dialogue state.

[0157] Optionally, the dialogue device further comprises:

[0158] A retrieval unit is used to retrieve and determine the dialogue strategy from external data and / or historical dialogue data of the input information based on the intention and the slot value when the dialogue strategy cannot be determined by the dialogue management model.

[0159] Optionally, the recognition unit 601 is specifically used to obtain the intent and slot value through a natural language understanding model based on the input information; wherein the natural language understanding model includes a large language model, and the natural language understanding model is trained based on the general conversation data and the intent annotation data of the target conversation field, and the intent annotation data includes data obtained by annotating the intent and slot value of the sample input data.

[0160] Optionally, the generation unit 603 is specifically configured to obtain response information of the input information through a natural language generation model based on the dialogue strategy, wherein the natural language generation model includes a large language model, and the natural language generation model is trained based on the general dialogue data.

[0161] Optionally, the dialogue device further comprises:

[0162] A joint training unit is used to obtain sample intent and sample slot values ​​through a natural language understanding model based on sample data; determine a sample dialogue strategy through the dialogue management model based on the sample intent and the sample slot value; obtain reply information of the sample data through a natural language generation model based on the sample dialogue strategy; obtain actual dialogue completion quality based on the sample data and the reply information of the sample data; and train the natural language understanding model, the dialogue management model, and the natural language generation model based on the actual dialogue completion quality and the labeled dialogue completion quality corresponding to the sample data.

[0163] The dialogue device provided in this embodiment belongs to the same application concept as the dialogue method provided in the above embodiments of this application, can execute the dialogue method provided in any of the above embodiments of this application, and has the corresponding functional modules and beneficial effects of executing the dialogue method. For technical details not fully described in this embodiment, please refer to the specific processing content of the dialogue method provided in the above embodiments of this application, and will not be repeated here.

[0164] The functions implemented by the above identification unit 601, processing unit 602 and generation unit 603 can be implemented by the same or different processors respectively, which is not limited in the embodiment of the present application.

[0165] It should be understood that the units in the above devices can be implemented in the form of a processor calling software. For example, the device includes a processor, the processor is connected to a memory, and instructions are stored in the memory. The processor calls the instructions stored in the memory to implement any of the above methods or realize the functions of each unit of the device, wherein the processor can be a general-purpose processor, such as a CPU or a microprocessor, etc., and the memory can be a memory in the device or a memory outside the device. Alternatively, the units in the device can be implemented in the form of hardware circuits, and the functions of some or all units can be realized by designing the hardware circuits. The hardware circuit can be understood as one or more processors; for example, in one implementation, the hardware circuit is an ASIC, and the functions of some or all of the above units are realized by designing the logical relationship of the components in the circuit; for another example, in another implementation, the hardware circuit can be implemented by PLD, taking FPGA as an example, which can include a large number of logic gate circuits, and the connection relationship between the logic gate circuits is configured by the configuration file, so as to realize the functions of some or all of the above units. All units of the above devices can be implemented in the form of a processor calling software, or in the form of hardware circuits, or in part by a processor calling software, and the remaining part is implemented in the form of hardware circuits.

[0166] In an embodiment of the present application, a processor is a circuit with the ability to process signals. In one implementation, the processor may be a circuit with the ability to read and run instructions, such as a CPU, a microprocessor, a GPU, or a DSP; in another implementation, the processor may implement certain functions through the logical relationship of a hardware circuit, and the logical relationship of the hardware circuit is fixed or reconfigurable, such as a hardware circuit implemented by an ASIC or PLD, such as an FPGA. In a reconfigurable hardware circuit, the process of the processor loading a configuration document to implement the hardware circuit configuration can be understood as the process of the processor loading instructions to implement the functions of some or all of the above units. In addition, it can also be a hardware circuit designed for artificial intelligence, which can be understood as an ASIC, such as an NPU, TPU, DPU, etc.

[0167] It can be seen that each unit in the above device can be one or more processors (or processing circuits) configured to implement the above method, such as: CPU, GPU, NPU, TPU, DPU, microprocessor, DSP, ASIC, FPGA, or a combination of at least two of these processor forms.

[0168] In addition, all or part of the units in the above device can be integrated together, or can be implemented independently. In one implementation, these units are integrated together and implemented in the form of a SOC. The SOC may include at least one processor for implementing any of the above methods or implementing the functions of each unit of the device. The type of the at least one processor may be different, for example, including a CPU and an FPGA, a CPU and an artificial intelligence processor, a CPU and a GPU, etc.

[0169] Exemplary Electronic Devices

[0170] Another embodiment of the present application also provides an electronic device, see Figure 7 As shown, the device includes:

[0171] Memory 200 and processor 210;

[0172] The memory 200 is connected to the processor 210 and is used to store programs;

[0173] The processor 210 is used to implement the dialogue method disclosed in any of the above embodiments by running the program stored in the memory 200.

[0174] Specifically, the electronic device may further include: a bus, a communication interface 220 , an input device 230 and an output device 240 .

[0175] The processor 210, the memory 200, the communication interface 220, the input device 230 and the output device 240 are connected to each other via a bus.

[0176] A bus may include a pathway that transfers information between components of a computer system.

[0177] The processor 210 may be a general-purpose processor, such as a general-purpose central processing unit (CPU), a microprocessor, etc., or an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the scheme of the present invention. It may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0178] The processor 210 may include a main processor, and may also include a baseband chip, a modem, and the like.

[0179] The memory 200 stores a program for executing the technical solution of the present invention, and may also store an operating system and other key services. Specifically, the program may include a program code, and the program code includes a computer operation instruction. More specifically, the memory 200 may include a read-only memory (ROM), other types of static storage devices that can store static information and instructions, a random access memory (RAM), other types of dynamic storage devices that can store information and instructions, a disk storage, a flash, and the like.

[0180] The input device 230 may include a device for receiving data and information input by a user, such as a keyboard, a mouse, a camera, a scanner, a light pen, a voice input device, a touch screen, a pedometer, or a gravity sensor.

[0181] Output device 240 may include devices that allow information to be output to a user, such as a display screen, printer, speaker, etc.

[0182] The communication interface 220 may include any transceiver or the like to communicate with other devices or communication networks, such as Ethernet, Radio Access Network (RAN), Wireless Local Area Network (WLAN), etc.

[0183] The processor 210 executes the program stored in the memory 200 and calls other devices, which can be used to implement each step of any dialogue method provided in the above embodiments of the present application.

[0184] Exemplary computer program products and storage media

[0185] In addition to the above-mentioned methods and devices, an embodiment of the present application may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the dialogue method according to various embodiments of the present application described in any of the above-mentioned embodiments of this specification.

[0186] The computer program product may be written in any combination of one or more programming languages ​​to write program codes for performing the operations of the embodiments of the present application, including object-oriented programming languages, such as Java, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as an independent software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0187] In addition, the embodiment of the present application may also be a storage medium, on which a computer program is stored, and the computer program is executed by a processor to execute the steps of the dialogue method according to various embodiments of the present application described in any of the above embodiments of this specification, and specifically the following steps may be implemented:

[0188] Step 101, identifying intent and slot value from input information.

[0189] Step 102: Determine the dialogue strategy through the dialogue management model based on the intent and the slot value.

[0190] Among them, the dialogue management model is built based on a large language model, and the dialogue management model is trained based on general dialogue data and sample dialogue data in the target dialogue domain. The target dialogue domain refers to the dialogue domain to which the input information belongs.

[0191] Step 103: Generate reply information for the input information based on the dialogue strategy.

[0192] For the aforementioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the order of the actions described, because according to the present application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0193] It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0194] The steps in the methods of each embodiment of the present application can be adjusted in order, combined and deleted according to actual needs, and the technical features recorded in each embodiment can be replaced or combined.

[0195] The modules and sub-modules in the devices and terminals in the various embodiments of the present application can be combined, divided and deleted according to actual needs.

[0196] In the several embodiments provided in the present application, it should be understood that the disclosed terminals, devices and methods can be implemented in other ways. For example, the terminal embodiments described above are only schematic, for example, the division of modules or submodules is only a logical function division, and there may be other division methods in actual implementation, for example, multiple submodules or modules can be combined or integrated into another module, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.

[0197] The modules or submodules described as separate components may or may not be physically separated, and the components of the modules or submodules may or may not be physical modules or submodules, that is, they may be located in one place, or they may be distributed on multiple network modules or submodules. Some or all of the modules or submodules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0198] In addition, each functional module or submodule in each embodiment of the present application may be integrated into one processing module, or each module or submodule may exist physically separately, or two or more modules or submodules may be integrated into one module. The above-mentioned integrated modules or submodules may be implemented in the form of hardware or in the form of software functional modules or submodules.

[0199] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0200] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly by hardware, software units executed by a processor, or a combination of the two. The software units may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0201] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0202] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A conversation method, characterized in that: include: Identify intent and slot values ​​from input information; Based on the intention and the slot value, determining a dialogue strategy through a dialogue management model; wherein the dialogue management model is constructed based on a large language model, and the dialogue management model is trained based on general dialogue data and sample dialogue data of a target dialogue domain, and the target dialogue domain refers to the dialogue domain to which the input information belongs; Based on the dialogue strategy, reply information of the input information is generated.

2. The method according to claim 1, characterized in that The general conversation data includes unlabeled conversation data in multiple conversation fields; The sample conversation data of the target conversation domain includes labeled conversation data of the target conversation domain; The training process of the dialogue management model includes: Pre-training the dialogue management model based on the general dialogue data to obtain a pre-trained dialogue management model; Based on the sample dialogue data in the target dialogue domain, the pre-trained dialogue management model is trained for dialogue strategy prediction to obtain a trained dialogue management model.

3. The method according to claim 2, characterized in that The step of performing dialogue strategy prediction training on the pre-trained dialogue management model based on the sample dialogue data in the target dialogue domain to obtain the trained dialogue management model includes: generating a first prompt word based on the sample conversation data in the target conversation domain; The first prompt word is input into the pre-trained dialogue management model to obtain a trained dialogue management model, wherein the first prompt word is used to instruct the pre-trained dialogue management model to perform dialogue strategy prediction training based on sample dialogue data in the target dialogue domain.

4. The method according to claim 1, characterized in that: The dialogue management model includes a dialogue state tracking sub-model and a dialogue strategy learning sub-model; the dialogue state tracking sub-model includes a large language model; the dialogue strategy learning sub-model includes a large language model; The determining of the dialogue strategy through the dialogue management model based on the intention and the slot value includes: Based on the intention, the slot value and the historical dialog state, obtaining the current dialog state through the dialog state tracking sub-model; Based on the current dialog state, a dialog strategy is determined by using the dialog strategy learning sub-model.

5. The method according to claim 1, characterized in that The method further comprises: In the case where the dialogue strategy cannot be determined by the dialogue management model, the dialogue strategy is determined by retrieving from external data and / or historical dialogue data of the input information based on the intention and the slot value.

6. The method according to claim 1, characterized in that The identifying the intent and the slot value from the input information includes: Based on the input information, the intent and slot value are obtained through a natural language understanding model; wherein the natural language understanding model includes a large language model, and the natural language understanding model is trained based on the general conversation data and the intent annotation data of the target conversation field, and the intent annotation data includes data obtained by annotating the intent and slot value of the sample input data.

7. The method according to claim 1, characterized in that The step of generating reply information to the input information based on the dialogue strategy includes: Based on the dialogue strategy, reply information of the input information is obtained through a natural language generation model, wherein the natural language generation model includes a large language model, and the natural language generation model is trained based on the general dialogue data.

8. The method according to claim 1, characterized in that The method further comprises: Based on the sample data, the sample intent and sample slot value are obtained through the natural language understanding model; Based on the sample intent and the sample slot value, determining a sample dialogue strategy through the dialogue management model; Based on the sample dialogue strategy, obtaining reply information of the sample data through a natural language generation model; Based on the sample data and the reply information of the sample data, obtaining the actual conversation completion quality; The natural language understanding model, the dialogue management model and the natural language generation model are trained based on the actual dialogue completion quality and the annotated dialogue completion quality corresponding to the sample data.

9. A conversation device, characterized in that: include: A recognition unit, used to recognize the intent and slot value from the input information; a processing unit, configured to determine a dialogue strategy through a dialogue management model based on the intent and the slot value; wherein the dialogue management model is constructed based on a large language model, and the dialogue management model is trained based on general dialogue data and sample dialogue data of a target dialogue domain, and the target dialogue domain refers to the dialogue domain to which the input information belongs; A generating unit is used to generate reply information of the input information based on the dialogue strategy.

10. An electronic device, characterized in that: including memory and processor; The memory is connected to the processor and is used to store programs; The processor is used to implement the dialogue method according to any one of claims 1 to 8 by running the program in the memory.

11. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by the processor, the dialogue method according to any one of claims 1 to 8 is implemented.

12. A computer program product, characterized in that The method comprises computer program instructions, which, when executed by a processor, enable the processor to perform the dialog method according to any one of claims 1 to 8.

Citation Information

Cited By

  • Event-based sample adaptive management method and device

    CN121501960A