Knowledge question answering intention recognition method, device, and computer equipment

By adopting the hierarchical matching method of intent entity characteristics in the knowledge question and answer system, the problems of poor reusability and low accuracy of intent recognition rules are solved, achieving more efficient intent recognition and maintenance, and improving convenience and accuracy.

CN113157887BActive Publication Date: 2024-08-30CHINA PING AN LIFE INSURANCE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110424132.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-20
Publication Date
2024-08-30
Estimated Expiration
2041-04-20

AI Technical Summary

Technical Problem

The intent recognition rules in the existing knowledge question and answer system have poor reusability, low recognition accuracy, and high maintenance difficulty, resulting in poor intent recognition results.

Method used

Using a hierarchical matching method based on the characteristics of intent entities, through the first-level intent query and the second-level intent logical relationship judgment, the template processing of intent recognition is realized, so that the intent recognition rules can be reused and the maintenance convenience is improved.

Benefits of technology

It improves the accuracy and intelligence of intent recognition, reduces the cost of rule maintenance and update, and enhances the reusability of intent recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113157887B
    Figure CN113157887B
Patent Text Reader

Abstract

The present invention discloses a method, device, and computer equipment for identifying the intention of knowledge questions and answers, which relates to the field of language processing technology. The main purpose is to solve the problems of poor reusability and low recognition accuracy of the intention identification rules of existing knowledge questions and answers. It mainly includes: obtaining the sentence information of the knowledge question to be identified; performing a first-level intention query on the sentence information according to the intention entity characteristics, and determining at least one intention logic content in the second-level intention matched by the queried first-level intention; if the sentence information is judged to match the intention logic content according to the intention logic relationship in the second-level intention, the second-level intention is determined as the intention information of the sentence information, and the intention logic relationship is used to characterize the and / or logical relationship between the second-level intention corresponding to different intention logic contents. It is mainly used for knowledge question and answer intention recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of language processing technology, and in particular to a method, device, and computer equipment for identifying knowledge question and answer intentions. Background Art

[0002] Natural-Language Question Answering (QA) refers to the use of various technologies and data to directly answer natural language questions raised by users. KnowledgeBase Question Answering (KBQA) uses the natural language analysis and processing capabilities of machine learning to understand the questions raised by users, and uses the structured knowledge in the knowledge graph to query and reason, find accurate answers to solve the problem and feedback to users, helping users solve different types of problems. With the rapid development of intelligent text processing, KBQA has been gradually improved in the field of text question and answer. Among them, the recognition of intent in question and answer sentences has become the first step that requires language processing in the field of text question and answer.

[0003] At present, the intent recognition part in the existing KBQA adopts pure rules or rule-combined model methods for recognition. However, the directional setting of rules makes the accuracy of answering complex questions low and not intelligent. In addition, as the number of rules increases rapidly, the maintenance difficulty continues to increase. The independence of each rule makes it difficult to reuse rules containing the same regular expression, which greatly increases the difficulty of maintenance and updating, resulting in poor accuracy of intent recognition. Summary of the invention

[0004] In view of this, the present invention provides a method, apparatus, and computer device for identifying intentions in knowledge questions and answers, the main purpose of which is to solve the problems of poor reusability and low recognition accuracy of intention recognition rules in existing knowledge questions and answers.

[0005] According to one aspect of the present invention, a method for identifying knowledge question and answer intentions is provided, comprising:

[0006] Obtain sentence information of the knowledge question to be recognized;

[0007] Perform a first-level intent query on the sentence information according to the intent entity feature, and determine at least one intent logic content in the second-level intent matched by the queried first-level intent, wherein the first-level intent and the second-level intent are matched based on the hierarchical division of intent categories;

[0008] If the sentence information is judged to match the intention logical content according to the intention logical relationship in the second-level intention, the second-level intention is determined as the intention information of the sentence information, and the intention logical relationship is used to characterize the and / or logical relationship between the second-level intention corresponding to different intention logical contents.

[0009] According to another aspect of the present invention, a knowledge question and answer intention recognition device is provided, comprising:

[0010] An acquisition module is used to acquire sentence information of the knowledge question to be recognized;

[0011] A first determination module is used to perform a first-level intent query on the sentence information according to the intent entity feature, and determine at least one intent logical content in the second-level intent matched by the queried first-level intent, wherein the first-level intent and the second-level intent are matched based on the hierarchical division of intent categories;

[0012] The second determination module is used to determine the second-level intention as the intention information of the sentence information if it is judged that the sentence information matches the intention logical content according to the intention logical relationship in the second-level intention, and the intention logical relationship is used to characterize the and / or logical relationship between the second-level intention corresponding to different intention logical contents.

[0013] According to another aspect of the present invention, a computer storage medium is provided, wherein at least one executable instruction is stored in the computer storage medium, and the executable instruction enables a processor to perform operations corresponding to the above-mentioned knowledge question and answer intention recognition method.

[0014] According to another aspect of the present invention, there is provided a computer device, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus;

[0015] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform operations corresponding to the above-mentioned knowledge question and answer intention recognition method.

[0016] By means of the above technical solution, the technical solution provided by the embodiment of the present invention has at least the following advantages:

[0017] The present invention provides a method, apparatus, and computer device for identifying the intent of a knowledge question and answer. Compared with the prior art, the embodiments of the present invention obtain sentence information of the knowledge question and answer to be identified; perform a first-level intent query on the sentence information according to the intent entity feature, and determine at least one intent logical content in the second-level intent matched by the queried first-level intent, wherein the first-level intent and the second-level intent are matched based on the hierarchical division of intent categories; if the sentence information is judged to match the intent logical content according to the intent logical relationship in the second-level intent, the second-level intent is determined as the intent information of the sentence information, and the intent logical relationship is used to characterize the and / or logical relationship between the second-level intent corresponding to different intent logical contents, so as to realize the template-based judgment of intent recognition based on intent search at different levels, so that the recognition of question and answer sentences can be reused based on the modification of intent logical content and intent logical relationship, thereby greatly improving the maintenance convenience and making intent recognition more intelligent and accurate.

[0018] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0020] Figure 1 A flow chart of a knowledge question and answer intention recognition method provided by an embodiment of the present invention is shown;

[0021] Figure 2 A logical schematic diagram of parsing entity features of a sentence by a sequential analysis method provided by an embodiment of the present invention is shown;

[0022] Figure 3 A block diagram of a knowledge question and answer intention recognition device provided by an embodiment of the present invention is shown;

[0023] Figure 4 A schematic structural diagram of a computer device provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0024] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0025] The embodiment of the present invention provides a method for identifying knowledge question answering intentions. Figure 1 As shown, the method includes:

[0026] 101. Obtain sentence information of the knowledge question to be recognized.

[0027] In the embodiment of the present invention, the sentence information of the knowledge question and answer is the sentence content of the question that needs to be answered input by the user from the front-end application, which can be a Chinese sentence or an English sentence, for example, and the embodiment of the present invention does not make specific restrictions. Among them, the sentence information can include text content such as subject words, predicate words, and object words processed by natural language technology, so as to identify the intention of the sentence information based on the specific text content.

[0028] It should be noted that since the embodiment of the present invention is intended to extract sentence information, the sentence information of the knowledge question and answer to be identified is preferably entered by the user in real time, such as sentence information that needs to be answered entered through an interactive platform, or it can be sentence information stored in a knowledge question and answer library. This type of sentence information is sentence information submitted by the user waiting for an answer, and the embodiment of the present invention does not make specific limitations.

[0029] 102. Perform a first-level intent query on the sentence information according to the intent entity features, and determine at least one intent logical content in the second-level intent that matches the queried first-level intent.

[0030] Among them, the intent entity feature is used to characterize the features of the first-level intent division of the sentence information. The feature is the word content in the sentence that embodies different feature meanings. The intent entity feature is determined by comparing the preset intent entity with the sentence information, and the embodiment of the present invention does not make specific limitations. In the embodiment of the present invention, each intent in the first-level intent corresponds to an intent entity feature. Therefore, when performing a first-level intent query, a one-to-one comparison is performed with each word in the sentence information based on the intent entity feature. If the word in the sentence information matches the intent entity feature, the corresponding first-level intent is found. For example, the insurance intent entity feature a corresponding to the underwriting intent as the first-level intent is compared with each word in the sentence information one by one based on {insurance intent_entity feature a} as the comparison basis. If the comparison matches, the matching underwriting intent is determined as the first-level intent found in this sentence information.

[0031] In addition, the matching relationship between the first-level intent and the second-level intent is pre-divided into levels based on intent categories. In the embodiment of the present invention, each first-level intent corresponds to at least one second-level intent. Therefore, in order to accurately find the second-level intent to which the sentence information matches, it is possible to determine at least one intent logic content in the corresponding second-level intent contained in the found first-level intent. Among them, the intent logic content is used to characterize the specific word content that can be matched to different second-level intents based on the logical relationship. For example, after finding out that the first-level intent is the insurance intention, different disease names, different insurance names, different age information, different practicing names, etc. can all be used as intent logic content, so as to determine whether it can be matched to the corresponding second level based on the intent logic relationship, thereby determining the second-level intent.

[0032] 103. If it is determined that the sentence information matches the intention logical content according to the intention logical relationship in the second-level intention, the second-level intention is determined as the intention information of the sentence information.

[0033] In an embodiment of the present invention, in order to accurately find the second-level intent as a detailed intent, after determining the intent logical content, it is determined whether the individual words in the sentence information match the second-level intent based on the logical intent relationship combination. Among them, the intent logical relationship is used to characterize the AND / OR logical relationship between the second-level intent corresponding to different intent logical contents, that is, whether each word in the sentence information matches the intent logical content combined according to the intent logical relationship. For example, the intent logical content includes disease name 1 and disease name 2. Then, according to the AND logical relationship judgment sentence "I want to insure for disease 1 and disease 2", disease 1 and disease 2 match the intent logical content disease name 1 and disease name 2 according to the AND logical relationship combination, then the second-level intent disease insurance corresponding to the intent logical content disease name 1 and disease name 2 is used as the intent information of the sentence information.

[0034] For example, the judgment sentence information is "What is lung cancer insurance?" matches {insurance intention_insured product} and {insurance intention_insured product_non}, that is, the corresponding matching second-level intent logical content and intent logical relationship of insurance. Therefore, the insurance intention is the intention of the sentence information.

[0035] In one embodiment of the present invention, in order to implement intent classification search at each level to accurately match the intent of a knowledge question and answer, before obtaining the sentence information of the knowledge question and answer to be identified, the method also includes: obtaining sentence information with marked intent categories; hierarchically dividing the intent categories according to the classification level matched by the intent categories, the classification level including first-level classification and second-level classification; and establishing an intent logical relationship between at least two intent logical contents corresponding to the second-level intent according to the intent matching expression of the sentence information.

[0036] Before identifying the knowledge question and answer sentence information, the sentence information with the identified intent is first labeled with intent categories, which can be either manual or automatic using a machine learning model, and the embodiment of the present invention does not specifically limit this. In the embodiment of the present invention, the intent categories are divided into two categories according to the hierarchy, so that the first level classification and the second level classification are processed according to the classification level of the intent class matching. Specifically, the labeled intent categories may include the first range intent and the second range intent predetermined according to the business content, and the first range intent includes the second range intent. For example, the first range intent includes but is not limited to underwriting, claims, product information, chatting, etc. The second range intent for the first range intent of underwriting includes but is not limited to disease insurance, age insurance, occupational insurance, comprehensive insurance and other insurance, etc., so that according to the classification level corresponding to the first range intent and the second range intent, the first level classification and the second level classification are hierarchically divided according to the first range intent and the second range intent, and the first level intent and the second level intent are obtained after the division. In addition, the sentence information with the labeled intent category is matched with at least one intent matching expression, so as to establish the intent logical relationship between the intent logical contents matched by each second level intent according to the intent matching expression. Among them, in order to enable each second-level intent to establish an intent logical relationship between multiple intent logics, the logical content in the intent matching expression can be split.

[0037] In one embodiment of the present invention, for further explanation and limitation, before establishing the intention logical relationship between at least two intention logical contents corresponding to the second-level intention based on the intention matching expression of the sentence information, the method also includes: obtaining at least one intention matching expression that matches the sentence information of the marked intention category; extracting at least two intention logical contents from the intention expression according to the sentence entity features, and parsing the number of AND relationships, or the number of relationships, and the logical relationship position of the AND / OR logical relationship in the intention matching expression.

[0038] Specifically, since the purpose of the embodiment of the present invention is to split the sentence information based on the marked intent category and establish a knowledge question and answer intent recognition system with a hierarchical structure, the intent can be found more accurately in the intent recognition, and the efficiency of updating the recognized intent can be improved. Among them, the sentence information with the marked intent category is pre-set with at least one intent matching expression, and the intent matching expression is a judgment expression used to judge whether the sentence information conforms to the intent content. For example, the disease insurance intention includes intent matching expression 1: disease name, intent matching expression 2: insurance name and insurance category, intent matching expression 3: insurance name and underwriting name, so as to parse the and / or logical relationship corresponding to each intent logical content from the intent matching expression to establish an intent logical relationship. After obtaining at least one intent matching expression, at least two intent logical contents are extracted based on the sentence entity feature. The sentence entity feature is the common feature content in each intent matching expression. For example, if the intent matching expression contains insurance, underwriting, and buying insurance, the sentence entity feature is insurance, etc. The content extracted according to the sentence entity feature is the insurance intention, which is expressed as {insurance intention_entity} as the intent logical content. In addition, since the intention in a sentence is identified in combination based on multiple intention matching expressions, the combined identification is determined according to the logical relationship of and and or. Therefore, the and / or logical relationship corresponding to each intention logical content can be parsed from the intention matching expression, including the number of and relationships, the number of or relationships, and the logical relationship position of the and / or logical relationship, so as to establish an intention logical relationship between at least two intention logical contents based on the number of and relationships, the number of or relationships, and the logical relationship position of the and / or logical relationship.

[0039] It should be noted that after the hierarchical division, the intent logic content in the matching expression needs to be extracted, that is, the intent logic content can also represent the templated logic used to match the intent, so that it can be reused as a template, and the specific content in the intent logic content is used as the content in the template, that is, each extracted intent logic content can be a template corresponding to a second-level intent, that is, one template corresponds to one intent logic content, and the relationship between multiple templates is the relationship that represents the intent logic.

[0040] Table 1

[0041]

[0042]

[0043] As shown in Table 1, the intent in each second-level intent can match multiple intent logic contents, and each intent logic content corresponds to a template, so that the intent logic content can be directly updated to adaptively adjust the specific content of the intent logic content in each second-level intent, that is, the template content corresponding to each template. The specific content of the intent logic content is the specific content that needs to be judged in turn in each second-level intent to see if it meets the intent logic content. For example, the specific content of {disease name_wildcard} is ##disease name##, the specific content of {insurance intention_entity} is (insurance|underwriting|buy insurance|...), the specific content of {insurance intention_entity_non} is (why|how|...), and the specific content of {insurance type_entity} is (what insurance product|insurance type|belongs to|...). Templating decouples rule logic and specific content, significantly improves the reusability between different rules, and greatly reduces the cost of rule maintenance and updates.

[0044] Further, for the purpose of supplementing and explaining, the intention matching expression according to the sentence information to establish the intention logical relationship between at least two intention logical contents corresponding to the second-level intention includes: establishing the intention logical relationship between at least two intention logical contents corresponding to the second-level intention according to the number of AND relationships, the number of OR relationships, and the logical relationship position.

[0045] Specifically, the intention logical relationship between at least two intention logical contents corresponding to the second-level intention is established by combining the extracted intention logical content and the number of AND relations, or the number of relations, and the logical relationship position determined in the intention matching expression, that is, each second-level intention may have multiple intention logical relationships, each of which contains different intention logical contents and the number of matching AND relations, or the number of relations, and the logical relationship position.

[0046] For example, if the number of relationships is 1, or the number of relationships is 0, and the logical relationship position is 3 intention logical relationships in parallel, then based on the 3 intention logical contents, which are {insurance intention_entity}, {disease name_wildcard}, and {insurance name_wildcard}, the established intention logical relationship is {insurance intention_entity}&{disease name_wildcard}&{insurance name_wildcard}, which corresponds to the second-level intention of disease insurance.

[0047] In one embodiment of the present invention, for further limitation and explanation, the extracting at least two intention logical contents from the intention expression according to the sentence entity features includes: parsing the sentence entity features in the sentence information based on a dependency analysis algorithm, and based on the sentence entity features, filtering out at least two intention logical contents that match the sentence meaning of the second-level intention from the at least one intention matching expression in turn.

[0048] In the embodiment of the present invention, in order to accurately extract the intent logic from the intent expression based on the sentence entity features, thereby constructing the recognition of each level of intent with a template effect, and realizing the overwriting of the recognition judgment rules of different intents, specifically, the sentence entity features in the sentence information of the labeled intent category are parsed based on the dependency analysis algorithm, and any intent logic content that matches the sentence meaning of the second level intent is filtered out from each intent matching expression in turn based on the parsed sentence entity features. Among them, if Figure 2 As shown in FIG. 1 , the specific steps of parsing the entity features of a sentence using the sequential analysis method include: locating the core relational vocabulary in the sentence information as the central node; then, selecting all nodes within the unit distance or the distance between two units of the central node, where Figure 2 The attributive-predicate relationship to the adverbial-predicate relationship in the sentence is a unit distance. According to the semantic relationship and the node part of speech, verb phrases and entity words / nouns are mined. Finally, the weighted TF-IDF algorithm or the similarity BM25 algorithm is used to count the unique verb phrases and entity words / nouns in each category, which can be used as the intent logic content of the second-level intent classification.

[0049] Specifically, Figure 2 As shown in the figure, the nodes are the words and parts of speech in the sentence content of all the marked intent categories, the unit distance is the relationship between the nodes, and the words of the core relationship are circled in red. In the result of dependency analysis, a "core relationship" will be extracted for each sentence. The core relationship is a verb, which represents the core intent of the sentence. With the core relationship words as the center, different verb phrases and entity words / nouns can be mined. Among them, the verb phrase represents the action, state, etc. mentioned in the sentence, and the semantic relationship with the core relationship words is mostly "parallel relationship", "adverbial structure", etc.; the entity words / nouns represent the entities mentioned in the sentence, and the semantic relationship with the core relationship words is mostly "subject-predicate relationship", "verb-object relationship", "attributive relationship", etc., thereby completing the dependency analysis and obtaining the logical content of the intent.

[0050] In one embodiment of the present invention, in order to meet the recognition of different statement intentions, reduce the difficulty of maintenance, and thus improve the accuracy of intention recognition, the method also includes: if an update request for the intention logical relationship is detected, obtaining the intention logical content to be updated and the AND / OR logical relationship; updating the intention logical content, the number of AND relationships, the number of OR relationships, and the logical relationship position according to the intention logical content to be updated and the AND / OR logical relationship.

[0051] Specifically, the user can choose to update the intent logical content and intent logical relationships that need to be maintained and updated, so as to serve as a judgment method for identifying the intent of other statements. Therefore, when an update request for the intent logical relationship is detected, the intent logical content and the AND / OR logical relationship to be updated are obtained, and the original intent logical content, the number of AND relationships, the number of relationships, and the logical relationship position are updated based on this intent logical content and AND / OR logical relationship, thereby generating new logical relationships, intent logical content, etc. that match the second-level intent, thereby achieving efficient maintenance of intent recognition.

[0052] In one embodiment of the present invention, in order to accurately obtain intent entity features and improve the accuracy of establishing intent logical relationships in second-level intents, thereby improving the efficiency of intent recognition, after obtaining the sentence information of the knowledge question to be recognized, the method also includes: comparing at least one split word of the sentence information with a preset intent entity feature; and determining the split words that are the same as the preset intent entity feature as the intent entity feature.

[0053] Specifically, the intent entity feature for obtaining the intent sentence information is pre-set based on the business information and the historical intent entity feature, that is, the preset intent entity feature, and then the preset intent entity feature is compared with each split word in the sentence information. During the comparison process, the split word that is compared to the preset intent entity as the same is directly determined as the intent entity feature. Among them, the split words are obtained by splitting the sentence information based on the word library of the natural language processing algorithm. Specifically, the Python word library in the natural language processing algorithm NLP is selected, which stores a large number of words determined according to the parts of speech such as nouns, adjectives, and verbs. The word splitting is completed by comparing each word in the sentence information with the words in the Python word library. The embodiment of the present invention does not make specific limitations.

[0054] In one embodiment of the present invention, in order to meet the diverse needs of intent recognition, the method also includes: if it is determined that the sentence information does not match the intent logical content according to the intent logical relationship in the second-level intent, the sentence information is split according to natural language processing technology, and the entity words obtained by the splitting as the subject, predicate, and object are combined to determine the intent information of the sentence information.

[0055] Specifically, if the sentence information is judged according to the intent logical relationship and does not match the intent logical content, it means that the accurate intent cannot be identified. Therefore, in order to provide timely feedback to the user, the sentence information is split according to the natural language processing technology, and then the entity words of the split subject, predicate, and object are combined to determine the intent of the sentence information and feedback to the user. Among them, natural language processing technology includes but is not limited to dependency analysis and other methods. After the entity words as the subject, predicate, and object after the split are combined to form a group of words, they are directly fed back to the user, so that the user can judge by himself based on the feedback as a group of words. The embodiment of the present invention does not specifically limit the feedback method.

[0056] An embodiment of the present invention provides a method for identifying knowledge question and answer intentions. Compared with the prior art, the embodiment of the present invention obtains sentence information of the knowledge question and answer to be identified; performs a first-level intent query on the sentence information according to the intent entity feature, and determines at least one intent logical content in the second-level intent matched by the queried first-level intent; if the sentence information is judged to match the intent logical content according to the intent logical relationship in the second-level intent, the second-level intent is determined as the intent information of the sentence information, and the intent logical relationship is used to characterize the and / or logical relationship between different intent logical contents corresponding to the second-level intent, so as to realize templating the regular judgment of intent recognition based on intent search at different levels, so that the recognition of question and answer sentences can be reused based on the modification of the intent logical content and the intent logical relationship, thereby greatly improving the maintenance convenience and making intent recognition more intelligent and accurate.

[0057] Furthermore, as a response to the above Figure 1 The implementation of the method shown in the figure, the embodiment of the present invention provides a knowledge question and answer intention recognition device, such as Figure 3 As shown, the device comprises:

[0058] An acquisition module 21 is used to acquire sentence information of the knowledge question to be recognized;

[0059] A first determination module 22 is used to perform a first-level intent query on the sentence information according to the intent entity feature, and determine at least one intent logical content in the second-level intent matched by the queried first-level intent, wherein the first-level intent and the second-level intent are matched based on the hierarchical division of intent categories;

[0060] The second determination module 23 is used to determine the second-level intention as the intention information of the sentence information if it is judged that the sentence information matches the intention logical content according to the intention logical relationship in the second-level intention, and the intention logical relationship is used to characterize the and / or logical relationship between the second-level intention corresponding to different intention logical contents.

[0061] Furthermore, the device further comprises: a division module and an establishment module.

[0062] The acquisition module is also used to acquire sentence information with marked intent categories;

[0063] The division module is used to hierarchically divide the intent category according to the classification level matched by the intent category, and the classification level includes a first-level classification and a second-level classification;

[0064] The establishment module is used to establish an intention logical relationship between at least two intention logical contents corresponding to the second-level intention based on the intention matching expression of the sentence information, and the intention matching expression is an expression used to determine whether the statement information conforms to the intention content.

[0065] Furthermore, the device further comprises: a parsing module,

[0066] The acquisition module is further used to acquire at least one intent matching expression that matches the sentence information of the marked intent category;

[0067] The parsing module is used to extract at least two intention logical contents from the intention expression according to the sentence entity features, and parse the number of AND relationships, or the number of relationships, and the logical relationship position of the AND / OR logical relationship in the intention matching expression;

[0068] The establishment module is specifically used to establish an intention logical relationship between at least two intention logical contents corresponding to the second-level intention based on the number of AND relationships, the number of OR relationships, and the logical relationship position.

[0069] Furthermore, the parsing module is specifically used to parse the sentence entity features in the sentence information based on a dependency analysis algorithm, and based on the sentence entity features, filter out at least two intention logical contents that match the sentence meaning of the second-level intention from the at least one intention matching expression in turn.

[0070] Furthermore, the device further comprises: an updating module,

[0071] The acquisition module is further configured to acquire the intention logic content and / or logical relationship to be updated if an update request for the intention logical relationship is detected;

[0072] The update module is used to update the intention logic content, the number of AND relationships, the number of OR relationships, and the logical relationship position according to the intention logic content to be updated and the AND / OR logical relationship.

[0073] Furthermore, the device also includes:

[0074] A comparison module, used to compare at least one split word of the sentence information based on a preset intention entity feature, where the split word is obtained by splitting the sentence information based on a word library of a natural language processing algorithm;

[0075] The third determination module is used to determine the split words that are identical to the preset intention entity features as intention entity features.

[0076] Furthermore, the device also includes:

[0077] The fourth determination module is used to split the sentence information according to natural language processing technology if it is judged that the sentence information does not match the intention logic content according to the intention logical relationship in the second-level intention, and combine the entity words obtained by the splitting as the subject, predicate and object to determine the intention information of the sentence information.

[0078] An embodiment of the present invention provides a device for identifying intentions in knowledge questions and answers. Compared with the prior art, the embodiment of the present invention obtains sentence information of the knowledge question and answer to be identified; performs a first-level intention query on the sentence information according to the intention entity feature, and determines at least one intention logical content in the second-level intention matched by the queried first-level intention; if the sentence information is judged to match the intention logical content according to the intention logical relationship in the second-level intention, the second-level intention is determined as the intention information of the sentence information, and the intention logical relationship is used to characterize the and / or logical relationship between different intention logical contents corresponding to the second-level intention, so as to realize the template judgment of intention recognition based on the intention search at different levels, so that the recognition of question and answer sentences can be reused based on the modification of the intention logical content and the intention logical relationship, thereby greatly improving the maintenance convenience and making the intention recognition more intelligent and accurate.

[0079] According to one embodiment of the present invention, a computer storage medium is provided, wherein the computer storage medium stores at least one executable instruction, and the computer executable instruction can execute the knowledge question and answer intention recognition method in any of the above method embodiments.

[0080] Figure 4 A schematic diagram of the structure of a computer device provided according to an embodiment of the present invention is shown. The specific embodiment of the present invention does not limit the specific implementation of the computer device.

[0081] like Figure 4As shown, the computer device may include: a processor (processor) 302 , a communication interface (Communications Interface) 304 , a memory (memory) 306 , and a communication bus 308 .

[0082] The processor 302 , the communication interface 304 , and the memory 306 communicate with each other via the communication bus 308 .

[0083] The communication interface 304 is used to communicate with other devices such as clients or other servers.

[0084] The processor 302 is used to execute the program 310, and specifically can execute the relevant steps in the above-mentioned knowledge question and answer intention recognition method embodiment.

[0085] Specifically, the program 310 may include program codes, which include computer operation instructions.

[0086] The processor 302 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention. The one or more processors included in the computer device may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.

[0087] The memory 306 is used to store the program 310. The memory 306 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0088] The program 310 may be specifically configured to enable the processor 302 to perform the following operations:

[0089] Obtain sentence information of the knowledge question to be recognized;

[0090] Perform a first-level intent query on the sentence information according to the intent entity feature, and determine at least one intent logic content in the second-level intent matched by the queried first-level intent, wherein the first-level intent and the second-level intent are matched based on the hierarchical division of intent categories;

[0091] If the sentence information is judged to match the intention logical content according to the intention logical relationship in the second-level intention, the second-level intention is determined as the intention information of the sentence information, and the intention logical relationship is used to characterize the and / or logical relationship between the second-level intention corresponding to different intention logical contents.

[0092] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0093] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A knowledge question answering intention recognition method, characterized in that: include: Obtain sentence information of the knowledge question to be recognized; Perform a first-level intent query on the sentence information according to the intent entity feature, and determine at least one intent logic content in the second-level intent matched by the queried first-level intent, wherein the first-level intent and the second-level intent are matched based on the hierarchical division of intent categories; If it is determined that the sentence information matches the intention logic content according to the intention logic relationship in the second-level intention, the second-level intention is determined as the intention information of the sentence information, and the intention logic relationship is used to characterize the and / or logical relationship between the second-level intention corresponding to different intention logic contents; Before obtaining the sentence information of the knowledge question to be identified, the method further includes: Get sentence information with labeled intent categories; hierarchically classifying the intent category according to the classification level matched by the intent category, the classification level including a first-level classification and a second-level classification; Establishing an intention logical relationship between at least two intention logical contents corresponding to the second-level intention according to an intention matching expression of the sentence information, wherein the intention matching expression is an expression used to determine whether the sentence information conforms to the intention content; Before establishing the intention logical relationship between at least two intention logical contents corresponding to the second-level intention according to the intention matching expression of the sentence information, the method further includes: Obtain at least one intent matching expression that matches the sentence information of the marked intent category; Extract at least two intention logic contents from the intention matching expression according to the sentence entity features, and parse the number of AND relationships, or the number of relationships, and the logical relationship positions of the AND / OR logical relationships in the intention matching expression; The establishing of the intent logical relationship between at least two intent logical contents corresponding to the second-level intent according to the intent matching expression of the sentence information includes: According to the number of AND relationships, the number of OR relationships, and the logical relationship position, an intent logical relationship is established between at least two intent logical contents corresponding to the second-level intent.

2. The method according to claim 1, characterized in that The extracting at least two intention logic contents from the intention matching expression according to the sentence entity features comprises: The sentence entity features in the sentence information are parsed based on a dependency analysis algorithm, and at least two intent logical contents that match the sentence meaning of the second-level intent are filtered out from the at least one intent matching expression in turn based on the sentence entity features.

3. The method according to claim 2, characterized in that The method further comprises: If an update request for the intention logical relationship is detected, obtaining the intention logical content to be updated and / or the logical relationship; The intentional logical content, the number of AND relationships, the number of OR relationships, and the logical relationship positions are updated according to the intentional logical content to be updated and the AND / OR logical relationship.

4. The method according to claim 1, characterized in that: After acquiring the sentence information of the knowledge question to be identified, the method further includes: Comparing the preset intent entity feature with at least one split word of the sentence information, where the split word is obtained by splitting the sentence information based on a word library of a natural language processing algorithm; The split words that are identical to the preset intent entity features are determined as intent entity features.

5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: If it is determined that the sentence information does not match the logical content of the intent according to the logical relationship of the intent in the second-level intent, the sentence information is split according to natural language processing technology, and the entity words obtained by the splitting as the subject, predicate, and object are combined to determine the intent information of the sentence information.

6. A knowledge question and answer intention recognition device, characterized in that: include: An acquisition module is used to acquire sentence information of the knowledge question to be recognized; A first determination module is used to perform a first-level intent query on the sentence information according to the intent entity feature, and determine at least one intent logical content in the second-level intent matched by the queried first-level intent, wherein the first-level intent and the second-level intent are matched based on the hierarchical division of intent categories; A second determination module is used to determine the second-level intention as the intention information of the sentence information if it is judged that the sentence information matches the intention logic content according to the intention logic relationship in the second-level intention, and the intention logic relationship is used to characterize the and / or logical relationship between the second-level intention corresponding to different intention logic contents; The device also includes: a division module and an establishment module. The acquisition module is also used to acquire sentence information with marked intent categories; The division module is used to hierarchically divide the intent category according to the classification level matched by the intent category, and the classification level includes a first-level classification and a second-level classification; The establishment module is used to establish an intention logical relationship between at least two intention logical contents corresponding to the second-level intention according to the intention matching expression of the sentence information, wherein the intention matching expression is an expression used to determine whether the sentence information conforms to the intention content; The device further comprises: a parsing module, The acquisition module is further used to acquire at least one intent matching expression that matches the sentence information of the marked intent category; The parsing module is used to extract at least two intention logical contents from the intention matching expression according to the sentence entity features, and parse the number of AND relationships, or the number of relationships, and the logical relationship position of the AND / OR logical relationship in the intention matching expression; The establishment module is specifically used to establish an intention logical relationship between at least two intention logical contents corresponding to the second-level intention based on the number of AND relationships, the number of OR relationships, and the logical relationship position.

7. A computer storage medium, wherein at least one executable instruction is stored in the computer storage medium, and the executable instruction enables a processor to perform operations corresponding to the knowledge question and answer intention recognition method as described in any one of claims 1-5.

8. A computer device comprising: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform operations corresponding to the knowledge question and answer intention recognition method as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Ten-thousand-level intention classification method and device, storage medium and electronic equipment

    CN110704641A

  • Session intention recognition method and device, computer equipment and storage medium

    CN110717514A