Method, device and equipment for training multi-turn dialogue recognition model and storage medium

By employing feature extraction, mask recognition, internal inversion, and turn recognition in a multi-turn dialogue recognition model, the problem of insufficient recognition accuracy in existing dialogue systems when handling conversational multi-turn dialogues is solved, thereby improving the conversational recognition capability of the dialogue system.

CN115358243BActive Publication Date: 2026-02-24SHANGHAI PUDONG DEVELOPMENT BANK
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210889552.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-27
Publication Date
2026-02-24
Estimated Expiration
2042-07-27

AI Technical Summary

Technical Problem

Existing dialogue systems lack accuracy in handling spoken multi-turn dialogues because the training data is mainly based on written texts and lacks processing of the differences in spoken texts.

Method used

A multi-turn dialogue recognition model is adopted, including a feature extraction subnetwork, a mask recognition subnetwork, an internal inversion recognition subnetwork, and a turn recognition subnetwork. Through preprocessing, feature extraction, mask recognition, internal inversion recognition, and turn recognition, the model is trained to improve the recognition accuracy of spoken dialogue.

Benefits of technology

It improves the recognition accuracy of multi-turn dialogue recognition models in spoken dialogues, enhancing the customer experience of dialogue systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115358243B_ABST
    Figure CN115358243B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a multi-round dialogue recognition model training method and device, equipment and a storage medium. The initial multi-round dialogue is preprocessed to obtain a multi-round dialogue sample; the multi-round dialogue sample is input into a feature extraction subnetwork to output an embedding vector; the embedding vector is input into a mask recognition subnetwork to output a mask recognition result; the semantic embedding vector of each round of dialogue sentence is input into an internal reverse recognition subnetwork to output an internal reverse recognition result; the semantic embedding vector of each round of dialogue sentence is input into a round recognition subnetwork to output a round recognition result; and the multi-round dialogue recognition model is trained based on the mask recognition result, the internal reverse recognition result and the round recognition result. The multi-round dialogue recognition model training method provided by the embodiments of the present application can improve the accuracy of the trained multi-round dialogue recognition model by training the multi-round dialogue recognition model based on the mask recognition result, the internal reverse recognition result and the round recognition result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of natural language technology, and in particular to a training method, apparatus, device and storage medium for a multi-turn dialogue recognition model. Background Technology

[0002] Dialogue systems play a crucial role in natural language processing applications and are widely used, such as in intelligent customer service, intelligent outbound calling, and intelligent assistants, and are extensively applied in fields like finance, telecommunications, and e-commerce. Traditional dialogue systems only allow customers to express their needs via text, which significantly limits efficiency. To improve customer experience, these systems have gradually supported voice input for inquiries. Furthermore, with the development and maturation of audio speech recognition (ASR) technology, more and more customers prefer to use voice as their primary input method. The customer's voice is transcribed into text by ASR and then transmitted to the dialogue system. Text input via voice is typically conversational.

[0003] Linguistic research indicates a difference between spoken and written language. Spoken language is primarily for listening and speaking, thus requiring speed and efficiency. It features a relatively narrow vocabulary, shorter sentences, simpler structures, and phenomena such as repetition, disjointed sentences, inversions, pauses, and interjections. Written language, on the other hand, is for writing and reading, allowing ample time for reflection and refinement. Therefore, there are significant differences between spoken and written text corpora. It is noteworthy that the training data for these pre-trained language models is mostly document-based written text, rather than spoken text. Summary of the Invention

[0004] This invention provides a training method, apparatus, device, and storage medium for a multi-turn dialogue recognition model, enabling the training of a spoken multi-turn dialogue recognition model that can recognize spoken dialogue semantics.

[0005] In a first aspect, embodiments of the present invention provide a training method for a multi-turn dialogue recognition model, the multi-turn dialogue recognition model comprising: a feature extraction sub-network, a mask recognition sub-network, an internal inversion recognition sub-network, and a turn recognition sub-network; the method comprising:

[0006] The initial multi-turn dialogue is preprocessed to obtain multi-turn dialogue samples; wherein the initial multi-turn dialogue includes multi-turn dialogue statements, and each dialogue statement includes multiple characters; the preprocessing method includes at least one of the following: masking the characters of the initial multi-turn dialogue, internally reversing the dialogue statements of the multi-turn dialogue, and swapping the turns of the dialogue statements of the multi-turn dialogue.

[0007] The multi-turn dialogue samples are input into the feature extraction subnetwork, and the embedding vector is output; wherein, the embedding vector includes the semantic embedding vector of each turn of dialogue and the character embedding vector of each character;

[0008] The embedding vector is input into the mask recognition subnetwork, and the mask recognition result is output.

[0009] The semantic embedding vectors of the dialogue statements in each round are input into the internal inversion recognition subnetwork, and the internal inversion recognition result is output.

[0010] The semantic embedding vectors of the dialogue statements in each round are input into the round recognition sub-network, and the round recognition result is output.

[0011] The multi-turn dialogue recognition model is trained based on the mask recognition result, the internal inversion recognition result, and the turn recognition result.

[0012] Secondly, embodiments of the present invention also provide a training device for a multi-turn dialogue recognition model, the multi-turn dialogue recognition model comprising: a feature extraction sub-network, a mask recognition sub-network, an internal inversion recognition sub-network, and a turn recognition sub-network; the device comprises:

[0013] A multi-turn dialogue sample acquisition module is used to preprocess an initial multi-turn dialogue to obtain multi-turn dialogue samples; wherein, the initial multi-turn dialogue includes multi-turn dialogue statements, and each dialogue statement includes multiple characters; the preprocessing method includes at least one of the following: masking the characters of the initial multi-turn dialogue, internally reversing the dialogue statements of the multi-turn dialogue, and swapping the turns of the dialogue statements of the multi-turn dialogue.

[0014] An embedding vector output module is used to input the multi-turn dialogue samples into the feature extraction sub-network and output embedding vectors; wherein, the embedding vectors include semantic embedding vectors of each turn of dialogue and character embedding vectors of each character;

[0015] The mask recognition result output module is used to input the embedding vector into the mask recognition sub-network and output the mask recognition result;

[0016] The internal inversion recognition result is used to input the semantic embedding vector of each round of dialogue statement into the internal inversion recognition sub-network and output the internal inversion recognition result.

[0017] The round recognition result output module is used to input the semantic embedding vector of each round of dialogue statement into the round recognition sub-network and output the round recognition result;

[0018] The training module is used to train the multi-turn dialogue recognition model based on the mask recognition result, the internal inversion recognition result, and the turn recognition result.

[0019] Thirdly, embodiments of the present invention also provide an electronic device, the electronic device comprising:

[0020] At least one processor; and

[0021] A memory communicatively connected to the at least one processor; wherein,

[0022] The memory stores a computer program that can be executed by the at least one processor, which enables the at least one processor to perform the training method for the multi-turn dialogue recognition model described in the embodiments of the present invention.

[0023] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing computer instructions, which are used to cause a processor to execute and implement the training method of the multi-turn dialogue recognition model described in the embodiments of the present invention.

[0024] This invention provides a training method, apparatus, device, and storage medium for a multi-turn dialogue recognition model. The method involves preprocessing an initial multi-turn dialogue to obtain multi-turn dialogue samples; inputting these samples into a feature extraction sub-network to output embedding vectors; inputting these embedding vectors into a mask recognition sub-network to output mask recognition results; inputting the semantic embedding vectors of each turn's dialogue statements into an internal inversion recognition sub-network to output internal inversion recognition results; inputting these vectors into a turn recognition sub-network to output turn recognition results; and training the multi-turn dialogue recognition model based on the mask recognition results, internal inversion recognition results, and turn recognition results. The training method for the multi-turn dialogue recognition model provided by this invention, which trains the model based on mask recognition results, internal inversion recognition results, and turn recognition results, can improve the accuracy of the trained multi-turn dialogue recognition model. Attached Figure Description

[0025] Figure 1 This is a flowchart of a training method for a multi-turn dialogue recognition model according to Embodiment 1 of the present invention;

[0026] Figure 2 This is a schematic diagram of the principle of training a multi-turn dialogue recognition model in Embodiment 1 of the present invention;

[0027] Figure 3 This is a schematic diagram of the structure of a training device for a multi-turn dialogue recognition model according to Embodiment 2 of the present invention;

[0028] Figure 4 This is a schematic diagram of the structure of an electronic device according to Embodiment 3 of the present invention. Detailed Implementation

[0029] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention, and not all of the structures.

[0030] Example 1

[0031] Figure 1 This is a flowchart of a training method for a multi-turn dialogue recognition model provided in Embodiment 1 of the present invention. This embodiment is applicable to the training of a multi-turn dialogue recognition model. The method can be executed by a training device for a multi-turn dialogue recognition model. The device can be composed of hardware and / or software and can generally be integrated into a device with training function for a multi-turn dialogue recognition model.

[0032] In this embodiment, the multi-turn dialogue recognition model includes: a feature extraction subnetwork, a mask recognition subnetwork, an internal inversion recognition subnetwork, and a turn recognition subnetwork.

[0033] like Figure 1 As shown, the method specifically includes the following steps:

[0034] S110: Preprocess the initial multi-turn dialogue to obtain multi-turn dialogue samples.

[0035] The initial multi-turn dialogue includes multi-turn dialogue statements, each consisting of multiple characters. For example, suppose the initial multi-turn dialogue is represented as follows: Where d represents k This represents the initial multi-turn dialogue, where m represents the number of turns in the dialogue, i∈[1,m] represents the i-th turn, and s i U represents the role in the i-th round. i This represents the dialogue statement in the i-th round; u i It can be represented as Where, n i This represents the length of the dialogue statement in the i-th round (also known as the number of characters it contains). This represents the j-th character of the dialogue statement in the i-th round, where j∈[1,n]. i ].

[0036] The preprocessing methods include at least one of the following: masking the characters of the initial multi-turn dialogue, internally reversing the dialogue statements of the multi-turn dialogue, and swapping the turns of the dialogue statements of the multi-turn dialogue.

[0037] In this embodiment, the method for masking the characters in the initial multi-turn dialogue can be as follows: select one or more dialogue statements from the initial multi-turn dialogue and determine them as the first dialogue statement to be processed; replace a set number of consecutive characters in the first dialogue statement to be processed with a set mask.

[0038] The set quantity can be a set percentage of the dialogue statement length, for example, masking 15% of the characters. The mask can be represented as [MASK]. For example, for the i-th round of dialogue statements... If the second and third characters are masked, the masked dialogue statement is obtained. Specifically, a set number of consecutive characters in a selected round or multiple round dialogue statement will be replaced with a set mask to obtain the multi-round dialogue after the mask is obtained.

[0039] In this embodiment, the method for internally reversing the dialogue statements in a multi-turn dialogue can be as follows: select one or more dialogue statements from the initial multi-turn dialogue and determine them as the second dialogue statement to be processed; then swap the positions of any two sub-statements in the second dialogue statement to be processed.

[0040] Each dialogue statement contains at least one substatement, which can consist of one or more consecutive characters. These substatements have a specific order and inherent logic; swapping the positions of two substatements will affect the actual semantics of the dialogue statement. For example, for the i-th round of dialogue statements… Assumption and Form a sub-statement, and These two sub-statements are combined into a single statement. If the positions of these two sub-statements are swapped, the dialog statement with its internal inversion is obtained: Specifically, any two sub-statements of the selected one- or multiple-turn dialogue statements are swapped to obtain a multi-turn dialogue after internal reversal processing.

[0041] In this embodiment, the way to interchange the rounds of dialogue statements in a multi-turn dialogue can be: arbitrarily select two rounds of dialogue statements from the initial multi-turn dialogue; and then interchange the rounds of the selected two rounds of dialogue statements.

[0042] In a multi-turn dialogue, the dialogue statements in different turns have an inherent order and logic, and each turn's dialogue statement can be a response to a previous or even earlier turn's dialogue statement. If the order of any two turns' dialogue statements is interchanged, it will affect the actual statements in the entire dialogue. For example, in a multi-turn dialogue d... k ={(s1,u1),(s2,u2),(s3,u3)…(s m ,u mIf the dialogue statements in the first and third rounds are swapped, the resulting multi-round dialogue statements are: d k ={(s3,u3),(s2,u2),(s1,u1)…(s m ,u m Specifically, the positions of the dialogue statements in the two selected rounds are swapped to obtain multiple rounds of dialogue after the rounds are swapped.

[0043] In this embodiment, a character representing the entire dialogue statement can be added before the first character of each round of dialogue statements, which can be represented as [CLS].

[0044] S120 takes multi-turn dialogue samples as input to the feature extraction subnetwork and outputs an embedding vector.

[0045] The embedding vectors include semantic embedding vectors for each round of dialogue and character embedding vectors for each character. Speech embedding vectors can be the embedding vectors corresponding to each round of dialogue, and character embedding vectors can be the embedding vectors corresponding to each individual character.

[0046] The feature extraction sub-network can include an encoder and a feature extraction module. The feature extraction module can be a transformer module. The encoder is used to encode characters in multi-turn dialogues to obtain the encoding result. The encoding result can consist of three parts: semantic encoding result (token encoding), turn encoding result (also called fragment encoding result), and position encoding result. Token encoding can be the result of encoding the semantic information of the characters, and can be represented as... Round-based encoding results can be the result of encoding the round-based information of a character, and can be represented as follows: Position encoding result can be the result of encoding the position information of a character, and can be represented as: The encoding result can then be represented as:

[0047] The feature extraction module takes the encoder output as input, performs feature extraction on the result, and outputs an embedding vector for each character. This can be represented as: E ij =transformer(e ij ), where E ij Let E represent the embedding vector corresponding to each character. The first embedding vector of each session statement is the semantic embedding vector of that session statement, which can be represented as E. CLSi =E i1 That is, the embedding vector corresponding to the character [CLS].

[0048] S130, the embedded vector is input into the mask recognition subnetwork, and the mask recognition result is output.

[0049] The mask recognition subnetwork can be a nonlinear character classifier, and the mask recognition result can be the probability of the predicted semantic information corresponding to the mask. Assuming that the preset semantics contain N elements, the mask recognition result is the probability of N predicted speech information elements. Specifically, the embedding vector E corresponding to the multi-turn dialogue statements... ij Input the mask recognition subnetwork and output the mask recognition result corresponding to each mask character.

[0050] S140: Input the semantic embedding vectors of each round of dialogue statements into the internal inversion recognition subnetwork and output the internal inversion recognition result.

[0051] The internal inversion recognition subnetwork can be a nonlinear inversion classifier, such as a binary classifier. The internal inversion recognition result is the probability of whether a dialogue statement is inverted, i.e., the predicted probability of the dialogue statement being inverted (true) and the predicted probability of it not being inverted (false). Specifically, the semantic embedding vector E of each round of dialogue statements is... CLSi Input the internal inversion recognition subnetwork and output the probability of whether each round of dialogue statement has an internal inversion.

[0052] S150 inputs the semantic embedding vectors of each round of dialogue statements into the round recognition subnetwork and outputs the round recognition results.

[0053] The round recognition subnetwork can be a non-linear round classifier, such as a multi-classifier, and the round recognition result can be the predicted probability of the dialogue statement belonging to each round. Specifically, the semantic embedding vector E of each round of dialogue statements will be... CLSi The input round recognition subnetwork outputs the probability of dialogue statements belonging to each round.

[0054] S160 trains a multi-turn dialogue recognition model based on mask recognition results, internal inversion recognition results, and turn recognition results.

[0055] In this context, we assume that the parameter of the feature extraction subnetwork is θ, the parameter of the mask recognition subnetwork is θ1, the parameter of the internal inversion recognition subnetwork is θ2, and the parameter of the round recognition subnetwork is θ3.

[0056] Specifically, the method for training a multi-turn dialogue recognition model based on mask recognition results, internal inversion recognition results, and turn recognition results can be as follows: determine the first loss function based on the mask recognition results and the true mask result; determine the second loss function based on the internal inversion recognition results and the true internal inversion result; determine the third loss function based on the turn recognition results and the true turn result; and train the multi-turn dialogue recognition model based on the first loss function, the second loss function, and the third loss function.

[0057] The method for determining the first loss function based on the mask recognition result and the actual mask result can be as follows: For each mask character, obtain the semantic information of the actual mask result corresponding to that mask character, determine the prediction probability corresponding to that semantic information, calculate the logarithm of the prediction probabilities corresponding to each mask character, and sum the logarithmic prediction probabilities to obtain the first loss function. The formula for calculating the first loss function can be expressed as: Where M represents the number of mask characters, This represents the predicted probability of the true semantic information corresponding to the masked characters.

[0058] The method for determining the second loss function based on the internal inversion recognition result and the actual internal inversion result can be as follows: obtain the predicted probability of the actual internal inversion result for each dialogue statement, calculate the logarithm of each predicted probability, and sum the logarithmic predicted probabilities to obtain the second loss function. The formula for calculating the second loss function can be expressed as follows: in, This represents the predicted probability of the true outcome of the internal reversal of the dialogue statement in the i-th round.

[0059] The method for determining the third loss function based on the round-based recognition results and the actual round-based results can be as follows: Obtain the predicted probability corresponding to the actual round-based result of the dialogue statement in each round; calculate the logarithm of each predicted probability; and then sum the logarithmic predicted probabilities to obtain the third loss function. The formula for calculating the third loss function can be expressed as follows: in, This represents the predicted probability corresponding to the actual result of the i-th dialogue statement in each round.

[0060] Specifically, the method for training a multi-turn dialogue recognition model based on the first loss function, the second loss function, and the third loss function can be as follows: the first loss function, the second loss function, and the third loss function are summed to obtain the target loss function; the multi-turn dialogue recognition model is then trained based on the target loss function.

[0061] The target loss function can be calculated as: L(θ,θ1,θ2,θ4)=L1+L2+L3. After obtaining the target loss function, backpropagation is used to adjust the parameters θ,θ1,θ2,θ4 to train the multi-turn dialogue recognition model.

[0062] For example, Figure 2 This is a schematic diagram illustrating the principle of training a multi-turn dialogue recognition model in this embodiment, as follows: Figure 2As shown, firstly, each character in the multi-turn dialogue sample is token-encoded, fragment-encoded, and position-encoded to obtain the encoding results. Then, the encoding results are input into a Transformer to obtain the embedding vector of each character. The character embedding vectors are input into a nonlinear character classifier to output the mask recognition result of the masked character. The semantic embedding vectors of each dialogue statement are input into a nonlinear turn classifier to output the turn recognition result of each dialogue statement. The semantic embedding vectors of each dialogue statement are input into a nonlinear inversion classifier to output the inversion prediction result. Finally, the multi-turn dialogue recognition model is trained based on the mask recognition result, the internal recognition result, and the turn recognition result.

[0063] In this embodiment, after the multi-turn dialogue recognition model is trained, the mask recognition subnetwork, the internal inversion recognition subnetwork, and the turn recognition subnetwork are deleted to obtain the semantic recognition model. That is, the semantic recognition model is composed of the trained feature extraction subnetwork. The sentences in the dialogue are input into the semantic recognition model for semantic recognition.

[0064] The technical solution of this embodiment preprocesses the initial multi-turn dialogue to obtain multi-turn dialogue samples; inputs the multi-turn dialogue samples into a feature extraction sub-network to output embedding vectors; inputs the embedding vectors into a mask recognition sub-network to output mask recognition results; inputs the semantic embedding vectors of each turn's dialogue statements into an internal inversion recognition sub-network to output internal inversion recognition results; inputs the semantic embedding vectors of each turn's dialogue statements into a turn recognition sub-network to output turn recognition results; and trains the multi-turn dialogue recognition model based on the mask recognition results, internal inversion recognition results, and turn recognition results. The training method for the multi-turn dialogue recognition model provided by this embodiment, which trains the multi-turn dialogue recognition model based on mask recognition results, internal inversion recognition results, and turn recognition results, can improve the accuracy of the trained multi-turn dialogue recognition model.

[0065] Example 2

[0066] Figure 3 This is a schematic diagram of the structure of a training device for a multi-turn dialogue recognition model provided in Embodiment 2 of the present invention. The multi-turn dialogue recognition model includes: a feature extraction subnetwork, a mask recognition subnetwork, an internal inversion recognition subnetwork, and a turn recognition subnetwork, such as... Figure 3 As shown, the device includes:

[0067] The multi-turn dialogue sample acquisition module 310 is used to preprocess the initial multi-turn dialogue to obtain multi-turn dialogue samples; wherein, the initial multi-turn dialogue includes multi-turn dialogue statements, and each dialogue statement includes multiple characters; the preprocessing method includes at least one of the following: masking the characters of the initial multi-turn dialogue, internally reversing the dialogue statements of the multi-turn dialogue, and swapping the turns of the dialogue statements of the multi-turn dialogue.

[0068] The embedding vector output module 320 is used to input multi-turn dialogue samples into the feature extraction subnetwork and output embedding vectors; wherein, the embedding vectors include semantic embedding vectors of each turn of dialogue and character embedding vectors of each character;

[0069] The mask recognition result output module 330 is used to input the embedded vector into the mask recognition sub-network and output the mask recognition result;

[0070] The internal inversion recognition result 340 is used to input the semantic embedding vectors of each round of dialogue statements into the internal inversion recognition sub-network and output the internal inversion recognition result.

[0071] The round recognition result output module 350 is used to input the semantic embedding vector of each round of dialogue statement into the round recognition sub-network and output the round recognition result;

[0072] Training module 360 ​​is used to train a multi-turn dialogue recognition model based on mask recognition results, internal inversion recognition results, and turn recognition results.

[0073] Optionally, the multi-turn dialogue sample acquisition module 310 is also used for:

[0074] Select one or more rounds of dialogue statements from the initial multi-turn dialogue and determine them as the first dialogue statement to be processed;

[0075] Replace a set number of consecutive characters in the first pending dialog statement with a set mask.

[0076] Optionally, the multi-turn dialogue sample acquisition module 310 is also used for:

[0077] Select one or more rounds of dialogue statements from the initial multi-turn dialogue and determine them as the second dialogue statement to be processed;

[0078] Swap the positions of any two substatements in the second dialog statement to be processed.

[0079] Optionally, the multi-turn dialogue sample acquisition module 310 is also used for:

[0080] Choose any two dialogue statements from the initial multi-turn dialogue;

[0081] Swap the order of the two selected dialogue statements.

[0082] Optionally, training module 360 ​​is also used for:

[0083] The first loss function is determined based on the mask recognition result and the actual mask result;

[0084] The second loss function is determined based on the internal inversion identification results and the actual internal inversion results;

[0085] The third loss function is determined based on the round identification results and the actual round results;

[0086] The multi-turn dialogue recognition model is trained based on the first loss function, the second loss function, and the third loss function.

[0087] Optionally, training module 360 ​​is also used for:

[0088] The first loss function, the second loss function, and the third loss function are summed to obtain the target loss function;

[0089] The multi-turn dialogue recognition model is trained based on the objective loss function.

[0090] Optionally, the mask recognition result is the probability of the predicted semantic information corresponding to the mask; the internal inversion recognition result is the probability of whether the dialogue statement is inverted; and the round recognition result is the probability of the dialogue statement belonging to each round.

[0091] The above-described apparatus can execute the methods provided in all the foregoing embodiments of the present invention, and has the corresponding functional modules and beneficial effects for executing the above methods. Technical details not described in detail in this embodiment can be found in the methods provided in all the foregoing embodiments of the present invention.

[0092] Example 3

[0093] Figure 4 A schematic diagram of an electronic device 10 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0094] like Figure 4As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0095] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0096] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as training methods for multi-turn dialogue recognition models.

[0097] In some embodiments, the training method for the multi-turn dialogue recognition model can be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the training method for the multi-turn dialogue recognition model described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform the training method for the multi-turn dialogue recognition model by any other suitable means (e.g., by means of firmware).

[0098] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0099] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0100] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0101] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0102] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0103] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0104] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0105] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A training method for a multi-turn dialogue recognition model, characterized in that, The multi-turn dialogue recognition model includes: a feature extraction subnetwork, a mask recognition subnetwork, an internal inversion recognition subnetwork, and a turn recognition subnetwork; the method includes: The initial multi-turn dialogue is preprocessed to obtain multi-turn dialogue samples; wherein the initial multi-turn dialogue includes multi-turn dialogue statements, and each dialogue statement includes multiple characters; the preprocessing method includes at least one of the following: masking the characters of the initial multi-turn dialogue, internally reversing the dialogue statements of the multi-turn dialogue, and swapping the turns of the dialogue statements of the multi-turn dialogue. The multi-turn dialogue samples are input into the feature extraction subnetwork, and the embedding vector is output; wherein, the embedding vector includes the semantic embedding vector of each turn of dialogue and the character embedding vector of each character; The embedding vector is input into the mask recognition subnetwork, and the mask recognition result is output. The semantic embedding vectors of the dialogue statements in each round are input into the internal inversion recognition subnetwork, and the internal inversion recognition result is output. The semantic embedding vectors of the dialogue statements in each round are input into the round recognition sub-network, and the round recognition result is output. The multi-turn dialogue recognition model is trained based on the mask recognition result, the internal inversion recognition result, and the turn recognition result; The internal reversal of the dialogue statements in the multi-turn dialogue includes: Select one or more rounds of dialogue statements from the initial multi-turn dialogue and determine them as the second dialogue statements to be processed; Swap the positions of any two substatements in the second dialog statement to be processed.

2. The method according to claim 1, characterized in that, The characters in the initial multi-turn dialogue are masked, including: Select one or more rounds of dialogue statements from the initial multi-turn dialogue and determine them as the first dialogue statement to be processed; Replace a set number of consecutive characters in the first dialogue statement to be processed with a set mask.

3. The method according to claim 1, characterized in that, The turn order of the dialogue statements in the multi-turn dialogue is interchanged, including: Select any two rounds of dialogue statements from the initial multi-turn dialogue; Swap the order of the two selected dialogue statements.

4. The method according to claim 1, characterized in that, The multi-turn dialogue recognition model is trained based on the mask recognition result, the internal inversion recognition result, and the turn recognition result, including: The first loss function is determined based on the mask recognition result and the actual mask result; The second loss function is determined based on the internal inversion identification result and the actual internal inversion result; The third loss function is determined based on the round identification results and the actual round results; The multi-turn dialogue recognition model is trained based on the first loss function, the second loss function, and the third loss function.

5. The method according to claim 4, characterized in that, The multi-turn dialogue recognition model is trained based on the first loss function, the second loss function, and the third loss function, including: The first loss function, the second loss function, and the third loss function are summed to obtain the target loss function; The multi-turn dialogue recognition model is trained based on the target loss function.

6. The method according to claim 4, characterized in that, The mask recognition result is the probability of the predicted semantic information corresponding to the mask; the internal inversion recognition result is the probability of whether the dialogue statement is inverted; the round recognition result is the probability of the dialogue statement belonging to each round.

7. A training device for a multi-turn dialogue recognition model, characterized in that, The multi-turn dialogue recognition model includes: a feature extraction subnetwork, a mask recognition subnetwork, an internal inversion recognition subnetwork, and a turn recognition subnetwork; the device includes: A multi-turn dialogue sample acquisition module is used to preprocess an initial multi-turn dialogue to obtain multi-turn dialogue samples; wherein, the initial multi-turn dialogue includes multi-turn dialogue statements, and each dialogue statement includes multiple characters; the preprocessing method includes at least one of the following: masking the characters of the initial multi-turn dialogue, internally reversing the dialogue statements of the multi-turn dialogue, and swapping the turns of the dialogue statements of the multi-turn dialogue. An embedding vector output module is used to input the multi-turn dialogue samples into the feature extraction sub-network and output embedding vectors; wherein, the embedding vectors include semantic embedding vectors of each turn of dialogue and character embedding vectors of each character; The mask recognition result output module is used to input the embedding vector into the mask recognition sub-network and output the mask recognition result; The internal inversion recognition result is used to input the semantic embedding vector of each round of dialogue statement into the internal inversion recognition sub-network and output the internal inversion recognition result. The round recognition result output module is used to input the semantic embedding vector of each round of dialogue statement into the round recognition sub-network and output the round recognition result; The training module is used to train the multi-turn dialogue recognition model based on the mask recognition result, the internal inversion recognition result, and the turn recognition result; The multi-turn dialogue sample acquisition module is also used for: Select one or more rounds of dialogue statements from the initial multi-turn dialogue and determine them as the second dialogue statement to be processed; Swap the positions of any two substatements in the second dialog statement to be processed.

8. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the training method of the multi-turn dialogue recognition model according to any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the training method of the multi-turn dialogue recognition model according to any one of claims 1-6.

Citation Information

Patent Citations

  • Detecting false accepts in a shopping domain for handling a spoken dialog

    US11222630B1

  • Semantic analysis method, device, and storage medium

    WO2019072166A1