A method, device, storage medium and electronic device for intent recognition

By segmenting the target text and analyzing word contribution, and selecting keywords, the problem of difficulty in verifying the accuracy of machine learning models in intent recognition is solved, and the credibility and interpretability of the model output are improved.

CN115759070BActive Publication Date: 2026-03-31ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-09
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

When machine learning models identify user intent, users often struggle to determine the accuracy of the model's output, resulting in a lack of interpretability.

Method used

By segmenting the target text, deleting or replacing words, generating updated text, and using an intent recognition model to determine the contribution of each word, stop words and candidate words are screened out, and finally keywords are determined to represent the target intent.

Benefits of technology

It improves the credibility of the model output results, provides a basis for interpreting the model output results, and enhances the interpretability of intent recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115759070B_ABST
    Figure CN115759070B_ABST
Patent Text Reader

Abstract

The specification discloses a method, device, storage medium and electronic equipment for intent recognition. The target text in which a target intent is recognized by an intent recognition model is segmented, each word after segmentation is deleted from the target text to obtain updated text, a first recognition result corresponding to the word is determined by the intent recognition model, the contribution of the word to the recognition of the target intent is determined according to the target intent and the first recognition result, stop words and candidate words are determined from the words, the key words for recognizing the target intent are determined from the candidate words according to the contribution of the stop words and the contribution of the candidate words, and the key words are displayed. By determining the contribution of the stop words and the contribution of the candidate words, the candidate words that play a key role in recognizing the target intent are determined from the candidate words as the key words. When the target intent and the key words are output, an explanation basis for the model output result can be provided, and the credibility of the model output result is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of machine learning, and in particular to a method, apparatus, storage medium, and electronic device for intent recognition. Background Technology

[0002] With the development of internet technology, users are paying increasing attention to their privacy data, leading to a growing number of machine learning applications. However, a key characteristic of machine learning is its low interpretability. For example, when a machine learning model identifies user intent, and the provider offers services based on this intent recognition model, users often struggle to determine the accuracy of the model's output.

[0003] Based on this, this specification provides a method for intent recognition. Summary of the Invention

[0004] This specification provides a method, apparatus, storage medium, and electronic device for intent recognition, to at least partially solve the aforementioned problems existing in the prior art.

[0005] The following technical solution is adopted in this specification:

[0006] This specification provides an intent recognition method, including:

[0007] The target text whose target intent is identified by the intent recognition model is determined, and the target text is segmented into words to obtain several words;

[0008] For each word, the word is deleted from the target text to obtain updated text. The updated text is then input into the intent recognition model, and the first recognition result output by the intent recognition model is determined as the first recognition result corresponding to the word.

[0009] Based on the target intent and the first recognition result corresponding to the word, determine the contribution of the word to the recognized target intent;

[0010] Stop words and candidate words are identified from the given words; keywords are determined from the candidate words based on the contribution of the stop words and the contribution of the candidate words.

[0011] The target intent and the keywords are output as recognition results, and the keywords are used to characterize the basis for obtaining the target intent.

[0012] Optionally, the target text whose target intent is identified by the intent recognition model is determined, specifically including:

[0013] Receive recognition requests carrying target text;

[0014] The target text is input into the intent recognition model, and the target intent and the probability of the target intent are determined based on the probabilities of each second recognition result output by the intent recognition model.

[0015] Optionally, the target text is input into an intent recognition model to obtain the target intent and the probability corresponding to the target intent, specifically including:

[0016] The target text is input into the intent recognition model, and the second recognition results and their probabilities output by the intent recognition model are determined.

[0017] From the second identification results, the second identification results with a probability not less than a preset probability threshold are identified as the target intent.

[0018] Optionally, the updated text is input into the intent recognition model to determine the first recognition result output by the intent recognition model, specifically including:

[0019] The updated text is input into the intent recognition model, and from the first recognition results output by the intent recognition model, the first recognition result that is the same as the target intent and its probability are determined.

[0020] Optionally, based on the target intent and the first recognition result corresponding to the word, the contribution of the word to the recognized target intent is determined, specifically including:

[0021] The contribution of the word to the identified target intent is determined based on the difference between the probability of the first recognition result corresponding to the word and the probability of the target intent.

[0022] Optionally, keywords are determined from the candidate words based on the contribution of the stop words and the contribution of the candidate words, specifically including:

[0023] The contribution threshold of a keyword is determined based on the contribution of each stop word and the contribution of the candidate words.

[0024] Based on the contribution threshold, candidate words with a contribution greater than the contribution threshold are selected from the candidate words and used as keywords.

[0025] Optionally, the keywords are displayed, specifically including:

[0026] When multiple keywords are identified, a specified number of keywords are selected for display, ranked from highest to lowest contribution.

[0027] Optionally, determining the stop words and candidate words among the aforementioned words specifically includes:

[0028] For each word obtained from word segmentation, the word is matched with the stop word list. If the word successfully matches any word in the stop word list, the word is determined to be a stop word; otherwise, the word is determined to be a candidate word.

[0029] This specification provides an intent recognition device, including:

[0030] The word segmentation module is used to determine the target text whose target intent has been identified by the intent recognition model, and to segment the target text into several words;

[0031] The recognition module is used to delete each word from the target text to obtain updated text, input the updated text into the intent recognition model, and determine the first recognition result output by the intent recognition model as the first recognition result corresponding to the word.

[0032] The contribution determination module is used to determine the contribution of the word to the identified target intent based on the target intent and the first recognition result corresponding to the word.

[0033] The matching module is used to determine stop words and candidate words among the given words;

[0034] The keyword determination module is used to determine keywords from the candidate words based on the contribution of the stop words and the contribution of the candidate words;

[0035] The display module is used to output the target intent and the keywords as recognition results, wherein the keywords are used to characterize the basis for obtaining the target intent.

[0036] Optionally, the word segmentation module is specifically used to receive a recognition request carrying target text; input the target text into the intent recognition model; and determine the target intent and the probability of the target intent based on the probabilities of each second recognition result output by the intent recognition model.

[0037] Optionally, the word segmentation module is specifically used to input the target text into the intent recognition model, determine each second recognition result output by the intent recognition model and its probability; and determine, from the second recognition results, the second recognition result with a probability not less than a preset probability threshold as the target intent.

[0038] Optionally, the recognition module is specifically used to input the updated text into the intent recognition model, and determine the first recognition result that is the same as the target intent and its probability from each first recognition result output by the intent recognition model.

[0039] Optionally, the contribution determination module is specifically used to determine the contribution of the word to the identified target intent based on the difference between the probability of the first recognition result corresponding to the word and the probability of the target intent.

[0040] Optionally, the matching module is specifically used to match each word obtained from word segmentation with the stop word list. If the word successfully matches any word in the stop word list, the word is determined to be a stop word; otherwise, the word is determined to be a candidate word.

[0041] Optionally, the keyword determination module is specifically used to determine a keyword contribution threshold based on the contribution of each stop word and the contribution of the candidate words; and to determine candidate words whose contribution is greater than the contribution threshold from the candidate words as keywords.

[0042] Optionally, the display module is specifically used to select a specified number of keywords for display when multiple keywords are identified, according to the order of their contribution from largest to smallest.

[0043] This specification provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described intent recognition method.

[0044] This specification provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the above-described intent recognition method.

[0045] The above-mentioned technical solutions adopted in this specification can achieve the following beneficial effects:

[0046] In the intent recognition method provided in this specification, the target text whose target intent is identified by the intent recognition model is segmented into words. For each segmented word, the word is deleted from the target text to obtain updated text. The intent recognition model is used to determine the first recognition result corresponding to the word. The contribution of the word to the identification of the target intent is determined based on the target intent and the first recognition result. Stop words and candidate words are determined among the words. Based on the contribution of the stop words and the contribution of the candidate words, the keywords for identifying the target intent are determined from the candidate words and displayed.

[0047] As can be seen from the above methods, this method provides an explanation for the model output results by using intent recognition, thereby improving the credibility of the model output results. Attached Figure Description

[0048] The accompanying drawings, which are included to provide a further understanding of this specification and form part of this specification, illustrate exemplary embodiments and their descriptions, serving to explain this specification and do not constitute an undue limitation thereof.

[0049] In the picture:

[0050] Figure 1 This is a flowchart illustrating one intent recognition method described in this specification.

[0051] Figure 2 This is a diagram illustrating the insertion of stop words provided in this instruction manual;

[0052] Figure 3 This is a schematic diagram of an intent recognition device described in this specification;

[0053] Figure 4 The corresponding information provided in this specification Figure 1 A schematic diagram of an electronic device. Detailed Implementation

[0054] To make the objectives, technical solutions, and advantages of this specification clearer, the technical solutions of this specification will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this specification, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments in this specification without creative effort are within the scope of protection of this application.

[0055] The technical solutions provided in the various embodiments of this specification are described in detail below with reference to the accompanying drawings.

[0056] Figure 1 This specification provides a flowchart of an intent recognition method, which specifically includes the following steps:

[0057] S100: Determine the target text whose target intent has been identified by the intent recognition model, and segment the target text to obtain several words.

[0058] Currently, text intent recognition based on models is a mature technology widely used in various fields. For example, in the field of risk control, text such as user comments and interactions between users and customer service can be identified from user information. Intent recognition models can then be used to identify user intent, and risk control can be implemented based on that intent.

[0059] As the market develops and business sectors become increasingly segmented, service providers may lack the technical expertise in certain areas but still need to utilize them. This leads to the emergence of third parties offering technical services to service providers. Because these third parties lack a foundation of trust with the service providers, they must then "prove" the credibility of their technical services.

[0060] For intent recognition services, it is necessary to "prove" that the recognition results of the intent recognition model are indeed based on the input text.

[0061] In one or more embodiments of this specification, since the resources required for intent recognition of text through a model are relatively large, the intent recognition of text is usually performed by a server. Therefore, the intent recognition process can also be performed by a server in this specification.

[0062] Specifically, the server can receive the target text to be identified and input it into a trained intent recognition model to determine the target intent output by the model. Furthermore, since intent recognition typically involves identifying one or more target intents among many, the intent recognition model is usually a multi-classifier model.

[0063] Taking this intent recognition model as an example of a multi-classifier, the model can output a second recognition result and its probability for each candidate intent. The candidate intent corresponding to the second recognition result with a probability higher than a preset probability threshold is determined as the target intent.

[0064] Of course, this intent recognition model can also be a binary classifier. For example, assuming this intent recognition model is used in fraud prevention scenarios in the risk control field, it can be used only to identify whether the input target text has fraudulent intent. The second recognition result output by the intent recognition model can include: fraudulent intent and no fraudulent intent, and the intent recognition model can also output the probabilities of these two second recognition results.

[0065] The probability of the second recognition result can represent the confidence level of the second recognition result. Therefore, the target intent recognized by the model can be determined based on the second recognition result with a confidence level higher than the preset probability threshold.

[0066] Since the intent recognition model outputs the target intent based on the words in the target text, different words contribute differently to the recognition of the target intent. To identify the words (i.e., keywords) in the target text that contribute significantly to the recognition of the target intent, and to display them as the recognition results, in one or more embodiments of this specification, the server may also perform word segmentation on the target text to determine the words contained within the target text.

[0067] Of course, this manual does not restrict which word segmentation method the server uses; it can be set as needed.

[0068] S102: For each word, delete the word from the target text to obtain updated text, input the updated text into the intent recognition model, and determine the first recognition result output by the intent recognition model as the first recognition result corresponding to the word.

[0069] To determine the impact of each word in the target text on the target intent output by the intent recognition model, each word can be removed from the target text to obtain an updated text. Since the only difference between the updated text and the target text is this word, the intent recognition model can be used to identify the intent in the updated text. By comparing the identification result with the target intent, the importance of the word to the target intent output by the intent recognition model can be determined, i.e., its contribution.

[0070] Specifically, the server can delete each word from the target text to determine the updated text. Then, the updated text corresponding to the word is input into the intent recognition model to obtain a first recognition result, which is the recognition result corresponding to that word.

[0071] Furthermore, if the target text has few characters, deleting words may result in a significant difference in text length between the updated text and the target text, leading to a substantial difference in the initial recognition result output by the intent recognition model. For example, if the target text has only 5 characters, deleting a 2-character word will cause the updated text itself to differ significantly from the target text. The difference between the initial recognition result output by the intent recognition model and the target intent will not only be due to the word itself, but also to differences caused by factors such as text length.

[0072] To reduce noise caused by deleted words, in one or more embodiments of this specification, the server may first insert preset stop words into the target text to increase the length of the target text and reduce noise caused by deleted words.

[0073] Specifically, preset stop words can be inserted between word segments. These stop words are words or strings that do not affect the intent recognition results. However, since stop words are randomly inserted into the target text, the updated text obtained after inserting stop words may have grammatical errors and introduce interference noise.

[0074] Of course, since the purpose of inserting stop words is to reduce the difference in recognition results caused by the difference in word count, the word count of the updated text after inserting stop words should be close to the word count of the target text. Therefore, in one or more embodiments of this specification, the server can determine the number of words to insert stop words based on the word count of the deleted words, so that the word count of the updated text is consistent with the word count of the target text.

[0075] Furthermore, ensuring that the number of characters in the updated text after inserting stop words matches the number of characters in the target text may limit the selection range of stop words. For example, if the deleted word has 2 characters, then a stop word with 3 characters would no longer be selected for insertion. Since the difference between the number of characters in the updated text and the target text is small enough, the impact on the recognition result is also minimal. Therefore, in one or more embodiments of this specification, the server may first insert preset stop words between word segments, determine whether the difference between the number of characters in the updated text after inserting stop words and the number of characters in the target text is greater than a preset number, and if so, determine the number of characters of the inserted word to be deleted based on the difference between the difference and the preset number, and delete the corresponding number of stop words. For example, if the target text has 15 characters and the preset quantity is 4, and the updated text after the server inserts stop words has 21 characters, and the difference between the updated text and the target text is 6, which is greater than the preset quantity, then the inserted word with 2 characters is determined to be the one to be deleted. Therefore, a stop word with 2 characters is deleted.

[0076] Alternatively, the server can determine the number of characters in the updated text without stop words and the number of characters in the target text, and determine the range of characters for inserting stop words based on the preset quantity. Then, based on the character range, the server determines the stop words to be inserted. For example, if the updated text without stop words has 5 characters, the target text has 10 characters, and the preset quantity is 3, then the range of characters for inserting stop words is [2, 8]. The server can insert stop words into the target text within this character range.

[0077] Figure 2 This is a diagram illustrating the insertion of stop words as provided in this instruction manual. It should be noted that... Figure 2 The updated text, as well as the first recognition result and probability of the updated text determined by the intent recognition model, are omitted.

[0078] like Figure 2As shown, the target text is "I spent a month's salary on a car recently". The word segmentation result is "I" / "recently" / "spent" / "a month" / "salary" / "on" / "a car". Then stop words "of" / ",", "in" are inserted, resulting in the sentence "I recently of spent a month, salary on in a car". Then for each segmented word, the corresponding word in the sentence with inserted stop words is deleted to obtain an updated text. Finally, through the intention recognition model, the first recognition result and probability corresponding to each updated text are determined.

[0079] Further, taking Figure 2 One updated text as an example, the updated text after randomly inserting stop words in the target text is "I recently of spent a month, salary on in a car". Since the stop words are inserted into the target text, the inserted words may cause the sentence to be ungrammatical, and thus the result of intention recognition for this updated text is inaccurate. Eventually, the determined keywords are also inaccurate.

[0080] In one or more embodiments of this specification, to avoid the situation where the determined keywords are inaccurate due to ungrammatical sentences, the server can insert stop words at the start or end position of the target text, thereby avoiding the problem of inaccurate recognition results caused by ungrammatical sentences. For example, if the target text is "I bought a car recently" and the stop word to be inserted by the server is "ouch", the updated text after inserting the stop word can be "ouch I bought a car recently" or "I bought a car recently ouch". The updated texts obtained by inserting stop words at the start or end position of the target text do not have the problem of ungrammatical sentences.

[0081] Further, for each word, in addition to deleting the word to obtain an updated text, the server can also replace the word to obtain an updated text.

[0082] Specifically, for each word, the server can replace the word with a stop word to obtain an updated text and then perform subsequent operations. For example, after word segmentation of the target text, it is "I / recently / spent / a month / salary / on / a car". For the word "salary", replace this word with the string AB to obtain the updated text "I recently spent a month AB on a car", and this string has no actual meaning in the updated text, so it will not affect the first recognition result obtained by inputting the updated text into the intention recognition model.

[0083] Of course, even when replacing words to obtain updated text, the server can insert stop words to enrich the content of the updated text, and this specification does not limit this. In one or more embodiments of this specification, since this specification determines the importance of each word to the target intent output by the intent recognition model based on the first recognition result and its probability that is the same as the target intent, the first recognition result and its probability that are the same as the target intent are first determined from the first recognition results output by the intent recognition model. For example, if the target text is "I recently spent a month's salary to buy a car", and the second recognition result and probability are: loan 70%, fraud 25%, gambling 5%, and the preset probability threshold is 65%, then the target intent and its probability are loan 70%. If the updated text is "I recently spent a month's salary to buy XXX", and the first recognition result and probability are: loan 21%, fraud 75%, gambling 4%, then the first recognition result and its probability that are the same as the target intent are loan 21%.

[0084] S104: Based on the target intent and the first recognition result corresponding to the word, determine the contribution of the word to the recognized target intent.

[0085] In one or more embodiments of this specification, for each word, the probability of the first recognition result corresponding to the word and the probability of the target intent can reflect the importance of the word to the target intent output by the intent recognition model, i.e., the contribution. Therefore, the contribution of the word to the recognized target intent can be determined based on the difference between the probability of the first recognition result corresponding to the word and the probability of the target intent.

[0086] Specifically, the contribution can be taken as the absolute value of the difference between the probability of the first recognition result corresponding to the word and the probability of the target intent. Of course, other methods can be used to specifically represent the magnitude of the difference between the probability of the first recognition result and the probability of the target intent. For example, the probabilities can be linearly transformed (e.g., multiplied several times) first, and then the norm of the difference can be determined. This specification does not limit this and can be set as needed.

[0087] S106: Determine the stop words and candidate words from the given words.

[0088] Generally, removing stop words from the target text does not significantly change the probability of the first recognition result output by the intent recognition model. However, if removing a certain word from the target text causes a significant change in the probability of the first recognition result output by the intent recognition model, then that word is very likely a keyword. Therefore, before determining keywords, stop words and candidate words should be identified based on a pre-set stop word list.

[0089] Specifically, the word is matched against the stop word list. If the word matches any word in the stop word list, it is determined to be a stop word; otherwise, it is determined to be a candidate word. The more stop words included in the pre-set stop word list, the higher the accuracy of filtering stop words and candidate words from the target text, the higher the accuracy of the final keyword determination, and the higher the reliability of the model's output.

[0090] Of course, for the stop words inserted in step S104, no matching is required to determine that the inserted word is a stop word.

[0091] S108: Determine keywords from the candidate words based on the contribution of the stop words and the contribution of the candidate words.

[0092] In one or more embodiments of this specification, the contribution of a stop word is determined by the probability of the first identification result corresponding to the stop word and the probability of the target intent. Generally, the contribution of a keyword is greater than that of a stop word. Therefore, the maximum contribution of a stop word can be used as the contribution threshold for a keyword. Based on this contribution threshold, candidate words with a contribution greater than the threshold are then selected as keywords.

[0093] Furthermore, when the preset stop word list contains few stop words, the server may identify stop words in the target text that are not recorded in the stop word list as candidate words. If the contribution of such a stop word is just greater than the maximum contribution of all stop words in the target text, then the stop word will be identified as a keyword. For example, if the target text is "I took a cable car to the top of the mountain", the server identifies the stop words and their contributions as "I 5%", "is 4%", and "of 3%", and the unidentified stop words and their contributions as "to 6%". The contribution of the stop words identified by the server can determine the keyword contribution threshold as 5%. The contribution of the unidentified stop word "to" is just greater than 5%, so the server identifies "to" as a keyword. To avoid unidentified stop words being used as keywords, the keyword contribution threshold can also be much larger than this maximum value and α times the maximum value, where α > 1.

[0094] The keyword can be one or more. If only one keyword is selected, the server first determines candidate words with a contribution greater than the contribution threshold, then sorts these candidate words according to their contribution, and selects the candidate word with the highest contribution as the keyword. If multiple keywords are selected, a specified number of candidate words are selected from the sorted candidate words as the keyword. However, it's important to understand that the model's interpretation does not depend on the number of keywords, as long as the keyword can explain the target intent output by the intent recognition model. For example, if the target text is "I recently bought a car," and the intent recognition model outputs the target intent as "borrow money," then the keyword is "a car." Generally, a car is of high value, and the user's spending is relatively large, so it's reasonable to infer that the user's target intent is to borrow money; therefore, this keyword can explain this target intent. Thus, even with only one keyword, the model can be interpreted.

[0095] S110: Output the target intent and the keywords as recognition results, whereby the keywords are used to characterize the basis for obtaining the target intent.

[0096] If there is only one target intent and only one keyword is identified, the server will directly display that target intent and keyword to the user. If multiple keywords are identified, the server will select a specified number of keywords to display, in descending order of their contribution.

[0097] based on Figure 1 The intent recognition method shown involves segmenting the target text whose target intent has been identified by the intent recognition model into words. For each segmented word, the word is deleted from the target text to obtain updated text. The intent recognition model is then used to determine the first recognition result corresponding to the word. Based on the target intent and the first recognition result, the contribution of the word to the identification of the target intent is determined. Stop words and candidate words are identified from the several words. Based on the contribution of the stop words and the contribution of the candidate words, the keywords that identify the target intent are determined from the candidate words and displayed.

[0098] As can be seen from the above methods, this method provides an explanation for the model output results by using intent recognition, thereby improving the credibility of the model output results.

[0099] In addition, the data output by the user can also be in audio format. In this case, the server can first identify the speech information in the audio, convert the speech information into text, and then proceed with steps S100 to S110. This manual does not restrict how to obtain text, as long as the data that can be obtained is in text format.

[0100] Furthermore, in one or more embodiments of this specification, when the server classifies words in the target text based on a preset stop word list, if the server finds that there are no stop words in the target text, in order to determine the contribution threshold of keywords based on the contribution of stop words and candidate words, it is necessary to update the text of the stop words inserted in the target text, and then delete each word from the updated text of the inserted stop words. The text obtained after deleting the word is then input into the intent recognition model and other operations to obtain the contribution of each stop word and candidate word, and finally determine the keywords.

[0101] In S104, the contribution of a word to the identified target intent can also be determined based on the similarity between the target intent and the first recognition result corresponding to the word. For example, if the target intent output by the target intent recognition model based on the text sent by the user is "happy," and the first recognition result corresponding to the word is "blissful," then the similarity between the target intent and the first recognition result corresponding to the word is high, and the word contributes significantly to the identified target intent.

[0102] The contribution of a word to the identified target intent can also be determined by whether the target intent matches the first identification result corresponding to the word. For example, if the target intent is to borrow money, and the first identification result corresponding to the word is "take a walk," which does not match the target intent, then the contribution of the word to the identified target intent is low.

[0103] When the server determines multiple target intentions based on a preset probability threshold, steps S102 to S110 should be performed for each target intention.

[0104] Furthermore, when the server displays multiple target intents and corresponding keywords, since the contribution of keywords to obtaining target intents varies, the higher the contribution of a keyword, the more important the keyword is in identifying the target intent. Therefore, the server can output all target intents and corresponding keywords in order.

[0105] Specifically, the server sorts keywords from highest to lowest according to their contribution, and then outputs the target intent and corresponding keywords in order. This manual does not impose any restrictions on this, as long as all target intents and corresponding keywords can be output. The server can output a specified number of keywords in order; for example, if there are 5 identified keywords and the specified number is 3, the server can display the 3 keywords with the highest contribution in order. Of course, this specified number can be set as needed, and this manual does not impose any restrictions.

[0106] The above describes one or more embodiments of the intent recognition method provided in this specification. Based on the same idea, this specification also provides corresponding intent recognition devices, such as... Figure 3 As shown.

[0107] Figure 3 A schematic diagram of an intent recognition device provided in this specification specifically includes:

[0108] The word segmentation module 400 is used to determine the target text whose target intent has been identified by the intent recognition model, and to segment the target text into several words;

[0109] The recognition module 402 is used to delete each word from the target text to obtain updated text, input the updated text into the intent recognition model, and determine the first recognition result output by the intent recognition model as the first recognition result corresponding to the word.

[0110] The contribution determination module 404 is used to determine the contribution of the word to the identified target intent based on the target intent and the first recognition result corresponding to the word.

[0111] Matching module 406 is used to determine stop words and candidate words among the plurality of words;

[0112] Keyword determination module 408 is used to determine keywords from the candidate words based on the contribution of the stop words and the contribution of the candidate words;

[0113] The display module 410 is used to output the target intent and the keywords as recognition results, wherein the keywords are used to characterize the basis for obtaining the target intent.

[0114] Optionally, the word segmentation module 400 is specifically used to receive a recognition request carrying target text; input the target text into the intent recognition model; and determine the target intent and the probability of the target intent based on the probabilities of each second recognition result output by the intent recognition model.

[0115] Optionally, the word segmentation module 400 is specifically used to input the target text into the intent recognition model, determine each second recognition result output by the intent recognition model and its probability; and determine, from the second recognition results, the second recognition result whose probability is not less than a preset probability threshold as the target intent.

[0116] Optionally, the recognition module 402 is specifically used to input the updated text into the intent recognition model, and determine the first recognition result that is the same as the target intent and its probability from each first recognition result output by the intent recognition model.

[0117] Optionally, the contribution determination module 404 is specifically used to determine the contribution of the word to the identified target intent based on the difference between the probability of the first recognition result corresponding to the word and the probability of the target intent.

[0118] Optionally, the matching module 406 is specifically used to match each word obtained from word segmentation with the stop word list. If the word successfully matches any word in the stop word list, the word is determined to be a stop word; otherwise, the word is determined to be a candidate word.

[0119] Optionally, the keyword determination module 408 is specifically used to determine the contribution threshold of keywords based on the contribution of each stop word and the contribution of the candidate words; and to determine candidate words whose contribution is greater than the contribution threshold from the candidate words as keywords based on the contribution threshold.

[0120] Optionally, the display module 410 is specifically used to select a specified number of keywords for display when multiple keywords are determined, according to the order of their contribution from largest to smallest.

[0121] This specification provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described intent recognition method.

[0122] This specification provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the above-described intent recognition method.

[0123] This instruction manual also provides Figure 4 The diagram shows the structure of the electronic device. Figure 4 At the hardware level, the autonomous driving device includes a processor, internal bus, network interface, memory, and non-volatile memory, and may also include other hardware required for various operations. The processor reads the corresponding computer program from the non-volatile memory into memory and then runs it to achieve the above-mentioned functions. Figure 1 The intent recognition method described herein. Of course, in addition to software implementation, this specification does not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. In other words, the execution subject of the following processing flow is not limited to individual logic units, but can also be hardware or logic devices.

[0124] In the 1990s, improvements to a technology could be clearly distinguished as either hardware improvements (e.g., improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the methodology). However, with technological advancements, many methodological improvements today can be considered direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved methodology into the hardware circuit. Therefore, it cannot be said that a methodological improvement cannot be implemented using hardware physical modules. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logic function is determined by the user programming the device. Designers can program and "integrate" a digital system onto a PLD themselves, without needing chip manufacturers to design and manufacture dedicated integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing integrated circuit chips, this programming is mostly implemented using "logic compiler" software. Similar to the software compiler used in program development, the original code before compilation must be written in a specific programming language, called a Hardware Description Language (HDL). There are many HDLs, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, and RHDL (Ruby Hardware Description Language). Currently, the most commonly used are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should understand that by simply performing some logic programming on the method flow using one of these hardware description languages ​​and programming it into an integrated circuit, the hardware circuit implementing the logical method flow can be easily obtained.

[0125] The controller can be implemented in any suitable manner. For example, it can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320. A memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also recognize that, in addition to implementing the controller in purely computer-readable program code form, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, ASICs, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.

[0126] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.

[0127] For ease of description, the above devices are described in terms of function, divided into various units. Of course, in implementing this specification, the functions of each unit can be implemented in one or more software and / or hardware components.

[0128] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0129] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0130] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0131] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0132] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0133] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0134] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0135] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0136] Those skilled in the art will understand that the embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this specification may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0137] This specification can be described in the general context of computer-executable instructions that are executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This specification can also be practiced in distributed computing environments, where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0138] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.

[0139] The above description is merely an embodiment of this specification and is not intended to limit this specification. Various modifications and variations can be made to this specification by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of the claims of this application.

Claims

1. An intent recognition method, comprising: determining target text recognized by an intent recognition model as a target intent, and performing word segmentation on the target text to obtain a plurality of words; for each word, deleting the word from the target text to obtain updated text, inputting the updated text into the intent recognition model, and determining a first recognition result output by the intent recognition model as a first recognition result corresponding to the word; determining a contribution degree of the word to the target intent recognized according to the target intent and the first recognition result corresponding to the word; determining a stop word and a candidate word in the plurality of words; determining a key word from the candidate word according to the contribution degree of the stop word and the contribution degree of the candidate word; outputting the target intent and the key word as a recognition result, and the key word being used to represent a basis for obtaining the target intent.

2. The method of claim 1, wherein the target text recognized by the intent recognition model as the target intent is determined by: receiving a recognition request carrying the target text; inputting the target text into the intent recognition model, and determining the target intent and a probability of the target intent according to probabilities of second recognition results output by the intent recognition model.

3. The method of claim 2, wherein the target text is inputted into the intent recognition model to obtain the target intent and a probability corresponding to the target intent, and the method comprises: inputting the target text into the intent recognition model to determine the second recognition results output by the intent recognition model and probabilities of the second recognition results; determining, from the second recognition results, a second recognition result with a probability not less than a preset probability threshold as the target intent.

4. The method of claim 2, wherein the updated text is inputted into the intent recognition model to determine the first recognition result, and the method comprises: inputting the updated text into the intent recognition model, and determining, from the first recognition results output by the intent recognition model, a first recognition result identical to the target intent and a probability of the first recognition result.

5. The method of claim 4, wherein the contribution degree of the word to the target intent recognized is determined according to a difference between a probability of the first recognition result corresponding to the word and a probability of the target intent, and the method comprises: determining the contribution degree of the word to the target intent recognized according to the difference.

6. The method of claim 1, wherein the key word is determined from the candidate word according to the contribution degree of the stop word and the contribution degree of the candidate word, and the method comprises: determining a contribution degree threshold of the key word according to the contribution degree of each stop word and the contribution degree of the candidate word; determining, from the candidate word, a candidate word with a contribution degree greater than the contribution degree threshold as the key word according to the contribution degree threshold.

7. The method of claim 1, wherein the key word is outputted, and the method comprises: when a plurality of key words are determined, selecting a specified number of key words in descending order of the contribution degrees of the key words for display. 8.The method of claim 1, wherein the stop words and the candidate words are determined from the plurality of words, and specifically comprising: for each word obtained by the word segmentation, matching the word with the stop word table, if the word matches any word in the stop word table, determining the word as a stop word, otherwise, determining the word as a candidate word. 9.An intent recognition apparatus, comprising: a word segmentation module configured to determine a target text for which a target intent is recognized by an intent recognition model, and perform word segmentation on the target text to obtain a plurality of words; an identification module configured to, for each word, delete the word from the target text to obtain an updated text, input the updated text into the intent recognition model, and determine a first recognition result output by the intent recognition model as a first recognition result corresponding to the word; a contribution degree determination module configured to determine a contribution degree of the word to the target intent recognized according to the target intent and the first recognition result corresponding to the word; a matching module configured to determine stop words and candidate words from the plurality of words; a key word determination module configured to determine a key word from the candidate words according to the contribution degrees of the stop words and the candidate words; a display module configured to output the target intent and the key word as a recognition result, wherein the key word is used to represent a basis for obtaining the target intent. 10.The apparatus of claim 9, wherein the word segmentation module is specifically configured to receive a recognition request carrying a target text, input the target text into an intent recognition model, and determine a target intent and a probability of the target intent according to probabilities of second recognition results output by the intent recognition model. 11.The apparatus of claim 10, wherein the word segmentation module is specifically configured to input the target text into an intent recognition model, determine second recognition results and probabilities of the second recognition results output by the intent recognition model, and determine, from the second recognition results, a second recognition result whose probability is not less than a preset probability threshold as the target intent. 12.The apparatus of claim 9, wherein the identification module is specifically configured to input the updated text into the intent recognition model, and determine, from first recognition results output by the intent recognition model, a first recognition result identical to the target intent and a probability of the first recognition result. 13.The apparatus of claim 9, wherein the contribution degree determination module is specifically configured to determine a contribution degree of the word to the target intent recognized according to a difference between a probability of the first recognition result corresponding to the word and a probability of the target intent. 14.The apparatus of claim 9, wherein the matching module is specifically configured to, for each word obtained by the word segmentation, match the word with the stop word table, if the word matches any word in the stop word table, determine the word as a stop word, otherwise, determine the word as a candidate word.

15. The apparatus of claim 9, wherein the keyword determining module is specifically configured to determine a contribution degree threshold of a keyword according to a contribution degree of each stop word and a contribution degree of the candidate word; and determine, from the candidate words, a candidate word with a contribution degree greater than the contribution degree threshold as a keyword.

16. The apparatus of claim 9, wherein the displaying module is specifically configured to, when a plurality of keywords are determined, select a specified number of keywords in descending order of their contribution degrees to display.

17. A computer readable storage medium, the storage medium storing a computer program, the computer program being executed by a processor to implement the method of any one of claims 1-8.

18. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor implementing the method of any one of claims 1-8 when executing the program.

Citation Information

Patent Citations

  • Text feature extraction method based on semantic analysis

    CN106610949A

  • Text error correction model training method and device and text error correction method and device

    CN114861636A