Multi-round dialogue method and system for complex field

Through the combination of fuzzy dialogue rewriting generation model, domain recognition model and precise dialogue rewriting generation model, the problems of poor generalization, difficulty in semantic judgment and inaccurate domain switching in complex fields are solved, and a more efficient and stable dialogue rewriting effect is achieved.

CN120106090APending Publication Date: 2025-06-06PANOVASIC TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510176584.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-18
Publication Date
2025-06-06

AI Technical Summary

Technical Problem

The existing multi-round dialogue rewriting methods have problems in complex fields that are poor generalization, cannot accurately judge sentence semantics when the current dialogue information is seriously missing, and poor dialogue rewriting effect when domain switching.

Method used

The fuzzy dialogue rewriting generation model is used to generate rewrite statements that do not contain specific missing information, the domain identification model is used to judge the domain categories of rewrite statements and historical conversations, and the precise dialogue rewriting generation model is used to generate complete rewrite statements in the same field.

Benefits of technology

Effectively complement the semantic characteristics of missing information sentences, improve the generation effect of rewritten sentences, solve the problem of inaccurate rewritten sentences caused by domain switching, and improve the generalization and stability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120106090A_ABST
    Figure CN120106090A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of natural language processing, discloses a multi-round dialogue method and system for a complex field, and solves the problems that a multi-round dialogue rewriting scheme in the prior art is poor in generalization, sentence semantics cannot be accurately judged when current dialogue information is seriously lost, and the dialogue rewriting effect is poor during field switching. The method comprises the following steps: firstly, acquiring a current session and a historical session of a user, and respectively converting the sessions into vector representations; then generating a rewritten statement which does not contain specific missing information by using a fuzzy dialogue rewriting generation model, and replacing the position of the missing information with a slot label of the missing information; if the rewritten statements have the slot labels, respectively acquiring the field categories of the rewritten statements and the historical sessions by utilizing a field identification model; when it is judged that the fields are the same, the accurate dialogue rewriting generation model is used for obtaining a complete rewriting statement, and finally based on the complete rewriting statement, a reply generation model is used for outputting a reply verbal skill. The method is suitable for multi-round dialogue reply generation in the complex field.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of natural language processing, and in particular relates to a multi-round dialogue method and system for complex fields. Background Art

[0002] Multi-round human-computer dialogue, also known as continuous dialogue or multi-round dialogue, refers to a dialogue process that is not limited to a single question-and-answer interaction in the process of human-computer interaction, but consists of multiple question-and-answer rounds. This dialogue mode allows users to ask multiple questions or conduct multiple rounds of communication in a continuous dialogue environment. The system can understand and respond based on contextual information, thereby providing a more natural and smooth communication experience. In the process of multi-round dialogue, users may use pronoun references and information omissions, which will lead to problems such as ambiguous sentence meanings, unclear references, and incomplete sentence components. The ambiguity of this expression form poses a huge challenge to the semantic understanding part of the system, which in turn affects the overall quality of the dialogue.

[0003] Human-computer multi-round dialogue rewriting refers to rewriting the semantically missing text currently input by the user in combination with the user's previous round or previous rounds of historical conversations, restoring its reference or default information so that the system can better understand the user's true intention. Currently, the commonly used multi-round dialogue rewriting methods include rule-based dialogue rewriting methods, end-to-end model-based dialogue rewriting methods, and large model-based dialogue rewriting methods, as follows:

[0004] The rule-based dialogue rewriting method first performs semantic analysis on the user's current sentence, and then rewrites the sentence according to a set of rule systems based on historical conversations; this method relies too much on the rule system and lacks generalization.

[0005] The conversation rewriting method based on the end-to-end model is to directly pass the historical conversation and the current user conversation into the end-to-end model to obtain the rewriting result; this method cannot effectively handle the problem of domain conversion between the historical conversation and the current round of conversation.

[0006] The conversation rewriting method based on the big model inputs the historical conversation, the user's current conversation and the edited prompt into the big model to obtain the conversation rewriting result. This method requires a large amount of training corpus and running computing power, and is limited by the quality of the prompt, so the generated results are not very stable.

[0007] In the prior art, the invention with publication number CN115730052A proposes an end-to-end dialogue rewriting method, system and medium that integrates dialogue detection. The invention first uses a detector to output a state label for each word currently input by the user to determine whether there is content that needs to be supplemented in the sentence. If dialogue rewriting is required, the historical conversation and the sentence are input into the Transformer-based dialogue rewriting model to obtain the rewriting result. This method does not perform domain intent recognition on historical conversations and current conversations, and is prone to inserting entity information that is irrelevant to the intention of the current round of dialogue into the sentence to be rewritten, resulting in poor dialogue rewriting generation effect.

[0008] The invention with publication number CN116028606A proposes a method for rewriting multi-round human-computer dialogues based on Transformer pointer extraction. The invention first uses a semantic relevance recognition network to detect the semantic relevance of the user's current input and historical conversations, and then inputs the current conversation and historical conversation with semantic relevance into a semantic missing rewriting network to obtain the rewriting result. However, in general, sentences with references or missing information are often semantically unclear, so it is easy to make mistakes in the semantic relevance detection stage, which affects the subsequent steps.

[0009] In summary, the existing multi-round dialogue rewriting methods have the following defects:

[0010] 1. The rule-based multi-round dialogue rewriting method relies too much on the rule engine, which requires a lot of time and manpower to maintain the rule system for a long time, and lacks generalization.

[0011] 2. The dialogue rewriting method based on large models requires a large amount of training corpus and running computing power, and has high requirements for the model running environment. The model effect is limited by the prompt setting, and the output results are random and lack stability.

[0012] 3. For multi-round conversations in complex fields, when the current conversation information is severely missing, it is impossible to accurately judge its semantic relationship with historical conversations and the domain to which it belongs, which affects the effect of the conversation rewriting module. Summary of the invention

[0013] The technical problem to be solved by the present invention is to propose a multi-round dialogue method and system for complex fields, so as to solve the problems of poor generalization of multi-round dialogue rewriting solutions in the prior art, inability to accurately judge sentence semantics when current dialogue information is severely missing, and poor dialogue rewriting effect when switching fields.

[0014] The technical solution adopted by the present invention to solve the above technical problems is:

[0015] On the one hand, the present invention provides a multi-round dialogue method for complex fields, comprising the following steps:

[0016] S1. Obtain the user's current session and historical sessions, and convert them into vector representations respectively;

[0017] S2. Based on the current conversation vector and the historical conversation vector, the fuzzy conversation rewriting generation model is used to generate a rewritten sentence that does not contain specific missing information. The position of the missing information is replaced by the slot label of the missing information.

[0018] S3, determining whether the rewritten statement output in step S2 contains the slot label of the missing information, if so, proceeding to step S4, otherwise, determining that the rewritten statement is a complete rewritten statement, proceeding to step S7;

[0019] S4, based on the rewritten sentences and user historical conversations containing the slot labels of the missing information, the domain categories of the rewritten sentences and historical conversations are obtained respectively using the domain identification model;

[0020] S5, determine whether the domain category of the rewritten statement is the same as that of the historical conversation, if so, proceed to step S6, otherwise, return the rule script to the user to inquire about the missing information, and return to step S1;

[0021] S6. Based on the rewritten sentences and historical conversations belonging to the same domain, the accurate dialogue rewriting generation model is used to obtain the complete rewritten sentences, which contain specific missing information;

[0022] S7. Based on the complete rewritten sentence, use the reply generation model to output the reply words.

[0023] Furthermore, in step S1, the user's current session and historical session are respectively converted into vector representations through a pre-trained language model, and the pre-trained language model is an autoregressive pre-trained language model with unidirectional feature representation, or an autoencoding pre-trained language model with bidirectional feature representation, or an autoregressive pre-trained language model with bidirectional feature representation.

[0024] Further, in step S2, the fuzzy dialogue rewriting generation model includes an encoding layer, a core network layer and a decoding layer;

[0025] The encoding layer adopts a deep neural network structure to convert the input semantic vector representation into a high-dimensional feature vector;

[0026] The core network layer is based on a neural network structure including an attention mechanism and an autoencoder, which captures missing information in the current session from a high-dimensional feature vector and generates a rewritten intermediate vector representation;

[0027] The decoding layer converts the rewritten intermediate vector representation into an output sequence containing information labels based on a decoder.

[0028] Furthermore, in step S2, the slot label is formed by concatenating the category, part of speech and sentence component of the missing information through pre-defined corresponding character strings.

[0029] Furthermore, the category of the missing information includes entity reference or information missing; the part of speech includes noun, verb or pronoun; and the sentence component includes subject, predicate, object or attributive.

[0030] Furthermore, in step S4, the domain recognition model includes a trained historical conversation domain recognition model and a fuzzy rewritten sentence domain recognition model; the historical conversation domain recognition model uses historical conversation data extracted from the training data of the fuzzy conversation rewriting generation model and the annotated domain labels as training samples, and the fuzzy rewritten sentence domain recognition model uses the rewritten sentences containing slot labels with missing information extracted from the training data of the fuzzy conversation rewriting generation model and the annotated domain labels as training samples.

[0031] Furthermore, in step S4, the domain recognition model is used to obtain the domain categories of the rewritten sentences and historical conversations respectively, including: inputting the rewritten sentences containing slot labels with missing information into the trained fuzzy rewritten sentence domain recognition model to obtain the domain category of the rewritten sentences; inputting the historical conversations into the trained historical conversation domain recognition model to obtain the domain category of the historical conversations.

[0032] Further, in step S6, the accurate dialogue rewriting generation model includes an encoding layer, a core network layer and a decoding layer;

[0033] The encoding layer adopts a deep neural network structure to convert the input rewritten sentences and historical conversations belonging to the same field into high-dimensional feature vectors;

[0034] The core network layer is based on a neural network structure including an attention mechanism and an autoencoder, which captures semantic relevance from high-dimensional feature vectors and generates intermediate feature representations in combination with domain information;

[0035] The decoding layer generates a complete rewritten sentence including specific missing information based on the intermediate feature representation by the decoder.

[0036] Furthermore, the decoding layers in the fuzzy dialogue rewriting generation model and the precise dialogue rewriting generation model both use seq2seq decoders.

[0037] On the other hand, the present invention also provides a multi-round dialogue system for complex fields, comprising:

[0038] The session acquisition unit is used to acquire the user's current session and historical sessions and convert them into vector representations respectively;

[0039] A fuzzy rewriting unit is used to generate a rewritten sentence that does not contain specific missing information based on the current conversation vector and the historical conversation vector using the fuzzy dialogue rewriting generation model, and the position of the missing information is replaced by the slot label of the missing information;

[0040] The rewriting judgment unit is used to judge whether the rewriting sentence output by the fuzzy rewriting unit contains the missing information slot label. If not, it jumps to the reply generation unit. If it does, it jumps to the domain classification unit.

[0041] A domain classification unit is used to obtain the domain categories of the rewritten sentences and the historical conversations of the user based on the rewritten sentences containing the slot labels containing the missing information and the historical conversations of the user using the domain recognition model;

[0042] The domain identification unit is used to determine whether the domain categories of the rewritten statement and the historical conversation are the same. If they belong to different domain categories, the rule script for asking for missing information is returned to the user and the user is redirected to the conversation acquisition unit. If they belong to the same domain, the user is redirected to the precise rewriting unit.

[0043] The precise rewriting unit is used to obtain a complete rewritten sentence based on the rewritten sentences and historical conversations belonging to the same field using the precise dialogue rewriting generation model, which contains specific missing information;

[0044] The reply generation unit is used to output reply words based on the complete rewritten sentence using the reply generation model.

[0045] The beneficial effects of the present invention are:

[0046] (1) The fuzzy dialogue rewriting model is used to generate reference labels for missing information, thereby effectively completing the semantic features of sentences with missing information and avoiding rewriting errors caused by unclear semantics.

[0047] (2) Based on the fuzzy dialogue rewriting model, domain identification model and precise dialogue rewriting model, a multi-round dialogue rewriting framework for complex domains was constructed. It can accurately judge the domain relationship between the current user conversation and the historical conversation, thereby improving the generation effect of rewritten sentences and effectively solving the problem of inaccurate rewritten sentences caused by domain switching in multi-round dialogue scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 This is a flow chart of a multi-round dialogue method for complex fields in Embodiment 1 of the present invention;

[0049] Figure 2 This is a structural diagram of a multi-round dialogue system for complex fields in Example 2 of the present invention. DETAILED DESCRIPTION

[0050] The present invention aims to provide a multi-round dialogue method and system for complex fields, which solves the problems of poor generalization, inability to accurately judge the semantics of sentences when the current dialogue information is seriously missing, and poor dialogue rewriting effect when the field is switched. The core idea is:

[0051] Based on the fuzzy dialogue rewriting model, it can identify the missing information in the user's current conversation and replace it with slot labels, clarifying the location and type of the missing information, thereby retaining the integrity of the semantic structure in the initial rewriting stage. This mechanism avoids the errors that may be caused by directly generating complete sentences, and provides a clear framework for the subsequent precise rewriting achieved using the precise dialogue rewriting model.

[0052] Based on the domain recognition model, the rewritten statements and historical conversations can be classified into domains and judged whether they belong to the same domain. This mechanism effectively solves the problem of inaccurate rewritten statements caused by domain switching in the prior art. When the rewritten statement and the historical conversation belong to different domains, the system will return the rule script to inquire about the missing information and re-acquire the user input, thereby avoiding rewriting errors caused by inconsistent domains. This dynamic adjustment mechanism enables the system to better adapt to complex and changing dialogue scenarios.

[0053] Through the model-based rewriting method, the dependence on the rule engine and prompt settings is reduced, and the generalization ability of the system is improved. The combination of the fuzzy dialogue rewriting model and the precise dialogue rewriting model enables the system to adapt to more diverse inputs, improve the generalization of the system, and ensure the stability of the output results.

[0054] The present invention reduces the demand for training corpus and operation computing power through phased processing and domain identification mechanism. The combination of fuzzy dialogue rewriting model and domain identification model enables the system to achieve efficient dialogue rewriting with less resources.

[0055] In summary, the present invention constructs a multi-round dialogue rewriting framework for complex fields by introducing a fuzzy dialogue rewriting model, a domain identification model, and a precise dialogue rewriting model. This framework not only effectively solves the problems of semantic ambiguity, inaccurate domain switching, dependence on rules and prompts in the prior art, but also improves the generalization, stability and practicality of the system. Therefore, the present invention can better adapt to complex and changeable natural language interaction scenarios and provide users with a more natural and smooth dialogue experience.

[0056] The scheme of the present invention is further described below in conjunction with the accompanying drawings and embodiments.

[0057] Example 1

[0058] This embodiment provides a multi-round dialogue method for complex fields. Figure 1 , including the following steps:

[0059] Step 101: Obtain the user's current session and historical sessions, and convert the current session and historical sessions into vector representations.

[0060] In this step, after obtaining the user's current session and historical session, the user's current session and historical session are respectively converted into vector representations through a pre-trained language model. In an exemplary embodiment, the pre-trained language model can be an autoregressive pre-trained language model with unidirectional feature representation, or an autoencoding pre-trained language model with bidirectional feature representation, or an autoregressive pre-trained language model with bidirectional feature representation.

[0061] The method of the autoregressive pre-trained language model with unidirectional feature representation is specifically to extract the features of the pre-trained corpus text in a unidirectional manner, such as the ELMO model, the ULMFiT model, the GPT-2 model, etc.

[0062] The method of the self-encoding pre-trained language model of the bidirectional feature representation is mainly based on the BERT pre-trained language model, and its derivative models include the ERINE model, the RoBERTa model and the spanBERT model.

[0063] The autoregressive pre-trained language model with bidirectional feature representation specifically introduces dual attention flow and transformer mechanism into the model, and representative models include XLNet and the like.

[0064] Step 102: Input the user's current conversation vector representation and the historical conversation vector representation into the fuzzy dialogue rewriting generation model to generate a rewritten sentence that does not contain specific missing information, and the position of the missing information is replaced by the slot label of the missing information.

[0065] In this step, the fuzzy dialogue rewriting generation model is used to generate rewritten sentences that do not contain specific missing information, which is pre-built and trained. In an exemplary embodiment, building a fuzzy dialogue rewriting generation model includes: building a model encoding layer, building a fuzzy dialogue rewriting core network layer, building a model decoding layer, setting a loss function, and setting a model iterative update method.

[0066] The method for constructing a model encoding layer includes: using a deep neural network structure to convert an input semantic vector representation into a high-dimensional feature vector for processing by a subsequent network layer.

[0067] The method for constructing a core network layer for fuzzy dialogue rewriting specifically designs a neural network layer including an attention mechanism and an autoencoder to capture missing information in the current conversation and generate an intermediate vector representation for rewriting.

[0068] The method for constructing a model decoding layer specifically adopts a seq2seq decoder to convert the intermediate vector representation of the previous network layer into an output sequence containing information labels. The seq2seq decoder adopted includes: a decoding layer of a Transformer network structure and a decoding layer of a generative adversarial network (GAN) structure.

[0069] The method for setting the loss function is specifically to use a maximum margin loss function or a cross entropy loss function to calculate the difference between the true value and the predicted value.

[0070] The method for setting the iterative update of the model specifically uses a back-propagation algorithm and a gradient descent optimizer to update the parameters of the model according to the gradient of the loss function, and iteratively optimizes the rewriting performance of the model.

[0071] After building the fuzzy dialogue rewriting generation model, you also need to define the missing information slot labels, construct data for training the fuzzy dialogue rewriting generation model, and train the fuzzy dialogue rewriting model.

[0072] Among them, the method for defining the missing information slot label includes: defining the missing information category, defining the missing information part of speech, and defining the sentence component to which the missing information belongs. The method for defining the missing information category is specifically to define the missing information category as entity reference, information missing, etc., and represent them respectively with specific character strings. The method for defining the missing information part of speech is specifically to define the missing information part of speech as noun, verb, pronoun, etc., and represent them respectively with specific character strings. The method for defining the sentence component to which the missing information belongs is specifically to define the sentence component to which the missing information belongs as subject, predicate, object, attributive, etc., and represent them respectively with specific character strings. Finally, the three specific character strings are concatenated to obtain the missing information slot label.

[0073] The structure is used to train data of a fuzzy dialogue rewriting generation model, including input data of the model: user historical conversations, user current conversations, and output data of the model: fuzzy rewritten conversations containing missing information slot labels.

[0074] For example, when constructing a set of training corpus, the input data is {"history":"user: Query the weather. System: Where do you want to query the weather?", "query:":"Chengdu's weather"}, and the output data is {"rewrite":"missing_verb_predicateChengdu's weather"}. In the output data, "missing_verb_predicate" is the missing information slot label, which means that the missing information category is "missing information", the missing information part of speech is "verb", and the sentence component to which the missing information belongs is "predicate".

[0075] Step 103 , determine whether the rewrite statement output in step 102 contains the missing information slot label, if not, jump to step 107 , if yes, jump to step 104 .

[0076] In this step, if the rewritten sentence outputted in step 102 contains the missing information slot label, it means that the rewritten sentence contains missing information, but at this time the location and type of the missing information are clear, and the specific content of the missing information needs to be accurately identified in subsequent steps, then go to step 104; on the contrary, if it does not contain the missing information slot label, it means that the rewritten sentence is complete and can be used as the input of the response generation model, then go to step 107.

[0077] Step 104: Input the rewritten sentence containing the missing information slot label in step 103 and the user's historical conversation into the domain recognition model, and output the domain categories of the rewritten sentence and the historical conversation respectively.

[0078] In this step, the domain recognition model is used to generate the domain category of the corresponding conversation. In an exemplary implementation, it is necessary to predefine the domain category, build a domain recognition model, build training data and then conduct training; the domain recognition model includes a historical conversation domain recognition model and a fuzzy rewriting sentence domain recognition model.

[0079] When constructing training data, extract the user's historical conversations from the data used to train the fuzzy dialogue rewriting generation model constructed in the previous step, and annotate them with domain labels as training data for the historical conversation domain recognition model; extract the fuzzy rewritten conversations containing missing information slot labels, and annotate them with domain labels as training data for the fuzzy rewritten sentence domain recognition model containing missing information slot labels. Then, use the corresponding training data to train the historical conversation domain recognition model and the fuzzy rewritten sentence domain recognition model respectively.

[0080] Based on the trained historical conversation domain recognition model and fuzzy rewritten sentence domain recognition model, the rewritten sentence containing the missing information slot label is input into the fuzzy rewritten sentence domain recognition model to obtain the domain category of the rewritten sentence, and the user's historical conversation is input into the historical conversation domain recognition model to obtain the domain category of the historical conversation.

[0081] Step 105 , determine whether the domain categories of the rewritten statement and the historical conversation are the same. If they belong to different domain categories, return the rule words to the user to inquire about the missing information and jump to step 101 ; if they belong to the same domain, jump to step 106 .

[0082] In this step, if the domain categories of the rewritten sentence and the historical conversation are different, in order to avoid rewriting errors caused by inconsistent domains, it is necessary to confirm the specific missing information of the current question with the user, and then return the rule dialogue for asking for the missing information to the user, and jump to step 101. If the domain categories of the rewritten sentence and the historical conversation are the same, a complete rewritten sentence can be generated through the subsequent precise dialogue rewriting model, and then go to step 106.

[0083] Step 106: Input the rewritten sentences and historical conversations belonging to the same domain into the precise dialogue rewriting generation model to obtain a complete rewritten sentence containing the missing information.

[0084] In this step, the precise dialogue rewriting generation model is used to generate a complete rewritten sentence, which is pre-built and trained. In an exemplary embodiment, building the precise dialogue rewriting generation model includes: building a model encoding layer, building a precise dialogue rewriting core network layer, building a model decoding layer, setting a loss function, and setting a model iterative update method.

[0085] Among them, the encoding layer adopts a deep neural network structure to convert the input rewritten sentences and historical conversations belonging to the same field into high-dimensional feature vectors; the precise dialogue rewriting core network layer is based on a neural network structure including an attention mechanism and an autoencoder to capture semantic relevance from high-dimensional feature vectors and generate intermediate feature representations in combination with domain information; the decoding layer generates a complete rewritten sentence including specific missing information based on the decoder according to the intermediate feature representation.

[0086] Step 107: Input the complete rewritten sentence into the reply generation model and output the reply words.

[0087] In this step, the complete rewritten sentence determined in step 103 or the complete rewritten sentence processed in step 106 is used as the input of the reply generation model to output the corresponding reply words.

[0088] According to the method provided in this embodiment, by introducing a fuzzy dialogue rewriting generation model and constructing a multi-round dialogue rewriting framework for complex fields, the domain relationship between the current user conversation and the historical conversation can be accurately judged, thereby improving the generation effect of the rewritten sentences, and effectively solving the problem of inaccurate rewritten sentences caused by domain switching in multi-round dialogue scenarios.

[0089] Example 2

[0090] This embodiment provides a multi-round dialogue system for complex fields. Figure 2 , which includes:

[0091] The session acquisition unit is used to acquire the user's current session and historical sessions and convert them into vector representations respectively;

[0092] A fuzzy rewriting unit is used to generate a rewritten sentence that does not contain specific missing information based on the current conversation vector and the historical conversation vector using the fuzzy dialogue rewriting generation model, and the position of the missing information is replaced by the slot label of the missing information;

[0093] The rewriting judgment unit is used to judge whether the rewriting sentence output by the fuzzy rewriting unit contains the missing information slot label. If not, it jumps to the reply generation unit. If it does, it jumps to the domain classification unit.

[0094] A domain classification unit is used to obtain the domain categories of the rewritten sentences and the historical conversations of the user based on the rewritten sentences containing the slot labels containing the missing information and the historical conversations of the user using the domain recognition model;

[0095] The domain identification unit is used to determine whether the domain categories of the rewritten statement and the historical conversation are the same. If they belong to different domain categories, the rule script for asking for missing information is returned to the user and the user is redirected to the conversation acquisition unit. If they belong to the same domain, the user is redirected to the precise rewriting unit.

[0096] The precise rewriting unit is used to obtain a complete rewritten sentence based on the rewritten sentences and historical conversations belonging to the same field using the precise dialogue rewriting generation model, which contains specific missing information;

[0097] The reply generation unit is used to output reply words based on the complete rewritten sentence using the reply generation model.

[0098] Since the functional modules of the dialogue system in this embodiment correspond to the step description of the dialogue method in Example 1, the specific implementation of the method steps has been described in Example 1, so the specific implementation of each functional module will not be repeated here. It should be noted that the various units in this embodiment are logical, and in the specific implementation process, one unit can be split into multiple units, and multiple units can also be combined into one unit.

[0099] Based on the system provided in this embodiment, the system introduces a fuzzy dialogue rewriting generation model and constructs a multi-round dialogue rewriting framework for complex fields, accurately judging the domain relationship between the current user conversation and the historical conversation, thereby improving the generation effect of the rewritten sentences and effectively solving the problem of inaccurate rewritten sentences caused by domain switching in multi-round dialogue scenarios.

[0100] Finally, it should be noted that the above embodiments are only preferred implementations and are not intended to limit the present invention. It should be pointed out that for those skilled in the art, several modifications, equivalent replacements, improvements, etc. can be made without departing from the scope of the present invention and the scope of protection of the claims, and all of these should be included in the protection scope of the present invention.

Claims

1. A multi-round dialogue method for complex fields, characterized in that: The following steps are involved: S1. Obtain the user's current session and historical sessions, and convert them into vector representations respectively; S2. Based on the current conversation vector and the historical conversation vector, the fuzzy conversation rewriting generation model is used to generate a rewritten sentence that does not contain specific missing information. The position of the missing information is replaced by the slot label of the missing information. S3, determining whether the rewritten statement output in step S2 contains the slot label of the missing information, if so, proceeding to step S4, otherwise, determining that the rewritten statement is a complete rewritten statement, proceeding to step S7; S4, based on the rewritten sentences and user historical conversations containing the slot labels of the missing information, the domain categories of the rewritten sentences and historical conversations are obtained respectively using the domain identification model; S5, determine whether the domain category of the rewritten statement is the same as that of the historical conversation, if so, proceed to step S6, otherwise, return the rule script to the user to inquire about the missing information, and return to step S1; S6. Based on the rewritten sentences and historical conversations belonging to the same domain, the accurate dialogue rewriting generation model is used to obtain the complete rewritten sentences, which contain specific missing information; S7. Based on the complete rewritten sentence, use the reply generation model to output the reply words.

2. A multi-round dialogue method for complex fields as claimed in claim 1, characterized in that: In step S1, the user's current conversation and historical conversation are respectively converted into vector representations through a pre-trained language model, and the pre-trained language model is an autoregressive pre-trained language model with unidirectional feature representation, or an autoencoding pre-trained language model with bidirectional feature representation, or an autoregressive pre-trained language model with bidirectional feature representation.

3. The multi-round dialogue method for complex fields as claimed in claim 1, characterized in that: In step S2, the fuzzy dialogue rewriting generation model includes an encoding layer, a core network layer and a decoding layer; The encoding layer adopts a deep neural network structure to convert the input semantic vector representation into a high-dimensional feature vector; The core network layer is based on a neural network structure including an attention mechanism and an autoencoder, which captures missing information in the current session from a high-dimensional feature vector and generates a rewritten intermediate vector representation; The decoding layer converts the rewritten intermediate vector representation into an output sequence containing information labels based on a decoder.

4. The multi-round dialogue method for complex fields as claimed in claim 1, characterized in that: In step S2, the slot label is formed by concatenating the category, part of speech and sentence component of the missing information through pre-defined corresponding character strings.

5. A multi-round dialogue method for complex fields as claimed in claim 4, characterized in that: The categories of the missing information include entity reference or information missing; the parts of speech include noun, verb or pronoun; and the sentence components include subject, predicate, object or attributive.

6. The multi-round dialogue method for complex fields as claimed in claim 1, characterized in that: In step S4, the domain recognition model includes a trained historical conversation domain recognition model and a fuzzy rewritten sentence domain recognition model; the historical conversation domain recognition model uses historical conversation data extracted from the training data of the fuzzy conversation rewriting generation model and the annotated domain labels as training samples, and the fuzzy rewritten sentence domain recognition model uses the rewritten sentences containing slot labels with missing information extracted from the training data of the fuzzy conversation rewriting generation model and the annotated domain labels as training samples.

7. A multi-round dialogue method for complex fields as claimed in claim 6, characterized in that: In step S4, the domain recognition model is used to obtain the domain categories of the rewritten sentences and historical conversations respectively, including: inputting the rewritten sentences containing slot labels with missing information into the trained fuzzy rewritten sentence domain recognition model to obtain the domain category of the rewritten sentences; inputting the historical conversations into the trained historical conversation domain recognition model to obtain the domain category of the historical conversations.

8. The multi-round dialogue method for complex fields as claimed in claim 3, characterized in that: In step S6, the accurate dialogue rewriting generation model includes an encoding layer, a core network layer and a decoding layer; The encoding layer adopts a deep neural network structure to convert the input rewritten sentences and historical conversations belonging to the same field into high-dimensional feature vectors; The core network layer is based on a neural network structure including an attention mechanism and an autoencoder, which captures semantic relevance from high-dimensional feature vectors and generates intermediate feature representations in combination with domain information; The decoding layer generates a complete rewritten sentence including specific missing information based on the intermediate feature representation by the decoder.

9. A multi-round dialogue method for complex fields as claimed in claim 8, characterized in that: The decoding layers in the fuzzy dialogue rewriting generation model and the precise dialogue rewriting generation model both use seq2seq decoders.

10. A multi-round dialogue system for complex fields, characterized in that: include: The session acquisition unit is used to acquire the user's current session and historical sessions and convert them into vector representations respectively; A fuzzy rewriting unit is used to generate a rewritten sentence that does not contain specific missing information based on the current conversation vector and the historical conversation vector using the fuzzy dialogue rewriting generation model, and the position of the missing information is replaced by the slot label of the missing information; The rewriting judgment unit is used to judge whether the rewriting sentence output by the fuzzy rewriting unit contains the missing information slot label. If not, it jumps to the reply generation unit. If it does, it jumps to the domain classification unit. A domain classification unit is used to obtain the domain categories of the rewritten sentences and the historical conversations of the user based on the rewritten sentences containing the slot labels containing the missing information and the historical conversations of the user using the domain recognition model; The domain identification unit is used to determine whether the domain categories of the rewritten statement and the historical conversation are the same. If they belong to different domain categories, the rule words for asking for missing information are returned to the user and the user is redirected to the conversation acquisition unit. If they belong to the same field, jump to the precise rewriting unit; The precise rewriting unit is used to obtain a complete rewritten sentence based on the rewritten sentences and historical conversations belonging to the same field using the precise dialogue rewriting generation model, which contains specific missing information; The reply generation unit is used to output reply words based on the complete rewritten sentence using the reply generation model.

Citation Information

Patent Citations

  • End-to-end multi-round dialogue rewriting method and system fusing dialogue detection and storage medium

    CN115730052A

  • Man-machine multi-round dialogue rewriting method based on Transform pointer extraction

    CN116028606A