Voice intention recognition and voice response method and device, equipment and medium
Through the combination of multiple static recognition models and dynamic recognition models, identifying and responding to target user voices, the problem of limited to a single model vocabulary file in the prior art is solved, and more accurate and extensive speech intention recognition is achieved.
Patent Information
- Application Number
- CN202411809685.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-03-11
AI Technical Summary
Existing voice intent recognition technology is limited to vocabulary files of a single model and cannot effectively identify voice inputs beyond the vocabulary file, resulting in intent recognition failure and inability to respond to users correctly.
The user intention and confidence scores expressed by the voice fragment of the target user's voice are obtained based on the corresponding vocabulary files, the vocabulary file of the dynamic recognition model is determined, and the user intention expressed by the target user's voice is obtained through the dynamic recognition model.
Accurate recognition and response to the target user's voice is achieved, vocabulary files limited to a single model are avoided, and the accuracy and breadth of speech intention recognition are improved.
Smart Images

Figure CN119601000A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a method, device, equipment and medium for speech intention recognition and speech response. Background Art
[0002] The speech intent recognition technology based on the intention recognition model is also increasingly widely used in the fields of smart assistants, smart homes, smart customer service and personalized recommendations. It can correctly recognize the user's intention expressed by the user's voice and respond to the user's voice correctly. In the prior art, the speech intent recognition technology is often limited to the vocabulary file of a single model. For voice input beyond its vocabulary file, the intent recognition model may fail to recognize the intention, and therefore cannot give the user a correct response. Summary of the invention
[0003] The embodiments of the present invention provide a method, apparatus, device and medium for speech intention recognition and speech response, which can accurately recognize the user intention expressed by the target user's speech and correctly respond to the user's speech.
[0004] In a first aspect, an embodiment of the present invention provides a method for recognizing speech intentions, including:
[0005] Acquire the user intention and corresponding confidence score expressed by the speech segment of the target user's speech through multiple static recognition models based on corresponding vocabulary files, and obtain the speech segment intention and segment intention confidence score corresponding to each static recognition model, wherein each static recognition model is respectively suitable for identifying user intentions related to different fields, and each static recognition model is configured with a vocabulary file including vocabulary of the corresponding field;
[0006] Determining the vocabulary file of the dynamic recognition model based on the speech segment intents and segment intent confidence scores corresponding to the respective static recognition models; and
[0007] The user intention expressed by the target user's voice is obtained through the dynamic recognition model based on the corresponding vocabulary file.
[0008] In a second aspect, an embodiment of the present invention provides a voice response method, including:
[0009] Determine the user intention expressed by the target user's voice by using any of the voice intention recognition methods described in the embodiments of the present invention; and
[0010] Respond to the target user voice based on the user intent expressed by the target user voice.
[0011] In a third aspect, an embodiment of the present invention provides a speech intention recognition device, comprising:
[0012] A static recognition module, used to obtain the user intention and corresponding confidence score expressed by the speech segment of the target user's speech through multiple static recognition models based on corresponding vocabulary files, and obtain the speech segment intention and segment intention confidence score corresponding to each static recognition model, wherein each static recognition model is respectively suitable for identifying user intentions related to different fields, and each static recognition model is configured with a vocabulary file including vocabulary of the corresponding field;
[0013] A dynamic vocabulary file determination module, used to determine the vocabulary file of the dynamic recognition model based on the speech segment intents and segment intent confidence scores corresponding to the respective static recognition models; and
[0014] The dynamic recognition module is used to obtain the user intention expressed by the target user's voice based on the corresponding vocabulary file through the dynamic recognition model.
[0015] In a fourth aspect, an embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a speech intention recognition method or a speech response method as described in any one of the embodiments of the present invention is implemented.
[0016] In a fifth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a speech intention recognition method or a speech response method as described in any one of the embodiments of the present invention.
[0017] The embodiments of the present invention provide a method, apparatus, device and medium for speech intention recognition and speech response. First, the user intention and corresponding confidence score expressed by the speech segment of the target user's speech are obtained based on the corresponding vocabulary files through multiple static recognition models, and the speech segment intention and segment intention confidence score corresponding to each static recognition model are obtained. Then, the vocabulary file of the dynamic recognition model is determined based on the speech segment intention and segment intention confidence score corresponding to each static recognition model, and the target user's speech intention is further obtained through the dynamic recognition model based on the corresponding vocabulary file. The vocabulary related to the speech intention can be screened out from the vocabulary corresponding to multiple static recognition models, so that when recognizing the user's speech, it is not limited to the vocabulary file of a single model, and the user intention expressed by the target user's speech can be accurately recognized and the target user's speech can be correctly responded to. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solution of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0019] Figure 1 It is a flow chart of a method for speech intention recognition provided by an embodiment of the present invention;
[0020] Figure 2 is a structural diagram of a static recognition model provided by an embodiment of the present invention;
[0021] Figure 3 is another flowchart of the method for speech intention recognition provided by an embodiment of the present invention;
[0022] Figure 4 is another flowchart of the method for speech intention recognition provided by an embodiment of the present invention;
[0023] Figure 5 is a flow chart of a voice response method provided by an embodiment of the present invention;
[0024] Figure 6 is a structural schematic diagram of a speech intention recognition device provided by an embodiment of the present invention;
[0025] Figure 7 is a structural schematic diagram of a voice response device provided by an embodiment of the present invention;
[0026] Figure 8 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0027] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0029] Figure 1 A flow chart of a method for speech intent recognition provided in an embodiment of the present invention is provided. The method can be performed by a speech intent recognition device provided in an embodiment of the present invention, and the device can be implemented in software and / or hardware. In a specific embodiment, the device can be integrated in an electronic device, such as a computer, a server, etc. The following embodiments will be described by taking the device integrated in an electronic device as an example. Reference Figure 1 , the method may specifically include the following steps:
[0030] Step 101, respectively, through multiple static recognition models based on corresponding vocabulary files, obtain the user intent and corresponding confidence score expressed by the speech segments of the target user's speech, and obtain the speech segment intent and segment intent confidence score corresponding to each static recognition model, each static recognition model is respectively suitable for identifying user intent related to different fields, and each static recognition model is configured with a vocabulary file including vocabulary of the corresponding field. This step can help determine the vocabulary file of the dynamic recognition model based on the speech segment intent and segment intent confidence score corresponding to each static recognition model.
[0031] Specifically, the above-mentioned target user voice is collected after the user's authorization, and the collection, storage, use, processing, transmission, provision, disclosure and application of the target user voice comply with the relevant laws, regulations and standards of the relevant countries and regions, take necessary confidentiality measures, do not violate public order and good customs, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0032] Specifically, the voice segment of the target user's voice may be a complete voice segment of the target user's voice, or may be a partial voice segment of the target user's voice.
[0033] Specifically, the fields to which the above-mentioned static recognition models are applicable may be, for example, the credit card service field or the financial product service field.
[0034] Specifically, the vocabulary files for static recognition model configuration applicable to the credit card service field may include: professional vocabulary in the credit card service field such as available credit limit, overlimit fee and interest-free repayment period, etc.; the vocabulary files for static recognition model configuration applicable to the financial product service field may include: product name, rate of return, annual yield, maturity date and liquidation period, etc.
[0035] Optional, such as Figure 2 As shown, each of the above-mentioned static recognition models includes a speech recognition component, a keyword text acquisition component and an intent recognition component.
[0036] Optionally, the process of obtaining the user intent and corresponding confidence score expressed by the speech segments of the target user's speech through multiple static recognition models based on corresponding vocabulary files, and obtaining the speech segment intent and segment intent confidence score corresponding to each static recognition model includes:
[0037] For each static recognition model, the speech fragment is recognized and transcribed by the speech recognition component of the current static recognition model to obtain the speech fragment text corresponding to the current static recognition model; the keyword recognition component of the current static recognition model obtains the text including the keywords in the speech fragment text based on the vocabulary file of the current static recognition model to obtain the keyword text corresponding to the current static recognition model; the intent recognition component of the current static recognition model determines the confidence score of each speech intent text in the multiple speech intent texts corresponding to the current static recognition model based on the vocabulary file of the current static recognition model; the maximum confidence score and the corresponding speech intent are obtained, and the fragment intent confidence score and speech fragment intent corresponding to the current static recognition model are obtained.
[0038] Optional, such as Figure 2 As shown, the process of recognizing and transcribing the speech fragment through the speech recognition component of the current static recognition model to obtain the speech fragment text corresponding to the current static recognition model includes: converting the speech fragment into a corresponding phoneme sequence through the speech recognition component, and based on the above phoneme sequence, calling the large language model to construct a text sequence corresponding to the speech fragment to obtain the above speech fragment text.
[0039] Optionally, the process of obtaining the text including the keywords in the speech segment text by the keyword recognition component of the current static recognition model based on the vocabulary file of the current static recognition model to obtain the keyword text corresponding to the current static recognition model includes:
[0040] The large speech model is used to obtain the vocabulary included in the speech segment text, and the vocabulary in the vocabulary file of the current static recognition model to obtain the keyword text.
[0041] It is understandable that by extracting keywords based on vocabulary files through a large voice model, it is possible to accurately extract a vocabulary subset that is closely related to the current voice, thereby providing users with more personalized and accurate services and improving user experience.
[0042] Optionally, the process of obtaining the keyword text from the vocabulary in the vocabulary file of the current static recognition model among the vocabulary included in the speech segment text obtained by the large speech model includes:
[0043] Determine whether each word included in the speech fragment text is in the vocabulary file of the current static recognition model; assign a keyword score not lower than a first keyword score threshold to each corresponding word in the vocabulary file of the current static recognition model, and assign a keyword score lower than the first keyword score threshold to each corresponding word not in the vocabulary file of the current static recognition model; and call the large prediction model to obtain the corresponding words with a keyword score not lower than the first keyword score threshold to obtain the above-mentioned keyword text.
[0044] Optionally, the above process of determining the confidence score of the keyword text as each speech intent text among multiple speech intent texts corresponding to the current static recognition model includes: calculating the similarity between the keyword text and each speech intent text, and determining the confidence score of the keyword text as each speech intent text based on the corresponding similarity.
[0045] Step 102, determining the vocabulary file of the dynamic recognition model based on the speech segment intent and segment intent confidence score corresponding to each static recognition model. This step can facilitate obtaining the user intent expressed by the target user's speech based on the corresponding vocabulary file through the dynamic recognition model.
[0046] Optionally, the process of determining the vocabulary file of the dynamic recognition model based on the speech segment intents and segment intent confidence scores corresponding to each static recognition model includes:
[0047] Obtain the vocabulary file of the static recognition model corresponding to the largest segment intent confidence score among the segment intent confidence scores to obtain the target static vocabulary file; and obtain the vocabulary related to the speech segment intent corresponding to the largest segment intent confidence score in the vocabulary file to obtain the target vocabulary, and create the vocabulary file of the dynamic recognition model based on the target vocabulary.
[0048] In an optional specific example, the speech segment intention corresponding to the first static recognition model is "credit card details query", and the corresponding segment intention confidence score is 0.9; the speech segment intention corresponding to the second static recognition model is "product obvious query", and the corresponding segment intention confidence score is 0.8. Then, the vocabulary file of the first static recognition model corresponding to the largest segment intention confidence score of 0.9 is obtained to obtain the target static vocabulary file, and the vocabulary related to credit card details query in the target static vocabulary file is obtained to obtain the target vocabulary, and the vocabulary file of the dynamic recognition model is created based on the target vocabulary.
[0049] It can be understood that the larger the fragment intent confidence score is, the more relevant the vocabulary in the corresponding vocabulary file is to the intent expressed by the speech fragment. Therefore, in the vocabulary file of the static recognition model based on the largest fragment intent confidence score, the vocabulary file of the dynamic recognition model created with the vocabulary related to the corresponding speech fragment intent includes the most vocabulary related to the user intent expressed by the target user's voice, enabling the dynamic recognition model to more accurately identify the user intent expressed by the target user's voice.
[0050] Step 103, obtaining the user intent expressed by the target user's voice through the dynamic recognition model based on the corresponding vocabulary file. This step is based on steps 101 and 102. First, the user intent and corresponding confidence score expressed by the voice segment of the target user's voice are obtained through multiple static recognition models based on the corresponding vocabulary file, and the voice segment intent and segment intent confidence score corresponding to each static recognition model are obtained. Then, the vocabulary file of the dynamic recognition model is determined based on the voice segment intent and segment intent confidence score corresponding to each static recognition model, and the user intent expressed by the target user's voice is further obtained through the dynamic recognition model based on the corresponding vocabulary file. This enables the user intent expressed by the target user's voice to be accurately recognized and the target user's voice to be correctly responded to without being limited to the vocabulary file of a single model when recognizing the user's voice.
[0051] Specifically, the structure of the dynamic recognition model may be the same as or different from the structure of the static recognition model.
[0052] Optionally, the process of obtaining the user intention expressed by the target user's voice through the dynamic recognition model based on the corresponding vocabulary file includes:
[0053] The target user's voice is recognized and transcribed by the voice device component of the dynamic model to obtain the target transcribed text; the keyword recognition component of the dynamic recognition model obtains the text including the keywords in the target transcribed text based on the vocabulary file of the dynamic recognition model to obtain the target keyword text; the intention recognition component of the dynamic recognition model determines the confidence score of each of the multiple voice intention texts corresponding to the dynamic recognition model based on the vocabulary file of the dynamic recognition model; the voice intention corresponding to the maximized confidence score is obtained to obtain the user intention expressed by the target user's voice.
[0054] In a specific example, after creating a vocabulary file of a dynamic recognition model based on the vocabulary related to credit card details query in the vocabulary file of the first static recognition model, the intention of the complete language segment of the target user's voice is recognized based on the vocabulary related to "credit card details query" to obtain the user intention "credit card consumption details query" expressed by the target user's voice.
[0055] The following further introduces the speech intention recognition method provided by the embodiment of the present invention.
[0056] Optional, such as Figure 3 As shown, Figure 1 Step 101 in the method may include the following steps:
[0057] Step 1011, using the first n speech sounds in the target user's speech as input data for each static recognition model, obtaining the user intentions and corresponding confidence scores expressed by the first n speech sounds through each static recognition model, and obtaining the first n speech intentions and the first n speech intention confidence scores corresponding to each static recognition model, wherein the target user's speech includes m speech sounds, 0<n≤m, n and m are integers.
[0058] Step 1012: If the confidence scores of the first n speech intentions are not greater than the first score threshold, the first n+1 speech intentions in the target user's speech are used as input data for each static recognition model, and the user intentions and corresponding confidence scores expressed by the first n+1 speech intentions are obtained through each static recognition model to obtain the first n+1 speech intentions and the first n+1 speech intention confidence scores corresponding to each static recognition model, until a speech intention confidence score greater than the first score threshold appears; otherwise, the first n speech intentions and the first n speech intention confidence scores corresponding to the corresponding static recognition model are determined as the speech segment intentions and segment intention confidence scores corresponding to each static recognition model.
[0059] Specifically, the initial value of n can be set to 1, that is, it can be judged in turn whether the intention confidence scores of each segment corresponding to the first speech, the first two speech... the first n speech... are greater than the first score threshold, until a segment intention confidence score greater than the first score threshold appears.
[0060] Specifically, the first score threshold may be set based on experience or based on test results after multiple tests. For example, the first score threshold may be set to a value between 0.85 and 0.95 based on experience.
[0061] It is understandable that in actual application scenarios, such as in the scenario of intelligent customer service, the target user voice is generated and input in chronological order. Then, multiple static recognition models configured with vocabulary files in different fields are used to perform intent recognition on several previously input voice fragments, and based on the confidence score of the intent recognition result, it is possible to determine which specific field of the above-mentioned different fields the user intention expressed by the target user's voice is related to. In this way, the vocabulary files of the relevant fields can be obtained, and the intent recognition of the subsequently input voice can be continued based on the vocabulary files of the relevant fields. This is not limited to the vocabulary files of a single model, and the user intention expressed by the target user's voice can be quickly and accurately identified.
[0062] The following further introduces the speech intention recognition method provided by the embodiment of the present invention.
[0063] Optionally, the voice segment of the target user's voice is a complete voice segment of the target user's voice.
[0064] Optionally, among the segment intent confidence scores of each static recognition model, when multiple segment intent confidence scores are greater than the second score threshold, such as Figure 4 As shown, Figure 1 Step 102 in may include the following steps:
[0065] Step 1021, for each target static recognition model whose corresponding segment intention confidence score is greater than the second score threshold, remove the partial segments directly related to the corresponding speech segment intention in the complete speech segment to obtain the remaining partial segments corresponding to each target static recognition model.
[0066] Specifically, the second score threshold can be set based on experience, or can be set according to test results after multiple tests. For example, the second score threshold can be set to 0.98.
[0067] In a specific example, the speech segment intention corresponding to the first static recognition model is "credit card details query", and the corresponding segment intention confidence score is 0.99. The speech segment intention corresponding to the second static recognition model is "product obvious query", and the corresponding segment intention confidence score is 0.99. The segment directly related to "credit card details query" in the complete speech segment is removed to obtain the remaining segment corresponding to the first static recognition model, and the segment directly related to "product obvious query" in the complete speech segment is removed to obtain the remaining segment corresponding to the second static model.
[0068] Step 1022, respectively obtain the user intention and corresponding confidence score expressed by the corresponding remaining segments through each target static recognition model based on the corresponding vocabulary file, and obtain the new speech segment intention and segment intention confidence score corresponding to each target static recognition model.
[0069] In a specific example, the user intent and the corresponding confidence score expressed by the remaining part of the fragment corresponding to the first static recognition model are obtained based on the corresponding vocabulary file through the first static recognition model, and the new speech fragment intent and the fragment intent confidence score corresponding to the first static recognition model are obtained; and the user intent and the corresponding confidence score expressed by the remaining part of the fragment corresponding to the second static recognition model are obtained based on the corresponding vocabulary file through the second static recognition model, and the new speech fragment intent and the fragment intent confidence score corresponding to the second static recognition model are obtained.
[0070] Step 1023, determining the vocabulary file of the dynamic recognition model based on the new speech segment intent and segment intent confidence score corresponding to each target static recognition model.
[0071] In a specific example, the vocabulary file of the static recognition model corresponding to the larger value of the segment intent confidence score of the first static recognition model and the segment intent confidence score of the second static recognition model is obtained as the vocabulary file of the dynamic recognition model.
[0072] The embodiments of the present invention can help to more accurately determine the vocabulary file of the dynamic recognition model.
[0073] Figure 5 The present invention provides a flow chart of a voice response method according to an embodiment of the present invention. The method can be performed by a voice response device according to an embodiment of the present invention. The device can be implemented in software and / or hardware. In a specific embodiment, the device can be integrated into an electronic device, such as a computer, a server, etc. The following embodiments will be described by taking the device integrated into an electronic device as an example. Figure 5 , the method may specifically include the following steps:
[0074] Step 501: determine the user intention expressed by the target user's voice through the voice intention recognition method provided by any embodiment of the present invention.
[0075] Step 502: respond to the target user's speech based on the user's intention expressed in the target user's speech.
[0076] Optionally, the process of responding to the target user's voice based on the user's intention expressed by the target user's voice includes:
[0077] Based on the user intention expressed by the target user's voice, "query the credit card consumption details", query the consumption details of the credit card under the user's name and provide them to the customer.
[0078] Specifically, based on the process of responding to the target user's voice based on the user intention expressed by the target user, the user is provided with a corresponding operation entry for the user to choose to agree or reject the automated decision result; if the user chooses to reject, the expert decision process is entered.
[0079] The voice response method provided in the embodiment of the present invention, through the voice intention recognition method provided in any embodiment of the present invention, can more accurately recognize the user's intention, and further can more accurately respond to the target user's voice, thereby improving the user experience.
[0080] Figure 6 1 is a structural diagram of a speech intention recognition device provided by an embodiment of the present invention, and the device is suitable for executing the speech intention recognition method provided by an embodiment of the present invention. Figure 6 As shown, the device may specifically include
[0081] The static recognition module 601 is used to obtain the user intention and corresponding confidence score expressed by the speech segment of the target user's speech through multiple static recognition models based on the corresponding vocabulary files, and obtain the speech segment intention and segment intention confidence score corresponding to each static recognition model. Each static recognition model is respectively suitable for identifying user intentions related to different fields, and each static recognition model is configured with a vocabulary file including vocabulary of the corresponding field. This module can determine the vocabulary file of the dynamic recognition model based on the speech segment intention and segment intention confidence score corresponding to each static recognition model.
[0082] Optionally, the voice segment of the target user's voice is a complete voice segment of the target user's voice.
[0083] Optionally, the static recognition module 601 can be specifically used to use the first n voices in the target user voice as input data of each static recognition model, obtain the user intentions and corresponding confidence scores expressed by the first n voices through each static recognition model, and obtain the first n voice intentions and the first n voice intention confidence scores corresponding to each static recognition model, wherein the target user voice includes m voices, 0<n≤m, and n and m are integers; and
[0084] If the confidence scores of the first n speech intentions are not greater than the first score threshold, the first n+1 speech intentions in the target user's speech are used as input data for each static recognition model, and the user intentions and corresponding confidence scores expressed by the first n+1 speech intentions are obtained through each static recognition model to obtain the first n+1 speech intentions and the first n+1 speech intention confidence scores corresponding to each static recognition model, until a speech intention confidence score greater than the first score threshold appears; otherwise, the first n speech intentions and the first n speech intention confidence scores corresponding to the corresponding static recognition model are determined as the speech segment intentions and segment intention confidence scores corresponding to each static recognition model.
[0085] Optionally, each static recognition model includes a speech recognition component, a keyword text acquisition component and an intent recognition component.
[0086] Optionally, the static recognition module 601 can be specifically used to recognize and transcribe the speech segment for each static recognition model through the speech recognition component of the current static recognition model to obtain the speech segment text corresponding to the current static recognition model;
[0087] Obtaining a text including keywords in the speech segment text by a keyword recognition component of the current static recognition model based on a vocabulary file of the current static recognition model to obtain a keyword text corresponding to the current static recognition model;
[0088] Determining, by the intent recognition component of the current static recognition model based on the vocabulary file of the current static recognition model, that the keyword text is a confidence score of each of the multiple speech intent texts corresponding to the current static recognition model; and
[0089] Get the maximum confidence score and the corresponding speech intent, and get the segment intent confidence score and speech segment intent corresponding to the current static recognition model.
[0090] Optionally, the static recognition module 601 can be specifically used to determine the keyword confidence score of each word included in the speech segment text through a keyword recognition component.
[0091] The large speech model is used to obtain the vocabulary included in the speech segment text, and the vocabulary in the vocabulary file of the current static recognition model to obtain the keyword text.
[0092] The dynamic vocabulary file determination module 602 is used to determine the vocabulary file of the dynamic recognition model based on the speech segment intent and segment intent confidence score corresponding to each static recognition model. This module can facilitate obtaining the user intent expressed by the target user's speech based on the corresponding vocabulary file through the dynamic recognition model.
[0093] Optionally, the dynamic vocabulary file determination module 602 can be specifically used to obtain the vocabulary file of the static recognition model corresponding to the largest segment intent confidence score among the segment intent confidence scores, to obtain the target static vocabulary file; and
[0094] The target vocabulary is obtained by acquiring vocabulary related to the speech segment intent corresponding to the maximum segment intent confidence score in the vocabulary file, and a vocabulary file of the dynamic recognition model is created based on the target vocabulary.
[0095] Optionally, the dynamic vocabulary file determination module 602 can be specifically used to, when there are multiple segment intent confidence scores greater than a second score threshold among the segment intent confidence scores of the static recognition models,
[0096] For each target static recognition model whose corresponding segment intention confidence score is greater than the second score threshold, remove the partial segments directly related to the corresponding speech segment intention in the complete speech segment to obtain the remaining partial segments corresponding to each target static recognition model;
[0097] Obtaining the user intent and corresponding confidence scores expressed by the corresponding remaining segments through each target static recognition model based on the corresponding vocabulary file, and obtaining new speech segment intent and segment intent confidence scores corresponding to each target static recognition model; and
[0098] The vocabulary file of the dynamic recognition model is determined based on the new speech segment intent and segment intent confidence score corresponding to each target static recognition model.
[0099] Dynamic recognition module 603 is used to obtain the user intention expressed by the target user's voice based on the corresponding vocabulary file through the dynamic recognition model. Combined with modules 601 and 602, firstly, the user intention and corresponding confidence score expressed by the voice segment of the target user's voice are obtained based on the corresponding vocabulary file through multiple static recognition models, and the voice segment intention and segment intention confidence score corresponding to each static recognition model are obtained. Then, the vocabulary file of the dynamic recognition model is determined based on the voice segment intention and segment intention confidence score corresponding to each static recognition model, and further based on the corresponding vocabulary file, the use intention expressed by the target user's voice is obtained through the dynamic recognition model, which can be helpful to screen out the vocabulary related to the use intention from the vocabulary corresponding to multiple static recognition models, so that when recognizing the user's voice, it is not limited to the vocabulary file of a single model, accurately recognizes the user intention expressed by the target user's voice, and correctly responds to the target user's voice.
[0100] Figure 7 is a structural diagram of a voice response device provided by an embodiment of the present invention, and the device is suitable for executing the voice response method provided by an embodiment of the present invention. Figure 7 As shown, the device may specifically include:
[0101] The user intention acquisition module 701 determines the user intention expressed by the target user's voice through the voice intention recognition method provided by any embodiment of the present invention.
[0102] The response module 702 responds to the target user's speech based on the user's intention expressed in the target user's speech.
[0103] The voice response method provided in the embodiment of the present invention, through the voice intention recognition method provided in any embodiment of the present invention, can more accurately recognize the user's intention, and further can more accurately respond to the target user's voice, thereby improving the user experience.
[0104] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example for illustration. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the functional modules described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0105] An embodiment of the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the speech intention recognition method or speech response method provided in any of the above embodiments is implemented.
[0106] An embodiment of the present invention further provides a computer-readable medium having a computer program stored thereon, and when the program is executed by a processor, the method for voice intention recognition or the method for voice response provided in any of the above embodiments is implemented.
[0107] An embodiment of the present invention further provides a computer program product, including a computer program, which, when executed by a processor, implements the speech intention recognition method or speech response method as described in any one of the embodiments of the present invention.
[0108] Reference below Figure 8 , which shows a schematic diagram of the structure of a computer system 800 of an electronic device suitable for implementing an embodiment of the present invention. Figure 8 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0109] like Figure 8 As shown, the computer system 800 includes a central processing unit (CPU) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage part 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the system 800 are also stored. The CPU 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0110] The following components are connected to the I / O interface 805: an input section 806 including a keyboard, a mouse, etc.; an output section 807 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN card, a modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I / O interface 805 as needed. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 810 as needed, so that a computer program read therefrom is installed into the storage section 808 as needed.
[0111] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 809, and / or installed from the removable medium 811. When the computer program is executed by the central processing unit (CPU) 801, the above-mentioned functions defined in the system of the present invention are executed.
[0112] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0113] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0114] The modules and / or units involved in the embodiments of the present invention may be implemented in software or hardware. The modules and / or units described may also be arranged in a processor, for example, it may be described as follows: a processor includes a static recognition module, a dynamic vocabulary file determination module and a dynamic recognition module. The names of these modules do not, in some cases, constitute limitations on the modules themselves.
[0115] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently and not be assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device implements: obtaining the user intention and corresponding confidence score expressed by the speech segment of the target user's speech through multiple static recognition models based on corresponding vocabulary files, obtaining the speech segment intention and segment intention confidence score corresponding to each static recognition model, each static recognition model is respectively suitable for identifying user intentions related to different fields, and each static recognition model is configured with a vocabulary file including vocabulary of the corresponding field; determining the vocabulary file of the dynamic recognition model based on the speech segment intention and segment intention confidence score corresponding to each static recognition model; and obtaining the user intention expressed by the target user's speech through the dynamic recognition model based on the corresponding vocabulary file.
[0116] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for speech intention recognition, characterized in that: include: Acquire the user intention and corresponding confidence score expressed by the speech segment of the target user's speech through multiple static recognition models based on corresponding vocabulary files, and obtain the speech segment intention and segment intention confidence score corresponding to each static recognition model, wherein each static recognition model is respectively suitable for identifying user intentions related to different fields, and each static recognition model is configured with a vocabulary file including vocabulary of the corresponding field; Determine the vocabulary file of the dynamic recognition model based on the speech segment intentions and segment intention confidence scores corresponding to each static recognition model; as well as The user intention expressed by the target user's voice is obtained through the dynamic recognition model based on the corresponding vocabulary file.
2. The method for speech intention recognition according to claim 1, characterized in that: The method of obtaining the user intent and corresponding confidence scores expressed by the speech segments of the target user's speech through multiple static recognition models based on corresponding vocabulary files, and obtaining the speech segment intent and segment intent confidence scores corresponding to each static recognition model, includes: Using the first n voices in the target user voice as input data of each static recognition model, obtaining the user intentions and corresponding confidence scores expressed by the first n voices through each static recognition model, and obtaining the first n voice intentions and the first n voice intention confidence scores corresponding to each static recognition model, wherein the target user voice includes m voices, 0<n≤m, n and m are integers; and If the confidence scores of the first n speech intentions are not greater than the first score threshold, the first n+1 speech intentions in the target user's speech are used as input data for each static recognition model, and the user intentions and corresponding confidence scores expressed by the first n+1 speech intentions are obtained through each static recognition model to obtain the first n+1 speech intentions and the first n+1 speech intention confidence scores corresponding to each static recognition model, until a speech intention confidence score greater than the first score threshold appears; otherwise, the first n speech intentions and the first n speech intention confidence scores corresponding to the corresponding static recognition model are determined as the speech segment intentions and segment intention confidence scores corresponding to each static recognition model.
3. The method for speech intention recognition according to claim 1 or 2, characterized in that: The determining of the vocabulary file of the dynamic recognition model based on the speech segment intentions and segment intention confidence scores corresponding to the respective static recognition models comprises: Obtaining the vocabulary file of the static recognition model corresponding to the largest segment intent confidence score among the segment intent confidence scores to obtain a target static vocabulary file; and The target vocabulary is obtained by acquiring vocabulary related to the speech segment intent corresponding to the maximum segment intent confidence score in the vocabulary file, and the vocabulary file of the dynamic recognition model is created based on the target vocabulary.
4. The method for speech intention recognition according to claim 1, characterized in that: Each of the static recognition models includes a speech recognition component, a keyword text acquisition component and an intent recognition component; The method of obtaining the user intent and corresponding confidence scores expressed by the speech segments of the target user's speech through multiple static recognition models based on corresponding vocabulary files, and obtaining the speech segment intent and segment intent confidence scores corresponding to each static recognition model, includes: For each static recognition model, the speech segment is recognized and transcribed by the speech recognition component of the current static recognition model to obtain the speech segment text corresponding to the current static recognition model; Obtaining a text including keywords in the speech segment text based on the vocabulary file of the current static recognition model through the keyword recognition component of the current static recognition model to obtain a keyword text corresponding to the current static recognition model; Determining, by the intent recognition component of the current static recognition model based on the vocabulary file of the current static recognition model, that the keyword text is a confidence score of each of the multiple speech intent texts corresponding to the current static recognition model; and Get the maximum confidence score and the corresponding speech intent, and get the segment intent confidence score and speech segment intent corresponding to the current static recognition model.
5. The method for speech intention recognition according to claim 4, characterized in that: The keyword recognition component of the current static recognition model obtains the text including the keywords in the speech segment text based on the vocabulary file of the current static recognition model to obtain the keyword text corresponding to the current static recognition model, including: The keyword text is obtained by acquiring the vocabulary included in the speech segment text through the large speech model and the vocabulary in the vocabulary file of the current static recognition model.
6. The method for speech intention recognition according to claim 1, characterized in that: The speech segment of the target user's speech is a complete speech segment of the target user's speech; The determining of the vocabulary file of the dynamic recognition model based on the speech segment intentions and segment intention confidence scores corresponding to the respective static recognition models comprises: When multiple segment intent confidence scores of the segment intent confidence scores of the static recognition models are greater than the second score threshold, For each target static recognition model whose corresponding segment intention confidence score is greater than a second score threshold, remove a partial segment directly related to the corresponding speech segment intention in the complete speech segment to obtain a remaining partial segment corresponding to each target static recognition model; Obtaining the user intent and corresponding confidence scores expressed by the corresponding remaining segments through the target static recognition models based on the corresponding vocabulary files, and obtaining new speech segment intents and segment intent confidence scores corresponding to the target static recognition models; and The vocabulary file of the dynamic recognition model is determined based on the new speech segment intents and segment intent confidence scores corresponding to the various target static recognition models.
7. A voice response method, characterized in that: include: Determine the user intention expressed by the target user's speech by using the speech intention recognition method described in any one of claims 1 to 6; as well as Respond to the target user voice based on the user intent expressed by the target user voice.
8. A speech intention recognition device, characterized in that: include: A static recognition module, used to obtain the user intention and corresponding confidence score expressed by the speech segment of the target user's speech through multiple static recognition models based on corresponding vocabulary files, and obtain the speech segment intention and segment intention confidence score corresponding to each static recognition model, wherein each static recognition model is respectively suitable for identifying user intentions related to different fields, and each static recognition model is configured with a vocabulary file including vocabulary of the corresponding field; A dynamic vocabulary file determination module, used to determine the vocabulary file of the dynamic recognition model based on the speech segment intentions and segment intention confidence scores corresponding to each static recognition model; as well as The dynamic recognition module is used to obtain the user intention expressed by the target user's voice based on the corresponding vocabulary file through the dynamic recognition model.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, it implements the voice intention recognition method as described in any one of claims 1 to 6, or implements the voice response method as described in claim 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, it implements the voice intention recognition method as described in any one of claims 1 to 6, or implements the voice response method as described in claim 7.