A method for identifying focus words in natural language questions for an intelligent question-answering system
By employing a prefix tree structure and inverted index-based focus word recognition algorithm in natural language questions, the problem of difficult focus word recognition in existing technologies is solved, achieving more efficient user intent understanding and improved answer accuracy.
Patent Information
- Application Number
- CN202510958085.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-11
- Publication Date
- 2026-03-17
- Estimated Expiration
- 2045-07-11
AI Technical Summary
Existing natural language question answering systems struggle to identify key words and accurately understand user intent, resulting in low answer recall and accuracy.
An efficient focus word recognition algorithm is designed by employing a prefix tree structure and an algorithm for mining association rules, combined with an inverted index. By defining focus itemsets, frequent focus itemsets, focus association rules, and strong focus association rules, the algorithm enhances the ability to understand user intent.
It improved the accuracy of the question-answering system in identifying user concerns, and enhanced the understanding of natural language questions and the recall and accuracy of answers.
Smart Images

Figure CN120975082B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of natural language question answering technology, specifically to a method for identifying focus words in natural language questions for intelligent question answering systems. Background Technology
[0002] In natural language question answering, focus words are the core element for understanding user intent and accurately locating answers. Focus words are the key points of the user's question, that is, the words that can locate the answer. For example, for the questions "Q1: Who created Goofy?", "Q2: Which cities does the Weser flow through?", "Q3: What is the longest river?", and "Q4: Give me a list of all lakes in Denmark.", their focus words are "Who", "cities", "river", and "lakes", respectively. Accurately identifying focus words can not only avoid ambiguity and misunderstanding, but also significantly improve the recall and precision of answers.
[0003] In the early stages of research, existing natural language question answering (NLE) methods were largely effective by connecting keywords to answer questions, even without identifying focus words. From the perspective of existing NLE methods, keywords in a question are the most valuable words needed for the system to search for answers. These methods focus on keyword identification, mapping, and combination. This mainly includes two types of methods: 1) Understanding questions through the dependency relationships between words in the question. This method decomposes the question into a dependency parsing tree, where each word in the question corresponds to a node to show the logical relationships between words. 2) Understanding questions by mapping entities and relations. This method jointly maps entities and relations in the question, where the entity is one endpoint of the relation, and then obtains the other endpoint of the relation as the answer.
[0004] As research into natural language question answering (NLE) deepens, focus words in questions have become a bottleneck in improving NLE performance. If a question answering system wants to answer more questions or more accurately understand the user's focus within those questions, focus words become an unavoidable obstacle. When the system acquires a large amount of information related to the question, if it cannot accurately grasp the questioner's focus, all previous efforts will be wasted. For example, for the question "Q3: What is the longest river?", existing methods may be confused by "What" and "river", unsure which is the user's focus. Furthermore, for the question "Q4: Give me a list of all lakes in Denmark.", existing methods similarly identify, map, and combine the words "Give" and "list", further confusing the system and making it difficult to pinpoint the user's true concern: "lakes".
[0005] In summary, to improve the understanding of natural language questions, it is necessary to design a method that can identify the focus words in natural language questions to eliminate the confusion of question answering systems regarding the user's focus. Summary of the Invention
[0006] The purpose of this invention is to provide a method for identifying focus words in natural language questions for intelligent question answering systems. This method addresses the problem that existing methods in natural language question answering ignore focus word identification, resulting in an inability to accurately understand questions that highlight user concerns. By defining relevant concepts, proposing a prefix tree structure and an algorithm for mining association rules, designing an inverted index, and implementing an efficient focus word identification algorithm, this invention aims to improve the ability to understand user intent in natural language question answering.
[0007] To achieve the above objectives, the present invention provides the following technical solution: a method for identifying focus words in natural language questions for intelligent question-answering systems, comprising at least the following steps:
[0008] S1: First, propose a question decision information table to provide a basis for subsequent steps;
[0009] S2: Define relevant concepts, which include at least focus itemsets, frequent focus itemsets, focus association rules, and strong focus association rules;
[0010] S3: Convert the question decision information table into transaction data with items as the basic unit;
[0011] S4: Develop an algorithm for mining strong focus association rules, namely the MSFAR algorithm;
[0012] S5: Build an inverted index for strong focus association rules;
[0013] S6: Construct a focus word recognition algorithm based on inverted index to complete the specific focus word recognition.
[0014] Furthermore, the question decision information table is set as follows:
[0015] T =<U,A=C∪D,V,f>
[0016] Where U is a finite domain of discourse consisting of questions; C is a set of conditional attributes, including question type, question structure words, part-of-speech tags of question structure words, and dependency structures related to question structure words; D is a set of decision attributes, including dependency structures related to focus words; V is a set of attribute values; f: U×A→V is an information function used to assign values to each attribute of each question, i.e., if for and Then f(x,a)∈V.
[0017] Furthermore, S2 includes at least the following steps:
[0018] S2.1: For the question decision information table T =<U,A,V,f> Let a∈A, v∈V, where a represents c i or d i If (a,v) is a single term, then φ is a set of terms composed of one or more terms through the conjunction form “∧”.
[0019] S2.2: For the question decision information table T =<U,A=C∪D,V,f> Let c∈C, d∈D, v∈V, then (c,v) is a condition term, and (d,v) is a decision term;
[0020] S2.3: If an itemset φ contains only condition items, then φ is a condition itemset;
[0021] S2.4: When an itemset φ contains one or more condition items and one decision item, then φ is a focus itemset;
[0022] S2.5: When the number of occurrences of a focus itemset φ exceeds the minimum support threshold minsup specified by the expert, i.e. sup(φ)≥minsup, then φ is a frequent focus itemset;
[0023] S2.6: For an association rule φ1→φ2, the current item φ1 is a condition itemset and the consequent φ2 is a decision item, then φ1→φ2 is a focus association rule;
[0024] S2.7: For a focus association rule φ1→φ2, if the corresponding focus itemset is frequent and its confidence exceeds the minimum confidence threshold minconf specified by the expert, i.e. sup(φ1∧φ2)>minsup and conf(φ1→φ2)=sup(φ1∧φ2) / sup(φ1)≥minconf, then φ1→φ2 is considered a strong focus association rule.
[0025] Furthermore, S3 includes at least the following steps:
[0026] S3.1: Combine each value in the question decision information table with the column name of its corresponding column to form an item, ignoring the parts with no values;
[0027] S3.2: Convert a row in the question decision information table into a transaction.
[0028] Furthermore, S4 includes at least the following steps:
[0029] S4.1: Convert the question decision information table T into a transaction data set δ t ;
[0030] S4.2: Initialize an empty prefix tree set δ tree ;
[0031] S4.3: Iterate through the transaction data set δ sequentially t Each transaction in t i And construct decision tree branches;
[0032] S4.4: Initialize set δ itemsets This is an empty set, which will be used to store triples. <itemset,δ tids ,treeid>;
[0033] S4.5: Traverse the prefix tree set δ sequentially tree Each prefix tree in Generate itemset set δ itemsets ;
[0034] S4.6: From the set of itemsets δ itemsets Delete infrequent itemsets;
[0035] S4.7: Traversing the Prefix Tree Set δ tree Each prefix tree in Generate a set of strong focus association rules δ R .
[0036] Furthermore, S4.3 includes at least the following steps:
[0037] From transaction t iObtain the set of decision items And for each decision item The following steps are required:
[0038] Iterate through the set of decision items one by one Each decision item in
[0039] From the prefix tree set δ tree Selection and decision items Corresponding prefix tree
[0040] Iterate through transactions t in sequence i Each condition itemset in And for each condition itemset The following steps are required:
[0041] when There exists in The corresponding branch will then t i Add to the transaction set δ corresponding to the branch tid_of_branch ,otherwise Add a new one with The corresponding branch, and create a branch for it containing only t i transaction set δ tid_of_branch .
[0042] Furthermore, S4.5 includes at least the following steps:
[0043] Traverse the prefix tree in sequence For each branch in the code, the following steps need to be performed:
[0044] Generate the condition itemset and transaction sequence number set δ for the current branch. tids and the current prefix tree sequence number, treeid;
[0045] If δ itemsets If the current condition itemset exists, then update the δ of this itemset. tids and treeid, otherwise <itemset,δ tids ,treeid> added to collection δ itemsets middle;
[0046] When the transaction sequence number set δ tids If the number of elements is less than the minimum support (minsup), delete the current branch.
[0047] Furthermore, S4.7 includes at least the following steps:
[0048] From the itemset set δitemsets Select the prefix tree with the current prefix tree Related itemsets are stored in the related itemset set δ itemsets_x middle;
[0049] Traverse the prefix tree in sequence For each branch in the code, the following steps need to be performed on each branch:
[0050] From δ itemsets_x Obtain the condition itemset and the number of times the decision item appears in the current branch, n. c and n d ;
[0051] If the confidence level is conf(conf=n) d / n c If the confidence level is greater than the minimum confidence level minconf, then a strong focus association rule r is generated from the current branch.
[0052] Add the generated strong focus association rule r and its confidence conf to the strong focus association rule set δ. R middle.
[0053] Furthermore, S5 includes at least the following steps:
[0054] S5.1: Generate a sequence number and the number of items in the predecessor for each strong focus association rule;
[0055] S5.2: Combine index terms and index records to form an inverted index, where an index term is a condition term and an index record consists of multiple triples. Each triple corresponds to the statistical information of a strong focus association rule. The statistical information includes the rule's sequence number, the number of items in the rule's antecedents, and the rule's confidence level.
[0056] Furthermore, S6 includes at least the following steps:
[0057] S6.1: Generate information such as question type, question structure words, parts of speech of question structure words, and various dependency structures from natural language questions Q, and put them into the question information set δ. information middle;
[0058] S6.2: Based on the question set δ information Generate the values of the natural language question Q in each attribute column of the decision information table;
[0059] S6.3: Convert the value of the natural language question Q in the decision information table into an itemset and put it into δ. item middle;
[0060] S6.4: Based on the itemset set δ item and inverted index set δ indexSelect the index records that are related to the current natural language question Q and add them to the index record set δ. statistics middle;
[0061] S6.5: In the index record set δ statistics The set of triples in which the number of occurrences of the selected condition term is equal to the number of terms in the preceding term;
[0062] S6.6: Sort the triples in the triplet set in descending order of confidence, select the top k sequence numbers of the triples with the highest confidence, and then select the triples from the set of strong focus association rules δ. R Select the rule corresponding to the sequence number and add it to the rule set δ. rules middle;
[0063] S6.7: Based on the question information set δ information and rule set δ rules This generates the final focus word.
[0064] Compared with the prior art, the beneficial effects of the present invention are:
[0065] 1. This invention proposes a method for identifying focus words in natural language questions, enabling question-answering systems to more accurately understand the user's focus;
[0066] 2. This invention proposes a prefix tree structure dominated by decision terms. Based on this prefix tree, an algorithm for mining strong focus association rules to identify focus words is further introduced. This algorithm is more efficient than the classic association rule mining algorithm Apriori.
[0067] 3. This invention proposes an inverted index for strong focus association rules. Based on this inverted index, an algorithm for identifying focus words is further introduced, which is more efficient than sequential search.
[0068] 4. This invention defines focus itemsets, frequent focus itemsets, focus association rules, and strong focus association rules to better express information related to focus words. Attached Figure Description
[0069] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0070] Figure 1 This is a schematic diagram of different training datasets for this invention;
[0071] Figure 2 This is a comprehensive comparative diagram of the present invention;
[0072] Figure 3 This is a schematic diagram comparing the runtime of MSFAR and Apriori in this invention with the minimum confidence threshold (minconf).
[0073] Figure 4 This is a schematic diagram comparing the runtime of MSFAR and Apriori as a function of the minimum support threshold (minsup).
[0074] Figure 5 This is a schematic diagram comparing the running time of the sequential index and inverted index of the present invention with the change of the minimum confidence threshold (minconf);
[0075] Figure 6 This is a schematic diagram comparing the running time of the sequential index and inverted index of the present invention with the minimum support threshold (minsup);
[0076] Figure 7 This is a schematic diagram comparing the effects of the first k rules of this invention;
[0077] Figure 8 This is a schematic diagram comparing the impact of minimum support (minsup) and minimum confidence (minconf) on the results of this invention;
[0078] Figure 9 This is a schematic diagram comparing the impact of training dataset size on the results of this invention;
[0079] Figure 10 This is a comparative diagram showing whether the interrogative sentences of this invention are case-sensitive and whether the declarative sentences retain the verb prototype.
[0080] Figure 11 This diagram illustrates the three stages of the MSFAR (Mean Focus Association Rule) mining algorithm of this invention.
[0081] Figure 12 A schematic diagram illustrating the prefix tree stage of the MSFAR algorithm of this invention, which is dominated by decision terms;
[0082] Figure 13 This is a flowchart of the MSFAR algorithm's condition itemset generation stage in this invention;
[0083] Figure 14 The flowchart for generating strong focus association rules in the MSFAR algorithm of this invention is as follows;
[0084] Figure 15 This is a flowchart of the inverted index-based focus word identification algorithm (IFW) of this invention. Detailed Implementation
[0085] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0086] See Figures 11-15 A method for identifying focus words in natural language questions for intelligent question-answering systems includes at least the following steps:
[0087] S1: First, propose a question decision information table to provide a basis for subsequent steps;
[0088] S2: Define relevant concepts, which should include at least focus itemsets, frequent focus itemsets, focus association rules, and strong focus association rules;
[0089] S3: Convert the question decision information table into transaction data with items as the basic unit;
[0090] S4: Develop an algorithm for mining strong focus association rules, namely the MSFAR algorithm;
[0091] S5: Build an inverted index for strong focus association rules;
[0092] S6: Construct a focus word recognition algorithm based on inverted index to complete the specific focus word recognition.
[0093] The question decision information table is set as follows:
[0094] T =<U,A=C∪D,V,f>
[0095] Where U is a finite domain of discourse consisting of questions; C is a set of conditional attributes, including question type, question structure words, part-of-speech tags of question structure words, and dependency structures related to question structure words; D is a set of decision attributes, including dependency structures related to focus words; V is a set of attribute values; f: U×A→V is an information function used to assign values to each attribute of each question, i.e., if for and Then f(x,a)∈V.
[0096] S2 includes at least the following steps:
[0097] S2.1: For the question decision information table T =<U,A,V,f> Let a∈A, v∈V, where a represents c i or d i If (a,v) is a single term, then φ is a set of terms composed of one or more terms through the conjunction form “∧”.
[0098] S2.2: For the question decision information table T =<U,A=C∪D,V,f> Let c∈C, d∈D, v∈V, then (c,v) is a condition term, and (d,v) is a decision term;
[0099] S2.3: If an itemset φ contains only condition items, then φ is a condition itemset;
[0100] S2.4: When an itemset φ contains one or more condition items and one decision item, then φ is a focus itemset;
[0101] S2.5: When the number of occurrences of a focus itemset φ exceeds the minimum support threshold minsup specified by the expert, i.e. sup(φ)≥minsup, then φ is a frequent focus itemset;
[0102] S2.6: For an association rule φ1→φ2, the current item φ1 is a condition itemset and the consequent φ2 is a decision item, then φ1→φ2 is a focus association rule;
[0103] S2.7: For a focus association rule φ1→φ2, if the corresponding focus itemset is frequent and its confidence exceeds the minimum confidence threshold minconf specified by the expert, i.e. sup(φ1∧φ2)>minsup and conf(φ1→φ2)=sup(φ1∧φ2) / sup(φ1)≥minconf, then φ1→φ2 is considered a strong focus association rule.
[0104] S3 includes at least the following steps:
[0105] S3.1: Combine each value in the question decision information table with the column name of its corresponding column to form an item, ignoring the parts with no values;
[0106] S3.2: Convert a row in the question decision information table into a transaction.
[0107] S4 includes at least the following steps:
[0108] S4.1: Convert the question decision information table T into a transaction data set δ t ;
[0109] S4.2: Initialize an empty prefix tree set δ tree ;
[0110] S4.3: Iterate through the transaction data set δ sequentially t Each transaction in t i And construct decision tree branches;
[0111] S4.4: Initialize set δ itemsetsThis is an empty set, which will be used to store triples. <itemset,δ tids ,treeid>;
[0112] S4.5: Traverse the prefix tree set δ sequentially tree Each prefix tree in Generate itemset set δ itemsets ;
[0113] S4.6: From the set of itemsets δ itemsets Delete infrequent itemsets;
[0114] S4.7: Traversing the Prefix Tree Set δ tree Each prefix tree in Generate a set of strong focus association rules δ R .
[0115] S4.3 includes at least the following steps:
[0116] From transaction t i Obtain the set of decision items
[0117] Iterate through the set of decision items one by one Each decision item in And for each decision item The following steps are required:
[0118] From the prefix tree set δ tree Selection and decision items Corresponding prefix tree
[0119] Iterate through transactions t in sequence i Each condition itemset in And for each condition itemset The following steps are required:
[0120] when There exists in The corresponding branch will then t i Add to the transaction set δ corresponding to the branch tid_of_branch ,otherwise Add a new one with The corresponding branch, and create a branch for it containing only t i transaction set δ tid_of_branch .
[0121] S4.5 includes at least the following steps:
[0122] Traverse the prefix tree in sequence For each branch in the code, the following steps need to be performed:
[0123] Generate the condition itemset and transaction sequence number set δ for the current branch. tids and the current prefix tree sequence number, treeid;
[0124] If δ itemsets If the current condition itemset exists, then update the δ of this itemset. tids and treeid, otherwise <itemset,δ tids ,treeid> added to collection δ itemsets middle;
[0125] When the transaction sequence number set δ tids If the number of elements is less than the minimum support (minsup), delete the current branch.
[0126] S4.7 includes at least the following steps:
[0127] From the itemset set δ itemsets Select the prefix tree with the current prefix tree Related itemsets are stored in the related itemset set δ itemsets_x middle;
[0128] Traverse the prefix tree in sequence For each branch in the code, the following steps need to be performed on each branch:
[0129] From δ itemsets_x Obtain the condition itemset and the number of times the decision item appears in the current branch, n. c and n d ;
[0130] If the confidence level is conf(conf=n) d / n c If the confidence level is greater than the minimum confidence level minconf, then a strong focus association rule r is generated from the current branch.
[0131] Add the generated strong focus association rule r and its confidence conf to the strong focus association rule set δ. R middle.
[0132] S5 includes at least the following steps:
[0133] S5.1: Generate a sequence number and the number of items in the predecessor for each strong focus association rule;
[0134] S5.2: Combine index terms and index records to form an inverted index, where an index term is a condition term and an index record consists of multiple triples. Each triple corresponds to the statistical information of a strong focus association rule. The statistical information includes the rule's sequence number, the number of terms in the rule's antecedents, and the rule's confidence level.
[0135] S6 includes at least the following steps:
[0136] S6.1: Generate information such as question type, question structure words, parts of speech of question structure words, and various dependency structures from natural language questions Q, and put them into the question information set δ. information middle;
[0137] S6.2: Based on the question set δ information Generate the values of the natural language question Q in each attribute column of the decision information table;
[0138] S6.3: Convert the value of the natural language question Q in the decision information table into an itemset and put it into δ. item middle;
[0139] S6.4: Based on the itemset set δ item and inverted index set δ index Select the index records that are related to the current natural language question Q and add them to the index record set δ. statistics middle;
[0140] S6.5: In the index record set δ statistics The set of triples in which the number of occurrences of the selected condition term is equal to the number of terms in the preceding term;
[0141] S6.6: Sort the triples in the triplet set in descending order of confidence, select the top k sequence numbers of the triples with the highest confidence, and then select the triples from the set of strong focus association rules δ. R Select the rule corresponding to the sequence number and add it to the rule set δ. rules middle;
[0142] S6.7: Based on the question information set δ information and rule set δ rules This generates the final focus word.
[0143] Based on the above embodiments, the following argument is proposed:
[0144] The data for this experiment came from two publicly available natural language question datasets: LC-QuAD (containing 4625 questions) and QALD (containing 755 questions). The 100 questions in the test set were randomly selected from LC-QuAD and QALD. The focus words of all questions were manually annotated.
[0145] 1. The effectiveness of strong focus association rules
[0146] To address the issue of identifying focus words, we present a comparison between our proposed method and existing machine learning algorithms. Figure 1 and Figure 2In the figure, the horizontal axis represents the minimum confidence threshold (minconf), and the vertical axis represents the recognition rate of 100 questions. Figure 1 and Figure 2 As can be seen, our method outperforms existing machine learning algorithms, such as K-Nearest Neighbors (KNN), Bayes, Decision Trees, and Support Vector Machines (SVM), in terms of accuracy, whether for the LC-QuAD dataset, the QALD dataset, or a combination of LC-QuAD and QALD datasets. Furthermore, as... Figure 2 As shown in the right subplot, the results obtained on the combined dataset have better stability and an overall recognition rate (over 90%) compared to the results on any single dataset.
[0147] 2. Comparison of MSFAR and Apriori algorithms
[0148] The MSFAR algorithm is proposed for mining strong focus association rules. The comparison results between the MSFAR algorithm and the classic association rule mining algorithm Apriori are as follows: Figure 3 and Figure 4 As shown. In Figure 3 In the middle, the horizontal axis represents the minimum confidence threshold minconf (in Figure 4 In the diagram, the horizontal axis represents the minimum support threshold (minsup), and the vertical axis represents the runtime for mining strong focus association rules. From... Figure 3 It can be seen that, with the minimum support threshold `minsup` remaining constant, the time required for both algorithms to mine strong focus association rules remains unchanged regardless of how the minimum confidence threshold `minconf` changes. The fundamental reason for this phenomenon is that for all association rules derived from frequent patterns, regardless of whether they are strong association rules, their support must be calculated. Therefore, support does not affect computational complexity. Figure 4 It can be seen that, with the minimum confidence threshold `minconf` remaining constant, the running time for mining strong focus association rules gradually decreases as the minimum support threshold `minsup` gradually increases. The fundamental reason for this phenomenon is that increasing the minimum support threshold `minsup` leads to a decrease in the number of frequent patterns, thereby reducing the running time. Furthermore, from... Figure 3 and Figure 4 As can be seen, in both cases, the MSFAR algorithm requires significantly less time than the Apriori algorithm.
[0149] 3. The effectiveness of inverted indexes
[0150] To quickly find strong focus association rules for identifying focus words, we constructed an inverted index for these rules. The comparison between the inverted index and the general sequential index is shown below. Figure 5 and Figure 6 As shown. In Figure 5 In the middle, the horizontal axis represents the minimum confidence threshold minconf (in Figure 6 In the graph, the horizontal axis represents the minimum support threshold (minsup), and the vertical axis represents the runtime for finding strong focus association rules. Figure 5 and Figure 6 It can be seen that regardless of how the minimum confidence threshold minconf and the minimum support threshold minsup change, the search time required for the inverted index is much shorter than that for the sequential index.
[0151] 4. The impact of the first k rules
[0152] For each question, there are several candidate strong focus association rules, which are ranked according to their confidence. We evaluated the impact of using different numbers of rules on focus word identification performance. Figure 7 As can be seen, using the top two rules (top-2) significantly improves the focus word identification results compared to using the rule with the highest confidence score (top-1). However, further increasing the number of rules has a negligible impact on improving the results. Therefore, we default to using the rules with the highest confidence scores.
[0153] 5. The impact of minimum support (minsup) and minimum confidence (minconf) on the results.
[0154] When mining strong focus association rules, two parameters are involved: minimum support (minsup) and minimum confidence (minconf). Therefore, we demonstrate their impact on focus word recognition accuracy. From Figure 8 It can be seen that as minsup or minconf gradually increases, the accuracy of focus word recognition decreases slightly and gradually. Furthermore, minconf has a smaller impact on accuracy than minsup; the former causes a decrease in accuracy of less than 0.05, while the latter causes a decrease of less than 0.1. Overall, although these two parameters do affect the results, their impact is relatively small, especially minconf.
[0155] 6. The impact of training dataset size on results
[0156] The size of the training dataset is an essential consideration in machine learning; therefore, we demonstrate the impact of training dataset size on accuracy, such as... Figure 9As shown. The combined LC-QuAD and QALD dataset contains 5380 questions, of which 100 questions are used as the test set, and 5000 questions are selected from the remaining questions as the training set. These 5000 questions are divided into 10 equal parts, and each time a new part is added based on one part, until all 10 parts are merged, resulting in 10 datasets, ranging in size from 500 to 5000. Figure 9 It can be seen that no matter how the parameters change, when the number of questions reaches 3000, the accuracy tends to stabilize and hardly changes anymore. This means that the quality of the questions in the training set is more important than the quantity.
[0157] 7. The influence of interrogative words and the first verb on the results
[0158] The question dataset contains both interrogative and declarative sentences. On one hand, interrogative words (such as who, which, what, etc.) in interrogative sentences differ in capitalization, for example, "Which companies are in the computer software industry?" and "In which country is the Limerick Lake?". Therefore, whether they need to be treated differently becomes a problem. On the other hand, the first verb form in declarative sentences varies, for example, "Give me the homepage of Forbes." and "List allboard games by GMT.". Therefore, whether they need to be converted to the verb's base form also becomes a problem. Therefore, we propose two candidate solutions for each problem through experiments, such as... Figure 10 As shown. The Y-axis represents the number of questions in which the focus word was accurately identified. We used 50 interrogative sentences and 50 declarative sentences as two test sets, respectively. From Figure 10 As can be seen, when the threshold is small, there is no difference between the two candidate solutions for each question. However, when the threshold is large, the case-sensitive results are slightly more accurate than the case-insensitive results, and the results using the verb infinitive are slightly more accurate than the results using the verb form. Overall, the above two issues have little impact on the results because the strong focus association rule is mainly based on dependency structure rather than the words themselves. Furthermore, focus words in declarative sentences can be accurately identified, while all identification failures are concentrated in interrogative sentences.
[0159] In summary:
[0160] 1. Existing technologies neglect focus word recognition, making it difficult for question-answering systems to accurately understand user intent. This patent utilizes focus word recognition to enable the system to accurately grasp user attention points and improve its ability to understand natural language questions;
[0161] 2. Existing association rule mining algorithms do not take into account the special characteristics of focus association rules, resulting in low mining efficiency. This patent uses a decision-element-driven prefix tree structure and mining algorithm, which can mine rules faster.
[0162] 3. Sequential search methods require comparing each strong focus association rule individually when selecting appropriate rules for natural language questions, which is inefficient. The inverted index and its recognition algorithm for strong focus association rules proposed in this patent are more efficient than sequential search methods.
[0163] 4. Existing technologies lack specific terminology definitions for concepts related to focus words, which can easily lead to confusion during communication and research. The terminology defined in this patent makes the rules and information related to focus words clearer and more accurate.
[0164] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.
Claims
1. A method for identifying focus words in natural language questions for intelligent question-answering systems, characterized in that: At least comprising the following steps: S1: First, the question decision information table is proposed, providing a basis for subsequent steps; S2: Define relevant concepts, including at least focus item set, frequent focus item set, focus association rule, strong focus association rule; S3: Convert the question decision information table into transaction data based on items; S4: Build an algorithm for mining strong focus association rules, namely MSFAR algorithm; Said S4 at least comprises the following steps: S4.1: Convert the question decision information table to a transaction data set ; S4.2: Initialize an empty prefix tree set ; S4.3: sequentially traversing the transaction data set each transaction in the transaction data set and building a decision tree branch; S4.4: Initialize sets Empty set, this set will be used to store the triplets <condition item set, transaction sequence number set , sequence number of the current prefix tree > S4.5: traversing the prefix tree set in sequence each prefix tree in the prefix tree set to generate the item set set ; S4.6: remove infrequent itemsets from the itemset set; S4.6: remove infrequent itemsets from the itemset set; S4.7: traversing the prefix tree set each prefix tree in the prefix tree set generating a set of strong focus point association rules ; S5: Build an inverted index for strong focus association rules; S6: Build a focus word recognition algorithm based on the inverted index to complete the specific focus word recognition; Said S6 at least comprises the following steps: S6.1 : Generating question types, question structure words, parts of speech of question structure words, and various dependency structure information from natural language question sentences and putting them into a question information set from natural language question sentences and putting them into a question information set S6.2: Generating natural language questions from the set of questions Generating natural language questions Values in the decision information table for each attribute column; S6.3: Convert natural language question into a decision information table Convert the values in the decision information table into itemsets and place them in the decision information table. S6.4: based on the set of item sets and the set of inverted indexes select the index records related to the current natural language question put into the set of index records ; S6.5: In the set of index records whose occurrences of the condition terms equal the number of terms in the antecedent; S6.6: According to the confidence of the triples in the triple set, the triples are sorted in descending order, and the first k serial numbers of the triples with higher confidence are selected, then the rules corresponding to the serial numbers are selected from the strong focus association rule set and put into the rule set . S6.7: Based on question information set and rule set Generate the final focus words. .
2. The method of claim 1, wherein the method is a method for identifying a focus word in a natural language question for an intelligent question-answering system. Said question decision information table is set as: where T represents the question decision information table; U is a finite domain consisting of questions; is the conditional attribute set, which includes the question type, the question structure word, the part of speech of the question structure word, and the dependency structure related to the question structure word; D is the decision attribute set, which includes the dependency structure related to the focus word; is the union set of C and D; V is the attribute value set; is an information function.
3. The method of claim 2, wherein the method further comprises: determining the focus word in the natural language question based on the semantic relationship between the focus word and the question word. Said S2 at least comprises the following steps: S2.1: Decision Information Table for Questions ,set up , ,in represent or ,but It is an item, and It is formed by one or more items in conjunction form. "Itemsets formed by combining items; S2.2: For question decision information table , let , , , then is a condition item, is a decision item; S2.3: When a item set contains only conditional items, then is a conditional item set; S2.4: When a item set contains one or more condition items and one decision item, then is a focus item set; S2.5: A set of focus items is frequent if the number of its occurrences exceeds the minimum support threshold specified by the expert S2.6: For association rules , the antecedent is a set of condition items, the consequent is a decision item, then is a focus association rule; S2.7: For a focal point association rule when the corresponding focal point item set is frequent, and its confidence exceeds the minimum confidence threshold specified by the expert i.e. and then is considered a strong focal point association rule.
4. The method of claim 3, wherein the method further comprises: determining the focus word in the natural language question based on the semantic relationship between the focus word and the other words in the natural language question. Said S3 at least comprises the following steps: S3.1: Combine each value in the question decision information table with the column name of the column it belongs to to form an item, ignoring the part without value; S3.2: Convert a row in the question decision information table into a transaction.
5. The method of claim 4, wherein the focus word is identified by: determining a set of candidate focus words from the natural language question; calculating a focus score for each candidate focus word; and selecting the focus word from the set of candidate focus words based on the focus score. Said S4.3 at least comprises the following steps: transaction decision item set from a transaction ; each decision item in the set of decision items is traversed in turn and for each decision item the following steps are performed: selecting a prefix tree from a set of prefix trees corresponding to a decision item corresponding prefix tree ; traversing each condition item set in turn , and for each condition item set the following steps are performed: if there is a branch in corresponding to , then is added to the transaction set corresponding to the branch , otherwise a branch corresponding to is added and a transaction set containing only is created for it . 6. The method of claim 5, wherein the focus word is identified by: determining a set of candidate focus words from the natural language question; calculating a focus score for each candidate focus word; and selecting the focus word from the candidate focus words based on the focus scores. Said S4.5 at least comprises the following steps: traversing the prefix tree in order each branch, and for each branch the following steps need to be performed: Generating a current branch of conditional terms , a transaction sequence number set and a sequence number of the current prefix tree ; If there is a current set of condition terms in the set and , otherwise add , , > to the set of current condition terms. Transaction sequence number set The number of elements of the set is less than the minimum support Delete the current branch.
7. The method of claim 6, wherein the method further comprises: determining the focus word in the natural language question based on the semantic relationship between the focus word and the question word. Said S4.7 at least comprises the following steps: selecting item sets related to the current prefix tree from a set of item sets related item set set traversing the prefix tree in order each branch in turn, and each branch requires the following steps: The conditional item set and the occurrence number of the decision item in the current branch are acquired from and ; If the confidence ( ) is greater than a minimum confidence , a strong focus association rule is generated from the current branch ; The generated strong focus association rules and their confidences are added to the strong focus association rule set .
8. The method of claim 7, wherein the focus word is identified by: determining a set of candidate focus words from the natural language question; calculating a focus score for each candidate focus word; and selecting the focus word from the candidate focus words based on the focus scores. Said S5 at least comprises the following steps: S5.1: Generate a serial number and the number of items in the antecedent for each strong focus association rule; S5.2: Form an inverted index by combining index items and index records, wherein the index item is a conditional item, and the index record is composed of multiple triplets, each triplet corresponding to the statistical information of a strong focus association rule, including the serial number of the rule, the number of items in the rule antecedent, and the confidence of the rule.
Citation Information
Patent Citations
Intelligent question-answering method and system
CN110399457A
Knowledge question and answer path searching method and related device
CN117520487A