Intelligent question and answer inference system based on knowledge graph

By employing multi-source data preprocessing, hybrid reasoning, and dynamic weight adjustment, this system addresses the shortcomings of knowledge graph systems in cross-source data fusion and reasoning adaptability, achieving an efficient and accurate intelligent question-answering system applicable to fields such as healthcare and finance.

CN121168653APending Publication Date: 2025-12-19SICHUAN JOYOU DIGITAL TECH CO LTD
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202511329998.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-17
Publication Date
2025-12-19

AI Technical Summary

Technical Problem

Existing knowledge graph-based intelligent question answering systems have shortcomings in cross-source data fusion, reasoning method fusion, knowledge updating, and adaptive adjustment of reasoning weights, resulting in incomplete knowledge coverage, poor reasoning accuracy and interpretability, making it difficult to meet the high requirements of fields such as healthcare and finance.

Method used

By employing techniques such as multi-source data preprocessing, entity relation extraction, hybrid reasoning, incremental updates, and dynamic weight adjustment, an intelligent question-answering system based on knowledge graphs is constructed to achieve cross-source data fusion, multi-step reasoning, and visualization. Combining symbolic rules and deep learning reasoning, the weights are dynamically adjusted to adapt to different scenario requirements.

Benefits of technology

It improves knowledge coverage and update efficiency, enhances reasoning accuracy and interpretability, adapts to the needs of complex problems in different fields, and strengthens the system's flexibility and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121168653A_ABST
    Figure CN121168653A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of intelligent question-answering systems, and particularly relates to an intelligent question-answering inference system based on a knowledge graph, which is characterized in that firstly, a knowledge graph construction module fuses multi-source data to generate a structured graph, and after a user inputs a natural language question, a question-answering analysis module completes intention classification and entity disambiguation and converts the question into structured query; an inference engine module fuses symbol rules and graph neural network inference through a hybrid inference sub-module, and a dynamic weight adjustment sub-module optimizes weights according to errors and attenuation factors to generate an inference result; the knowledge updating module incrementally updates the atlas in real time and detects conflicts, the interactive interface module visually presents a result, and the evaluation optimization module iteratively optimizes parameters in combination with offline evaluation and online feedback. The whole process is from user question asking to result output, accurate reasoning and continuous performance improvement are achieved, and multi-field question and answer requirements are met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the technical field of intelligent question answering systems, specifically an intelligent question answering reasoning system based on knowledge graphs. Background Technology

[0002] Currently, knowledge graph-based intelligent question-answering systems face two major bottlenecks in practical applications: First, traditional knowledge graph construction often relies on processing from a single data source, lacking sufficient cross-source fusion capabilities for structured databases, semi-structured web pages and tables, and unstructured text, resulting in incomplete knowledge coverage. Furthermore, entity relationship extraction is prone to entity link bias due to an imbalance between semantic similarity and knowledge graph relevance, affecting the accuracy of subsequent question-answering. Second, existing reasoning methods have significant limitations. While pure symbolic rule reasoning is highly interpretable, it struggles to handle complex and fuzzy nonlinear relationships, and the rule base maintenance cost is extremely high in multi-step reasoning scenarios. Pure deep learning reasoning, while possessing excellent generalization capabilities, suffers from poor interpretability, making it impossible for users to trace the reasoning process. Moreover, the two types of reasoning methods often operate independently without forming an effective fusion mechanism, making it difficult for the system to flexibly adapt to simple fact queries and complex relationship reasoning scenarios. Meanwhile, the insufficient dynamic updating and adaptive adjustment capabilities of knowledge graphs and reasoning weights further restrict system performance: traditional knowledge updates mostly adopt a full update approach, which consumes a lot of computing resources and has low update efficiency when facing scenarios with high-frequency changes in domain knowledge. Furthermore, it lacks an effective conflict detection mechanism and is prone to inconsistencies in knowledge graph logic due to the introduction of new knowledge. During the reasoning process, weight parameters are mostly preset manually and cannot be dynamically optimized according to changes in the reasoning scenario and historical errors. This results in poor stability of reasoning results across different domains and problems of varying difficulty, making it difficult to meet the needs of fields such as medicine and finance, which have extremely high requirements for the accuracy and reliability of reasoning. Summary of the Invention

[0003] To address the problems mentioned in the background art, this invention provides an intelligent question-answering reasoning system based on knowledge graphs, which solves the problems of insufficient adaptive adjustment capability and low cost of question-answering systems.

[0004] To achieve the above objectives, the present invention provides the following technical solution: an intelligent question-answering reasoning system based on knowledge graphs, characterized in that it includes a knowledge graph construction module, a question-answering parsing module, a reasoning engine module, a knowledge update module, an interaction interface module, and an evaluation and optimization module, wherein: Knowledge graph construction module: used to collect multi-source heterogeneous data, complete data cleaning, entity recognition, relation extraction and entity alignment, construct structured domain knowledge graph, and realize knowledge fusion and unified representation of cross-source data; Question answering parsing module: It receives users' natural language questions and transforms unstructured questions into a structured query format that the knowledge graph can understand through semantic analysis, intent recognition, and key entity extraction, providing accurate input for subsequent reasoning; Reasoning Engine Module: Based on entity and relation information in knowledge graphs, it integrates symbolic rule reasoning and deep learning reasoning capabilities to achieve multi-step reasoning and answer generation for complex problems, while also having the ability to adaptively adjust reasoning weights; Knowledge update module: Used to monitor dynamic changes in domain knowledge, realize incremental updates of knowledge graph, and detect conflicts between newly added knowledge and existing knowledge to ensure the timeliness and consistency of knowledge graph; Interactive Interface Module: Used to enable natural interaction between users and the system, supports natural language input and output, and presents the reasoning process and results in a visual way, improving the interpretability of reasoning results and user experience; Evaluation and optimization module: This module quantifies system performance through offline evaluation metrics and combines them with online user feedback data to iteratively optimize the parameters of the inference engine and other core modules, continuously improving the accuracy of the system's question answering and inference efficiency.

[0005] Optionally, the knowledge graph construction module includes: a multi-source data preprocessing submodule and an entity relation extraction submodule; The multi-source data preprocessing submodule performs format standardization, redundant data removal, and noise filtering operations on table data from structured databases, semi-structured web page tables, and unstructured text data to generate standardized preprocessed data with unified fields and clean content, providing high-quality data input for subsequent entity recognition and relation extraction. The entity relationship extraction submodule employs an entity linking algorithm, which achieves precise entity linking by calculating a weighted score of entity semantic similarity and knowledge graph path weights. The calculation formula is as follows: ; Where α is the balance coefficient (0<α<1), used to balance the contribution ratio of semantic similarity and path weight; Sim(e,q) is the semantic similarity between entity e and question q. After the entity and question are converted into vectors through a pre-trained language model, the cosine similarity is calculated to reflect the degree of semantic association between the entity and the question. For entity e in the knowledge graph, to related entities The path weight is determined based on a combination of path length and relationship reliability; Path(e, The path existence indicator function is 1 if the path exists and 0 otherwise. The total matching score is calculated using this formula, and the entity with the highest semantic matching degree with the question and the closest association with the knowledge graph is selected from the candidate entity set to ensure the accuracy of entity links.

[0006] Optionally, the question-answering parsing module includes: an intent classification submodule and an entity disambiguation submodule; The intent classification submodule is fine-tuned based on a pre-trained language model and a domain-annotated intent classification dataset. It classifies the intent labels of natural language questions input by users, determines the domain category and core demand direction of the questions, and provides intent guidance for subsequent structured query generation. The entity disambiguation module addresses ambiguous entities in user queries, such as "apple" potentially referring to a fruit or a technology company. It employs a three-step process to clarify ambiguity: First, it performs dependency parsing on the user query to extract candidate entities and related keywords. Second, it constructs context vectors based on the contextual information of candidate entities in the knowledge graph, simultaneously transforming the query into a vector and calculating their cosine similarity. Third, it introduces an entity popularity factor—the proportion of the entity's occurrences in the system's historical query data to the total query frequency of all entities with the same name—to adjust the cosine similarity. Entities with higher popularity show a greater improvement in similarity after adjustment. Finally, based on the adjusted similarity ranking, a unique unambiguous entity is determined. Optionally, the inference engine module further includes: a hybrid inference submodule and a dynamic weight adjustment submodule; The hybrid reasoning submodule integrates symbolic rule reasoning and deep learning reasoning based on graph neural network encoding, and achieves a weighted fusion of the two types of reasoning results through the following formula: ; Where R is the final reasoning result, which includes the answer entity, confidence score and reasoning path information; The results of symbolic rule reasoning are generated by matching entity relationships in the knowledge graph through a rule engine, based on logical rules defined by domain experts through a rule editor (such as "If A is the parent node of B and B is the parent node of C, then A is the grandparent node of C" and "If drug X is used to treat disease Y and patient Z has disease Y, then patient Z can use drug X"). This results in high interpretability. To produce deep learning inference results, a graph convolutional network based on an attention mechanism is used to encode the knowledge graph, learn low-dimensional vector representations of entities and relationships, predict potential relationships between entities through vector operations, and generate inference results. It is adept at handling complex nonlinear relationships. β is a dynamic fusion weight (0≤β≤1), which is used to balance the contribution of the two types of inference methods according to the type of inference problem. β is set higher for simple inference problems and lower for complex inference problems. The dynamic weight adjustment submodule adaptively adjusts the fusion weight β based on the inference scenario and historical inference errors using a weight update mechanism that includes a time decay factor. The update formula is as follows: ; Wherein, β(t+1) is the weight for the next iteration, and β(t) is the current weight; γ is the learning rate (0<γ<1), which is dynamically adjusted according to the fluctuation of the inference error. When the error fluctuation is large, γ is reduced to avoid weight oscillation; when the error is stable, γ is increased to accelerate weight convergence and is used to control the magnitude of each weight update; Error(t) is the current inference error, which is calculated using the cross-entropy loss function to determine the deviation between the current inference result and the manually labeled standard answer. The larger the error, the larger the weight adjustment magnitude; λ is the time decay coefficient, which is set according to the knowledge update frequency of the inference scenario. In scenarios with fast knowledge updates, λ takes a larger value and decays faster; t is the number of inference iterations; exp(-λ・t) is the time decay factor, which decays exponentially with the number of iterations. It is used to reduce the impact of early historical errors on the current weight update, avoid outdated errors from interfering with the latest inference scenario, and ensure that the weights always adapt to the current inference requirements.

[0007] Optionally, the knowledge update module further includes: an incremental update submodule and a conflict detection submodule; The incremental update submodule monitors domain data sources in real time, such as industry databases, official knowledge publishing platforms, and user-reported updates of new knowledge, through a data monitoring component. It processes only changed data: for newly added data, it performs entity recognition, relation extraction, and attribute completion; for modified data, it updates the attributes or relationships of corresponding entities in the knowledge graph; for deleted data, it removes related records from the knowledge graph and updates the relationship links of associated entities. After processing, the new knowledge increments are written to the knowledge graph via a batch write interface, significantly reducing the computational resource consumption and time cost of the update process and ensuring the normal operation of the system during knowledge updates. The conflict detection submodule uses a probabilistic model to calculate the conflict risk between the knowledge to be updated and the existing knowledge, avoiding inconsistencies in the knowledge graph logic caused by the introduction of new knowledge. The conflict scoring formula is as follows: ; Risk(f) is the conflict risk score of the knowledge fact f to be updated. The score ranges from 0 to 1, and the higher the score, the greater the conflict risk. This refers to all existing relations related to f in the knowledge graph; For f and The probability of logical conflict is calculated based on logical judgments from the domain rule base. For relationship The confidence weight is determined based on the credibility of the knowledge source; when Risk(f) exceeds the preset threshold, the system automatically triggers a manual review process, where domain experts determine whether to allow the update, ensuring the consistency of the knowledge graph.

[0008] Optionally, the evaluation and optimization module further includes: an offline evaluation submodule and an online feedback submodule; The offline evaluation submodule constructs a standardized test set covering different difficulty levels and different domain scenarios. The test set includes question text, standard answers, and reasoning path annotations. Performance is quantified by calculating the system's core question-answering metrics: accuracy, recall, and F1 score. The calculation formulas are as follows: ; Simultaneously, performance metrics such as inference time and memory usage are recorded to generate offline evaluation reports and pinpoint system performance bottlenecks.

[0009] The online feedback submodule sets up a "Result Correct / Incorrect" voting button and a feedback input box on the system interaction interface to collect user evaluation data on the reasoning results; it cleans and classifies the user feedback data to construct an online feedback dataset; and iteratively optimizes the dynamic weight parameters of the reasoning engine module by combining the gradient descent algorithm with offline evaluation indicators and online feedback satisfaction as optimization targets. After each optimization, the performance improvement effect is verified by A / B testing to continuously improve the system's question-and-answer quality.

[0010] Optionally, the knowledge graph construction module extracts entities and relations from unstructured text data through a pre-trained language model, supports entity alignment across language data, and can adapt to the knowledge graph construction needs of multiple fields such as healthcare, finance, and education.

[0011] Optionally, the result visualization submodule of the interactive interface module adopts a graph structure display method, presenting entities involved in the reasoning process as circular nodes and relationships as labeled edges; key reasoning paths are highlighted by color, and textual explanations of the reasoning steps are provided on the right side of the interface, so as to realize the intuitive traceability of the reasoning process and enhance the user's trust in the reasoning results.

[0012] Optionally, during the graph neural network encoding process of the hybrid reasoning submodule, the attention mechanism adaptively allocates weight parameters for different relationship types by calculating the importance score of the relationship between entities; for complex relationship types such as causal relationship, subordinate relationship, and conditional relationship, higher weights are assigned by increasing the number of attention heads and increasing the feature extraction dimension, thereby enhancing the model's ability to capture complex relationships and improving the accuracy of complex multi-step reasoning.

[0013] Compared with the prior art, the beneficial effects of the present invention are as follows: In this invention, the hybrid reasoning submodule combines symbolic rule reasoning and graph neural network reasoning in a weighted manner. This avoids the limitations of pure rule reasoning in handling complex relationships and compensates for the accuracy shortcomings of pure deep learning reasoning, thereby significantly improving the reasoning accuracy. In this invention, the clear logical link generated by symbolic rule reasoning is combined with the visual path of deep learning reasoning. Users can intuitively trace the reasoning process and also see the vector operation process of related entities, effectively solving the black box problem of traditional deep learning reasoning. In this invention, the dynamic weight adjustment submodule achieves adaptive updating of the fusion weight β through a time decay factor and an error feedback mechanism. In simple fact queries, it automatically increases the rule reasoning weight to ensure accurate answers; in complex multi-step reasoning, it automatically increases the deep learning reasoning weight to enhance generalization ability and adapt to reasoning needs of different difficulties and fields. The cross-source data fusion capability and incremental update mechanism of the knowledge graph construction module 101 in this invention can improve knowledge coverage and update efficiency; the probability model of the conflict detection submodule can control the knowledge conflict rate, provide high-quality knowledge support for other modules, and further ensure the overall performance of the system. Attached Figure Description

[0014] Figure 1 This is a flowchart of the overall system and method in this invention; Figure 2 This is a flowchart of the knowledge graph construction module in this invention; Figure 3 This is a flowchart of the question-and-answer parsing module in this invention; Figure 4 This is a flowchart of the inference engine module in this invention; Figure 5 This is a flowchart of the knowledge update module in this invention; Figure 6 This is a flowchart of the evaluation and optimization module in this invention; In the picture: 101. Knowledge Graph Construction Module; 102. Question Answering and Parsing Module; 103. Reasoning Engine Module; 104. Knowledge Update Module; 105. Interaction Interface Module; 106. Evaluation and Optimization Module. Detailed Implementation

[0015] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0016] This embodiment uses the "diabetes Q&A" in the medical field as an example to explain the specific application process in detail.

[0017] like Figures 1 to 6As shown, this invention provides an intelligent question-answering reasoning system based on a knowledge graph, characterized by comprising a knowledge graph construction module 101, a question-answering parsing module 102, a reasoning engine module 103, a knowledge update module 104, an interaction interface module 105, and an evaluation and optimization module 106, wherein: Knowledge Graph Construction Module 101: Used to collect multi-source heterogeneous data, complete data cleaning, entity recognition, relation extraction and entity alignment, construct a structured domain knowledge graph, and realize knowledge fusion and unified representation of cross-source data; Question answering parsing module 102: It is used to receive users' natural language questions and transform unstructured questions into a structured query format that the knowledge graph can understand through semantic analysis, intent recognition and key entity extraction, so as to provide accurate input for subsequent reasoning; Reasoning Engine Module 103: It is used for entity and relation information based on knowledge graph, integrates symbolic rule reasoning and deep learning reasoning capabilities, realizes multi-step reasoning and answer generation for complex problems, and has the ability to adaptively adjust reasoning weights. Knowledge Update Module 104: Used to monitor dynamic changes in domain knowledge, realize incremental updates of the knowledge graph, and detect conflicts between newly added knowledge and existing knowledge to ensure the timeliness and consistency of the knowledge graph; Interactive interface module 105: It is used to realize natural interaction between users and the system, supports natural language input and output, and presents the reasoning process and results in a visual way, thereby improving the interpretability of reasoning results and user experience. Evaluation and optimization module 106: It is used to quantify system performance through offline evaluation indicators, combine online user feedback data, and iteratively optimize the parameters of the inference engine and other core modules to continuously improve the accuracy of system question answering and inference efficiency.

[0018] The knowledge graph construction module 101 includes: a multi-source data preprocessing submodule and an entity relation extraction submodule; The multi-source data preprocessing submodule performs format standardization, redundant data removal, and noise filtering operations on table data from structured databases, semi-structured web page tables, and unstructured text data to generate standardized preprocessed data with unified fields and clean content, providing high-quality data input for subsequent entity recognition and relation extraction. The entity relationship extraction submodule employs an entity linking algorithm, which achieves precise entity linking by calculating a weighted score of entity semantic similarity and knowledge graph path weights. The calculation formula is as follows: ; Where α is the balance coefficient (0<α<1), used to balance the contribution ratio of semantic similarity and path weight; Sim(e,q) is the semantic similarity between entity e and question q. After the entity and question are converted into vectors through a pre-trained language model, the cosine similarity is calculated to reflect the degree of semantic association between the entity and the question. For entity e in the knowledge graph, to related entities The path weight is determined based on a combination of path length and relationship reliability; Path(e, The path existence indicator function is 1 if the path exists and 0 otherwise. The total matching score is calculated using this formula, and the entity with the highest semantic matching degree with the question and the closest association with the knowledge graph is selected from the candidate entity set to ensure the accuracy of entity links.

[0019] Specifically, the multi-source data preprocessing submodule collects three types of data sources: structured data, which is patient-disease-drug structured table data stored in the database of the hospital system; semi-structured data; and unstructured data, which is diabetes research papers and patient online consultation logs in the database. It performs format standardization, redundant data removal and noise filtering operations. Redundant data removal removes duplicate drug instruction records, and noise filtering cleans invalid symbols and typos in the consultation logs, and finally generates a standardized dataset. Specifically, the entity relation extraction submodule employs an entity linking algorithm to link entities such as "diabetes" and "insulin" in the preprocessed data. For example, it calculates the semantic similarity Sim(e,q) = 0.92 between the entity "insulin" and the question "commonly used drugs for diabetic patients," and combines this with the path weight of "insulin → diabetes treatment" in the knowledge graph. =0.85 and path existence Path=1, take the balance coefficient α=0.6, and use the formula Score(e,q)=0.6×0.92+(1-0.6)×(0.85×1)=0.892 to filter out the core related entity "insulin" in this problem.

[0020] The question-and-answer parsing module 102 includes: an intent classification submodule and an entity disambiguation submodule; The intent classification submodule is fine-tuned based on a pre-trained language model and a domain-annotated intent classification dataset. It classifies the intent labels of natural language questions input by users, determines the domain category and core demand direction of the questions, and provides intent guidance for subsequent structured query generation. The entity disambiguation module addresses ambiguous entities in user queries, such as "apple" potentially referring to a fruit or a technology company. It employs a three-step process to clarify ambiguity: First, it performs dependency parsing on the user query to extract candidate entities and related keywords. Second, it constructs context vectors based on the contextual information of candidate entities in the knowledge graph, simultaneously transforming the query into a vector and calculating their cosine similarity. Third, it introduces an entity popularity factor—the proportion of the entity's frequency of occurrence in the system's historical query data to the total query frequency of all entities with the same name—to correct the cosine similarity. Entities with higher popularity show a greater improvement in similarity after correction. Finally, based on the corrected similarity ranking, a unique unambiguous entity is determined.

[0021] Specifically, based on the ERNIE pre-trained model, fine-tuning is performed using a medical intent dataset. This intent dataset contains labels such as "disease query", "drug recommendation", and "treatment plan". The user question "which fruits are suitable for diabetic patients to eat" is classified and the intent label "dietary advice - fruit recommendation" is output to guide the direction of subsequent reasoning.

[0022] Specifically, the entity disambiguation module: For potentially ambiguous entities in the question, first extract the candidate entity "apple" and the relational keyword "suitable for eating"; then calculate the cosine similarity between the context vector of "apple" (fruit) in the graph and the question vector, where the context vector of "apple" (fruit) has the associated attributes of "low sugar content" and "rich in vitamins", and the similarity is 0.86, while the similarity of "apple" (medicine) is 0.32; finally, combine the entity popularity factor, which is the query ratio of fruit "apple" in historical consultations = 92%, and after correction, the similarity of fruit "apple" = 0.86 × (1 + 0.92) = 1.65, and determine the unambiguous entity as "fruit type apple".

[0023] The inference engine module 103 further includes: a hybrid inference submodule and a dynamic weight adjustment submodule; The hybrid reasoning submodule integrates symbolic rule reasoning and deep learning reasoning based on graph neural network encoding, and achieves a weighted fusion of the two types of reasoning results through the following formula: ; Where R is the final reasoning result, which includes the answer entity, confidence score and reasoning path information; The results of symbolic rule reasoning are generated by matching entity relationships in the knowledge graph through a rule engine, based on logical rules defined by domain experts through a rule editor (such as "If A is the parent node of B and B is the parent node of C, then A is the grandparent node of C" and "If drug X is used to treat disease Y and patient Z has disease Y, then patient Z can use drug X"). This results in high interpretability. To produce deep learning inference results, a graph convolutional network based on an attention mechanism is used to encode the knowledge graph, learn low-dimensional vector representations of entities and relationships, predict potential relationships between entities through vector operations, and generate inference results. It is adept at handling complex nonlinear relationships. β is a dynamic fusion weight (0≤β≤1), which is used to balance the contribution of the two types of inference methods according to the type of inference problem. β is set higher for simple inference problems and lower for complex inference problems. The dynamic weight adjustment submodule adaptively adjusts the fusion weight β based on the inference scenario and historical inference errors using a weight update mechanism that includes a time decay factor. The update formula is as follows: ; Wherein, β(t+1) is the weight for the next iteration, and β(t) is the current weight; γ is the learning rate (0<γ<1), which is dynamically adjusted according to the fluctuation of the inference error. When the error fluctuation is large, γ is reduced to avoid weight oscillation; when the error is stable, γ is increased to accelerate weight convergence and is used to control the magnitude of each weight update; Error(t) is the current inference error, which is calculated using the cross-entropy loss function to determine the deviation between the current inference result and the manually labeled standard answer. The larger the error, the larger the weight adjustment magnitude; λ is the time decay coefficient, which is set according to the knowledge update frequency of the inference scenario. In scenarios with fast knowledge updates, λ takes a larger value and decays faster; t is the number of inference iterations; exp(-λ・t) is the time decay factor, which decays exponentially with the number of iterations. It is used to reduce the impact of early historical errors on the current weight update, avoid outdated errors from interfering with the latest inference scenario, and ensure that the weights always adapt to the current inference requirements.

[0024] Specifically, the hybrid reasoning submodule integrates two types of reasoning: symbolic rule reasoning is based on rules defined by medical experts, including "diabetic patients should eat fruits with a sugar content of <10g / 100g" and "fruits with a sugar content of >20g / 100g are contraindicated," matching "apple (sugar content 8g / 100g)," "watermelon (sugar content 6g / 100g)," and "lychee (sugar content 22g / 100g)" in the atlas to generate rule reasoning results. ={"Recommended: Apples, Watermelons", "Avoid: Lychees"}; Deep learning inference uses a GAT graph neural network to encode the "diabetes-fruit-sugar content" graph, learn entity vectors, predict the correlation, and generate... ={"Apple correlation 0.91", "Watermelon correlation 0.88", "Strawberry correlation 0.85"}; Taking the dynamic fusion weight β=0.5, the current scenario is a medium-difficulty reasoning scenario, using the formula R=0.5× +0.5× The final output reasoning result is {"Recommended: Apple, Watermelon, Strawberry", "Forbidden: Lychee"}.

[0025] Specifically, in the dynamic weight adjustment submodule, if the current inference error Error(t) = 0.12, this error is due to the deviation from the standard answer caused by not recommending "Strawberry". The learning rate γ = 0.05, and the time decay coefficient... =0.1, iteration number t=5, and by using the formula β(t+1)=0.5+0.05×0.12×exp(-0.1×5)=0.5+0.006×0.6065≈0.5036, the β value of the next inference is adjusted to reduce the weight of rule inference and increase the contribution of deep learning inference.

[0026] The knowledge update module 104 further includes: an incremental update submodule and a conflict detection submodule; The incremental update submodule monitors domain data sources in real time, such as industry databases, official knowledge publishing platforms, and user-reported updates of new knowledge, through a data monitoring component. It processes only changed data: for newly added data, it performs entity recognition, relation extraction, and attribute completion; for modified data, it updates the attributes or relationships of corresponding entities in the knowledge graph; for deleted data, it removes related records from the knowledge graph and updates the relationship links of associated entities. After processing, the new knowledge increments are written to the knowledge graph via a batch write interface, significantly reducing the computational resource consumption and time cost of the update process and ensuring the normal operation of the system during knowledge updates. The conflict detection submodule uses a probabilistic model to calculate the conflict risk between the knowledge to be updated and the existing knowledge, avoiding inconsistencies in the knowledge graph logic caused by the introduction of new knowledge. The conflict scoring formula is as follows: ; Risk(f) is the conflict risk score of the knowledge fact f to be updated. The score ranges from 0 to 1, and the higher the score, the greater the conflict risk. This refers to all existing relations related to f in the knowledge graph; For f and The probability of logical conflict is calculated based on logical judgments from the domain rule base. For relationship The confidence weight is determined based on the credibility of the knowledge source; when Risk(f) exceeds the preset threshold, the system automatically triggers a manual review process, where domain experts determine whether to allow the update, ensuring the consistency of the knowledge graph.

[0027] Specifically, the conflict detection submodule calculates the conflict risk of the newly added knowledge "diabetes-suitable for consumption-blueberries" and the relevant existing relationships in the graph. This includes "Blueberries - sugar content 7g / 100g" and "High-sugar fruits to avoid for diabetics". 0 and 0 respectively, both indicating no conflict. The scores are 0.9 and 0.8 respectively, where 0.9 corresponds to the credibility of the guideline source and 0.8 corresponds to the credibility of the expert rules. The formula Risk(f) = 0 × 0.9 + 0 × 0.8 = 0 is used. Since the score is lower than the threshold of 0.7, the update is completed directly.

[0028] The evaluation and optimization module 106 further includes: an offline evaluation submodule and an online feedback submodule; The offline evaluation submodule constructs a standardized test set covering different difficulty levels and different domain scenarios. The test set includes question text, standard answers, and reasoning path annotations. Performance is quantified by calculating the system's core question-answering metrics: accuracy, recall, and F1 score. The calculation formulas are as follows: ; Simultaneously, performance metrics such as inference time and memory usage are recorded to generate offline evaluation reports and pinpoint system performance bottlenecks.

[0029] The online feedback submodule sets up a "Result Correct / Incorrect" voting button and a feedback input box on the system interaction interface to collect user evaluation data on the reasoning results; it cleans and classifies the user feedback data to construct an online feedback dataset; and iteratively optimizes the dynamic weight parameters of the reasoning engine module by combining the gradient descent algorithm with offline evaluation indicators and online feedback satisfaction as optimization targets. After each optimization, the performance improvement effect is verified by A / B testing to continuously improve the system's question-and-answer quality.

[0030] The knowledge graph construction module 101 extracts entities and relations from unstructured text data through a pre-trained language model, supports entity alignment across language data, and can adapt to the knowledge graph construction needs of multiple fields such as medical care, finance, and education.

[0031] The result visualization submodule of the interactive interface module 105 adopts a graph structure display method, presenting entities involved in the reasoning process as circular nodes and relationships as labeled edges; key reasoning paths are highlighted by color, and textual explanations of the reasoning steps are provided on the right side of the interface, so as to realize the intuitive traceability of the reasoning process and enhance the user's trust in the reasoning results.

[0032] During the graph neural network encoding process of the hybrid reasoning submodule, the attention mechanism adaptively allocates weight parameters for different relationship types by calculating the importance score of the relationship between entities. For complex relationship types such as causal relationship, subordinate relationship, and conditional relationship, higher weights are assigned by increasing the number of attention heads and increasing the feature extraction dimension, thereby enhancing the model's ability to capture complex relationships and improving the accuracy of complex multi-step reasoning.

[0033] The working principle and usage process of this invention are as follows: First, the knowledge graph construction module 101 integrates multi-source data to generate a structured graph. After the user inputs a natural language question, the question-answering parsing module 102 completes intent classification and entity disambiguation, transforming the question into a structured query. The inference engine module 103 integrates symbolic rules and graph neural network inference through a hybrid inference submodule, and the dynamic weight adjustment submodule optimizes the weights based on error and decay factors to generate inference results. The knowledge update module 104 updates the graph incrementally in real time and detects conflicts. The interactive interface module 105 visualizes the results, and the evaluation and optimization module 106 iteratively optimizes parameters by combining offline evaluation and online feedback. The overall process, from user questioning to result output, achieves accurate inference and continuous performance improvement, adapting to question-answering needs in multiple domains.

[0034] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.

[0035] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A knowledge graph-based intelligent question-answering and reasoning system, characterized in that, It includes a knowledge graph construction module (101), a question-answering parsing module (102), a reasoning engine module (103), a knowledge update module (104), an interaction interface module (105), and an evaluation and optimization module (106), wherein: Knowledge graph construction module (101): Used to collect multi-source heterogeneous data, complete data cleaning, entity recognition, relation extraction and entity alignment, construct a structured domain knowledge graph, and realize knowledge fusion and unified representation of cross-source data; Question answering parsing module (102): It is used to receive users' natural language questions, and through semantic analysis, intent recognition and key entity extraction, it transforms unstructured questions into a structured query format that the knowledge graph can understand, providing accurate input for subsequent reasoning; Reasoning engine module (103): It is used to integrate symbolic rule reasoning and deep learning reasoning capabilities based on knowledge graph entity and relation information, realize multi-step reasoning and answer generation for complex problems, and has the ability to adaptively adjust reasoning weights. Knowledge update module (104): Used to monitor the dynamic changes of domain knowledge, realize incremental updates of knowledge graph, and detect conflicts between newly added knowledge and existing knowledge to ensure the timeliness and consistency of knowledge graph; Interactive interface module (105): It is used to realize the natural interaction between users and the system, support natural language input and output, and present the reasoning process and results in a visual way to improve the interpretability of reasoning results and user experience; Evaluation and optimization module (106): It is used to quantify system performance through offline evaluation indicators, combine online user feedback data, and iteratively optimize the parameters of the inference engine and other core modules to continuously improve the accuracy of system question answering and inference efficiency.

2. The knowledge graph-based intelligent question-answering reasoning system according to claim 1, characterized in that, The knowledge graph construction module (101) includes: a multi-source data preprocessing submodule and an entity relation extraction submodule; The multi-source data preprocessing submodule performs format standardization, redundant data removal, and noise filtering operations on table data from structured databases, semi-structured web page tables, and unstructured text data to generate standardized preprocessed data with unified fields and clean content, providing high-quality data input for subsequent entity recognition and relation extraction. The entity relationship extraction submodule employs an entity linking algorithm, which achieves precise entity linking by calculating a weighted score of entity semantic similarity and knowledge graph path weights. The calculation formula is as follows: ; Where α is the balance coefficient (0<α<1), used to balance the contribution ratio of semantic similarity and path weight; Sim(e,q) is the semantic similarity between entity e and question q. After the entity and question are converted into vectors through a pre-trained language model, the cosine similarity is calculated to reflect the degree of semantic association between the entity and the question. For entity e in the knowledge graph, to related entities The path weight is determined based on a combination of path length and relationship reliability; Path(e, The path existence indicator function is 1 if the path exists and 0 otherwise. The total matching score is calculated using this formula, and the entity with the highest semantic matching degree with the question and the closest association with the knowledge graph is selected from the candidate entity set to ensure the accuracy of entity links.

3. The knowledge graph-based intelligent question-answering reasoning system according to claim 1, characterized in that, The question-and-answer parsing module (102) includes: an intent classification submodule and an entity disambiguation submodule; The intent classification submodule is fine-tuned based on a pre-trained language model and a domain-annotated intent classification dataset. It classifies the intent labels of natural language questions input by users, determines the domain category and core demand direction of the questions, and provides intent guidance for subsequent structured query generation. The entity disambiguation module addresses ambiguous entities in user queries, such as "apple" potentially referring to a fruit or a technology company. It employs a three-step process to clarify ambiguity: First, it performs dependency parsing on the user query to extract candidate entities and related keywords. Second, it constructs context vectors based on the contextual information of candidate entities in the knowledge graph, simultaneously transforming the query into a vector and calculating their cosine similarity. Third, it introduces an entity popularity factor—the proportion of the entity's frequency of occurrence in the system's historical query data to the total query frequency of all entities with the same name—to correct the cosine similarity. Entities with higher popularity show a greater improvement in similarity after correction. Finally, based on the corrected similarity ranking, a unique unambiguous entity is determined.

4. The knowledge graph-based intelligent question-answering reasoning system according to claim 1, characterized in that, The inference engine module (103) further includes: a hybrid inference submodule and a dynamic weight adjustment submodule; The hybrid reasoning submodule integrates symbolic rule reasoning and deep learning reasoning based on graph neural network encoding, and achieves a weighted fusion of the two types of reasoning results through the following formula: ; Where R is the final reasoning result, which includes the answer entity, confidence score and reasoning path information; The results of symbolic rule reasoning are generated by matching entity relationships in the knowledge graph through a rule engine, based on logical rules defined by domain experts through a rule editor (such as "If A is the parent node of B and B is the parent node of C, then A is the grandparent node of C" and "If drug X is used to treat disease Y and patient Z has disease Y, then patient Z can use drug X"). This results in high interpretability. To produce deep learning inference results, a graph convolutional network based on an attention mechanism is used to encode the knowledge graph, learn low-dimensional vector representations of entities and relationships, predict potential relationships between entities through vector operations, and generate inference results. It is adept at handling complex nonlinear relationships. β is a dynamic fusion weight (0≤β≤1), which is used to balance the contribution of the two types of inference methods according to the type of inference problem. β is set higher for simple inference problems and lower for complex inference problems. The dynamic weight adjustment submodule adaptively adjusts the fusion weight β based on the inference scenario and historical inference errors using a weight update mechanism that includes a time decay factor. The update formula is as follows: ; Wherein, β(t+1) is the weight for the next iteration, and β(t) is the current weight; γ is the learning rate (0<γ<1), which is dynamically adjusted according to the fluctuation of the inference error. When the error fluctuation is large, γ is reduced to avoid weight oscillation; when the error is stable, γ is increased to accelerate weight convergence and is used to control the magnitude of each weight update; Error(t) is the current inference error, which is calculated using the cross-entropy loss function to determine the deviation between the current inference result and the manually labeled standard answer. The larger the error, the larger the weight adjustment magnitude; λ is the time decay coefficient, which is set according to the knowledge update frequency of the inference scenario. In scenarios with fast knowledge updates, λ takes a larger value and decays faster; t is the number of inference iterations; exp(-λ・t) is the time decay factor, which decays exponentially with the number of iterations. It is used to reduce the impact of early historical errors on the current weight update, avoid outdated errors from interfering with the latest inference scenario, and ensure that the weights always adapt to the current inference requirements.

5. The knowledge graph-based intelligent question-answering reasoning system according to claim 1, characterized in that, The knowledge update module (104) further includes: an incremental update submodule and a conflict detection submodule; The incremental update submodule monitors domain data sources in real time, such as industry databases, official knowledge publishing platforms, and user-reported updates of new knowledge, through a data monitoring component. It processes only changed data: for newly added data, it performs entity recognition, relation extraction, and attribute completion; for modified data, it updates the attributes or relationships of corresponding entities in the knowledge graph; for deleted data, it removes related records from the knowledge graph and updates the relationship links of associated entities. After processing, the new knowledge increments are written to the knowledge graph via a batch write interface, significantly reducing the computational resource consumption and time cost of the update process and ensuring the normal operation of the system during knowledge updates. The conflict detection submodule uses a probabilistic model to calculate the conflict risk between the knowledge to be updated and the existing knowledge, avoiding inconsistencies in the knowledge graph logic caused by the introduction of new knowledge. The conflict scoring formula is as follows: ; Risk(f) is the conflict risk score of the knowledge fact f to be updated. The score ranges from 0 to 1, and the higher the score, the greater the conflict risk. This refers to all existing relations related to f in the knowledge graph; For f and The probability of logical conflict is calculated based on logical judgments from the domain rule base. For relationship The confidence weight is determined based on the credibility of the knowledge source; when Risk(f) exceeds the preset threshold, the system automatically triggers a manual review process, where domain experts determine whether to allow the update, ensuring the consistency of the knowledge graph.

6. The knowledge graph-based intelligent question-answering reasoning system according to claim 1, characterized in that, The evaluation and optimization module (106) further includes: an offline evaluation submodule and an online feedback submodule; The offline evaluation submodule constructs a standardized test set covering different difficulty levels and different domain scenarios. The test set includes question text, standard answers, and reasoning path annotations. Performance is quantified by calculating the system's core question-answering metrics: accuracy, recall, and F1 score. The calculation formulas are as follows: ; Simultaneously, performance metrics such as inference time and memory usage are recorded to generate offline evaluation reports and pinpoint system performance bottlenecks.

7. The online feedback submodule sets up a "Result Correct / Incorrect" voting button and a feedback input box on the system interaction interface to collect user evaluation data on the reasoning results; Clean, classify, and label user feedback data to construct an online feedback dataset; By combining the gradient descent algorithm with offline evaluation metrics and online feedback satisfaction as optimization targets, the dynamic weight parameters of the inference engine module are iteratively optimized. After each optimization, the performance improvement effect is verified by A / B testing, and the question-answering quality of the system is continuously improved.

8. The knowledge graph-based intelligent question-answering reasoning system according to claim 1, characterized in that, The knowledge graph construction module (101) extracts entities and relations from unstructured text data through a pre-trained language model, supports entity alignment across language data, and can adapt to the knowledge graph construction needs of multiple fields such as medical care, finance, and education.

9. The knowledge graph-based intelligent question-answering reasoning system according to claim 1, characterized in that, The result visualization submodule of the interactive interface module (105) adopts a graph structure display method, presenting entities involved in the reasoning process as circular nodes and relationships as labeled edges; key reasoning paths are highlighted by color, and textual explanations of the reasoning steps are provided on the right side of the interface, so as to realize the intuitive traceability of the reasoning process and enhance the user's trust in the reasoning results.

10. The knowledge graph-based intelligent question-answering reasoning system according to claim 4, characterized in that, During the graph neural network encoding process of the hybrid reasoning submodule, the attention mechanism adaptively allocates weight parameters for different relationship types by calculating the importance score of the relationship between entities. For complex relationship types such as causal relationship, subordinate relationship, and conditional relationship, higher weights are assigned by increasing the number of attention heads and increasing the feature extraction dimension, thereby enhancing the model's ability to capture complex relationships and improving the accuracy of complex multi-step reasoning.

Citation Information

Cited By

  • Security event root cause traceability analysis method and system based on interactive questions and answers

    CN121418210A

  • RAG and knowledge graph question-answering method and system for security classification and grading of cross-border data

    CN121599136A

  • Multi-modal data acquisition and intelligent control system for unmanned aerial vehicle

    CN122064000A

  • Intelligent teaching system based on knowledge graph and multi-Agent collaboration

    CN122133824A