Intention recognition method, interactive system and device

By combining a rule engine and a distributed full-text search engine with an enhanced sequential reasoning model, the problem of the intent recognition model being sensitive to data is solved, the accuracy and recall rate of intent recognition are improved, and the human-computer interaction effect is improved.

CN114625878BActive Publication Date: 2025-09-23CHINA PING AN LIFE INSURANCE CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210283675.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-22
Publication Date
2025-09-23
Estimated Expiration
2042-03-22

AI Technical Summary

Technical Problem

The existing intent recognition model has a low recall rate for intent branches with less data, and a low accuracy rate for intent branches with more data, resulting in poor human-computer interaction and poor user experience.

Method used

A rule engine is used to match user question information, a distributed full-text search engine and an enhanced sequential reasoning model are used to calculate the similarity of the corpus collection, and a fast text classifier is combined to determine the intent.

Benefits of technology

It improves the accuracy and recall rate of intent recognition, and enhances the efficiency of human-computer interaction and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114625878B_ABST
    Figure CN114625878B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of human-computer interaction technology. The present invention proposes an intent recognition method, interactive system and device. The method includes comparing the acquired user's question information with preset rules. When the question information does not match the preset rules, the question information is retrieved according to a distributed full-text search engine to obtain a corpus set that is semantically related to the question information; and the similarity of each corpus question information in the corpus set is calculated according to an enhanced sequential reasoning model, and the intent corresponding to the question information is determined according to the similarity. Compared with traditional classification algorithms, the disadvantage of the intent recognition model being sensitive to data is solved. For questions with less semantics or relatively simple semantics, the output can be directly hit by the preset rules, solving the problem of poor recall rate of intent recognition. It can not only improve the speed and efficiency of intent recognition, but also improve the accuracy, which is conducive to improving the interactive effect of the intent recognition model applied to outbound call services and improving user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of human-computer interaction technology, and in particular to an intention recognition method, interaction system and device. Background Art

[0002] In related technologies, commonly used intent recognition models are primarily single-task algorithms that output a single intent result. Generally speaking, intent recognition models are sensitive to data. For intent branches with relatively small amounts of data, the model struggles to make accurate predictions, potentially resulting in a decrease in the overall recall rate. Furthermore, for models with numerous intent branches, the accuracy may be suboptimal. Summary of the Invention

[0003] The purpose of the present invention is to solve one of the technical problems existing in the related art to at least a certain extent.

[0004] To this end, an embodiment of the present invention provides an intent recognition method, which can effectively improve the accuracy and recall rate of intent recognition, thereby improving the interaction effect and enhancing the user experience.

[0005] In order to achieve the above technical objectives, the technical solutions adopted by the embodiments of the present invention include:

[0006] In one aspect, an embodiment of the present invention provides a method for identifying intent, comprising:

[0007] Obtaining user question information and matching the question information with preset rules;

[0008] When the question information does not match the preset rules, the question information is searched using a preset distributed full-text search engine to obtain a corpus set semantically related to the question information;

[0009] Calculate the similarity between each corpus in the corpus set and the question information using a pre-trained enhanced sequential reasoning model;

[0010] The intention corresponding to the question information is determined according to the similarity.

[0011] Furthermore, in one embodiment of the present invention, before calculating the similarity between each corpus in the corpus set and the question information using the pre-trained enhanced sequential reasoning model, the method further includes:

[0012] Using the distributed full-text search engine to perform similarity prediction on each of the corpora to obtain the predicted similarity corresponding to each of the corpora;

[0013] The corpus with the predicted similarity greater than a first preset threshold is screened to obtain a filtered corpus set.

[0014] Furthermore, in one embodiment of the present invention, matching the question information with a preset rule includes:

[0015] A rule base is established using preset intent branches, each of which corresponds to multiple rules;

[0016] Extracting a speech script from the question information, and matching the speech script with the rules in the rule base;

[0017] The intention recognition method further includes:

[0018] When the speech matches any of the rules in the rule base, the intention branch corresponding to the matched rule is directly determined as the intention corresponding to the question information.

[0019] Furthermore, in one embodiment of the present invention, determining the intention corresponding to the question information according to the similarity includes:

[0020] Comparing the similarity of each of the corpora with a second preset threshold;

[0021] When the similarity is greater than or equal to the second preset threshold, determining the corpus with the highest similarity in the corpus set as the intention corresponding to the question information;

[0022] When the similarity is less than the second preset threshold, a text classification algorithm is used to determine the intention of the question information.

[0023] Furthermore, in one embodiment of the present invention, determining the intent of the question information by using a text classification algorithm includes:

[0024] Using a preset fast text classifier to compare the question information with multiple preset intent branches, and calculate the output probability of each intent branch;

[0025] The intention corresponding to the question information is derived according to the output probability.

[0026] Furthermore, in one embodiment of the present invention, deriving the intention corresponding to the question information according to the output probability includes:

[0027] When the output probability is greater than or equal to a third preset threshold, the intention branch corresponding to the output probability is determined as the intention.

[0028] Furthermore, in one embodiment of the present invention, it further comprises:

[0029] A training set is determined according to the corpus set, and similarity training is performed on the enhanced sequential reasoning model using the training set to obtain the trained enhanced sequential reasoning model.

[0030] In another aspect, an embodiment of the present invention provides an interactive system, including:

[0031] The rule engine module is used to obtain the user's question information and match the user's question information with the preset rules;

[0032] A recall module is used to retrieve the question information using a preset distributed full-text search engine when the question information does not match the preset rules, and obtain a corpus set that is semantically related to the question information;

[0033] A similarity calculation module is used to calculate the similarity between each corpus in the corpus set and the question information using a pre-trained enhanced sequential reasoning model, and determine the intent corresponding to the question information based on the similarity;

[0034] The interactive module is used to query the answer information corresponding to the question information according to the intention, and send the answer information to the user.

[0035] On the other hand, an embodiment of the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the intention recognition method of the above embodiment when executing the computer program.

[0036] On the other hand, an embodiment of the present invention provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute the intention recognition method of the above embodiment.

[0037] An embodiment of the present invention discloses an intent recognition method, which includes comparing the obtained user's question information with preset rules to determine whether the question information matches the preset rules; when the question information does not match the preset rules, using a preset distributed full-text search engine to search the question information to obtain a corpus set semantically related to the question information; and using a pre-trained enhanced sequential reasoning model to calculate the similarity between each corpus in the corpus set and the question information, and determining the intent corresponding to the question information based on the similarity. Compared with traditional classification algorithms, this method solves the disadvantage of the intent recognition model being sensitive to data. For questions with less or more single semantics, the method can directly output the results by comparing with the preset rules, effectively improving the efficiency of intent recognition and solving the problem of poor intent recognition recall rate. For questions with more semantics, the method uses a distributed full-text search engine to filter out corpus with similar semantics to the user from a large amount of corpus for recall, and then calculates the similarity between the recalled corpus and the user's question through similarity, thereby obtaining the user's intent. This method not only improves the speed and efficiency of intent recognition, but also improves the accuracy, which is conducive to improving the interactive effect of the intent recognition model and enhancing the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following introduction is made to the drawings of the embodiments of the present invention or the related technical solutions in the prior art. It should be understood that the drawings introduced below are only for the convenience of clearly describing some embodiments of the technical solutions of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without any creative work.

[0039] Figure 1 A schematic diagram of an implementation environment for the intent recognition method provided by an embodiment of the present invention;

[0040] Figure 2 A flowchart of the intent recognition method provided by an embodiment of the present invention;

[0041] Figure 3 This is a control logic flow chart of the intention recognition method according to an embodiment of the present invention;

[0042] Figure 4 This is a flowchart of rule engine matching in an embodiment of the present invention;

[0043] Figure 5 This is a flowchart of filtering ES recall results according to an embodiment of the present invention;

[0044] Figure 6 This is a flow chart of determining user intent based on similarity according to an embodiment of the present invention;

[0045] Figure 7This is a flowchart of an embodiment of the present invention for outputting results based on FastText calculation intent;

[0046] Figure 8 A flowchart of an interactive method provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0047] The present invention will be further described below with reference to the accompanying drawings and specific embodiments. The described embodiments should not be considered as limiting the present invention, and all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0048] In the following description, reference is made to “some embodiments”, which describes a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0049] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which the present invention pertains. The terms used herein are for the purpose of describing embodiments of the present invention only and are not intended to limit the present invention.

[0050] Before further explaining the embodiments of the present invention in detail, the nouns and terms involved in the embodiments of the present invention are explained. The nouns and terms involved in the embodiments of the present invention are subject to the following interpretations.

[0051] 1) A rule engine, evolved from an inference engine, is a component embedded in applications that separates business decisions from application code and uses predefined semantic modules to author business decisions. It accepts data input, interprets business rules, and makes business decisions based on these rules. Many organizations are shifting from an object-oriented business process management paradigm to a service-oriented approach; indeed, services are becoming a fundamental element of application development.

[0052] 2) Business Process Execution Language (BPEL), the de facto standard for orchestrating rule engine services and managing flawless execution of business processes. As a result of these trends, there are some good opportunities for managing business processes more flexibly and cost-effectively.

[0053] 3) A distributed full-text search engine is a device that divides the entire network into several autonomous regions based on region, subject, IP address, and other division criteria, and sets up a search server in each autonomous region. Elasticsearch (ES for short) is a Lucene-based search server used for distributed full-text search engines. It provides a distributed multi-user full-text search engine based on the RESTful web interface. Elasticsearch is used in cloud computing and can achieve real-time search. It is stable, reliable, fast, and easy to install and use. It is a distributed, highly scalable, and highly real-time search and data analysis engine that can easily enable the search, analysis, and exploration of large amounts of data. Taking full advantage of the horizontal scalability of Elasticsearch can make data more valuable in the production environment.

[0054] 4) Representational State Transfer (REST) ​​refers to a set of architectural constraints and principles. If an architecture conforms to the constraints and principles of REST, it is called a RESTful architecture.

[0055] 5) The Enhanced Sequential Inference Model (ESIM) is a model that integrates BiLSTM and the attention mechanism. It is very effective in text matching. Text matching is an important fundamental problem in natural language processing and can be applied to a large number of natural language processing (NLP) tasks, such as information retrieval, question-answering systems, paraphrasing, dialogue systems, and machine translation. These NLP tasks can be largely abstracted into text matching problems.

[0056] 6) Long Short-Term Memory (LSTM) is a type of recurrent neural network (RNN) specifically designed to address the long-term dependency issues common in RNNs. All RNNs have a chain-like structure of repeating neural network modules. In a standard RNN, this repeating module has a very simple structure. Due to its design characteristics, LSTM is well-suited for modeling time series data, such as text data.

[0057] 7) Bi-directional Long Short-Term Memory (BiLSTM) is a combination of forward LSTM and backward LSTM, both of which are often used to model contextual information in natural language processing tasks.

[0058] 8) FastText is a word embedding and text classification tool, typically used for supervised text classification. It provides a simple and efficient method for text classification and representation learning, with performance comparable to deep learning and faster speed. FastText combines the most successful concepts in natural language processing and machine learning. These include using bag-of-words and bag-of-n-grams to represent sentences, using subword information, and sharing information between categories through hidden representations.

[0059] Intent recognition technology is currently used in search engines, dialogue systems, smart IoT, robots and other fields. For example, in dialogue systems, intent recognition is used to understand what business or chat the user wants, and corresponding models are used to process it. The more accurate the intent recognition, the more accurate the response the user receives, and the better the user experience.

[0060] In related technologies, the intent recognition models commonly used in the industry are mainly single-task algorithms. The intent recognition model will output an intent result based on the user's question. For example, during human-computer interaction, it can find accurate information and answer the user's question through intent recognition. Generally speaking, the intent recognition model is sensitive to data. When there are fewer intent branches, it is impossible to find the intent branch corresponding to the user's question intent. The model has difficulty making correct predictions, which may lead to a decrease in the overall recall rate of the model. For models with more intent branches, the accuracy may not be ideal. For current outbound call services, there are more than 30 intent branches. For example, for application scenarios such as inquiring about expenses and consulting insurance policies, higher accuracy is required.

[0061] If traditional intent recognition models are used for identification and labeled data is used to classify predefined user intents, new user intents need to be re-collected and labeled data re-trained, which is time-consuming and labor-intensive. There will be certain bottlenecks in accuracy and recall rates. In addition, faced with the recall of large amounts of data, recognition efficiency is low, and the intent output results often fail to meet business requirements, resulting in poor human-computer interaction and reduced user experience.

[0062] In order to solve the problems in related technologies of low accuracy and recall rate, low recognition efficiency and failure of intent output results to meet business requirements of traditional intent recognition models, the embodiments of the present invention provide an intent recognition method, an interaction method, a system and a device. Compared with the traditional single-task algorithm, the method solves the disadvantage of the intent recognition model being sensitive to data. When there are fewer intent branches, the output can be performed by directly hitting the preset rules, thereby solving the problem of poor recall rate of intent branches. For the case of more intent branches, a distributed full-text search engine is used to screen out corpus close to the user's speech from a large amount of corpus for recall, and then the similarity between the recalled corpus and the user's speech is calculated by similarity, thereby obtaining the user's intent. This not only improves the speed and efficiency of intent recognition, but also improves the accuracy, which is beneficial to improving the interactive effect of the intent recognition model applied to outbound call services and enhancing user experience.

[0063] Figure 1 This is a schematic diagram of an implementation environment of an intention recognition method provided by an embodiment of the present invention. Figure 1 The hardware and software components of the implementation environment mainly include an operation terminal 101 and a server 102, and the operation terminal 101 is in communication with the server 102. The intention recognition method can be configured to be executed solely on the operation terminal 101 or on the server 102, or can be executed based on the interaction between the operation terminal 101 and the server 102. The specific selection can be made according to the actual application situation, and this embodiment does not impose any specific limitation on this.

[0064] Specifically, the operation terminal 101 in the embodiment of the present invention may include, but is not limited to, any one or more of a smart watch, a smart phone, a computer, a personal digital assistant (PDA), an intelligent voice interaction device, a smart home appliance, or a vehicle-mounted terminal. The server 102 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It may also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. The operation terminal 101 and the server 102 may establish a communication connection via a wireless network or a wired network, which uses standard communication technologies and / or protocols. The network may be set to the Internet or any other network, such as, but not limited to, a local area network (LAN), a metropolitan area network (MAN), a wide area network (WAN), a mobile, wired or wireless network, a private network, or a virtual private network.

[0065] Figure 2 is a flowchart of an intention recognition method provided by an embodiment of the present invention. The execution subject of the method can be at least one of the operating terminal 101 or the server 102. Figure 2 The intention recognition method is configured to be executed on an operating terminal as an example for explanation.

[0066] Reference Figure 2 , the intention recognition method of the embodiment includes but is not limited to steps S100 to S400.

[0067] Step S100: Match the acquired question information with preset rules.

[0068] It is understandable that when identifying the user's intention in the embodiment, the user's question information is first obtained, and then the obtained question information is compared with the preset rules to determine whether the question information matches the preset rules. Among them, the user's question information can be understood as the user's speech information, which contains the purpose of the user's speech, that is, what the user wants to express and what he wants to do. Taking a smartphone as an example, the user can enter a question on the smartphone through voice or text, such as voice input "How much is the premium", convert the question into text information, and then match the text information with the preset rules to determine whether the intention is hit based on the rule matching method.

[0069] In some embodiments, the matching process between question information and preset rules can be implemented through a rule engine. Specifically, rules corresponding to intent branches can be formulated through the rule engine, so that the rule engine has a corresponding rule library to match the acquired question information with the preset rules. It can be understood that when the question information matches the rules in the rule engine, it means that the intent branch corresponding to the question information is matched, thereby obtaining the user's question intention. For example, if the question "How much is the premium" is entered, the intent branch that can be matched is "The fees that the insured should pay when participating in insurance". After determining the user's intention, the corresponding answer is queried and responded, effectively improving the efficiency of human-computer interaction.

[0070] It is understandable that the method of the embodiment first performs rule matching through a rule engine, which can directly match some question information with fewer or relatively simple words to the corresponding intent branch, thereby quickly outputting the intent recognition result, solving the problem of poor recall rate of traditional classification algorithms for intent branches with fewer words, and overall, significantly improving the speed and efficiency of intent recognition. Since the user's intent can be directly obtained after a successful rule match, the process of the intent recognition method ends at this point, that is, there is no need to continue to execute subsequent steps S200 to S400.

[0071] It should be noted that the method of the embodiment is specifically applied to human-computer interaction systems, considering that most business processes contain multiple decision points, at which a condition will be evaluated. Business processes change their behavior based on these standards or business rules. In fact, these business rules play a driving role in business processes. These rules are usually embedded in the business process itself or inside the custom Java code. A rule engine is used to separate the business process from the business rules, where the rules are exposed as services, and the BPEL process utilizes these services by querying the engine when reaching the decision point. This method is more flexible and can operate rules graphically instead of coding them in a programming language or inside the process. Business users can use tools to write rules themselves, and can make changes to the rules after deployment without the assistance of IT personnel. Since most updates and feature enhancements are performed by business users, maintenance costs can be significantly reduced.

[0072] Step S200: When the question information does not match the preset rules, the question information is searched using a distributed full-text search engine to obtain a corpus set semantically related to the question information.

[0073] It can be understood that when the question information does not match the preset rules, it means that the rule library does not have an intent branch that matches the question information. At this time, the matching process of the rule engine is terminated, and then the question information is retrieved based on the preset distributed full-text search engine. In other words, for intent branches with less data, the rule engine can quickly identify the intent; for intent branches with more data, the distributed full-text search engine is used to continue identification when the rule engine cannot match, so that the words that are close to the user's words can be recalled, and the rule engine and the distributed full-text search engine are combined to perform intent identification.

[0074] Specifically, the embodiment retrieves the problem information based on the shard search of Elasticsearch, which can also be understood as Elasticsearch recall (ES recall for short). The implementation principle of Elasticsearch is mainly divided into the following steps. First, the user submits the data to the Elasticsearch database, and then uses the word segmentation controller to segment the corresponding statement, and stores its weight and word segmentation results in the data. When the user searches for data, the results are ranked according to the weight, and then the returned results are presented to the user. Elasticsearch is distributed, which means that the index can be divided into shards, each shard can have 0 or more replicas, each node hosts one or more shards, and acts as a coordinator to delegate operations to the correct shard; rebalancing and routing are done automatically. Related data is usually stored in the same index, which consists of one or more primary shards and zero or more replica shards.

[0075] It should be noted that Elasticsearch has an independent database, and through Elasticsearch, it is possible to execute and merge multiple types of searches, such as searching structured data and unstructured data, which makes the search method more flexible. Specifically, by inputting the keywords of the speech into Elasticsearch, a corpus set that is semantically related to the question information can be recalled. In an embodiment, the shard search based on Elasticsearch can quickly find the 100 speech words that are most similar to the user's speech words from a large amount of corpus. The 100 speech words can be understood as a recalled corpus set, which can quickly narrow the scope of the search. This is a preliminary screening work, which is conducive to reducing the amount of data.

[0076] Step S300 : Calculate the similarity between each corpus in the corpus set and the question information according to the enhanced sequential reasoning model.

[0077] It is understandable that the role of Elasticsearch's sharded search is to quickly filter out the corpus most similar to the user's speech from the massive corpus for recall, which can effectively reduce the amount of calculation, and then use the enhanced sequential reasoning model to calculate the similarity of the recalled data.

[0078] It should be noted that the enhanced sequential reasoning model used in this embodiment is ESIM, a pre-trained deep semantic similarity model. By calculating the similarity between the ES recall corpus and the user's question, it can be understood that the higher the similarity, the closer the recall corpus matches the user's words and the closer it is to the user's intent. In other words, ESIM can accurately calculate the similarity between all the corpus in the corpus set and the user's words.

[0079] In step S400, the intention corresponding to the question information is determined based on the similarity, which can be understood as comparing the similarities calculated by ESIM and outputting the words with the highest similarity as the user intention, thereby completing intention recognition.

[0080] Reference Figure 3 As shown, Figure 3 This is a control logic flow chart for an intent recognition method in an embodiment. First, the rules engine matches the user's question to determine whether a direct match is found. If a match is found, the matching intent is directly output, ending intent recognition. If no match is found, ES is used to retrieve a corpus that closely matches the user's speech. The ESIM model then calculates similarity, and the intent output is determined based on this similarity.

[0081] Compared with traditional classification algorithms, this solves the shortcoming of intent recognition models being sensitive to data. When there are fewer intent branches, it can output by directly hitting preset rules, solving the problem of poor recall rate of intent branches. For situations with more intent branches, ES is used to screen out corpus close to the user's words from a large amount of corpus for recall, and then the ESIM model is used to calculate the similarity between the recalled corpus and the user's words to obtain the user's intention. This not only improves the speed and efficiency of intent recognition, but also improves the accuracy, which is conducive to improving the interactive effect of the intent recognition model when applied to outbound call services and enhancing user experience.

[0082] To illustrate with a specific example, for example, when the question "non-payment of insurance premiums" is input and there is no match in the rule engine, ES can recall a corpus set that is close to the wording. ES can use "insurance" and "expenses" as keywords for retrieval, and can obtain words such as "insurance payment process", "policy fee inquiry", "whether the premium has changed", and "premium payment method". Then, the ESIM model is used to calculate the similarity, and finally "non-renewal of insurance policy" is selected as the wording with the highest similarity, and output as the user intent result, ending the intent recognition process.

[0083] It should be noted that the algorithm of the intent recognition method provided by the embodiment of the present invention can be divided into the following modules: a rule engine module, a recall module and a similarity calculation module. Each module has a corresponding function. Among them, the rule engine module is used to match the acquired question information with the preset rules; the recall module is used to retrieve the question information according to ES to obtain a corpus set that is semantically related to the question information; the similarity calculation module is used to calculate the similarity between the question information and the corpus set according to the ESIM model, and determine the intent corresponding to the question information based on the similarity.

[0084] It can be understood that the intent recognition method of the embodiment of the present invention is implemented based on the combination of rule engine, ES recall and ESIM model. The overall algorithm has high accuracy, recall rate and efficiency for intent recognition, and is suitable for outbound call services that require high accuracy and recall rate for intent recognition.

[0085] In some embodiments, the above step S100 is further described, which specifically includes but is not limited to steps S110 to S130. Figure 4 As shown, Figure 4 1 is a flowchart of rule engine matching in an embodiment.

[0086] Step S110: Establish a rule base using the preset intent branches, where each intent branch corresponds to multiple rules;

[0087] Step S120, matching the question information's wording with the rules in the rule library;

[0088] Step S130: When the wording of the question information matches any rule in the rule library, the intention branch corresponding to the matched rule is directly determined as the intention corresponding to the question information.

[0089] In step S110, the embodiment establishes a rule base through a rule engine, defines corresponding rules for intent branches, and each intent branch corresponds to multiple rules. The preset rules can be understood as speech templates corresponding to each intent, and the preset rules include multiple rules.

[0090] In step S120, the question information's speech is matched against the rules in the rule library. This can be understood as comparing the user's speech with a preset speech template to determine whether the two match. The speech technique can be understood as the user's use of various writing styles and speech speeds to appropriately express their intended meaning, such as cadence, parallelism, and emulation. The user's speech technique can be extracted from the question information.

[0091] It should be noted that each intent branch corresponds to multiple speech templates, which can increase the chance of a match, thereby increasing the recall rate and making rule matching more flexible. Each speech template can include keywords and entity types. The entity type can be insurance information such as "life insurance" and "auto insurance". The speech template is formed by combining the entity type with the keyword. For example, the speech template can be "auto insurance? Claims", where "?" represents any character. The speech template can correspond to the intent branch for querying auto insurance claims information. When the user's speech matches the speech template, it can match the user's intention to query auto insurance claims information. Of course, the intent branch can correspond to multiple speech templates, for example, it can specifically match the intent of "auto insurance claims process", "auto insurance claims amount", etc. It can be understood that the preset rules can be set according to the requirements of the actual application scenario, and no further specific restrictions are made.

[0092] It is understood that in step S130, when the user's speech matches the preset speech template, the corresponding intent is hit, so that the recognition result can be quickly output, and the intent recognition is completed. Of course, if the user's speech does not match the preset speech template, ES recall is performed to obtain corpus with higher similarity. For details, please refer to the recognition process of steps S200 to S400 above, which will not be repeated here.

[0093] Reference Figure 5 As shown, Figure 5 4 is a flowchart of filtering ES recall results in an embodiment. In some embodiments, the process of intent recognition may also include a step of filtering ES recall results, so the method of the present invention may also include but is not limited to steps S210 to S220.

[0094] Step S210: using a distributed full-text search engine to perform similarity prediction on the corpora in the corpus set, and obtaining the predicted similarity corresponding to each corpus in the corpus set;

[0095] Step S220: Filter the corpus with a predicted similarity greater than a first preset threshold to obtain a filtered corpus set.

[0096] It should be noted that ES has its own similarity score sorting function. A threshold can be set for the recalled corpus. By comparing the similarity score with the threshold, the phrases above the threshold are screened, and then the similarity is calculated. This can reduce the computational complexity of the model and improve the efficiency of the model.

[0097] Specifically, the corpus obtained based on ES recall is pre-scored based on its relevance to the user's speech, resulting in a predicted similarity score. For example, in this embodiment, ES recall is used to find the 100 speech phrases that are most similar in meaning to the user's speech phrases. These 100 speech phrases are scored so that each speech phrase has a predicted similarity score, and the recalled speech phrases are then sorted based on the score. Then, based on the sorting, a filter is performed to filter out corpora with predicted similarity scores greater than a first preset threshold, thereby obtaining a filtered corpus set. Corpora with predicted similarity scores less than the first preset threshold are filtered out. In other words, ES recall narrows the scope of the speech search, and then the recall results are filtered, which can further reduce the amount of data recalled by ES.

[0098] For example, a predicted similarity score of 100 indicates that the recalled speech is the closest. The first preset threshold value can be 80. Only speech with a predicted similarity score greater than 80 will be processed by the ESIM module for similarity calculation. Speech with a score below 80 will be discarded, thereby obtaining a corpus with a higher similarity. It should be noted that the first preset threshold value can be set according to the requirements of the actual application scenario and is not further limited here.

[0099] It should be noted that in step S300, the ESIM model calculates similarity between the question and the filtered corpus, thereby reducing the computational complexity of the ESIM model and further improving the efficiency of intent recognition. Furthermore, the ESIM model simultaneously applies BiLSTM and the attention mechanism. It can be understood that the ESIM model uses BiLSTM as a foundational module of the inference model, first encoding the input word. Here, BiLSTM learns to represent the word and its contextual information. Because BiLSTM can effectively represent local inference information and its influence in context, it is also used for inference synthesis to construct the final prediction result.

[0100] In some embodiments, a corpus set recalled from ES is used as a training set, and the ESIM model is trained for similarity using the training set. It can be understood that the training set is formed based on the corpus set recalled by ES, and it will not change due to the intent recognition results. It can improve the training efficiency of the model, so that a trained ESIM model can be obtained, which not only improves the efficiency of the model, but also improves the accuracy of the model.

[0101] It is understandable that the ESIM model of the embodiment is used to identify the intent of the user's questions, so the similarity training of the ESIM model is obtained by training in the question-asking scenario, so that the ESIM model has better interaction prediction performance when applied to the interactive system.

[0102] In some embodiments, the above step S400 is further described, which specifically includes but is not limited to steps S410 to S430. Figure 6 As shown, Figure 6 4 is a flowchart of determining user intention based on similarity according to an embodiment.

[0103] Step S410, obtaining the similarity of each corpus in the corpus set by using the enhanced sequential reasoning model;

[0104] Step S420, comparing the similarity with a second preset threshold;

[0105] Step S430: When the similarity is greater than or equal to a second preset threshold, the corpus with the highest similarity in the corpus set is determined as the intention corresponding to the question information.

[0106] It's understandable that when calculating similarity using the ESIM model, each piece of material in the corpus can be scored, giving each piece a corresponding similarity score. This similarity score can be used to determine how closely the recalled speech resembles the user's speech. The higher the similarity score, the closer it is to the user's speech. While the corpus recalled by ES has been screened and filtered, resulting in a relatively high similarity, it's important to consider that the ES-recalled speech may not accurately match the user's intent.

[0107] In order to ensure that the accuracy reaches a high level, in step S420 and step S430 of the embodiment, combined with Figure 3 It can be understood that the corpus set is further screened and the similarity score of the corpus set is compared with the second preset threshold, where the second preset threshold can be understood as the lowest similarity score corresponding to the accuracy rate, that is, when the similarity score is lower than the second preset threshold, the similarity is low and the accuracy rate of intent recognition is also low; on the contrary, when the similarity score is higher than the second preset threshold, the accuracy rate of intent recognition is high, meeting the accuracy rate requirement, and then the user's intention can be derived from the corpus with a similarity score greater than the second preset threshold. The actual value of the second preset threshold can be set according to the actual usage scenario.

[0108] Specifically, all the corpora in the corpus set can be sorted according to the similarity score. The comparison results may show two situations: at least one corpus in the corpus set has a similarity score higher than the second preset threshold, or the similarity scores of all corpora are lower than the second preset threshold. In the aforementioned case, it means that the corpus set contains corpora that are closest to the user's speech. At this time, according to the sorting of similarity scores, the corpus with the highest similarity score in the corpus set is used as the intent corresponding to the question information. In other words, calculating similarity through the ESIM model can determine the user's intent.

[0109] In the latter case, it means that the user's intention cannot be further determined through the corpus collection. Some embodiments of the present invention can further determine the intention of the user's question through a text classification algorithm. Specifically, FastText is used in the embodiments to perform further intent recognition.

[0110] Reference Figure 7 As shown, Figure 7 This is a flow chart of an embodiment of outputting a result based on FastText calculation intent. Therefore, the method of the present invention may also include but is not limited to steps S510 to S520.

[0111] Step S510: When the similarity is less than a second preset threshold, the question information is compared with a plurality of preset intention branches, and the output probability of each intention branch is calculated;

[0112] Step S520: When the output probability is greater than or equal to the third preset threshold, the intention branch corresponding to the output probability is determined as the intention.

[0113] It is understood that FastText is a fast text classification algorithm with two major advantages over conventional classification algorithms: FastText can speed up training and testing while maintaining high accuracy, and does not require pre-trained word vectors; FastText will train its own word vectors. In cases where the ESIM model cannot determine the user's intent after calculating similarity, the embodiment uses the FastText algorithm as a backup. FastText calculates the output probability of each intent branch and then determines the user's intent based on the output probability. It can also be understood that a user's conversation may contain multiple intents, which are sorted by probability. When the probability reaches a certain value, the corresponding intent branch is considered to be closest to the user's intent and can be output as the result.

[0114] For example, FastText can learn the types of insurance policies and categorize them into relevant documents. Then, when a user asks the question "What is my insurance policy?", FastText can search the document and understand that the user wants to ask a question related to the policy.

[0115] Specifically, in step S520, the third preset threshold can be understood as the minimum output probability that meets the similarity requirement, and combined with Figure 3 It can be understood that when the output probability is greater than or equal to the third preset threshold, the intent branch corresponding to the output probability is determined to be the intent. If there are multiple intent branches with output probabilities higher than the third preset threshold, the one with the highest output probability can be selected as the output result. It can be understood that when the output probability is lower than the third preset threshold, it can be considered that there is no obvious intent, and intent recognition ends.

[0116] The proposed intent recognition algorithm based on the combination of rule engine, ES recall and ESIM model solves the disadvantage of the model being sensitive to data compared to traditional classification algorithms. It can also accurately identify intent branches with less data. ES can quickly filter out the corpus most similar to the user's words from massive corpus for recall, and then use the ESIM model for similarity training. This can not only improve the speed and efficiency of the model, but also improve the accuracy of the model. FastText can ensure better overall coverage of the algorithm.

[0117] Compared with traditional classification algorithms, the intent recognition method of the embodiment of the present invention solves the shortcoming of the intent recognition model being sensitive to data. When there are fewer intent branches, the output can be directly hit by the preset rules, thereby solving the problem of poor recall rate of intent branches. For the case of more intent branches, ES recall is used to screen out corpus close to the user's speech from a large amount of corpus for recall, and then the similarity is calculated through the ESIM model to obtain the user's intention. This not only improves the speed and efficiency of intent recognition, but also improves the accuracy. In addition, FastText is used for bottom-up processing to ensure better overall coverage of the algorithm, which is conducive to improving the interactive effect of the intent recognition model applied to outbound call services and enhancing user experience.

[0118] The embodiment of the present invention also provides an interactive method. Similarly, the interactive method can be used in Figure 1 Furthermore, the interactive method can be configured to be executed solely on the operation terminal 101 or on the server 102, or can be executed based on the interaction between the operation terminal 101 and the server 102. The specific selection can be made according to the actual application situation, and this embodiment does not specifically limit this.

[0119] Reference Figure 8 FIG. 6 is a flowchart of an interactive method provided by an embodiment of the present invention. In this embodiment, an operation terminal and a server are used as execution entities for explanation. The interactive method includes but is not limited to steps 610 to 650.

[0120] Step S610, obtaining user's question information;

[0121] Step S620: When the question information matches the preset rules, the user's intention is directly output, and step S650 is executed;

[0122] Step S630: When the question information does not match the preset rules, the question information is searched using Elasticsearch to obtain a corpus set that is semantically relevant to the question information.

[0123] Step S640: Calculate the similarity between each corpus in the corpus set and the question information using the ESIM model, and determine the intent corresponding to the question information based on the similarity;

[0124] Step S650: query the answer information corresponding to the question information according to the intention, and send the answer information to the user.

[0125] In an embodiment of the present invention, taking the interaction between an operating terminal and a server as an example to implement the interaction method of the present invention, the operating terminal has at least the function of collecting the user's voice data, sending the voice data to the server, receiving the text data of the target output sentence sent back by the server, and converting the text data of the target output sentence into audio data for output; the server has at least the function of receiving the voice data sent by the operating terminal, recognizing the text content of the voice data to obtain input information, inputting the input information into a trained intent recognition model to obtain the target output sentence, and sending the text data of the target output sentence to the operating terminal. In this way, the operating terminal can send the collected voice data to the server, and the intent recognition model in the server can interactively predict the text content of the voice data, output the target output sentence, and play it to the user through the operating terminal, thereby achieving human-computer interaction.

[0126] An embodiment of the present invention further provides an interactive system, comprising:

[0127] The rule engine module is used to obtain the user's question information and match the user's question information with the preset rules;

[0128] The recall module is used to retrieve the question information using a preset distributed full-text search engine when the question information does not match the preset rules, and obtain a corpus collection that is semantically related to the question information;

[0129] The similarity calculation module is used to calculate the similarity between each corpus in the corpus set and the question information using the pre-trained enhanced sequential reasoning model, and determine the intent corresponding to the question information based on the similarity;

[0130] The interactive module is used to query the answer information corresponding to the question information according to the intention and send the answer information to the user.

[0131] It can be understood that the contents of the intention recognition method of the above-mentioned embodiment are applicable to the interactive system of this embodiment. The functions specifically implemented by the interactive system of this embodiment are the same as those of the intention recognition method of the above-mentioned embodiment, and the beneficial effects achieved are also the same as those achieved by the above-mentioned intention recognition method embodiment.

[0132] The embodiment of the present invention further discloses a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, Figures 2 to 7 The intention recognition method of the embodiment shown or Figure 8 The interaction method of the illustrated embodiment.

[0133] The embodiment of the present invention further discloses a computer-readable storage medium, wherein a program executable by a processor is stored. The program executable by the processor is used to implement the following when executed by the processor: Figures 2 to 7 The intention recognition method of the embodiment shown or Figure 8 The interaction method of the illustrated embodiment.

[0134] It is understandable that if Figures 2 to 7 The intention recognition method of the embodiment shown or Figure 8 The contents of the interactive method in the embodiment shown are applicable to the embodiment of this computer-readable storage medium. The functions specifically implemented by the embodiment of this computer-readable storage medium are similar to those in the embodiment shown. Figures 2 to 7 The intention recognition method of the embodiment shown or Figure 8 The interaction method of the embodiment shown is the same, and the beneficial effects achieved are the same as those of the embodiment shown. Figures 2 to 7 The intention recognition method of the embodiment shown or Figure 8 The beneficial effects achieved by the interaction method of the illustrated embodiment are also the same.

[0135] In some optional embodiments, the function / operation mentioned in the block diagram may not occur in the order mentioned in the operation diagram. For example, depending on the function / operation involved, the two boxes shown in succession can actually be executed substantially simultaneously or the boxes can sometimes be executed in reverse order. In addition, the embodiment presented and described in the flow chart of the present invention is provided in an exemplary manner for the purpose of providing a more comprehensive understanding of the technology. The disclosed method is not limited to the operation and logic flow presented herein. Optional embodiments are contemplated in which the order of the various operations is changed and the sub-operations described as a part of a larger operation are performed independently.

[0136] In addition, although the present invention is described in the context of functional modules, it should be understood that, unless otherwise stated, one or more of the functions and / or features may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in separate physical devices or software modules. It is also understood that a detailed discussion of the actual implementation of each module is not necessary for understanding the present invention. More specifically, given the properties, functions, and internal relationships of the various functional modules in the devices disclosed herein, the actual implementation of the module will be understood within the ordinary skill of an engineer. Therefore, a person skilled in the art will be able to implement the present invention set forth in the claims using ordinary skill without undue experimentation. It is also understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present invention, which is determined by the full scope of the appended claims and their equivalents.

[0137] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program code.

[0138] The logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing the logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (e.g., a computer-based system, a system including a processor, or other system that can fetch and execute instructions from an instruction execution system, apparatus, or device). For purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by, or in conjunction with, an instruction execution system, apparatus, or device.

[0139] More specific examples (a non-exhaustive list) of computer-readable media include the following: an electrical connection with one or more wires (electronic devices), a portable computer disk cartridge (magnetic devices), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disc read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering, or processing in another suitable manner as necessary, and then stored in a computer memory.

[0140] It should be understood that various parts of the present invention can be implemented using hardware, software, firmware, or a combination thereof. In the above-described embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application-specific integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0141] In the above description of this specification, reference to the terms "one embodiment / example," "another embodiment / example," or "certain embodiments / examples" means that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.

[0142] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to the embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the claims and their equivalents.

[0143] The above is a specific description of the preferred embodiment of the present invention, but the present invention is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present invention.

[0144] Throughout this specification, references to terms such as "one embodiment," "another embodiment," or "certain embodiments" indicate that a particular feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of these terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.

[0145] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to the embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the claims and their equivalents.

Claims

1. A method for identifying intention, characterized in that: include: Get user's problem information; A rule base is established using preset intent branches, each of which corresponds to multiple rules; Extracting a speech script from the question information, and matching the speech script with the rules in the rule base; When the speech matches the rule in the rule base, the intention branch corresponding to the matched rule is directly determined as the intention corresponding to the question information; When the speech does not match the rule in the rule base, the question information is searched using Elasticsearch to obtain a corpus set that is semantically relevant to the question information; Using the Elasticsearch, similarity prediction is performed between each corpus in the corpus set and the question information to obtain a predicted similarity corresponding to each corpus; The corpus with the predicted similarity greater than a first preset threshold is screened to obtain the filtered corpus set, and the Elasticsearch can quickly screen out the corpus most similar to the user's speech from the corpus for recall, thereby narrowing the scope of the speech search through the Elasticsearch recall; Calculate the similarity between each corpus in the filtered corpus set and the question information using a pre-trained enhanced sequential reasoning model; Comparing the similarity of each of the corpora with a second preset threshold; When the similarity is greater than or equal to the second preset threshold, determining the corpus with the highest similarity in the corpus set as the intention corresponding to the question information; When the similarity is less than the second preset threshold, using a preset text classifier to compare the question information with multiple preset intent branches, and calculating the output probability of each intent branch; The intention corresponding to the question information is derived according to the output probability.

2. The intention recognition method according to claim 1, characterized in that The deriving the intention corresponding to the question information according to the output probability includes: When the output probability is greater than or equal to a third preset threshold, the intention branch corresponding to the output probability is determined as the intention.

3. The intention recognition method according to claim 1, characterized in that Also includes: A training set is determined according to the corpus set, and similarity training is performed on the enhanced sequential reasoning model using the training set to obtain the trained enhanced sequential reasoning model.

4. An interactive system, characterized in that: include: Rule engine module, used to obtain user question information; A rule base is established using preset intent branches, each of which corresponds to multiple rules; Extracting a speech script from the question information, and matching the speech script with the rules in the rule base; A recall module is configured to, when the speech matches the rule in the rule base, directly determine the intent branch corresponding to the matched rule as the intent corresponding to the question information; When the speech does not match the rules in the rule base, Elasticsearch is used to search the question information to obtain a corpus set that is semantically related to the question information; Elasticsearch is used to predict the similarity between each corpus in the corpus set and the question information to obtain the predicted similarity corresponding to each corpus; the corpus with the predicted similarity greater than a first preset threshold is filtered to obtain the filtered corpus set, and Elasticsearch can quickly filter out the corpus that is most similar to the user speech from the corpus for recall, and the scope of the speech search is narrowed through the Elasticsearch recall; a similarity calculation module, configured to calculate the similarity between each corpus in the filtered corpus set and the question information using a pre-trained enhanced sequential reasoning model, and compare the similarity of each corpus with a second preset threshold; When the similarity is greater than or equal to the second preset threshold, determining the corpus with the highest similarity in the corpus set as the intention corresponding to the question information; When the similarity is less than the second preset threshold, using a preset text classifier to compare the question information with multiple preset intent branches, and calculating the output probability of each intent branch; Determining the intention corresponding to the question information according to the output probability; The interactive module is used to query the answer information corresponding to the question information according to the intention, and send the answer information to the user.

5. A computer device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for identifying intentions as claimed in any one of claims 1 to 3 is implemented.

6. A computer-readable storage medium storing computer-executable instructions, characterized in that: The computer-executable instructions are used to execute the intention recognition method according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Intention recognition method and device, storage medium, and electronic equipment

    CN113722457A

  • Voice matching method for intelligent dialogue system, electronic device and computer device

    WO2021000403A1

  • Response information obtaining method and apparatus, computer device, and storage medium

    WO2021051521A1