Multi-intent semantic understanding model training and use method and device
By using joint label annotation and vector characterization coding analysis techniques in the multi-intention semantic understanding model, the problem of the same intention multiple times in the same sentence is solved, and the accurate distinction of intentions and the correct classification of semantic slots are achieved.
Patent Information
- Application Number
- CN202211000586.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-19
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2042-08-19
AI Technical Summary
The prior art is difficult to effectively deal with the problem of the same intentions appearing multiple times in a sentence, and it is impossible to accurately distinguish the semantic slots of multiple intentions with the same name in the same sentence.
Joint label annotation, including semantic slot label annotation and intent block number annotation, through encoding and analyzing vector representation, a multi-intention semantic understanding model is trained to distinguish multiple intents of the same name in the same sentence.
When multiple intentions of the same name appear in the same sentence, they can accurately represent and distinguish these intentions, solving the problems of intention disorder and reference dissolution in the prior art.
Smart Images

Figure CN115359786B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of speech data processing, and in particular to a method and device for training and using a multi-intent semantic understanding model. Background Art
[0002] In recent years, due to the technological development of dialogue systems, more and more oral human-computer interaction devices have entered the lives of the general public. For example, home smart speakers, home smart TVs, and many new energy vehicles, subway ticket machines, etc. have begun to be equipped with voice interaction devices and functions in large quantities.
[0003] In the field of spoken language semantic understanding, the interaction requirements of a single intent in a sentence can no longer meet the needs of users. Therefore, spoken language semantic understanding technologies and methods that support multiple intents in a sentence have become a new research and application hotspot.
[0004] The multiple intents supported by existing technologies must be different intents, and do not consider the multiple occurrences of the same intent in a sentence. For example, "turn on the air conditioner and then turn on the desk lamp" means that the intent of "device control" appears twice. Previous methods would group the semantic slots of the same intent name together, but this is wrong. For example, "turn on the air conditioner and then turn off the desk lamp", if "operation = turn on, object = air conditioner, operation = turn off, object = desk lamp" are all grouped under one "device control" intent, then due to the disorder of the semantic slots, it is impossible to know whether "operation = turn on" should control the air conditioner or the desk lamp. Another example is "turn on the fan and air purifier and then adjust the fan gear to two", if "operation = turn on, object = fan, object = air purifier, gear = two" are all grouped together, it is also impossible to know whether "gear = two" is matched with the fan or the air purifier. Summary of the invention
[0005] An embodiment of the present invention provides a method and device for training and using a multi-intent semantic understanding model, which is used to solve at least one of the above-mentioned technical problems.
[0006] In a first aspect, an embodiment of the present invention provides a multi-intent semantic understanding model training method, comprising: encoding an input sentence with a joint label annotation to obtain a vector representation of the input sentence, wherein the joint label annotation includes a semantic slot label annotation and an intent block number annotation, and different intents have different intent block numbers; parsing the vector representation to obtain an output sequence of joint labels; and training the multi-intent semantic understanding model based on the joint label annotation and the output sequence of the joint labels.
[0007] In second aspect, an embodiment of the present invention provides a method for using a multi-intent semantic understanding model, comprising: inputting a user input sentence into the multi-intent semantic understanding model trained according to the method, obtaining an output sequence of joint labels output by the multi-intent semantic understanding model; processing the output sequence of joint labels to obtain multiple intent block information, wherein each intent block information includes an intent block number and a semantic slot label.
[0008] In a third aspect, an embodiment of the present invention provides a multi-intent semantic understanding model training device, comprising: an input program module, configured to encode an input sentence with a joint label annotation to obtain a vector representation of the input sentence, wherein the joint label annotation includes a semantic slot label annotation and an intent block number annotation, and different intents have different intent block numbers; an output program module, configured to parse the vector representation to obtain an output sequence of joint labels; and a training program module, configured to train the multi-intent semantic understanding model based on the joint label annotation and the output sequence of the joint labels.
[0009] In a fourth aspect, an embodiment of the present invention provides a device for using a multi-intent semantic understanding model, comprising: an acquisition program module, configured to input a user input sentence into the multi-intent semantic understanding model trained according to the method, and obtain an output sequence of joint labels output by the multi-intent semantic understanding model; a processing program module, configured to process the output sequence of the joint labels to obtain multiple intent block information, wherein each intent block information includes an intent block number and a semantic slot label.
[0010] In a fifth aspect, an electronic device is provided, comprising: at least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform the steps of the multi-intent semantic understanding model training and use method of any embodiment of the present invention.
[0011] In a sixth aspect, an embodiment of the present invention further provides a computer program product, comprising a computer program stored on a non-volatile computer-readable storage medium, wherein the computer program comprises program instructions, and when the program instructions are executed by a computer, the computer executes the steps of the multi-intent semantic understanding model training and use method of any embodiment of the present invention.
[0012] The method and device of the present application number the intent blocks through joint tags, so that multiple intents with the same name in the same sentence can also be represented and distinguished by the joint tags. Therefore, the defect that the existing similar technology cannot support the same intent being said multiple times in a sentence can be solved by the joint tags; further, the joint tag design runs the splicing of multiple semantic slots, so it can support a piece of text belonging to different semantic slots at the same time, so that the problem of reference resolution between multiple intents can also be solved to a certain extent. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0014] Figure 1 A flowchart of a multi-intent semantic understanding model training method provided by one embodiment of the present invention;
[0015] Figure 2 A flowchart of a method for using a multi-intent semantic understanding model provided by one embodiment of the present invention;
[0016] Figure 3 A flowchart of another method for using a multi-intent semantic understanding model provided by one embodiment of the present invention;
[0017] Figure 4 This is a sample example diagram of the relevant technology in the field of air tickets;
[0018] Figure 5 Sample illustrations of relevant technologies in the field of smart home;
[0019] Figure 6 A structural diagram of a multi-intent spoken language semantic understanding model based on joint tags, which is a specific example of a method for training and using a multi-intent semantic understanding model provided in one embodiment of the present invention;
[0020] Figure 7 A flowchart of a specific example of a method for training and using a multi-intent semantic understanding model provided by an embodiment of the present invention;
[0021] Figure 8 A block diagram of a multi-intent semantic understanding model training device provided by one embodiment of the present invention;
[0022] Fig. 9 A block diagram of a device for using a multi-intent semantic understanding model provided by one embodiment of the present invention;
[0023] Fig.10It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0024] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0025] Please refer to Figure 1 , which shows a flowchart of an embodiment of a multi-intent semantic understanding model training method of the present application. The multi-intent semantic understanding model training method of this embodiment can be applied to terminals with voice dialogue functions, such as smart speakers, smart phones, tablets, computers, smart TVs, car computers, etc.
[0026] like Figure 1 As shown, in step 101, the input sentence with joint label annotation is encoded to obtain a vector representation of the input sentence, wherein the joint label annotation includes semantic slot label annotation and intention block number annotation, and different intentions have different intention block numbers;
[0027] In step 102, the vector representation is parsed to obtain an output sequence of joint labels;
[0028] In step 103, the multi-intent semantic understanding model is trained based on the joint label annotation and the output sequence of the joint label.
[0029] In this embodiment, for step 101, the multi-intention semantic understanding model training device encodes the input sentence with the joint label annotation to obtain the vector representation of the input sentence. For example, a context encoder can be used to map the input sentence with the joint label annotation to a dense vector representation, wherein the joint label annotation includes semantic slot label annotation and intent block number annotation. Different intents have different intent block numbers, as shown in Table 1. Taking "turn on the air conditioner and car window" as an example, "operation = turn on, object = air conditioner" and "operation = turn on, object = car window" are two intents, then an auxiliary label of intent block number annotation can be added during sequence annotation. For example, "operation = turn on" belongs to both intents. Figure 1 Harmony Figure 2 Therefore, the original semantic slot label and the intent block number label can be combined into a joint label. We can use the sequence labeling model to model multi-intent semantic understanding. Therefore, our final multi-intent semantic slot joint label, except for the meaningless O label, is defined as:
[0030] (B|I)-SlotName-IntentNumber(;(B|I)-SlotName-IntenvtNumber)*
[0031] Among them, (B|I) indicates that the beginning is the (begin\inside) tag, SlotName is the semantic slot name (such as "operation, object, city name, date", etc.), IntentNumber is the intent block number (a positive integer), and (...)* indicates that the content of the parentheses can be repeated 0 to multiple times. The content of the parentheses can be repeated multiple times. As shown in Table 2, "Shanghai" is both the "destination name" of the "navigation" intent and the "city name" of the "weather query" intent, so the final label of "Shanghai" is "B-destination name-1; B-city name-2". Since we number the intent blocks, multiple intents with the same name in the same sentence can also be represented and distinguished by our joint label.
[0032]
[0033] Table 1
[0034]
[0035]
[0036] Table 2
[0037] Among them, the context encoder can be any sequence model, such as a bidirectional long short-term memory network (Bidirectional Long Short-Term Memory, BLSTM), a convolutional neural network or a transformer, etc., and this application is not limited here.
[0038] Then, for step 102, the multi-intent semantic understanding model training device parses the vector representation to obtain an output sequence of joint labels. For example, a conditional random field model can be used to consider the dependency between adjacent output labels. The conditional random field model can parse the most likely joint label sequence for the input sentence, wherein conditional random fields (CRF, or CRFs for short) are a discriminant probability model and a type of random field, commonly used to annotate or analyze sequence data, such as natural language text or biological sequences; the graph model layout of the conditional random field can be given arbitrarily, and the commonly used layout is a linked architecture. Whether in training, inference, or decoding, the linked architecture has a more efficient algorithm available for calculation. The conditional random field is a typical discriminant model, and its joint probability can be written in the form of a combination of several potential functions, among which the most commonly used is the linear chain conditional random field.
[0039] Finally, for step 103, the multi-intent semantic understanding model training device trains the multi-intent semantic understanding model based on the joint label annotation and the output sequence of the joint label. For example, based on the data annotation of the joint label and the definition of the joint label (that is, the original semantic slot label and the intent block number), the sentences of the multi-intent statement can be manually annotated at the sequence level to construct the training data of multi-intent semantic understanding. Then, based on the training data of multi-intent semantic understanding, the parameters of the input encoding module and the output parsing module contained in the multi-intent semantic understanding model are trained and optimized.
[0040] The method of this embodiment encodes the input sentence with a joint label to obtain a vector representation of the input sentence, then parses the vector representation to obtain an output sequence of the joint label, and finally trains the multi-intent semantic understanding model based on the joint label annotation and the output sequence of the joint label, so that when multiple intents with the same name appear in the same sentence, they can also be represented and distinguished by the joint label.
[0041] In the method of the above embodiment, encoding the input sentence annotated with the joint tag includes:
[0042] The multi-intent semantic understanding model training device uses a bidirectional encoder representation based on a transformer to encode the input sentence with a joint label annotation. The embodiment of the present application uses a bidirectional encoder representation based on a transformer (Bidirectional Encoder Representations from Transformers, BERT) as the upper text encoder; in a specific example, the formula is as follows:
[0043] (h0 ,h 1 , ..., h |x| ) = E(x) = BERT([CLS], x)
[0044] Where x represents the input sentence, E(x) represents the mapping of the input sentence x to a dense vector representation, E represents the bidirectional encoding representation, and [CLS] is a special word indicating the beginning of the sentence, which is specifically used to obtain the vector representation h of the entire sentence. 0 , then h i Represents the BERT word vector for each word in the sentence, i=1,...,|x|.
[0045] The method of this embodiment encodes the input sentence with joint label annotation by adopting a converter-based bidirectional encoding representation, so that the input sentence can be mapped into a dense vector representation.
[0046] In some optional embodiments, parsing the vector representation includes:
[0047] The multi-intent semantic understanding model training device uses a conditional random field model to parse the vector representation of the input sentence, wherein the conditional random field model can parse the most likely joint label sequence for the input sentence. In a specific example, the posterior probability formula p θ(y|x) of the joint label sequence y is:
[0048]
[0049] where f E (y i , x) is the semantic slot label y of the i-th word in the input sentence i The emission score, f T (y i-1 ,y i ) is the adjacent joint label y i-1 and i Transfer score between .
[0050] The transfer scores of the conditional random field are all fixed label-to-label correspondence parameters, while the emission score f E (y i , x) is calculated through a feedforward neural network, that is:
[0051] f E (y i , x) = h i W o +b o
[0052] Where W o and b oare the linear transformation matrix and bias vector respectively.
[0053] The method of this embodiment uses a conditional random field model to parse the vector representation of the input sentence, so as to parse out the most likely joint label sequence for the input sentence.
[0054] In some optional embodiments, before encoding the input sentence annotated with the joint tag, the method further includes:
[0055] The multi-intent semantic understanding model training device obtains the input sentence with joint label annotation obtained by sequence-level annotation of the input sentence of the multi-intent statement. For example, the sequence annotation model can be used to model multi-intent semantic understanding, that is, to predict the output sequence of joint labels of equal length for the character sequence (or word sequence) of the input sentence. We represent a sentence as a character sequence (or word sequence), that is, x = (x 1 , x 2 , ..., x |x| ), where |x| represents the length of the sentence, y=(y 1 ,y 2 , ..., y |x| ) represents its joint label output sequence.
[0056] The method of this embodiment obtains input sentences with joint label annotations obtained by performing sequence-level annotations on input sentences of multi-intent statements, thereby constructing training data for multi-intent semantic understanding.
[0057] Further references Figure 2 , which shows a flowchart of a method for using a multi-intent semantic understanding model provided by an embodiment of the present application.
[0058] like Figure 2 As shown, in step 201, the user input sentence is input into the multi-intent semantic understanding model trained according to the method, and an output sequence of joint labels output by the multi-intent semantic understanding model is obtained;
[0059] In step 202, the output sequence of the joint tag is processed to obtain a plurality of intention block information, wherein each intention block information includes an intention block number and a semantic slot label.
[0060] In this embodiment, for step 201, the multi-intent semantic understanding model using device inputs the user input sentence into the trained multi-intent semantic understanding model to obtain an output sequence of joint labels output by the multi-intent semantic understanding model. For example, a conditional random field model can be used to consider the dependency between adjacent output labels, wherein the conditional random field model can parse the most likely joint label sequence for the input sentence.
[0061] Then, for step 202, the multi-intention semantic understanding model uses a device to process the output sequence of the joint label to obtain multiple intention block information, wherein each intention block information includes an intention block number and a semantic slot label. For example, by aggregating the joint label and the corresponding text according to the intention block number, multiple intention block information can be obtained. Taking "turn on the air conditioner and the windows" as an example, the multiple intention block information corresponding to the "turn on the air conditioner and the windows" joint label sequence is "Intent block 1 = {operation = open, object = air conditioner}, intent block 2 = {operation = open, object = windows}".
[0062] The method of this embodiment parses the most likely joint tag sequence for the input sentence, so that when multiple intentions with the same name appear in the same sentence, they can also be represented and distinguished by the joint tag.
[0063] Further references Figure 3 , which shows a flowchart of another method for using a multi-intent semantic understanding model provided by an embodiment of the present application. Figure 2 A flowchart of the steps further defined in the process after "processing the output sequence of the joint tags to obtain multiple intention block information".
[0064] like Figure 3 As shown, in step 301, the intent names corresponding to the plurality of intent block information are obtained based on a preset slot information mapping table;
[0065] In step 302, each intent block is assigned a corresponding intent name to obtain multi-intent semantic information.
[0066] In this embodiment, for step 301, the multi-intent semantic understanding model uses a device to obtain intent names corresponding to multiple intent block information based on a preset slot information mapping table. Taking turning on the air conditioner and car windows as an example, the intent of "operation" plus "object = (air conditioner | window | light | door)" is mapped to "device control".
[0067] Then, for step 302, the multi-intent semantic understanding model uses a device to assign a corresponding intent name to each intent block to obtain multi-intent semantic information.
[0068] The method of this embodiment obtains the intent names corresponding to multiple intent block information based on a preset slot information mapping table, and then assigns the corresponding intent name to each intent block to obtain multi-intent semantic information, thereby realizing the splicing of multiple semantic slots in the joint label design. Further, it can support a piece of text belonging to different semantic slots at the same time.
[0069] It should be noted that the above method steps are not used to limit the execution order of each step. In fact, some steps may be executed simultaneously or in the opposite order to the specified step order, and this application has no limitation on this.
[0070] Please refer to Figure 4 , which shows a sample example diagram of single-intent spoken semantic understanding in the field of air tickets, which is a specific example of the multi-intent semantic understanding model training and use method provided by an embodiment of the present invention.
[0071] like Figure 4 As shown in the figure, spoken language semantic understanding is the semantic understanding of what users say in task-based dialogue systems, and aims to extract structured information such as intent and semantic slots in the current field from user sentences. For example, if a user says "check the air tickets from Shanghai to Shenzhen", the corresponding intent is "air ticket query (FindFlight)", and the semantic slot information is "departure city (FromCity) = Shanghai; arrival city (ToCity) = Shenzhen". Therefore, spoken language semantic understanding is divided into two subtasks: intent classification and semantic slot filling. Among them, intent classification is a sentence classification task, and semantic slot filling is a sequence labeling task. As shown in the figure, spoken language semantic understanding is the semantic understanding of the task, and the semantic slot filling is a sequence labeling task. Figure 4 As shown in the figure, since a semantic slot may cover multiple words, the annotation of the semantic slot follows the annotation format of BIO (begin\inside\outside).
[0072] Please refer to Figure 5 , which shows a sample example diagram of multi-intent spoken semantic understanding in the field of smart home, which is a specific example of the multi-intent semantic understanding model training and use method provided by an embodiment of the present invention.
[0073] like Figure 5 As shown in the figure, in the field of spoken semantic understanding, the interactive requirements of a single intent in a sentence can no longer meet the needs of users. Therefore, spoken semantic understanding technologies and methods that support multiple intents in a sentence have become a new research and application hotspot. Multiple intents in a sentence means that the semantic information of a sentence is no longer a single intent and its related semantic slots, but is composed of multiple independent intents and the semantic slots involved in each intent. For example, when a user says "turn on the air conditioner and then draw the curtains", there are two intents, namely "turn on the air conditioner" and "draw the curtains". As Figure 5 As shown, we can see that there are two intents and the semantic slot sequence corresponding to each intent. In particular, it is worth noting that the names of multiple intents can be the same, just like Figure 5As shown in the example, the intent names of "turn on the air conditioner" and "close the curtains" are both "home device control". Traditional technologies based on classifier ideas and methods can only output one or more intents with different names, so previous similar technologies cannot handle the situation where the same intent is said multiple times in a sentence. Similarly, in order to support the situation where the same intent is said multiple times in a sentence, we must propose new technologies that are very different from previous methods.
[0074] Please refer to Figure 6 , which shows a structure diagram of a multi-intent spoken semantic understanding model based on joint tags, which is a specific example of a multi-intent semantic understanding model training and use method provided by an embodiment of the present invention.
[0075] like Figure 6 As shown in the figure, based on the final joint label, we can use the sequence labeling model to model multi-intent semantic understanding, that is, to predict an output sequence of joint labels of equal length for the character sequence (or word sequence) of the input sentence.
[0076] Please refer to Figure 7 , which shows a flowchart of a specific example of a method for training and using a multi-intent semantic understanding model provided by an embodiment of the present invention.
[0077] like Figure 7 As shown, step 1: data annotation based on joint labels, according to the definition of joint labels (that is, the original semantic slot labels and intent block numbers), the sentences of multi-intent statements are manually annotated at the sequence level to construct training data for multi-intent semantic understanding.
[0078] Step 2: Model training: Based on the training data of multi-intent semantic understanding, the parameters of the input encoding module and the output parsing module are trained and optimized.
[0079] Step 3: Input encoding module, the context encoder maps the input sentence into a dense vector representation. In this patent, we use the bidirectional encoding representation based on transformer (BERT) as the upper text encoder.
[0080] Step 4: Output parsing module, based on the above vector representation of the input sentence, we use a conditional random field model to consider the dependency between adjacent output labels. The conditional random field model can parse the most likely joint label sequence for the input sentence.
[0081] Step 5: Intent block structured output module, based on the above steps, obtains the output sequence of joint labels. Further, by summarizing the joint labels and corresponding texts according to the intent block number, multiple intent block information will be obtained. Finally, through an intent prediction module, the intent name of the intent block is predicted based on the intent block information.
[0082] Please refer to Figure 8 , which shows a block diagram of a multi-intent semantic understanding model training device provided by an embodiment of the present invention.
[0083] like Figure 8 As shown, the multi-intent semantic understanding model training device 800 includes an input program module 810, an output program module 820 and a training program module 830.
[0084] Among them, the input program module 810 is configured to encode the input sentence with joint label annotation to obtain the vector representation of the input sentence, wherein the joint label annotation includes semantic slot label annotation and intent block number annotation, and different intents have different intent block numbers; the output program module 820 is configured to parse the vector representation to obtain the output sequence of the joint label; the training program module 830 is configured to train the multi-intent semantic understanding model based on the joint label annotation and the output sequence of the joint label.
[0085] Please refer to Fig. 9 , which shows a block diagram of a device for using a multi-intent semantic understanding model provided by an embodiment of the present invention.
[0086] like Fig. 9 As shown, a device 900 for using a multi-intent semantic understanding model includes an acquisition program module 910 and a processing program module 920.
[0087] Among them, the acquisition program module 910 is configured to input the user input sentence into the multi-intent semantic understanding model trained according to the method described above, and obtain the output sequence of joint labels output by the multi-intent semantic understanding model; the processing program module 920 is configured to process the output sequence of the joint labels to obtain multiple intent block information, wherein each intent block information includes an intent block number and a semantic slot label.
[0088] It should be understood that Figure 8 and Fig. 9 Modules and references documented in Figure 1 , Figure 2 and Figure 3 Therefore, the operations and features described above for the method and the corresponding technical effects are also applicable to Figure 8 and Fig. 9 The modules in it will not be described in detail here.
[0089] It is worth noting that the modules in the embodiments of the present disclosure are not used to limit the scheme of the present disclosure. For example, the input program module can be described as encoding the input sentence with joint label annotation to obtain the vector representation of the input sentence, wherein the joint label annotation includes semantic slot label annotation and intention block number annotation, and different intentions have different modules with intention block numbers. In addition, the relevant functional modules can also be implemented by a hardware processor, for example, the input program module can also be implemented by a processor, which will not be repeated here.
[0090] In some other embodiments, the embodiments of the present invention further provide a non-volatile computer storage medium, which stores computer executable instructions, and the computer executable instructions can execute the multi-intent semantic understanding model training and use method in any of the above method embodiments;
[0091] As an implementation mode, the non-volatile computer storage medium of the present invention stores computer executable instructions, and the computer executable instructions are configured as follows:
[0092] Encoding an input sentence with a joint label annotation to obtain a vector representation of the input sentence, wherein the joint label annotation includes a semantic slot label annotation and an intent block number annotation, and different intents have different intent block numbers;
[0093] Parsing the vector representation to obtain an output sequence of joint labels;
[0094] The multi-intent semantic understanding model is trained based on the joint label annotation and the output sequence of the joint label.
[0095] As another embodiment, the non-volatile computer storage medium of the present invention stores computer executable instructions, and the computer executable instructions are configured as follows:
[0096] Inputting the user input sentence into the multi-intent semantic understanding model trained according to the method, and obtaining an output sequence of joint labels output by the multi-intent semantic understanding model;
[0097] The output sequence of the joint label is processed to obtain a plurality of intention block information, wherein each intention block information includes an intention block number and a semantic slot label.
[0098] The non-volatile computer-readable storage medium may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the multi-intent semantic understanding model training and use device, etc. In addition, the non-volatile computer-readable storage medium may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the non-volatile computer-readable storage medium may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the multi-intent semantic understanding model training and use device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0099] An embodiment of the present invention also provides a computer program product, which includes a computer program stored on a non-volatile computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer executes any of the above-mentioned multi-intent semantic understanding model training and use methods.
[0100] Fig.10 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention, such as Fig.10 As shown, the device includes: one or more processors 1010 and a memory 1020, Fig.10 A processor 1010 is taken as an example. The device for training and using a multi-intent semantic understanding model may also include: an input device 1030 and an output device 1040. The processor 1010, the memory 1020, the input device 1030, and the output device 1040 may be connected via a bus or other means. Fig.10 In the example, the connection through the bus is taken. The memory 1020 is the above-mentioned non-volatile computer-readable storage medium. The processor 1010 executes various functional applications and data processing of the server by running the non-volatile software programs, instructions and modules stored in the memory 1020, that is, the multi-intent semantic understanding model training and use method of the above-mentioned method embodiment is realized. The input device 1030 can receive input digital or character information, and generate key signal input related to the user setting and function control of the communication compensation device. The output device 1040 may include a display device such as a display screen.
[0101] The above product can execute the method provided by the embodiment of the present invention, and has the functional modules and beneficial effects corresponding to the execution method. For technical details not described in detail in this embodiment, please refer to the method provided by the embodiment of the present invention.
[0102] As an implementation mode, the electronic device is applied to a multi-intent semantic understanding model training and use device, and is used for a client, and includes: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can:
[0103] Encoding an input sentence with a joint label annotation to obtain a vector representation of the input sentence, wherein the joint label annotation includes a semantic slot label annotation and an intent block number annotation, and different intents have different intent block numbers;
[0104] Parsing the vector representation to obtain an output sequence of joint labels;
[0105] The multi-intent semantic understanding model is trained based on the joint label annotation and the output sequence of the joint label.
[0106] As another implementation, the electronic device is applied to a multi-intent semantic understanding model training and use device, which is used for a client, and includes: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can:
[0107] Inputting the user input sentence into the multi-intent semantic understanding model trained according to the method, and obtaining an output sequence of joint labels output by the multi-intent semantic understanding model;
[0108] The output sequence of the joint label is processed to obtain a plurality of intention block information, wherein each intention block information includes an intention block number and a semantic slot label.
[0109] The electronic device of the embodiment of the present application exists in various forms, including but not limited to:
[0110] (1) Mobile communication devices: These devices are characterized by their mobile communication functions and their main purpose is to provide voice and data communications. These terminals include: smart phones (such as iPhone), multimedia phones, functional phones, and low-end phones.
[0111] (2) Ultra-mobile personal computer devices: These devices fall into the category of personal computers, have computing and processing capabilities, and generally also have mobile Internet access features. These terminals include: PDA, MID and UMPC devices, such as iPad.
[0112] (3) Portable entertainment devices: These devices can display and play multimedia content. They include audio and video players (such as iPods), handheld game consoles, e-books, as well as smart toys and portable car navigation devices.
[0113] (4) Server: A device that provides computing services. The server consists of a processor, hard disk, memory, system bus, etc. The server is similar to a general computer architecture, but because it needs to provide highly reliable services, it has higher requirements in terms of processing power, stability, reliability, security, scalability, and manageability.
[0114] (5) Other electronic devices with data interaction functions.
[0115] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, i.e., they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.
[0116] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or some parts of the embodiment.
[0117] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A multi-intent semantic understanding model training method, comprising: Encoding an input sentence with a joint label annotation to obtain a vector representation of the input sentence, wherein the joint label annotation includes a semantic slot label annotation and an intent block number annotation, and different intents have different intent block numbers; The vector representation is parsed to obtain an output sequence of joint labels, wherein the joint labels, except for the meaningless O label, are defined as: (B|I)-SlotName-IntentNumber(;(B|I)-SlotName-IntentNumber)*, where (B|I) indicates that the beginning is the (begin\inside) tag, SlotName is the semantic slot name, IntentNumber is the intent block number, and the intent block number is a positive integer, and (...)* indicates that the content of the parentheses is repeated 0 to multiple times; The multi-intent semantic understanding model is trained based on the joint label annotation and the output sequence of the joint label.
2. The method according to claim 1, wherein: The encoding of the input sentence with the joint label annotation includes: A transformer-based bidirectional encoding representor is used to encode the input sentence annotated with joint labels.
3. The method according to claim 1, wherein: The parsing of the vector representation comprises: A conditional random field model is used to parse the vector representation of the input sentence.
4. The method according to claim 1, wherein: Before encoding the input sentence annotated with the joint tag, the method further includes: Get the input sentence with joint label annotation obtained by performing sequence-level annotation on the input sentence of multi-intent utterance.
5. A method for using a multi-intent semantic understanding model, comprising: Inputting the user input sentence into the multi-intent semantic understanding model trained by the method according to claim 1 or 2, and obtaining an output sequence of joint labels output by the multi-intent semantic understanding model; The output sequence of the joint label is processed to obtain a plurality of intention block information, wherein each intention block information includes an intention block number and a semantic slot label.
6. The method according to claim 5, wherein: After processing the output sequence of the joint tag to obtain a plurality of intention block information, the method further includes: Acquire the intent names corresponding to the plurality of intent block information based on a preset slot information mapping table; Assign a corresponding intent name to each intent block to obtain multi-intent semantic information.
7. A multi-intent semantic understanding model training device, comprising: An input program module is configured to encode an input sentence with a joint label annotation to obtain a vector representation of the input sentence, wherein the joint label annotation includes a semantic slot label annotation and an intent block number annotation, and different intents have different intent block numbers; An output program module is configured to parse the vector representation to obtain an output sequence of joint labels, wherein the joint labels, except for the meaningless O label, are defined as: (B|I)-SlotName-IntentNumber(;(B|I)-SlotName-IntentNumber)*, wherein (B|I) indicates that the beginning is a (begin\inside) tag, SlotName is a semantic slot name, IntentNumber is the intent block number, the intent block number is a positive integer, and (...)* indicates that the content of the parentheses is repeated 0 to multiple times; A training program module is configured to train the multi-intent semantic understanding model based on the joint label annotation and the output sequence of the joint label.
8. A device for using a multi-intent semantic understanding model, comprising: An acquisition program module is configured to input a user input sentence into a multi-intent semantic understanding model trained according to the method of claim 1 or 2, and obtain an output sequence of joint labels output by the multi-intent semantic understanding model; The processing program module is configured to process the output sequence of the joint label to obtain multiple intention block information, wherein each intention block information includes an intention block number and a semantic slot label.
9. An electronic device, comprising: At least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the steps of the method described in any one of claims 1 to 6.
10. A storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Multi-intention identification method and display equipment
CN112163086A
A clustering pre-analysis-based multi-intention recognition and semantic slot filling combined modeling method
CN113204952A
Intention recognition method and system for task type multi-intention dialogue
CN113515611A
Cited By
Multi-dimensional constraint and semantic intention fused skin care efficacy vector quantification method and system
CN122133765A