Intelligent question answering system and method based on knowledge graph
By adopting a dual-weighted matching algorithm and context-extended vocabulary in the intelligent question-answer system, the limitations of traditional question-and-answer systems in handling complex problems are solved, and the knowledge graph matching accuracy and answer quality are improved.
Patent Information
- Application Number
- CN202510239211.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-28
- Publication Date
- 2025-06-20
AI Technical Summary
Traditional question-and-answer systems have limitations in handling complex problems, and the matching accuracy between the knowledge graph nodes and the problem graph is low, resulting in uneven answer quality.
The dual weight matching algorithm is used to calculate the semantic weights and structural weights of the knowledge graph nodes, and combine the context to expand the vocabulary and degree centering to optimize the filtering of candidate nodes and answer generation.
The matching accuracy between the problem graph and the knowledge graph node is improved, the semantic reasoning ability is enhanced, the generated answers are of higher quality, and can more accurately reflect user intentions.
Smart Images

Figure CN120179776A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent question answering, and particularly to an intelligent question answering system and method based on a knowledge graph. Background Art
[0002] With the rapid development of information technology, intelligent question answering systems have been widely used in various industries, especially in the fields of natural language processing and knowledge graphs. By combining knowledge graphs, intelligent question answering systems can more accurately understand user questions, extract relevant information from massive data, and generate accurate answers, providing users with quick responses. Intelligent question answering systems have greatly improved efficiency and reduced labor costs in industries such as customer service, healthcare, education, and finance. Knowledge graphs, through structured representations of entities, relationships, and attributes, enhance the semantic understanding ability of question answering systems, enabling intelligent question answering systems to provide more in-depth answers through reasoning and associated relationships. In addition, with continuous technological progress, intelligent question answering systems based on knowledge graphs are constantly optimizing their reasoning ability and accuracy, and will play a more important role in more fields in the future.
[0003] However, traditional question answering systems still face many challenges in the process of precise matching and reasoning: First, most traditional question answering systems focus on keyword matching and simple semantic similarity calculation, ignoring the deep relationships of context information, resulting in significant limitations in dealing with complex questions; Second, the matching accuracy between knowledge graph nodes and question graphs is relatively low, unable to effectively capture the combined effects of semantic and structural information, and prone to incorrect matching results; Finally, there is a lack of sufficient reasoning ability in the process of generating candidate answers, resulting in uneven quality of the generated answers. Especially when dealing with complex questions, it is impossible to ensure the high accuracy and rationality of the answers. Therefore, how to improve the knowledge graph matching accuracy and enhance the semantic reasoning ability has become the key to improving the performance of intelligent question answering systems. Summary of the Invention
[0004] The present invention provides an intelligent question answering system and method based on a knowledge graph to solve the problems that most traditional question answering systems focus on keyword matching and simple semantic similarity calculation, ignoring the deep relationships of context information, resulting in significant limitations in dealing with complex questions; the matching accuracy between knowledge graph nodes and question graphs is relatively low, unable to effectively capture the combined effects of semantic and structural information, and prone to incorrect matching results; there is a lack of sufficient reasoning ability in the process of generating candidate answers, resulting in uneven quality of the generated answers. Especially when dealing with complex questions, it is impossible to ensure the high accuracy and rationality of the answers.
[0005] An intelligent question answering system and method based on a knowledge graph of the present invention specifically include the following technical solutions:
[0006] An intelligent question - answering method based on a knowledge graph, comprising the following steps:
[0007] S1: Obtain the question input by the user and perform pre - processing to obtain the keywords of the question graph; based on the keywords of the question graph, introduce a double - weighted matching algorithm to calculate the semantic weight and structural weight of the nodes in the knowledge graph;
[0008] S2: Based on the semantic weight and structural weight of the nodes in the knowledge graph, calculate the comprehensive matching degree, and screen candidate nodes; perform hierarchical processing on the candidate nodes to obtain the inferred relationship strength; based on the inferred relationship strength, generate candidate answers, calculate the scores of the candidate answers, and select the candidate answer with the highest score as the inference result.
[0009] Preferably, the S1 specifically includes:
[0010] In the implementation process of the double - weighted matching algorithm, by comparing the similarity between the semantic vectors of the nodes in the knowledge graph and the semantic vectors of the keywords in the question graph, and introducing a context - extended vocabulary set, calculate the semantic weight of the nodes in the knowledge graph; the calculation formula of the semantic weight is as follows:
[0011]
[0012] Among them, W s (v i ) is the semantic weight of the i - th node v i in the knowledge graph; v i is the i - th node in the knowledge graph; i is the index variable of the nodes in the knowledge graph; m is the number of keywords in the question graph; ζ is the index variable of the keywords in the question graph; Sim(v i , w ζ ) is the similarity between the i - th node v i in the knowledge graph and the ζ - th keyword w ζ in the question graph; Sim(·) is the similarity calculation operation; w ζ is the ζ - th keyword in the question graph; l is the number of context - extended vocabulary in the context - extended vocabulary set; α k is the weighting coefficient of the k - th context - extended vocabulary; is the k - th context - extended vocabulary; k is the index variable of the context - extended vocabulary; ||·||2 is the operation of calculating the Euclidean distance between vectors.
[0013] Preferably, the S1 specifically includes:
[0014] The process of obtaining the context expansion vocabulary set is as follows: First, calculate the cosine similarity between the vocabulary in the context window and the keywords in the question graph. Then, set the context similarity threshold, and filter out the vocabulary with a cosine similarity higher than the context similarity threshold within the context window as the context expansion vocabulary set.
[0015] Preferably, S1 specifically includes:
[0016] In the implementation process of the double weighted matching algorithm, based on the neighbor nodes of the knowledge graph nodes and combined with the Euclidean distance between the nodes, the structural weight of the knowledge graph nodes is calculated.
[0017] Preferably, S2 specifically includes:
[0018] Based on the semantic weight and structural weight of the knowledge graph nodes, introduce the degree centrality of the knowledge graph nodes, and calculate the comprehensive matching degree; the formula for calculating the comprehensive matching degree is as follows:
[0019]
[0020] where M′(v i ) is the comprehensive matching degree between the i-th node v i of the knowledge graph and the keywords in the question graph; d(v i ) is the degree centrality of the i-th node v i of the knowledge graph; W s (v i ) is the semantic weight of the i-th node v i of the knowledge graph; W str (v i ) is the structural weight of the i-th node v i of the knowledge graph.
[0021] Preferably, S2 specifically includes:
[0022] Perform hierarchical reasoning on the candidate nodes, and obtain the inferred relationship strength by gradually transmitting the similarity and edge weights between the nodes and introducing the distance regularization term.
[0023] Preferably, S2 specifically includes:
[0024] Based on the inferred relationship strength and the semantic information of the candidate nodes in the knowledge graph, generate candidate answers through semantic reasoning technology and relationship propagation technology; calculate the similarity between the candidate answers and the keywords in the question graph, and combine the inferred relationship strength to obtain the scores of the candidate answers; based on the scores of all candidate answers, select the candidate answer with the highest score as the reasoning result; process the reasoning result, convert the candidate answer into natural language form and output it to the user.
[0025] An intelligent question-answering system based on a knowledge graph, comprising the following parts:
[0026] A question graph construction module, a knowledge graph module, a double-weighted matching module, a candidate answer generation module, a score calculation module, and an answer generation and presentation module;
[0027] The question graph construction module extracts keywords in the user input question through natural language processing technology, and vectorizes them through a semantic embedding model, converting the user input question into a question graph and outputting it; the question graph construction module is connected to the double-weighted matching module and the score calculation module through data transmission;
[0028] The knowledge graph module is used to provide knowledge graph information, including nodes and edges, providing basic data for subsequent matching, reasoning, and answer generation; the knowledge graph module is connected to the double-weighted matching module and the candidate answer generation module through data transmission;
[0029] The double-weighted matching module calculates the semantic weight of the knowledge graph nodes by combining the double-weighted matching algorithm and the question graph keywords, and calculates the structural weight of the knowledge graph nodes at the same time; based on the semantic weight and structural weight of the knowledge graph nodes, calculates the comprehensive matching degree; based on the comprehensive matching degree, sorts all the knowledge graph nodes, selects candidate nodes and outputs them; the double-weighted matching module is connected to the candidate answer generation module through data transmission;
[0030] The candidate answer generation module performs hierarchical reasoning on the candidate nodes and calculates the relationship strength after reasoning; based on the relationship strength after reasoning and the semantic information of the candidate nodes in the knowledge graph, generates candidate answers and outputs them through semantic reasoning technology and relationship propagation technology; the candidate answer generation module is connected to the score calculation module through data transmission;
[0031] The score calculation module combines the question graph keywords, calculates the scores of the candidate answers, selects the candidate answer with the highest score as the reasoning result and outputs it; the score calculation module is connected to the answer generation and presentation module through data transmission;
[0032] The answer generation and presentation module processes the reasoning result, converts the candidate answer into a natural language form, and finally presents it to the user.
[0033] The beneficial effects of the technical solution of the present invention are:
[0034] 1. The present invention can effectively improve the matching accuracy between the problem graph and the nodes of the knowledge graph by using a dual-weighted matching algorithm of semantic weight and structural weight. By dynamically constructing the context expansion vocabulary set of the keywords in the problem graph, the semantic information in the problem graph is further enriched. More semantic details can be considered during the matching process, reducing the semantic error in the traditional keyword matching method. By introducing the context expansion vocabulary set, the potential semantics in the problem can be more accurately identified, and the robustness of the matching result is improved.
[0035] 2. The present invention combines the structural features such as the structural weight and degree centrality of the knowledge graph nodes. By comprehensively calculating the comprehensive matching degree of the nodes, the screening process of candidate nodes is further optimized. By considering the neighbor nodes of the nodes, the structural importance of the nodes can be accurately evaluated, avoiding the simple matching method that only relies on semantic similarity. Thus, the screening accuracy of the knowledge graph nodes is improved, and the excessive influence of high-degree nodes on the matching result is effectively suppressed, making the matching of nodes more comprehensive and better reflecting the actual relationships in the knowledge graph.
[0036] 3. Through hierarchical reasoning, the present invention can dynamically adjust the strength of the relationship between nodes during the reasoning process, thus effectively improving the quality of candidate answers. By gradually reasoning and transmitting similarity and edge weight information layer by layer, the accuracy and rationality of answer generation are ensured. By combining reasoning with semantic information, answers that are more in line with the user's intention can be generated, enhancing the user experience and the intelligent level of the question-answering system. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 is a structural diagram of an intelligent question-answering system based on a knowledge graph according to the present invention;
[0038] Figure 2 is a flowchart of an intelligent question-answering method based on a knowledge graph according to the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0039] In order to further elaborate on the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0040] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which the present invention belongs.
[0041] The following specifically describes the specific solution of an intelligent question - answering system and method based on a knowledge graph provided by the present invention in conjunction with the accompanying drawings.
[0042] Referring to the attached Figure 1 , which shows the structural diagram of an intelligent question - answering system based on a knowledge graph provided by an embodiment of the present invention. The system includes the following parts:
[0043] A question graph construction module, a knowledge graph module, a double - weighted matching module, a candidate answer generation module, a score calculation module, and an answer generation and presentation module;
[0044] The question graph construction module extracts keywords in the user - input question through natural language processing technology, and vectorizes them through a semantic embedding model, converting the user - input question into a question graph and outputting it. The question graph construction module is connected to the double - weighted matching module and the score calculation module through data transmission;
[0045] The knowledge graph module is used to provide knowledge graph information, including nodes (entities) and edges (relationships). The nodes and edges reflect the semantics and relationships between entities, providing basic data for subsequent matching, reasoning, and answer generation. The knowledge graph module is connected to the double - weighted matching module and the candidate answer generation module through data transmission;
[0046] The double - weighted matching module, through a double - weighted matching algorithm, combines the keywords of the question graph, calculates the semantic weights of the knowledge graph nodes, and simultaneously calculates the structural weights of the knowledge graph nodes. Based on the semantic weights and structural weights of the knowledge graph nodes, it calculates the comprehensive matching degree. Based on the comprehensive matching degree, it sorts all the knowledge graph nodes, sets the number of candidate nodes according to the specific application scenario, and selects the knowledge graph nodes with higher comprehensive matching degrees as candidate nodes and outputs them. The double - weighted matching module is connected to the candidate answer generation module through data transmission;
[0047] The candidate answer generation module performs hierarchical reasoning on the candidate nodes, calculates the relationship strength after reasoning. Based on the relationship strength after reasoning and the semantic information of the candidate nodes in the knowledge graph, it generates candidate answers and outputs them through semantic reasoning technology and relationship propagation technology. The candidate answer generation module is connected to the score calculation module through data transmission;
[0048] The score calculation module combines the keywords of the question graph, calculates the scores of the candidate answers, selects the candidate answer with the highest score as the reasoning result and outputs it. The score calculation module is connected to the answer generation and presentation module through data transmission;
[0049] The answer generation and presentation module processes the inference results, uses existing technologies (such as natural language generation technology) to convert the candidate answers into a natural language form suitable for user understanding, and finally presents them to the user.
[0050] Refer to the attached Figure 2 , which shows a flowchart of an intelligent question-answering method based on a knowledge graph provided by an embodiment of the present invention. The method includes the following steps:
[0051] S1: Obtain the question input by the user and perform preprocessing to obtain the question graph keywords; based on the question graph keywords, introduce a double-weighted matching algorithm to calculate the semantic weight and structural weight of the knowledge graph nodes;
[0052] First, preprocess the question input by the user to obtain the question graph keywords; specifically, use natural language processing technology to extract the keywords in the question, and vectorize them through a semantic embedding model to convert the question input by the user into a question graph. The question graph contains keywords for calculating and matching the similarity with the nodes (entities) in the knowledge graph. The keywords are the core semantic units extracted from the question input by the user through natural language processing technology, representing the important information in the question, which are nouns, verbs, or phrases in the question for calculating and matching the similarity with the nodes in the knowledge graph; the knowledge graph contains entities (nodes) and relationships (edges) for providing structured information of entities and relationships, where the nodes in the knowledge graph are jointly determined by semantic information and structural information. The preprocessing process uses existing technologies and will not be elaborated here.
[0053] Calculate the semantic matching degree between the question graph keywords and the knowledge graph nodes through the double-weighted matching algorithm. The double-weighted matching algorithm calculates the comprehensive matching degree between the question graph keywords and the knowledge graph nodes by combining semantic weight and structural weight to improve the accuracy and robustness of semantic matching; the semantic matching degree is an index used to measure the similarity between the question graph keywords and the knowledge graph nodes;
[0054] Calculate the semantic weight of the knowledge graph nodes by comparing the similarity between the semantic vectors of the knowledge graph nodes and the semantic vectors of the question graph keywords, and introducing a context expansion vocabulary set; the context expansion vocabulary set is dynamically obtained through a context window, which is a sliding window set around the question graph keywords, containing several words before and after the keywords, and the size of the context window can be adjusted according to requirements;
[0055] The process of obtaining the context expansion vocabulary set is as follows: First, calculate the cosine similarity between the vocabulary in the context window and the keywords in the question graph. Then, set the context similarity threshold according to the specific implementation scenario. Finally, filter out the vocabulary with a cosine similarity higher than the context similarity threshold within the context window as the context expansion vocabulary set, enabling the context expansion vocabulary set to capture more extensive relevant semantic information, thereby optimizing the calculation of semantic weights;
[0056] The calculation formula for semantic weights is as follows:
[0057]
[0058] Among them, W s (v i ) is the semantic weight of the i-th node v i in the knowledge graph. The higher the semantic weight, the more the node conforms to the semantic content of the question; v i is the i-th node in the knowledge graph; i is the index variable of the nodes in the knowledge graph; m is the number of keywords in the question graph; ( is the index variable of the keywords in the question graph; Sim(v i , w ζ ) is the similarity between the i-th node v i in the knowledge graph and the ζ-th keyword w ζ in the question graph; Sim(·) is the similarity calculation operation; w ζ is the keyword in the question graph, representing the ζ-th keyword in the question graph; i is the number of context expansion vocabulary in the context expansion vocabulary set; α k is the weighting coefficient of the k-th context expansion vocabulary, used to quantify the influence degree of the context expansion vocabulary on the semantic matching of the current question graph keyword w ζ ; is the k-th context expansion vocabulary; k is the index variable of the context expansion vocabulary; ||·||2 is the operation of calculating the Euclidean distance between vectors;
[0059] The specific formula for the similarity between the nodes in the knowledge graph and the keywords in the question graph is as follows:
[0060]
[0061] Among them, D is the dimension of the semantic vector, that is, the vector dimension of the nodes in the knowledge graph and the keywords in the question graph, and the dimensions of the vectors are the same; is the dimension index variable of the semantic vector; and are respectively the i-th node v i in the knowledge graph and the ζ-th keyword w ζ in the question graph at the Semantic vector values on a dimension;
[0062] Based on the neighbor nodes of the knowledge graph nodes, and introducing the Euclidean distance to adjust the similarity relationship between the knowledge graph nodes, calculate the structural weight of the knowledge graph nodes to evaluate the structural importance of the knowledge graph nodes; the structural weight calculation formula is:
[0063]
[0064] Among them, W str (v i ) is the structural weight of the i-th node v i of the knowledge graph; N(v i ) is the set of neighbor nodes of the i-th node v i of the knowledge graph, that is, the set of all knowledge graph nodes directly connected to v i ; v i and v j respectively represent the i-th node and the j-th node in the knowledge graph; v j ∈ N(v i ) means that the j-th node v j of the knowledge graph is the neighbor node of the i-th node v i of the knowledge graph; Sim(·) is the similarity calculation operation; ||·||2 is the operation of calculating the Euclidean distance between vectors.
[0065] S2: Based on the semantic weight and structural weight of the knowledge graph nodes, calculate the comprehensive matching degree, and screen the candidate nodes; perform hierarchical processing on the candidate nodes to obtain the inferred relationship strength; based on the inferred relationship strength, generate candidate answers, calculate the scores of the candidate answers, and select the candidate answer with the highest score as the inference result.
[0066] Based on the semantic weight and structural weight of the knowledge graph nodes, introduce the degree centrality of the knowledge graph nodes, and calculate the comprehensive matching degree. The degree centrality of the knowledge graph nodes is an important index to measure the importance of the connection degree of the knowledge graph nodes, which is used to represent the number of direct connections between the knowledge graph nodes and other knowledge graph nodes, reflecting the information dissemination ability and influence of the nodes in the knowledge graph; the comprehensive matching degree represents the matching degree between the keyword of the problem graph and the knowledge graph nodes, which comprehensively considers the semantic similarity and structural characteristics of the nodes;
[0067] The comprehensive matching degree calculation formula is as follows:
[0068]
[0069] Among them, M′(v i ) is the i-th node v i of the knowledge graphComprehensive matching degree with the keywords of the problem graph; d(v i ) is the degree centrality of the i-th node v i in the knowledge graph. The higher the degree centrality, the greater the influence of the knowledge graph node in the knowledge graph; W s (v i ) is the semantic weight of the i-th node v i in the knowledge graph; W str (v i ) is the structural weight of the i-th node v i in the knowledge graph; By combining the sum of the squares of the semantic weight and the structural weight, it is used to measure the comprehensive matching degree between the knowledge graph node and the keywords of the problem graph, and the degree centrality is introduced for suppression to avoid the excessive influence of the large number of connections between the knowledge graph nodes with higher degree centrality and other nodes on the calculation of the comprehensive matching degree; It is used to balance the difference between the semantic weight and the structural weight.
[0070] According to the calculated comprehensive matching degree, all knowledge graph nodes are sorted, and the number of candidate nodes is set according to the specific application scenario, and the nodes with higher comprehensive matching degree are selected as candidate nodes.
[0071] Hierarchical reasoning is performed on the candidate nodes. By gradually transmitting the similarity and edge weights between nodes layer by layer, potential semantic information is gradually mined, and a distance regularization term is introduced to adjust the relationship strength, accurately reflecting the semantic relationship of the candidate nodes and the changes in the reasoning process;
[0072] The relationship strength formula is as follows:
[0073]
[0074] Among them, is the relationship strength of the -th candidate node after n layers of reasoning; n is the reasoning layer index, and the total number of reasoning layers is set according to the specific implementation scenario; represents that the node is the -th candidate node 's neighbor node; α n is the weighting coefficient of the n-th layer of reasoning, set according to the specific implementation scenario; Sim(·) is the similarity calculation operation; is the -th candidate node and the -th neighbor node 's edge weight in the knowledge graph; λ nis an adjustment item used to control the influence degree of the Euclidean distance, which is set according to the expert experience method; ||·||2 is an operation for calculating the Euclidean distance between vectors. is the distance regularization term.
[0075] Based on the inferred relationship strength and the semantic information of candidate nodes in the knowledge graph, using existing semantic reasoning techniques and relationship propagation techniques, generate candidate answers for each candidate node. The candidate answer is a semantic vector generated by combining the semantic information of the candidate node and the inferred relationship strength, representing the knowledge content related to the question; calculate the similarity between the candidate answer and the keywords in the question graph, and calculate the score of the candidate answer of the candidate node. The specific formula is as follows:
[0076]
[0077] where is the score of the th candidate answer The higher the score, the higher the semantic matching degree between the candidate answer and the question; is the candidate answer of the th candidate node; m is the number of keywords in the question graph; p is the index variable of the keywords in the question graph; w p is the pth keyword in the question graph; N is the total number of reasoning layers; n is the index of the reasoning layer; is the th candidate node after n layers of reasoning, the relationship strength.
[0078] Finally, according to the scores of all candidate answers, select the candidate answer with the highest score as the reasoning result; then, further process the reasoning result, such as using natural language generation or answer rewriting, to ensure the fluency and accuracy of the answer, and output the processed reasoning result to the user.
[0079] In summary, an intelligent question-answering system and method based on a knowledge graph are completed.
[0080] The sequence of the invention embodiments is only for description and does not represent the superiority or inferiority of the embodiments. The processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0081] Each embodiment in this specification is described in a progressive manner. The same or similar parts between each embodiment can be referred to each other, and the key points of each embodiment are to illustrate the differences from other embodiments.
[0082] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. An intelligent question-answering method based on knowledge graph, characterized in that: The following steps are involved: S1: Get the question input by the user and preprocess it to get the keywords of the question graph; Based on the keywords in the question graph, a double-weighted matching algorithm is introduced to calculate the semantic weight and structural weight of the knowledge graph nodes; S2: Based on the semantic weight and structural weight of the knowledge graph nodes, calculate the comprehensive matching degree and screen the candidate nodes; Perform hierarchical processing on candidate nodes to obtain the relationship strength after reasoning; Based on the relationship strength after reasoning, candidate answers are generated, and the scores of the candidate answers are calculated. The candidate answer with the highest score is selected as the reasoning result.
2. According to claim 1, the intelligent question-answering method based on knowledge graph is characterized in that: The S1 specifically includes: In the implementation of the double-weighted matching algorithm, the semantic weight of the knowledge graph node is calculated by comparing the similarity between the semantic vector of the knowledge graph node and the semantic vector of the question graph keyword and introducing the context extension vocabulary set; the calculation formula of the semantic weight is as follows: Among them, W s (v i ) is the i-th node v in the knowledge graph i The semantic weight of v i is the i-th node in the knowledge graph; i is the index variable of the node in the knowledge graph; m is the number of question graph keywords; ζ is the index variable of the question graph keywords; Sim(v i , w ζ ) is the i-th node v in the knowledge graph i and the ζth keyword w in the problem graph ζ The similarity between them; Sim(·) is the similarity calculation operation; w ζ is the ζth keyword in the question graph; l is the number of context-expanded words in the context-expanded vocabulary set; α k is the weight coefficient of the kth context expansion word; is the kth context expansion word; k is the index variable of the context expansion word; ||·||2 is the operation of calculating the Euclidean distance between vectors.
3. The intelligent question-answering method based on knowledge graph according to claim 2, characterized in that: The S1 specifically includes: The process of acquiring the context expansion vocabulary set is as follows: first, the cosine similarity between the vocabulary in the context window and the question graph keywords is calculated, then the context similarity threshold is set, and the vocabulary with cosine similarity higher than the context similarity threshold is screened out in the context window as the context expansion vocabulary set.
4. The intelligent question-answering method based on knowledge graph according to claim 3, characterized in that: The S1 specifically includes: In the implementation process of the double weighted matching algorithm, the structural weight of the knowledge graph node is calculated based on the neighbor nodes of the knowledge graph node and the Euclidean distance between the nodes.
5. The intelligent question-answering method based on knowledge graph according to claim 1, characterized in that: The S2 specifically includes: Based on the semantic weight and structural weight of the knowledge graph nodes, the degree centrality of the knowledge graph nodes is introduced to calculate the comprehensive matching degree; the calculation formula of the comprehensive matching degree is as follows: Among them, M′(v i ) is the comprehensive matching degree between the i-th node vi of the knowledge graph and the keywords of the question graph; d(v i ) is the i-th node v in the knowledge graph i The degree centrality of W s (v i ) is the i-th node v in the knowledge graph i The semantic weight of W str (v i ) is the i-th node v in the knowledge graph i The structural weight of .
6. The intelligent question-answering method based on knowledge graph according to claim 5, characterized in that: The S2 specifically includes: Hierarchical reasoning is performed on candidate nodes, and the similarity and edge weights between nodes are transferred layer by layer, and a distance regularization term is introduced to obtain the relationship strength after reasoning.
7. The intelligent question-answering method based on knowledge graph according to claim 6, characterized in that: The S2 specifically includes: Based on the relationship strength after reasoning and the semantic information of the candidate nodes in the knowledge graph, candidate answers are generated through semantic reasoning technology and relationship propagation technology; the similarity between the candidate answers and the question graph keywords is calculated, and the scores of the candidate answers are obtained by combining the relationship strength after reasoning, and the candidate answer with the highest score is selected as the reasoning result; the reasoning result is processed, and the candidate answers are converted into natural language form and output to the user.
8. An intelligent question-answering system based on knowledge graph, applied to the intelligent question-answering method based on knowledge graph as claimed in claim 1, characterized in that: Includes the following parts: Question graph construction module, knowledge graph module, double weighted matching module, candidate answer generation module, score calculation module, answer generation and presentation module; The question graph construction module extracts keywords from the user input question through natural language processing technology, vectorizes the question input by the user through a semantic embedding model, converts the question input by the user into a question graph, and outputs the question graph; The question graph construction module is connected with the double-weighted matching module and the score calculation module through data transmission; The knowledge graph module is used to provide knowledge graph information, including nodes and edges, to provide basic data for subsequent matching, reasoning and answer generation; the knowledge graph module is connected to the double-weighted matching module and the candidate answer generation module by means of data transmission; The double weighted matching module calculates the semantic weight of the knowledge graph node and the structural weight of the knowledge graph node by combining the question graph keywords through the double weighted matching algorithm; Calculate the comprehensive matching degree based on the semantic weight and structural weight of the knowledge graph nodes; Based on the comprehensive matching degree, all knowledge graph nodes are sorted, candidate nodes are selected and output; double The weighted matching module is connected to the candidate answer generation module by means of data transmission; The candidate answer generation module performs hierarchical reasoning on the candidate nodes and calculates the relationship strength after reasoning; Based on the inferred relationship strength and the semantic information of the candidate nodes in the knowledge graph, the candidate answers are generated and output through semantic reasoning technology and relationship propagation technology; The candidate answer generation module is connected to the score calculation module through data transmission; The score calculation module calculates the scores of the candidate answers in combination with the question graph keywords, selects the candidate answer with the highest score as the inference result and outputs it; The score calculation module is connected to the answer generation and presentation module by means of data transmission; The answer generation and presentation module processes the reasoning results, converts the candidate answers into natural language form, and finally presents them to the user.