Speech intent recognition method and device, electronic equipment and storage medium
By generating and correcting text data, constructing a vector semantic space, and performing multiple comparisons, the problem of inaccurate speech intent recognition in complex contexts is solved, achieving higher accuracy in intent judgment and improved user experience.
Patent Information
- Application Number
- CN202310578177.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-22
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2043-05-22
AI Technical Summary
Existing technologies struggle to accurately identify users' speech intentions in complex contexts, particularly due to inaccurate intent recognition caused by homophones or near-homophones.
By acquiring the speech data to be recognized, initial text data is generated and corrected using location environment text data and habitual text data. A vector semantic space is constructed, and the first candidate label and semantic data are matched. Multiple comparisons are performed to determine the preferred semantic data, and finally the user's intent is confirmed through similarity calculation.
It improves the accuracy of user intent judgment, enhances user experience, and ensures that users' true intent can be accurately identified even in complex environments.
Smart Images

Figure CN116564293B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of speech recognition, in particular to a speech intent recognition method and device, an electronic device and a storage medium. BACKGROUND
[0002] With the development of information technology and artificial intelligence, speech recognition technology has been widely applied. For example, some enterprises will use intelligent speech technology to replace customer service personnel to assist users in handling business or providing services, and in order to improve service efficiency, the user's speech can also be recognized for intent, and the corresponding response or operation is selected according to the recognized user intent.
[0003] In related technologies, when recognizing the user's intent based on the user's speech information, the user's speech information and the text converted from the speech information are often taken as the input of the model for recognizing the user's intent, and according to the output of the model for recognizing the user's intent, the user's intent is determined. However, a single output result can only recognize the intent of some simple speech of the user, and when the user is in a complex context and environment, the user's intent is more complex, and it is difficult to accurately determine the user's actual intent only according to the user's speech information and the corresponding text. For example, when interacting with the user, the user uses words or words that are easily identified as homophonic words or homophonic words, resulting in the text being incorrectly identified as the corresponding homophonic words or homophonic words after the user's speech is converted into text, resulting in a change in the meaning of the text. Therefore, in related technologies, it is difficult to recognize the user's true intent in these cases only according to the user's speech information and the corresponding text, which leads to inaccurate user intent recognition or even errors. SUMMARY
[0004] The present application provides a speech intent recognition method, device, electronic device and storage medium to solve the technical problem of inaccurate speech intent recognition.
[0005] The speech intent recognition method provided by the embodiment of the present application comprises: obtaining to-be-recognized speech data, recognizing the to-be-recognized speech data to obtain initial text data; generating target text data according to the initial text data and a preset correction text data; matching a first candidate label in a pre-established target text data-first candidate label corresponding relationship according to the target text data, and matching a first candidate semantic data in a pre-established first candidate label-first candidate semantic data corresponding relationship according to the first candidate label; determining preferred semantic data according to a plurality of the first candidate semantic data; and performing similarity calculation on the preferred semantic data and the target text data to complete speech intent recognition according to the calculation result.
[0006] In an embodiment of the present application, the target text data is generated according to the initial text data and preset modified text data, the modified text data includes location environment text data and habit text data, and the generation of the target text data includes at least one of the following: modifying the initial text data by using the location environment text data; and modifying the initial text data by using the habit text data.
[0007] In an embodiment of the present application, the first candidate semantic data is compared with the initial text data respectively to obtain a plurality of first similarity degrees, the first candidate semantic data corresponding to a first similarity degree greater than a first preset similarity threshold is determined as the preferred semantic data, the first candidate labels are fitted to obtain second candidate labels, the second candidate semantic data is matched from a pre-established second candidate label-second candidate semantic data correspondence according to the second candidate labels, and the second candidate semantic data is determined as the preferred semantic data. The candidate voice intent corresponding to the first candidate semantic data is fitted to obtain third candidate labels, the third candidate semantic data is matched from a pre-established third candidate label-third candidate semantic data correspondence according to the third candidate labels, and the third candidate semantic data is determined as the preferred semantic data.
[0008] In an embodiment of the present application, the preferred semantic data is compared with the target text data to complete voice intent recognition according to a comparison result, including: comparing the preferred semantic data with the target text data to obtain a second similarity degree; and if the second similarity degree is greater than a preset second similarity threshold, determining that the preferred semantic intent corresponding to the preferred semantic data conforms to the user intent.
[0009] In an embodiment of the present application, after the preferred semantic data is obtained according to the plurality of first candidate semantic data, the method further includes: obtaining historical location data in historical movement track data; matching the historical location data with a location of the preferred semantic data; and if the matching is successful, determining that the preferred semantic intent corresponding to the preferred semantic data conforms to the user intent.
[0010] In an embodiment of the present application, the voice data to be recognized is obtained, the voice data to be recognized is recognized to obtain initial text data, and the method further includes: separately performing sound source recognition on the last word / phrase of the voice data to be recognized to recognize a voice tone; and determining a word / phrase type of the initial text data according to the voice tone.
[0011] In an embodiment of the present application, before generating the target text data according to the initial text data and the revised text data, the method further comprises: performing loss detection on the to-be-recognized voice data to obtain a detection result; if the detection result is that there is loss, matching target sample text data in a preset initial text data-target sample text data corresponding relationship according to the initial text data; and completing the initial text data according to the target sample text data.
[0012] In an embodiment of the present application, a voice intent recognition device is provided, comprising: an acquisition module, which acquires a plurality of to-be-recognized voice data, recognizes the to-be-recognized voice data, and obtains a plurality of initial text data; a generation module, which generates target text data according to the initial text data and preset revised text data; a matching module, which matches a first alternative label in a preset target text data-first alternative label corresponding relationship according to the target text data, and matches first alternative semantic data in a preset first alternative label-first alternative semantic data corresponding relationship according to the first alternative label; a determination module, which determines preferred semantic data according to a plurality of the first alternative semantic data; and a calculation module, which performs similarity calculation on the preferred semantic data and the target text data to complete voice intent recognition according to a calculation result.
[0013] The present application has the following beneficial effects: target text data is acquired, a plurality of first alternative labels are matched according to the target text data, first alternative semantic data is obtained, preferred semantic data is determined according to the first alternative semantic data, and similarity calculation is performed on the preferred semantic data and the target text data, so as to determine whether the preferred semantic data corresponding to the preferred semantic intent conforms to the actual intent of the user. Therefore, after the preferred semantic data is determined, the similarity of the preferred semantic data and the target text data is also determined to determine the real intent of the user, that is, the actual intent of the user is determined through multiple comparison modes, the judgment accuracy of the intent of the user is improved, and the user experience is improved.
[0014] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present application. BRIEF DESCRIPTION OF DRAWINGS
[0015] The drawings herein are incorporated into the specification and form part of the specification, show embodiments consistent with the present application, and together with the specification serve to explain the principles of the present application. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor. In the drawings:
[0016] Figure 1is a schematic diagram of a voice intention recognition method architecture shown by an exemplary embodiment of the present application;
[0017] Figure 2 is a specific flowchart of a voice intention recognition method shown by an exemplary embodiment of the present application;
[0018] Figure 3 is a vector semantic space display diagram shown by an exemplary embodiment of the present application;
[0019] Figure 4 is a preferred semantic data acquisition display diagram using first alternative semantic data shown by an exemplary embodiment of the present application;
[0020] Figure 5 is a preferred semantic data acquisition display diagram using first alternative semantic data corresponding to a first alternative intention shown by an exemplary embodiment of the present application;
[0021] Figure 6 is a specific schematic diagram of a voice intention recognition device shown by an exemplary embodiment of the present application;
[0022] Figure 7 is a structural schematic diagram of a computer system of an electronic device for implementing an embodiment of the present application. DETAILED DESCRIPTION
[0023] The present application will be described with reference to the attached drawings and preferred embodiments. Other advantages and effects of the present application will be easily understood by those skilled in the art from the disclosure of the present specification. The present application can be implemented or applied in other different specific embodiments, and the details in the specification can be modified or changed based on different views and applications without departing from the spirit of the present application. It should be understood that the preferred embodiments are only for illustrating the present application, and are not intended to limit the protection scope of the present application.
[0024] It should be noted that the diagrams provided in the following embodiments only schematically illustrate the basic concept of the present application, and only the components related to the present application are shown in the diagrams, not the number, shape and size of the components when actually implemented. The actual implementation of each component can be randomly changed in terms of shape, number and proportion, and the layout pattern of the components can be more complex.
[0025] In the following description, a large number of details are discussed to provide a more thorough explanation of the embodiments of the present application, however, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details, and in other embodiments, the known structures and devices are shown in the form of block diagrams rather than in the form of details, to avoid making the embodiments of the present application difficult to understand.
[0026] Vector semantics is to convert the symbolic representation of text into vector representation in semantic space. Different things in similar environment produce similar features, which is called distribution hypothesis. In language, different words in the same context also have similar meanings. According to the context of the word, the semantic representation of the word is learned in an unsupervised manner. Vector semantics is an instantiation of distribution hypothesis.
[0027] Vector Space Model (VSM) is to simplify the processing of text data into vector operation in vector space, and it expresses the similarity of semantics in space. When text data is represented as a vector in vector space, the similarity between text data can be measured by calculating the similarity between vectors.
[0028] Speech recognition, also known as Automatic Speech Recognition (ASR), is mainly to convert the lexical content in human speech into computer-readable input, which is generally understandable text content, and may also be binary code or character sequence. Speech recognition is a frontier technology that integrates knowledge from multiple disciplines, covering mathematics and statistics, acoustics and linguistics, computer and artificial intelligence, and is a key link in human-computer natural interaction technology.
[0029] As shown in Figure 1 , Figure 1 A schematic diagram of an exemplary system architecture to which the technical solutions of embodiments of the present application can be applied is shown. As shown in Figure 1 , the system architecture can include a voice acquisition device 110 and an electronic device 120. The voice acquisition device acquires voice data to be recognized and sends the voice data to be recognized to the electronic device 120. The electronic device 120 identifies the voice data to be recognized to obtain initial text data. The voice acquisition device can be a microphone, and the electronic device can be a mobile phone, a computer, or a car terminal, etc.
[0030] Please refer to Figure 2 , Figure 2 A flowchart of a voice intent recognition method according to an embodiment of the present application is shown. As shown in Figure 2 , the voice intent recognition method includes at least steps S210 to S250, which are described in detail as follows:
[0031] Step S210, acquiring voice data to be recognized, identifying the voice data to be recognized, and obtaining initial text data.
[0032] In an embodiment of the present application, the voice data to be recognized is recognized, and the voice recognition method at least includes a method based on a sound channel model and voice knowledge, a template matching method, and a method using an artificial neural network.
[0033] In an embodiment of the present application, before the voice data to be recognized is recognized, the voice data to be recognized is filtered to obtain clear voice data to be recognized, so as to improve the accuracy of the recognition result.
[0034] In step S220, the target text data is generated according to the initial text data and the preset correction data.
[0035] In an embodiment of the present application, the target text data can be obtained by fusing the target text data and the correction text data, and then performing feature extraction on the fused text data.
[0036] In an embodiment of the present application, the correction text data is cross text data. If in a multi-person conversation scenario, the target user is determined according to the voiceprint features of the user, the voice data to be recognized corresponding to the target user is recognized to obtain the initial text data. Since there is cross between the voice information of the conversation, the cross text data can be extracted. In this embodiment, the initial text data is corrected by using the cross text data to obtain the target text data.
[0037] In an embodiment of the present application, the correction text data is the alarm data of the user. For example, the initial text data is "get up and eat", and the alarm data of the user is "12:00". The alarm data and the initial text data are fused to obtain the target text data "eat lunch".
[0038] In step S230, the first candidate label is matched in the pre-established target text data-first candidate label corresponding relationship according to the target text data, and the first candidate semantic data is matched in the pre-established first candidate label-first candidate semantic data corresponding relationship according to the first candidate label.
[0039] In an embodiment of the present application, a text database is constructed, and the text data can be feature trained to obtain a vector semantic space. Please refer to Figure 3 , Figure 3 is a schematic view of the vector semantic space. As shown in Figure 3As shown, semantic data is labeled in the vector semantic space, which determines the location of the semantic data. Target text data corresponds to multiple labels, and the labels and semantic data have a one-to-one mapping relationship. Based on the aforementioned multi-user conversation scenario, target text data is obtained from the initial text data and cross-text data. The first candidate label corresponding to the target text data is then matched in the vector semantic space. Since the content of conversations among multiple users is generally related, in the case of multi-user conversations, by correcting the initial text data with cross-text data from the voice data of multiple users, the true intent of the users can be more accurately determined, thereby improving the user experience.
[0040] Step S240: Determine preferred semantic data based on multiple first candidate semantic data.
[0041] Step S250: The similarity between the preferred semantic data and the target text data is calculated to complete the speech intent recognition based on the calculation result.
[0042] Since user voice data may be misidentified as homophones or homonyms when recognizing user voice data, the accuracy of user intent judgment can be improved by calculating the similarity between the preferred semantic data and the target text data after determining the preferred semantic data.
[0043] exist Figure 2 In the technical solution of the illustrated embodiment, target text data is acquired, and multiple first candidate tags are matched based on the target text data to obtain first candidate semantic data. Preferred semantic data is then determined based on the first candidate semantic data. Furthermore, by calculating the similarity between the preferred semantic data and the target text data, it is determined whether the preferred semantic intent corresponding to the preferred semantic data matches the user's actual intent. Thus, after determining the preferred semantic data, this invention also determines the similarity between the preferred semantic data and the target text data to ascertain the user's true intent. That is, by using a multiple comparison method to determine the user's actual intent, the accuracy of user intent determination is improved, thereby enhancing the user experience.
[0044] In an embodiment of the present application, before generating the target text data according to the initial text data and the preset modified text data, the method further comprises: performing missing detection on the to-be-recognized voice data to obtain a detection result; if the detection result is that there is missing, matching target sample text data corresponding to the initial text data in a preset initial text data-target sample text data corresponding relationship; and performing completion on the initial text data according to the target sample text data. In this embodiment, a user historical voice database is constructed to obtain user historical voice information text, denoted as a historical corpus text library, and the historical corpus text library stores the initial text data-target sample text data corresponding relationship. In this embodiment, the initial text data is “turn off the light”, it is judged that the missing detection result is that there is missing, and the target sample text data corresponding to the initial text data is matched in the preset historical corpus text library according to the initial text data, and the target sample text data is “turn off the light and sleep”. The initial text data “turn off the light” is completed according to the target sample text data “turn off the light and sleep”, and the completed initial text data is “turn off the light and sleep”. Due to the difference in language habits of users, for users with short speaking habits, the real intention of the user can be more accurately determined by performing missing detection on the to-be-recognized voice data.
[0045] In an embodiment of the present application, the target text data is generated according to the initial text data and the preset modified text data, and the modified text data includes location environment text data and habit text data, and the method comprises: modifying the initial text data by the location environment text data to generate the target text data. Modifying the initial text data by the geographic position and natural environment data to obtain the target text data can improve the accuracy of voice intention judgment and improve user experience.
[0046] In an embodiment of the present application, the location environment text data is user geographic position and natural environment data, and the geographic position and natural environment data are modified with the initial text data to generate the target text data. In this embodiment, the geographic position data is “A University B District”, and the natural environment parameter is weather data. The recognized initial text data is “go outside to play ball”. The weather data of “A University B District” is “thunderstorm”, and the geographic position and natural environment parameter are fused with the initial text data to generate the target text data “play ball indoors”. According to the target text data, the first alternative semantic data matched in the vector semantic space is “don't want to go outside to play ball”, “go to an indoor basketball court to play ball”, and “go outside to play ball after the rain stops”. Modifying the initial text data by the geographic position and natural environment data to obtain the target text data can improve the accuracy of voice intention judgment and improve user experience.
[0047] In an embodiment of the present application, the target text data is generated according to the initial text data and preset modified text data, and the modified text data further comprises habit text data, and the method comprises: modifying the initial text data by the habit text data to generate the target text data. By modifying the initial text data by the habit text data to obtain the target text data, the accuracy of voice intent judgment can be improved, and user experience can be improved.
[0048] In an embodiment of the present application, the habit text data is an alarm time, the initial text data is "get up and eat", and the alarm time is "12:00". The target text data obtained by combining the initial text data and the habit text data is "eat lunch". By modifying the initial text data by the habit text data to obtain the target text data, the accuracy of voice intent judgment can be improved, and user experience can be improved.
[0049] In an embodiment of the present application, the preferred semantic data is determined according to the plurality of first alternative semantic data, comprising: respectively calculating the similarity between the plurality of first alternative semantic data and the initial text data to obtain a plurality of first similarity, and determining the first alternative semantic data corresponding to the first similarity greater than the first preset similarity threshold as the preferred semantic data.
[0050] In an embodiment of the present application, the preferred semantic data is determined according to the plurality of first alternative semantic data, comprising: fitting the plurality of first alternative labels to obtain second alternative labels, and matching the second alternative semantic data in the pre-established second alternative label-second alternative semantic data correspondence according to the second alternative labels to determine the second alternative semantic data as the preferred semantic data. Since the second alternative labels are fitted by related labels, the second alternative semantic data is more superior than the first alternative semantic data in data dimension, therefore, by fitting the related labels and determining the semantic data corresponding to the fitted labels as the preferred semantic data instead of determining the preferred semantic data only by the semantic data corresponding to a single label, the voice intent can be more accurately judged, and user experience can be improved.
[0051] In an embodiment of the present application, please refer to Figure 4 , Figure 4The diagram illustrates the acquisition of optimal semantic data for the second candidate label. The first candidate semantic data corresponds to the first candidate labels 1, 5, and 3. Labels 1, 5, and 3 are related labels. Fitting labels 1, 5, and 3 yields the second candidate label, and the second candidate semantic data corresponding to this label is determined as the optimal semantic data. Since the second candidate label is obtained by fitting related labels, it is of higher quality than the first candidate semantic data in terms of data dimensions. Therefore, by fitting related labels and determining the semantic data corresponding to the fitted label as the optimal semantic data, rather than relying solely on the semantic data corresponding to a single label, the speech intent can be more accurately determined, improving the user experience.
[0052] In one embodiment of this application, determining preferred semantic data based on multiple first candidate semantic data includes: fitting candidate speech intents corresponding to the first candidate semantic data to obtain a third candidate label; matching the third candidate semantic data according to the third candidate label in a pre-established correspondence between the third candidate label and the third candidate semantic data; and determining the third candidate semantic data as preferred semantic data. Since the third candidate label is obtained by fitting related speech intents, the third candidate semantic data corresponding to the third candidate label is of higher quality than the first candidate semantic data in terms of data dimension. Thus, by fitting multiple speech intents to determine preferred semantic data, rather than determining semantic data based on a single speech intent, the accuracy of judging speech intent can be improved, thereby enhancing the user experience.
[0053] In one embodiment of this application, please refer to Figure 5 , Figure 5 The diagram illustrates the optimal semantic data obtained for the third candidate label. The third candidate label is a semantic intent node label. As shown in the figure, the candidate speech intents corresponding to the first candidate semantic data are converted into a speech intent graphic list. The speech intent graphic list includes speech intents... Figure 1 , sound meaning Figure 2 ...For voice intent n, all voice intents in the voice intent graph list are fitted to form a third candidate label semantic intent node label. The third candidate semantic data corresponding to the third candidate label is then matched in the vector semantic space to obtain the optimal semantic data. Since the third candidate label is fitted through related voice intents, the third candidate semantic data corresponding to the third candidate label is of higher quality than the first candidate semantic data in terms of data dimension. Thus, by fitting multiple voice intents to determine the optimal semantic data, rather than determining semantic data through a single voice intent, the accuracy of voice intent judgment can be improved, thereby enhancing the user experience.
[0054] In an embodiment of the present application, the preferred semantic data is compared with the target text data to calculate the similarity, and the voice intent recognition is completed according to the calculation result, including: comparing the preferred semantic data with the target text data to obtain a second similarity; if the second similarity is greater than a preset second similarity threshold, it is determined that the preferred semantic intent corresponding to the preferred semantic data conforms to the user intent.
[0055] In an embodiment of the present application, the preferred semantic data is compared with the target text data to calculate the similarity, including: calculating the similarity of the preferred semantic data and the target text data by using the cosine formula. Whether the preferred semantic intent corresponding to the preferred semantic data conforms to the real intent of the user is determined. In this embodiment, the similarity is calculated by using the following formula:
[0056] Formula (1)
[0057] Wherein, and The vectors of the preferred semantic data and the initial text data are respectively represented, and the cosine value of the included angle of the two vectors is calculated to match the similarity. The cosine similarity measures the cosine of the included angle between vectors, and the cosine is based on the dot product, and the dot product can be used as a measurement index of the similarity. If two vectors have larger values in the same dimension, the dot product result is large. On the contrary, the values of the vectors in different dimensions are zero, and the dot product result is also zero, indicating a huge difference. Thus, the essence is to calculate the cosine value of the included angle of the vectors. When two vectors are more similar, the cosine value is larger, and the included angle of the two vectors is smaller. The second similarity threshold is set. If the calculated cosine value is greater than the second similarity threshold, it is determined that the preferred semantic data is similar to the target text data, that is, the preferred voice intent conforms to the real intent of the user. If the calculated cosine value is less than or equal to the second similarity threshold, it is determined that the preferred semantic data is not similar to the target text data, that is, the preferred voice intent does not conform to the real intent of the user. In this way, the best voice intent is determined through multiple comparisons, the accuracy of determining the voice intent is improved, and the user experience is improved.
[0058] In an embodiment of the present application, after the preferred voice intent is obtained according to the plurality of first alternative semantic data, the method further includes: obtaining historical position data in historical mobile trajectory data; matching the historical position data with the location of the preferred semantic data; if the matching is successful, it is determined that the preferred semantic intent corresponding to the preferred semantic data conforms to the user intent.
[0059] In an embodiment of the present application, the target text data of the target user is "the scenery of Huangshan is very beautiful", and the preferred semantic data obtained according to the target text data includes: "heard from friends or others, just convey or restate the fact"; "go there, make subjective evaluation according to own experience"; and "based on third-party evaluation, want to go". The historical location data of the target user is obtained, and in this embodiment, the historical location data is "Huangshan". The historical location data "Huangshan" is matched with the location "Huangshan" in the preferred semantic data, and the matching is successful, so it is determined that the preferred semantic data "go there, make subjective evaluation according to own experience" is consistent with the user's intention. In this embodiment, if the target text data of the target user is "the scenery of Huangshan is very beautiful" is recognized according to the voiceprint feature in the scene of multi-user conversation, the historical location data of the target user does not include Huangshan, and if the location "Huangshan" is recognized in the initial text data of other users, it is determined that the preferred semantic data "heard from friends or others, just convey or restate the fact" and "based on third-party evaluation, want to go" are consistent with the user's intention.
[0060] In an embodiment of the present application, the method for recognizing speech data further includes: performing individual sound source recognition on the last word / term of the speech data to be recognized, recognizing the voice tone, and judging the type of the initial text data.
[0061] In an embodiment of the present application, the speech data to be recognized is "go to play ball outside", and the type of the initial text data is determined to be a question according to the individual sound source recognition of "ball". Since punctuation marks need to exist in language text, and the voice tones corresponding to the punctuation marks are different, there is a great difference in semantic recognition, which greatly affects the user's intention. By recognizing the voice tone of the last word / term of the speech data to be recognized, the type of each word / term of the generated initial text data is judged, so as to reduce the difference in semantic recognition, and thus the accuracy of recognizing the user's intention is improved.
[0062] In summary, by obtaining the target text data, the first candidate semantic data is obtained by matching the target text data with a plurality of first candidate labels, the preferred semantic data is determined according to the first candidate semantic data, and the similarity between the preferred semantic data and the target text data is calculated to determine whether the preferred semantic data corresponds to the actual intention of the user. Therefore, the present application determines the actual intention of the user by judging the similarity between the preferred semantic data and the target text data after determining the preferred semantic data, that is, by multiple comparison methods to determine the actual intention of the user, which improves the accuracy of judging the user's intention and improves the user experience.
[0063] Figure 6 A block diagram of a voice intention recognition device according to an example embodiment of the present application is shown schematically.
[0064] Referring to Figure 6 As shown, the voice intention recognition device 600 according to an embodiment of the present application includes an acquisition module 610, a generation module 620, a matching module 630, a determination module 640, and a calculation module 650.
[0065] The acquisition module 610 acquires voice data to be recognized, and recognizes the voice data to be recognized to obtain initial text data. The generation module 620 generates target text data according to the initial text data and preset correction text data. The matching module 630 matches a first candidate label according to the target text data in a pre-established target text data-first candidate label correspondence relationship, and matches first candidate semantic data according to the first candidate label in a pre-established first candidate label-first candidate semantic data correspondence relationship. The determination module 640 determines preferred semantic data according to a plurality of first candidate semantic data. The calculation module 650 performs similarity calculation on the preferred semantic data and the initial text data to complete voice intention recognition according to a calculation result.
[0066] In an example embodiment of the present application, the voice intention recognition device further includes a missing detection module 660 configured to perform missing detection on the voice data to be recognized, to obtain a detection result, and to match target sample corpus text data according to the initial text data in a pre-established initial text data-target sample corpus text data correspondence relationship if the detection result indicates that there is missing, and to complete the initial text data according to the target sample corpus text data.
[0067] In an example embodiment of the present application, the generation module 620 is configured to acquire location environment text data of a target user, to correct the location environment text data and the initial text data to generate the target text data, to acquire habit text data, and to correct the habit text data and the initial text data to generate the target text data.
[0068] In an example embodiment of the present application, the determining module 640 is configured to perform similarity calculation on the plurality of first candidate semantic data and the initial text data respectively to obtain a plurality of first similarity, and determine the first candidate semantic data corresponding to the first similarity greater than a first preset similarity threshold as the preferred semantic data; fit the plurality of first candidate labels to obtain second candidate labels, and match the second candidate semantic data in the pre-established second candidate label-second candidate semantic data correspondence according to the second candidate labels, and determine the second candidate semantic data as the preferred semantic data. Fit the first candidate semantic data corresponding to the first candidate voice intent to obtain third candidate labels, and match the third candidate semantic data in the pre-established third candidate label-third candidate semantic data correspondence according to the third candidate labels, and determine the third candidate semantic data as the preferred semantic data.
[0069] In an example embodiment of the present application, the determining module 640 is configured to, after obtaining the preferred semantic data according to the plurality of first candidate semantic data, further include: obtaining historical location data in the historical moving track data; matching the historical location data with the location of the preferred semantic data, and if the matching is successful, determining that the preferred semantic intent corresponding to the preferred semantic data conforms to the user intent.
[0070] In an example embodiment of the present application, the calculating module 650 is configured to perform similarity calculation on the preferred semantic data and the target text data to obtain a second similarity, and if the second similarity is greater than a preset second similarity threshold, determining that the preferred semantic data conforms to the user intent.
[0071] In an example embodiment of the present application, the obtaining module 610 is further configured to obtain the to-be-recognized voice data, and recognize the to-be-recognized voice data to obtain the initial text data, and further include: performing individual sound source recognition on the last word / phrase of the to-be-recognized voice data to recognize the voice tone; and determining the word / phrase type of the initial text data according to the voice tone.
[0072] It should be noted that the apparatus provided in the above embodiments and the method provided in the above embodiments belong to the same concept, and the specific manner in which each module and unit performs operations has been described in detail in the method embodiments, which will not be repeated here. In actual application, the apparatus can allocate the above functions to different functional modules to complete all or part of the functions described above, and this is not limited herein.
[0073] Figure 7 The structural schematic diagram of a computer system of an electronic device suitable for implementing the embodiments of the present application is shown. It should be noted that, Figure 7The computer system 700 of the illustrated electronic device is merely one example, and should not be taken as limiting the functionality or use of embodiments of the present application.
[0074] As shown in Figure 7 The computer system 700 includes a central processing unit (CPU) 701, which can perform various suitable actions and processes in accordance with a program stored in a read-only memory (ROM) 702 or a program loaded from a storage section 708 into a random access memory (RAM) 703, such as performing the methods described in the above embodiments. Various programs and data required for the operation of the system are also stored in the RAM 703. The CPU 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0075] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, a mouse, etc.; an output section 707 including a display such as a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as necessary. A removable recording medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. is attached to the drive 710 as necessary, so that a computer program read therefrom is installed into the storage section 708 as necessary.
[0076] In particular, in accordance with embodiments of the present application, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, embodiments of the present application include a computer program product comprising a computer program carried on a computer readable medium, the computer program comprising computer programs for executing the methods illustrated by the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via the communication section 709, and / or installed from the removable recording medium 711. When the computer program is executed by the central processing unit (CPU) 701, various functions defined in the system of the present application are performed.
[0077] It should be noted that the computer-readable medium in the embodiments shown in the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium may, for example, be an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (Compact Disc Read-Only Memory, CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, the computer-readable signal medium can include a data signal propagating in a baseband or as a carrier wave in a propagated data signal, in which the computer-readable computer program is carried. Such a propagated data signal can take various forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer-readable signal medium can also be any computer-readable medium other than the computer-readable storage medium, which can send, propagate or transmit programs for use by or in connection with an instruction execution system, device or component. The computer program contained on the computer-readable medium can be transmitted by any suitable medium, including but not limited to wireless, wired, or the like, or any suitable combination of the above.
[0078] The flowcharts and block diagrams in the drawings illustrate the possible implementation architectures, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In the flowcharts or block diagrams, each block can represent a module, a program segment or a part of code, which contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur in different order than that shown in the drawings. For example, two blocks represented in succession can actually be executed substantially in parallel, and sometimes they can be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, and the combination of blocks in the block diagram or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or can be implemented by a combination of special-purpose hardware and computer instructions.
[0079] The units described in the embodiments of the present application can be implemented in the form of software, or can be implemented in the form of hardware, and the described units can also be arranged in a processor. In some cases, the names of the units do not constitute a limitation on the units themselves.
[0080] Another aspect of the present application also provides a computer readable storage medium, which stores a computer program. When the computer program is executed by a processor of a computer, the computer performs the voice intent recognition method as described above. The computer readable storage medium can be included in the electronic device described in the above embodiments, or can exist separately without being assembled into the electronic device.
[0081] Another aspect of the present application also provides a computer program product or a computer program, which includes computer instructions stored in a computer readable storage medium. A processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the computer device performs the voice intent recognition method provided in each of the above embodiments.
[0082] The above embodiments only exemplarily illustrate the principles and effects of the present application, and are not used to limit the present application. Any person skilled in the art can modify or change the above embodiments without departing from the spirit and scope of the present application. Therefore, all equivalent modifications or changes completed by those skilled in the art without departing from the spirit and technical thought of the present application should be covered by the claims of the present application.
Claims
1. A method for recognizing speech intent, characterized in that, The speech intent recognition method includes: Acquire the speech data to be recognized, and recognize the speech data to obtain initial text data; Target text data is generated based on the initial text data and the preset corrected text data; Based on the target text data, the first candidate label is matched in the pre-established correspondence between target text data and first candidate label. Based on the first candidate label, the first candidate semantic data is matched in the pre-established correspondence between first candidate label and first candidate semantic data. Preferred semantic data is determined based on multiple first candidate semantic data; The preferred semantic data and the target text data are similar to each other to complete the speech intent recognition based on the calculation results; The establishment of the correspondence between the target text data and the first candidate tag includes: Construct a text database, perform feature training on the text database, and obtain a vector semantic space; In the vector semantic space, the semantic data is labeled to obtain the one-to-one mapping relationship between the labels and semantic data in the target text data-first candidate label correspondence.
2. The speech intent recognition method according to claim 1, characterized in that, Target text data is generated based on the initial text data and preset corrected text data. The corrected text data includes location environment text data and customary text data, including at least one of the following: The initial text data is corrected using the location environment text data to generate the target text data; The initial text data is modified using the customary text data to generate the target text data.
3. The speech intent recognition method according to claim 1, characterized in that, Preferred semantic data is determined based on a plurality of the first candidate semantic data, including at least one of the following: The similarity of multiple first candidate semantic data with the initial text data is calculated to obtain multiple first similarities. The first candidate semantic data corresponding to the first similarity greater than the first preset similarity threshold is determined as the preferred semantic data. Multiple first candidate labels are fitted to obtain second candidate labels. Second candidate semantic data is matched with the second candidate label in the pre-established correspondence between second candidate label and second candidate semantic data, and the second candidate semantic data is determined as preferred semantic data. Fit the candidate speech intent corresponding to the first candidate semantic data to obtain the third candidate label. Match the third candidate semantic data in the pre-established correspondence between the third candidate label and the third candidate semantic data according to the third candidate label. Then determine the third candidate semantic data as the preferred semantic data.
4. The speech intent recognition method according to any one of claims 1 to 3, characterized in that, The preferred semantic data and the target text data are similar to each other, and speech intent recognition is performed based on the calculation results, including: The second similarity is obtained by calculating the similarity between the preferred semantic data and the target text data. If the second similarity is greater than the preset second similarity threshold, then the preferred semantic intent corresponding to the preferred semantic data is determined to conform to the user intent.
5. The speech intent recognition method according to claim 1, characterized in that, After obtaining preferred semantic data based on multiple first-choice semantic data, the process also includes: Retrieve historical location data from historical movement trajectory data; The historical location data is matched with the location of the preferred semantic data. If the match is successful, it is determined that the preferred semantic intent corresponding to the preferred semantic data conforms to the user's intent.
6. The speech intent recognition method according to claim 1, characterized in that, The process of acquiring speech data to be recognized, recognizing the speech data to be recognized to obtain initial text data, also includes: The last character / word in the speech data to be identified is individually identified to determine the speech tone. The word and sentence type of the initial text data is determined based on the tone of the speech.
7. The speech intent recognition method according to claim 1, characterized in that, Before generating the target text data based on the initial text data and the revised text data, the process also includes: The speech data to be recognized is subjected to missing data detection to obtain the detection results; If the detection result indicates that there is a missing data, the target sample expected data is matched according to the initial text data in the preset correspondence between the initial text data and the target sample corpus text data. The initial text data is completed based on the target sample corpus text data.
8. A voice intent recognition device, characterized in that, The voice intent recognition device includes: The acquisition module acquires multiple voice data to be recognized, recognizes the voice data to be recognized, and obtains multiple initial text data. The generation module generates target text data based on the initial text data and the preset modified text data; The matching module matches the target text data with a first candidate label in a pre-established correspondence between target text data and first candidate label, and matches the first candidate semantic data with the first candidate label in a pre-established correspondence between first candidate label and first candidate semantic data. The establishment of the correspondence between target text data and first candidate label includes: constructing a text database; performing feature training on the text database to obtain a vector semantic space; and labeling the semantic data within the vector semantic space to obtain a one-to-one mapping relationship between labels and semantic data in the correspondence between target text data and first candidate label. The determining module determines preferred semantic data based on multiple first candidate semantic data; The calculation module performs similarity calculation between the preferred semantic data and the target text data, and completes speech intent recognition based on the calculation result.
9. An electronic device, characterized in that, The electronic device includes: One or more processors; A storage device for storing one or more programs, which, when executed by one or more processors, cause the electronic device to implement the voice intent recognition method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by the computer's processor, causes the computer to perform the voice intent recognition method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Intention recognition method and device, computer equipment and storage medium
CN109800407A
Intention recognition method and device, electronic equipment and storage medium
CN114357973A