Method and device for identifying speech intention

By using intervention speech sets and template rule speech sets to identify user speech intentions in specific domain intention recognition and slot value extraction, and updating the data set based on the recognition results, the problem of relying on predefined intentions and slot values ​​in the prior art is solved, and fast response and efficient iteration are achieved.

CN112559697BActive Publication Date: 2025-04-18BEIJING JINGDONG SHANGKE INFORMATION TECH CO LTD +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN201910919908.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-09-26
Publication Date
2025-04-18
Estimated Expiration
2039-09-26

AI Technical Summary

Technical Problem

In the prior art, the specific field intention identification and slot value extraction methods rely too much on predefined intention and slot value, resulting in poor iterability and inability to quickly respond to the erroneous identification.

Method used

By matching the intervention speech to the user's speech from the intervention speech set and calculating the speech similarity, if the similarity is greater than the threshold, the intention is identified according to the matching intervention speech rules; if the similarity is less than or equal to the threshold, the intent is identified using the template rule speech set or the identification model, and the relevant data set is updated according to the identified intention.

Benefits of technology

It realizes the rapid and accurate identification of speech intentions, reduces the workload of data annotation, makes the data fully utilized during the iteration process, and improves the iterability and response speed of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112559697B_ABST
    Figure CN112559697B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and device for identifying speech intention, and relates to the field of computer technology. A specific implementation of the method includes: matching intervention speech for user speech from an intervention speech set, and calculating the speech similarity between the user speech and the matched intervention speech; if the speech similarity is greater than the intervention threshold, identifying the speech intention of the user speech according to the speech rules of the matched intervention speech; if the speech similarity is less than or equal to the intervention threshold, identifying the speech intention of the user speech using a template rule speech set or a recognition model; updating the intervention speech set, template rule speech set or recognition model according to the identified speech intention. This implementation can quickly and accurately identify speech intention, and quickly respond to commonly used speech; while realizing the recognition of user speech, the data is updated, so that the data is fully utilized in the iterative process, reducing the workload of data labeling.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method and device for identifying speech intent. Background Art

[0002] With the development of artificial intelligence technology, human-computer dialogue systems have become a key technology in the field of artificial intelligence research. From the user's perspective, following the guidance of the dialogue system to complete pre-set tasks in a specific field can reduce communication costs and improve shopping experience. From the perspective of JD's business, user behaviors in specific fields are summarized into a series of tasks. Not only can users get a better human-computer interaction experience, but also save customer service and other labor costs.

[0003] The existing methods for domain-specific intent recognition and slot value extraction generally follow the following process:

[0004] 1. Apply intent recognition methods to identify user intent; identify user speech through pre-defined intents and map it to a pre-defined intent.

[0005] 2. Apply the slot value extraction method to extract useful slot values. The main task of slot value extraction is to extract the slots corresponding to the predefined information from the user's speech as much as possible under the premise of specific fields and intentions. That is, to extract meaningful information from the user's speech.

[0006] 3. Submit the intent and slot value to the business system and execute the business action. Based on the correct identification of user intent and slot value extraction, the corresponding business action is executed according to the pre-defined business logic.

[0007] In the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art:

[0008] 1. Over-reliance on pre-defined intents and slot values, poor iterability;

[0009] 2. It is impossible to provide quick feedback on incorrect wording. Summary of the invention

[0010] In view of this, an embodiment of the present invention provides a method and device for identifying speech intent, which can quickly and accurately identify speech intent and quickly respond to commonly used speech. While realizing the recognition of user speech, the data is updated so that the data can be fully utilized in the iterative process, reducing the workload of data labeling.

[0011] To achieve the above objective, according to one aspect of an embodiment of the present invention, a method for identifying speech intent is provided.

[0012] A method for identifying speech intentions in an embodiment of the present invention includes: matching intervention speech for user speech from an intervention speech set, and calculating the speech similarity between the user speech and the matched intervention speech; if the speech similarity is greater than an intervention threshold, identifying the speech intentions of the user speech according to the speech rules of the matched intervention speech; if the speech similarity is less than or equal to the intervention threshold, identifying the speech intentions of the user speech using a template rule speech set or a recognition model; and updating the intervention speech set, the template rule speech set or the recognition model according to the identified speech intentions.

[0013] Optionally, matching intervention speech to user speech from an intervention speech set, and calculating speech similarity between the user speech and the matched intervention speech, includes: segmenting the user speech to obtain speech segmentation; matching intervention speech to the user speech from an intervention speech set based on the speech segmentation; wherein the intervention speech set includes intervention speech and speech rules; calculating word vectors and word frequency inverse text frequency of the user speech and the matched intervention speech; calculating speech similarity between the user speech and the matched intervention speech based on the word vectors and the word frequency inverse text frequency; and after identifying the speech intent of the user speech based on the speech rules of the matched intervention speech, it also includes: extracting the slot value of the user speech according to the speech rules of the matched intervention speech.

[0014] Optionally, the recognition model includes an intention recognition model and a slot value extraction model, and uses a template rule speech set or a recognition model to identify the speech intention of the user speech, including: matching template rule speech for the user speech from the template rule speech set based on the speech segmentation; wherein the template rule speech set includes template rule speech and its speech rules; calculating the word vector and word frequency inverse text frequency of the user speech and the matching template rule speech; calculating the speech similarity between the user speech and the matching template rule speech based on the word vector and the word frequency inverse text frequency; if the speech similarity is greater than the template threshold, determining the speech intention of the user speech based on the speech rules of the matching template rule speech, and extracting the slot value of the user speech; if the speech similarity is less than or equal to the template threshold, determining the speech intention of the user speech using the intention recognition model, and extracting the slot value of the user speech using the slot value extraction model.

[0015] Optionally, before matching intervention speech to user speech from the intervention speech set, it also includes: filtering out known speech that can match the template rule speech from historical data, adding speech annotations to the known speech, and adding them to the training data set; filtering out unknown speech that has no matching template rule speech and cannot be recognized by the recognition model from historical data; if the unknown speech is a common speech, setting speech rules for the unknown speech and adding it to the intervention speech set; wherein the speech rules include speech intention and slot value position.

[0016] Optionally, the intervention speech set, the template rule speech set or the recognition model is updated according to the recognized speech intention, including: obtaining training speech from historical data, adding speech annotations to the training speech, the intervention speech and the template rule speech, and adding them to the training data set; using the training data set to train the learning model; calculating the accuracy and recall of the learning model in the test speech set and the training data set; if the accuracy is greater than or equal to the preset accuracy and the recall is greater than or equal to the preset recall, then updating the intent recognition model and the slot value extraction model according to the learning model through training; if the accuracy is less than the preset accuracy or the recall is less than the preset recall, then retraining.

[0017] Optionally, updating the intervention speech set, the template rule speech set or the recognition model according to the identified speech intention also includes: using the trained learning model to perform regression testing on the unknown speech and the training speech with speech annotations; adding the unknown speech and the training speech that pass the test to the test speech set; and updating the template rule speech set based on the unknown speech and the training speech that fail.

[0018] Optionally, updating the intervention speech set, the template rule speech set or the recognition model according to the identified speech intention also includes: performing regression testing on the known speech using the template rule speech set; adding the known speech that passes the test to the test speech set; recording the known speech that fails the test as an adjustment speech; and updating the intervention speech set based on the adjustment speech.

[0019] To achieve the above objective, according to another aspect of an embodiment of the present invention, a device for identifying speech intent is provided.

[0020] A device for identifying speech intentions according to an embodiment of the present invention includes: a matching unit, used to match intervention speech for user speech from an intervention speech set, and calculate the speech similarity between the user speech and the matched intervention speech; a first recognition unit, used to identify the speech intentions of the user speech according to the speech rules of the matched intervention speech if the speech similarity is greater than an intervention threshold; a second recognition unit, used to identify the speech intentions of the user speech using a template rule speech set or a recognition model if the speech similarity is less than or equal to the intervention threshold; and an updating unit, used to update the intervention speech set, the template rule speech set or the recognition model according to the identified speech intentions.

[0021] Optionally, the matching unit is also used to: segment the user speech to obtain speech segmentation; match intervention speech for the user speech from an intervention speech set based on the speech segmentation; wherein the intervention speech set includes intervention speech and its speech rules; calculate the word vector and word frequency inverse text frequency of the user speech and the matched intervention speech; calculate the speech similarity between the user speech and the matched intervention speech based on the word vector and the word frequency inverse text frequency; and the first recognition unit is also used to: extract the slot value of the user speech according to the speech rules of the matched intervention speech.

[0022] Optionally, the recognition model includes an intention recognition model and a slot value extraction model, and the second recognition unit is also used to: match the template rule speech for the user speech from the template rule speech set based on the speech segmentation; wherein the template rule speech set includes template rule speech and its speech rules; calculate the word vector and word frequency inverse text frequency of the user speech and the matching template rule speech; calculate the speech similarity between the user speech and the matching template rule speech based on the word vector and the word frequency inverse text frequency; if the speech similarity is greater than the template threshold, determine the speech intent of the user speech based on the speech rules of the matching template rule speech, and extract the slot value of the user speech; if the speech similarity is less than or equal to the template threshold, determine the speech intent of the user speech using the intention recognition model, and extract the slot value of the user speech using the slot value extraction model.

[0023] Optionally, it also includes a training unit, which is used to: filter out known speech that can match the template rule speech from historical data, add speech annotations to the known speech, and add them to the training data set; filter out unknown speech that has no matching template rule speech and cannot be recognized by the recognition model from historical data; if the unknown speech is a common speech, set speech rules for the unknown speech and add it to the intervention speech set; wherein the speech rules include speech intention and slot value position.

[0024] Optionally, the updating unit is also used to: obtain training speech from historical data, add speech annotations to the training speech, the intervention speech and the template rule speech, and add them to the training data set; use the training data set to train the learning model; calculate the accuracy and recall of the learning model in the test speech set and the training data set; if the accuracy is greater than or equal to the preset accuracy and the recall is greater than or equal to the preset recall, then update the intent recognition model and the slot value extraction model according to the learning model through training; if the accuracy is less than the preset accuracy or the recall is less than the preset recall, then retrain.

[0025] Optionally, the updating unit is further used to: perform regression testing on the unknown speech and the training speech with speech annotations using the trained learning model; add the unknown speech and the training speech that pass the test to the test speech set; and update the template rule speech set based on the unknown speech and the training speech that fail the test.

[0026] Optionally, the updating unit is further used to: perform regression testing on the known speech using the template rule speech set; add the known speech that passes the test to the test speech set; record the known speech that fails the test as adjustment speech; and update the intervention speech set based on the adjustment speech.

[0027] To achieve the above objective, according to another aspect of an embodiment of the present invention, an electronic device for identifying speech intent is provided.

[0028] An electronic device for identifying speech intent according to an embodiment of the present invention includes: one or more processors; a storage device for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement a method for identifying speech intent according to an embodiment of the present invention.

[0029] To achieve the above objective, according to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided.

[0030] A computer-readable storage medium according to an embodiment of the present invention stores a computer program, which, when executed by a processor, implements a method for identifying speech intent according to an embodiment of the present invention.

[0031] One embodiment of the above invention has the following advantages or beneficial effects: because the intervention speech is matched for the user speech from the intervention speech set, and the speech similarity between the user speech and the matched intervention speech is calculated; if the speech similarity is greater than the intervention threshold, the speech intention of the user speech is identified according to the speech rules of the matched intervention speech; if the speech similarity is less than or equal to the intervention threshold, the speech intention of the user speech is identified using the template rule speech set or the recognition model; the technical means of updating the intervention speech set, the template rule speech set or the recognition model according to the identified speech intention overcomes the technical problem of over-reliance on pre-defined intentions and slot values ​​and poor iterability; the technical problem of being unable to quickly feedback on incorrectly identified speech, thereby achieving rapid and accurate identification of speech intentions and rapid response to commonly used speech; while realizing the recognition of user speech, the data is updated so that the data can be fully utilized in the iterative process, thereby reducing the workload of data labeling.

[0032] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.

[0034] Figure 1 This is the existing method flow for intent recognition and slot value extraction;

[0035] Figure 2 is a schematic diagram of the main steps of a method for identifying speech intent according to an embodiment of the present invention;

[0036] Figure 3 is a schematic diagram of an implementation framework of a method for identifying speech intent according to an embodiment of the present invention;

[0037] Figure 4 This is a schematic diagram of the deep learning training method that can be used as a reference;

[0038] Figure 5 is a schematic diagram of main modules of a device for identifying speech intention according to an embodiment of the present invention;

[0039] Figure 6 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;

[0040] Figure 7 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION

[0041] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0042] It should be pointed out that the embodiments of the present invention and the technical features therein may be combined with each other without conflict.

[0043] like Figure 1 As shown, the existing method flow of intent recognition and slot value extraction includes:

[0044] 1. Apply intent recognition methods to identify user intent; identify user speech through pre-defined intents and map them to a pre-defined intent. The main methods of intent recognition currently include: rule-based intent recognition based on pre-defined dictionaries and templates; intent recognition based on statistical methods; and intent recognition based on deep learning; such as CNN, LSTM and other deep learning methods.

[0045] 2. Apply slot value extraction methods to extract useful slot values. The main task of slot value extraction is to extract the slots corresponding to the predefined information from the user's speech as much as possible under the premise of specific fields and intentions. That is, to extract meaningful information from the user's speech. For example, in the slot value extraction in the shopping field, brands and products are usually extracted. The main methods currently include: rule matching methods based on predefined dictionaries and slot value types; and deep learning methods based on sequence standards.

[0046] 3. Submit the intent and slot value to the business system to execute business actions; based on the correct identification of user intent and slot value extraction, execute the corresponding business actions according to the pre-defined business logic. For example, in the field of shopping, when the user intent is shopping and the slot value extracted is a mobile phone, the business system will execute the business action of purchasing a mobile phone.

[0047] The above method has the following disadvantages:

[0048] 1. Over-reliance on pre-defined intents and slot values, poor iterability

[0049] This method requires the unified collection and labeling of the language in a specific field. Analysts are required to predefine intents and slot values ​​based on previous work experience. According to the predefined intents and slot values, corresponding rules are summarized or deep learning methods are trained. When users add new intents or slot value types, they are often unable to be identified or are identified incorrectly.

[0050] 2. No quick feedback on errors

[0051] This method is often accompanied by data regression and re-labeling when updating, and the intent and slot value types need to be redefined. An update often takes a week or even longer. For some of the words that users often say, there is a lack of necessary hot fixes. Even if there are certain hot fixes, the fix cannot be reflected in the iterative process of the intent slot value extraction method.

[0052] In the context of the rapid development and application of artificial intelligence. Human-computer interaction systems are becoming more and more closely integrated with people's daily lives, and have been applied to many fields such as shopping and travel. A good intent recognition and slot value extraction method can bring users a good user experience, thereby facilitating user behavior and saving the cost of communication between enterprises and users. In the traditional intent recognition and slot value extraction process, there is a lack of methods for quickly responding to incorrectly recognized words. At the same time, the iteration of the method requires a lot of manpower and is time-consuming. In view of the shortcomings of traditional intent recognition and slot value extraction, the present invention proposes an iterative specific domain intent recognition and slot value extraction method, which is of great significance for the development and iteration of human-computer interaction systems in specific fields.

[0053] To this end, the present invention proposes an iterative general method for specific domain intent recognition and slot value extraction. This general method can help summarize a series of user behaviors into specific tasks, and continuously develop and evolve itself with the interaction and feedback between users and the system. This invention is of great significance for improving the human-computer interaction experience of users in specific fields and for JD.com to reduce the labor costs related to direct communication with customers such as customer service.

[0054] The key point of the present invention is to propose a fast-response and iterative intent recognition and slot value extraction framework. The present invention provides an intent and slot value intervention entry module that can achieve a quick response to the user's commonly used words. In the deep learning algorithm intent slot value extraction training module, the source of training data is three parts, including new data annotated by the intent slot value annotation module, data from the rule template matching words temporary storage module and the intent and slot value intervention words temporary storage module.

[0055] After training a usable model, the present invention adopts a chain update mechanism to update the rule template and the intent slot value intervention module, thereby realizing the iteration of each module and helping to maintain the lightweight of the service.

[0056] The present invention realizes the circulation of data in a fast response and feedback iterative system through the iteration-update mechanism, thereby realizing the fast response and iteration of the entire intent recognition and slot value extraction system.

[0057] The present invention proposes an iterative specific domain identification and slot value extraction framework. By applying this framework, it is possible to quickly build intent identification and slot value extraction services for specific domains. And a quick response and iterative solution is provided for the service. The present invention provides a manual intervention module to achieve a quick response to users' high-frequency speech, avoiding the need for traditional modules to update services to fix problems. In addition, in each module, a data temporary storage function is provided, which can make full use of data in the iterative process and reduce the workload of data labeling. The update of the model is often accompanied by the update of the rule template and the intent and slot value intervention, which avoids data expansion and is beneficial to the maintenance of the service.

[0058] Figure 2 Schematic diagram of the main steps of the method for identifying speech intent according to an embodiment of the present invention. Figure 2 As shown, the method for identifying speech intention in an embodiment of the present invention mainly includes the following steps:

[0059] Step S201: Match intervention speech to user speech from the intervention speech set, and calculate the speech similarity between the user speech and the matched intervention speech.

[0060] The intervention speech set includes intervention speech and its speech rules. Intervention speech refers to common speech that cannot be matched to template rule speech and cannot be recognized by the recognition model. Each intervention speech corresponds to a fixed speech rule. Speech similarity is used to measure the similarity between user speech and related intervention speech. Speech similarity can be calculated using Euclidean distance, Pearson correlation coefficient, Jaccard coefficient (Jaccard similarity coefficient) or cosine similarity.

[0061] In order to achieve a quick response to user speech, intervention processing can be used to respond to certain specific speech according to preset rules. That is, after receiving the user speech, first query whether there are similar speech in the intervention speech set, so as to directly intervene in the user speech that cannot match the template rule speech and cannot be recognized by the recognition model.

[0062] In an embodiment of the present invention, step S201 can be implemented in the following manner: segment the user speech to obtain speech segmentation; match the intervention speech to the user speech from the intervention speech set based on the speech segmentation; wherein the intervention speech set includes the intervention speech and its speech rules; calculate the word vector and word frequency inverse text frequency of the user speech and the matching intervention speech; calculate the speech similarity between the user speech and the matching intervention speech based on the word vector and word frequency inverse text frequency.

[0063] When calculating the similarity of speech, the speech segmentation of the user speech can be retrieved in the intervention speech set to obtain relevant intervention speech, and the speech similarity between the user speech and the relevant intervention speech is calculated. If there are multiple relevant intervention speech, the speech similarity between the user speech and each relevant intervention speech is calculated separately. Specifically, the word vectors and word frequency inverse text frequency of the user speech and the relevant intervention speech are calculated first, and then the speech similarity is calculated based on the word vectors and word frequency inverse text frequency. The speech similarity can be a weighted average of word vector similarity and cosine similarity, or it can be obtained by using other calculation methods for word vector similarity and cosine similarity.

[0064] The method for identifying speech intentions of an embodiment of the present invention may also include: filtering out known speech that can match template rule speech from historical data, adding speech annotations to the known speech, and adding them to the training data set; filtering out unknown speech that has no matching template rule speech and cannot be recognized by the recognition model from historical data; if the unknown speech is a common speech, setting speech rules for the unknown speech and adding it to the intervention speech set.

[0065] Among them, known speech is user speech that can match the template rule speech. Unknown speech is user speech whose speech similarity with the relevant intervention speech is less than or equal to the preset threshold and cannot be recognized by the deep learning model. Known speech and unknown speech can be obtained from historical data, such as logs or recognition records. Analyze historical data to filter out speech that cannot match the template rule speech and cannot be recognized by the deep learning model. Different strategies need to be adopted for this speech. If the speech is a common speech of users and needs to be quickly responded to and corrected, speech rules can be set for it and an intervention speech set can be added. This speech may be a speech that users often use and has a fixed pattern, but the number is small. This type of speech can be summarized as an intervention speech; if it is other speech, add speech annotations for it. This speech may be a speech that users often use and gather in a certain field. After adding annotations, it can be used as training data and provided to the recognition model for training. Speech rules include speech intent and slot value position. Speech intent can be the intention expressed through speech, such as viewing, listening, consulting, collecting or purchasing. The slot value position is the position of the key information in the speech. For example, in the intervention speech "I want to buy "product name"", the position of the product name is the slot, and in the speech "I want to buy a TV", "TV" is the extracted slot value.

[0066] Step S202: If the speech similarity is greater than the intervention threshold, the speech intention of the user speech is identified according to the speech rules of the matching intervention speech.

[0067] When the similarity between the user's speech and the relevant intervention speech is greater than the intervention threshold, it means that the user's speech is the same or similar to the relevant intervention speech, that is, the same speech rules can be used. At this time, the speech intention of the user's speech can be identified according to the speech rules of the relevant intervention speech. The intervention threshold can be determined according to actual needs.

[0068] The method for identifying speech intent in an embodiment of the present invention can, after identifying the speech intent of the user speech, further extract the slot value of the user speech according to the speech rules of the matching intervention speech, and based on the slot value, further give a reply, suggestion or related recommendation for the user speech.

[0069] Step S203: If the speech similarity is less than or equal to the intervention threshold, the speech intention of the user speech is identified using the template rule speech set or the recognition model.

[0070] When the similarity between the user's speech and the relevant intervention speech is not greater than the intervention threshold, it means that the user's speech is irrelevant to the relevant intervention speech, and the template rule speech set or recognition model can be further used to identify the speech intention of the user's speech. In this case, the template rule speech set can be used for identification first, or the order of the recognition model can be used for identification first. The template rule speech set includes template rule speech and its speech rules. The template rule speech refers to the speech with predefined speech rules, and each template rule speech corresponds to a fixed speech rule. The recognition model can be a convolutional neural network (CNN), a long short-term memory network (LSTM), a conditional random field (CRF), an attention-based recurrent neural network (attention-basedRNN) or a word vector and text classification tool (fsstText), etc., and can be specifically subdivided into an intent recognition model and a slot value extraction model, wherein the intent recognition model is used to identify the speech intention of the user's speech, and the slot value extraction model is used to extract the slot value of the user's speech. As a preferred embodiment, the intent recognition model can be a CNN, and the slot value extraction model can be a bidirectional LSTM combined with CRF.

[0071] As a preferred implementation, the template rule speech set is first used to identify the user speech. When the template rule speech is not matched in the template rule speech set, the order of the recognition model is used to identify the user speech.

[0072] In an embodiment of the present invention, step S203 can be implemented in the following ways: matching template rule speech for user speech from the template rule speech set based on speech segmentation; calculating the word vector and word frequency inverse text frequency of the user speech and the matching template rule speech; calculating the speech similarity between the user speech and the matching template rule speech based on the word vector and word frequency inverse text frequency; if the speech similarity is greater than the template threshold, determining the speech intent of the user speech based on the speech rules of the matching template rule speech, and extracting the slot value of the user speech; if the speech similarity is less than or equal to the template threshold, determining the speech intent of the user speech using the intention recognition model, and extracting the slot value of the user speech using the slot value extraction model.

[0073] Similar to step S201, this step can first query whether there is a template rule speech that matches the user speech in the template rule speech set, and also use the speech similarity to determine whether the user speech matches the relevant template speech, that is, whether the same speech rules can be used. If the speech similarity is greater than the template threshold, it means that there is a template rule speech that matches the user speech. At this time, the speech intention of the user speech can be determined according to the speech rules of the template rule speech, and the slot value of the user speech can be extracted; if the speech similarity is less than or equal to the template threshold, it means that there is no template rule speech that matches the user speech. At this time, the intention recognition model and the slot value extraction model can be used to determine the speech intention of the user speech and extract the slot value of the user speech. The template threshold can be determined according to actual needs.

[0074] It should be noted that the intent recognition model and the slot value extraction model are deep learning models. As a preferred implementation, the intent recognition model can use CNN, and the slot value extraction model can use bidirectional LSTM combined with CRF. For the functional implementation of intent recognition and slot value extraction, the existing implementation method can be adopted, which will not be elaborated here.

[0075] Step S204: Update the intervention speech set, template rule speech set or recognition model according to the recognized speech intention.

[0076] In an embodiment of the present invention, step S204 can be implemented in the following manner: obtaining training speech from historical data, adding speech annotations to training speech, intervention speech and template rule speech, and adding them to the training data set; using the training data set to train the learning model; calculating the accuracy and recall of the learning model in the test speech set and the training data set; if the accuracy is greater than or equal to the preset accuracy and the recall is greater than or equal to the preset recall, then through training, the intent recognition model and the slot value extraction model are updated according to the learning model; if the accuracy is less than the preset accuracy or the recall is less than the preset recall, then retrain.

[0077] In addition to using unknown speech with speech annotations to train the intent recognition model and slot value extraction model, you can also obtain training speech from historical data. After adding speech annotations to the training speech, you can use it to train the intent recognition model and slot value extraction model. In addition to logs or recognition records, historical data also includes chat records or comments. For the training of the intent recognition model or slot value extraction model, you can select training speech with speech annotations, unknown speech with speech annotations, intervention speech, and template rule speech as samples for training. The evaluation of the trained intent recognition model or slot value extraction model can be based on its accuracy and recall rate. When the accuracy is greater than or equal to the preset accuracy rate and the recall rate is greater than or equal to the preset recall rate, it means that the intent recognition model or slot value extraction model has passed the training. Among them, the accuracy rate refers to the proportion of correctly identified samples in all samples, and the recall rate refers to the proportion of the number of samples correctly identified as positive samples to all samples predicted as positive by the recognition model. The accuracy rate and recall rate can reflect the accuracy of the algorithm.

[0078] In an embodiment of the present invention, step S204 can also be implemented in the following ways: using a trained learning model to perform regression testing on unknown speech and training speech with added speech annotations; adding unknown speech and training speech that pass the test to the test speech set; and updating the template rule speech set based on unknown speech and training speech that fail.

[0079] In an embodiment of the present invention, step S204 can also be implemented in the following ways: using the template rule speech set to perform regression testing on known speech; adding known speech that passes the test to the test speech set; recording known speech that fails the test as adjustment speech; and updating the intervention speech set based on the adjustment speech.

[0080] For the training speech or unknown speech used to train the intent recognition model and slot value extraction model, after passing the regression test, it can be added to the test speech set for model training, which enriches the training data. At the same time, the training speech or unknown speech that failed the test can be used to update the template rule speech set to delete, add or replace the template rule speech, so as to ensure that the data can adapt to the changes in information and improve the accuracy of recognition.

[0081] It can be seen from the method for identifying speech intention according to the embodiment of the present invention that the intervention speech is matched for the user speech from the intervention speech set, and the speech similarity between the user speech and the matched intervention speech is calculated; if the speech similarity is greater than the intervention threshold, the speech intention of the user speech is identified according to the speech rules of the matched intervention speech; if the speech similarity is less than or equal to the intervention threshold, the speech intention of the user speech is identified using the template rule speech set or the recognition model; the technical means of updating the intervention speech set, the template rule speech set or the recognition model according to the identified speech intention overcomes the technical problem of over-reliance on pre-defined intentions and slot values ​​and poor iterability; the technical problem of being unable to quickly feedback on incorrectly identified speech, thereby achieving rapid and accurate identification of speech intentions and rapid response to commonly used speech; while realizing the recognition of user speech, the data is updated so that the data can be fully utilized in the iterative process, thereby reducing the workload of data labeling.

[0082] like Figure 3 As shown, the method for identifying speech intent of an embodiment of the present invention can be implemented based on an intent recognition and slot value extraction system and a feedback iteration system, wherein the intent recognition and slot value extraction system mainly provides intent recognition and slot value extraction functions to the outside, and the feedback iteration system mainly provides historical data collection, data labeling and entry, deep model training and other functions, and through a series of data entry and iteration processes, rapid intervention and iterative update of the intent recognition and slot value extraction parts are achieved.

[0083] Intent recognition and slot value extraction system

[0084] The system is mainly composed of three modules, namely, the intent and slot value intervention module, the template rule intent slot value extraction module and the deep learning algorithm intent slot value extraction module, among which:

[0085] 1. Intention and slot value intervention module

[0086] This module provides the function of intervening in the user's speech intention and slot value. The main purpose is to respond quickly to the user's speech. It is used to directly intervene in the user's speech that the template rule matching intention slot value extraction module and the deep learning algorithm intention slot value extraction module cannot accurately or incorrectly process. This module accepts updates from the intent and slot value intervention update module;

[0087] This module can use a full-text search engine (ElasticSearch) or other database to store intervention script sets. The basic response process for user scripts is as follows:

[0088] Segment the user's words, and enter ElasticSearch for retrieval according to the segmentation results (i.e. the obtained word segmentation);

[0089] Retrieve a preset number of most relevant words (i.e., intervention words that match the user words) from ElasticSearch, and calculate the similarity between the matching intervention words and the user words;

[0090] Sort the matching intervention words by their similarity and filter them based on the intervention threshold;

[0091] If the similarity of the speech is lower than the intervention threshold, there is no intervention result, and the user speech is handed over to the template rule intention slot value extraction module for processing;

[0092] Otherwise, the intervention is considered successful, and the user's speech intent is identified according to the speech rules of the intervention speech with the highest speech similarity, and the slot value is extracted and returned as the result.

[0093] 2. Template rule intent slot value extraction module

[0094] This module matches the user's speech according to the pre-defined template rule speech, identifies the speech intent of the user's speech based on the matched template rule speech, and extracts the slot value as the result and returns it;

[0095] It should be noted that this module accepts updates from the rule template iteration update module, adding or deleting template rule scripts. For example, the script of a template rule is as follows:

[0096] {

[0097] pattern:($I_WANT_TO_BUY_MATCHER?(?$PRODUCT$PRODUCT_MATCHER)),

[0098] result:Format("%s; product:%s","SEARCH_PRODUCT",Join("",$PRODUCT.word))

[0099] }

[0100] The template rule can match phrases such as "I want to buy (product name)" and "I want to buy (product name)". The intent of the phrase is to query the product, and the slot value is the product name.

[0101] 3. Deep learning algorithm intent slot value extraction module

[0102] This module uses a deep learning model (recognition model) to identify the intent of the speech and extract the slot value. The deep learning model used for intent recognition is CNN, and the deep learning model used for slot value extraction is a bidirectional LSTM combined with CRF.

[0103] It should be noted that this module accepts iterations and updates of the deep learning algorithm evaluation module.

[0104] Rapid response and feedback iteration system

[0105] The rapid response and feedback iteration system is also composed of multiple sub-modules, specifically:

[0106] 1. Log collection module

[0107] This module is responsible for collecting the input and output of the intent recognition and slot value extraction system and recording them as logs. Operation personnel and other personnel can analyze the logs (i.e. historical data) collected by the log collection module to filter out unknown words that the intent recognition and slot value extraction system cannot recognize or recognizes incorrectly. Different strategies can be adopted for these words. If the unknown words are common words, they need to be quickly responded to and corrected. Such words may be words that users often use and have fixed patterns, but the amount of data is not large. Such words can be summarized and intervention words can be entered through the intent and slot value intervention entry module to achieve a quick response to common words; if the unknown words are other words (i.e. common words), such words may be concentrated in a certain field of words, and can be entered into the intent slot value annotation module for annotation, so as to be provided as training data to the deep learning model for training.

[0108] This module can use storage structures such as Hadoop Distributed File System (HDFS) to store logs.

[0109] 2. Other data source collection modules

[0110] This module is responsible for collecting historical data from other sources, such as customer service chat records or product reviews, obtaining training scripts from them, and entering the training scripts into the intent slot value labeling module for labeling.

[0111] 3. Intent slot value annotation module

[0112] This module provides the function of adding speech annotation to unknown speech and training speech imported by the log collection module and other data source collection modules. For example, after the speech "I want to buy milk" is annotated by the intent slot value annotation module, the annotated speech intent is SEARCH_PRODUCT, and the extracted slot value is milk. The annotated data adopts a unified format to facilitate subsequent iterations.

[0113] 4. Deep learning algorithm intent slot value extraction training module

[0114] This module is used to train deep learning models. The deep learning model used for intent recognition is the CNN model, and the deep learning model used for slot value extraction is a bidirectional LSTM combined with CRF model. The sources of training data for deep learning models are: unknown speech and training speech annotated by the intent slot value annotation module, known speech that can be matched by template rule speech stored in the rule template matching speech temporary storage module, and intervention speech stored in the intent and slot value intervention speech temporary storage module.

[0115] It should be noted that the training method adopted by the deep learning model follows the general deep learning training method process. In addition, the data used to train the deep learning model needs to be labeled data, and the data provided to the deep learning model for training should be labeled as being within a specific domain. If a speech exceeds the pre-set domain, the pre-set domain of the deep learning model needs to be redefined and the deep learning model needs to be retrained. The data of the intervention speech set and the template rule speech set may not be labeled. If this part of the data is within the domain of the deep learning model, it can be used for deep model training after adding annotations in the intent slot value annotation module to achieve iterativeness.

[0116] 5. Deep learning algorithm evaluation module

[0117] The learning model trained by the deep learning algorithm intent slot value extraction training module is handed over to the deep learning algorithm evaluation module for evaluation. The deep learning algorithm evaluation module mainly involves the following contents:

[0118] Algorithm evaluation and optimization

[0119] Algorithm evaluation and optimization generally only focuses on whether the algorithm has been improved under the current training data and verification data. The main indicators of algorithm evaluation and optimization are accuracy and recall. The newly trained learning model is considered to have passed the algorithm evaluation and optimization only when the accuracy and recall indicators in the test script set maintained by the module and the newly annotated data set are better than the online running model (i.e., the recognition model). Accuracy refers to the proportion of samples predicted correctly to all samples. Recall refers to the proportion of samples predicted correctly as positive samples to all samples predicted as positive by the model. Accuracy and recall together reflect the accuracy of the algorithm.

[0120] Business evaluation optimization

[0121] In the present invention, business evaluation optimization mainly refers to that the accuracy and recall rate of the newly trained learning model in recognizing commonly used user dialogues should not be lower than that of the online running model. In addition, after the deep learning model is updated based on the learning model, the user experience should not be reduced. Business evaluation needs to consider whether the launch of the learning model leads to the actual performance of the online running model. There may be data annotation deviations, which lead to poor performance of the model in real online business. At this time, the current model should be evaluated to indicate whether there are deviations in the labeled training data.

[0122] Model update and data diversion

[0123] In the deep learning algorithm evaluation module, models that have not passed the algorithm evaluation optimization and business evaluation optimization will be returned to the deep learning algorithm intent slot value extraction training module for parameter adjustment and retraining. For models that have passed the algorithm evaluation optimization and business evaluation optimization, the following operations will be performed:

[0124] Use the new model to perform regression testing on unknown and trained speech. After the test, the correctly identified parts will be added to the test speech set maintained by the deep learning algorithm evaluation module, and the incorrectly identified parts will be handed over to the rule template iteration update module for processing;

[0125] Update online models.

[0126] 6. Rule template iteration update module

[0127] This module is used to delete, add and update the template rule script set. This module receives the scripts that cannot be matched by the learning model diverted by the deep learning algorithm evaluation module, processes, counts and summarizes these scripts, removes the template rule scripts that are no longer needed, and adds or updates the template rule scripts.

[0128] In addition, this module performs regression testing on known speech. The regression testing of the rule template intent slot value extraction module refers to whether the speech that can be correctly recognized can still correctly recognize its speech intent and extract the correct slot value after the template rule speech is updated. The known speech that can be recognized will be temporarily stored in the rule template matching speech temporary storage module. This part of the known speech is used for iterative use by the deep learning intent slot value extraction training module; the known speech that cannot be recognized will be handed over to the intent and slot value intervention update module.

[0129] Rule template matching speech temporary storage module

[0130] This module is responsible for storing known words that can be matched by template rule words. As one of the training data providers for the deep learning algorithm intent slot value extraction training module, it provides feedback for the deep learning model and rule templates to achieve iteration. For example, the following format is used to record and store known words:

[0131] {

[0132] “userSpeech”:

[0133] {

[0134] "text":"I want to listen to Zhou's "Rice Fragrance",

[0135] "domain":"music",

[0136] "intent":"MUSIC_GENERAL_PLAY",

[0137] "labeledResult": "I want to listen <singer> Zhou< / singer> of<MUSIC_NAME> Rice Fragrance< / MUSIC_NAME> ”

[0138] }

[0139] }

[0140] 8. Intention and slot value intervention entry module:

[0141] This module provides the function of inputting intent and slot value intervention. When the intent recognition and slot value extraction system cannot correctly identify or recognize inaccurate speech, and needs a quick response, the speech that needs intervention can be input through this module. This module will pass the input data to the intent and slot value intervention update module, and update the intent slot value and intervention module in real time, so as to achieve a quick response to the user's speech.

[0142] 9. Intention and slot value intervention update module:

[0143] This module accepts the intervention words entered by the intention and slot value intervention entry module, as well as the adjustment words of the rule template iteration update module, and stores the received data in the intention and slot value intervention words temporary storage module to realize real-time update of the intention and slot value intervention module.

[0144] 10. Temporary storage module for intention and slot value intervention

[0145] The function of this module is similar to that of the rule template matching speech temporary storage module. The stored data is relevant data that can be correctly processed by the intent and slot value intervention module.

[0146] In the method for identifying speech intent in an embodiment of the present invention, the method for calculating text similarity is to calculate the weighted average of word vectors and cosine similarity of tf-idf.

[0147] In the present invention, the main process of similarity calculation is:

[0148] 1. Calculate word vectors:

[0149] The calculation of word vectors can be obtained through the language model training of neural networks, or through the current open source models such as Bert. In the present invention, a neural network is used to pre-train the training corpus. The training of word vectors is carried out using the N-gram language model commonly used in the industry.

[0150] 2. Calculate word frequency inverse text frequency:

[0151] The calculation result of term frequency-inverse document frequency (TF-IDF) is given in the form of a vector. TF refers to document frequency. The more frequently a term appears, the more important it is. IDF refers to inverse document frequency index. The more a term appears in multiple documents, the less important it is.

[0152] 3. Calculate the similarity of the words:

[0153] The cosine similarity calculation is given by the following formula:

[0154]

[0155] Where A and B represent the vectorization results of two sentences, respectively. In this invention, they are word vectors and TF-IDF vectors.

[0156] The similarity of the words is obtained by the weighted value of TF-IDF cosine similarity and word vector cosine similarity. As follows:

[0157] Similarity = w1*Similarity(TF-IDF)+w2*Similarity(w2vec); w1 and w2 are the weights of TF-IDF cosine similarity and word vector cosine similarity respectively, Similarity(TF-IDF) is TF-IDF cosine similarity, and Similarity(w2vec) is word vector cosine similarity.

[0158] The method for identifying the intention of speech in an embodiment of the present invention, the process of CNN for intent recognition is: converting user speech into word vectors for subsequent processing; inputting the word vectors into the convolution layer for feature extraction. To avoid overfitting, the output of the convolution layer will pass through the sampling layer, also known as the pooling layer. Generally, there are two types of pooling: average pooling and maximum pooling. In the present invention, maximum pooling is used as the pooling layer. The features of the output of the pooling layer will be collected in the fully connected layer and normalized by softmax to obtain the final probability.

[0159] In the method for identifying speech intent in an embodiment of the present invention, the process of extracting slot values ​​by combining bidirectional LSTM with CRF is as follows:

[0160] For keywords, some labels can be set in advance. For example, for the phrase "I want to listen to a certain music by a certain singer", the label is "I (O) want to (O) listen to a certain (O-SINGER) singer (I-SINGER) (O) certain (B-SONG) music (I-SONG) by (I-SINGER)", which includes 5 labels (O, B-SONG, I-SONG, B-SINGER, I-SINGER); for the user's input phrase, it is converted into a word vector for subsequent processing; the word vector is input into the LSTM layer for training, and the output of the LSTM layer is the probability value of each label; the label probability output by the LSTM layer is passed through CRF to calculate the most likely sequence of the entire sentence label. In the phrase "I want to listen to a certain music by a certain singer", a certain singer will be proposed as a SINGER keyword, and a certain music will be proposed as a SONG keyword.

[0161] The essence of a convolutional network is a mapping from input to output. It can learn a large number of mapping relationships between inputs and outputs without the need for any precise mathematical expressions between inputs and outputs. As long as the convolutional network is trained with a known pattern, the network has the mapping ability between input and output pairs. The convolutional network performs supervised training, so its sample set is composed of vector pairs in the form of (input vector, ideal output vector). All these vector pairs should be derived from the actual "running" results of the system that the network is about to simulate. They can be collected from the actual running system. Before starting training, all weights should be initialized with some different small random numbers. "Small random numbers" are used to ensure that the network will not enter a saturated state due to excessive weights, thereby causing training failure; "different" is used to ensure that the network can learn normally. In fact, if the same number is used to initialize the weight matrix, the network will not be able to learn.

[0162] The method for identifying speech intent in the embodiment of the present invention adopts the existing training method for training the intent recognition model and the slot value extraction model. Figure 4 As shown in the figure, the training process of convolutional neural network is similar to that of traditional neural network, and also refers to the back propagation algorithm.

[0163] The first stage, the forward propagation stage:

[0164] a) Take a sample (X, Yp) from the sample set and input X into the network;

[0165] b) Calculate the corresponding actual output Op.

[0166] In this stage, information is transformed from the input layer to the output layer. This process is also the process performed when the network is running normally after training. In this process, the network performs calculations (actually, the input is multiplied by the weight matrix of each layer to obtain the final output result):

[0167] Op=Fn(…(F2(F1(XpW(1))W(2))…)W(n))

[0168] The second stage, the back propagation stage

[0169] a) Calculate the difference between the actual output Op and the corresponding ideal output Yp;

[0170] b) Back propagate and adjust the weight matrix according to the method of minimizing the error.

[0171] Figure 5 Schematic diagram of the main modules of the apparatus for recognizing speech intention according to an embodiment of the present invention. Figure 5 As shown, the device 500 for identifying speech intention according to an embodiment of the present invention includes: a matching unit 501, a first identification unit 502, a second identification unit 503 and an updating unit 504.

[0172] The matching unit 501 is used to match the intervention speech to the user speech from the intervention speech set, and calculate the speech similarity between the user speech and the matched intervention speech;

[0173] A first recognition unit 502 is configured to recognize the speech intention of the user speech according to the speech rule of the matched intervention speech if the speech similarity is greater than the intervention threshold;

[0174] The second recognition unit 503 is used to recognize the speech intention of the user speech by using a template rule speech set or a recognition model if the speech similarity is less than or equal to an intervention threshold;

[0175] The updating unit 504 is used to update the intervention speech set, the template rule speech set or the recognition model according to the recognized speech intention.

[0176] In an embodiment of the present invention, the matching unit 501 is also used to: segment the user speech to obtain speech segmentation; match intervention speech for the user speech from an intervention speech set based on the speech segmentation; wherein the intervention speech set includes intervention speech and its speech rules; calculate the word vector and word frequency inverse text frequency of the user speech and the matched intervention speech; calculate the speech similarity between the user speech and the matched intervention speech based on the word vector and the word frequency inverse text frequency.

[0177] In the embodiment of the present invention, the first recognition unit 502 is further used to extract the slot value of the user speech according to the speech rule of the matched intervention speech.

[0178] In addition, the recognition model includes an intent recognition model and a slot value extraction model.

[0179] In an embodiment of the present invention, the second recognition unit 503 is also used to: match the template rule speech for the user speech from the template rule speech set based on the speech segmentation; wherein the template rule speech set includes template rule speech and its speech rules; calculate the word vector and word frequency inverse text frequency of the user speech and the matching template rule speech; calculate the speech similarity between the user speech and the matching template rule speech according to the word vector and the word frequency inverse text frequency; if the speech similarity is greater than the template threshold, determine the speech intention of the user speech according to the speech rules of the matching template rule speech, and extract the slot value of the user speech; if the speech similarity is less than or equal to the template threshold, determine the speech intention of the user speech using the intention recognition model, and extract the slot value of the user speech using the slot value extraction model.

[0180] In an embodiment of the present invention, the device 500 for identifying speech intent also includes a training unit (not shown in the figure), which is used to: filter out known speech that can match the template rule speech from historical data, add speech annotations to the known speech, and add them to the training data set; filter out unknown speech that has no matching template rule speech and cannot be recognized by the recognition model from historical data; if the unknown speech is a common speech, set speech rules for the unknown speech and add it to the intervention speech set; wherein the speech rules include speech intent and slot value position.

[0181] In an embodiment of the present invention, the updating unit 504 is also used to: obtain training speech from historical data, add speech annotations to the training speech, the intervention speech and the template rule speech, and add them to the training data set; use the training data set to train the learning model; calculate the accuracy and recall of the learning model in the test speech set and the training data set; if the accuracy is greater than or equal to the preset accuracy and the recall is greater than or equal to the preset recall, then update the intent recognition model and the slot value extraction model according to the learning model through training; if the accuracy is less than the preset accuracy or the recall is less than the preset recall, then retrain.

[0182] In an embodiment of the present invention, the updating unit 504 is further used to: perform regression testing on the unknown speech and the training speech with speech annotations using the trained learning model; add the unknown speech and the training speech that pass the test to the test speech set; and update the template rule speech set based on the unknown speech and the training speech that fail the test.

[0183] In an embodiment of the present invention, the updating unit 504 is further used to: perform regression testing on the known speech using the template rule speech set; add the known speech that passes the test to the test speech set; record the known speech that fails the test as an adjustment speech; and update the intervention speech set based on the adjustment speech.

[0184] It can be seen from the device for identifying speech intention according to the embodiment of the present invention that the intervention speech is matched for the user speech from the intervention speech set, and the speech similarity between the user speech and the matched intervention speech is calculated; if the speech similarity is greater than the intervention threshold, the speech intention of the user speech is identified according to the speech rules of the matched intervention speech; if the speech similarity is less than or equal to the intervention threshold, the speech intention of the user speech is identified using the template rule speech set or the recognition model; the technical means of updating the intervention speech set, the template rule speech set or the recognition model according to the identified speech intention overcomes the technical problem of over-reliance on pre-defined intentions and slot values ​​and poor iterability; the technical problem of being unable to quickly feedback on incorrectly identified speech, thereby achieving rapid and accurate identification of speech intentions and rapid response to commonly used speech; while realizing the recognition of user speech, the data is updated so that the data can be fully utilized in the iterative process, thereby reducing the workload of data labeling.

[0185] Figure 6 An exemplary system architecture 600 is shown to which the method for identifying speech intent or the apparatus for identifying speech intent according to an embodiment of the present invention can be applied.

[0186] like Figure 6 As shown, system architecture 600 may include terminal devices 601, 602, 603, network 604 and server 605. Network 604 is used to provide a medium for communication links between terminal devices 601, 602, 603 and server 605. Network 604 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0187] The user can use the terminal devices 601, 602, 603 to interact with the server 605 through the network 604 to receive or send messages, etc. Various communication client applications can be installed on the terminal devices 601, 602, 603, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc.

[0188] The terminal devices 601 , 602 , and 603 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers, etc.

[0189] The server 605 may be a server that provides various services, such as a backend management server that provides support for shopping websites browsed by users using the terminal devices 601, 602, and 603. The backend management server may analyze and process the received data such as product information query requests, and feed back the processing results (such as target push information and product information) to the terminal device.

[0190] It should be noted that the method for identifying speech intent provided in the embodiment of the present invention is generally executed by the server 605 , and accordingly, the device for identifying speech intent is generally set in the server 605 .

[0191] It should be understood that Figure 6 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0192] Reference below Figure 7 , which shows a schematic diagram of the structure of a computer system 700 of a terminal device suitable for implementing an embodiment of the present invention. Figure 7 The terminal 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.

[0193] like Figure 7 As shown, the computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage part 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the system 700 are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0194] 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 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 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 needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage section 708 as needed.

[0195] 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 709, and / or installed from the removable medium 711. When the computer program is executed by the central processing unit (CPU) 701, the above-mentioned functions defined in the system of the present invention are executed.

[0196] 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.

[0197] 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.

[0198] The modules involved in the embodiments of the present invention may be implemented in software or hardware. The modules described may also be arranged in a processor. For example, they may be described as: a processor includes a matching unit, a first recognition unit, a second recognition unit, and an update unit. The names of these modules do not, in some cases, constitute a limitation on the module itself. For example, the update unit may also be described as "a unit that updates the intervention speech set, the template rule speech set, or the recognition model according to the recognized speech intention."

[0199] 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 without being 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 includes: step S201: matching intervention speech for user speech from the intervention speech set, and calculating the speech similarity between the user speech and the matched intervention speech; step S202: if the speech similarity is greater than the intervention threshold, identifying the speech intention of the user speech according to the speech rules of the matched intervention speech; step S203: if the speech similarity is less than or equal to the intervention threshold, identifying the speech intention of the user speech using the template rule speech set or the recognition model; step S204: updating the intervention speech set, the template rule speech set or the recognition model according to the recognized speech intention.

[0200] According to the technical solution of the embodiment of the present invention, the intervention speech is matched for the user speech from the intervention speech set, and the speech similarity between the user speech and the matched intervention speech is calculated; if the speech similarity is greater than the intervention threshold, the speech intention of the user speech is identified according to the speech rules of the matched intervention speech; if the speech similarity is less than or equal to the intervention threshold, the speech intention of the user speech is identified using the template rule speech set or the recognition model; the technical means of updating the intervention speech set, the template rule speech set or the recognition model according to the identified speech intention overcomes the technical problem of over-reliance on pre-defined intentions and slot values, poor iterability, and inability to quickly feedback on incorrectly identified speech, thereby achieving rapid and accurate identification of speech intentions and rapid response to commonly used speech; while realizing the recognition of user speech, the data is updated so that the data is fully utilized in the iterative process, thereby reducing the workload of data labeling.

[0201] 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 identifying the intention of a speech, characterized in that: include: Matching intervention speech to user speech from the intervention speech set, and calculating speech similarity between the user speech and the matched intervention speech; specifically comprising: segmenting the user speech to obtain speech segmentation; If the speech similarity is greater than the intervention threshold, identifying the speech intention of the user speech according to the speech rule of the matched intervention speech; If the speech similarity is less than or equal to the intervention threshold, the template rule speech set or recognition model is used to identify the speech intention of the user speech; specifically including: based on the speech segmentation, from the template rule speech set, the template rule speech is matched for the user speech; wherein the template rule speech set includes template rule speech and its speech rules; the word vector and word frequency inverse text frequency of the user speech and the matched template rule speech are calculated; the speech similarity of the user speech and the matched template rule speech is calculated according to the word vector and the word frequency inverse text frequency; if the speech similarity is greater than the template threshold, the speech intention of the user speech is determined according to the speech rules of the matched template rule speech, and the slot value of the user speech is extracted; the recognition model includes an intention recognition model and a slot value extraction model. If the speech similarity is less than or equal to the template threshold, the speech intention of the user speech is determined by the intention recognition model, and the slot value of the user speech is extracted by the slot value extraction model; The intervention speech set, the template rule speech set or the recognition model is updated according to the recognized speech intention.

2. The method according to claim 1, characterized in that Matching intervention speech to user speech from the intervention speech set, and calculating speech similarity between the user speech and the matched intervention speech, further comprising: Matching intervention speech for the user speech from an intervention speech set based on the speech segmentation; wherein the intervention speech set includes intervention speech and speech rules thereof; Calculating the word vector and word frequency inverse text frequency of the user speech and the matching intervention speech; Calculate the speech similarity between the user speech and the matched intervention speech according to the word vector and the word frequency inverse text frequency; as well as After identifying the speech intention of the user speech according to the speech rule of the matched intervention speech, the method further includes: The slot value of the user speech is extracted according to the speech rules of the matched intervention speech.

3. The method according to claim 1, characterized in that Before matching intervention words for user words from the intervention words set, it also includes: Filtering known speech words that can match the speech words of the template rule from historical data, adding speech annotations to the known speech words, and adding them to the training data set; Filter out unknown speech that does not match the template rule and cannot be recognized by the recognition model from historical data; If the unknown speech is a common speech, a speech rule is set for the unknown speech and added to the intervention speech set; wherein the speech rule includes speech intent and slot value position.

4. The method according to claim 3, characterized in that Updating the intervention speech set, the template rule speech set or the recognition model according to the recognized speech intention includes: Acquire training speech from historical data, add speech annotations to the training speech, the intervention speech and the template rule speech, and add them to the training data set; Using the training data set to train a learning model; Calculate the accuracy and recall of the learning model in the test speech set and the training data set; If the accuracy is greater than or equal to the preset accuracy and the recall is greater than or equal to the preset recall, the intent recognition model and the slot value extraction model are updated according to the learning model through training; If the accuracy is less than the preset accuracy or the recall is less than the preset recall, retraining is performed.

5. The method according to claim 4, characterized in that Updating the intervention speech set, the template rule speech set or the recognition model according to the recognized speech intention, further comprising: Using the trained learning model, regression testing is performed on the unknown speech with speech annotations and the training speech; Adding the unknown speech and the training speech that pass the test to the test speech set; The template rule speech set is updated based on the unknown speech that failed and the training speech.

6. The method according to claim 4, characterized in that Updating the intervention speech set, the template rule speech set or the recognition model according to the recognized speech intention, further comprising: Using the template rule speech set to perform regression testing on the known speech; Adding the known speech that passes the test to the test speech set; Recording the known speech that fails the test as an adjusted speech; The intervention speech set is updated based on the adjustment speech.

7. A device for identifying the intention of speech, characterized in that: include: A matching unit, used to match an intervention speech to a user speech from an intervention speech set, and calculate the speech similarity between the user speech and the matched intervention speech; It is also used to segment the user's speech to obtain speech segmentation; A first recognition unit is used to identify the speech intention of the user speech according to the speech rule of the matched intervention speech if the speech similarity is greater than the intervention threshold; A second recognition unit is used to recognize the speech intention of the user speech by using a template rule speech set or a recognition model if the speech similarity is less than or equal to an intervention threshold; It is also used to match the template rule speech for the user speech from the template rule speech set based on the speech segmentation; wherein the template rule speech set includes template rule speech and its speech rules; calculate the word vector and word frequency inverse text frequency of the user speech and the matched template rule speech; calculate the speech similarity between the user speech and the matched template rule speech according to the word vector and the word frequency inverse text frequency; if the speech similarity is greater than the template threshold, determine the speech intention of the user speech according to the speech rules of the matched template rule speech, and extract the slot value of the user speech; the recognition model includes an intention recognition model and a slot value extraction model, and if the speech similarity is less than or equal to the template threshold, use the intention recognition model to determine the speech intention of the user speech, and use the slot value extraction model to extract the slot value of the user speech; An updating unit is used to update the intervention speech set, the template rule speech set or the recognition model according to the recognized speech intention.

8. An electronic device for recognizing the intention of speech, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.

9. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Method and device for man-machine dialogue based on mapping knowledge domain

    CN106202476A

  • Answer data generation method based on dialog system and relevant device

    CN108009287A

  • Semantic recognition method and device

    CN108628830A