Multi-intention recognition method, device, equipment and medium
By constructing the intent matrix of user voice and performing random sampling and matching, the problem of difficulty in identifying multiple intents is solved, and a higher intent recognition accuracy is achieved.
Patent Information
- Application Number
- CN202111389106.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-22
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2041-11-22
AI Technical Summary
The existing intention recognition technology is mainly single intention recognition, and it is difficult to identify multiple intentions in the user's corpus, resulting in inaccurate recognition results.
By obtaining the audio characteristics and speech text of the user's voice, a matrix of intention is constructed, and the elements in the matrix are randomly sampled several times to obtain multiple subset matrices. These subset matrices are then matched with preset multiple intent tags to determine multiple intents for user voice.
It improves the accuracy of intention recognition, can effectively identify multiple intentions in user voice, and avoids the incomplete analysis results caused by feature interactions in the matrix.
Smart Images

Figure CN114153956B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of audio analysis, and in particular to a multi-intention recognition method, device, electronic device and computer-readable storage medium. Background Art
[0002] With the continuous development of artificial intelligence technology, more and more smart products are applied to daily life, such as smart speakers, smart customer service, smart telephone sales, personal mobile assistant Siri, etc. In order to enable smart products to better understand user expressions and then give correct answers to user questions, natural language understanding (NLU) plays an important role, and intent recognition is a submodule of natural language understanding and the key to the intelligent dialogue system.
[0003] Existing intent recognition is mainly single-intent recognition, that is, a single user intent is recognized based on user corpus. However, in many cases, a sentence expressed by a user contains not only one intent, but multiple intents. If only single-intent recognition is performed, the recognition result will be inaccurate. For example, a user says, "I don't like the cakes at the dessert shop on the corner, they are too sweet." This sentence simultaneously expresses the user's intention of not liking the dessert shop on the corner and being dissatisfied with the sweetness of the cakes in the dessert shop. Therefore, how to realize the recognition of multiple intents in user corpus has become an urgent problem to be solved. Summary of the invention
[0004] The present application provides a multi-intent recognition method, device, electronic device and storage medium to solve the problem that it is difficult to recognize multiple intents when performing intent recognition.
[0005] In a first aspect, the present application provides a multi-intent recognition method, the method comprising:
[0006] Acquire user voice, extract audio features of the user voice, and acquire voice text corresponding to the user voice;
[0007] Constructing an intention matrix of the user's voice according to the voice text and the audio features;
[0008] Performing multiple random sampling on elements in the intention matrix to obtain multiple subset matrices of the intention matrix;
[0009] Each subset matrix of the multiple subset matrices is matched with a plurality of preset intent labels, and the plurality of intents of the user voice are determined according to the matching results.
[0010] In detail, the extracting the audio features of the user's voice includes:
[0011] Performing frame division and windowing on the user speech to obtain a plurality of speech frames, and selecting one of the speech frames as a target speech frame one by one from the plurality of speech frames;
[0012] Mapping the target speech frame into a speech time domain graph, counting the peak value, amplitude, mean value and zero-crossing rate of the speech time domain graph, calculating frame energy according to the amplitude, and aggregating the peak value, the amplitude, the mean value, the frame energy and the zero-crossing rate as time domain features;
[0013] The user speech is converted into a spectral domain graph by using a preset filter, and the spectral domain density, spectral entropy and formant parameters of the spectral domain graph are counted to obtain cepstrum domain features;
[0014] The spectral domain image is converted into a cepstrum domain image by inverse Fourier transform, and the cepstrum domain density, cepstrum entropy and cepstrum period of the cepstrum domain image are counted to obtain the cepstrum domain features;
[0015] The time domain features, the spectral domain features and the cepstrum domain features are aggregated into speech features.
[0016] In detail, constructing the intention matrix of the user's voice according to the voice text and the audio features includes:
[0017] Splitting the speech text into text segmentation, and converting the text segmentation into word vectors;
[0018] Construct an intention matrix of the user speech according to the audio features and the word vector.
[0019] In detail, the step of splitting the speech text into text segmentation and converting the text segmentation into word vectors includes:
[0020] Deleting meaningless words in the speech text to obtain a standard text;
[0021] Searching the standard text in a preset standard dictionary according to different lengths, and collecting the contents that can be searched in the standard dictionary into text segmentation;
[0022] Querying the word vector of each word in the text segmentation from a preset word vector table;
[0023] The word vectors are concatenated into a word vector of the text word segmentation according to the order of each word in the text word segmentation.
[0024] In detail, constructing the intention matrix of the user voice according to the audio features and the word vector includes:
[0025] Converting the audio features into audio vectors;
[0026] The audio vector and the word vector are written into a pre-constructed blank matrix to obtain the intention matrix.
[0027] In detail, after randomly sampling the elements in the intent matrix multiple times to obtain multiple subset matrices of the intent matrix, the method further includes:
[0028] Determining whether the number of the subset matrices reaches a preset threshold;
[0029] If the number of the subset matrices does not reach the preset threshold, the process returns to and executes the step of performing multiple random sampling on the elements in the intention matrix again.
[0030] In detail, the matching of each subset matrix in the plurality of subset matrices with a plurality of preset intent labels to obtain a plurality of intents of the user voice includes:
[0031] Selecting one of the matrices from the plurality of subset matrices one by one as a target matrix;
[0032] Calculate the distance values between the target matrix and the preset multiple intent labels respectively by using a preset distance algorithm;
[0033] Determine the intention label with the smallest distance value as the user intention of the target matrix;
[0034] The user intentions corresponding to all subset matrices are collected to obtain multiple intentions of the user voice.
[0035] In a second aspect, the present application provides a multi-intent recognition device, the device comprising:
[0036] A data acquisition module, used to acquire user voice, extract audio features of the user voice, and acquire voice text corresponding to the user voice;
[0037] A matrix construction module, used to construct an intention matrix of the user's voice according to the voice text and the audio features;
[0038] A matrix sampling module, used for performing multiple random sampling on the elements in the intent matrix to obtain multiple subset matrices of the intent matrix;
[0039] An intention matching module is used to match each subset matrix of the multiple subset matrices with a preset multiple intention labels, and determine the multiple intentions of the user voice according to the matching results.
[0040] In a third aspect, an electronic device is provided, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0041] Memory, used to store computer programs;
[0042] The processor is used to implement the steps of the multi-intention recognition method described in any embodiment of the first aspect when executing the program stored in the memory.
[0043] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the multi-intention recognition method as described in any embodiment of the first aspect are implemented.
[0044] The above technical solution provided by the embodiment of the present application has the following advantages compared with the prior art:
[0045] The method provided in the embodiment of the present application can construct an intent matrix by combining the audio features of the user's voice with the text content to improve the accuracy of intent recognition; at the same time, the intent matrix is sampled to obtain multiple subset matrices, and the user's different intentions are matched according to each subset matrix, so as to avoid the interaction between the numerous features in the matrix having a significant impact on the analysis results, resulting in the analysis results being not comprehensive enough, and realizes multi-intent recognition of the user's voice, which can solve the problem of difficulty in identifying multiple intentions when performing intent recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0047] In order to more clearly illustrate the embodiments of the present application 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.
[0048] Figure 1 A flowchart of a multi-intent recognition method provided in an embodiment of the present application;
[0049] Figure 2 A schematic diagram of a process for splitting speech text into text segmentation and converting them into word vectors provided in an embodiment of the present application;
[0050] Figure 3 A schematic diagram of a flow chart of matching each subset matrix of multiple subset matrices with preset multiple intent labels provided in an embodiment of the present application;
[0051] Figure 4 A schematic diagram of a module of a multi-intent recognition device provided in an embodiment of the present application;
[0052] Figure 5A schematic diagram of the structure of an electronic device for a multi-intent recognition method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0053] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0054] Figure 1 A flowchart of a multi-intent recognition method provided in an embodiment of the present application. In this embodiment, the multi-intent recognition method includes:
[0055] S1. Acquire user voice, extract audio features of the user voice, and acquire voice text corresponding to the user voice.
[0056] In one of the practical application scenarios of the present application, the user voice is the recorded audio of the user captured by a preset client device (mobile phone, microphone, recorder, etc.).
[0057] In detail, in order to achieve accurate intention analysis of the user's voice, the audio features of the user's voice can be extracted, wherein the audio features include time domain features, spectral domain features, and cepstrum domain features.
[0058] In the embodiment of the present application, the extracting the audio features of the user's voice includes:
[0059] Performing frame division and windowing on the user speech to obtain a plurality of speech frames, and selecting one of the speech frames as a target speech frame one by one from the plurality of speech frames;
[0060] Mapping the target speech frame into a speech time domain graph, counting the peak value, amplitude, mean value and zero-crossing rate of the speech time domain graph, calculating frame energy according to the amplitude, and aggregating the peak value, the amplitude, the mean value, the frame energy and the zero-crossing rate as time domain features;
[0061] The user speech is converted into a spectral domain graph by using a preset filter, and the spectral domain density, spectral entropy and formant parameters of the spectral domain graph are counted to obtain cepstrum domain features;
[0062] The spectral domain image is converted into a cepstrum domain image by inverse Fourier transform, and the cepstrum domain density, cepstrum entropy and cepstrum period of the cepstrum domain image are counted to obtain the cepstrum domain features;
[0063] The time domain features, the spectral domain features and the cepstrum domain features are aggregated into speech features.
[0064] In detail, the user voice can be framed and windowed by a Hamming window to obtain multiple voice frames, which can utilize the local stability of the signal and improve the accuracy of analyzing the user voice.
[0065] Specifically, the pcolormesh function (preset first function) in the matplotlib.pyplot package can be used to map the target speech frame into a speech time domain graph, and through mathematical statistics, the peak value, amplitude mean and zero-crossing rate of the speech time domain graph can be obtained, and then the frame energy can be calculated according to the amplitude.
[0066] Exemplarily, the frame energy may be calculated using the following energy algorithm:
[0067]
[0068] Among them, energy y is the frame energy of the yth speech frame, N is the total duration of the yth speech frame, x n is the amplitude of the yth speech frame at time n.
[0069] In an embodiment of the present application, a preset filter can be used to convert the user voice into a spectral domain graph (i.e., a frequency spectrum graph), and through mathematical statistics, spectral domain characteristics such as cepstrum domain density, cepstrum entropy and cepstrum period of the cepstrum domain graph can be obtained. The preset filters include but are not limited to PE filters and DouMax filters.
[0070] In detail, since the acquired user voice may be coupled with a variety of background noise audios, when the user voice is analyzed, the background noise audio will interfere with the analysis results, resulting in the accuracy of the analysis results. Therefore, in order to improve the accuracy of the final intent recognition, the embodiment of the present application converts the spectral domain graph into a cepstrum domain graph through an inverse Fourier transform, separates the multiple audio signals coupled into the user voice, thereby improving the accuracy of intent recognition.
[0071] In other embodiments of the present application, the PyAudio Analysis toolkit in the python library may also be used to process the user voice to obtain the time domain features, spectral domain features and cepstrum domain features in the user voice.
[0072] Furthermore, since the extracted speech features are obtained based on the time domain, spectral domain and cepstral domain analysis of the user speech, only the acoustic features of the sound when the user generates the user speech are analyzed, and the content of the user speech is not analyzed. Therefore, the embodiment of the present invention recognizes the speech text of the user speech and analyzes the speech text.
[0073] In the embodiment of the present application, the content of the user's voice can be recognized by automatic speech recognition (ASR) technology to obtain a voice text corresponding to the user's voice.
[0074] In other embodiments of the present application, an acoustic model can also be used to perform speech recognition on the user voice to obtain speech text. The acoustic model models the pronunciation of each word to establish a database containing multiple words and the standard pronunciation corresponding to each word, and collects the user's voice at each moment in the user voice to obtain the user's voice at each moment, and then probabilistically matches the voice with the words in the pre-constructed database containing multiple words and the standard pronunciation corresponding to each word, so as to realize speech recognition of the user voice and obtain speech text.
[0075] S2. Construct an intention matrix of the user's voice according to the voice text and the audio features.
[0076] In the embodiment of the present application, constructing the intention matrix of the user voice according to the voice text and the audio features includes:
[0077] Splitting the speech text into text segmentation, and converting the text segmentation into word vectors;
[0078] Construct an intention matrix of the user speech according to the audio features and the word vector.
[0079] In detail, since the speech text is composed of natural language, if the speech text is directly analyzed, it will take up a lot of computing resources, resulting in low analysis efficiency. Therefore, the speech text can be split into text segmentation, and the text segmentation can be converted into word vectors, thereby realizing the conversion of the speech text expressed in natural language into numerical form.
[0080] In the present application examples, Figure 2 As shown, the speech text is split into text segmentation and the text segmentation is converted into word vectors, including:
[0081] S21, deleting meaningless words in the speech text to obtain a standard text;
[0082] S22, searching the standard text in a preset standard dictionary according to different lengths, and collecting the contents that can be searched in the standard dictionary into text segmentation;
[0083] S23, querying the word vector of each word in the text segmentation from a preset word vector table;
[0084] S24. Concatenate the word vectors into a word vector of the text word segmentation according to the order of each word in the text word segmentation.
[0085] In detail, the deletion of nonsense words in the speech text means deleting words that have no actual meaning in the speech text, such as conjunctions, modal particles, structural auxiliary words, etc. By deleting nonsense words in the speech text, the interference of nonsense words when performing text segmentation extraction on the speech text can be reduced, which is beneficial to improving the accuracy of the extracted text segmentation.
[0086] Specifically, the standard dictionary contains a plurality of standard segmentations, and the speech text is searched in the standard dictionary according to different lengths. If the same standard segmentation can be retrieved, the retrieved standard segmentation can be determined as the text segmentation of the speech text.
[0087] Furthermore, the word vector table contains multiple characters and a word vector corresponding to each character. The word vector corresponding to each character can be obtained by searching each character of the text segmentation in the word vector table, and the word vectors are spliced into the word vector of the text segmentation according to the order of each character in the text segmentation, wherein the word vector table is similar to the standard dictionary, and is a pre-constructed data table containing word vectors corresponding to multiple single characters.
[0088] For example, the text segmentation includes three characters "youth", and the three characters are queried in the character vector table respectively, and the character vector corresponding to the character "green" is {A}, the character vector corresponding to the character "young" is {B}, and the character vector corresponding to the character "year" is {C}. Then, according to the order of the three characters in the text segmentation "youth", the three character vectors can be spliced into the word vector of the text segmentation: {ABC}.
[0089] In other embodiments of the present invention, models with word vector conversion functions such as word2vec model, NLP (Natural Language Processing) model, and BERT model can also be used to convert the text word segmentation into word vectors respectively.
[0090] In one of the actual application scenarios of the present application, since the user voice may contain multiple user intentions, in order to recognize all intentions in the user voice, the intention matrix of the user voice can be constructed based on the audio features and the word vectors, and then the matrix can be used to perform local analysis of the user voice to identify different intentions of the user.
[0091] In the embodiment of the present application, constructing the intention matrix of the user voice according to the audio features and the word vector includes:
[0092] Converting the audio features into audio vectors;
[0093] The audio vector and the word vector are written into a pre-constructed blank matrix to obtain the intention matrix.
[0094] In detail, the scipy toolkit may be used to perform vector conversion on the audio feature to obtain an audio vector of the audio feature.
[0095] Specifically, the blank matrix is a matrix whose elements are all 0, and a blank matrix with m rows and n columns can be created by using the B=zeros(m,n) function in the R language library.
[0096] In an embodiment of the present application, the audio vector of the audio feature and the word vector can be written into the blank matrix one by one in the form of row vectors to obtain an intention matrix including the audio vector and the word vector.
[0097] S3. Perform random sampling of elements in the intention matrix multiple times according to a preset number to obtain multiple subset matrices of the intention matrix.
[0098] In one of the actual application scenarios of the present application, since the intent matrix contains multiple audio vectors and word vectors, if the intention of the user's voice is analyzed directly based on the intent matrix, the mutual influence between the numerous features in the matrix will have a greater impact on the analysis results, resulting in the analysis results being not comprehensive enough and unable to analyze the user's multiple intentions separately, which in turn results in low accuracy of the intent analysis.
[0099] Therefore, in an embodiment of the present invention, the elements in the intent matrix are randomly sampled multiple times according to a preset number to obtain multiple subset matrices of the intent matrix, thereby avoiding mutual influence among numerous features, improving the comprehensiveness of the analysis, and being able to analyze multiple intentions of the user.
[0100] In the present application examples, Figure 3As shown, the elements in the intention matrix are randomly sampled multiple times according to a preset number to obtain multiple subset matrices of the intention matrix, that is, the elements in the intention matrix are randomly sampled according to a preset number, and the sampled elements are aggregated into subset matrices of the intention matrix.
[0101] Furthermore, after randomly sampling the elements in the intent matrix multiple times to obtain multiple subset matrices of the intent matrix, the method further includes:
[0102] Determining whether the number of the subset matrices reaches a preset threshold;
[0103] If the number of the subset matrices does not reach the preset threshold, the process returns to and executes the step of performing multiple random sampling on the elements in the intention matrix again.
[0104] For example, the intention matrix includes 100 elements. When the preset number is 20, 20 elements are randomly collected from the intention matrix, and the collected 20 elements are aggregated into a subset matrix of the intention matrix; it is determined whether the number (1) of the subset matrices is equal to the preset threshold (2). It can be seen that if the number (1) of the subset matrices is not equal to the preset threshold (2), the 20 elements in the intention matrix are resampled and the sampling results are aggregated into another subset matrix of the intention matrix. At this time, the number (2) of the subset matrices is not equal to the preset threshold (2). The two obtained subset matrices are aggregated to obtain multiple subset matrices of the intention matrix.
[0105] In the embodiment of the present application, by determining whether the number of subset matrices reaches a preset threshold, a limited number of sampling can be achieved to avoid an excessive number of subset matrices, which would result in excessive computational complexity in subsequent analysis and reduce analysis efficiency.
[0106] S4. Match each subset matrix of the multiple subset matrices with a preset plurality of intent labels, and determine the plurality of intents of the user voice according to the matching results.
[0107] In an embodiment of the present application, each subset matrix of the multiple subset matrices can be matched separately with a preset plurality of intent labels, so as to further identify the intent label corresponding to each subset matrix based on the matching results, thereby determining the plurality of intents contained in the user voice.
[0108] In the present application examples, Figure 3 As shown, each subset matrix in the multiple subset matrices is matched with a preset multiple intent labels to obtain multiple intents of the user voice, including:
[0109] S31, selecting one of the matrices from the plurality of subset matrices as a target matrix one by one;
[0110] S32, using a preset distance algorithm to respectively calculate the distance values between the target matrix and a plurality of preset intent labels;
[0111] S33, determining the intention label with the smallest distance value as the user intention of the target matrix;
[0112] S34. Gather the user intentions corresponding to all subset matrices to obtain multiple intentions of the user voice.
[0113] In detail, the using of a preset distance algorithm to respectively calculate the distance values between the target matrix and the preset multiple intent labels includes:
[0114] The following distance algorithms are used to calculate the distance values between the target matrix and the preset multiple intent labels:
[0115]
[0116] Where D is the distance value, a is the target matrix, b i It is the i-th intent label among the preset multiple intent labels.
[0117] The method provided in the embodiment of the present application can construct an intent matrix by combining the audio features of the user's voice with the text content to improve the accuracy of intent recognition; at the same time, the intent matrix is sampled to obtain multiple subset matrices, and the user intent is matched according to each subset matrix respectively, so as to avoid the interaction between the numerous features in the matrix having a significant impact on the analysis results, resulting in the analysis results being not comprehensive enough, and realizes multi-intent recognition of user voice, which can solve the problem of difficulty in identifying multiple intents when performing intent recognition.
[0118] like Figure 4 As shown, an embodiment of the present application provides a module schematic diagram of a multi-intention recognition device 10, wherein the multi-intention recognition device 10 includes: a data acquisition module 11, a matrix construction module 12, a matrix sampling module 13 and an intention matching module 14.
[0119] The data acquisition module 101 is used to acquire user voice, extract audio features of the user voice, and acquire voice text corresponding to the user voice;
[0120] The matrix construction module 102 is used to construct the intention matrix of the user speech according to the speech text and the audio features;
[0121] The matrix sampling module 103 is used to perform multiple random sampling on the elements in the intent matrix to obtain multiple subset matrices of the intent matrix;
[0122] The intention matching module 104 is used to match each subset matrix of the multiple subset matrices with a plurality of preset intention labels, and determine the plurality of intentions of the user voice according to the matching results.
[0123] In detail, each module described in the multi-intention recognition device 10 described in the embodiment of the present application is used in the same manner as described above. Figures 1 to 3 The multi-intention recognition method described in the invention has the same technical means and can produce the same technical effects, so it will not be repeated here.
[0124] like Figure 5 As shown, an embodiment of the present application provides an electronic device, including a processor 111, a communication interface 112, a memory 113 and a communication bus 114, wherein the processor 111, the communication interface 112, and the memory 113 communicate with each other through the communication bus 114;
[0125] Memory 113, used for storing computer programs;
[0126] In one embodiment of the present application, the processor 111 is used to execute the program stored in the memory 113 to implement the multi-intent recognition method provided by any of the aforementioned method embodiments, including:
[0127] Acquire user voice, extract audio features of the user voice, and acquire voice text corresponding to the user voice;
[0128] Constructing an intention matrix of the user's voice according to the voice text and the audio features;
[0129] Performing multiple random sampling on elements in the intention matrix to obtain multiple subset matrices of the intention matrix;
[0130] Each subset matrix of the multiple subset matrices is matched with a plurality of preset intent labels, and the plurality of intents of the user voice are determined according to the matching results.
[0131] An embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the multi-intention recognition method provided in any of the aforementioned method embodiments are implemented.
[0132] 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.
[0133] The above description is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest range consistent with the principles and novel features applied for herein.
Claims
1. A multi-intention recognition method, characterized in that: The method comprises: Acquire user voice, extract audio features of the user voice, and acquire voice text corresponding to the user voice; Constructing an intention matrix of the user's voice according to the voice text and the audio features; Performing multiple random sampling on elements in the intention matrix to obtain multiple subset matrices of the intention matrix; Match each subset matrix in the multiple subset matrices with multiple preset intention labels, and determine multiple intentions of the user voice according to the matching results, including: selecting one of the matrices from the multiple subset matrices as the target matrix one by one; using a preset distance algorithm to respectively calculate the distance values between the target matrix and the preset multiple intention labels; determining the intention label with the smallest distance value as the user intention of the target matrix; collecting the user intentions corresponding to all subset matrices to obtain multiple intentions of the user voice; wherein, using a preset distance algorithm to respectively calculate the distance values between the target matrix and the preset multiple intention labels includes: using the following distance algorithm to respectively calculate the distance values between the target matrix and the preset multiple intention labels: Wherein, D is the distance value, a is the target matrix, and bi is the i-th intent label among the preset multiple intent labels.
2. The multi-intention recognition method according to claim 1, characterized in that: The extracting the audio features of the user's voice includes: Performing frame division and windowing on the user speech to obtain a plurality of speech frames, and selecting one of the speech frames as a target speech frame one by one from the plurality of speech frames; Mapping the target speech frame into a speech time domain graph, counting the peak value, amplitude, mean value and zero-crossing rate of the speech time domain graph, calculating frame energy according to the amplitude, and aggregating the peak value, the amplitude, the mean value, the frame energy and the zero-crossing rate as time domain features; The user speech is converted into a spectral domain graph by using a preset filter, and the spectral domain density, spectral entropy and formant parameters of the spectral domain graph are counted to obtain cepstrum domain features; The spectral domain image is converted into a cepstrum domain image by inverse Fourier transform, and the cepstrum domain density, cepstrum entropy and cepstrum period of the cepstrum domain image are counted to obtain the cepstrum domain features; The time domain features, the spectral domain features and the cepstrum domain features are aggregated into speech features.
3. The multi-intention recognition method according to claim 1, characterized in that: The constructing the intention matrix of the user speech according to the speech text and the audio features includes: Splitting the speech text into text segmentation, and converting the text segmentation into word vectors; Construct an intention matrix of the user speech according to the audio features and the word vector.
4. The multi-intention recognition method according to claim 3, characterized in that: The step of splitting the speech text into text segmentation words and converting the text segmentation words into word vectors includes: Deleting meaningless words in the speech text to obtain a standard text; Searching the standard text in a preset standard dictionary according to different lengths, and collecting the contents that can be searched in the standard dictionary into text segmentation; Querying the word vector of each word in the text segmentation from a preset word vector table; The word vectors are concatenated into a word vector of the text word segmentation according to the order of each word in the text word segmentation.
5. The multi-intention recognition method according to claim 3, characterized in that: The constructing the intention matrix of the user speech according to the audio features and the word vectors includes: Converting the audio features into audio vectors; The audio vector and the word vector are written into a pre-constructed blank matrix to obtain the intention matrix.
6. The multi-intention recognition method according to claim 1, characterized in that: After performing multiple random sampling on the elements in the intent matrix to obtain multiple subset matrices of the intent matrix, the method further includes: Determining whether the number of the subset matrices reaches a preset threshold; If the number of the subset matrices does not reach the preset threshold, the process returns to and executes the step of performing multiple random sampling on the elements in the intention matrix again.
7. A multi-intention recognition device, characterized in that: The device comprises: A data acquisition module, used to acquire user voice, extract audio features of the user voice, and acquire voice text corresponding to the user voice; A matrix construction module, used to construct an intention matrix of the user's voice according to the voice text and the audio features; A matrix sampling module, used for performing multiple random sampling on the elements in the intent matrix to obtain multiple subset matrices of the intent matrix; An intention matching module is used to match each subset matrix of the multiple subset matrices with a preset plurality of intention labels, and determine the multiple intentions of the user voice according to the matching results, including: selecting one of the matrices from the multiple subset matrices as a target matrix one by one; using a preset distance algorithm to respectively calculate the distance values between the target matrix and the preset plurality of intention labels; determining the intention label with the smallest distance value as the user intention of the target matrix; and collecting the user intentions corresponding to all subset matrices to obtain the multiple intentions of the user voice; wherein, using a preset distance algorithm to respectively calculate the distance values between the target matrix and the preset plurality of intention labels includes: using the following distance algorithm to respectively calculate the distance values between the target matrix and the preset plurality of intention labels: Wherein, D is the distance value, a is the target matrix, and bi is the i-th intent label among the preset multiple intent labels.
8. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; Memory, used to store computer programs; A processor, used to implement the steps of the multi-intention recognition method described in any one of claims 1-6 when executing a program stored in a memory.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the multi-intention recognition method as described in any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Speech intention recognition method and device combining text, speech and emotion characteristics
CN110188361A
Instruction execution method and device, storage medium and electronic equipment
CN111796926A
Emotion recognition method and device based on multi-modal signal, equipment and storage medium
CN113420556A
Data processing method and data processing device
CN113569969A