Intention recognition method and device and electronic equipment
By replacing character and fusion of voice information in the vehicle terminal, the problem of inaccurate intention recognition under user dialect input is solved, and the recognition accuracy and user experience are improved.
Patent Information
- Application Number
- CN202310603408.7
- 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 on-board terminal processes the voice information entered by the user in dialect, it often fails to accurately identify the user's intentions, which leads to the user requiring multiple inputs to successfully identify, affecting the user's experience.
By replacing each actual character in the speech information to be recognized, substituted speech information is generated, and feature extraction and context feature fusion are performed when the score of the speech information to be recognized, intent recognition results are generated, and the replacement speech information is introduced. Context information to correct pronunciation and spelling errors and improve recognition accuracy.
It improves the accuracy of user intention recognition, reduces the number of user inputs, and improves the user experience.
Smart Images

Figure CN119028330A_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 have the problem of being unable to accurately recognize the user's intentions. For example, when the user inputs voice information in a dialect, the vehicle-mounted terminal is unable to recognize the voice information input by the user. In this case, the user needs to try to input the corresponding voice information multiple times before the vehicle-mounted terminal can recognize the voice information input by the user, resulting in a poor user experience.
[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 character replacement on each actual character in the voice information to be recognized to generate replacement voice information; in a case where a first score corresponding to the replacement voice information is greater than a second score corresponding to the voice information to be recognized, performing feature extraction on the replacement voice information to obtain a replacement feature vector corresponding to the replacement voice information; performing feature fusion on the replacement feature vector and a context feature vector of context information corresponding to the voice information to be recognized to generate a first 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 first fused feature vector to generate an intent recognition result corresponding to the voice information to be recognized.
[0007] In the present disclosure, character replacement is performed on each actual character in the voice information to be recognized to generate replacement voice information, including: obtaining an actual feature vector corresponding to each actual character in the voice information to be recognized; based on the actual feature vector, determining the theoretical character corresponding to the actual feature vector; replacing the actual characters with the theoretical characters respectively to generate replacement voice information.
[0008] In the present disclosure, based on the actual feature vector, the theoretical character corresponding to the actual feature vector is determined, including: based on the actual feature vector, a query is performed in a preset entity vocabulary, and when it is determined that there is a preset vector matching the actual feature vector, the preset character corresponding to the preset vector is used as the theoretical character corresponding to the actual feature vector.
[0009] In the present disclosure, a query is performed in a preset entity vocabulary based on the actual feature vector. When it is determined that there is a preset vector that matches the actual feature vector, before using the preset character corresponding to the preset vector as the theoretical character corresponding to the actual feature vector, the intention recognition method provided by the embodiment of 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.
[0010] In the present disclosure, based on the actual feature vector, the theoretical character corresponding to the actual feature vector is determined, including: based on the actual feature vector, a query is performed in a preset entity vocabulary, and when it is determined that there is no preset vector matching the actual feature vector, the theoretical character corresponding to the actual feature vector is determined to be the actual character corresponding to the actual feature vector.
[0011] In the present disclosure, the provided intention recognition method also includes: in the absence of a first score corresponding to the replacement voice information being greater than the second score corresponding to the voice information to be recognized, feature fusion of the feature vector to be recognized corresponding to the voice information to be recognized and the context feature vector of the context information corresponding to the voice information to be recognized to generate a second fused feature vector; wherein the context information includes a preset number of historical voice information input before the voice information to be recognized; and performing intent analysis on the second fused feature vector to generate an intent recognition result corresponding to the voice information to be recognized.
[0012] In the present disclosure, when there is a situation where the first score corresponding to the replacement voice information is greater than the second score corresponding to the voice information to be recognized, feature extraction is performed on the replacement voice information to obtain a replacement feature vector corresponding to the replacement voice information. The intention recognition method provided by the present disclosure also includes: obtaining a first historical occurrence probability of one or more consecutive characters in the replacement voice information, and a second historical occurrence probability of each character in the voice information to be recognized; generating a first score based on the first historical occurrence probability; and generating a second score based on the second historical occurrence probability.
[0013] In the second aspect, the present disclosure provides an intention recognition device, including: an acquisition unit, which voice acquires voice information to be recognized; a processing unit, which voice replaces each actual character in the voice information to be recognized acquired by the acquisition unit, and generates replacement voice information; the processing unit is also used to extract features of the replacement voice information when a first score corresponding to the replacement voice information is greater than a second score corresponding to the voice information to be recognized, so as to obtain a replacement feature vector corresponding to the replacement voice information; the processing unit is also used to perform feature fusion on the replacement feature vector and a context feature vector of the context information corresponding to the voice information to be recognized acquired by the acquisition unit, so as to generate a first 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 first fused feature vector, so as to generate an intent recognition result corresponding to the voice information to be recognized.
[0014] In the present disclosure, the acquisition unit is specifically used to obtain the actual feature vector corresponding to each actual character in the voice information to be recognized; the processing unit is specifically used to determine the theoretical character corresponding to the actual feature vector based on the actual feature vector obtained by the acquisition unit; the processing unit is specifically used to replace the actual characters with the theoretical characters respectively to generate replacement voice information.
[0015] In the present disclosure, the processing unit is specifically used to query in a preset entity vocabulary based on the actual feature vector, and when it is determined that there is a preset vector matching the actual feature vector, the preset character corresponding to the preset vector is used as the theoretical character corresponding to the actual feature vector.
[0016] In the present disclosure, the acquisition unit 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 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 the present disclosure, the processing unit is specifically used to query in a preset entity vocabulary based on the actual feature vector, and when it is determined that there is no preset vector matching the actual feature vector, determine that the theoretical character corresponding to the actual feature vector is the actual character corresponding to the actual feature vector.
[0018] In the present disclosure, the processing unit is also used to perform feature fusion on the feature vector to be recognized corresponding to the voice information to be recognized acquired by the acquisition unit and the context feature vector of the context information corresponding to the voice information to be recognized, so as to generate a second fused feature vector, in the absence of a first score corresponding to the replacement voice information being greater than the second score corresponding to the voice information to be recognized; 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 second fused feature vector and generate an intent recognition result corresponding to the voice information to be recognized.
[0019] In the present disclosure, the acquisition unit is also used to obtain the first historical occurrence probability of replacing one or more consecutive characters in the voice information, and the second historical occurrence probability of each character in the voice information to be recognized; the processing unit is also used to generate a first score based on the first historical occurrence probability obtained by the acquisition unit; the processing unit is also used to generate a second score based on the second historical occurrence probability obtained by the acquisition unit.
[0020] 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.
[0021] 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.
[0022] In a fifth aspect, the present disclosure provides a vehicle, comprising any one of the intention recognition devices provided in the second aspect.
[0023] 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.
[0024] These and other aspects of the present disclosure will become more apparent from the following description.
[0025] Compared with the prior art, the technical solution provided by the present invention has the following advantages:
[0026] The intention recognition method provided by the present disclosure generates replacement voice information by replacing each actual character after acquiring the voice information to be recognized. Afterwards, by determining whether there is a first score corresponding to the replacement voice information that is greater than the second score corresponding to the voice information to be recognized, it can be determined whether the replacement voice information meets the needs of the user, such as: when the first score corresponding to the replacement voice information is greater than the second score corresponding to the voice information to be recognized, it means that the replacement voice information is more in line with the needs of the user. At this time, the replacement voice information can be feature extracted to obtain a replacement feature vector corresponding to the replacement voice information, and the replacement feature vector and the context feature vector of the context information corresponding to the voice information to be recognized are feature fused to generate a first 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 first fused feature vector. Since the first fused feature vector contains the context information of the voice information to be recognized, and at the same time, the pronunciation errors and / or spelling errors in the voice information to be recognized are corrected, the information used to represent the user's intention in the first fused feature vector can be greatly improved. In this way, when performing intent analysis on the first fused feature vector, since the information used to represent the user's intent in the first fused feature vector is more accurate, the accuracy of intent recognition can be improved, the user experience is guaranteed, and the problem of how to accurately identify the user's intent is solved. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] 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.
[0028] 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.
[0029] Figure 1 One of the flowcharts of the intent recognition method provided in the embodiment of the present disclosure;
[0030] Figure 2 A second flowchart of the intent recognition method provided in an embodiment of the present disclosure;
[0031] Figure 3 The third flowchart of the intention recognition method provided in the embodiment of the present disclosure;
[0032] Figure 4A fourth flowchart of the intent recognition method provided in an embodiment of the present disclosure;
[0033] Figure 5 A fifth flowchart of the intent recognition method provided in an embodiment of the present disclosure;
[0034] Figure 6 A sixth flowchart of the intent recognition method provided in an embodiment of the present disclosure;
[0035] Figure 7 A schematic diagram of the structure of an intention recognition device provided in an embodiment of the present disclosure;
[0036] Figure 8 A schematic diagram of the structure of a vehicle-mounted terminal provided in an embodiment of the present disclosure;
[0037] Fig. 9 A schematic diagram of the structure of a computer program product provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0038] 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.
[0039] 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.
[0040] 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.
[0041] 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.
[0042] Gru in the disclosed embodiment refers to a gated recurrent unit, which is one of the variants of a recurrent neural network (Rnn).
[0043] 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.
[0044] 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.
[0045] The Transformer in the embodiments of the present disclosure refers to a sequence-to-sequence model based on a self-attention mechanism.
[0046] 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.
[0047] 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.
[0048] 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.
[0049] 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.
[0050] like Figure 1 As shown, the intention recognition method provided by the embodiment of the present disclosure includes the following steps S11-S15:
[0051] S11. Acquire voice information to be recognized.
[0052] 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.
[0053] S12, performing character replacement on each actual character in the voice information to be recognized to generate replacement voice information.
[0054] In some examples, the intention recognition method provided by the embodiments of the present disclosure generates replacement voice information by replacing each character in the voice information to be recognized, such as: by extracting features from the voice information to be recognized, obtaining at least one target feature contained in the voice information to be recognized. Afterwards, the target feature is encoded according to a preconfigured feature vector rule to obtain a feature vector to be recognized corresponding to the voice information to be recognized. Afterwards, based on the feature vector to be recognized, an actual feature vector corresponding to each actual character in the voice information to be recognized can be obtained. Afterwards, based on the actual feature vector, the theoretical character corresponding to the actual feature vector is determined. Because, when the vehicle-mounted terminal recognizes the voice information to be recognized, there is a problem of incorrectly recognizing the voice information to be recognized. For example, when the actual character recognized by the vehicle-mounted terminal is different from the theoretical character, it is necessary to determine whether the actual character is the correct character. To this end, it is necessary to replace the actual characters with the theoretical characters respectively to generate at least one replacement voice information.
[0055] In some examples, since there may be noise in the voice information to be recognized input by the user, 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), and then the vehicle terminal performs speech-to-text operation on the preprocessed voice information to be recognized, and generates text information to be recognized corresponding to the voice information to be recognized, such as: the vehicle terminal uses speech recognition technology (Automatic Speech Recognition, ASR) to recognize the preprocessed voice information to be recognized, and generates text information to be recognized corresponding to the voice information to be recognized. Alternatively, the vehicle terminal inputs the preprocessed voice information to be recognized into the speech recognition model for recognition, and obtains the text information to be recognized corresponding to the voice information to be recognized. Among them, the training process of the speech recognition model is as follows:
[0056] 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 historical text information corresponding to the historical voice information.
[0057] 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.
[0058] 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.
[0059] In some examples, when extracting features from the speech information to be recognized, a speech-to-text conversion operation may be performed on the speech information to be recognized to obtain text information to be recognized. Thereafter, feature extraction is performed on the text information to be recognized to obtain at least one target feature contained in the speech information to be recognized. Thereafter, the target feature is encoded according to a pre-configured feature vector rule to obtain a feature vector to be recognized corresponding to the speech information to be recognized.
[0060] In some examples, when extracting features from speech information to be recognized, a speech-to-text conversion operation may be performed on the speech information to be recognized to obtain text information to be recognized. After that, the text information to be recognized is input into a single sentence encoder for recognition to obtain a feature vector to be recognized corresponding to the speech information to be recognized. The single sentence encoder includes any one of CNN, Lstm, Transformer, Bert, etc.
[0061] Exemplarily, the single sentence encoder uses the pre-trained language model Bert to perform semantic learning on the text information to be recognized, and obtains the feature vector to be recognized 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:
[0062] U i = Bert(Q i ).
[0063] 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 feature vector to be recognized corresponding to "close the car window". After that, input the second text to be recognized "turn on the air conditioner" into the single sentence encoder for recognition, and obtain the feature vector to be recognized corresponding to "turn on the air conditioner".
[0064] 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.
[0065] For example, when arranging target features, the following arrangement can be used:
[0066] [a1a2a3…an].
[0067] Wherein, an represents the nth target feature, and n is an integer greater than or equal to 0.
[0068] 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.
[0069] 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.
[0070] S13. When the first score corresponding to the replacement voice information is greater than the second score corresponding to the voice information to be recognized, feature extraction is performed on the replacement voice information to obtain a replacement feature vector corresponding to the replacement voice information.
[0071] In some examples, when performing character replacement, one or more replacement voice messages may be generated. In order to ensure that the vehicle-mounted terminal can more accurately identify the content of the voice information to be recognized, the intention recognition method provided by the embodiment of the present disclosure determines whether the replacement voice information conforms to the voice information actually input by the user based on the size relationship between the first score corresponding to the replacement voice information and the second score corresponding to the voice information to be recognized. For example: in the case where the first score corresponding to the replacement voice information is greater than the second score corresponding to the voice information to be recognized, it means that the replacement voice information is more consistent with the voice information actually input by the user, so the replacement voice information can be feature extracted to obtain the replacement feature vector corresponding to the replacement voice information; or, in the case where the first score corresponding to the replacement voice information is not greater than the second score corresponding to the voice information to be recognized, it means that the replacement voice information does not conform to the voice information actually input by the user, so the voice information to be recognized can be feature extracted to obtain the feature vector to be recognized corresponding to the voice information to be recognized, and the feature vector to be recognized is used as the replacement feature vector.
[0072] Exemplarily, for example, when the voice information to be recognized is "The Spring of Kikujiro", the in-vehicle terminal extracts features from "The Spring of Kikujiro" to obtain the feature vector to be recognized corresponding to "The Spring of Kikujiro". Then, the in-vehicle terminal uses the reverse word replacement method to replace the actual characters with theoretical characters respectively to generate replacement voice information. For example, based on this feature vector to be recognized, the actual feature vector corresponding to the actual character "菊 (jú)", the actual feature vector corresponding to the actual character "次 (cì)", the actual feature vector corresponding to the actual character "郎 (láng)", the actual feature vector corresponding to the actual character "的 (de)", the actual feature vector corresponding to the actual character "春 (chūn)", and the actual feature vector corresponding to the actual character "天 (tiān)" are determined. Then, based on the actual feature vector corresponding to the actual character "天 (tiān)", the theoretical character corresponding to the actual feature vector corresponding to the actual character "天 (tiān)" is determined. When the theoretical character is "天 (tiān)", the actual character "天 (tiān)" is replaced with the theoretical character "天 (tiān)" to generate the replacement voice information "The Spring of Kikujiro". Then, the in-vehicle terminal calculates the first score corresponding to the replacement voice information ("The Spring of Kikujiro") and the second score corresponding to the voice information to be recognized ("The Spring of Kikujiro"). The in-vehicle terminal determines that the first score is equal to the second score, and the in-vehicle terminal continues to replace the next actual character. Similarly, based on the actual feature vector corresponding to the actual character "春 (chūn)", the theoretical character corresponding to the actual feature vector corresponding to the actual character "春 (chūn)" is determined. When the theoretical character is "夏 (xià)", the actual character "春 (chūn)" is replaced with the theoretical character "夏 (xià)" to generate the replacement voice information "The Summer of Kikujiro". Then, the in-vehicle terminal calculates the first score corresponding to the replacement voice information ("The Summer of Kikujiro") and the second score corresponding to the voice information to be recognized ("The Spring of Kikujiro"). The in-vehicle terminal determines that the first score is greater than the second score, and the in-vehicle terminal extracts features from "The Summer of Kikujiro" to obtain the replacement feature vector corresponding to "The Summer of Kikujiro".
[0073] It should be noted that the process of replacing any one of the actual characters "菊 (jú)", "次 (cì)", "郎 (láng)", and "的 (de)" with a theoretical character is similar to the process of replacing the actual character "天 (tiān)" with the theoretical character "天 (tiān)", and will not be elaborated here.
[0074] Exemplarily, for instance, if the voice information to be recognized is "Listen to voice", the in-vehicle terminal extracts features from "Listen to voice" to obtain the feature vector to be recognized corresponding to "Listen to voice". Then, the in-vehicle terminal adopts the reverse word replacement method to replace the actual characters with theoretical characters respectively to generate replacement voice information. For example, based on this feature vector to be recognized, it determines the actual feature vector corresponding to the actual character "Listen", the actual feature vector corresponding to the actual character "voice", and the actual feature vector corresponding to the actual character "sound". Then, based on the actual feature vector corresponding to the actual character "sound", the in-vehicle terminal determines the theoretical character corresponding to the actual feature vector corresponding to the actual character "sound". When the theoretical character is "music", it replaces the actual character "sound" with the theoretical character "music" to generate the replacement voice information "Listen to music". Then, the in-vehicle terminal calculates the first score corresponding to the replacement voice information "Listen to music" and the second score corresponding to the voice information to be recognized ("Listen to voice"). The in-vehicle terminal determines that the first score is less than the second score, and the in-vehicle terminal continues to replace the next actual character. Similarly, based on the actual feature vector corresponding to the actual character "voice", the in-vehicle terminal determines the theoretical character corresponding to the actual feature vector corresponding to the actual character "voice". When the theoretical character is "sound", it replaces the actual character "voice" with the theoretical character "sound" to generate the replacement voice information "Listen to music". Then, the in-vehicle terminal calculates the first score corresponding to the replacement voice information ("Listen to music") and the second score corresponding to the voice information to be recognized ("Listen to voice"). The in-vehicle terminal determines that the first score is greater than the second score, and the in-vehicle terminal extracts features from "Listen to music" to obtain the replacement feature vector corresponding to "Listen to music".
[0075] Alternatively, the in-vehicle terminal calculates the first score corresponding to the replacement voice information ("Listen to music") and the second score corresponding to the voice information to be recognized ("Listen to voice"). The in-vehicle terminal determines that the first score is less than the second score, and the in-vehicle terminal continues to replace the next actual character. Similarly, based on the actual feature vector corresponding to the actual character "Listen", the in-vehicle terminal determines the theoretical character corresponding to the actual feature vector corresponding to the actual character "Listen". When the theoretical character is "Listen", it replaces the actual character "Listen" with the theoretical character "Listen" to generate the replacement voice information "Listen to music". Then, the in-vehicle terminal calculates the first score corresponding to the replacement voice information ("Listen to music") and the second score corresponding to the voice information to be recognized ("Listen to voice"). The in-vehicle terminal determines that the first score is less than the second score. At this time, it indicates that all the replacement voice information does not match the voice information input by the user. Therefore, the voice information to be recognized needs to be used as the replacement voice information.
[0076] It should be noted that the process of extracting features from the replacement voice information to obtain the replacement feature vector corresponding to the replacement voice information is similar to the process of extracting features from the voice information to be recognized to obtain the feature vector to be recognized corresponding to the voice information to be recognized, and will not be elaborated here.
[0077] In some examples, when calculating the first score corresponding to the replacement speech information, the historical occurrence probabilities of one or more consecutive characters in the replacement speech information can be obtained. For example, if the replacement speech information is "ting yu le", then the first historical occurrence probability of the character "ting", the first historical occurrence probability of the character "yu", the first historical occurrence probability of the character "le", the first historical occurrence probability of the characters "ting yu", and the first historical occurrence probability of the characters "ting yu le" need to be obtained. Then, based on the first historical occurrence probability of the character "ting", the first historical occurrence probability of the character "yu", and the first historical occurrence probability of the character "le", the first score of the replacement speech information is generated. For example, the first score is equal to the product of the first historical occurrence probabilities of each character in the replacement speech information.
[0078] Alternatively, based on the first historical occurrence probability of the character "ting", the first historical occurrence probability of the characters "ting yu", and the first historical occurrence probability of the characters "ting yu le", the first score of the replacement speech information is generated. For example, substituting the first historical occurrence probability of "ting", the first historical occurrence probability of the characters "ting yu", and the first historical occurrence probability of the characters "ting yu le" into the first score formula to obtain the first score. Among them, the first score formula includes:
[0079] P N =(a1)×P(a2|a1)×……×P(a n |a1, a2, ……, a n-1 ).
[0080] Among them, P N represents the first score, N represents the total number of characters included in the replacement speech information, a n represents the nth character in the replacement speech information, P(a1) represents the historical occurrence probability of the first character in the replacement speech information, and P(a n |a1, a2, ……, a n-1 ) is equal to p(a1, a2, ……, a n ) represents the historical occurrence probability of the theoretical speech information including the first character to the nth character in the replacement speech information, and p(a1, a2, ……, a n-1 ) represents the historical occurrence probability of the theoretical speech information including the first character to the n - 1th character in the replacement speech information.
[0081] Exemplarily, assume that the replacement speech information is "Listen to music". At this time, the first historical occurrence probability of the character "Listen" is determined to be 0.2, the first historical occurrence probability of the character "Listen to" is 0.1, and the first historical occurrence probability of the character "Listen to music" is 0.01. Based on the first scoring formula, it can be known that P3 = (a1) × P(a2|a1) × P(a3|a1, a2). P(a1) is equal to 0.1, P(a2|a1) is equal to the ratio of the first historical occurrence probability of the character "Listen to" to the first historical occurrence probability of the character "Listen", and P(a3|a1, a2) is equal to the ratio of the first historical occurrence probability of the character "Listen to music" to the first historical occurrence probability of the character "Listen to music", that is
[0082] In some examples, when calculating the second score corresponding to the speech information to be recognized, the historical occurrence probability of each character in the speech information to be recognized can be obtained. For example, if the speech information to be recognized is "Listen to speech", then the second historical occurrence probability of the character "Listen", the second historical occurrence probability of the character "speech", and the second historical occurrence probability of the character "voice" need to be obtained. Then, based on the second historical occurrence probability of the character "Listen", the second historical occurrence probability of the character "speech", and the second historical occurrence probability of the character "voice", the second score of the replacement speech information is generated. For example, the second score is equal to the product of the second historical occurrence probabilities of each character in the replacement speech information. Or, substitute the second historical occurrence probability of "Listen", the second historical occurrence probability of the character "speech", and the second historical occurrence probability of the character "voice" into the second scoring formula to obtain the second score. Among them, the second scoring formula includes:
[0083]
[0084] Among them, B M represents the second score, M represents the total number of characters included in the replacement speech information, a m represents the nth character in the speech information to be recognized, and B(a m ) represents the historical occurrence probability of the mth character in the speech information to be recognized.
[0085] Exemplarily, assume that the speech information to be recognized is "Listen to speech". At this time, the second historical occurrence probability of the character "Listen" is determined to be 0.2, the second historical occurrence probability of the character "speech" is 0.1, and the second historical occurrence probability of the character "voice" is 0.02. Based on the second scoring formula, it can be known that That is
[0086] S14, performing feature fusion on the replacement feature vector and the context feature vector of the context information corresponding to the voice information to be recognized, to generate a first fused feature vector. The context information includes a preset number of historical voice information input before the voice information to be recognized.
[0087] 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 replacement feature vector are fused to generate a first fused feature vector. Alternatively, the second target matrix and the replacement feature vector are fused to generate a first fused feature vector, thereby improving the accuracy of intention recognition.
[0088] Exemplarily, the historical feature vectors may be arranged in the following manner:
[0089] [b1 b2 b3…bN].
[0090] Wherein, bN represents the Nth historical feature vector, and N is an integer greater than or equal to 0.
[0091] 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.
[0092] In some examples, since the first target matrix or the second target matrix has a different dimension from the replacement feature vector, it is necessary to convert the replacement feature vector into a vector having the same dimension as the first target matrix, or to convert the replacement 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 replacement feature vector.
[0093] Specifically, the process of converting the replacement feature vector into a vector having the same dimension as the second target matrix is similar to the process of converting the replacement feature vector into a vector having the same dimension as the first target matrix, and will not be repeated here.
[0094] 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 replacement 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 first fused feature vector. The context encoder includes any one of a temporal encoder such as Gru and Lstm.
[0095] 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:
[0096] U=[U1,U2,...,U n ];
[0097] C n =Lstm(U); C = [C1, C 52 , ..., C n ].
[0098] 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 n represents 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.
[0099] 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.
[0100] 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.
[0101] 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.
[0102] S15. Perform intent analysis on the first fused feature vector to generate an intent recognition result corresponding to the voice information to be recognized.
[0103] In some examples, the first fused feature vector can be input into the intent encoder for intent analysis to generate an 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:
[0104] I i =Intent_Module[C i ].
[0105] Among them, I i represents the intention recognition result corresponding to the first fused feature vector input within the preset time, C i It represents the first fused feature vector corresponding to the i-th voice information to be recognized input within a preset time, and Intent_Model() represents the intent encoder.
[0106] As can be seen from the above, the intention recognition method provided by the present disclosure can find replacement voice information that is more in line with the needs of the user by replacing characters in the voice information to be recognized. In this way, when analyzing the user's intention, the user's intention can be better understood because of the introduction of contextual information. Afterwards, the intention recognition result corresponding to the voice information to be recognized is generated by performing intention analysis on the first fused feature vector. Since the first fused feature vector contains the contextual information of the voice information to be recognized, and at the same time corrects the pronunciation errors and / or spelling errors in the voice information to be recognized, the information used to represent the user's intention in the first fused feature vector can be greatly improved. In this way, when performing intention analysis on the first fused feature vector, since the information used to represent the user's intention in the first fused feature vector is more accurate, the recognition accuracy of the intention can be improved to ensure the user experience.
[0107] 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-S122.
[0108] S120: Obtain an actual feature vector corresponding to each actual character in the voice information to be recognized.
[0109] S121. Based on the actual feature vector, determine the theoretical character corresponding to the actual feature vector.
[0110] S122. Replace the actual characters with theoretical characters respectively to generate replacement voice information.
[0111] In some feasible examples, in combination with Figure 2 , such as Figure 3 shown, the above S121 can be specifically implemented by the following S1210.
[0112] S1210. Query in a preset entity word library based on the actual feature vector. When it is determined that there is a preset vector matching the actual feature vector in the preset entity word library, use the preset character corresponding to the preset vector as the theoretical character corresponding to the actual feature vector.
[0113] 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 the preset voice information of the preset entity words spoken by the user with different accents, and the preset feature vectors corresponding to the preset voice information (obtained by extracting features from the preset voice information). Then, by querying in the preset entity word library storing the preset entity words for the preset feature vector matching the actual feature vector, it is determined whether there is an error in the actual feature vector. For example, when the actual feature vector is "chong", the in-vehicle terminal will query in the preset entity word library whether there is a preset feature vector matching the actual feature vector of "chong". If it is determined that the preset feature vector matching the actual feature vector of "chong" is the theoretical character "chun", then replace the actual character "chong" with the theoretical character "chun".
[0114] Or, when the actual feature vector is "chong", the in-vehicle terminal will query in the preset entity word library whether there is a preset feature vector matching the actual feature vector of "chong". If it is determined that there is no preset feature vector matching the actual feature vector of "chong" in the preset entity word library (for example: cannot find a preset feature vector identical to the to-be-recognized feature vector of "chong"), at this time, use the "chong" corresponding to the actual feature vector as the theoretical character corresponding to the actual feature vector.
[0115] In some feasible examples, in combination with Figure 3 , such as Figure 4 shown, the intent recognition method provided by the embodiments of the present disclosure further includes S16 and S17.
[0116] S16. Obtain the entity features corresponding to the entity words in the dialect dictionary and the pinyin features corresponding to the entity words.
[0117] S17. Generate a preset entity word library based on the corresponding relationship between the entity features and the pinyin features.
[0118] In some feasible examples, in combination with Figure 2 , such as Figure 5As shown, the above S121 can be specifically implemented through the following S1211.
[0119] S1211. Searching in a preset entity vocabulary based on the actual feature vector, when it is determined that there is no preset vector matching the actual feature vector, determining that the theoretical character corresponding to the actual feature vector is the actual character corresponding to the actual feature vector.
[0120] 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 S18 and S19.
[0121] S18. In the case where there is no first score corresponding to the replacement voice information greater than the second score corresponding to the voice information to be recognized, feature fusion is performed on the feature vector to be recognized corresponding to the voice information to be recognized and the context feature vector of the context information corresponding to the voice information to be recognized to generate a second fused feature vector. The context information includes a preset number of historical voice information input before the voice information to be recognized.
[0122] It should be noted that the process of generating a second fused feature vector by performing feature fusion of the feature vector to be recognized corresponding to the voice information to be recognized and the context feature vector of the context information corresponding to the voice information to be recognized is similar to the process of generating a first fused feature vector by performing feature fusion of the replacement feature vector and the context feature vector of the context information corresponding to the voice information to be recognized, and will not be repeated here.
[0123] S19. Perform intent analysis on the second fused feature vector to generate an intent recognition result corresponding to the voice information to be recognized.
[0124] In some possible implementation examples, combined with Figure 1 ,like Figure 6 As shown, the intention recognition method provided by the embodiment of the present disclosure also includes S18-S20.
[0125] S18, obtaining a first historical occurrence probability of one or more consecutive characters in the replacement voice information, and a second historical occurrence probability of each character in the voice information to be recognized.
[0126] S19. Generate a first score based on the first historical occurrence probability.
[0127] S20. Generate a second score based on the second historical occurrence probability.
[0128] 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.
[0129] 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.
[0130] like Figure 7 , 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 .
[0131] The acquisition unit 101 voice acquires voice information to be recognized; the processing unit 102 voice replaces each actual character in the voice information to be recognized acquired by the acquisition unit 101 to generate replacement voice information; the processing unit 102 is also used to extract features of the replacement voice information when a first score corresponding to the replacement voice information is greater than a second score corresponding to the voice information to be recognized, so as to obtain a replacement feature vector corresponding to the replacement voice information; the processing unit 102 is also used to perform feature fusion on the replacement feature vector and a context feature vector of the context information corresponding to the voice information to be recognized acquired by the acquisition unit 101 to generate a first 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 first fused feature vector to generate an intent recognition result corresponding to the voice information to be recognized.
[0132] In some implementable examples, the acquisition unit 101 is specifically used to obtain the actual feature vector corresponding to each actual character in the voice information to be recognized; the processing unit 102 is specifically used to determine the theoretical character corresponding to the actual feature vector based on the actual feature vector obtained by the acquisition unit 101; the processing unit 102 is specifically used to replace the actual characters with the theoretical characters respectively to generate replacement voice information.
[0133] In some feasible examples, the processing unit 102 is specifically used to query in a preset entity vocabulary based on the actual feature vector, and when it is determined that there is a preset vector matching the actual feature vector, use the preset character corresponding to the preset vector as the theoretical character corresponding to the actual feature vector.
[0134] 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.
[0135] In some feasible examples, the processing unit 102 is specifically used to query in a preset entity vocabulary based on the actual feature vector, and when it is determined that there is no preset vector matching the actual feature vector, determine that the theoretical character corresponding to the actual feature vector is the actual character corresponding to the actual feature vector.
[0136] In some feasible examples, the processing unit 102 is further used to perform feature fusion on the feature vector to be recognized corresponding to the voice information to be recognized acquired by the acquisition unit 101 and the context feature vector of the context information corresponding to the voice information to be recognized, so as to generate a second fused feature vector, in the absence of a first score corresponding to the replacement voice information being greater than a second score corresponding to the voice information to be recognized; 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 further used to perform intent analysis on the second fused feature vector and generate an intent recognition result corresponding to the voice information to be recognized.
[0137] In some feasible examples, the acquisition unit 101 is also used to obtain the first historical occurrence probability of replacing one or more consecutive characters in the voice information, and the second historical occurrence probability of each character in the voice information to be recognized; the processing unit 102 is also used to generate a first score based on the first historical occurrence probability obtained by the acquisition unit; the processing unit 102 is also used to generate a second score based on the second historical occurrence probability obtained by the acquisition unit.
[0138] 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.
[0139] 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.
[0140] Figure 8 A schematic diagram of the structure of a vehicle-mounted terminal provided in an embodiment of the present disclosure is shown in FIG. Figure 8 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 .
[0141] Combine the following Figure 8 The following is a detailed introduction to the various components of the vehicle terminal:
[0142] 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).
[0143] In a specific implementation, as an embodiment, the processor 51 may include one or more CPUs, such as Figure 8 Also, as an embodiment, the electronic device may include multiple processors, such as Figure 8 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).
[0144] 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.
[0145] 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.
[0146] 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.
[0147] 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 8 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.
[0148] As an example, combine Figure 7The function implemented by the acquisition unit 101 in the intention recognition device 10 is similar to Figure 8 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 8 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 8 The function of the memory 52 in is the same.
[0149] 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.
[0150] 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.
[0151] Fig. 9 A 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.
[0152] 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-S15 can be undertaken by one or more instructions associated with the signal bearing medium 410. In addition, Fig. 9 The program instructions in also describe example instructions.
[0153] 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.
[0154] 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.
[0155] 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.).
[0156] 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.
[0157] In some examples, such as for Figure 7 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.
[0158] 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.
[0159] 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.
[0160] 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.
[0161] 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.
[0162] 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.
[0163] 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; Replacing each actual character in the voice information to be recognized to generate replacement voice information; In the case where the first score corresponding to the replacement voice information is greater than the second score corresponding to the voice information to be recognized, feature extraction is performed on the replacement voice information to obtain a replacement feature vector corresponding to the replacement voice information; Performing feature fusion on the replacement feature vector and the context feature vector of the context information corresponding to the voice information to be recognized, to generate a first fused feature vector; wherein the context information includes a preset number of historical voice information input before the voice information to be recognized; Perform intent analysis on the first 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 step of replacing each actual character in the to-be-recognized voice information to generate the replaced voice information comprises: Obtaining an actual feature vector corresponding to each actual character in the speech information to be recognized; Based on the actual feature vector, determining a theoretical character corresponding to the actual feature vector; The actual characters are replaced with the theoretical characters respectively to generate replacement voice information.
3. The method for identifying intention according to claim 2, characterized in that: The step of determining the theoretical character corresponding to the actual feature vector based on the actual feature vector includes: A query is performed in a preset entity word library based on the actual feature vector, and when it is determined that there is a preset vector matching the actual feature vector, a preset character corresponding to the preset vector is used as a theoretical character corresponding to the actual feature vector.
4. The method for intention recognition according to claim 3, characterized in that: The method further comprises: searching in a preset entity word library based on the actual feature vector, and when it is determined that there is a preset vector matching the actual feature vector, taking a preset character corresponding to the preset vector as a theoretical character corresponding to the actual feature vector, 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.
5. The method for identifying intention according to claim 2, characterized in that: The step of determining the theoretical character corresponding to the actual feature vector based on the actual feature vector includes: Based on the actual feature vector, a query is performed in a preset entity word library. When it is determined that there is no preset vector matching the actual feature vector, the theoretical character corresponding to the actual feature vector is determined to be the actual character corresponding to the actual feature vector.
6. The method for identifying intention according to claim 1, characterized in that: The method further comprises: In the absence of a situation where the first score corresponding to the replacement voice information is greater than the second score corresponding to the voice information to be recognized, feature fusion is performed on the feature vector to be recognized corresponding to the voice information to be recognized and the context feature vector of the context information corresponding to the voice information to be recognized to generate a second fused feature vector; wherein the context information includes a preset number of historical voice information input before the voice information to be recognized; Perform intent analysis on the second fused feature vector to generate an intent recognition result corresponding to the voice information to be recognized.
7. The method for intention recognition according to claim 1, characterized in that: In the case where the first score corresponding to the replacement voice information is greater than the second score corresponding to the voice information to be recognized, before extracting features from the replacement voice information to obtain a replacement feature vector corresponding to the replacement voice information, the method further includes: Acquire a first historical occurrence probability of one or more consecutive characters in the replacement voice information, and a second historical occurrence probability of each character in the voice information to be recognized; generating a first score based on the first historical occurrence probability; Based on the second historical occurrence probability, a second score is generated.
8. An intention recognition device, characterized in that: include: An acquisition unit, voice acquisition of voice information to be recognized; A processing unit, voice-replacing each actual character in the voice information to be recognized acquired by the acquisition unit, to generate replaced voice information; The processing unit is further configured to perform feature extraction on the replacement voice information to obtain a replacement feature vector corresponding to the replacement voice information when the first score corresponding to the replacement voice information is greater than the second score corresponding to the voice information to be recognized; The processing unit is further configured to perform feature fusion on the replacement 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 first 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 used to perform intent analysis on the first fused feature vector to generate an intent recognition result corresponding to the voice information to be recognized.
9. 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 7 when executing the computer program.
10. 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 to 7.
11. A vehicle, characterized in that: Includes the intention recognition device as described in claim 8, or the electronic device as described in claim 9.
Citation Information
Cited By
Man-machine conversation method and system of digital energy-saving pump
CN119811376A
