A semantic recognition method, storage medium and terminal device

By dividing the request information into the first word segmentation data and the second word segmentation data, and determining the semantic information using the semantic recognition model, the problem of cumbersome recognition process in the prior art is solved, and the response speed of human-computer interaction is improved.

CN114004234BActive Publication Date: 2024-11-22SHENZHEN TCL DIGITAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010740011.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-28
Publication Date
2024-11-22
Estimated Expiration
2040-07-28

AI Technical Summary

Technical Problem

In the existing human-computer interaction technology, the identification process of users' requested fields, intentions and key information is complicated, which affects the response speed.

Method used

By obtaining the request information to be identified and dividing it into the first word segmentation data and the second word segmentation data, the trained semantic recognition model, including the first classification module, the second classification module and the third classification unit, determine the request information Semantic information, including slot information, intention information and domain information.

Benefits of technology

The identification process of slot information, intention information and domain information is simplified, and the response speed of human-computer interaction is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114004234B_ABST
    Figure CN114004234B_ABST
Patent Text Reader

Abstract

The present invention discloses a semantic recognition method, a storage medium and a terminal device, the method comprising obtaining request information to be recognized, and obtaining first segmentation data and second segmentation data corresponding to the request information; based on the first segmentation data and the second segmentation data, determining semantic information corresponding to the request information, wherein the semantic information comprises slot information, intent information and domain information. The present invention simplifies the slot information, intent information and domain information recognition process by dividing the request information into first segmentation data and second segmentation data, and can simultaneously obtain slot information, intent information and domain information based on the first segmentation data and the second segmentation data, thereby improving the response speed of human-computer interaction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of human-computer interaction technology, and in particular to a semantic recognition method, a storage medium and a terminal device. Background Art

[0002] In the process of human-computer interaction, when receiving a user request (Query), the voice response device needs to first understand the domain of the user request and then determine the user's intention. After determining the user's intention, it determines the feedback operation (e.g., feedback voice, feedback action, etc.) based on the keyword information in the user request. However, in the existing human-computer interaction process, a cumbersome process is required to determine the domain, intention and key information of the user's request, which in turn affects the response speed of the user's request. Summary of the invention

[0003] The technical problem to be solved by the present invention is to provide a semantic recognition method, a storage medium and a terminal device in view of the deficiencies of the prior art.

[0004] In order to solve the above technical problem, a first aspect of an embodiment of the present invention provides a semantic recognition method, the method comprising:

[0005] Acquire request information to be identified, and acquire first segmentation data and second segmentation data corresponding to the request information;

[0006] Based on the first word segmentation data and the second word segmentation data, semantic information corresponding to the request information is determined, wherein the semantic information includes slot information, intent information, and domain information.

[0007] The semantic recognition method, wherein the step of obtaining request information to be recognized and obtaining first segmentation data and second segmentation data corresponding to the request information specifically includes:

[0008] Obtain request information to be identified;

[0009] Segmenting the request information based on a preset first segmentation method to obtain first segmentation data corresponding to the request information;

[0010] The request information is segmented based on a preset second segmentation method to obtain second segmentation data corresponding to the request information, wherein the first segmentation method is different from the second segmentation method.

[0011] The semantic recognition method, wherein the semantic information corresponding to the request information is determined based on the first word segmentation data and the second word segmentation data as follows:

[0012] The first word segmentation data and the second word segmentation data are input into a trained semantic recognition model, and the semantic information corresponding to the request information is determined by the semantic recognition model.

[0013] The semantic recognition method, wherein the semantic recognition model includes a first classification module, a second classification module and a third classification unit; the inputting of the first word segmentation data and the second word segmentation data into the trained semantic recognition model, and determining the semantic information corresponding to the request information through the semantic recognition model specifically includes:

[0014] Inputting the first word segmentation data and the second word segmentation data into a first classification module, and determining a first target feature vector and slot information corresponding to the request information through the first classification module;

[0015] Inputting the first target feature vector and the slot information into a second classification module, and determining the domain information and the second target feature vector corresponding to the request information through the second classification module;

[0016] The domain information and the second target feature vector are input into a third classification unit, and the intent information corresponding to the request information is determined by the third classification unit to obtain semantic information corresponding to the request information.

[0017] The semantic recognition method, wherein the first classification module includes a convolution unit, a first feature extraction unit, and a first classification unit; the inputting the first word segmentation data and the second word segmentation data into the first classification module, and determining the first target feature vector and slot information corresponding to the request information through the first classification module specifically includes:

[0018] Inputting the first word segmentation data into the convolution unit, and outputting a plurality of first feature vectors through the convolution unit;

[0019] Inputting a plurality of first feature vectors and the second word segmentation data into the first feature extraction unit, and outputting a first target feature vector through the first feature extraction unit;

[0020] The first target feature vector is input into a first classification unit, and the slot information is output through the first classification unit to obtain the slot information corresponding to the request information.

[0021] The semantic recognition method, wherein the first feature extraction unit includes a highway network subunit and a cyclic network subunit; the inputting a plurality of first feature vectors and the second word segmentation data into the first feature extraction unit, and outputting a target feature vector through the first feature extraction unit specifically includes:

[0022] Inputting the plurality of first feature vectors into the highway network subunit, and outputting a second feature vector through the highway network subunit;

[0023] The second feature vector and the second word segmentation data are input into the recurrent network subunit, and the first target feature vector is output through the recurrent network subunit.

[0024] The semantic recognition method, wherein the vector dimension of each of the plurality of first feature vectors is different.

[0025] The semantic recognition method, wherein the second classification module includes a second feature extraction unit, an attention unit, and a second classification unit; the inputting the first target feature vector and the slot information into the second classification module, and determining the domain information corresponding to the request information and the second target feature vector by the second classification module specifically includes:

[0026] Inputting the first target feature vector and the slot information into a second feature extraction unit, and outputting a third feature vector through the second feature extraction unit;

[0027] Inputting the third feature vector into an attention unit, and outputting an attention feature vector through the attention unit;

[0028] The attention feature vector module is input into a second classification unit, and the domain information and a second target feature vector are output through the second classification unit.

[0029] The semantic recognition method, wherein the second classification unit includes a fully connected subunit and a classification subunit; the inputting the attention feature vector module into the second classification unit, and outputting the domain information and the second target feature vector through the second classification unit specifically includes:

[0030] Inputting the attention feature vector into the fully connected subunit, and outputting a second target feature vector through the fully connected subunit;

[0031] The second target feature vector is input into the classification subunit, and the domain information is output through the classification subunit.

[0032] The semantic recognition method, wherein the third classification unit includes a conversion unit and a third classification unit; the inputting of the domain information and the second target feature vector into the third classification unit, and determining the intent information corresponding to the request information through the third classification unit to obtain the semantic information corresponding to the request information specifically includes:

[0033] Inputting the domain information into the conversion unit, and outputting the intention feature vector through the conversion unit;

[0034] The intention feature vector and the second target feature vector are input into the third classification unit, and the intention information is output through the third classification unit to obtain semantic information corresponding to the request information.

[0035] A second aspect of an embodiment of the present invention provides a computer-readable storage medium, which stores one or more programs. The one or more programs can be executed by one or more processors to implement the steps in any of the semantic recognition methods described above.

[0036] A third aspect of an embodiment of the present invention provides a terminal device, comprising: a processor, a memory, and a communication bus; the memory stores a computer-readable program that can be executed by the processor;

[0037] The communication bus realizes the connection and communication between the processor and the memory;

[0038] When the processor executes the computer-readable program, the steps in any of the semantic recognition methods described above are implemented.

[0039] Beneficial effects: Compared with the prior art, the present invention provides a semantic recognition method, storage medium and terminal device, the method comprising obtaining request information to be recognized, and obtaining first segmentation data and second segmentation data corresponding to the request information; based on the first segmentation data and the second segmentation data, determining semantic information corresponding to the request information, wherein the semantic information comprises slot information, intent information and domain information. The present invention simplifies the slot information, intent information and domain information recognition process by dividing the request information into first segmentation data and second segmentation data, and can simultaneously obtain slot information, intent information and domain information based on the first segmentation data and the second segmentation data, thereby improving the response speed of human-computer interaction. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0041] Figure 1 The present invention provides a flowchart of the semantic recognition method.

[0042] Figure 2 This is a flow chart of step S10 in the semantic recognition method provided by the present invention.

[0043] Figure 3This is a flow chart of step S20 in the semantic recognition method provided by the present invention.

[0044] Figure 4 This is a model structure principle diagram of the semantic recognition model in the semantic recognition method provided by the present invention.

[0045] Figure 5 A schematic diagram of a conversion matrix in the semantic recognition method provided by the present invention.

[0046] Figure 6 This is a structural principle diagram of the terminal device provided by the present invention. DETAILED DESCRIPTION

[0047] The present invention provides a semantic recognition method, a storage medium and a terminal device. In order to make the purpose, technical solution and effect of the present invention clearer and more specific, the present invention is further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0048] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present invention refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be intermediate elements. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.

[0049] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as generally understood by those skilled in the art in the art to which the present invention belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with the meanings in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as herein.

[0050] The inventor has found through research that in the process of human-computer interaction, when receiving a user request (Query), the voice response device needs to first understand the field in which the user request is located and then judge the user's intention. After determining the user's intention, the feedback operation (for example, feedback voice, feedback action, etc.) is determined based on the keyword information in the user request. However, in the existing human-computer interaction process, the user request Query needs to be sequentially identified in terms of field, intention and label, and when identifying the field, intention and label, the field, intention and label correspond to a recognition process respectively, and the user request needs to be input into the recognition process corresponding to the field, intention and label respectively, and is identified separately. For example, the field, intention and label correspond to a recognition model respectively, and for each field, the field will correspond to an independent intention recognition model and a label recognition model, such as a field including 200 field categories, then 200 intention recognition models and label recognition models are required. In this way, when identifying the user request, it is necessary to first determine the user field, and then determine the intention recognition model and label recognition model corresponding to the field, resulting in a cumbersome process for identifying the field, intention and slot information of the user request, thereby affecting the response speed of the user request.

[0051] In order to solve the above problem, in an embodiment of the present invention, after obtaining the request information to be identified, the first segmentation data and the second segmentation data corresponding to the request information are obtained; based on the first segmentation data and the second segmentation data, the semantic information corresponding to the request information is determined, wherein the semantic information includes slot information, intent information, and domain information. This embodiment simplifies the slot information, intent information, and domain information identification process by dividing the request information into the first segmentation data and the second segmentation data, and can simultaneously obtain the slot information, intent information, and domain information based on the first segmentation data and the second segmentation data, thereby improving the response speed of human-computer interaction.

[0052] This embodiment provides a flowchart of a semantic recognition method. The method can be executed by a system upgrade device, which can be implemented by software and applied to electronic devices such as smart phones, tablet computers or personal digital assistants, robots and drones. Figure 1 The semantic recognition method provided in this embodiment specifically includes:

[0053] The invention is further described below by describing embodiments in conjunction with the accompanying drawings.

[0054] This implementation provides a semantic recognition method, such as Figure 1 As shown, the method includes:

[0055] S10: Obtain request information to be identified, and obtain first segmentation data and second segmentation data corresponding to the request information.

[0056] Specifically, the request information is used to reflect the user's intention. For example, if the request information is "I want to watch the movie of object A", then the request information reflects the user's intention to play the movie of object A. The request information can be input by the user, sent by an external device, or obtained from a background server (for example, the cloud). The request information can be in the form of voice or text, and when the request information is in the form of voice, voice recognition can be performed on the request information to convert the voice request information into text request information.

[0057] In an implementation of this embodiment, obtaining the request information to be identified may specifically include:

[0058] receiving candidate request information, and determining the type of the candidate request information;

[0059] If the type is a voice type, performing voice recognition on the candidate request information to obtain text information corresponding to the request information, and using the recognized text information as the request information to be recognized;

[0060] If the type is a text type, the candidate request information is used as the request information to be identified.

[0061] Specifically, the text information includes the voice content in the request information. It is understandable that performing voice recognition on the candidate request information refers to identifying the voice content corresponding to the request information and using the voice content as the text content corresponding to the request information. For example, if the voice content of the request information is "I want to watch a movie of object A", then performing voice recognition on the request information can obtain "I want to watch a movie of object A", and the recognized "I want to watch a movie of object A" is used as the request information to be recognized.

[0062] Furthermore, the first segmentation data and the second segmentation data are both obtained by segmenting the request information to be identified, and the segmentation method corresponding to the first segmentation data is different from the segmentation method corresponding to the second segmentation data. It can be understood that the first segmentation data can be obtained by segmenting the request information to be identified according to one segmentation method, and the second segmentation data can be obtained by segmenting according to another segmentation method. Based on this, Figure 2 As shown, the step of obtaining the request information to be identified and obtaining the first segmentation data and the second segmentation data corresponding to the request information specifically includes:

[0063] S11, obtaining request information to be identified;

[0064] S12, segmenting the request information based on a preset first segmentation method to obtain first segmentation data corresponding to the request information;

[0065] S13. Segment the request information based on a preset second segmentation method to obtain second segmentation data corresponding to the request information, wherein the first segmentation method is different from the second segmentation method.

[0066] Specifically, the first word segmentation method and the second word segmentation method are both pre-set, and are used to segment the request information and reorganize the word sequence. It can be understood that the first word segmentation data is to segment the request information according to the first word segmentation method, and reorganize the words obtained by the segmentation to obtain a word sequence; the second word data is to segment the request information according to the second word segmentation method, and reorganize the words obtained by the segmentation to obtain a word sequence. Among them, the first word segmentation data includes a number of first words, each of the first words in the number of first words is included in the request information to be identified, and the first words constitute the request information to be identified. The second word segmentation data includes a number of second words, each of the second words in the number of second words is included in the request information to be identified, and the second words constitute the request information to be identified.

[0067] In an implementation of this embodiment, the second word segmentation method may be a Jieba word segmentation method, and after obtaining the request information, the request information is divided into a plurality of second words based on the Jieba word segmentation method, and the plurality of second words constitute the second word segmentation data. For example, if the request information is "I want to watch a movie of object A", the request information may be divided into "I||want to watch||a||movie||of||object A||" according to the Jieba word segmentation method.

[0068] In one implementation of this embodiment, the first word segmentation method is to traverse a preset dictionary, match the request information with the words in the preset dictionary, and when there is a successfully matched word, set a separator in the request information based on the successfully matched word to segment the request information, wherein for each successfully matched word, the separator corresponding to the word is located before and after the successfully matched word, and the separator is adjacent to the word. For example, the request information is "I want to watch a movie of object A", and according to the first word segmentation method, each word in "I want to watch a movie of object A" is matched with the preset dictionary. Assuming that "object A" and "movie" are successfully matched in the preset dictionary, then a separator is inserted before "object A", after "object A", before "movie", and after "movie", and "I want to watch ||object A||'s||movie" is obtained, and "I want to watch ||object A||'s||movie" is used as the first word segmentation text corresponding to the request "I want to watch a movie of object A".

[0069] Furthermore, the preset dictionary is pre-established, and the preset dictionary includes a number of words; each of the several words can be a word representing a person, a thing or a place. For example, each of the several words is a name. In a specific implementation, the process of establishing the predictive dictionary can be: obtaining a corpus including several corpora, for each corpus, selecting nouns in the corpus, deduplicating all the selected nouns, and using the word set formed by all the deduplicated nouns as the preset dictionary. In addition, each word in the preset dictionary is configured with at least one label, and when a word in the request information successfully matches a word in the preset dictionary, the label of the successfully matched word in the preset dictionary is obtained.

[0070] Based on this, the first word segmentation data includes word segmentation data composed of word segmentation words corresponding to the request information, and may also include label data composed of labels corresponding to each word. Among them, the label data includes a plurality of labels, and the plurality of labels correspond one-to-one to each first word in the word segmentation data, and each label is the label of the word corresponding to it. In addition, the process of obtaining the label corresponding to each word in the word segmentation data corresponding to the first word segmentation data can be: for each word in the word segmentation data, if the word exists in the preset dictionary, obtain the label corresponding to the word in the preset dictionary, and use the obtained label as the label of the word; if the word does not exist in the preset dictionary, set the label of the word to a default label, wherein the default label is pre-set, for example, O, etc.

[0071] For example, the request information is "I want to watch a movie of object A", where "object A" and "movie" are successfully matched in the preset dictionary, and the labels corresponding to "object A" in the preset dictionary include actor Actor and singer Singer singer, so the label of "object A" is Actor & Singer; the label corresponding to "movie" is type Type, so the label of "movie" is Type, and other words are not in the preset dictionary, so the labels of other words are O. Therefore, the first word segmentation data corresponding to the request information "I want to watch a movie of object A" includes the word segmentation data "I want to watch ||object A||'s ||movie", and the label data "O||Actor & Singer||O||Type" corresponding to the word segmentation data.

[0072] S20. Determine semantic information corresponding to the request information based on the first word segmentation data and the second word segmentation data.

[0073] Specifically, the semantic information is the sentence intention corresponding to the request information, wherein the voice information includes slot information, intention information and domain information, wherein the domain information is used to reflect the domain in which the request information is located, for example, the travel domain, the video viewing domain, etc.; the intention information is used to reflect the intention corresponding to the request information, wherein the intention is the purpose of the speech formed by the user in a discourse right during the human-computer dialogue process (that is, in the human-computer dialogue process, after the user speaks, the robot responds to the user's speech), that is, what information the user hopes to obtain in the dialogue scene, for example, the user says to the artificial intelligence assistant, "help me set an alarm clock", and the user's intention is "set an alarm clock". Accurately understanding the user's intention is a basic requirement for smooth human-computer dialogue. The slot information is used to reflect the semantic tags of each word in the request information, and the semantic tags are service elements in the dialogue service pre-defined in the human-computer dialogue system. For example, in the dialogue service of setting an alarm clock, the service elements in the dialogue service may include slots such as the time when the alarm clock is required and whether it is repeated.

[0074] Further, the domain information includes a domain category probability set, the domain category probability set includes several domain category probabilities, and the several domain category probabilities include the category probability corresponding to each domain category in all domain categories pre-configured by the semantic recognition model, wherein the domain category probability is used to indicate the probability that the request information belongs to the domain category, and the larger the domain category probability is, the greater the probability that the domain corresponding to the request information is the domain category, and conversely, the smaller the domain category probability is, the smaller the probability that the domain corresponding to the request information is the domain category, and the sum of several domain category probabilities is equal to 1. For example, the semantic recognition model is pre-configured: domain Domain1, domain Domain2, and domain Domain3, then the domain category probability set corresponding to the request information includes the probability corresponding to domain Domain1, the probability corresponding to domain Domain2, and the probability corresponding to domain Domain3, such as domain Domain1: 0.77, domain Domain2: 0.13, domain Domain3, 0.1.

[0075] The intent information includes an intent category probability set, and the intent category probability set includes several intent category probabilities. The intent category corresponding to each intent category probability in the several intent category probabilities is the intent category contained in the domain category with the largest probability in the domain category probability set. The intent category probability is used to indicate the probability that the request information belongs to the intent category, and the larger the intent category probability, the greater the probability that the intent corresponding to the request information is the intent category. Conversely, the smaller the domain category probability, the smaller the probability that the intent corresponding to the request information is the intent category. The sum of several domain category probabilities is equal to 1. For example, the domain category probability set includes domain Domain1: 0.77, domain Domain2: 0.13, domain Domain3, 0.1, then the intent category probability set includes the intent category probabilities corresponding to all intent categories contained in domain Domain1. If domain Domain1 includes intent Intent1, intent Intent2 and intent Intent3, then the intent category probability set includes the category probabilities corresponding to intent Intent1, intent Intent2 and intent Intent3, such as intent Intent1: 0.82, intent Intent2: 0.12, intent Intent3: 0.06.

[0076] The slot information includes the label corresponding to each word in the request information, wherein the label with the highest probability among the labels corresponding to each word. For example, the word segmentation data "I want to watch the movie of ||object A||", with the label data "O||Actor&Singer||O||Type" corresponding to the word segmentation data, in the label Actor and label Singer corresponding to "object A", the probability of label Actor is 0.8, and the probability of label Singer is 0.2, then the label corresponding to "object A" in the slot information is Actor.

[0077] In one implementation of this embodiment, Figure 3 and Figure 4 As shown, the semantic information corresponding to the request information is determined based on the first word segmentation data and the second word segmentation data as follows:

[0078] The first word segmentation data and the second word segmentation data are input into a trained semantic recognition model, and the semantic information corresponding to the request information is determined by the semantic recognition model.

[0079] Specifically, the semantic recognition model is a trained neural network model, and the semantic information corresponding to the request information can be determined through the semantic module. It can be understood that the input items of the semantic recognition model are the first word segmentation data and the second word segmentation data, and the output items of the semantic recognition model are semantic information, and the semantic information includes slot information, intent information and domain information. In other words, after the first word segmentation data and the second word segmentation data are input into the semantic recognition model, the semantic recognition model can simultaneously input the slot information, intent information and domain information, so that the slot information, intent information and domain information corresponding to the request information can be quickly determined through the semantic recognition model, thereby improving the semantic recognition efficiency of the request information, thereby improving the response speed of the request information.

[0080] In one implementation of this embodiment, when the first word segmentation data and the second word segmentation data are input into the semantic recognition model, the first word segmentation data can be converted into a first word vector, the second word segmentation data can be converted into a second word vector, and the first word vector and the second word vector can be used as input items of the speech recognition model. The conversion of the first word segmentation data into the first word vector can be generated based on a preset first word vector model, and the first word vector model is obtained by training the preset word vector model based on the corpus training library obtained by the first word segmentation method; the conversion of the second word segmentation data into the second word vector can be generated based on a preset second word vector model, and the second word vector model is obtained by training the preset word vector model based on the corpus training library obtained by the second word segmentation method. Among them, the preset word vector models include but are not limited to Word2Vec, Glove and Bert. In addition, in actual applications, when the request information includes a word existing in the corpus, a word vector can be randomly generated for the word.

[0081] In an implementation of this embodiment, the semantic recognition model includes a first classification module, a second classification module and a third classification unit; the inputting of the first word segmentation data and the second word segmentation data into the trained semantic recognition model, and determining the semantic information corresponding to the request information through the semantic recognition model specifically includes:

[0082] S21, inputting the first word segmentation data and the second word segmentation data into a first classification module, and determining a first target feature vector and slot information corresponding to the request information through the first classification module;

[0083] S22, inputting the first target feature vector and the slot information into a second classification module, and determining the domain information and the second target feature vector corresponding to the request information through the second classification module;

[0084] S23, inputting the domain information and the second target feature vector into a third classification unit, and determining the intent information corresponding to the request information through the third classification unit to obtain the semantic information corresponding to the request information.

[0085] Specifically, in step S21, the input items of the first classification module are the first word segmentation data and the second word segmentation data, the first classification module can determine the first target feature vector corresponding to the request information based on the first word segmentation data and the second word segmentation data, and can determine the slot information corresponding to the request information based on the first target feature vector. In an implementation of this embodiment, the first classification module includes a convolution unit, a first feature extraction unit, and a first classification unit; the convolution unit is connected to the first feature extraction unit, and the first feature extraction unit is connected to the first classification unit; the input item of the convolution unit is the first word segmentation data, the input item of the first feature extraction unit is the output item of the convolution unit and the second word segmentation data, the output item of the first feature extraction unit is the first target feature vector, the input item of the first classification unit is the first target feature vector, and the output item of the first classification unit is the slot information.

[0086] Based on this, in an implementation of this embodiment, the inputting the first word segmentation data and the second word segmentation data into a first classification module, and determining the first target feature vector and label information corresponding to the request information through the first classification module specifically includes:

[0087] Inputting the first word segmentation data into the convolution unit, and outputting a plurality of first feature vectors through the convolution unit;

[0088] Inputting a plurality of first feature vectors and the second word segmentation data into the first feature extraction unit, and outputting a first target feature vector through the first feature extraction unit;

[0089] The first target feature vector is input into a first classification unit, and label information is outputted by the first classification unit to obtain slot information corresponding to the request information.

[0090] Specifically, the dimensions of each of the first feature vectors are different. For example, the first feature vectors include a first feature vector A and a first feature vector B, the dimension of the first feature vector A is 1*100, and the dimension of the first feature vector B is 1*200. The convolution unit includes a number of convolution units, the number of convolution units correspond to the number of first feature vectors one by one, and each first feature vector is the output item of the corresponding convolution unit, wherein each of the number of convolution units may include a convolution layer and a maximum pooling layer, and the convolution kernel size of the convolution layer in each convolution unit is different. In addition, the number of convolution units can be cascaded in sequence, the output item of the previous convolution unit in two adjacent cascaded convolution units is the input item of the next convolution unit, and the output item of each convolution unit is a first feature vector; or, the number of convolution units are arranged independently of each other, the input item of each convolution unit is the first word segmentation data, and the output item is the first feature vector. In addition, the first classification unit can be a random conditional field CRF model, and the slot information corresponding to the request information can be determined based on the first target feature vector through the random conditional field model.

[0091] Further, in an implementation of this embodiment, the first feature extraction unit includes a highway network subunit and a cyclic network subunit, and the inputting of the plurality of first feature vectors and the second word segmentation data into the first feature extraction unit, and outputting the target feature vector through the first feature extraction unit specifically includes:

[0092] Inputting the plurality of first feature vectors into the highway network subunit, and outputting a second feature vector through the highway network subunit;

[0093] The second feature vector and the second word segmentation data are input into the recurrent network subunit, and the first target feature vector is output through the recurrent network subunit.

[0094] Specifically, the highway network subunit includes a highway network, through which the depth of the neural network can be deepened to improve the accuracy. At the same time, when the deep feature information corresponding to the first feature vector is obtained through the highway network, some features in the first feature vector can be extracted for deep features, and some features remain unchanged, which can increase the speed of deep feature extraction, thereby increasing the speed of semantic information recognition. In addition, before a number of first feature vectors are input into the highway network subunit, it is necessary to splice the first feature vectors and input the spliced ​​feature vectors into the highway network subunit. For example, the first feature vectors include a first feature vector A and a first feature vector B, the first feature vector A is (1, 1, 1), and the first feature vector B is (2, 1, 2, 1), then the spliced ​​feature vector obtained by splicing the first feature vector A and the first feature vector B is (1, 1, 1, 2, 1, 2, 1).

[0095] In addition, before the second feature vector and the second word segmentation data are input into the recurrent network subunit, the second feature vector and the second word segmentation data need to be spliced, wherein the second word segmentation data is in the form of a word vector. Thus, the second feature vector and the second word segmentation data can be spliced ​​in the dimension direction, and the spliced ​​feature vector is input into the recurrent network subunit, wherein the vector dimension of the spliced ​​feature vector is equal to the sum of the vector dimension of the second feature vector and the vector dimension of the second word segmentation data.

[0096] Further, in step S22, the second classification module includes a second feature extraction unit, an attention unit, and a second classification unit; inputting the feature vector and the label information into the second classification module, and determining the domain information corresponding to the request information and the second target feature vector through the second classification module specifically includes:

[0097] Inputting the first target feature vector and the slot information into a second feature extraction unit, and outputting a third feature vector through the second feature extraction unit;

[0098] Inputting the third feature vector into an attention unit, and outputting an attention feature vector through the attention unit;

[0099] The attention feature vector module is input into a second classification unit, and the domain information and a second target feature vector are output through the second classification unit.

[0100] Specifically, the second feature extraction unit is connected to the first feature extraction unit and the first classification unit respectively, the first target feature map output by the first feature extraction unit is adjacent and the slot information output by the first classification unit is respectively input into the second feature extraction unit, the second feature extraction unit is connected to the attention unit, and the attention unit is connected to the second classification unit. In this embodiment, the second feature extraction unit can adopt a bidirectional gate recurrent network, and the attention unit can adopt a self-attention network.

[0101] Further, in an implementation of this embodiment, the second classification unit includes a fully connected subunit and a classification subunit; the inputting the attention feature vector module into the second classification unit, and outputting the domain information and the second target feature vector through the second classification unit specifically includes:

[0102] Inputting the attention feature vector into the fully connected subunit, and outputting a second target feature vector through the fully connected subunit;

[0103] The second target feature vector is input into the classification subunit, and the domain information is output through the classification subunit.

[0104] Specifically, the fully connected subunit includes a fully connected layer and an activation layer, the classification subunit may include a Softmax layer, the second target feature vector is determined by the fully connected subunit, and the second target feature vector output by the fully connected subunit is input into the Softmax layer, and the domain information is output by the Softmax layer. The activation layer in the fully connected subunit may use a ReLU activation function.

[0105] Further, in step S23, the third classification unit includes a conversion unit and a third classification unit; the inputting of the domain information and the second target feature vector into the third classification unit, and determining the intent information corresponding to the request information through the third classification unit to obtain the semantic information corresponding to the request information specifically includes:

[0106] Inputting the domain information into the conversion unit, and outputting the intention feature vector through the conversion unit;

[0107] The intention feature vector and the second target feature vector are input into the third classification unit, and the intention information is output through the third classification unit to obtain semantic information corresponding to the request information.

[0108] Specifically, the conversion unit is used to convert the domain into an intent, wherein the conversion unit is configured with a domain-to-intent transfer matrix, and the domain information can be converted into an intent matrix through the domain-to-intent transfer matrix. In the domain-to-intent transfer matrix, each row represents each intent corresponding to a domain, and each column represents each domain corresponding to an intent, wherein, for each intent, the element value corresponding to the intersection of the column where the intent is located and the row where the domain containing the intent is located is 1, and the element value corresponding to the intersection of the column where the intent is located and the row where the domain not containing the intent is located is 1. It can be understood that in the domain-to-intent transfer matrix, the matrix row coordinates represent the domain, the matrix column coordinates represent the intent, and each element value represents the inclusion relationship between the intent corresponding to the column where it is located and the domain corresponding to the row where it is located. When the element value is 1, it means that the intent corresponding to the column where the element is located is included in the domain corresponding to the row where the element is located; when the element value is 0, it means that the intent corresponding to the column where the element is located is not included in the inclusion of the domain corresponding to the row where the element is located.

[0109] For example: domains include Domain1, Domain2, Domain3 and Domain4, and intents include Intent1, Intent2, Intent3, Intent4, Intent5 and Intent6, where Intent1 and Intent2 are included in Domain1, Intent3 is included in Domain2, Intent4 is included in Domain3, and Intent5 and Intent6 are included in Domain4. Then Domain1 corresponds to the first row, Domain2 corresponds to the second row, Domain3 corresponds to the third row, Intent1 corresponds to the first column, Intent2 corresponds to the second column, Intent3 corresponds to the third column, Intent4 corresponds to the fourth column, Intent5 corresponds to the fifth column, and Intent6 corresponds to the sixth column. Then the conversion matrix from domain to intent can be as follows: Figure 5 shown.

[0110] Based on this, after the domain information is input into the conversion unit, the domain information is multiplied with the domain-to-intent transfer matrix in the conversion unit to obtain the intent feature vector corresponding to the domain information; based on the intent feature vector and the second target feature vector, the intent information corresponding to the request information can be determined by the third classification unit, so that the intent information can be constrained by the domain information, thereby improving the accuracy of the intent information. The third classification unit may include a Softmax layer, and the intent information is determined by the Softmax layer.

[0111] Based on the above semantic recognition method, this embodiment provides a computer-readable storage medium, which stores one or more programs. The one or more programs can be executed by one or more processors to implement the steps in the semantic recognition method described in the above embodiment.

[0112] Based on the above semantic recognition method, the present invention also provides a terminal device, such as Figure 6 As shown, it includes at least one processor (processor) 20; display screen 21; and memory (memory) 22, and may also include a communication interface (Communications Interface object Ace) 23 and a bus 24. Among them, the processor 20, the display screen 21, the memory 22 and the communication interface 23 can communicate with each other through the bus 24. The display screen 21 is set to display the user guide interface preset in the initial setting mode. The communication interface 23 can transmit information. The processor 20 can call the logic instructions in the memory 22 to execute the method in the above embodiment.

[0113] In addition, the logic instructions in the memory 22 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product.

[0114] The memory 22 is a computer-readable storage medium that can be configured to store software programs, computer executable programs, such as program instructions or modules corresponding to the methods in the embodiments of the present disclosure. The processor 20 executes functional applications and data processing by running the software programs, instructions or modules stored in the memory 22, that is, implementing the methods in the above embodiments.

[0115] The memory 22 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the terminal device, etc. In addition, the memory 22 may include a high-speed random access memory and may also include a non-volatile memory. For example, a variety of media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (AM), a disk or an optical disk, may also be a transient storage medium.

[0116] In addition, the specific process of loading and executing the multiple instruction processors in the above-mentioned storage medium and the terminal device has been described in detail in the above-mentioned method, and will not be described one by one here.

[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 semantic recognition method, characterized in that: The method comprises: Acquire request information to be identified, and acquire first segmentation data and second segmentation data corresponding to the request information; Determine semantic information corresponding to the request information based on the first word segmentation data and the second word segmentation data, wherein the semantic information includes slot information, intent information, and domain information; The process of obtaining the first segmentation data and the second segmentation data corresponding to the request information specifically includes: Segmenting the request information based on a preset first segmentation method to obtain first segmentation data corresponding to the request information; Segmenting the request information based on a preset second segmentation method to obtain second segmentation data corresponding to the request information, wherein the first segmentation method is different from the second segmentation method; The determining, based on the first word segmentation data and the second word segmentation data, of the semantic information corresponding to the request information is specifically: Inputting the first word segmentation data and the second word segmentation data into a trained semantic recognition model, and determining semantic information corresponding to the request information through the semantic recognition model; The semantic recognition model includes a first classification module, a second classification module and a third classification unit; the inputting of the first word segmentation data and the second word segmentation data into the trained semantic recognition model, and determining the semantic information corresponding to the request information through the semantic recognition model specifically includes: Inputting the first word segmentation data and the second word segmentation data into a first classification module, and determining a first target feature vector and slot information corresponding to the request information through the first classification module; Inputting the first target feature vector and the slot information into a second classification module, and determining the domain information and the second target feature vector corresponding to the request information through the second classification module; The domain information and the second target feature vector are input into a third classification unit, and the intent information corresponding to the request information is determined by the third classification unit to obtain semantic information corresponding to the request information.

2. The semantic recognition method according to claim 1, characterized in that: The step of obtaining the request information to be identified and obtaining the first segmentation data and the second segmentation data corresponding to the request information specifically includes: Obtain request information to be identified; Segmenting the request information based on a preset first segmentation method to obtain first segmentation data corresponding to the request information; The request information is segmented based on a preset second segmentation method to obtain second segmentation data corresponding to the request information, wherein the first segmentation method is different from the second segmentation method.

3. The semantic recognition method according to claim 1, characterized in that: The first classification module includes a convolution unit, a first feature extraction unit, and a first classification unit; the inputting the first word segmentation data and the second word segmentation data into the first classification module, and determining the first target feature vector and slot information corresponding to the request information through the first classification module specifically includes: Inputting the first word segmentation data into the convolution unit, and outputting a plurality of first feature vectors through the convolution unit; Inputting a plurality of first feature vectors and the second word segmentation data into the first feature extraction unit, and outputting a first target feature vector through the first feature extraction unit; The first target feature vector is input into a first classification unit, and the slot information is output through the first classification unit to obtain the slot information corresponding to the request information.

4. The semantic recognition method according to claim 3, characterized in that: The first feature extraction unit includes a highway network subunit and a cyclic network subunit; the step of inputting a plurality of first feature vectors and the second word segmentation data into the first feature extraction unit, and outputting a target feature vector through the first feature extraction unit specifically includes: Inputting the plurality of first feature vectors into the highway network subunit, and outputting a second feature vector through the highway network subunit; The second feature vector and the second word segmentation data are input into the recurrent network subunit, and the first target feature vector is output through the recurrent network subunit.

5. The semantic recognition method according to claim 3 or 4, characterized in that: The vector dimensions of each of the plurality of first eigenvectors are different.

6. The semantic recognition method according to claim 1, characterized in that: The second classification module includes a second feature extraction unit, an attention unit, and a second classification unit; the inputting the first target feature vector and the slot information into the second classification module, and determining the domain information corresponding to the request information and the second target feature vector through the second classification module specifically includes: Inputting the first target feature vector and the slot information into a second feature extraction unit, and outputting a third feature vector through the second feature extraction unit; Inputting the third feature vector into an attention unit, and outputting an attention feature vector through the attention unit; The attention feature vector module is input into a second classification unit, and the domain information and a second target feature vector are output through the second classification unit.

7. The semantic recognition method according to claim 6, characterized in that: The second classification unit includes a fully connected subunit and a classification subunit; the inputting the attention feature vector module into the second classification unit, and outputting the domain information and the second target feature vector through the second classification unit specifically includes: Inputting the attention feature vector into the fully connected subunit, and outputting a second target feature vector through the fully connected subunit; The second target feature vector is input into the classification subunit, and the domain information is output through the classification subunit.

8. The semantic recognition method according to claim 1, characterized in that: The third classification unit includes a conversion unit and a third classification unit; the inputting the domain information and the second target feature vector into the third classification unit, determining the intent information corresponding to the request information through the third classification unit, so as to obtain the semantic information corresponding to the request information specifically includes: Inputting the domain information into the conversion unit, and outputting the intention feature vector through the conversion unit; The intention feature vector and the second target feature vector are input into the third classification unit, and the intention information is output through the third classification unit to obtain semantic information corresponding to the request information.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps in the semantic recognition method according to any one of claims 1 to 8.

10. A terminal device, characterized in that: include: Processor, memory and communication bus; The memory stores a computer-readable program executable by the processor; The communication bus realizes the connection and communication between the processor and the memory; When the processor executes the computer-readable program, the steps of the semantic recognition method according to any one of claims 1 to 8 are implemented.