Slot filling method and device, electronic equipment and storage medium
By extracting the semantic features of voice interaction intentions and using two-way long and short-term memory networks and conditional random field networks for slot filling, the problem of low slot filling accuracy in the prior art is solved, and higher slot filling accuracy and accuracy are achieved sex.
Patent Information
- Application Number
- CN202310610520.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-26
- Publication Date
- 2024-11-26
AI Technical Summary
The slot filling accuracy in the prior art is low, and it is impossible to accurately fill the target text according to the voice interaction intention.
By obtaining the voice interaction intention of the target text, extracting the semantic features of the target text and the voice interaction intention, performing feature fusion and encoding and decoding, and using a two-way long and short-term memory network and a conditional random field network for slot filling, improving the accuracy of slot filling.
The slot filling is guided through voice interaction intentions, which significantly improves the accuracy of slot filling and ensures the accuracy and reliability of the slot filling results of the target text.
Smart Images

Figure CN119028337A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of natural language processing technology, and in particular to a slot filling method, device, electronic device and storage medium. Background Art
[0002] At present, with the development of technologies such as artificial intelligence and natural language processing, voice interaction technology has been widely used in scenarios such as vehicle-mounted terminals, robots, and smart home appliances, making people's lives more convenient. For example, in the vehicle-mounted terminal scenario, passengers can say "turn on the air conditioner", and the vehicle-mounted terminal can turn on the air conditioner through the vehicle control application, without the need for passengers to turn on the air conditioner manually. Slot filling is an important technology in voice interaction technology. However, the slot filling method in the related art has the problem of low slot filling accuracy. Summary of the invention
[0003] The present disclosure provides a slot filling method, device, electronic device, computer readable storage medium, and computer program product to at least solve the problem of low slot filling accuracy in the related art. The technical solution of the present disclosure is as follows:
[0004] According to a first aspect of an embodiment of the present disclosure, a slot filling method is provided, comprising: obtaining a voice interaction intention of a target text; and filling a slot of the target text based on the voice interaction intention.
[0005] In one embodiment of the present disclosure, the slot-filling of the target text based on the voice interaction intention includes: extracting features of the target text to obtain a first semantic feature of the target text; extracting features of the voice interaction intention to obtain a second semantic feature of the voice interaction intention; and filling slots of the target text based on the first semantic feature and the second semantic feature.
[0006] In one embodiment of the present disclosure, the slot-filling of the target text based on the first semantic feature and the second semantic feature includes: fusing the first semantic feature and the second semantic feature to obtain a fused feature; and filling the slots of the target text based on the fused feature.
[0007] In one embodiment of the present disclosure, the fusing the first semantic feature and the second semantic feature to obtain the fused feature includes: concatenating the first semantic feature and the second semantic feature to obtain the fused feature.
[0008] In one embodiment of the present disclosure, the target text is slot-filled based on the fused features, including: encoding the fused features to obtain coded features; decoding the coded features to obtain target slot-filling results of the target text, so as to fill the slots of the target text.
[0009] In one embodiment of the present disclosure, encoding the fused features to obtain the encoded features includes: inputting the fused features into a bidirectional long short-term memory network, and encoding the fused features by the bidirectional long short-term memory network to obtain the encoded features.
[0010] In one embodiment of the present disclosure, decoding the encoding feature to obtain a target slot filling result of the target text includes: decoding the encoding feature to obtain an initial slot filling result of the target text; decoding the initial slot filling result to obtain the target slot filling result.
[0011] In one embodiment of the present disclosure, decoding the encoded features to obtain the initial slot filling results of the target text includes: inputting the encoded features into a fully connected network, and decoding the encoded features by the fully connected network to obtain the initial slot filling results.
[0012] In one embodiment of the present disclosure, decoding the initial slot filling result to obtain the target slot filling result includes: inputting the initial slot filling result into a conditional random field network, and decoding the initial slot filling result by the conditional random field network to obtain the target slot filling result.
[0013] According to a second aspect of an embodiment of the present disclosure, a slot filling device is provided, comprising: an acquisition module configured to execute a voice interaction intention to acquire a target text; and a filling module configured to execute slot filling for the target text based on the voice interaction intention.
[0014] In one embodiment of the present disclosure, the filling module is further configured to execute: feature extraction on the target text to obtain a first semantic feature of the target text; feature extraction on the voice interaction intention to obtain a second semantic feature of the voice interaction intention; and slot filling on the target text based on the first semantic feature and the second semantic feature.
[0015] In one embodiment of the present disclosure, the filling module is further configured to execute: performing feature fusion on the first semantic feature and the second semantic feature to obtain a fused feature; and filling slots of the target text based on the fused feature.
[0016] In one embodiment of the present disclosure, the filling module is further configured to execute: concatenating the first semantic feature and the second semantic feature to obtain the fusion feature.
[0017] In one embodiment of the present disclosure, the filling module is further configured to perform: encoding the fused features to obtain encoded features; decoding the encoded features to obtain target slot filling results of the target text to fill the slots of the target text.
[0018] In one embodiment of the present disclosure, the filling module is further configured to execute: inputting the fused features into a bidirectional long short-term memory network, and encoding the fused features by the bidirectional long short-term memory network to obtain the encoded features.
[0019] In one embodiment of the present disclosure, the filling module is further configured to execute: decoding the encoding feature to obtain an initial slot filling result of the target text; decoding the initial slot filling result to obtain the target slot filling result.
[0020] In one embodiment of the present disclosure, the filling module is further configured to execute: inputting the encoding feature into a fully connected network, and decoding the encoding feature by the fully connected network to obtain the initial slot filling result.
[0021] In one embodiment of the present disclosure, the filling module is further configured to execute: inputting the initial slot filling result into a conditional random field network, and having the conditional random field network decode the initial slot filling result to obtain the target slot filling result.
[0022] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, comprising a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to implement the steps of the method described in the first aspect of the embodiment of the present disclosure.
[0023] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the method described in the first aspect of the embodiment of the present disclosure are implemented.
[0024] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor of an electronic device, the computer program implements the steps of the method described in the first aspect of the embodiment of the present disclosure.
[0025] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects: obtaining the voice interaction intention of the target text, and filling the slots of the target text based on the voice interaction intention. Therefore, the method can take into account the voice interaction intention of the target text and fill the slots of the target text, that is, the slot filling can be guided by the voice interaction intention, which helps to improve the accuracy of the slot filling.
[0026] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.
[0028] Figure 1 The figure is a flow chart of a slot filling method according to an exemplary embodiment.
[0029] Figure 2 is a flow chart of a slot filling method according to another exemplary embodiment.
[0030] Figure 3 is a flow chart of a slot filling method according to another exemplary embodiment.
[0031] Figure 4 is a schematic diagram showing a slot filling method according to an exemplary embodiment.
[0032] Figure 5 The figure is a block diagram of a slot filling device according to an exemplary embodiment.
[0033] Figure 6 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0034] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.
[0035] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0036] The acquisition, storage, use, and processing of data in the technical solution disclosed in this disclosure are in compliance with the relevant provisions of national laws and regulations.
[0037] Figure 1 is a flow chart of a slot filling method according to an exemplary embodiment. Figure 1 As shown, the slot filling method of the embodiment of the present disclosure includes the following steps.
[0038] S101, obtaining the voice interaction intention of the target text.
[0039] It should be noted that the slot filling method of the embodiment of the present disclosure is performed by an electronic device, which includes a mobile phone, a notebook, a desktop computer, a vehicle-mounted terminal, a smart home appliance, etc. The slot filling method of the embodiment of the present disclosure can be performed by a slot filling device of the embodiment of the present disclosure, and the slot filling device of the embodiment of the present disclosure can be configured in any electronic device to perform the slot filling method of the embodiment of the present disclosure.
[0040] It should be noted that there are no excessive restrictions on the target text, for example, it may include text in at least one language such as Chinese text, English text, etc. In one implementation, taking a vehicle driving scenario as an example, a MIC (Microphone) module is provided on the vehicle, and the user's voice information can be collected through the MIC module, and the voice information is subjected to voice recognition to obtain the target text.
[0041] It should be noted that there are no excessive restrictions on voice interaction intentions, for example, they may include information query, navigation, device control (such as vehicle-mounted device control), chat, etc. Among them, information query includes trend query, value query, TopN (top N items) query, etc. It should be noted that obtaining voice interaction intentions can be achieved by using any intention recognition method in the relevant technology, and there is no excessive restriction here.
[0042] In one embodiment, obtaining the voice interaction intention of the target text includes determining whether the target text includes a set keyword. If the target text includes the set keyword, the voice interaction intention is obtained based on the mapping relationship between the set keyword and the voice interaction intention. It is understandable that different set keywords can map different voice interaction intentions. For example, there is a mapping relationship between the set keywords "most", "largest", and "recent" and the voice interaction intention "TopN query", and there is a mapping relationship between the set keywords "seat" and "air conditioning" and the voice interaction intention "device control".
[0043] S102, based on the voice interaction intention, fill the slots of the target text.
[0044] It should be noted that slot filling for the target text refers to obtaining the target slot of the text segment in the target text. It is understandable that the target text includes multiple text segments, and different text segments may correspond to different target slots or the same target slot. It should be noted that there are not too many restrictions on the slot filling results. For example, it may include the probability of the text segment in the target text under each candidate slot, the target slot of the text segment in the target text, etc. There are not too many restrictions on the slots. For example, the slots may include "time", "department", "product", "indicator", "regional unit", "category", etc.
[0045] In one embodiment, Figure 4 As shown, based on the voice interaction intention, the target text slots are filled, including inputting the voice interaction intention and the target text into the target language model, and the target language model fills the target text slots based on the voice interaction intention. It should be noted that there are no excessive restrictions on the target language model, for example, it can include a deep learning model, etc.
[0046] In one embodiment, slots of a target text are filled based on the voice interaction intention, including obtaining a candidate slot set of the target text based on the voice interaction intention, and determining a target slot of a text fragment in the target text from multiple candidate slots in the candidate slot set.
[0047] In some examples, based on the voice interaction intent, a candidate slot set of the target text is obtained, including obtaining the candidate slot set based on the mapping relationship between the voice interaction intent and the candidate slot set. It is understandable that different voice interaction intents can map different candidate slot sets. For example, there is a mapping relationship between the voice interaction intent "TopN query" and the candidate slot set {time, category, regional unit, indicator}, and there is a mapping relationship between the voice interaction intent "device control" and the candidate slot set {device, indicator}.
[0048] For example, if the target text is "the province with the highest mobile phone sales in the past month" and the voice interaction intention of the target text is "TopN query", the candidate slot set {time, category, regional unit, indicator} mapped by the "TopN query" can be obtained, and from the multiple candidate slots in the candidate slot set, the target slot of the text segment "the past month" in the target text is determined to be "time", the target slot of the text segment "mobile phone" is determined to be "category", the target slot of the text segment "sales" is determined to be "indicator", and the target slot of the text segment "province" is determined to be "regional unit".
[0049] The slot filling method provided by the embodiment of the present disclosure obtains the voice interaction intention of the target text, and fills the slots of the target text based on the voice interaction intention. Therefore, the method can take into account the voice interaction intention of the target text and fill the slots of the target text, that is, the slot filling can be guided by the voice interaction intention, which helps to improve the accuracy of the slot filling.
[0050] Figure 2 is a flow chart of a slot filling method according to another exemplary embodiment. Figure 2 As shown, the slot filling method of the embodiment of the present disclosure includes the following steps.
[0051] S201, obtaining the voice interaction intention of the target text.
[0052] For the relevant contents of step S201, please refer to the above embodiment, which will not be described again here.
[0053] S202: extracting features from the target text to obtain a first semantic feature of the target text.
[0054] It should be noted that feature extraction of the target text may be implemented by using any text feature extraction method in the related art, and no further limitation is made here.
[0055] It should be noted that there are no excessive restrictions on the first semantic feature. For example, it may include a semantic vector, and the semantic vector may be a 3-dimensional vector.
[0056] In one embodiment, Figure 4As shown, the target language model includes a sub-language model, and feature extraction is performed on the target text to obtain a first semantic feature of the target text, including inputting the target text into the sub-language model, and the sub-language model extracts features from the target text to obtain the first semantic feature of the target text. It should be noted that there is no excessive limitation on the sub-language model, for example, it can include RoBERTa (A Robustly Optimized BERT) and BERT (Bidirectional Enoceder Representations from Transformers) models.
[0057] For example, the first semantic feature may be a 3D semantic vector of (batch_size, sequence_length, hidden_size), where batch_size is the number of training samples in a training process of the sub-language model, sequence_length is the text length of the target text, and hidden_size is the size of the hidden layer of the sub-language model.
[0058] S203, extracting features of the voice interaction intention to obtain a second semantic feature of the voice interaction intention.
[0059] It should be noted that feature extraction of voice interaction intention can be achieved by using any text feature extraction method in the relevant technology, and no further restrictions are made here.
[0060] It should be noted that there are no excessive restrictions on the second semantic feature. For example, it may include a semantic vector, and the semantic vector may be a 3-dimensional vector.
[0061] In one embodiment, Figure 4 As shown, the target language model includes an embedding layer network, and features are extracted from the voice interaction intention to obtain a second semantic feature of the voice interaction intention, including inputting the voice interaction intention into the embedding layer network, and extracting features from the voice interaction intention by the embedding layer network to obtain the second semantic feature of the voice interaction intention. It should be noted that the embedding layer network can adopt any embedding layer network in the relevant technology, and no excessive limitation is made here.
[0062] For example, the second semantic feature may be a three-dimensional semantic vector of (batch_size, sequence_length, 1), where batch_size is the number of training samples in a training process of the embedding layer network, and sequence_length is the text length of the voice interaction intention.
[0063] S204: Filling slots in the target text based on the first semantic feature and the second semantic feature.
[0064] In one embodiment, slots are filled in the target text based on the first semantic feature and the second semantic feature, including obtaining a prediction result of the voice interaction intention based on the second semantic feature, and filling in the slots of the target text based on the prediction result of the voice interaction intention and the first semantic feature. Thus, the method can obtain a prediction result of the voice interaction intention based on the second semantic feature, and guide the slot filling through the prediction result of the voice interaction intention, which helps to improve the accuracy of the slot filling.
[0065] It should be noted that there are not too many restrictions on the prediction results of voice interaction intention. For example, it may include the label of voice interaction intention, the label identification of voice interaction intention, the identification of voice interaction intention, etc.
[0066] In one embodiment, slots of a target text are filled based on the first semantic feature and the second semantic feature, including fusing the first semantic feature and the second semantic feature to obtain a fused feature, and filling slots of the target text based on the fused feature.
[0067] It should be noted that feature fusion can be achieved by using any feature fusion method in the relevant technology, and no further limitations are made here.
[0068] In some examples, the first semantic feature and the second semantic feature are fused to obtain the fused feature, including concatenating the first semantic feature and the second semantic feature to obtain the fused feature. For example, the first semantic feature and the second semantic feature are concatenated, including concatenating the tail of the second semantic feature with the front of the first semantic feature, that is, the first semantic feature and the second semantic feature are concatenated in the order of the second semantic feature and the first semantic feature.
[0069] In some examples, such as Figure 4 As shown, the target language model includes a concatenation network, which concatenates the first semantic feature and the second semantic feature to obtain a fusion feature, including inputting the first semantic feature and the second semantic feature into the concatenation network, and the concatenation network concatenates the first semantic feature and the second semantic feature to obtain a fusion feature.
[0070] In some examples, the target text is slot-filled based on the fused features, including inputting the fused features into a preset language model, and the preset language model fills the target text slot based on the fused features. It should be noted that there is no excessive limitation on the preset language model, for example, the preset language model includes an encoder and a decoder.
[0071] The slot filling method provided by the embodiment of the present disclosure performs feature extraction on the target text to obtain the first semantic feature of the target text, performs feature extraction on the voice interaction intention to obtain the second semantic feature of the voice interaction intention, and fills the slots of the target text based on the first semantic feature and the second semantic feature.
[0072] Figure 3 is a flow chart of a slot filling method according to another exemplary embodiment. Figure 3 As shown, the slot filling method of the embodiment of the present disclosure includes the following steps.
[0073] S301, obtaining the voice interaction intention of the target text.
[0074] S302: extract features from the target text to obtain a first semantic feature of the target text.
[0075] S303, extracting features of the voice interaction intention to obtain a second semantic feature of the voice interaction intention.
[0076] S304: Fusing the first semantic feature and the second semantic feature to obtain a fused feature.
[0077] For the relevant contents of steps S301 - S304 , please refer to the above embodiments and will not be described again here.
[0078] S305, encoding the fused features to obtain encoded features.
[0079] It should be noted that the encoding can be implemented using any encoding method in the relevant technology, and no further limitations are made here.
[0080] In one implementation, encoding the fused features to obtain the encoded features includes inputting the fused features into a Bidirectional Long Short-Term Memory (Bidirectional Long Short-Term Memory) network, and encoding the fused features by the BiLSTM network to obtain the encoded features.
[0081] In some examples, such as Figure 4 As shown, the target language model includes an encoder, which encodes the fused features to obtain the encoded features, including inputting the fused features into the encoder, and encoding the fused features by the encoder to obtain the encoded features. Among them, the encoder includes multiple BiLSTM networks. It can be understood that the fused features can be encoded by the first BiLSTM network to obtain the encoded features, and the encoded features can be encoded by the second BiLSTM network to update the encoded features, and the above encoding feature update process is repeated until the last BiLSTM network is traversed to obtain the final encoded features.
[0082] S306, decoding the encoding feature to obtain a target slot filling result of the target text, so as to fill the slots of the target text.
[0083] It should be noted that decoding can be implemented using any decoding method in the relevant technology, and no further limitations are made here.
[0084] In one embodiment, Figure 4 As shown, the target language model includes a decoder, which decodes the encoded features to obtain the target slot filling results of the target text, including inputting the encoded features into the decoder, and the decoder decodes the encoded features to obtain the target slot filling results of the target text.
[0085] In one embodiment, decoding the coding feature to obtain the target slot filling result of the target text includes decoding the coding feature to obtain the initial slot filling result of the target text, and decoding the initial slot filling result to obtain the target slot filling result. Therefore, in this method, the coding feature and the initial slot filling result can be decoded in sequence to obtain the target slot filling result, that is, multiple decodings are performed to improve the accuracy of the target slot filling result.
[0086] It should be noted that there are not too many restrictions on the initial slot filling results. For example, the initial slot filling results may include the probability of the text segment in the target text in each candidate slot, the initial slot of the text segment in the target text, etc.
[0087] In some examples, such as Figure 4 As shown, the decoder includes a fully connected network, which decodes the encoded features to obtain the initial slot filling result of the target text, including inputting the encoded features into the fully connected network, and the fully connected network decodes the encoded features to obtain the initial slot filling result. Among them, the fully connected network includes FCN (Full Connect Neural Network, FCNN) and the like.
[0088] In some examples, such as Figure 4 As shown, the decoder includes a CRF (Conditional Random Field) network, which decodes the initial slot filling result to obtain the target slot filling result, including inputting the initial slot filling result into the CRF network, and the CRF network decodes the initial slot filling result to obtain the target slot filling result.
[0089] The slot filling method provided by the embodiment of the present disclosure encodes the fused features to obtain the encoded features, decodes the encoded features, obtains the target slot filling results of the target text, and fills the slots of the target text.
[0090] Figure 5 is a block diagram of a slot filling device according to an exemplary embodiment. Figure 5 The slot filling device 100 of the embodiment of the present disclosure includes: an acquisition module 110 and a filling module 120.
[0091] The acquisition module 110 is configured to execute the voice interaction intention of acquiring the target text;
[0092] The filling module 120 is configured to perform slot filling on the target text based on the voice interaction intention.
[0093] In one embodiment of the present disclosure, the filling module 120 is further configured to execute: feature extraction on the target text to obtain a first semantic feature of the target text; feature extraction on the voice interaction intention to obtain a second semantic feature of the voice interaction intention; and slot filling on the target text based on the first semantic feature and the second semantic feature.
[0094] In one embodiment of the present disclosure, the filling module 120 is further configured to execute: performing feature fusion on the first semantic feature and the second semantic feature to obtain a fused feature; and filling the slots of the target text based on the fused feature.
[0095] In one embodiment of the present disclosure, the filling module 120 is further configured to execute: concatenating the first semantic feature and the second semantic feature to obtain the fusion feature.
[0096] In one embodiment of the present disclosure, the filling module 120 is further configured to perform: encoding the fused features to obtain encoded features; decoding the encoded features to obtain target slot filling results of the target text to fill the slots of the target text.
[0097] In one embodiment of the present disclosure, the filling module 120 is further configured to execute: inputting the fused features into a bidirectional long short-term memory network, and encoding the fused features by the bidirectional long short-term memory network to obtain the encoded features.
[0098] In one embodiment of the present disclosure, the filling module 120 is further configured to execute: decoding the encoding feature to obtain an initial slot filling result of the target text; decoding the initial slot filling result to obtain the target slot filling result.
[0099] In one embodiment of the present disclosure, the filling module 120 is further configured to execute: inputting the encoding feature into a fully connected network, and having the fully connected network decode the encoding feature to obtain the initial slot filling result.
[0100] In one embodiment of the present disclosure, the filling module 120 is further configured to execute: inputting the initial slot filling result into a conditional random field network, and the conditional random field network decodes the initial slot filling result to obtain the target slot filling result.
[0101] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0102] The slot filling device provided by the embodiment of the present disclosure obtains the voice interaction intention of the target text, and fills the slots of the target text based on the voice interaction intention. Therefore, the method can take into account the voice interaction intention of the target text and fill the slots of the target text, that is, the slot filling can be guided by the voice interaction intention, which helps to improve the accuracy of the slot filling.
[0103] Figure 6 is a block diagram of an electronic device 200 according to an exemplary embodiment.
[0104] like Figure 6 As shown, the electronic device 200 includes:
[0105] The memory 210 and the processor 220, a bus 230 connecting different components (including the memory 210 and the processor 220), the memory 210 stores a computer program, and when the processor 220 executes the program, the slot filling method described in the embodiment of the present disclosure is implemented.
[0106] Bus 230 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. For example, these architectures include but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus and Peripheral Component Interconnect (PCI) bus.
[0107] The electronic device 200 typically includes a variety of electronic device readable media. These media can be any available media that can be accessed by the electronic device 200, including volatile and non-volatile media, removable and non-removable media.
[0108] The memory 210 may also include computer system readable media in the form of volatile memory, such as random access memory (RAM) 240 and / or cache memory 250. The electronic device 200 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 260 may be used to read and write non-removable, non-volatile magnetic media ( Figure 6 not shown, usually called a "hard drive"). Although Figure 6 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 230 via one or more data medium interfaces. The memory 210 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present disclosure.
[0109] A program / utility 280 having a set (at least one) of program modules 270 may be stored, for example, in the memory 210, such program modules 270 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 270 generally perform the functions and / or methods of the embodiments described in the present disclosure.
[0110] The electronic device 200 may also communicate with one or more external devices 290 (e.g., keyboards, pointing devices, displays 291, etc.), one or more devices that enable a user to interact with the electronic device 200, and / or any device that enables the electronic device 200 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed through an input / output (I / O) interface 292. Furthermore, the electronic device 200 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) through a network adapter 293. Figure 6 As shown, the network adapter 293 communicates with other modules of the electronic device 200 via the bus 230. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the electronic device 200, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0111] The processor 220 executes various functional applications and data processing by running the programs stored in the memory 210 .
[0112] It should be noted that the implementation process and technical principles of the electronic device of this embodiment refer to the aforementioned explanation of the slot filling method of the embodiment of the present disclosure, and will not be repeated here.
[0113] The electronic device provided by the embodiment of the present disclosure can execute the slot filling method as described above, obtain the voice interaction intention of the target text, and fill the slot of the target text based on the voice interaction intention. Therefore, the method can take into account the voice interaction intention of the target text and fill the slot of the target text, that is, the slot filling can be guided by the voice interaction intention, which helps to improve the accuracy of slot filling.
[0114] In order to implement the above embodiments, the present disclosure further proposes a computer-readable storage medium on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the slot filling method provided by the present disclosure are implemented.
[0115] Alternatively, the computer readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, or the like.
[0116] In order to implement the above embodiments, the present disclosure further provides a computer program product, including a computer program, characterized in that when the computer program is executed by a processor of an electronic device, the slot filling method as described above is implemented.
[0117] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0118] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A slot filling method, characterized in that: include: Get the voice interaction intention of the target text; Based on the voice interaction intention, the target text is slot-filled.
2. The method according to claim 1, characterized in that The filling of the slot of the target text based on the voice interaction intention includes: Performing feature extraction on the target text to obtain a first semantic feature of the target text; Extracting features of the voice interaction intention to obtain a second semantic feature of the voice interaction intention; Based on the first semantic feature and the second semantic feature, slots of the target text are filled.
3. The method according to claim 2, characterized in that The step of filling the slot of the target text based on the first semantic feature and the second semantic feature includes: Performing feature fusion on the first semantic feature and the second semantic feature to obtain a fused feature; Based on the fused features, the slots of the target text are filled.
4. The method according to claim 3, characterized in that The step of fusing the first semantic feature and the second semantic feature to obtain a fused feature includes: The first semantic feature and the second semantic feature are concatenated to obtain the fusion feature.
5. The method according to claim 3, characterized in that: The step of filling the slots of the target text based on the fusion features includes: Encoding the fused features to obtain encoded features; The encoding feature is decoded to obtain a target slot filling result of the target text, so as to fill the slots of the target text.
6. The method according to claim 5, characterized in that The step of encoding the fused features to obtain encoded features includes: The fused features are input into a bidirectional long short-term memory network, and the bidirectional long short-term memory network encodes the fused features to obtain the encoded features.
7. The method according to claim 5, characterized in that The decoding of the encoding feature to obtain a target slot filling result of the target text includes: Decoding the encoded features to obtain an initial slot filling result of the target text; The initial slot filling result is decoded to obtain the target slot filling result.
8. The method according to claim 7, characterized in that The decoding of the encoding feature to obtain an initial slot filling result of the target text includes: The encoded features are input into a fully connected network, and the fully connected network decodes the encoded features to obtain the initial slot filling result.
9. The method according to claim 7, characterized in that: The decoding of the initial slot filling result to obtain the target slot filling result includes: The initial slot filling result is input into a conditional random field network, and the conditional random field network decodes the initial slot filling result to obtain the target slot filling result.
10. A slot filling device, characterized in that: include: An acquisition module, configured to execute a voice interaction intention to acquire a target text; The filling module is configured to perform slot filling on the target text based on the voice interaction intention.
11. The device according to claim 10, characterized in that The filling module is further configured to perform: Performing feature extraction on the target text to obtain a first semantic feature of the target text; Extracting features of the voice interaction intention to obtain a second semantic feature of the voice interaction intention; Based on the first semantic feature and the second semantic feature, slots of the target text are filled.
12. The device according to claim 11, characterized in that The filling module is further configured to perform: Performing feature fusion on the first semantic feature and the second semantic feature to obtain a fused feature; Based on the fused features, the slots of the target text are filled.
13. The device according to claim 12, characterized in that The filling module is further configured to perform: The first semantic feature and the second semantic feature are concatenated to obtain the fusion feature.
14. The device according to claim 12, characterized in that The filling module is further configured to perform: Encoding the fused features to obtain encoded features; The encoding feature is decoded to obtain a target slot filling result of the target text, so as to fill the slots of the target text.
15. The device according to claim 14, characterized in that The filling module is further configured to perform: The fused features are input into a bidirectional long short-term memory network, and the bidirectional long short-term memory network encodes the fused features to obtain the encoded features.
16. The device according to claim 14, characterized in that The filling module is further configured to perform: Decoding the encoded features to obtain an initial slot filling result of the target text; The initial slot filling result is decoded to obtain the target slot filling result.
17. The device according to claim 16, characterized in that The filling module is further configured to perform: The encoded features are input into a fully connected network, and the fully connected network decodes the encoded features to obtain the initial slot filling result.
18. The device according to claim 16, characterized in that The filling module is further configured to perform: The initial slot filling result is input into a conditional random field network, and the conditional random field network decodes the initial slot filling result to obtain the target slot filling result.
19. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to: Implement the steps of the method according to any one of claims 1 to 9.
20. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the steps of the method described in any one of claims 1 to 9 are implemented.
