WO2020140373A1 - 一种意图识别方法、识别设备及计算机可读存储介质 - Google Patents
一种意图识别方法、识别设备及计算机可读存储介质 Download PDFInfo
- Publication number
- WO2020140373A1 WO2020140373A1 PCT/CN2019/088804 CN2019088804W WO2020140373A1 WO 2020140373 A1 WO2020140373 A1 WO 2020140373A1 CN 2019088804 W CN2019088804 W CN 2019088804W WO 2020140373 A1 WO2020140373 A1 WO 2020140373A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- intent
- intention
- sub
- keywords
- node
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/33—Querying
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Definitions
- This application relates to the field of artificial intelligence technology, and in particular, to an intent recognition method, a recognition device, and a computer-readable storage medium.
- Embodiments of the present application provide an intent recognition method, a recognition device, and a computer-readable storage medium, which help to improve the accuracy of intent recognition.
- an intent recognition method including:
- the intent concept tree includes multiple Intent nodes, each intent node corresponds to an intent, and each intent node includes multiple keywords, each keyword corresponds to a weight;
- the highest intention score is greater than the first threshold, it is determined that the intention of the sentence to be recognized is the intention corresponding to the highest intention score.
- an embodiment of the present application provides an identification device, the identification device including a unit for performing the method of the first aspect.
- an embodiment of the present application provides another identification device, including a processor and a memory, the processor and the memory are connected to each other, wherein the memory is used to store a computer program that supports the identification device to perform the above method.
- the computer program includes program instructions, and the processor is configured to call the program instructions to perform the method of the first aspect described above.
- the identification device may further include a communication interface and/or a user interface.
- an embodiment of the present application provides a computer-readable storage medium that stores a computer program, where the computer program includes program instructions, which when executed by a processor causes The processor executes the method of the first aspect described above.
- the embodiments of the present application can obtain a plurality of word segments by performing word segmentation processing on the recognition sentence, and by traversing the keywords under each intent node of the preset intent concept tree, to determine the multiple word segments among the keywords under each intent node Hit the keyword, and then calculate the intent score of the sentence to be recognized under the intent corresponding to each intent node according to the weight corresponding to the hit keyword, so as to determine the intent of the sentence to be recognized according to the intent score, thereby achieving intent recognition , Which helps to improve the accuracy of intent recognition.
- FIG. 1 is a schematic flowchart of an intent recognition method provided by an embodiment of the present application
- FIG. 2 is a schematic flowchart of another intent recognition method provided by an embodiment of the present application.
- FIG. 3 is a schematic structural diagram of an identification device provided by an embodiment of the present application.
- FIG. 4 is a schematic structural diagram of another identification device provided by an embodiment of the present application.
- the technical solution of the present application may be applied to a recognition device, and the recognition device may include a server, a terminal, a robot, or other recognition devices, used for recognizing the intention of the user's query statement.
- the terminal involved in this application may be a mobile phone, computer, tablet, personal computer, smart watch, etc. This application is not limited.
- the present application can perform word segmentation processing on the obtained sentence to be recognized to obtain multiple word segments, and traverse the keywords under each intention node of the preset intention concept tree to determine the multiple word segments in each intention
- the hit keywords in the keywords under the node and then calculate the intent score of the sentence to be recognized under the intent corresponding to each intent node according to the weight corresponding to the hit keyword, to determine the sentence to be recognized according to the intent score Intent, thereby achieving intent recognition, which helps to improve the accuracy of intent recognition, and does not require a large number of samples.
- FIG. 1 is a schematic flowchart of an intent recognition method provided by an embodiment of the present application. Specifically, the method of this embodiment can be applied to the above-mentioned identification device such as a robot. As shown in FIG. 1, the intent recognition method may include the following steps:
- the sentence to be recognized may be any sentence to be subjected to intention recognition, such as any sentence received by a recognition device such as a robot.
- the sentence may be text, voice, or a sentence in a video.
- the recognition device may also convert the sentence into a text sentence after obtaining the sentence, so as to quickly realize word segmentation processing and intention recognition of the sentence.
- the object for intent recognition may be voice, text, picture, image, etc.
- the recognition device may obtain voice, text, picture, image object, etc. from the received voice, text, picture, image, etc. by receiving user input. Extract sentence text from the information, or convert the received voice, text, pictures, images and other information into sentence text to get the sentence to be recognized, and then segment the sentence to be recognized to realize the speech and text , Pictures, images and other objects intent recognition.
- the word segmentation method corresponding to the word segmentation processing may be stammer word segmentation or Stanford word segmentation or other word segmentation methods, which is not limited in this application.
- the word segmentation processing is performed on the sentence to be recognized, and the obtained multiple word segments (also referred to as words, words, entries, etc.) that constitute the sentence to be recognized may be all word segments that constitute the sentence to be recognized , Can also be part of all the participles that make up the sentence to be recognized, such as the participle after removing stop words or other meaningless participles in all participles, in order to reduce the subsequent keyword matching overhead, that is, the concept of traversal
- the small size of the tree helps improve the efficiency of intent recognition.
- a filter list may be preset, and the filter list may include various stop words or other meaningless words, such as "ah”, “oh”, “de”, etc., so that after segmenting the query sentence, It is possible to determine meaningless words such as stop words in the query sentence by matching and comparing with the words in the filter list, and remove these words.
- the sentence to be recognized may contain only one word segmentation, that is, the word segmentation processing is performed on the sentence to be recognized, and the resulting word segment constituting the sentence to be recognized may be one or more word segments.
- the intent recognition method based on one participle is the same as the intent recognition method based on multiple participles. For ease of understanding, this application uses the multiple participles as an example for description.
- the intention concept tree may be a query sentence sample of multiple intents to determine the keywords of each intent and settings to obtain the weight of each keyword, and then according to multiple intents, each of the multiple intents The keywords of this kind and the weight of each keyword are established/constructed.
- the intent concept tree may include multiple intent nodes, each intent node corresponds to an intent, and each intent node may include one or more keywords selected in advance, and the one or more keywords correspond to the intent nodes
- the keywords of the intention, each keyword corresponds to a weight, which can be set in advance.
- the multiple intents may be domain-specific intents, that is, the intent concept tree may be established based on the domain-specific query sentence samples, so that the domain-specific intent recognition can be achieved without a large number of samples.
- the intents corresponding to different intent nodes may belong to different categories, for example, the preset intent concept tree includes intent node 1 and intent node 2, the intent corresponding to intent node 1 is weather, and the intent node 2 The corresponding intent is an air ticket; or, the intents corresponding to different intent nodes can also belong to the same category.
- the preset intent concept tree includes intent node 1 and intent node 2, and the intent corresponding to intent node 1 is weather.
- the intent corresponding to the intent node 2 is querying the weather (can be regarded as a sub-intent of the weather), and both belong to the weather classification.
- the weight value corresponding to the first target keyword of each keyword in the intent concept tree may be set according to the TF-IDF value of the keyword, for example, the larger the value of TF-IDF, the weight value The greater; or, it may be determined based on the number or frequency of occurrence of the keyword in the corresponding intended participle set, such as the greater the number and/or frequency, the greater the weight; or, each keyword
- the weight can be set to the TF-IDF value or frequency or frequency or other values, etc., which is not limited in this application.
- traversing the keywords under each intent node may refer to matching and comparing the plurality of participles with the keywords under each intent node, the first target key hit by the plurality of participles in the keywords under each intent node
- the word may refer to a keyword that matches the plurality of participles among keywords under each intent node. That is to say, after the multiple word segments are obtained, the recognition device can respectively match and compare the multiple word segments with the keywords under each intent node, so as to obtain that the multiple word segments match the keywords under each intent node Participle of words, or the keywords matching the multiple participles among the keywords under each intent node, that is, the first target keyword, in order to determine the sentence to be recognized based on the first target keyword and its corresponding intent intention of.
- the determined first target keyword may be one or multiple, if there are multiple, the intent corresponding to the multiple first target keywords may be the same or different, that is, the multiple first target keywords may be Under the same intent node, it can also be under different intent nodes; and the same first target keyword can exist in the multiple first target keywords, for example, the same first target keyword corresponds to different intents, that is, The same first target keyword is under different intention nodes.
- the recognition device may separately calculate the sum of the weights corresponding to the first target keyword hit by the multiple word segments under each intent node, That is, for each intent node, the sum of the weights of the first target keywords under the intent node is calculated, and the sum value corresponding to each intent node is used as the intent score of the intent corresponding to the sentence to be recognized at the intent node To obtain the intent score of the intent corresponding to each intent node of the sentence to be recognized.
- the recognition device may also separately calculate the value of the product of the weights corresponding to the first target keyword that the multiple word breakers hit under each intent node or process the weights to obtain other values, and compare each The value or other value of the product corresponding to each intent node is used as the intent score of the sentence to be recognized under the intent corresponding to the intent node to obtain the intent score of the sentence to be recognized under the intent corresponding to each intent node, etc., This application is not limited.
- the recognition device may traverse the concept tree from the root node for the multiple word segments, and when the word segmentation hits the keywords of the intent node on the tree, the weights of the keywords are taken out and the weights of all the hit keywords under the intent node are taken.
- the accumulation is performed so that all intent nodes have the intent score corresponding to the sentence to be recognized. If the intention score is calculated as follows:
- Intent score (score) intention score + keyword weight
- the keyword may refer to the above-mentioned first target keyword, that is, a keyword that is hit.
- the intention score is 0. If the multiple participles do not hit any keywords under an intent node, the intent score of the intent of the sentence to be recognized at the intent node (hereinafter may be referred to as the intent score of the intent node or the score of the intent node) may be regarded as 0.
- the intention score may also be called the remaining names, which is not limited in this application.
- the first threshold may be a preset fixed value, which can be specifically set in advance and is not limited in this application.
- an initial threshold may be preset, and by acquiring a sample and performing the above steps 101-105, the intent of the sample is identified, and the determined intent of the sample is compared with the stored true intent of the sample To determine whether the intent recognition result is correct/successful, and calculate the recognition success rate corresponding to the preset number of samples (including various intent samples), and then the initial threshold can be adjusted according to the recognition success rate until a certain initial threshold is reached If the corresponding recognition success rate exceeds a preset success rate threshold (such as 98%), the initial threshold can be used as the first threshold. Therefore, the accuracy of intent recognition can be further improved.
- a preset success rate threshold such as 98%)
- the intention of the sentence to be recognized is an irrelevant intention, that is, an intention other than the intention corresponding to each intention node, and the sentence to be recognized is an irrelevant query.
- irrelevant intentions can be identified.
- a preset prompt message may also be output, and the prompt message may be used to instruct the user to input a new sentence to be recognized, so as to perform intention recognition again based on the new sentence to be recognized, Thereby improving the success rate of intention recognition.
- the first threshold may be dynamically set, or multiple first thresholds may be set, for example, a first threshold may be set for each intent node, for example, the first threshold may be To determine whether the sentence to be recognized is the minimum discriminant value of each intention.
- the identification device may also compare the intent score of each intent node with the corresponding first threshold, if there is only one intent node whose intent score is greater than the corresponding first threshold, the intent of the intent node As the intent of the sentence to be recognized; if there are multiple intent nodes whose intent score is greater than the corresponding first threshold, the intent of the intent node with the highest intent score among the multiple intent nodes may be used as the intent of the to-be-recognized sentence, or Use the intention of the intent node with the largest difference between the intent score and the corresponding first threshold among the multiple intent nodes as the intent of the sentence to be recognized, etc.; if the intent scores of all intent nodes are not greater than the corresponding first threshold, Then, it can be determined that the intention of the sentence to be recognized is an irrelevant intention. Therefore, the reliability of intention recognition can be further improved.
- the information corresponding to the intent can be searched/retrieved in the information database based on the determined intent, such as searching for weather information when the intent is weather, or if the intent is an air ticket Search flight ticket information, etc., and output the information (such as text output, voice output, or other output, etc.) or send the information to the corresponding terminal of the user for the user to view Boot and so on.
- the recognition device can obtain a plurality of word segments by performing word segmentation processing on the sentence to be recognized, and by traversing keywords under each intent node of a preset intention concept tree to determine that the multiple word segments are under each intent node Of the hit keywords in the keywords, and then calculate the intent score of the sentence to be recognized under the intent corresponding to each intent node according to the weight corresponding to the hit keyword to determine the intent of the sentence to be recognized according to the intent score, Therefore, intent recognition is realized, which helps to improve the accuracy of intent recognition without relying on a large number of data samples.
- FIG. 2 is a schematic flowchart of another intent recognition method provided by an embodiment of the present application. Specifically, as shown in FIG. 2, the intent recognition method may include the following steps:
- the set of participles for each intent may include multiple participles that make up a query sentence sample for that intent.
- the sub-intents may correspond to the word segmentation groups one by one, and each word segmentation group may include a word segmentation of a query sentence sample of a sub-intention.
- the preset sample database may include query sentence samples (corpus) for each intent, and the selected query sentence samples for each intent may include multiple, for example, each intent may correspond to a selected one including the selected intent Sample collection of multiple query statement samples.
- Each query sentence sample can be composed of text.
- each query sentence sample may be stored in the sample database in association with its corresponding intent information, such as an intent tag, to facilitate quick search and selection of the sample.
- the recognition device may perform word segmentation processing on each sample of the intention to obtain multiple word segments after the word segmentation.
- the method of word segmentation may adopt the stuttering word segmentation or Stanford word segmentation method and so on.
- the participle included in each participle set may be all participles of all query sentence samples in the sample set of intents corresponding to the selected participle set, or part of the participles in the participle, such as To remove the stopwords or other meaningless participles from all the participles, to reduce the calculation cost.
- the participle included in each participle group may be all participles of all query sentence samples in the sample set of the sub-intent corresponding to the participle group, or may be part of the participles in all the participles, which will not be repeated here.
- the keyword determination rule can be set in advance.
- the keyword determination rule may include a keyword determination rule based on TF-IDF value, a keyword determination rule based on word frequency, a keyword determination rule based on frequency, a keyword determination rule based on chi-square check value, etc.
- the rules determined by any one rule or combination of multiple rules are not limited in this application.
- the recognition device may separately calculate the word frequency-inverse file frequency TF-IDF value of each word segment in the word segmentation set of each intent.
- the word segmentation of each intent word segmentation set with a TF-IDF value exceeding a preset threshold is determined as the keyword of that intent; or, the word segmentation of each intent word segmentation set is performed in order of TF-IDF value from large to small
- the word segmentation corresponding to the TF-IDF value of M before sorting is determined as the keyword of this kind of intention, where M is an integer greater than 0.
- TF-IDF calculation can be performed on the word segmentation in the word segmentation set, and the keywords are selected according to the TF-IDF value of the word segmentation, for example, the TF-IDF value threshold exceeds a certain preset
- the word segmentation with a threshold (such as 0.12) is used as the keyword of the intention, or the preset number of words with the highest TF-IDF value ranking is taken as the keyword of the intention, and so on.
- the recognition device may separately calculate the frequency of occurrence of each participle in the participle set of each intention in the participle set, each participle
- the corresponding frequency is the ratio of the number of occurrences of the participle in the participle set and the total number of participles in the participle set (such as the number of participles after removing stop words), such as term frequency (TF);
- the participles of the intent word segmentation set whose frequency exceeds the preset frequency threshold are determined as keywords of that kind of intent; or, the word segments in each intent word segmentation set are sorted in order of frequency from large to small, and the top N
- the word segmentation corresponding to the frequency of is determined as the keyword of this kind of intention, where N is an integer greater than 0.
- the word frequency of the word segmentation of the word segmentation set can be counted, and the keywords can be selected according to the word frequency of the word segmentation, for example, select a word segment whose word frequency exceeds a preset frequency threshold as the keyword of the intention, or take out the word frequency sorting
- a certain number in the top such as the top 6 entries, are used as keywords for the intention and so on.
- the recognition device may separately calculate the number of occurrences of each participle in the participle set of each intent in the set of participles.
- the word segmentation of the intent word segmentation set that exceeds the preset number of times threshold is determined as the keyword of the intent; or, the word segments in each intent word segmentation set are sorted according to the order of the number of times from the largest to the smallest.
- the word segmentation corresponding to the number of times is determined as the keyword of this intention, where E is an integer greater than 0.
- the recognition device may perform a chi-square test on the word segmentation in the word segmentation set of each intent to obtain each word segmentation set in each intent
- the value of the chi-square test for each participle, the participle whose value of the chi-square test in each intent set of words exceeds the preset verification threshold is determined as the keyword of that intent; or, according to the value of the chi-square test from Sort the word segments in the set of word segments of each intent in a small order, and determine the word segment corresponding to the value of the chi-square test of F before sorting as the keyword of the intent, where F is an integer greater than 0.
- any one of the above keyword determination rules can be used to select, or can be selected by combining several rules, such as selecting one or more of the above rules
- the same keyword is used as the keyword of the intention; alternatively, a weight can be set for each selection rule, and the keywords selected under the above rules can be combined with the weight of the corresponding rule to further filter the word segmentation whose value is greater than the preset threshold
- the keyword of the intention or use a preset number of participles, such as the top 20, as keywords of the intention, etc. Therefore, the reliability and flexibility of the selected keywords can be further improved, so as to improve the accuracy of intent recognition.
- the TF or TF-IDF of each word segmentation in the word segmentation set can be calculated as follows:
- the word frequency can refer to the number or frequency of occurrence of a given word in the intent, that is, the number or frequency of word segmentation in the set of word segmentation of the intent, for example, in order to prevent it from biasing to long files, the word frequency can be the number of times The total number of participles divided by the set is the total number of intended words.
- the TF of each word can be calculated.
- IDF inverse document frequency
- the TF-IDF value of each word segmentation can be calculated.
- the keywords of each sub-intention can be determined from the word segmentation group of each sub-intention by using the above-mentioned keyword determination rule, which will not be repeated here.
- the keywords of each intention are determined from the set of participles of each intention and the keywords of each subintention are determined from the participle of each subintent.
- the manner of determining the keywords may be the same or different, That is, the keyword determination rules adopted by the two may be the same or different, and this application is not limited.
- weights can be set for each keyword.
- the calculated TF-IDF value of the keyword (or the word frequency or frequency or chi-square check value, etc.) can be directly used as the weight of the keyword, or the TF-IDF value (or the word frequency or frequency or The chi-square check value, etc.) is normalized and used as the weight of the keyword (that is, all the weights add up to 1), or you can modify the weight of the keyword according to the user's needs, or you can manually Add required keywords and assign values according to user needs, etc., not listed here.
- Each intent node may include one or more sub-intention nodes, and each sub-intention node may include one or more keywords. It can be understood that the sub-intention node may not exist/do not include under the intent node.
- an intent concept tree can be constructed.
- the intent concept tree can include one or more layers of intent, such as the first layer is the intent node (the parent node is the root node) ), the second layer is the child intent node of the intent node, and there can be a third layer, such as the child intent node of the child intent node, and so on.
- each intent starts from the root node.
- keywords of major intents categories
- the word segmentation method corresponding to the word segmentation processing may be the Stanford word segmentation method or the stammer word segmentation method, etc., and the meaningless words may be removed after the word segmentation.
- the overhead caused by traversing the intent nodes for intent recognition can be reduced because the concept tree needs to be traversed for each word segmentation.
- the intent concept tree may include multiple intent nodes, each intent node corresponds to an intent, and each intent node may include one or more keywords, and each keyword corresponds to a weight.
- the recognition device may start from the root node to traverse the concept tree layer by layer.
- the word segmentation hits the keyword of the intention node on the tree, that is, the first target keyword
- the weight of the keyword is taken out and all The weights of the hit keywords are accumulated, so that all intent nodes in each layer, such as the intent node layer, have the intent score of the input sentence on that layer.
- steps 204-206 reference may be made to the related descriptions of steps 101-104 in the embodiment shown in FIG. 1 above, and details are not described here.
- the second threshold may be set in advance, and the second threshold may be the same as or different from the first threshold, which is not limited in this application.
- the sub-intention scores of each sub-intention node under each intent node with the highest intent score may be separately determined, and the highest sub-intent score in each sub-intention score will be determined It is compared with the second threshold to achieve intent recognition.
- the highest sub-intent score is not greater than the second threshold, determine that the intent of the sentence to be recognized is the intent corresponding to the highest intent score.
- the intent of the sentence to be recognized is the intent corresponding to the highest sub-intent score, that is, the intent corresponding to the highest sub-intent score is determined to be the sentence to be recognized intention of.
- the intent recognition of the sentence to be recognized for any layer of nodes, if the highest score exceeds the intent threshold of the layer, it is determined whether there is a child intent node, if there is a child intent node, the keywords of the child intent nodes under the node are traversed and Follow up the process; if there is no sub-intent node, the intent of the sentence to be recognized can be determined as the intent corresponding to the highest score, if the intent corresponding to the highest score can be output as the intent of the sentence to be recognized; if the highest score does not exceed this level Intent threshold, it can be determined that the intent of the sentence to be recognized is the intent of the parent node, if the intent of the parent node of the node can be output as the intent of the sentence to be recognized, if the parent node is the root node, the The intention is an irrelevant intention, for example, no intention can be output, or a prompt message can be output to instruct the user to input a new sentence to be recognized to perform intention recognition based on the new
- the node with the highest intent score of this layer can be taken to determine whether it exceeds the set threshold, and if not, the intent is determined to be the intent of the node of the previous layer. If it is exceeded, it is determined whether there is a sub-intent, and if so, it continues to traverse the sub-intent. If it is determined that there is no sub-intent, it is determined that the sentence belongs to the intent of the node where it is located. If the node with the highest sub-intention score does not exceed the set threshold, it is determined that the intent is the intent of the node at the upper layer.
- the threshold set for each layer may be the same or different.
- the intent concept tree includes only two intent nodes (that is, two intents), one is the weather and the other is the ticket, and the weather intent includes keywords such as today and weather (assuming today’s weight is 0.2, weather The weight value is 0.3), including the weather, flight and other keywords under the intent of the ticket (assuming that the weight of the weather is 0.05 and the weight of the flight is 0.4).
- the sentence can be segmented, and the words after the segmentation can be traversed one by one on the keywords in the concept tree. For example, the input sentence is: "How is the weather today?" After the participle, you get: "How is the weather today" These three participles.
- intent node After all the words in the sentence have been traversed, it is counted which intent node has the highest intent score (weather intent node 0.5, ticket intent node 0.05), and now the weather intent node has the highest 0.5. Then determine whether the highest-scoring intent node exceeds the intent threshold of this layer (that is, the above first threshold, assuming that the intent threshold of this layer is set to 0.3). At this time, the score of the highest intent weather intention is 0.5 and exceeds the set threshold, then Determine whether there is a sub-intention in the weather, or determine whether there is a sub-intention node in the weather intent node, and if so, you can continue to traverse the sub-intention nodes of the weather in the same way.
- intent threshold of this layer that is, the above first threshold, assuming that the intent threshold of this layer is set to 0.3.
- the judgment intention that can determine/return this sentence belongs to the "weather” intention. If the weather has a sub-intent (assuming “inquiry about the weather” intent) and the score exceeds the threshold set by the sub-intention layer (that is, the above second threshold), the intent of the sentence "how is the weather today" can be determined/returned as "ask the weather”. If the child intention score does not exceed the threshold, the intention of the parent node of the child intention, that is, the “weather” intention, can be determined/returned. After recognizing the user's intention, you can return information to the user according to the intention, guide the customer, and so on.
- the weight of each keyword can also be adjusted, for example, the frequency of the keyword corresponding to the intention can be output according to a period of time (such as a week, a month, etc.), and the keyword can be changed Weight, the higher the frequency of the keyword corresponding to the output intention, increase the weight of the keyword, otherwise, reduce the weight of the keyword, such as the increase/decrease of the frequency and weight can be set Correspondence.
- the recognition device can build a concept tree in a specific field by selecting keywords of intent, and determine the intent of the sentence by traversing the keywords in the concept tree and the keyword weights set in the concept tree to achieve Reliable intention recognition in a specific field with few samples does not need to rely on a large number of data samples, and the accuracy and reliability of intention recognition are high.
- FIG. 3 is a schematic structural diagram of an identification device according to an embodiment of the present application.
- the identification device (apparatus) of the embodiment of the present application may include a unit for performing the above-mentioned intention identification method.
- the identification device 300 of this embodiment may include: a communication unit 301 and a processing unit 302. among them,
- the communication unit 301 is configured to receive the sentence to be recognized input by the user;
- the processing unit 302 is configured to perform word segmentation processing on the sentence to be recognized to obtain multiple word segments that constitute the sentence to be recognized;
- the processing unit 302 is further configured to traverse the keywords under each intent node of the preset intent concept tree to determine the first target keywords that are hit by the multiple word breakers under the keywords under each intent node; wherein,
- the intent concept tree includes multiple intent nodes, each intent node corresponds to an intent, and each intent node includes multiple keywords, and each keyword corresponds to a weight;
- the processing unit 302 is further configured to calculate the intent score of the intent corresponding to each intent node of the sentence to be recognized according to the weight corresponding to each first target keyword; determine the highest intent score of the intent intent of the intent corresponding to each intent node And determine whether the highest intention score is greater than a preset first threshold; if the highest intention score is greater than the first threshold, determine that the intention of the sentence to be recognized is the intention corresponding to the highest intention score.
- the identification device may further include an acquisition unit 303;
- the obtaining unit 303 is configured to select a plurality of intent query sentence samples from a preset sample database
- the processing unit 302 is also used to perform word segmentation processing on the query sentence samples of each intent to obtain the word segmentation set of the query sentence samples of each intent, and the word segmentation set of each intent includes many of the query sentence samples constituting the intent Participle
- the processing unit 302 is further configured to determine keywords of each intention from the set of participles of each intention according to preset keyword determination rules, and set weights corresponding to the keywords; according to the multiple intentions, The keywords of each intent and the weight of each keyword establish the intent concept tree.
- the processing unit 302 may be further configured to group the participle sets of the intent according to the subintentions of the intent when there are intents including subintents among the multiple intents to obtain multiple word segmentation groups, the The sub-intents correspond to the word segmentation groups one by one, and each word segmentation group includes a word segmentation of a query sentence sample of a sub-intention;
- the processing unit 302 when executing the establishment of the intent concept tree according to the multiple intents, the keywords of each intent, and the weight of each keyword, may be specifically used to:
- each sub-intention node includes multiple keywords
- the processing unit 302 can also be used to determine whether there is a child intent node for the intent node corresponding to the highest intent score when the highest intent score is greater than the first threshold; if there is a child intent node, traverse the Keywords to determine the second target keywords that the multiple word breakers hit in the keywords under the sub-intent nodes, and calculate the sentence to be recognized in each sub-word according to the weight corresponding to the second target keywords The sub-intention score of the sub-intent corresponding to the intent node; determining the highest sub-intention score among the sub-intention scores of the sub-intent corresponding to each sub-intention node, and judging whether the highest sub-intention score is greater than a preset second threshold; The highest sub-intent score is not greater than the second threshold, which triggers the determination that the intention of the sentence to be recognized is the intention corresponding to the highest intent score.
- the processing unit 302 may be further configured to determine that the intention of the sentence to be recognized is an irrelevant intention other than the intention corresponding to each intention node when the highest intention score is not greater than the first threshold;
- the communication unit 301 may be further configured to output a preset prompt message, where the prompt message is used to instruct the user to input a new sentence to be recognized to perform intention recognition based on the new sentence to be recognized.
- processing unit 302 determines the keywords of each intention from the word segmentation set of each intention according to the preset keyword determination rule, it may be specifically used to:
- the word segmentation of each intent word segmentation set whose TF-IDF value exceeds the preset threshold is determined as the keyword of that intent; or, the word segmentation in each intent word segmentation set in the order of TF-IDF value from large to small Sorting is performed, and the word segmentation corresponding to the TF-IDF value of M before sorting is determined as the keyword of this intention, where M is an integer greater than 0.
- processing unit 302 determines the keywords of each intention from the word segmentation set of each intention according to the preset keyword determination rule, it may be specifically used to:
- the frequency corresponding to each participle is the number of times the participle appears in the participle set and the total number of participles in the participle set ratio;
- the weight value corresponding to the first target keyword is the word frequency-inverse file frequency TF-IDF value of the first target keyword, or the weight value corresponding to the first target keyword is the The number or frequency of occurrence of the first target keyword in the corresponding intended participle set;
- the processing unit 302 executes the calculation of the intent score of the intent corresponding to each intent node of the sentence to be recognized according to the weight value corresponding to each first target keyword, it may be specifically used to:
- the identification device may implement part or all of the steps in the intent identification method in the embodiments shown in FIG. 1 to FIG. 2 through the above units. It should be understood that the embodiments of the present application are device embodiments corresponding to the method embodiments, and the description of the method embodiments is also applicable to the embodiments of the present application.
- FIG. 4 is a schematic structural diagram of another identification device provided by an embodiment of the present application.
- the identification device is used to perform the above method.
- the identification device 400 in this embodiment may include: one or more processors 401 and a memory 402.
- the identification device may further include one or more user interfaces 403, and/or one or more communication interfaces 404.
- the processor 401, the user interface 403, the communication interface 404, and the memory 402 may be connected through the bus 405, or may be connected in other ways.
- the bus mode is used as an example in FIG.
- the memory 402 is used to store a computer program, and the computer program includes program instructions, and the processor 401 is used to execute the program instructions stored in the memory 402.
- the processor 401 may be used to call the program instructions to perform some or all of the steps in FIGS. 1 to 2 described above.
- the processor 401 may be used to call the program instructions to perform the following steps: receive a sentence to be recognized input by a user through the user interface 403, and perform word segmentation processing on the sentence to be recognized, to obtain a plurality of words constituting the sentence to be recognized Word segmentation; traversing the keywords under each intention node of the preset intention concept tree to determine the first target keywords hit by the multiple word segmentation in the keywords under each intention node; wherein, the intention concept tree It includes multiple intent nodes, each intent node corresponds to an intent, and each intent node includes multiple keywords, and each keyword corresponds to a weight; the weight is calculated according to the weight corresponding to each first target keyword
- the processor 401 may further perform the following steps: separately select a plurality of intent query sentence samples from a preset sample database, and separately perform word segmentation processing on each intent query sentence sample to obtain each intent query sentence
- the word segmentation set of the sample includes multiple word segments that make up the query sentence sample of the intention; according to the preset keyword determination rules, the keywords of each intention are determined from the word segmentation set of each intention respectively And set the weights corresponding to the keywords; the intention concept tree is established according to the multiple intentions, the keywords of each intention, and the weights of each keyword.
- the processor 401 may also perform the following steps: if there are intents including sub-intents among the multiple intents, group the participle sets of the intents according to the sub-intents of the intent to obtain multiple word segmentation groups, so The subintentions correspond to the participles one by one, and each participle includes a participle of a query sentence sample of a subintent; each subintent is determined from the subgroups of each subintention according to preset keyword determination rules Keywords, and set the weight of keywords for each sub-intent;
- the processor 401 executes the establishment of the intent concept tree according to the multiple intents, keywords of each intent, and the weight of each keyword, it may specifically perform the following steps: according to the multiple intents, each Keywords of each intent, keywords of each sub-intent, and the weight of each keyword establish the intent concept tree; wherein, each sub-intention node includes multiple keywords;
- the processor 401 may further perform the following step: if the highest intention score is greater than the first threshold, determine the highest intention Whether there is a sub-intention node in the intent node corresponding to the score; if there is a sub-intention node, traverse the keywords under each sub-intention node to determine each second target that the multiple tokenizers hit in the keywords under each sub-intention node Keywords, and calculate the sub-intention score of the sub-intent corresponding to each sub-intention node of the sentence to be recognized according to the weight corresponding to each second target keyword; determine the sub-intention score of the sub-intention corresponding to each sub-intention node The highest sub-intent score and determine whether the highest sub-intent score is greater than a preset second threshold; if the highest sub-intent score is not greater than the second threshold, triggering the determination of the intention of the sentence to be recognized is The steps of the intent score is greater than the first threshold, determine the highest intention Whether there is a sub-intention node
- the processor 401 may further perform the following steps: if the highest intention score is not greater than the first threshold, determine that the intention of the sentence to be recognized is an irrelevant intention other than the intention corresponding to each intention node; through the user interface 403 Output a preset prompt message, where the prompt message is used to instruct the user to input a new sentence to be recognized to perform intention recognition based on the new sentence to be recognized.
- each intention is calculated separately The word frequency-inverse file frequency TF-IDF value of each word segmentation in the word segmentation set; determine the word segmentation of each intent word segmentation set whose TF-IDF value exceeds the preset threshold as the keyword of that intent; or, according to TF -The IDF value sorts the word segmentation in each intent word segmentation set from large to small, and determines the word segmentation corresponding to the TF-IDF value of the M before sorting as the keyword of this intent, where M is greater than An integer of 0.
- each intention is calculated separately The frequency of occurrence of each participle in the participle set in the participle set, the frequency corresponding to each participle is the ratio of the number of times the participle appears in the participle set to the total number of participles in the participle set;
- the word segmentation in the word segmentation set whose frequency exceeds the preset frequency threshold is determined as the keyword of this kind of intention; or, the word segmentation in the word segmentation set of each intention is sorted according to the frequency from large to small, and the N before the sorting
- the word segmentation corresponding to the frequency of is determined as the keyword of this kind of intention, where N is an integer greater than 0.
- the weight value corresponding to the first target keyword is the word frequency-inverse file frequency TF-IDF value of the first target keyword, or the weight value corresponding to the first target keyword is the The number or frequency of occurrence of the first target keyword in the corresponding intended participle set;
- the processor 401 executes the calculation of the intent score of the intent corresponding to each intent node of the to-be-recognized sentence according to the weight value corresponding to each first target keyword, it may specifically perform the following steps: separately calculating the plurality of word segments The sum of the weight values corresponding to the first target keyword hit under each intent node, and the sum value corresponding to each intent node is used as the intent score of the intent corresponding to the sentence to be recognized in the intent node to obtain the The intention score of the intention corresponding to each intention node of the sentence to be recognized.
- the processor 401 may be a central processing unit (Central Processing Unit, CPU), and the processor may also be other general-purpose processors, digital signal processors (Digital Signal Processors, DSPs), application specific integrated circuits (Application Specific Integrated) Circuit (ASIC), ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
- the general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
- the user interface 403 may include an input device and an output device.
- the input device may include a touch panel, a microphone, and the like
- the output device may include a display (LCD, etc.), a speaker, and the like.
- the communication interface 404 may include a receiver and a transmitter for communicating with other devices.
- the memory 402 may include a read-only memory and a random access memory, and provide instructions and data to the processor 401. A portion of the memory 402 may also include non-volatile random access memory. For example, the memory 402 may also store the above keywords, weights, and so on.
- the processor 401 and the like described in the embodiments of the present application can execute the implementation described in the method embodiments shown in FIG. 1 to FIG. 2 above, and can also execute each of the methods described in FIG. 3 of the embodiment of the present application. The implementation of the unit is not repeated here.
- An embodiment of the present application also provides a computer-readable storage medium that stores a computer program, and when the computer program is executed by a processor, the computer program can be implemented as described in the embodiments corresponding to FIG. 1 to FIG. 2 Part or all of the steps in the intent recognition method may also realize the functions of the recognition device of the embodiment shown in FIG. 3 or FIG. 4 of the present application, and details are not described here.
- An embodiment of the present application further provides a computer program product containing instructions, which when run on a computer, causes the computer to perform some or all of the steps in the above method.
- the computer-readable storage medium may be an internal storage unit of the identification device according to any of the foregoing embodiments, such as a hard disk or a memory of the identification device.
- the computer-readable storage medium may also be an external storage device of the identification device, such as a plug-in hard disk equipped on the identification device, a smart memory card (Smart, Media, Card, SMC), and a secure digital (SD, Digital, SD) ) Card, flash card (Flash Card), etc.
- the size of the sequence numbers of the above processes does not mean that the execution order is sequential, and the execution order of each process should be determined by its function and inherent logic, and should not correspond to the implementation process of the embodiments of the present application Constitute any limitation.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Machine Translation (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
一种意图识别方法、识别设备及计算机可读存储介质,应用于人工智能技术领域。其中,该方法包括:接收用户输入的待识别语句,并对所述待识别语句进行分词处理,以得到组成所述待识别语句的多个分词;遍历预置的意图概念树的各意图节点下的关键词,以确定所述多个分词在各意图节点下的关键词中命中的各第一目标关键词;根据各第一目标关键词对应的权值计算所述待识别语句在各意图节点对应的意图的意图得分;确定各意图节点对应的意图的意图得分中的最高意图得分;如果所述最高意图得分大于第一阈值,确定所述待识别语句的意图为所述最高意图得分对应的意图。采用本方法,有助于提升意图识别的准确性。
Description
本申请要求于2019年01月04日提交中国专利局、申请号为201910013964.2、申请名称为“一种意图识别方法、识别设备及计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及人工智能技术领域,尤其涉及一种意图识别方法、识别设备及计算机可读存储介质。
目前的意图识别方式主要是基于机器学习或者深度学习的方法进行意图识别,该机器学习或深度学习往往需要大量的训练样本。而在某些领域或场景下,可提供的训练样本比较少,比如在服务机器人领域,机器人处理特定领域业务咨询过程中,涉及的训练样本较少,如果仍使用该基于机器学习或者深度学习的方法进行意图识别,可能会由于数据训练样本较少使得训练出来的模型无法准确识别出用户意图,甚至无法识别该用户意图,导致无法给用户提供较为准确的业务问答。
发明内容
本申请实施例提供一种意图识别方法、识别设备及计算机可读存储介质,有助于提升意图识别的准确性。
第一方面,本申请实施例提供了一种意图识别方法,包括:
接收用户输入的待识别语句,并对所述待识别语句进行分词处理,以得到组成所述待识别语句的多个分词;
遍历预置的意图概念树的各意图节点下的关键词,以确定所述多个分词在各意图节点下的关键词中命中的各第一目标关键词;其中,所述意图概念树包括多个意图节点,每个意图节点对应一种意图,且每个意图节点下包括多个关键词,每个关键词对应一个权值;
根据各第一目标关键词对应的权值计算所述待识别语句在各意图节点对应的意图的意图得分;
确定各意图节点对应的意图的意图得分中的最高意图得分,并判断所述最高意图得分是否大于预设的第一阈值;
如果所述最高意图得分大于所述第一阈值,确定所述待识别语句的意图为所述最高意图得分对应的意图。
第二方面,本申请实施例提供了一种识别设备,该识别设备包括用于执行上述第一方面的方法的单元。
第三方面,本申请实施例提供了另一种识别设备,包括处理器和存储器,所述处理器和存储器相互连接,其中,所述存储器用于存储支持识别设备执行上述方法的计算机程序,所述计算机程序包括程序指令,所述处理器被配置用于调用所述程序指令,执行上述第一方面的方法。可选的,该识别设备还可包括通信接口和/或用户接口。
第四方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令当被处理器执行时使所述处理器执行上述第一方面的方法。
本申请实施例能够通过对待识别语句进行分词处理得到多个分词,并通过遍历预置的意图概念树的各意图节点下的关键词,以确定该多个分词在各意图节点下的关键词中命中的关键词,进而根据该命中的关键词对应的权值计算该待识别语句在各意图节点对应的意图下的意图得分,以根据该意图得分确定该待识别语句的意图,从而实现意图识别,这就有助于提升意图识别的准确性。
为了更清楚地说明本申请实施例技术方案,下面将对实施例描述中所需要使用的附图进行说明。
图1是本申请实施例提供的一种意图识别方法的流程示意图;
图2是本申请实施例提供的另一种意图识别方法的流程示意图;
图3是本申请实施例提供的一种识别设备的结构示意图;
图4是本申请实施例提供的另一种识别设备的结构示意图。
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。
本申请的技术方案可应用于识别设备中,该识别设备可包括服务器、终端、机器人或其他识别设备,用于对用户查询语句的意图进行识别。本申请涉及的终端可以是手机、电脑、平板、个人计算机、智能手表等,本申请不做限定。
具体的,本申请能够通过对获取到的待识别语句进行分词处理以得到多个分词,并通过遍历预置的意图概念树的各意图节点下的关键词,以确定该多个分词在各意图节点下的关键词中命中的关键词,进而根据该命中的关键词对应的权值计算该待识别语句在各意图节点对应的意图下的意图得分,以根据该意图得分确定该待识别语句的意图,从而实现意图识别,这就有助于提升意图识别的准确性,且无需大量样本。以下分别详细说明。
请参见图1,图1是本申请实施例提供的一种意图识别方法的流程示意图。具体的,本实施例的方法可应用于上述的识别设备如机器人中。如图1所示,该意图识别方法可以包括以下步骤:
101、接收用户输入的待识别语句,并对该待识别语句进行分词处理,以得到组成该待识别语句的多个分词。
其中,该待识别语句可以是待进行意图识别的任一语句,比如识别设备如机器人接收到的任一语句。可选的,该语句可以是文本,也可以是语音,也可以是视频中的语句。进一步可选的,如果获取到的语句为文本以外的语句,识别设备在获取到该语句之后,还可将该语句转换为文本语句,以便于快速实现对该语句进行分词处理及意图识别。例如,进行意图识别的对象可以是语音、文本、图片、影像等等,识别设备可通过获取如接收用户输入的语音、文字、图片、影像对象等,从获取到的语音、文字、图片、影像信息中提取 出句子文本,或者说将接收到的语音、文字、图片、影像等信息转换为句子文本,以得到该待识别语句,进而对该待识别语句进行分词,以实现对该语音、文字、图片、影像等对象的意图识别。
可选的,该分词处理对应的分词方法可以为结巴分词或斯坦福分词法或其他分词方法,本申请不做限定。
进一步可选的,对该待识别语句进行分词处理,得到的该组成该待识别语句的多个分词(还可称为词、词语、词条等等)可以为组成该待识别语句的所有分词,也可以为组成该待识别语句的所有分词中的部分分词,比如为该所有分词中去掉停用词或其他无意义的分词后的分词,以便于减小后续的关键词匹配开销即遍历概念树的靠小,这就有助于提升意图识别效率。例如,可预置一个过滤列表,该过滤列表可包括各种停用词或其他无意义的词,如“啊”、“哦”、“的”等等,从而在对查询语句进行分词后,能够通过与该过滤列表中的词进行匹配对比的方式确定出查询语句中的停用词等无意义的词,并去掉这些词。
可以理解,该待识别语句可以仅包含一个分词,也即,对该待识别语句进行分词处理,得到的组成该待识别语句的分词可以为一个或多个分词。该基于一个分词的意图识别方法与该基于多个分词的意图识别方法相同,为便于理解,本申请以该多个分词为例进行说明。
102、遍历预置的意图概念树的各意图节点下的关键词,以确定该多个分词在各意图节点下的关键词中命中的各第一目标关键词。
其中,该意图概念树可以是通过选取多种意图的查询语句样本,以确定出每种意图的关键词及设置得到每个关键词的权值,进而根据多种意图、该多种意图中每种意图的关键词以及每个关键词的权值建立/构建的。该意图概念树可包括多个意图节点,每个意图节点对应一种意图,且每个意图节点下可包括预先选取的一个或多个关键词,该一个或多个关键词即为意图节点对应的意图的关键词,每个关键词对应一个权值,该权值可预先设置得到。可选的,该多种意图可以为特定领域的意图,即该意图概念树可根据特定领域的查询语句样本建立的,使得针对特定领域也无需大量样本即可实现意图识别。进一步可选的,不同意图节点对应的意图可以是属于不同的分类,例如,该预置的意图概念树包括意图节点1和意图节点2,该意图节点1对应的意图为天气,该意图节点2对应的意图为机票;或者,不同意图节点对应的意图也可以属于相同的分类,例如,该预置的意图概念树包括意图节点1和意图节点2,该意图节点1对应的意图为天气,该意图节点2对应的意图为查询天气(可看作该天气的子意图),两者同属于天气分类。
可选的,该意图概念树中每个关键词如该第一目标关键词对应的权值可以是根据该关键词的TF-IDF值设置得到的,比如TF-IDF的值越大,权值越大;或者,可以是根据该关键词在对应的意图的分词集合出现的次数或频率等确定出的,比如该次数和/或频率越大,权值越大;或者,该每个关键词的权值可以设置为该TF-IDF值或次数或频率或其他值等等,本申请不做限定。
可以理解,遍历各意图节点下的关键词可以是指将该多个分词与各意图节点下的关键词进行匹配对比,该多个分词在各意图节点下的关键词中命中的第一目标关键词可以是指各意图节点下的关键词中与该多个分词匹配关键词。也就是说,在得到该多个分词之后,识别设备可分别将该多个分词语与各意图节点下的关键词进行匹配对比,以得到该多个分 词中与各意图节点下的关键词匹配的分词,或者说得到各意图节点下的关键词中与该多个分词匹配的关键词,即第一目标关键词,以便于基于该第一目标关键词及其对应的意图确定该待识别语句的意图。该确定出的第一目标关键词可以为一个也可以为多个,如果为多个,该多个第一目标关键词对应的意图可以相同也可以不同,即该多个第一目标关键词可以在同一个意图节点下也可以在不同的意图节点下;且该多个第一目标关键词中可以存在相同的第一目标关键词,比如该相同的第一目标关键词对应的意图不同,即该相同的第一目标关键词在不同的意图节点下。
103、根据各第一目标关键词对应的权值计算该待识别语句在各意图节点对应的意图的意图得分。
可选的,识别设备在计算该第一目标关键词对应的意图下的意图得分时,可以分别计算该多个分词在各意图节点下命中的第一目标关键词对应的权值的和值,即针对每个意图节点,计算该意图节点下的第一目标关键词的权值的和值,并将每个意图节点对应的和值作为该待识别语句在该意图节点对应的意图的意图得分,以得到该待识别语句在各意图节点对应的意图的意图得分。或者,可选的,识别设备还可分别计算该多个分词在各意图节点下命中的第一目标关键词对应的权值的乘积的值或对该权值进行处理得到其他值,并将每个意图节点对应的该乘积的值或其他值作为该待识别语句在该意图节点对应的意图下的意图得分,以得到该待识别语句在各意图节点对应的意图下的意图得分,等等,本申请不做限定。
例如,识别设备可针对该多个分词从根节点出发遍历概念树,当分词命中树上意图节点的关键词后,取出关键词的权值并将该意图节点下所有命中的关键词的权值进行累加,这样,所有意图节点都有该待识别语句对应的意图得分。如该意图得分的计算方式如下:
意图得分(score)=意图score+关键词的权值
其中,该关键词可以指上述的第一目标关键词,即命中的关键词。在遍历之前,意图score为0。如果该多个分词在某一意图节点下未命中任何关键词,则该待识别语句在该意图节点对应的意图的意图得分(以下可简称意图节点的意图得分或意图节点的得分)可以视为0。
可以理解,在其他实施例中,该意图得分还可叫做其余名称,本申请不做限定。
104、确定各意图节点对应的意图的意图得分中的最高意图得分,并判断该最高意图得分是否大于预设的第一阈值。
105、如果该最高意图得分大于该第一阈值,确定该待识别语句的意图为该最高意图得分对应的意图。
其中,该第一阈值可以是一个预设的固定值,具体可预先设置得到,本申请不做限定。例如,可预设一个初始阈值,并通过获取样本并执行上述的步骤101-105,以实现对该样本的意图识别,并通过确定出的该样本的意图和存储的该样本的真实意图进行比较,确定意图识别结果是否正确/成功,并计算出预设样本数量(可包括各种意图的样本)对应的识别成功率,进而可根据该识别成功率调整该初始阈值,直到某一初始阈值下对应的识别成功率超过预设成功率阈值(如98%),即可将该初始阈值作为该第一阈值。从而能够进一步提升意图识别的准确性。
可选的,如果该最高意图得分不大于该第一阈值,则可确定该待识别语句的意图为无关意图,即各意图节点对应的意图以外的意图,该待识别语句为无关查询。从而能够识别出无关意图。进一步可选的,在识别出该意图为无关意图之后,还可输出预设的提示消息,该提示消息可用于指示用户输入新的待识别语句,以基于新的待识别语句再次进行意图识别,从而提升意图识别的成功率。
或者,在其他可选的实施例中,该第一阈值还可动态设置得到,或者可设置得到多个第一阈值,比如可以为各意图节点分别设置一个第一阈值,如该第一阈值可以为判断待识别语句是否是各意图的最小判别值。进一步可选的,识别设备还可分别将各意图节点的意图得分与对应的第一阈值进行比较,如果仅存在一个意图节点的意图得分大于对应的第一阈值,则可将该意图节点的意图作为该待识别语句的意图;如果存在多个意图节点的意图得分大于对应的第一阈值,则可将该多个意图节点中意图得分最高的意图节点的意图作为该待识别语句的意图,或者将该多个意图节点中意图得分与对应的第一阈值差值最大的意图节点的意图作为该待识别语句的意图,等等;如果所有意图节点的意图得分均不大于对应的第一阈值,则可确定该待识别语句的意图为无关意图。从而可进一步提升意图识别的可靠性。
进一步可选的,在确定出该待识别语句的意图之后,即可基于该确定出的意图在信息库中查找/检索意图对应的信息,比如意图为天气时查找天气信息,又如意图为机票时查找机票信息等等,并可输出该信息(比如通过文字输出,或者通过语音输出,或者通过其他方式输出等等)或者向该用户对应的终端发送该信息,以供用户查看,对用户进行引导等等。
在本实施例中,识别设备能够通过对待识别语句进行分词处理得到多个分词,并通过遍历预置的意图概念树的各意图节点下的关键词,以确定该多个分词在各意图节点下的关键词中命中的关键词,进而根据该命中的关键词对应的权值计算该待识别语句在各意图节点对应的意图下的意图得分,以根据该意图得分确定该待识别语句的意图,从而实现意图识别,这就有助于提升意图识别的准确性,且无需依赖大量的数据样本。
请参见图2,图2是本申请实施例提供的另一种意图识别方法的流程示意图。具体的,如图2所示,该意图识别方法可以包括以下步骤:
201、从预设样本数据库分别选取多种意图的查询语句样本,并分别对每种意图的查询语句样本进行分词处理,以得到每种意图的查询语句样本的分词集合;如果该多种意图中存在包括子意图的意图,根据意图的子意图对该种意图的分词集合进行分组,以得到多个分词组。
其中,每种意图的分词集合可包括组成该种意图的查询语句样本的多个分词。该子意图可以和该分词组一一对应,每个分词组可包括一种子意图的查询语句样本的分词。
具体的,该预设样本数据库可包括各意图的查询语句样本(语料),该选取的每一种意图的查询语句样本可以包括多个,如每一种意图可对应一个包括选取的该意图的多个查询语句样本的样本集合。每一个查询语句样本可以由文本组成。可选的,各查询语句样本可以与其对应的意图的信息如意图标签关联存储于该样本数据库中,以便于实现样本的快速查找及选取。
在选取出各个意图的样本如某一特定领域的各意图的样本之后,针对每个意图的样本,识别设备可以对该意图的每个样本进行分词处理,得到分词后的多个分词。其中,该分词的方法可采用结巴分词或斯坦福分词方法等等。
可选的,每个分词集合(词袋)包括的分词可以为选取出的该分词集合对应的意图的样本集合中所有查询语句样本的所有分词,也可以为该所有分词中的部分分词,比如为该所有分词中去掉停用词或其他无意义的分词后的分词,以减小计算开销。相应地,每个分词组包括的分词可以为该分词组对应的子意图的样本集合中所有查询语句样本的所有分词,也可以为该所有分词中的部分分词,此处不赘述。
202、按照预设的关键词确定规则分别从每种意图的分词集合中确定出每种意图的关键词,以及从每种子意图的分词组中确定出每种子意图的关键词,并设置各关键词对应的权值。
其中,该关键词确定规则可预先设置得到。例如,该关键词确定规则可包括基于TF-IDF值的关键词确定规则、基于词频的关键词确定规则、基于次数的关键词确定规则、基于卡方校验值的关键词确定规则等中的任一种规则或多种规则组合确定的规则,本申请不做限定。
例如,在一种可能的实施方式中,在确定每种意图的关键词时,识别设备可分别计算得到每种意图的分词集合中的每个分词的词频-逆文件频率TF-IDF值,将每种意图的分词集合中TF-IDF值超过预设阈值的分词确定为该种意图的关键词;或者,按照TF-IDF值由大到小的顺序对每种意图的分词集合中的分词进行排序,将该排序前M的TF-IDF值对应的分词确定为该种意图的关键词,其中,M为大于0的整数。也就是说,针对每种意图的分词集合,可对该分词集合中的分词的进行TF-IDF计算,根据分词的TF-IDF值选取关键词,比如选取TF-IDF值阈值超过某一预设阈值(如0.12)的分词作为该意图的关键词,或者取出TF-IDF值排序靠前的预设数目的词作为该意图的关键词等等。
又如,在一种可能的实施方式中,在确定每种意图的关键词时,识别设备可分别计算得到每种意图的分词集合中的每个分词在该分词集合出现的频率,每个分词对应的频率为该分词在该分词集合出现的次数与该分词集合的分词总数目(如具体可以是去掉停用词后的分词数目)的比值,如词频(term frequency,TF);将每种意图的分词集合中频率超过预设频率阈值的分词确定为该种意图的关键词;或者,按照频率由大到小的顺序对每种意图的分词集合中的分词进行排序,将该排序前N的频率对应的分词确定为该种意图的关键词,其中,N为大于0的整数。也就是说,针对每种意图的分词集合,可统计分词集合的分词的词频,根据分词的词频选取关键词,比如选取词频超过预设频率阈值的分词作为该意图的关键词,或者取出词频排序靠前的一定数目如排在前6的词条作为该意图的关键词等等。
又如,在一种可能的实施方式中,在确定每种意图的关键词时,识别设备可分别计算得到每种意图的分词集合中的每个分词在该分词集合出现的次数,将每种意图的分词集合中次数超过预设次数阈值的分词确定为该种意图的关键词;或者,按照次数由大到小的顺序对每种意图的分词集合中的分词进行排序,将该排序前E的次数对应的分词确定为该种意图的关键词,其中,E为大于0的整数。
又如,在一种可能的实施方式中,在确定每种意图的关键词时,识别设备可对每种意图的分词集合中的分词进行卡方检验,得到每种意图的分词集合中的每个分词的卡方检验的值,将每种意图的分词集合中卡方检验的值超过预设校验阈值的分词确定为该种意图的关键词;或者,按照卡方检验的值由大到小的顺序对每种意图的分词集合中的分词进行排序,将该排序前F的卡方检验的值对应的分词确定为该种意图的关键词,其中,F为大于0的整数。
可选的,在选取意图的关键词时,可以采用上述任一种关键词确定规则来选取,或者可以通过将几种规则结合来选取,比如将上述的一种或多种规则下选取出的相同关键词作为该意图的关键词;或者,可以为每一种选取规则设置一个权重,将上述的各规则下选取出的关键词结合对应规则的权重进一步筛选出取值大于预设阈值的分词作为该意图的关键词,或将取值靠前的预设数目如前20的分词作为该意图的关键词等等。从而能够进一步提升选取出的关键词的可靠性和灵活性,以便于提升意图识别的准确性。
例如,分词集合中每个分词的TF或TF-IDF可以通过如下方式计算得到:
词频可以是指某一个给定的词语在该意图中出现的次数或频率,也即分词在所在意图的分词集合出现的次数或频率,比如为了防止它偏向长的文件,该词频可以为该次数除以集合的分词总数目即意图总词数。
从而能够计算得到每个词的TF。
进一步的,可计算逆向文件频率(inverse document frequency,IDF),IDF的主要思想是:如果包含分词t的意图越少,IDF越大,则说明分词具有很好的类别区分能力,某个分词对语句的重要性越高,它的TF-IDF值就越大。某一特定分词的IDF,可以由总意图数目除以包含该分词之意图的数目加1的和,再将得到的商取对数得到。比如IDF可以为:
计算分词的TF-IDF:
TF-IDF
w=TF
w×IDF
w
从而能够计算得到每个分词的TF-IDF值。
可以理解,从每种子意图的分词组中确定出每种子意图的关键词也可以采用上述的关键词确定规则来进行确定,此处不赘述。可选的,从每种意图的分词集合中确定出每种意图的关键词以及从每种子意图的分词组中确定出每种子意图的关键词两者确定关键词的方式可以相同也可以不同,即两者所采用的关键词确定规则可以相同也可以不同,本申请不做限定。
进一步的,在确定出该关键词之后,即可为各关键词设置权值。比如可以直接将计算出来的关键词的TF-IDF值(或该词频或次数或卡方校验值等等)作为该关键词的权值,或者可以对TF-IDF值(或词频或次数或卡方校验值等等)进行归一化处理后作为关键词的权值(即所有的权值加起来为1),或者也可以根据用户的需求修改关键词的权值,或者也可 以手动增加需要的关键词并根据用户需求对其进行赋值,等等,此处不一一列举。
203、根据该多种意图、每种意图的关键词、每种子意图的关键词以及每个关键词的权值建立意图概念树。
其中,每个意图节点可包括一个多个子意图节点,每个子意图节点下可包括一个或多个关键词。可以理解,意图节点下可以不存在/不包括子意图节点。
在选取意图的关键词并确定各关键词的权值之后,即可构建意图概念树,该意图概念树可以包括一层或多层意图,如第一层为意图节点(其父节点为根节点),第二层为该意图节点的子意图节点,其下还可以有第三层如该子意图节点的子意图节点,等等。其中,每一个意图都是从根节点出发,根节点下面是各大意图(分类)的关键词,各意图还可能存在子意图。从而能够通过建立概念树实现特定领域下的意图识别,无需依赖大量的数据样本,且意图识别的可靠性较高。
例如,“机票”意图下有{‘机票’,‘航班’,‘航线’,‘机场’,‘天气’,‘温度’,‘气温’,‘旅游’,‘延误险’,‘意外险’,...,‘登机’}等关键词;在“股票”意图下有{‘股票’,‘行情’,‘大盘’,‘推荐’,‘指数’,‘涨幅’,‘K线’,‘炒股’,‘股市’,‘持有’,‘赚钱’,‘分析’,...,‘长期’}等关键词。又如,在“机票”的意图下会有“查看”子意图,子意图下也会有相应的关键词库。每个意图的关键词都可设置有关键词的权值。
204、接收用户输入的待识别语句,并对该待识别语句进行分词处理,以得到组成该待识别语句的多个分词。
可选的,该分词处理对应的分词方法可以为斯坦福分词方法或结巴分词方法等,并可在分词之后去掉其中无意义的词,具体可参照上述相关描述,此处不赘述。从而可以减小遍历意图节点进行意图识别带来的开销,因为需要为每一个分词遍历概念树。
205、遍历该意图概念树的各意图节点下的关键词,以确定该多个分词命中的各第一目标关键词。
其中,该意图概念树可包括多个意图节点,每个意图节点对应一种意图,且每个意图节点下可包括一个或多个关键词,每个关键词对应一个权值。
206、根据各第一目标关键词对应的权值计算该待识别语句在各各意图节点对应的意图的意图得分,确定出各意图节点对应的意图的意图得分中的最高意图得分,并判断该最高意图得分是否大于预设的第一阈值。
具体的,识别设备可将该多个分词从根节点出发逐层遍历概念树,当分词命中树上意图节点的关键词即第一目标关键词后,取出关键词的权值并将意图下所有命中的关键词的权值进行累加,这样,每一层如该意图节点层的所有意图节点都有该输入句子在该层上的意图得分。
可选的,该步骤204-206的其他描述可参照上述图1所示实施例中步骤101-104的相关描述,此处不赘述。
207、如果该最高意图得分大于该第一阈值,确定该最高意图得分对应的意图节点是否存在子意图节点。
208、如果存在子意图节点,遍历各子意图节点下的关键词,以确定该多个分词在各子意图节点下的关键词中命中的各第二目标关键词,并根据各第二目标关键词对应的权值计 算该待识别语句在各子意图节点对应的子意图的子意图得分。
其中,该子意图节点可以为一个或多个,该第二目标关键词可以为一个或多个。
209、确定各子意图节点对应的子意图的子意图得分中的最高子意图得分,并判断该最高子意图得分是否大于预设的第二阈值。
其中,该第二阈值可预先设置得到,该第二阈值与该第一阈值可以相同也可以不同,本申请不做限定。
可以理解,遍历该最高意图得分对应的意图节点下各子意图节点下的关键词,以确定命中的各第二目标关键词,以及计算各子意图节点对应的子意图得分的方式,与上述遍历各意图节点下的关键词,以确定命中的各第一目标关键词,以及计算各意图节点对应的意图得分的方式相同,此处不赘述。
可选的,如果确定出的最高意图得分有多个,则可分别确定各最高意图得分的意图节点下的各子意图节点的子意图得分,并确定各子意图得分中的最高子意图得分将其与第二阈值进行比较以实现意图识别。
210、如果该最高子意图得分不大于该第二阈值,确定该待识别语句的意图为该最高意图得分对应的意图。
可选的,如果该最高子意图得分大于该第二阈值,则可确定该待识别语句的意图为该最高子意图得分对应的意图,即将该最高子意图得分对应的意图确定为该待识别语句的意图。
在对待识别语句进行意图识别时,对于任一层节点,如果最高得分超过该层意图阈值,则判断是否有子意图节点,如果有子意图节点,则遍历节点下的子意图节点的关键词及进行后续流程;如果没有子意图节点,则可确定该待识别语句的意图为该最高得分对应的意图,如可输出该最高得分对应的意图为待识别语句的意图;如果最高得分没有超过该层意图阈值,则可确定该待识别语句的意图为该父节点的意图,如可输出该节点的父节点意图为待识别语句的意图,如果父节点为根节点,则可确定该待识别语句的意图为无关意图,如可输出没有意图,或者可输出提示消息以指示用户输入新的待识别语句,以基于该新的待识别语句进行意图识别。也就是说,本方案能够通过取该层意图得分最高的节点,判断是否超过设定阈值,如果没有超过,则判定意图为上一层的节点的意图。如果超过,则判断是否有子意图,如果有则继续遍历子意图。如果判定没有子意图,则判定该句子就是属于所在节点意图。如果子意图得分最高的节点没有超过设定的阈值,则判定意图为上一层的节点的意图。其中,每一层设定的阈值可以相同也可以不同。
举例来说,假设该意图概念树只包括两个意图节点(即两个意图),一个是天气另外一个是机票,天气意图下包括今天、天气等关键词(假设今天的权值为0.2,天气的权值为0.3),机票意图下包括天气、航班等关键词(假设天气的权值为0.05,航班的权值为0.4)。接收到待识别语句之后,可以将句子分词,并将分词后的词一个一个遍历概念树的上的关键词。例如,输入的句子是:“今天天气怎么样?”分词后得到:“今天 天气 怎么样”这三个分词。“今天”这个词在机票意图没有出现,那么机票意图score=0,而“今天”这个词在天气意图出现了,那么天气意图score=0.2。接着同样方式遍历“天气”这个词,这个时候机票意图里面有“天气”的关键词且权值为0.05,则此时机票意图score=0+0.05,天 气意图也有“天气”的关键词且权值为0.3,则天气score=0.2+0.3。接着遍历“怎么样”这个词,“怎么样”这个词在机票和天气意图里面都没有相应的意图关键词,所以,此时机票意图score=0+0.05+0=0.05,天气意图score=0.2+0.3+0=0.5。当句子的词都遍历过一遍后,统计这一层意图score是哪一个意图节点最高(天气意图节点0.5,机票意图节点0.05),现在是天气意图节点最高0.5。然后判断最高得分意图节点是否超过这一层的意图阈值(即上述的第一阈值,假设该层意图阈值设置为0.3),此时最高意图天气意图的score为0.5超过所设定阈值,则可确定天气是否存在子意图,或者说确定天气意图节点是否存在子意图节点,如果存在,则可继续以同样的方式遍历天气的子意图节点。若天气意图没有子意图节点则可确定/返回这句话的判断意图就是属于“天气”意图。若天气有子意图(假如是“询问天气“意图)且得分超过子意图层设定的阈值(即上述的第二阈值),则可确定/返回”今天天气怎么样”句子的意图为“询问天气”。假如该子意图得分没有超过阈值,则可确定/返回子意图的父节点的意图,即“天气”意图。在识别出用户意图之后,即可根据该意图向用户返回信息、对客户进行引导等等。
可选的,在构建多层概念树之后,还可调整各关键词的权值,比如可根据一段时间内(如一周、一个月等等)输出意图对应的关键词的频率,更改该关键词的权值,输出意图对应关键词的频率越高,增加该关键词的权值,反之,则减小该关键词的权值,如可设置得到该频率与权值的增加值/减少值的对应关系。此外,还可收集输出没有意图的句子,对这些句子进行训练分析,整理出新的意图及其关键词和权值,并将该新的意图关键词及其权值更新到多层概念树中,以提升意图识别的成功率和可靠性。
在本实施例中,识别设备能够通过选取意图的关键词建立特定领域下的概念树,通过遍历概念树中关键词与概念树所设置的关键词权值确定出句子的所属的意图,以实现在样本较少的特定领域下的可靠意图识别,无需依赖大量的数据样本,意图识别的准确性和可靠性较高。
上述方法实施例都是对本申请的意图识别方法的举例说明,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。
请参见图3,图3是本申请实施例提供的一种识别设备的结构示意图。本申请实施例的识别设备(装置)可包括用于执行上述意图识别方法的单元。具体的,本实施例的识别设备300可包括:通信单元301和处理单元302。其中,
通信单元301,用于接收用户输入的待识别语句;
处理单元302,用于对所述待识别语句进行分词处理,以得到组成所述待识别语句的多个分词;
处理单元302,还用于遍历预置的意图概念树的各意图节点下的关键词,以确定所述多个分词在各意图节点下的关键词中命中的各第一目标关键词;其中,所述意图概念树包括多个意图节点,每个意图节点对应一种意图,且每个意图节点下包括多个关键词,每个关键词对应一个权值;
处理单元302,还用于根据各第一目标关键词对应的权值计算所述待识别语句在各意图节点对应的意图的意图得分;确定各意图节点对应的意图的意图得分中的最高意图得分,并判断所述最高意图得分是否大于预设的第一阈值;如果所述最高意图得分大于所述第一 阈值,确定所述待识别语句的意图为所述最高意图得分对应的意图。
可选的,所述识别设备还可包括获取单元303;
获取单元303,用于从预设样本数据库分别选取多种意图的查询语句样本;
处理单元302,还用于分别对每种意图的查询语句样本进行分词处理,以得到每种意图的查询语句样本的分词集合,每种意图的分词集合包括组成该种意图的查询语句样本的多个分词;
处理单元302,还用于按照预设的关键词确定规则分别从每种意图的分词集合中确定出每种意图的关键词,并设置各关键词对应的权值;根据所述多种意图、每种意图的关键词以及每个关键词的权值建立所述意图概念树。
可选的,处理单元302,还可用于当所述多种意图中存在包括子意图的意图时,根据意图的子意图对该种意图的分词集合进行分组,以得到多个分词组,所述子意图和所述分词组一一对应,每个分词组包括一种子意图的查询语句样本的分词;
按照预设的关键词确定规则分别从每种子意图的分词组中确定出每种子意图的关键词,并设置每种子意图的关键词的权值;
处理单元302,在执行所述根据所述多种意图、每种意图的关键词以及每个关键词的权值建立所述意图概念树时,可具体用于:
根据所述多种意图、每种意图的关键词、每种子意图的关键词以及每个关键词的权值建立所述意图概念树;其中,每个子意图节点下包括多个关键词;
处理单元302,还可用于当所述最高意图得分大于所述第一阈值时,确定所述最高意图得分对应的意图节点是否存在子意图节点;如果存在子意图节点,遍历各子意图节点下的关键词,以确定所述多个分词在各子意图节点下的关键词中命中的各第二目标关键词,并根据各第二目标关键词对应的权值计算所述待识别语句在各子意图节点对应的子意图的子意图得分;确定各子意图节点对应的子意图的子意图得分中的最高子意图得分,并判断所述最高子意图得分是否大于预设的第二阈值;如果所述最高子意图得分不大于所述第二阈值,触发确定所述待识别语句的意图为所述最高意图得分对应的意图。
可选的,处理单元302,还可用于当所述最高意图得分不大于所述第一阈值时,确定所述待识别语句的意图为各意图节点对应的意图以外的无关意图;
通信单元301,还可用于输出预设的提示消息,所述提示消息用于指示用户输入新的待识别语句,以基于所述新的待识别语句进行意图识别。
可选的,处理单元302在执行所述按照预设的关键词确定规则分别从每种意图的分词集合中确定出每种意图的关键词时,可具体用于:
分别计算得到每种意图的分词集合中的每个分词的词频-逆文件频率TF-IDF值;
将每种意图的分词集合中TF-IDF值超过预设阈值的分词确定为该种意图的关键词;或者,按照TF-IDF值由大到小的顺序对每种意图的分词集合中的分词进行排序,将所述排序前M的TF-IDF值对应的分词确定为该种意图的关键词,其中,M为大于0的整数。
可选的,处理单元302在执行所述按照预设的关键词确定规则分别从每种意图的分词集合中确定出每种意图的关键词时,可具体用于:
分别计算得到每种意图的分词集合中的每个分词的在所述分词集合出现的频率,每个 分词对应的频率为该分词在所述分词集合出现的次数与所述分词集合的分词总数目的比值;
将每种意图的分词集合中频率超过预设频率阈值的分词确定为该种意图的关键词;或者,按照频率由大到小的顺序对每种意图的分词集合中的分词进行排序,将所述排序前N的频率对应的分词确定为该种意图的关键词,其中,N为大于0的整数。
可选的,所述第一目标关键词对应的权值为所述第一目标关键词的词频-逆文件频率TF-IDF值,或者,所述第一目标关键词对应的权值为所述第一目标关键词在对应的意图的分词集合出现的次数或频率;
处理单元302在执行所述根据各第一目标关键词对应的权值计算所述待识别语句在各意图节点对应的意图的意图得分时,可具体用于:
分别计算所述多个分词在各意图节点下命中的第一目标关键词对应的权值的和值,并将每个意图节点对应的和值作为所述待识别语句在该意图节点对应的意图的意图得分,以得到所述待识别语句在各意图节点对应的意图的意图得分。
具体的,该识别设备可通过上述单元实现上述图1至图2所示实施例中的意图识别方法中的部分或全部步骤。应理解,本申请实施例是对应方法实施例的装置实施例,对方法实施例的描述,也适用于本申请实施例。
请参见图4,图4是本申请实施例提供的另一种识别设备的结构示意图。该识别设备用于执行上述的方法。如图4所示,本实施例中的识别设备400可以包括:一个或多个处理器401和存储器402。可选的,该识别设备还可包括一个或多个用户接口403,和/或,一个或多个通信接口404。上述处理器401、用户接口403、通信接口404和存储器402可通过总线405连接,或者可以通过其他方式连接,图4中以总线方式进行示例说明。其中,存储器402用于存储计算机程序,所述计算机程序包括程序指令,处理器401用于执行存储器402存储的程序指令。其中,处理器401可用于调用所述程序指令执行上述图1至图2中的部分或全部步骤。
例如,处理器401可用于调用所述程序指令执行以下步骤:通过用户接口403接收用户输入的待识别语句,并对所述待识别语句进行分词处理,以得到组成所述待识别语句的多个分词;遍历预置的意图概念树的各意图节点下的关键词,以确定所述多个分词在各意图节点下的关键词中命中的各第一目标关键词;其中,所述意图概念树包括多个意图节点,每个意图节点对应一种意图,且每个意图节点下包括多个关键词,每个关键词对应一个权值;根据各第一目标关键词对应的权值计算所述待识别语句在各意图节点对应的意图的意图得分;确定各意图节点对应的意图的意图得分中的最高意图得分,并判断所述最高意图得分是否大于预设的第一阈值;如果所述最高意图得分大于所述第一阈值,确定所述待识别语句的意图为所述最高意图得分对应的意图。
可选的,处理器401还可执行以下步骤:从预设样本数据库分别选取多种意图的查询语句样本,并分别对每种意图的查询语句样本进行分词处理,以得到每种意图的查询语句样本的分词集合,每种意图的分词集合包括组成该种意图的查询语句样本的多个分词;按照预设的关键词确定规则分别从每种意图的分词集合中确定出每种意图的关键词,并设置各关键词对应的权值;根据所述多种意图、每种意图的关键词以及每个关键词的权值建立 所述意图概念树。
可选的,处理器401还可执行以下步骤:如果所述多种意图中存在包括子意图的意图,根据意图的子意图对该种意图的分词集合进行分组,以得到多个分词组,所述子意图和所述分词组一一对应,每个分词组包括一种子意图的查询语句样本的分词;按照预设的关键词确定规则分别从每种子意图的分词组中确定出每种子意图的关键词,并设置每种子意图的关键词的权值;
处理器401在执行所述根据所述多种意图、每种意图的关键词以及每个关键词的权值建立所述意图概念树时,可具体执行以下步骤:根据所述多种意图、每种意图的关键词、每种子意图的关键词以及每个关键词的权值建立所述意图概念树;其中,每个子意图节点下包括多个关键词;
处理器401在执行所述确定所述待识别语句的意图为所述最高意图得分对应的意图之前,还可执行以下步骤:如果所述最高意图得分大于所述第一阈值,确定所述最高意图得分对应的意图节点是否存在子意图节点;如果存在子意图节点,遍历各子意图节点下的关键词,以确定所述多个分词在各子意图节点下的关键词中命中的各第二目标关键词,并根据各第二目标关键词对应的权值计算所述待识别语句在各子意图节点对应的子意图的子意图得分;确定各子意图节点对应的子意图的子意图得分中的最高子意图得分,并判断所述最高子意图得分是否大于预设的第二阈值;如果所述最高子意图得分不大于所述第二阈值,触发所述确定所述待识别语句的意图为所述最高意图得分对应的意图的步骤。
可选的,处理器401还可执行以下步骤:如果所述最高意图得分不大于所述第一阈值,确定所述待识别语句的意图为各意图节点对应的意图以外的无关意图;通过用户接口403输出预设的提示消息,所述提示消息用于指示用户输入新的待识别语句,以基于所述新的待识别语句进行意图识别。
可选的,处理器401在执行所述按照预设的关键词确定规则分别从每种意图的分词集合中确定出每种意图的关键词时,可具体执行以下步骤:分别计算得到每种意图的分词集合中的每个分词的词频-逆文件频率TF-IDF值;将每种意图的分词集合中TF-IDF值超过预设阈值的分词确定为该种意图的关键词;或者,按照TF-IDF值由大到小的顺序对每种意图的分词集合中的分词进行排序,将所述排序前M的TF-IDF值对应的分词确定为该种意图的关键词,其中,M为大于0的整数。
可选的,处理器401在执行所述按照预设的关键词确定规则分别从每种意图的分词集合中确定出每种意图的关键词时,可具体执行以下步骤:分别计算得到每种意图的分词集合中的每个分词的在所述分词集合出现的频率,每个分词对应的频率为该分词在所述分词集合出现的次数与所述分词集合的分词总数目的比值;将每种意图的分词集合中频率超过预设频率阈值的分词确定为该种意图的关键词;或者,按照频率由大到小的顺序对每种意图的分词集合中的分词进行排序,将所述排序前N的频率对应的分词确定为该种意图的关键词,其中,N为大于0的整数。
可选的,所述第一目标关键词对应的权值为所述第一目标关键词的词频-逆文件频率TF-IDF值,或者,所述第一目标关键词对应的权值为所述第一目标关键词在对应的意图的分词集合出现的次数或频率;
处理器401在执行所述根据各第一目标关键词对应的权值计算所述待识别语句在各意图节点对应的意图的意图得分时,可具体执行以下步骤:分别计算所述多个分词在各意图节点下命中的第一目标关键词对应的权值的和值,并将每个意图节点对应的和值作为所述待识别语句在该意图节点对应的意图的意图得分,以得到所述待识别语句在各意图节点对应的意图的意图得分。
其中,所述处理器401可以是中央处理单元(Central Processing Unit,CPU),该处理器还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
用户接口403可包括输入设备和输出设备,输入设备可以包括触控板、麦克风等,输出设备可以包括显示器(LCD等)、扬声器等。
通信接口404可包括接收器和发射器,用于与其他设备进行通信。
存储器402可以包括只读存储器和随机存取存储器,并向处理器401提供指令和数据。存储器402的一部分还可以包括非易失性随机存取存储器。例如,存储器402还可以存储上述的关键词、权值等等。
具体实现中,本申请实施例中所描述的处理器401等可执行上述图1至图2所示的方法实施例中所描述的实现方式,也可执行本申请实施例图3所描述的各单元的实现方式,此处不赘述。
本申请实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时可实现图1至图2所对应实施例中描述的意图识别方法中的部分或全部步骤,也可实现本申请图3或图4所示实施例的识别设备的功能,此处不赘述。
本申请实施例还提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述方法中的部分或全部步骤。
所述计算机可读存储介质可以是前述任一实施例所述的识别设备的内部存储单元,例如识别设备的硬盘或内存。所述计算机可读存储介质也可以是所述识别设备的外部存储设备,例如所述识别设备上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。
在本申请中,术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。
在本申请的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
以上所述,仅为本申请的部分实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。
Claims (20)
- 一种意图识别方法,其特征在于,包括:接收用户输入的待识别语句,并对所述待识别语句进行分词处理,以得到组成所述待识别语句的多个分词;遍历预置的意图概念树的各意图节点下的关键词,以确定所述多个分词在各意图节点下的关键词中命中的各第一目标关键词;其中,所述意图概念树包括多个意图节点,每个意图节点对应一种意图,且每个意图节点下包括多个关键词,每个关键词对应一个权值;根据各第一目标关键词对应的权值计算所述待识别语句在各意图节点对应的意图的意图得分;确定各意图节点对应的意图的意图得分中的最高意图得分,并判断所述最高意图得分是否大于预设的第一阈值;如果所述最高意图得分大于所述第一阈值,确定所述待识别语句的意图为所述最高意图得分对应的意图。
- 根据权利要求1所述的方法,其特征在于,所述方法还包括:从预设样本数据库分别选取多种意图的查询语句样本,并分别对每种意图的查询语句样本进行分词处理,以得到每种意图的查询语句样本的分词集合,每种意图的分词集合包括组成该种意图的查询语句样本的多个分词;按照预设的关键词确定规则分别从每种意图的分词集合中确定出每种意图的关键词,并设置各关键词对应的权值;根据所述多种意图、每种意图的关键词以及每个关键词的权值建立所述意图概念树。
- 根据权利要求2所述的方法,其特征在于,所述方法还包括:如果所述多种意图中存在包括子意图的意图,根据意图的子意图对该种意图的分词集合进行分组,以得到多个分词组,所述子意图和所述分词组一一对应,每个分词组包括一种子意图的查询语句样本的分词;按照预设的关键词确定规则分别从每种子意图的分词组中确定出每种子意图的关键词,并设置每种子意图的关键词的权值;所述根据所述多种意图、每种意图的关键词以及每个关键词的权值建立所述意图概念树,包括:根据所述多种意图、每种意图的关键词、每种子意图的关键词以及每个关键词的权值建立所述意图概念树;其中,每个子意图节点下包括多个关键词;在所述确定所述待识别语句的意图为所述最高意图得分对应的意图之前,所述方法还包括:如果所述最高意图得分大于所述第一阈值,确定所述最高意图得分对应的意图节点是否存在子意图节点;如果存在子意图节点,遍历各子意图节点下的关键词,以确定所述多个分词在各子意图节点下的关键词中命中的各第二目标关键词,并根据各第二目标关键词对应的权值计算所述待识别语句在各子意图节点对应的子意图的子意图得分;确定各子意图节点对应的子意图的子意图得分中的最高子意图得分,并判断所述最高子意图得分是否大于预设的第二阈值;如果所述最高子意图得分不大于所述第二阈值,触发所述确定所述待识别语句的意图为所述最高意图得分对应的意图的步骤。
- 根据权利要求1-3任一项所述的方法,其特征在于,所述方法还包括:如果所述最高意图得分不大于所述第一阈值,确定所述待识别语句的意图为各意图节点对应的意图以外的无关意图;输出预设的提示消息,所述提示消息用于指示用户输入新的待识别语句,以基于所述新的待识别语句进行意图识别。
- 根据权利要求2所述的方法,其特征在于,所述按照预设的关键词确定规则分别从每种意图的分词集合中确定出每种意图的关键词,包括:分别计算得到每种意图的分词集合中的每个分词的词频-逆文件频率TF-IDF值;将每种意图的分词集合中TF-IDF值超过预设阈值的分词确定为该种意图的关键词;或者,按照TF-IDF值由大到小的顺序对每种意图的分词集合中的分词进行排序,将所述排序前M的TF-IDF值对应的分词确定为该种意图的关键词,其中,M为大于0的整数。
- 根据权利要求2所述的方法,其特征在于,所述按照预设的关键词确定规则分别从每种意图的分词集合中确定出每种意图的关键词,包括:分别计算得到每种意图的分词集合中的每个分词的在所述分词集合出现的频率,每个分词对应的频率为该分词在所述分词集合出现的次数与所述分词集合的分词总数目的比值;将每种意图的分词集合中频率超过预设频率阈值的分词确定为该种意图的关键词;或者,按照频率由大到小的顺序对每种意图的分词集合中的分词进行排序,将所述排序前N的频率对应的分词确定为该种意图的关键词,其中,N为大于0的整数。
- 根据权利要求1所述的方法,其特征在于,所述第一目标关键词对应的权值为所述第一目标关键词的词频-逆文件频率TF-IDF值,或者,所述第一目标关键词对应的权值为所述第一目标关键词在对应的意图的分词集合出现的次数或频率;所述根据各第一目标关键词对应的权值计算所述待识别语句在各意图节点对应的意图的意图得分,包括:分别计算所述多个分词在各意图节点下命中的第一目标关键词对应的权值的和值,并将每个意图节点对应的和值作为所述待识别语句在该意图节点对应的意图的意图得分,以得到所述待识别语句在各意图节点对应的意图的意图得分。
- 一种识别设备,其特征在于,包括:通信单元和处理单元;所述通信单元,用于接收用户输入的待识别语句;所述处理单元,用于对所述待识别语句进行分词处理,以得到组成所述待识别语句的多个分词;所述处理单元,还用于遍历预置的意图概念树的各意图节点下的关键词,以确定所述 多个分词在各意图节点下的关键词中命中的各第一目标关键词;其中,所述意图概念树包括多个意图节点,每个意图节点对应一种意图,且每个意图节点下包括多个关键词,每个关键词对应一个权值;所述处理单元,还用于根据各第一目标关键词对应的权值计算所述待识别语句在各意图节点对应的意图的意图得分;确定各意图节点对应的意图的意图得分中的最高意图得分,并判断所述最高意图得分是否大于预设的第一阈值;如果所述最高意图得分大于所述第一阈值,确定所述待识别语句的意图为所述最高意图得分对应的意图。
- 根据权利要求8所述的识别设备,其特征在于,所述识别设备还包括:获取单元;所述获取单元,用于从预设样本数据库分别选取多种意图的查询语句样本;所述处理单元,还用于分别对每种意图的查询语句样本进行分词处理,以得到每种意图的查询语句样本的分词集合,每种意图的分词集合包括组成该种意图的查询语句样本的多个分词;所述处理单元,还用于按照预设的关键词确定规则分别从每种意图的分词集合中确定出每种意图的关键词,并设置各关键词对应的权值;根据所述多种意图、每种意图的关键词以及每个关键词的权值建立所述意图概念树。
- 根据权利要求9所述的识别设备,其特征在于,所述处理单元,还用于当所述多种意图中存在包括子意图的意图时,根据意图的子意图对该种意图的分词集合进行分组,以得到多个分词组,所述子意图和所述分词组一一对应,每个分词组包括一种子意图的查询语句样本的分词;按照预设的关键词确定规则分别从每种子意图的分词组中确定出每种子意图的关键词,并设置每种子意图的关键词的权值;所述处理单元,在执行所述根据所述多种意图、每种意图的关键词以及每个关键词的权值建立所述意图概念树时,具体用于:根据所述多种意图、每种意图的关键词、每种子意图的关键词以及每个关键词的权值建立所述意图概念树;其中,每个子意图节点下包括多个关键词;所述处理单元,还用于当所述最高意图得分大于所述第一阈值时,确定所述最高意图得分对应的意图节点是否存在子意图节点;如果存在子意图节点,遍历各子意图节点下的关键词,以确定所述多个分词在各子意图节点下的关键词中命中的各第二目标关键词,并根据各第二目标关键词对应的权值计算所述待识别语句在各子意图节点对应的子意图的子意图得分;确定各子意图节点对应的子意图的子意图得分中的最高子意图得分,并判断所述最高子意图得分是否大于预设的第二阈值;如果所述最高子意图得分不大于所述第二阈值,触发所述确定所述待识别语句的意图为所述最高意图得分对应的意图。
- 根据权利要求8-10任一项所述的识别设备,其特征在于,所述处理单元,还用于当所述最高意图得分不大于所述第一阈值时,确定所述待识别语句的意图为各意图节点对应的意图以外的无关意图;所述通信单元,还用于输出预设的提示消息,所述提示消息用于指示用户输入新的待识别语句,以基于所述新的待识别语句进行意图识别。
- 根据权利要求9所述的识别设备,其特征在于,所述处理单元在执行所述按照预设的关键词确定规则分别从每种意图的分词集合中确定出每种意图的关键词时,具体用于:分别计算得到每种意图的分词集合中的每个分词的词频-逆文件频率TF-IDF值;将每种意图的分词集合中TF-IDF值超过预设阈值的分词确定为该种意图的关键词;或者,按照TF-IDF值由大到小的顺序对每种意图的分词集合中的分词进行排序,将所述排序前M的TF-IDF值对应的分词确定为该种意图的关键词,其中,M为大于0的整数。
- 根据权利要求9所述的识别设备,其特征在于,所述处理单元在执行所述按照预设的关键词确定规则分别从每种意图的分词集合中确定出每种意图的关键词时,具体用于:分别计算得到每种意图的分词集合中的每个分词的在所述分词集合出现的频率,每个分词对应的频率为该分词在所述分词集合出现的次数与所述分词集合的分词总数目的比值;将每种意图的分词集合中频率超过预设频率阈值的分词确定为该种意图的关键词;或者,按照频率由大到小的顺序对每种意图的分词集合中的分词进行排序,将所述排序前N的频率对应的分词确定为该种意图的关键词,其中,N为大于0的整数。
- 根据权利要求8所述的识别设备,其特征在于,所述第一目标关键词对应的权值为所述第一目标关键词的词频-逆文件频率TF-IDF值,或者,所述第一目标关键词对应的权值为所述第一目标关键词在对应的意图的分词集合出现的次数或频率;所述处理单元在执行所述根据各第一目标关键词对应的权值计算所述待识别语句在各意图节点对应的意图的意图得分时,具体用于:分别计算所述多个分词在各意图节点下命中的第一目标关键词对应的权值的和值,并将每个意图节点对应的和值作为所述待识别语句在该意图节点对应的意图的意图得分,以得到所述待识别语句在各意图节点对应的意图的意图得分。
- 一种识别设备,其特征在于,包括处理器和存储器,所述处理器和存储器相互连接,其中,所述存储器用于存储计算机程序,所述计算机程序包括程序指令,所述处理器被配置用于调用所述程序指令,执行以下步骤:接收用户输入的待识别语句,并对所述待识别语句进行分词处理,以得到组成所述待识别语句的多个分词;遍历预置的意图概念树的各意图节点下的关键词,以确定所述多个分词在各意图节点下的关键词中命中的各第一目标关键词;其中,所述意图概念树包括多个意图节点,每个意图节点对应一种意图,且每个意图节点下包括多个关键词,每个关键词对应一个权值;根据各第一目标关键词对应的权值计算所述待识别语句在各意图节点对应的意图的意图得分;确定各意图节点对应的意图的意图得分中的最高意图得分,并判断所述最高意图得分是否大于预设的第一阈值;如果所述最高意图得分大于所述第一阈值,确定所述待识别语句的意图为所述最高意图得分对应的意图。
- 根据权利要求15所述的识别设备,其特征在于,所述处理器还用于调用所述程序指令执行以下步骤:从预设样本数据库分别选取多种意图的查询语句样本,并分别对每种意图的查询语句样本进行分词处理,以得到每种意图的查询语句样本的分词集合,每种意图的分词集合包括组成该种意图的查询语句样本的多个分词;按照预设的关键词确定规则分别从每种意图的分词集合中确定出每种意图的关键词,并设置各关键词对应的权值;根据所述多种意图、每种意图的关键词以及每个关键词的权值建立所述意图概念树。
- 根据权利要求16所述的识别设备,其特征在于,所述处理器还用于调用所述程序指令执行以下步骤:如果所述多种意图中存在包括子意图的意图,根据意图的子意图对该种意图的分词集合进行分组,以得到多个分词组,所述子意图和所述分词组一一对应,每个分词组包括一种子意图的查询语句样本的分词;按照预设的关键词确定规则分别从每种子意图的分词组中确定出每种子意图的关键词,并设置每种子意图的关键词的权值;所述处理器调用所述程序指令执行所述根据所述多种意图、每种意图的关键词以及每个关键词的权值建立所述意图概念树时,具体执行以下步骤:根据所述多种意图、每种意图的关键词、每种子意图的关键词以及每个关键词的权值建立所述意图概念树;其中,每个子意图节点下包括多个关键词;所述处理器调用所述程序指令执行所述确定所述待识别语句的意图为所述最高意图得分对应的意图之前,还执行以下步骤:如果所述最高意图得分大于所述第一阈值,确定所述最高意图得分对应的意图节点是否存在子意图节点;如果存在子意图节点,遍历各子意图节点下的关键词,以确定所述多个分词在各子意图节点下的关键词中命中的各第二目标关键词,并根据各第二目标关键词对应的权值计算所述待识别语句在各子意图节点对应的子意图的子意图得分;确定各子意图节点对应的子意图的子意图得分中的最高子意图得分,并判断所述最高子意图得分是否大于预设的第二阈值;如果所述最高子意图得分不大于所述第二阈值,触发所述确定所述待识别语句的意图为所述最高意图得分对应的意图的步骤。
- 根据权利要求15-17任一项所述的识别设备,其特征在于,所述处理器还用于调用所述程序指令执行以下步骤:如果所述最高意图得分不大于所述第一阈值,确定所述待识别语句的意图为各意图节点对应的意图以外的无关意图;输出预设的提示消息,所述提示消息用于指示用户输入新的待识别语句,以基于所述新的待识别语句进行意图识别。
- 根据权利要求16所述的识别设备,其特征在于,所述处理器调用所述程序指令执行所述按照预设的关键词确定规则分别从每种意图的分词集合中确定出每种意图的关键词时,具体执行以下步骤:分别计算得到每种意图的分词集合中的每个分词的词频-逆文件频率TF-IDF值;将每种意图的分词集合中TF-IDF值超过预设阈值的分词确定为该种意图的关键词;或者,按照TF-IDF值由大到小的顺序对每种意图的分词集合中的分词进行排序,将所述排序前M的TF-IDF值对应的分词确定为该种意图的关键词,其中,M为大于0的整数。
- 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令当被处理器执行时使所述处理器执行如权利要求1-7任一项所述的方法。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910013964.2A CN109815314B (zh) | 2019-01-04 | 2019-01-04 | 一种意图识别方法、识别设备及计算机可读存储介质 |
| CN201910013964.2 | 2019-01-04 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2020140373A1 true WO2020140373A1 (zh) | 2020-07-09 |
Family
ID=66604064
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2019/088804 Ceased WO2020140373A1 (zh) | 2019-01-04 | 2019-05-28 | 一种意图识别方法、识别设备及计算机可读存储介质 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN109815314B (zh) |
| WO (1) | WO2020140373A1 (zh) |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113157892A (zh) * | 2021-05-24 | 2021-07-23 | 中国平安人寿保险股份有限公司 | 用户意图处理方法、装置、计算机设备及存储介质 |
| CN115455164A (zh) * | 2022-09-21 | 2022-12-09 | 中国工商银行股份有限公司 | 意愿级别的识别方法、装置、计算机设备和存储介质 |
| CN115544216A (zh) * | 2021-06-29 | 2022-12-30 | 珠海采筑电子商务有限公司 | 潜在客户识别方法、电子设备及相关产品 |
| CN116136992A (zh) * | 2021-11-12 | 2023-05-19 | 中国移动通信有限公司研究院 | 一种切片业务的意图处理方法、装置及通信设备 |
| CN117851590A (zh) * | 2023-12-11 | 2024-04-09 | 湖南三湘银行股份有限公司 | 一种基于大数据的信息核查方法 |
Families Citing this family (17)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110472027B (zh) * | 2019-07-18 | 2024-05-14 | 平安科技(深圳)有限公司 | 意图识别方法、设备及计算机可读存储介质 |
| CN110399462B (zh) * | 2019-07-26 | 2022-03-04 | 沈阳民航东北凯亚有限公司 | 一种信息的查询方法及装置 |
| CN110414005B (zh) * | 2019-07-31 | 2023-10-10 | 达闼机器人股份有限公司 | 意图识别方法、电子设备及存储介质 |
| CN110503143B (zh) * | 2019-08-14 | 2024-03-19 | 平安科技(深圳)有限公司 | 基于意图识别的阈值选取方法、设备、存储介质及装置 |
| US11935521B2 (en) * | 2019-09-12 | 2024-03-19 | Oracle International Corporation | Real-time feedback for efficient dialog processing |
| CN110955767A (zh) * | 2019-12-04 | 2020-04-03 | 中国太平洋保险(集团)股份有限公司 | 一种机器人对话系统中生成意图候选集列表集合的算法及装置 |
| CN111125332B (zh) * | 2019-12-20 | 2023-07-21 | 东软集团股份有限公司 | 计算词的tf-idf值的方法、装置、设备及存储介质 |
| CN111309383B (zh) * | 2020-02-28 | 2022-05-20 | 深圳数联天下智能科技有限公司 | 指令识别方法、装置、设备及存储介质 |
| CN111581388B (zh) * | 2020-05-11 | 2023-09-19 | 北京金山安全软件有限公司 | 一种用户意图识别方法、装置及电子设备 |
| CN112068712B (zh) * | 2020-09-02 | 2024-12-20 | 北京搜狗科技发展有限公司 | 一种推荐方法、装置和电子设备 |
| CN112232068B (zh) * | 2020-09-30 | 2023-05-05 | 和美(深圳)信息技术股份有限公司 | 一种意图识别方法、装置、电子设备及存储介质 |
| CN112101044B (zh) * | 2020-11-02 | 2021-11-12 | 北京淇瑀信息科技有限公司 | 一种意图识别方法、装置及电子设备 |
| CN112863499B (zh) * | 2021-01-13 | 2023-01-24 | 北京小米松果电子有限公司 | 语音识别方法及装置、存储介质 |
| CN113707300B (zh) * | 2021-08-30 | 2024-06-25 | 康键信息技术(深圳)有限公司 | 基于人工智能的搜索意图识别方法、装置、设备及介质 |
| CN113807089B (zh) * | 2021-09-16 | 2025-10-28 | 华为技术有限公司 | 文本数据的处理方法、神经网络的训练方法以及相关设备 |
| CN114678014A (zh) * | 2022-03-23 | 2022-06-28 | 平安普惠企业管理有限公司 | 意图识别方法、装置、计算机设备及计算机可读存储介质 |
| CN114880472B (zh) * | 2022-04-28 | 2024-08-06 | 支付宝(杭州)信息技术有限公司 | 数据处理方法、装置及设备 |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106598999A (zh) * | 2015-10-19 | 2017-04-26 | 北京国双科技有限公司 | 一种计算文本主题归属度的方法及装置 |
| CN108804532A (zh) * | 2018-05-03 | 2018-11-13 | 腾讯科技(深圳)有限公司 | 一种查询意图的挖掘和查询意图的识别方法、装置 |
| CN108920579A (zh) * | 2018-06-22 | 2018-11-30 | 龙马智芯(珠海横琴)科技有限公司 | 句子的分类方法、装置、终端设备及存储介质 |
| CN109492222A (zh) * | 2018-10-31 | 2019-03-19 | 平安科技(深圳)有限公司 | 基于概念树的意图识别方法、装置及计算机设备 |
Family Cites Families (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106528531B (zh) * | 2016-10-31 | 2019-09-03 | 北京百度网讯科技有限公司 | 基于人工智能的意图分析方法及装置 |
| CN107146610B (zh) * | 2017-04-10 | 2021-06-15 | 易视星空科技无锡有限公司 | 一种用户意图的确定方法及装置 |
| US11172063B2 (en) * | 2017-05-22 | 2021-11-09 | Genesys Telecommunications Laboratories, Inc. | System and method for extracting domain model for dynamic dialog control |
| CN107679035B (zh) * | 2017-10-11 | 2020-06-12 | 石河子大学 | 一种信息意图检测方法、装置、设备和存储介质 |
| CN107992608B (zh) * | 2017-12-15 | 2021-07-02 | 南开大学 | 一种基于关键字上下文的sparql查询语句自动生成方法 |
| CN109033075B (zh) * | 2018-06-29 | 2022-04-15 | 北京百度网讯科技有限公司 | 意图匹配的方法、装置、存储介质和终端设备 |
-
2019
- 2019-01-04 CN CN201910013964.2A patent/CN109815314B/zh active Active
- 2019-05-28 WO PCT/CN2019/088804 patent/WO2020140373A1/zh not_active Ceased
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106598999A (zh) * | 2015-10-19 | 2017-04-26 | 北京国双科技有限公司 | 一种计算文本主题归属度的方法及装置 |
| CN108804532A (zh) * | 2018-05-03 | 2018-11-13 | 腾讯科技(深圳)有限公司 | 一种查询意图的挖掘和查询意图的识别方法、装置 |
| CN108920579A (zh) * | 2018-06-22 | 2018-11-30 | 龙马智芯(珠海横琴)科技有限公司 | 句子的分类方法、装置、终端设备及存储介质 |
| CN109492222A (zh) * | 2018-10-31 | 2019-03-19 | 平安科技(深圳)有限公司 | 基于概念树的意图识别方法、装置及计算机设备 |
Non-Patent Citations (1)
| Title |
|---|
| ANONYMOUS: "Task-based dialogue language understanding", 13 June 2018 (2018-06-13), XP055716422, Retrieved from the Internet <URL:https://cloud.tencent.com/developer/article/1147476> * |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113157892A (zh) * | 2021-05-24 | 2021-07-23 | 中国平安人寿保险股份有限公司 | 用户意图处理方法、装置、计算机设备及存储介质 |
| CN115544216A (zh) * | 2021-06-29 | 2022-12-30 | 珠海采筑电子商务有限公司 | 潜在客户识别方法、电子设备及相关产品 |
| CN116136992A (zh) * | 2021-11-12 | 2023-05-19 | 中国移动通信有限公司研究院 | 一种切片业务的意图处理方法、装置及通信设备 |
| CN115455164A (zh) * | 2022-09-21 | 2022-12-09 | 中国工商银行股份有限公司 | 意愿级别的识别方法、装置、计算机设备和存储介质 |
| CN117851590A (zh) * | 2023-12-11 | 2024-04-09 | 湖南三湘银行股份有限公司 | 一种基于大数据的信息核查方法 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN109815314A (zh) | 2019-05-28 |
| CN109815314B (zh) | 2023-08-08 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2020140373A1 (zh) | 一种意图识别方法、识别设备及计算机可读存储介质 | |
| CN111814770B (zh) | 一种新闻视频的内容关键词提取方法、终端设备及介质 | |
| CN110298028B (zh) | 一种文本段落的关键句提取方法和装置 | |
| US11301637B2 (en) | Methods, devices, and systems for constructing intelligent knowledge base | |
| WO2020140372A1 (zh) | 一种基于识别模型的意图识别方法、识别设备及介质 | |
| CN110990533B (zh) | 确定查询文本所对应标准文本的方法及装置 | |
| CN110472027B (zh) | 意图识别方法、设备及计算机可读存储介质 | |
| CN104615593B (zh) | 微博热点话题自动检测方法及装置 | |
| CN113254643B (zh) | 文本分类方法、装置、电子设备和 | |
| CN107515877B (zh) | 敏感主题词集的生成方法和装置 | |
| CN112069298A (zh) | 基于语义网和意图识别的人机交互方法、设备及介质 | |
| CN108334533A (zh) | 关键词提取方法和装置、存储介质及电子装置 | |
| CN108959516B (zh) | 会话消息处理方法和装置 | |
| WO2020087774A1 (zh) | 基于概念树的意图识别方法、装置及计算机设备 | |
| WO2017091985A1 (zh) | 停用词识别方法与装置 | |
| CN103744887B (zh) | 一种用于人物搜索的方法、装置和计算机设备 | |
| CN104077327B (zh) | 核心词重要性识别方法和设备及搜索结果排序方法和设备 | |
| CN113722478A (zh) | 多维度特征融合相似事件计算方法、系统及电子设备 | |
| CN113177061B (zh) | 一种搜索方法、装置和电子设备 | |
| CN111581388A (zh) | 一种用户意图识别方法、装置及电子设备 | |
| CN114186557A (zh) | 主题词确定方法、设备及存储介质 | |
| CN111930949B (zh) | 搜索串处理方法、装置、计算机可读介质及电子设备 | |
| WO2021103859A1 (zh) | 一种信息搜索方法、装置、设备及存储介质 | |
| CN116628142A (zh) | 知识检索方法、装置、设备及可读存储介质 | |
| CN110851560B (zh) | 信息检索方法、装置及设备 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 19906764 Country of ref document: EP Kind code of ref document: A1 |