Intention recognition method and device and electronic equipment
By correcting the speech information to be recognized in the vehicle terminal and fusing the context information, the fused feature vector is generated, and the inaccurate intention recognition caused by pronunciation or spelling errors in speech recognition is solved, and the recognition accuracy and user experience are improved.
Patent Information
- Application Number
- CN202310596745.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-25
- Publication Date
- 2024-11-26
AI Technical Summary
When the vehicle terminal recognizes the user's voice intention, it often leads to inaccurate recognition due to pronunciation or spelling errors, and cannot accurately identify the user's intentions.
By performing error correction processing on the recognition speech information, an error correction feature vector is generated, and fused with the feature vector of the context information, a fused feature vector is generated, and intention analysis is performed to identify user intentions.
It improves the accuracy of speech intention recognition, ensures user experience, and solves the problem of inaccurate recognition caused by pronunciation or spelling errors in speech recognition.
Smart Images

Figure CN119028328A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of speech recognition technology, and in particular to an intention recognition method, device and electronic device. Background Art
[0002] At present, when users use electronic devices (such as vehicle-mounted terminals), the vehicle-mounted terminals often fail to accurately recognize the user's intentions. For example, when the user does not use Mandarin to input voice information, the voice information actually recognized by the vehicle-mounted terminal is different from the voice information actually input by the user. For example, the voice information input by the user is "open the car window", and the voice information recognized by the vehicle-mounted terminal is "turn on the car computer". Due to the difference between the voice information actually recognized by the vehicle-mounted terminal and the voice information actually input by the user, the vehicle-mounted terminal cannot accurately recognize the user's intention based on the voice information.
[0003] Therefore, how to accurately identify user intentions has become an urgent problem to be solved. Summary of the invention
[0004] In order to solve the above technical problems, the present disclosure provides an intent recognition method, device and electronic device.
[0005] In order to achieve the above objectives, the present invention adopts the following technical solutions:
[0006] In a first aspect, the present disclosure provides an intention recognition method, including: obtaining voice information to be recognized; performing error correction processing on the voice information to be recognized to obtain an error correction feature vector corresponding to the voice information to be recognized; wherein the error correction processing is used to correct pronunciation errors and / or spelling errors in the voice information to be recognized; performing feature fusion of the error correction feature vector and a context feature vector of context information corresponding to the voice information to be recognized to generate a fused feature vector; wherein the context information includes a preset number of historical voice information input before the voice information to be recognized; performing intent analysis on the fused feature vector to generate an intention recognition result corresponding to the voice information to be recognized.
[0007] In some feasible examples, error correction processing is performed on the voice information to be recognized to obtain an error correction feature vector corresponding to the voice information to be recognized, including: feature extraction is performed on the voice information to be recognized to obtain a feature vector to be recognized corresponding to the voice information to be recognized; when there is no preset feature vector matching the feature vector to be recognized in the preset entity word library, error correction processing is performed on the feature vector to be recognized to obtain an error correction feature vector; wherein, one preset feature vector corresponds to one preset entity word.
[0008] In some feasible examples, when there is no preset feature vector matching the feature vector to be identified in the preset entity vocabulary, error correction processing is performed on the feature vector to be identified to obtain an error correction feature vector, including: when there is no preset feature vector matching the feature vector to be identified in the preset entity vocabulary, error recognition is performed on the feature vector to be identified to obtain an error type corresponding to the feature vector to be identified; based on the error type, an error correction method corresponding to the error type is obtained; wherein the error correction method includes at least one or more of flat tongue sound correction, curled tongue sound correction, and front and back nasal sound correction; and the feature vector to be identified is corrected according to the error correction method to obtain an error correction feature vector.
[0009] In some feasible examples, based on the error type, obtaining the error correction method corresponding to the error type includes: querying a preset relationship based on the error type to obtain the error correction method corresponding to the error type.
[0010] In some feasible examples, when there is no preset feature vector matching the feature vector to be identified in the preset entity vocabulary, the feature vector to be identified is corrected before obtaining the error correction feature vector. The intention identification method provided by the present disclosure also includes: obtaining entity features corresponding to entity words in the dialect dictionary and pinyin features corresponding to the entity words; and generating a preset entity vocabulary based on the correspondence between the entity features and the pinyin features.
[0011] In some feasible examples, the intent recognition method provided by the present disclosure also includes: when there is a preset feature vector in the preset entity vocabulary that matches the feature vector to be recognized, using the preset feature vector as an error correction feature vector.
[0012] In a second aspect, the present disclosure provides an intention recognition device, comprising: an acquisition unit, configured to acquire voice information to be recognized; a processing unit, configured to perform error correction processing on the voice information to be recognized acquired by the acquisition unit, and obtain an error correction feature vector corresponding to the voice information to be recognized; wherein the error correction processing is used to correct pronunciation errors and / or spelling errors in the voice information to be recognized; the processing unit is further configured to perform feature fusion on the error correction feature vector and a context feature vector of context information corresponding to the voice information to be recognized acquired by the acquisition unit, and generate a fused feature vector; wherein the context information includes a preset number of historical voice information input before the voice information to be recognized; the processing unit is further configured to perform intent analysis on the fused feature vector, and generate an intent recognition result corresponding to the voice information to be recognized.
[0013] In some feasible examples, the processing unit is specifically used to extract features from the voice information to be recognized acquired by the acquisition unit to obtain a feature vector to be recognized corresponding to the voice information to be recognized; the processing unit is specifically used to perform error correction processing on the feature vector to be recognized when there is no preset feature vector matching the feature vector to be recognized in the preset entity word library to obtain an error correction feature vector; wherein, one preset feature vector corresponds to one preset entity word.
[0014] In some feasible examples, the processing unit is specifically used to perform error recognition on the feature vector to be recognized when there is no preset feature vector matching the feature vector to be recognized in the preset entity vocabulary, and obtain the error type corresponding to the feature vector to be recognized; the processing unit is specifically used to obtain an error correction method corresponding to the error type based on the error type; wherein the error correction method includes at least one or more of flat tongue sound correction, curled tongue sound correction, and front and back nasal sound correction; the processing unit is specifically used to correct the feature vector to be recognized according to the error correction method, and obtain the error correction feature vector.
[0015] In some feasible examples, the processing unit is specifically configured to query a preset relationship based on the error type to obtain an error correction method corresponding to the error type.
[0016] In some feasible examples, the acquisition unit is also used to acquire entity features corresponding to entity words and pinyin features corresponding to entity words in the dialect dictionary; the processing unit is also used to generate a preset entity vocabulary based on the correspondence between the entity features acquired by the acquisition unit and the pinyin features acquired by the acquisition unit.
[0017] In some feasible examples, the processing unit is further configured to use the preset feature vector as an error correction feature vector when there is a preset feature vector matching the feature vector to be identified in the preset entity vocabulary.
[0018] In a third aspect, the present disclosure provides an electronic device, comprising: a memory and a processor, the memory being used to store a computer program; the processor being used to enable the electronic device to implement the intent recognition method provided in the first aspect when executing the computer program.
[0019] In a fourth aspect, the present disclosure provides a computer-readable storage medium, comprising: a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a computing device, the computing device implements the intent recognition method provided in the first aspect above.
[0020] In a fifth aspect, the present disclosure provides a vehicle, comprising any one of the intention recognition devices provided in the second aspect.
[0021] In the present disclosure, the name of the above-mentioned intention recognition device does not limit the device or functional module itself. In actual implementation, these devices or functional modules may appear with other names. As long as the functions of each device or functional module are similar to those of the present disclosure, they fall within the scope of the claims of the present disclosure and their equivalent technologies.
[0022] These and other aspects of the present disclosure will become more apparent from the following description.
[0023] Compared with the prior art, the technical solution provided by the present invention has the following advantages:
[0024] After obtaining the voice information to be recognized, the error correction feature vector is obtained by performing error correction processing on the voice information to be recognized, such as correcting pronunciation errors and / or spelling errors in the voice information to be recognized, so as to avoid pronunciation or spelling errors in the voice information to be recognized. Afterwards, the error correction feature vector is feature fused with the context feature vector of the context information corresponding to the voice information to be recognized to generate a fused feature vector. In this way, when analyzing the user's intention, the user's intention can be better understood due to the introduction of context information. Afterwards, the intention recognition result corresponding to the voice information to be recognized is generated by performing intention analysis on the fused feature vector. Since the fused feature vector contains the context information of the voice information to be recognized, and the pronunciation errors and / or spelling errors in the voice information to be recognized are corrected at the same time, the information used to represent the user's intention in the fused feature vector can be greatly improved. In this way, when performing intention analysis on the fused feature vector, since the information used to represent the user's intention in the fused feature vector is more accurate, the recognition accuracy of the intention can be improved, the user experience is guaranteed, and the problem of how to accurately recognize the user's intention is solved. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0026] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0027] Figure 1 One of the flowcharts of the intent recognition method provided in the embodiment of the present disclosure;
[0028] Figure 2 A second flowchart of the intent recognition method provided in an embodiment of the present disclosure;
[0029] Figure 3 The third flowchart of the intention recognition method provided in the embodiment of the present disclosure;
[0030] Figure 4 A fourth flowchart of the intent recognition method provided in an embodiment of the present disclosure;
[0031] Figure 5 A fifth flowchart of the intent recognition method provided in an embodiment of the present disclosure;
[0032] Figure 6 A schematic diagram of the structure of an intention recognition device provided in an embodiment of the present disclosure;
[0033] Figure 7 A schematic diagram of the structure of a vehicle-mounted terminal provided in an embodiment of the present disclosure;
[0034] Figure 8 A schematic diagram of the structure of a computer program product provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0035] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0036] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0037] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0038] Query in the embodiments of the present disclosure refers to the query word entered or clicked by the user when the user opens the search page and initiates each search. Query is a very basic concept in search and is the starting point for understanding user intent.
[0039] Gru in the disclosed embodiment refers to a gated recurrent unit, which is one of the variants of a recurrent neural network (Rnn).
[0040] The CNN in the disclosed embodiment is a convolutional neural network (CNN), which is a type of feedforward neural network (CNN) that includes convolution calculations and has a deep structure.
[0041] Lstm in the embodiment of the present disclosure refers to a long short-term memory network (Long Short Term Memory), which is one of the variants of the recurrent neural network Rnn.
[0042] The Transformer in the embodiments of the present disclosure refers to a sequence-to-sequence model based on a self-attention mechanism.
[0043] Bert in the embodiments of the present disclosure refers to Bidirectional Encoder Representation from Transformers, which is an unsupervised pre-trained language model for natural language processing tasks.
[0044] The execution subject of the intent recognition method in the embodiment of the present application is the intent recognition device, which can be set in a server or other device, and this embodiment does not limit this. For example, when the intent recognition device is set in a car, the execution subject of the intent recognition method provided in the embodiment of the present disclosure is the processor of the car.
[0045] The voice information to be recognized and the historical voice information involved in the present disclosure may be data authorized by the user or fully authorized by all parties.
[0046] Exemplarily, the intention recognition method provided by the embodiment of the present disclosure is introduced by taking the execution subject of the intention recognition method provided by the embodiment of the present disclosure as a car as an example.
[0047] like Figure 1 As shown, the intention recognition method provided by the embodiment of the present disclosure includes the following steps S11-S14:
[0048] S11. Acquire voice information to be recognized.
[0049] In some examples, the user can interact with the vehicle terminal of the car by voice, and the vehicle terminal can obtain the user's intention by recognizing the voice data to be recognized input by the user. Afterwards, the vehicle terminal can provide the user with corresponding recommended content or execute corresponding functions based on the user's intention, thereby ensuring the user's experience.
[0050] S12, performing error correction processing on the speech information to be recognized to obtain an error correction feature vector corresponding to the speech information to be recognized, wherein the error correction processing is used to correct pronunciation errors and / or spelling errors in the speech information to be recognized.
[0051] In some examples, when the vehicle-mounted terminal recognizes the voice information to be recognized, there is a problem of misrecognizing the voice information to be recognized. To this end, the intention recognition method provided in the embodiment of the present disclosure performs error correction processing on the voice information to be recognized, such as: correcting pronunciation errors of the voice information to be recognized (such as front and back nasal sounds, flat tongue sounds and curled tongue sounds, etc.), or correcting spelling errors of the voice information to be recognized (such as: "Kikujiro's Spring"), to obtain the corrected voice information to be recognized. Afterwards, feature extraction is performed on the corrected voice information to be recognized, thereby obtaining an error correction feature vector.
[0052] In some examples, since there may be noise in the voice information to be recognized input by the user, when the voice information to be recognized is error corrected, it is necessary to preprocess the voice information to be recognized (such as: one or more of quantization, sampling, pre-filtering, pre-emphasis and frame windowing of the audio signal). Afterwards, the vehicle-mounted terminal performs error correction processing on the preprocessed voice information to be recognized to obtain the corrected voice information to be recognized. Afterwards, the vehicle-mounted terminal performs a speech-to-text operation on the corrected voice information to be recognized to generate error correction text information corresponding to the corrected voice information to be recognized, such as: the vehicle-mounted terminal uses speech recognition technology (Automatic Speech Recognition, ASR) to recognize the corrected voice information to be recognized to generate error correction text information corresponding to the corrected voice information to be recognized. Alternatively, the vehicle-mounted terminal inputs the corrected voice information to be recognized into the speech recognition model for recognition to obtain error correction text information corresponding to the corrected voice information to be recognized. Among them, the training process of the speech recognition model is as follows:
[0053] The training sample data and the marking results of the training sample data are obtained, wherein the training sample data includes at least one historical voice information, and the marking results include error correction text information corresponding to the historical voice information.
[0054] The training sample data is input into the neural network model for learning, and the prediction results of the neural network model for the training sample data are obtained.
[0055] Based on the prediction results and labeling results, the network parameters of the neural network model are adjusted until the neural network model converges to obtain a speech recognition model.
[0056] In some examples, when extracting features from the speech information to be recognized after error correction, the speech information to be recognized after error correction can be firstly converted into text to obtain error correction text information. Then, feature extraction is performed on the error correction text information to obtain at least one target feature contained in the error correction text information. Then, the target feature is encoded according to a pre-configured feature vector rule to obtain an error correction feature vector corresponding to the speech information to be recognized.
[0057] In some examples, when extracting features from the speech information to be recognized after error correction, the speech information to be recognized after error correction can be firstly converted into text to obtain error correction text information. After that, the error correction text information is input into a single sentence encoder for recognition to obtain an error correction feature vector corresponding to the speech information to be recognized. The single sentence encoder includes any one of CNN, Lstm, Transformer, Bert, etc.
[0058] Exemplarily, the single sentence encoder uses the pre-trained language model Bert to perform semantic learning on the speech information to be recognized, and obtains the error correction feature vector corresponding to the speech information to be recognized. The input of the single sentence encoder is Qi, and the output is Ui. The specific calculation formula is as follows:
[0059] U i = Bert(Q i ).
[0060] Among them, Q i represents the i-th text information to be recognized, U i Represents the feature vector to be recognized corresponding to the i-th text information to be recognized, i belongs to A, A represents the number of short sentences contained in the voice information to be recognized, such as: the voice information to be recognized is "close the car window and turn on the air conditioner", and the text information to be recognized "close the car window" and "turn on the air conditioner" are obtained by preprocessing the voice information to be recognized. Since the sentence input by the user contains 2 short sentences, the corresponding text information to be recognized is 2. At this time, it is necessary to input the first text to be recognized "close the car window" into the single sentence encoder for recognition, and obtain the error correction feature vector corresponding to "close the car window". After that, the second text to be recognized "turn on the air conditioner" is input into the single sentence encoder for recognition, and the error correction feature vector corresponding to "turn on the air conditioner" is obtained.
[0061] In some examples, the preconfigured feature vector rules include: arranging the target features in sequence according to the positions of the target features in the text information to be identified, to obtain the feature vector to be identified.
[0062] For example, when arranging target features, the following arrangement can be used:
[0063] [a1a2a3…an].
[0064] Wherein, an represents the nth target feature, and n is an integer greater than or equal to 0.
[0065] Alternatively, based on the historical occurrence frequency corresponding to the target feature (the ratio of the total number of times the target feature appears in historical records to the total number of times all target features appear in historical records), the target features are arranged in order from large to small to obtain the feature vector to be identified.
[0066] In some examples, the dimension of the feature vector to be recognized is query length × word vector dimension, where the query length is equal to the number of characters (such as words or letters) contained in the speech information to be recognized, and the word vector dimension is equal to the dimension of the feature vector to be recognized.
[0067] In some examples, in order to improve the accuracy of intent recognition, the intent recognition method provided by the embodiments of the present disclosure pre-stores preset voice information of users speaking preset entity words in different accents, as well as preset feature vectors corresponding to the preset voice information (obtained by extracting features from the preset voice information). Afterwards, by querying the preset entity word library storing the preset entity words for a preset feature vector that matches the feature vector to be recognized corresponding to the voice information to be recognized input by the user, it is determined whether the feature vector to be recognized has an error. For example: the voice information to be recognized input by the user is "Kikujiro's Spring". At this time, the vehicle-mounted terminal will query the preset entity word library to see if there is a preset feature vector that matches the feature vector to be recognized of "Kikujiro's Spring". When the vehicle terminal determines that there is no preset feature vector matching the feature vector to be identified of "Kikujiro's Spring" in the preset entity word library (e.g., no preset feature vector identical to the feature vector to be identified of "Kikujiro's Spring" can be found), error correction processing is performed on "Kikujiro's Spring", such as calculating the similarity between the feature vector to be identified of "Kikujiro's Spring" and each preset feature vector (e.g., cosine similarity, Manhattan distance, etc.). Afterwards, the preset feature vector of the preset entity word corresponding to the maximum similarity (e.g., "Kikujiro's Summer") is used as the error correction feature vector.
[0068] Alternatively, when the vehicle-mounted terminal determines that there is a preset feature vector in the preset entity vocabulary that matches the feature vector to be identified of "Kikujiro's Spring", the preset feature vector that matches the feature vector to be identified of "Kikujiro's Spring" is used as the error correction feature vector.
[0069] In some examples, the feature vector to be recognized corresponding to the voice information to be recognized input by the user can be input into the error correction model for error correction processing to obtain the error correction feature vector corresponding to the voice information to be recognized. The training process of the error correction model is as follows:
[0070] The training sample data and the marking result of the training sample data are obtained, wherein the training sample data includes historical speech information and historical speech vectors corresponding to the historical speech information, and the marking result includes an error correction feature vector corresponding to the historical feature vector.
[0071] The training sample data is input into the neural network model for learning, and the prediction results of the neural network model for the training sample data are obtained.
[0072] Based on the prediction results and labeling results, the network parameters of the neural network model are adjusted until the neural network model converges to obtain an error correction model.
[0073] S13, fusing the error correction feature vector with the context feature vector of the context information corresponding to the voice information to be recognized to generate a fused feature vector. The context information includes a preset number of historical voice information input before the voice information to be recognized.
[0074] In some examples, when the user uses the vehicle terminal, the vehicle terminal analyzes the voice information to be recognized by combining the online context information of the voice information to be recognized, thereby improving the accuracy of the intention recognition of the voice to be recognized. Therefore, at least one historical voice information that has a contextual relationship with the voice information to be recognized can be obtained. Because each historical voice information corresponds to a historical feature vector. Afterwards, the historical feature vectors corresponding to the historical voice information can be matrix constructed in a preset manner to obtain a first target matrix, such as: arranging the historical feature vectors corresponding to the historical voice information according to the time sequence of the user inputting the historical voice information to obtain the first target matrix. Alternatively, the product of the weight value corresponding to the historical voice information and the historical feature vector corresponding to the historical voice information is summed to obtain a second target matrix. Afterwards, the first target matrix and the error correction feature vector are fused to generate a fused feature vector. Alternatively, the second target matrix and the error correction feature vector are fused to generate a fused feature vector, thereby improving the accuracy of intention recognition.
[0075] Exemplarily, the historical feature vectors may be arranged in the following manner:
[0076] [b1b2b3…bN].
[0077] Wherein, bN represents the Nth historical feature vector, and N is an integer greater than or equal to 0.
[0078] In some examples, the weight value corresponding to the historical voice information is equal to the ratio of the total number of times the historical voice information appears in the historical records to the total number of times all the historical voice information appears in the historical records.
[0079] In some examples, since the first target matrix or the second target matrix has a different dimension from the error correction feature vector, it is necessary to convert the error correction feature vector into a vector having the same dimension as the first target matrix, or convert the error correction feature vector into a vector having the same dimension as the second target matrix. For example, the dimension of the first target matrix or the second target matrix is conversation length × query length × word vector dimension, and the conversation length is equal to the amount of historical speech information that has a contextual relationship with the error correction feature vector.
[0080] Specifically, the process of converting the error correction feature vector into a vector having the same dimension as the second target matrix is similar to the process of converting the error correction feature vector into a vector having the same dimension as the first target matrix, and will not be repeated here.
[0081] In some examples, after obtaining at least one historical voice information that has a contextual relationship with the voice information to be recognized, the historical feature vector and the error correction feature vector corresponding to the at least one historical voice information that has a contextual relationship with the voice information to be recognized can be simultaneously input into the context encoder for recognition to obtain a fused feature vector. The context encoder includes any one of the time series encoders such as Gru and Lstm.
[0082] Exemplarily, the context encoder uses Lstm, which helps Lstm encode historical speech information. The input of the context encoder is U i , the output is C j , the specific calculation formula is as follows:
[0083] U=[U1,U2,...,U n ];
[0084] C n =Lstm(U);C=[C1, C2,...,C n ].
[0085] Among them, U n represents the feature vector to be recognized of the nth voice information to be recognized input within a preset time (such as the first time corresponding to the start of the vehicle terminal to the current time), U represents the feature vector to be recognized corresponding to each voice information to be recognized input within the preset time, C nrepresents the fused feature vector of the nth voice information to be recognized input within the preset time, C represents the fused feature vector corresponding to each voice information to be recognized input within the preset time, n represents the total number of voice information to be recognized input within the preset time, and n is an integer greater than or equal to 0.
[0086] In some examples, the intention recognition method provided by the embodiments of the present disclosure can obtain a preset amount of historical voice information, or historical voice information within a preset time length from the input time of the voice information to be recognized, when obtaining historical voice information, so as to reduce the occupancy of computing resources of the vehicle terminal.
[0087] Specifically, the process of obtaining the historical feature vectors corresponding to the historical voice information is the same as the process of obtaining the feature vector to be recognized corresponding to the current voice information, which will not be described in detail here.
[0088] It should be noted that when there is no historical voice information that has a contextual relationship with the voice information to be recognized, a default empty historical voice information may be generated.
[0089] S14. Perform intent analysis on the fused feature vector to generate an intent recognition result corresponding to the voice information to be recognized.
[0090] In some examples, the fused feature vector can be input into the intent encoder for intent analysis to generate the intent recognition result corresponding to the speech information to be recognized. The input of the intent encoder is Ci, and the output is Ii. The specific calculation formula is as follows:
[0091] I i =Intent_Module[C i ].
[0092] Among them, I i represents the intention recognition result corresponding to the i-th fusion feature vector input within the preset time, C i It represents the fused feature vector corresponding to the i-th voice information to be recognized input within the preset time, and Intent_Model() represents the intent encoder.
[0093] From the above, it can be seen that the intent recognition method provided by the embodiment of the present disclosure performs error correction processing on the voice information to be recognized and introduces the context information of the voice information to be recognized. In this way, when performing intent analysis on the fused feature vector, since the fused feature vector contains the context information of the voice information to be recognized and the pronunciation errors and / or spelling errors in the voice information to be recognized are corrected at the same time, the information used to represent the user's intent in the fused feature vector can be greatly improved. When performing intent analysis on the fused feature vector, since the information used to represent the user's intent in the fused feature vector is more accurate, the recognition accuracy of the intent can be improved to ensure the user experience.
[0094] In some possible implementation examples, combined with Figure 1 ,like Figure 2 As shown, the above S12 can be specifically implemented through the following S120 and S121.
[0095] S120 , extracting features from the speech information to be recognized, and obtaining a feature vector to be recognized corresponding to the speech information to be recognized.
[0096] Specifically, the process of extracting features from the speech information to be recognized and obtaining the feature vector to be recognized corresponding to the speech information to be recognized is the same as the process of extracting features from the speech information to be recognized after error correction and obtaining the error-corrected feature vector corresponding to the speech information to be recognized, and will not be repeated here.
[0097] S121, when there is no preset feature vector matching the feature vector to be identified in the preset entity word library, error correction processing is performed on the feature vector to be identified to obtain an error correction feature vector, wherein one preset feature vector corresponds to one preset entity word.
[0098] In some possible implementation examples, combined with Figure 2 ,like Figure 3 As shown, the above S121 can be specifically implemented through the following S1210-S1212.
[0099] S1210: When there is no preset feature vector matching the feature vector to be identified in the preset entity word library, error identification is performed on the feature vector to be identified to obtain an error type corresponding to the feature vector to be identified.
[0100] In some examples, when an error is made on a feature vector to be identified, a preset entity word with the highest similarity to the feature vector to be identified can be searched in a preset entity word library. For example, if the voice information to be identified corresponding to the feature vector to be identified is "the cowherd boy's Chongtian", the preset entity word with the highest similarity to the feature vector to be identified corresponding to "the cowherd boy's Chongtian" should be "the cowherd boy's Chuntian". Afterwards, by comparing each character in the voice information to be identified with each character in the preset entity word, the different characters "Chong" and "Chun" are determined. Since "Chong" and "Chun" are front and back nasal words, the error type is determined to be a front and back nasal error.
[0101] In some examples, when performing error recognition on a feature vector to be recognized, the feature vector to be recognized may be input into an error recognition model to perform error recognition, and obtain the error type corresponding to the feature vector to be recognized. The training process of the error recognition model is as follows:
[0102] The training sample data and the marking result of the training sample data are obtained, wherein the training sample data includes historical speech information and historical feature vectors corresponding to the historical speech information, and the marking result includes the error type corresponding to the historical feature vector.
[0103] The training sample data is input into the neural network model for learning, and the prediction results of the neural network model for the training sample data are obtained.
[0104] Based on the prediction results and labeling results, the network parameters of the neural network model are adjusted until the neural network model converges to obtain an error recognition model.
[0105] In some examples, in order to facilitate the subsequent process, after determining the error type, a prefix can be added before the feature vector to be identified to generate a preset template (such as a prompt template). The prefix is used to indicate the error type of the feature vector to be identified. Afterwards, the vehicle terminal analyzes the field used to characterize the prefix in the prompt template to obtain the error type of the feature vector to be identified. And based on the error type, the error correction method corresponding to the error type is obtained. Afterwards, the feature vector to be identified is corrected according to the error correction method to obtain an error correction feature vector.
[0106] S1211: Based on the error type, obtain an error correction method corresponding to the error type, wherein the error correction method includes at least one or more of flat tongue sound correction, curled tongue sound correction, and front and back nasal sound correction.
[0107] In some examples, a preset relationship including an error type and an error correction method is preconfigured in the memory of the vehicle terminal. When the error correction method needs to be determined, the vehicle terminal can query the error correction method corresponding to the error type in the preset relationship.
[0108] S1212. Correct the feature vector to be identified according to the error correction method to obtain an error correction feature vector.
[0109] In some examples, in combination with the example given in S1210 above, when it is determined that the error type is a front and back nasal error, the pinyin (chong) of "chong" in the feature vector to be identified is exchanged with the front and back nasal sounds to obtain "chun" (chun), pure (chun), etc. Afterwards, "chong" in the feature vector to be identified is replaced with "chun" (chun), pure (chun), etc. in sequence, and the historical occurrence frequencies corresponding to the error correction text information "Cowherding Boy's Spring" and "Cowherding Boy's Pure Day" are calculated respectively (such as: the ratio of the total number of occurrences of "Cowherding Boy's Spring" to the total number of historical voice information, the ratio of the total number of occurrences of "Cowherding Boy's Pure Day" to the total number of historical voice information). Afterwards, the feature vector of the error correction text information corresponding to the maximum historical occurrence frequency is used as the error correction feature vector. If it is determined that the historical occurrence frequency of "Cowherding Boy's Spring" is the largest, the feature vector of the error correction text information corresponding to "Cowherding Boy's Spring" is used as the error correction feature vector.
[0110] In some possible implementation examples, combined with Figure 3 ,like Figure 4 As shown, the above S1211 can be specifically implemented through the following S12110.
[0111] S12110. Query the preset relationship based on the error type to obtain the error correction method corresponding to the error type.
[0112] In some possible implementation examples, combined with Figure 2 ,like Figure 5 As shown, the intention recognition method provided by the embodiment of the present disclosure also includes S15 and S16.
[0113] S15. Obtain entity features corresponding to entity words in the dialect dictionary and pinyin features corresponding to the entity words.
[0114] S16. Generate a preset entity vocabulary based on the correspondence between entity features and pinyin features.
[0115] In some possible implementation examples, combined with Figure 1 ,like Figure 2 As shown, the intention recognition method provided by the embodiment of the present disclosure also includes S17.
[0116] S17. When there is a preset feature vector matching the feature vector to be identified in the preset entity vocabulary, the preset feature vector is used as an error correction feature vector.
[0117] The above mainly introduces the solution provided by the embodiment of the present disclosure from the perspective of the method. In order to achieve the above functions, it includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present disclosure can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present disclosure.
[0118] The embodiments of the present disclosure may divide the functional modules of the intent recognition device according to the above method examples. For example, each functional module may be divided according to each function, or two or more functions may be integrated into one processing module. The above integrated modules may be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiments of the present disclosure is schematic and is only a logical functional division. There may be other division methods in actual implementation.
[0119] like Figure 6 , which is a schematic diagram of the structure of an intention recognition device 10 provided in an embodiment of the present disclosure, including an acquisition unit 101 and a processing unit 102 .
[0120] The acquisition unit 101 is used to acquire the voice information to be recognized; the processing unit 102 is used to perform error correction processing on the voice information to be recognized acquired by the acquisition unit 101 to obtain an error correction feature vector corresponding to the voice information to be recognized; wherein the error correction processing is used to correct pronunciation errors and / or spelling errors in the voice information to be recognized; the processing unit 102 is also used to perform feature fusion on the error correction feature vector and the context feature vector of the context information corresponding to the voice information to be recognized acquired by the acquisition unit 101 to generate a fused feature vector; wherein the context information includes a preset number of historical voice information input before the voice information to be recognized; the processing unit 102 is also used to perform intent analysis on the fused feature vector to generate an intent recognition result corresponding to the voice information to be recognized.
[0121] In some feasible examples, the processing unit 102 is specifically used to perform feature extraction on the voice information to be recognized obtained by the acquisition unit 101 to obtain a feature vector to be recognized corresponding to the voice information to be recognized; the processing unit 102 is specifically used to perform error correction processing on the feature vector to be recognized when there is no preset feature vector matching the feature vector to be recognized in the preset entity word library to obtain an error correction feature vector; wherein, one preset feature vector corresponds to one preset entity word.
[0122] In some feasible examples, the processing unit 102 is specifically used to perform error recognition on the feature vector to be recognized when there is no preset feature vector matching the feature vector to be recognized in the preset entity vocabulary, and obtain the error type corresponding to the feature vector to be recognized; the processing unit 102 is specifically used to obtain an error correction method corresponding to the error type based on the error type; wherein the error correction method includes at least one or more of flat tongue sound correction, curled tongue sound correction, and front and back nasal sound correction; the processing unit 102 is specifically used to correct the feature vector to be recognized according to the error correction method, and obtain the error correction feature vector.
[0123] In some feasible examples, the processing unit 102 is specifically configured to query a preset relationship based on the error type to obtain an error correction method corresponding to the error type.
[0124] In some feasible examples, the acquisition unit 101 is also used to acquire entity features corresponding to entity words in the dialect dictionary and pinyin features corresponding to the entity words; the processing unit 102 is also used to generate a preset entity vocabulary based on the correspondence between the entity features acquired by the acquisition unit 101 and the pinyin features acquired by the acquisition unit 101.
[0125] In some feasible examples, the processing unit 102 is further configured to use the preset feature vector as an error correction feature vector when there is a preset feature vector matching the feature vector to be identified in the preset entity vocabulary.
[0126] Among them, all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, and its role will not be repeated here.
[0127] Of course, the intention recognition device 10 provided in the embodiment of the present disclosure includes but is not limited to the above modules, for example, the intention recognition device 10 may also include a storage unit 103. The storage unit 103 can be used to store the program code of the intention recognition device 10, and can also be used to store data generated by the intention recognition device 10 during operation, such as data in a write request, etc.
[0128] Figure 7 A schematic diagram of the structure of a vehicle-mounted terminal provided in an embodiment of the present disclosure is shown in FIG. Figure 7 As shown, the vehicle-mounted terminal may include: at least one processor 51 , a memory 52 , a communication interface 53 and a communication bus 54 .
[0129] Combine the following Figure 7 The following is a detailed introduction to the various components of the vehicle terminal:
[0130] The processor 51 is the control center of the electronic device 10, and may be a processor or a general term for multiple processing elements. For example, the processor 51 is a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present disclosure, such as one or more DSPs, or one or more field programmable gate arrays (FPGAs).
[0131] In a specific implementation, as an embodiment, the processor 51 may include one or more CPUs, such as Figure 7 Also, as an embodiment, the electronic device may include multiple processors, such as Figure 7 51 and 55 are shown in FIG. Each of these processors may be a single-core processor (Single-CPU) or a multi-core processor (Multi-CPU). The processor here may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).
[0132] The memory 52 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 52 may exist independently and be connected to the processor 51 via a communication bus 54. The memory 52 may also be integrated with the processor 51.
[0133] In a specific implementation, the memory 52 is used to store the data in the present disclosure and execute the software program in the present disclosure. The processor 51 can execute various functions of the air conditioner by running or executing the software program stored in the memory 52 and calling the data stored in the memory 52.
[0134] The communication interface 53 uses any transceiver-like device to communicate with other devices or communication networks, such as Radio Access Network (RAN), Wireless Local Area Networks (WLAN), terminals, the cloud, etc. The communication interface 53 may include an acquisition unit to implement the acquisition function.
[0135] The communication bus 54 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0136] As an example, combine Figure 6 The function implemented by the acquisition unit 101 in the intention recognition device 10 is similar to Figure 7 The function of the communication interface 53 in the intention recognition device 10 is the same as that of the processing unit 102 in the intention recognition device 10. Figure 7 The function of the processor 51 in the intention recognition device 10 is the same as that of the storage unit 103 in the intention recognition device 10. Figure 7 The function of the memory 52 in is the same.
[0137] Another embodiment of the present disclosure further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a computing device, the computing device executes the intent recognition method shown in the above method embodiment.
[0138] In some embodiments, the disclosed methods may be implemented as computer program instructions encoded in a machine-readable format on a computer-readable storage medium or on other non-transitory media or articles of manufacture.
[0139] Figure 8A conceptual partial view of a computer program product provided by an embodiment of the present disclosure is schematically shown, wherein the computer program product includes a computer program for executing a computer process on a computing device.
[0140] In one embodiment, the computer program product is provided using a signal bearing medium 410. The signal bearing medium 410 may include one or more program instructions, which when executed by one or more processors may provide the above-mentioned Figure 1 Thus, for example, reference to Figure 1 In the embodiment shown in , one or more features of S11-S14 can be undertaken by one or more instructions associated with the signal bearing medium 410. In addition, Figure 8 The program instructions in also describe example instructions.
[0141] In some examples, signal bearing medium 410 may include computer readable medium 411, such as, but not limited to, a hard drive, a compact disk (CD), a digital video disk (DVD), a digital tape, a memory, a read-only memory (ROM), or a random access memory (RAM), and the like.
[0142] In some implementations, signal bearing medium 410 may include computer recordable medium 412 such as, but not limited to, memory, read / write (R / W) CD, R / W DVD, and the like.
[0143] In some implementations, signal bearing medium 410 may include communication medium 413 such as, but not limited to, digital and / or analog communication media (eg, fiber optic cables, waveguides, wired communication links, wireless communication links, etc.).
[0144] Signal bearing medium 410 may be communicated by a wireless form of communication medium 413 (eg, wireless communication medium complying with IEEE 802.41 standard or other transmission protocol). The one or more program instructions may be, for example, computing device executable instructions or logic implementing instructions.
[0145] In some examples, such as for Figure 6 The described intention recognition device 10 can be configured to provide various operations, functions, or actions in response to one or more program instructions in the computer-readable medium 411, the computer-recordable medium 412, and / or the communication medium 413.
[0146] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0147] In the several embodiments provided in the present disclosure, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0148] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0149] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0150] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present disclosure is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks or optical disks.
[0151] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for intention recognition, characterized in that: include: Obtaining voice information to be recognized; Performing error correction processing on the voice information to be recognized to obtain an error correction feature vector corresponding to the voice information to be recognized; wherein the error correction processing is used to correct pronunciation errors and / or spelling errors in the voice information to be recognized; Performing feature fusion on the error correction feature vector and the context feature vector of the context information corresponding to the voice information to be recognized to generate a fused feature vector; wherein the context information includes a preset number of historical voice information input before the voice information to be recognized; Performing intent analysis on the fused feature vector to generate an intent recognition result corresponding to the voice information to be recognized.
2. The method for intention recognition according to claim 1, characterized in that: The performing error correction processing on the speech information to be recognized to obtain an error correction feature vector corresponding to the speech information to be recognized includes: Extracting features of the speech information to be recognized to obtain a feature vector to be recognized corresponding to the speech information to be recognized; When there is no preset feature vector matching the feature vector to be identified in the preset entity word library, error correction processing is performed on the feature vector to be identified to obtain an error correction feature vector; wherein one preset feature vector corresponds to one preset entity word.
3. The method for identifying intention according to claim 2, characterized in that: In the case that there is no preset feature vector matching the feature vector to be identified in the preset entity word library, error correction processing is performed on the feature vector to be identified to obtain an error correction feature vector, including: In the case that there is no preset feature vector matching the feature vector to be identified in the preset entity word library, error identification is performed on the feature vector to be identified to obtain an error type corresponding to the feature vector to be identified; Based on the error type, obtaining an error correction method corresponding to the error type; wherein the error correction method includes at least one or more of flat tongue sound correction, curled tongue sound correction, and front and back nasal sound correction; The error correction method is used to correct the feature vector to be identified, so as to obtain an error-corrected feature vector.
4. The method for intention recognition according to claim 3, characterized in that: The obtaining, based on the error type, an error correction method corresponding to the error type includes: A preset relationship is queried based on the error type to obtain an error correction method corresponding to the error type.
5. The method for intention recognition according to claim 2, characterized in that: In the case that there is no preset feature vector matching the feature vector to be identified in the preset entity word library, error correction processing is performed on the feature vector to be identified, and before obtaining the error correction feature vector, the method further includes: Obtaining entity features corresponding to entity words in a dialect dictionary and pinyin features corresponding to the entity words; The preset entity vocabulary is generated based on the correspondence between the entity features and the pinyin features.
6. The method for intention recognition according to claim 2, characterized in that: The method further comprises: In the case that there is a preset feature vector matching the feature vector to be identified in the preset entity vocabulary, the preset feature vector is used as the error correction feature vector.
7. An intention recognition device, characterized in that: include: An acquisition unit, used for acquiring voice information to be recognized; A processing unit, configured to perform error correction processing on the speech information to be recognized obtained by the obtaining unit, and obtain an error correction feature vector corresponding to the speech information to be recognized; wherein the error correction processing is used to correct pronunciation errors and / or spelling errors in the speech information to be recognized; The processing unit is further used to perform feature fusion on the error correction feature vector and the context feature vector of the context information corresponding to the voice information to be recognized acquired by the acquisition unit to generate a fused feature vector; wherein the context information includes a preset number of historical voice information input before the voice information to be recognized; The processing unit is also used to perform intent analysis on the fused feature vector to generate an intent recognition result corresponding to the voice information to be recognized.
8. An electronic device, characterized in that: include: A memory and a processor, wherein the memory is used to store a computer program; and the processor is used to enable the electronic device to implement the intention recognition method described in any one of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium, characterized in that: include: The computer-readable storage medium stores a computer program, and when the computer program is executed by a computing device, the computing device implements the intention recognition method described in any one of claims 1-6.
10. A vehicle, characterized in that: Includes the intention recognition device as described in claim 7, or the electronic device as described in claim 8.
