Intelligent knowledge analysis and question answering method and system based on time sequence knowledge graph retrieval enhancement
By using a retrieval enhancement method based on time-series knowledge graphs, user queries are decomposed into single-time subqueries. Through a three-layer interactive retrieval mechanism, the problem of incorrect answers caused by time-insensitive retrieval in existing systems is solved, and high-precision question answering that is both time-sensitive and semantically relevant is achieved.
Patent Information
- Application Number
- CN202511629180.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-07
- Publication Date
- 2026-01-30
AI Technical Summary
Existing knowledge graph retrieval systems have time-insensitive retrieval mechanisms when handling cross-time queries or time-sensitive tasks, which leads to the retrieval of semantically relevant but time-inconsistent information and the generation of incorrect answers.
A retrieval enhancement method based on temporal knowledge graphs is adopted. User queries are decomposed into multiple single-time subqueries through temporal semantic parsing. The temporal subgraph of each subquery is obtained using the temporal knowledge graph. Relevant knowledge is filtered through a three-layer interactive retrieval mechanism (temporal subgraph retrieval, node-level retrieval, and knowledge-level retrieval) to generate the final comprehensive answer.
It enables the generation of context-consistent and time-accurate answers in time-series question answering, reduces time conflicts and redundant interference, improves the performance of multi-hop reasoning and long text question answering, and significantly improves the accuracy and interpretability of answers.
Smart Images

Figure CN121434362A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of natural language processing technology, specifically to a knowledge intelligence parsing and question answering method and system based on time-series knowledge graph retrieval enhancement. Background Technology
[0002] In the development of intelligent question answering systems and knowledge augmentation generation (RAG) technology, the quality of model generation has increasingly relied on external knowledge retrieval and semantic integration. Traditional RAG methods compensate for insufficient internal knowledge updates by providing external text fragments to large language models, thus achieving significant results in knowledge-intensive tasks. However, existing RAG systems generally suffer from the following problems: first, retrieval methods based solely on text similarity are insufficient to characterize the structured relationships between entities, leading to insufficient multi-hop reasoning and logical consistency; second, they lack the ability to model over time, failing to effectively handle semantic conflicts and redundancy arising from the evolution of knowledge over time.
[0003] To alleviate the problem of missing structured relationships, the GraphRAG method was proposed. This method overcomes the limitations of traditional embedding-space-based RAG in semantic matching by constructing knowledge as a graph structure and retrieving it at the node level, significantly improving the performance of multi-hop reasoning and long text question answering. However, existing GraphRAG systems often assume that knowledge is static and invariant, ignoring the fact that knowledge dynamically evolves over time in the real world. This assumption can lead to incorrect answers when handling cross-time queries or time-sensitive tasks, as the time-insensitive retrieval mechanism may cause the model to retrieve semantically relevant but temporally incompatible information. Summary of the Invention
[0004] The purpose of this invention is to address the problem that existing methods may retrieve semantically relevant but temporally incompatible information due to time-insensitive retrieval mechanisms, thereby generating incorrect answers. This invention provides a knowledge intelligence parsing and question-answering method and system based on time-series knowledge graph retrieval enhancement.
[0005] The technical solution adopted by the present invention to solve the above-mentioned technical problems is as follows:
[0006] A knowledge-based intelligent parsing and question-answering method enhanced by time-series knowledge graph retrieval includes the following steps:
[0007] Step 1: Receive user queries involving multiple time points or time intervals, and break down the user queries into multiple single-time subqueries through time semantic parsing and decomposition strategies, with each subquery corresponding to a single time condition;
[0008] Step 2: For each subquery, use a time-series knowledge graph to obtain the corresponding time subgraph. ;
[0009] Step 3: Based on each subquery, obtain the query vector and acquire the time subgraph. The semantic vector of each node is calculated, and then the similarity between the query vector and the semantic vectors of each node is calculated. ;
[0010] Step 4: Sort the similarity scores of all nodes, and select nodes with the highest similarity scores from the sorted list to the lowest based on a set threshold, thus forming a candidate set. ;
[0011] Step 5: For the candidate set Each candidate node Perform the operation to obtain the set of internal knowledge fragments of the node, and then process each internal knowledge fragment in the set. Vector embedding encoding is performed, and then the semantic similarity of each internal knowledge fragment after vector embedding encoding is calculated with the query vector. Finally, the final score is generated by combining the context matching weight.
[0012] Step 6: Sort the final scores corresponding to all internal knowledge fragments, and select the top-ranked knowledge fragments from the sorted results based on the threshold as the final search results;
[0013] Step 7: Obtain the entity nodes and their relationships corresponding to the final search results, and input the entity nodes and their relationships corresponding to the final search results, as well as the final search results and their source text block references, into the large language model to obtain the answer output by the large language model;
[0014] Step 8: Aggregate the answers output by the large language model from all subqueries to obtain the final comprehensive answer.
[0015] Furthermore, the specific steps of step two are as follows:
[0016] Step 21: For each subquery, parse the time constraint information in the query statement, including explicit time and implicit time;
[0017] Step 22: Determine whether the subquery is a point-in-time query or a time-range query. If it is a point-in-time query, proceed to Step 23; if it is a time-range query, proceed to Step 24.
[0018] Steps 2 and 3: Determine the time subgraph corresponding to each time point query in the time series knowledge graph. ;
[0019] Step 24: Determine the sequence of continuous time subgraphs corresponding to the time constraint in the time series knowledge graph, and split the sequence of continuous time subgraphs into multiple time subgraphs. .
[0020] Furthermore, the time-series knowledge graph is obtained through the following steps:
[0021] Step 1: Obtain long-term document data containing dynamic updates, i.e., the raw corpus;
[0022] Step 2: Divide the original corpus into multiple time segments according to the time dimension to obtain a time-series knowledge base. Each of them Corresponding to a specific point in time or time interval , =1,2,... ;
[0023] Step 3: Divide each time slice Divide the text into several fixed-size blocks;
[0024] Step 4: Extract entities and relationships from each text block within each time segment;
[0025] Step 5: Perform entity fusion and relation merging on the extracted entities and relations;
[0026] Step 6: Based on the entities and relationships after entity fusion and relationship merging, bind a specific time point or time interval to each entity and relationship. ;
[0027] Step 7: Based on the binding of a specific time point or time interval The entities and relationships are then used to obtain the description of each entity in different time segments. In other words, sequential knowledge;
[0028] Step 8: Construct a temporal knowledge graph using the temporal knowledge corresponding to all entities.
[0029] Furthermore, the final score is expressed as:
[0030]
[0031] in, To query the similarity between a knowledge fragment and a semantic space, To measure how well the knowledge fragment matches the current query time conditions, This is the weighting adjustment coefficient.
[0032] Furthermore, the dynamically updated long-term document data includes business reports, annual reports, operation records, and meeting minutes.
[0033] A knowledge intelligence parsing and question answering system based on time-series knowledge graph retrieval enhancement, the system includes a user query splitting module, a retrieval module and a question answering module;
[0034] The user query splitting module specifically performs the following steps:
[0035] Step A: Receive user queries involving multiple time points or time intervals, and break down the user queries into multiple single-time subqueries through time semantic parsing and decomposition strategies, with each subquery corresponding to a single time condition;
[0036] Step B: For each subquery, use a time-series knowledge graph to obtain the corresponding time subgraph. ;
[0037] The retrieval module specifically performs the following steps:
[0038] Step C1: Based on each subquery, obtain the query vector and acquire the time subgraph. The semantic vector of each node is calculated, and then the similarity between the query vector and the semantic vectors of each node is calculated. ;
[0039] Step C2: Sort the similarity scores of all nodes, and select nodes with high to low similarity scores from the sorted list according to a set threshold to form a candidate set. ;
[0040] Step C3: For the candidate set Each candidate node Perform the operation to obtain the set of internal knowledge fragments of the node, and then process each internal knowledge fragment in the set. Vector embedding encoding is performed, and then the semantic similarity of each internal knowledge fragment after vector embedding encoding is calculated with the query vector. Finally, the final score is generated by combining the context matching weight.
[0041] Step C4: Sort the final scores corresponding to all internal knowledge fragments, and select the highest-ranked knowledge fragments from the sorted results based on the threshold as the final search results;
[0042] The question-and-answer module specifically performs the following steps:
[0043] Obtain the entity nodes and their relationships corresponding to the final search results, and input the entity nodes and their relationships corresponding to the final search results, as well as the final search results and their source text block references, into the large language model to obtain the answer output by the large language model. Aggregate the answers output by the large language model obtained from all subqueries to obtain the final comprehensive answer.
[0044] Furthermore, the specific steps of step B are as follows:
[0045] Step B1: For each subquery, parse the time constraint information in the query statement, including explicit time and implicit time;
[0046] Step B2: Determine whether the subquery is a point-in-time query or a time interval query. If it is a point-in-time query, proceed to step B3; if it is a time interval query, proceed to step B4.
[0047] Step B3: Determine the time subgraph corresponding to each time point query in the time series knowledge graph. ;
[0048] Step B4: Determine the sequence of continuous time subgraphs corresponding to the time constraint in the time series knowledge graph, and split the sequence of continuous time subgraphs into multiple time subgraphs. .
[0049] Furthermore, the time-series knowledge graph is obtained through the following steps:
[0050] Step 1: Obtain long-term document data containing dynamic updates, i.e., the raw corpus;
[0051] Step 2: Divide the original corpus into multiple time segments according to the time dimension to obtain a time-series knowledge base. Each of them Corresponding to a specific point in time or time interval , =1,2,... ;
[0052] Step 3: Divide each time slice Divide the text into several fixed-size blocks;
[0053] Step 4: Extract entities and relationships from each text block within each time segment;
[0054] Step 5: Perform entity fusion and relation merging on the extracted entities and relations;
[0055] Step 6: Based on the entities and relationships after entity fusion and relationship merging, bind a specific time point or time interval to each entity and relationship. ;
[0056] Step 7: Based on the binding of a specific time point or time interval The entities and relationships are then used to obtain the description of each entity in different time segments. In other words, sequential knowledge;
[0057] Step 8: Construct a temporal knowledge graph using the temporal knowledge corresponding to all entities.
[0058] Furthermore, the final score is expressed as:
[0059]
[0060] in, To query the similarity between a knowledge fragment and a semantic space, To measure how well the knowledge fragment matches the current query time conditions, This is the weighting adjustment coefficient.
[0061] Furthermore, the dynamically updated long-term document data includes business reports, annual reports, operation records, and meeting minutes.
[0062] The beneficial effects of this invention are:
[0063] This application introduces a dynamic temporal knowledge graph modeling and hierarchical interactive retrieval mechanism. In the knowledge construction phase, this framework binds entities and relationships to specific timestamps through time annotation, forming a dynamic graph that evolves over time. In the retrieval phase, it decomposes complex queries with multiple time constraints into single-time subqueries, and then uses a three-layer interactive retrieval system (temporal subgraph retrieval, node-level retrieval, and knowledge-level retrieval) to progressively filter relevant knowledge, reducing time conflicts and redundant interference, ultimately generating context-consistent and time-accurate answers. Attached Figure Description
[0064] Figure 1 This forms the overall framework of the application;
[0065] Figure 2 A pseudocode diagram of T-GRAG;
[0066] Figure 3 This is a schematic diagram illustrating the experimental results of this application in the document question-answering dataset Time-LongQA. Detailed Implementation
[0067] It should be noted that, where there is no conflict, the various embodiments disclosed in this application can be combined with each other.
[0068] Specific Implementation Method 1: The knowledge intelligent parsing and question answering method based on time-series knowledge graph retrieval enhancement described in this implementation method includes the following steps:
[0069] Step 1: Receive user queries involving multiple time points or time intervals, and break down the user queries into multiple single-time subqueries through time semantic parsing and decomposition strategies, with each subquery corresponding to a single time condition;
[0070] Step 2: For each subquery, use a time-series knowledge graph to obtain the corresponding time subgraph. ;
[0071] Step 3: Based on each subquery, obtain the query vector and acquire the time subgraph. The semantic vector of each node is calculated, and then the similarity between the query vector and the semantic vectors of each node is calculated. ;
[0072] Step 4: Sort the similarity scores of all nodes, and select nodes with the highest similarity scores from the sorted list to the lowest based on a set threshold, thus forming a candidate set. ;
[0073] Step 5: For the candidate set Each candidate node Perform the operation to obtain the set of internal knowledge fragments of the node, and then process each internal knowledge fragment in the set. Vector embedding encoding is performed, and then the semantic similarity of each internal knowledge fragment after vector embedding encoding is calculated with the query vector. Finally, the final score is generated by combining the context matching weight.
[0074] Step 6: Sort the final scores corresponding to all internal knowledge fragments, and select the top-ranked knowledge fragments from the sorted results based on the threshold as the final search results;
[0075] Step 7: Obtain the entity nodes and their relationships corresponding to the final search results, and input the entity nodes and their relationships corresponding to the final search results, as well as the final search results and their source text block references, into the large language model to obtain the answer output by the large language model;
[0076] Step 8: Aggregate the answers output by the large language model from all subqueries to obtain the final comprehensive answer.
[0077] S1. Construction of Temporal Knowledge Graph
[0078] This section describes the complete process, structural design, and key mechanisms of the "Temporal Knowledge Graph Construction" module in this application. The goal is to transform long-term knowledge that evolves across time into a searchable graph with explicit timestamps, enabling subsequent retrieval and generation to distinguish factual states at different times and avoid temporal confusion and knowledge conflicts. This module includes temporal data segmentation, text block preprocessing, temporal entity and relation extraction, temporal attribute annotation, incremental graph update, and storage modeling, as detailed below.
[0079] S11. Temporal Corpus Segmentation and Standardization
[0080] S111. The system first receives long-term document data sources that are dynamically updated. Typical sources are business reports, annual reports, operation records, meeting minutes, etc., generated by year or period. Such corpus naturally reflects the changes in entity attributes in different years or stages. For example, financial indicators, output, organizational structure, etc. will change year by year.
[0081] S112. The system divides the original corpus (long-term document data source) into multiple time segment sets according to the time dimension, thus obtaining a time-series knowledge base. Each of them Corresponding to a specific point in time or time interval (For example, "2022" and "2023").
[0082] S113. To facilitate subsequent extraction and indexing, each time slice It will be further divided into several fixed-size text blocks. Each text block maintains local semantic integrity and serves as the basic processing unit for subsequent entity extraction and relation extraction.
[0083] S12, Entity and Relation Extraction
[0084] S121. For each text block within each time segment, the system calls the large language model to perform structured information extraction, extracting: (1) Entity list. This includes the entity name, entity type (such as company, department, product, indicator, person in charge, etc.), and the description of the entity in that time segment. (2) Relationship list. This includes the relationship types between entities (such as "affiliation", "production indicator attribution", "financial indicator corresponding entity", "change in responsibility", etc.) and the natural language description of the relationship.
[0085] S122. In this application, an entity is not only a name, but also contains factual knowledge recorded in natural language. These knowledge fragments (attribute descriptions, status descriptions, indicator values, responsibility statements, etc.) are regarded as semantic carriers of entities or relations, and will subsequently participate in vectorization and retrieval as searchable knowledge units.
[0086] S123. Since multiple duplicate descriptions of the same entity may appear within the same time slice, the system performs entity fusion (merging of names and synonyms) and relation merging after extraction to ensure that the same entity at the same time point forms a single node in the graph, rather than multiple duplicate nodes. This reduces redundancy within a single time slice.
[0087] S13, Time Attribute Labeling
[0088] S131. The system explicitly binds a time attribute to each extracted entity node and each relation edge. In other words, an entity is not a timeless "static node," but rather "a node that exists in time." The attribute content of the "entity under" only represents the knowledge status that is valid at that point in time.
[0089] S132. For descriptions of the same entity in different time slices, the system will not simply overlay them into the same node, but will distinguish them as node versions of different time states. For example, it can be represented as:
[0090]
[0091] in, Representing entities In time set All the time-series knowledge below, For the entity at a specific time A knowledge description (such as "delivery volume in 2022 was X" or "responsible person was changed to Y in 2023") is used to strictly separate facts of different years and different states over time.
[0092] S14. Generation of Time-Series Knowledge Graph
[0093] Based on the above extraction results, the system constructs a temporal knowledge graph TG = (E, R). Here, E is the set of entity nodes, each node storing a set of attributed knowledge fragments of that entity at a specified time point; R is the set of relation edges, each edge not only representing the connection between two entities at that time point or within that time interval, but also retaining the semantic description text of that connection and binding it with a time attribute. Each node and edge in the graph can be traced back to its source text block. The system retains this "reverse index" mapping for subsequent source text backtracking and credible support extraction, providing verifiable evidence sources for the answer generation stage. This temporal knowledge graph is not a one-time static construction, but rather incrementally expandable. As a new time slice is introduced, the system parses the text block of that time slice and extracts new entities, relations, and attributes, adding new temporal nodes or expanding the time attribute set for existing entities, and adding new nodes and edges for newly appearing entities or relations. Simultaneously, the system ensures that the historical descriptions of old time slices are not overwritten or tampered with, but are saved alongside the new states, thus forming a traceable knowledge evolution trajectory. The resulting graph is a knowledge network structure that grows dynamically over time, rather than a static stack of text.
[0094] S2, Time Query Decomposition
[0095] After receiving a user query, the system identifies the time constraints in the query statement. When the query involves multiple time points or time intervals, it uses a time semantic parsing and decomposition strategy to break down complex time queries into multiple single-time subqueries, each corresponding to a single time condition. This step significantly reduces the complexity of temporal reasoning and avoids interference from the mixing of different time facts.
[0096] S3, Three-layer interactive retrieval mechanism
[0097] This application's three-layer interactive retrieval mechanism enables high-precision, time-sensitive, and semantically relevant multi-level retrieval within temporal knowledge graphs. Traditional RAG systems often rely on static semantic similarity matching during the retrieval phase, lacking modeling of temporal attributes and hierarchical relationships, which can easily lead to temporal conflicts or semantic dilution. This application, through a three-layer collaborative design of "temporal subgraph retrieval layer—node-level retrieval layer—knowledge-level retrieval layer," optimizes the entire process from time-constrained screening to semantic precision checking, ensuring that retrieval results are not only consistent with temporal logic but also possess content relevance and interpretability.
[0098] S31, Temporal Subgraph Retrieval Layer
[0099] S311, Upon receiving a user query Then, the system first parses the time constraint information in the query statement and extracts the explicit time (such as "2023" or "last quarter") or the implicit time (such as "latest" or "last year").
[0100] S322. The system locates the time subgraph corresponding to the time constraint in the time-series knowledge graph TG=(E,R). It retains nodes and edges whose timestamp attributes match the query time, removes data from other time segments, and constructs a time-consistent retrieval context.
[0101] S323. For queries involving a time span (such as "the trend of change from 2022 to 2024"), the system will extract a continuous time subgraph sequence. .
[0102] S32, Node-level retrieval layer
[0103] Within a limited time subgraph Internally, the system uses a vector embedding model to calculate the similarity between the query vector and the semantic vectors of each node.
[0104] The system sorts nodes based on similarity and selects the top 10-20 nodes to form a candidate set. This provides contextual constraints for subsequent knowledge-level retrieval stages. The mechanism achieves joint filtering through semantic matching and structural reasoning, ensuring that retrieval results are not only semantically relevant but also cover the key entities of the query target and their local reasoning paths, thereby improving the overall accuracy and interpretability of the retrieval.
[0105] S33, Knowledge-level Retrieval Layer
[0106] In the knowledge-level retrieval layer, the system targets the candidate set. Each candidate node , within its internal collection of knowledge fragments Perform fine-grained retrieval on each knowledge fragment. After vector embedding encoding, precise semantic similarity is calculated between the vector and the query vector, and the final score is generated by combining the context matching weights.
[0107]
[0108] in, This indicates the similarity between the query and the knowledge fragment in the semantic space. The strength of the node's contextual relationship and its temporal consistency are jointly determined, and it is used to measure how well the knowledge fragment fits the current query time conditions. This is the weighting adjustment coefficient. The system sorts all knowledge segments according to their scores and selects the top-scoring segments. As the final search result, it includes a reference to the corresponding source text block and a time stamp, enabling backtracking and temporal consistency verification of the results. This layer ensures that the retrieved content is semantically most relevant, accurate in the temporal dimension, and logically consistent with the context, thus providing high-confidence temporal knowledge support for subsequent generation stages.
[0109] S34. Output of search results
[0110] Ultimately, the system outputs the following search results: ② key entity nodes (containing relevant knowledge fragments) and their relationships; ③ final search results (knowledge fragments). (and its source text citations). These results will serve as input to subsequent enhancement and generation modules, providing a clear inference chain and reliable data support for the large language model.
[0111] S5, Enhanced Generation Module
[0112] The system inputs the retrieved time subgraph, valid node knowledge, and source text into a large language model. Through a context-enhanced generation mechanism, it outputs a time-accurate, semantically coherent, and interpretable answer. For tasks containing multiple time subqueries, the results are aggregated to generate a final comprehensive answer.
[0113] Example
[0114] I. Software Installation and Environment Configuration
[0115] This embodiment uses the Time-LongQA dataset as experimental samples to verify the performance of this application in time-series question answering and dynamic knowledge parsing tasks. The system is built on a Conda virtual environment based on Python 3.10, and the core framework is T-GraphRAG (Temporal GraphRAG).
[0116] The necessary dependency libraries can be installed using the following commands:
[0117] pip install openai
[0118] pip install sentence-transformers
[0119] install networkx with pip
[0120] pip install numpy
[0121] install pandas with pip
[0122] pip install tiktoken
[0123] pip install nano-vectordb
[0124] install PyMuPDF with pip
[0125] install magic-pdf[full] with pip
[0126] Among them, `magic-pdf` is the MinerU ontology.
[0127] magic-pdf is a dependency of the MinerU tool, used to parse long documents containing time tags. For local deployment of the embedding model, sentence-transformers / all-MiniLM-L6-v2 is recommended as the text embedding model, and stella-en-1.5B-v5 can be used for high-dimensional semantic embedding. The model can be downloaded from the ModelScope platform.
[0128] install modelscope with pip
[0129] modelscope download --model sentence-transformers / stella-en-1.5B-v5
[0130] All embedded model parameter configurations are stored in the ` / tgrag / parameter.py` file, including the local embedded model storage path and model API settings.
[0131] II. Configuration Parameter Description
[0132] `mineru_dir`: The directory where MinerU processes documents. It can be used to store the document results obtained from MinerU analysis during testing.
[0133] QueryParam parameter configuration:
[0134] top_k: Number of node-level search candidates (default 10).
[0135] alpha: The weighting coefficient for semantic and structural fusion (default 0.6).
[0136] beta: The semantic and contextual temporal consistency balance coefficient in knowledge-level retrieval (default 0.7).
[0137] time_window: The tolerance range for deviation in time subplot matching (default ±6 months).
[0138] response_type: Output mode (explanatory, trend, factual).
[0139] global_merge: Enables the module for aggregating results across multiple time periods (default is True).
[0140] III. User Guide
[0141] After configuration, you can run the example test script `tgrag_test.py` to verify the process. An example of how to use it is as follows:
[0142] Python
[0143] Example of use
[0144] python tgrag_test.py --input_path="path / to / timelongqa_sample.pdf" \
[0145] --working_dir="path / to / output" \
[0146] --question="What are the investment trends in renewable energy in China from 2019 to 2023?"
[0147] --input_mode=2 --query_mode=True
[0148] `input_mode=2` sets the PDF document parsing mode for MinerU, and `query_mode=True` enables the time-series question-and-answer mode. The system automatically identifies the time range of the question, extracts relevant time-slice knowledge, and generates trend analysis answers.
[0149] The above process design ensures the flexibility and scalability of the document intelligent parsing and question-answering system. Combined with different input types and system configurations, it can adapt to diverse and complex document understanding and question-answering needs.
[0150] The validity of this application is demonstrated by experimental results, as shown below. Figure 3 As shown.
[0151] Temporal Information Modeling and Reasoning Capabilities: Compared to traditional GraphRAG methods, relying solely on static knowledge graphs cannot reflect the changing trends of knowledge over time, easily leading to cross-temporal fact confusion and temporal reasoning errors. The T-GraphRAG system proposed in this application achieves dynamic evolutionary descriptions of entities, relationships, and attributes by introducing timestamp annotation and time-slice modeling. Experimental results on the Time-LongQA dataset show that this application improves accuracy by approximately 13% in time-sensitive question answering, significantly enhancing the system's parsing and reasoning capabilities for time-span questions (such as "the changing trend of an event across different years").
[0152] Temporal Knowledge Fusion and Retrieval Enhancement: In long-duration text tasks, traditional RAG systems struggle to balance temporal constraints and semantic accuracy. This application employs a three-layer interactive retrieval mechanism (temporal subgraph retrieval, node-level retrieval, and knowledge-level retrieval) to achieve multi-layer semantic alignment while maintaining temporal consistency. Experimental results show that T-GraphRAG improves the accuracy of answering plain text questions on the Time-LongQA dataset by approximately 11% compared to GraphRAG, demonstrating that the semantic fusion mechanism under time constraints can effectively improve the accuracy and stability of temporal question answering.
[0153] Time Evolution Tracking and Multi-Stage Response Capability: For trend-related questions involving multiple time periods, the enhanced generation module in this application, through time subgraph aggregation and global generation mechanisms, can output comprehensive answers that include time node comparisons, event evolution descriptions, and causal reasoning chains. In Time-LongQA questions involving multi-stage changes (such as policies, economic indicators, etc.), T-GraphRAG outperforms the baseline RAG method by approximately 17% in reasoning consistency scores, achieving interpretable reasoning and trend summarization for complex temporal relationships.
[0154] The system parameters are as follows. To verify the validity of this application and eliminate model bias, several large language models were selected as benchmarks in the experiment, including the single-modal models Llama3.1-70B-Instruc, Qwen2.5-72B-Instruct, and LLaMA-3.1-Nemotron-70B-Instruct-HF. All models were compared under the same dataset and retrieval parameters. The main comparison methods include...
[0155] To make an effective comparison, the following methods were selected:
[0156] LLM: Directly input Time-LongQA sample text and questions into LLM for question and answer. When the content exceeds the context window, ask questions in segments and then concatenate the results.
[0157] NaiveRAG: Divide the text into blocks of a fixed number of tokens (500) and perform embedding retrieval. Select the most relevant text blocks and input them together with the question to generate the answer using LLM.
[0158] GraphRAG: A modified version of Microsoft's open-source GraphRAG, removing the community clustering part and using local mode for retrieval. It sets top-k=10, the maximum text length to 6000 tokens, and the other parameters are the same as T-GraphRAG.
[0159] Experimental results show that T-GraphRAG performs well in time-series question answering, evolutionary trend analysis, and time-constrained knowledge retrieval tasks, and has strong time awareness and interpretability.
[0160] Existing RAG and GraphRAG systems are primarily designed for static textual knowledge and lack the ability to model knowledge evolution, making them ill-suited for time-dependent application scenarios such as corporate annual report analysis, historical event tracing, or technology iteration trend reasoning. With the development of time-aware knowledge graphs and dynamic RAG technologies, capturing the temporal evolution characteristics of knowledge while maintaining efficient retrieval has become a key direction for further improvement in intelligent question answering and knowledge augmentation generation systems.
[0161] This application's system adopts a modular design, functionally layering and decoupling the temporal knowledge graph construction module, interactive retrieval module, and enhancement generation module, thus enabling the overall system to possess good scalability and maintainability. The temporal knowledge graph construction module is responsible for performing time-segmented parsing and entity relation extraction on knowledge sources, forming a knowledge graph with time attributes. The retrieval module conducts multi-level retrieval based on time constraints and graph structure, ensuring time accuracy and semantic relevance. The enhancement generation module combines time subgraphs, key nodes, and source text information, outputting logically coherent, time-consistent, and interpretable answers through a context enhancement mechanism. Experimental results show that this application has significant advantages in tasks such as cross-time question answering, trend reasoning, and evolutionary knowledge analysis. While maintaining high accuracy, it achieves the tracking and visualization of the knowledge evolution process, providing an efficient and reliable technical solution for the development of dynamic knowledge parsing and intelligent question answering systems.
[0162] It should be noted that the specific embodiments are merely explanations and illustrations of the technical solution of the present invention and should not be used to limit the scope of protection. Any modifications made in accordance with the claims and specification of the present invention that are only partial should still fall within the protection scope of the present invention.
Claims
1. A method for retrieving enhanced knowledge intelligent analysis and question answering based on a time sequence knowledge graph, characterized in that Comprise the following steps: Step one: receiving a user query involving multiple time points or time intervals, and through time semantic analysis and decomposition strategy, the user query is broken down into multiple single time subqueries, each subquery corresponds to a single time condition; Step two: For each subquery, use the time knowledge graph to get the time subgraph corresponding to each subquery ; Step three: get query vector based on each subquery, and get time subgraph The semantic vector of each node, and then calculate the similarity between the query vector and the semantic vector of each node ; Step four: sort the similarity of all node pairs, and select the node pairs corresponding to the similarity from high to low in the sorting according to the set threshold, to form a candidate set ; Step five: for each candidate node in the candidate set Step four: for each internal knowledge fragment in the internal knowledge fragment set of the node Step three: for each node in the knowledge graph Step two: for each node in the knowledge graph, perform vector embedding encoding, and then perform semantic similarity calculation on each internal knowledge fragment after vector embedding encoding and the query vector, and generate a final score in combination with the context matching weight; Step six: sort the final scores of all internal knowledge segments, and select the top ranked knowledge segments as the final retrieval results according to the threshold value; Step seven: obtain the entity nodes and their relationships corresponding to the final retrieval results, and input the entity nodes and their relationships corresponding to the final retrieval results, the final retrieval results and their source text block references into a large language model to obtain the answers output by the large language model; Step eight: aggregate the answers output by the large language model of all subqueries to obtain the final comprehensive answer.
2. The knowledge intelligent analysis and question answering method based on the timing knowledge graph retrieval enhancement according to claim 1, characterized in that The specific steps of step two are: Step two one: for each subquery, analyze the time constraint information in the query statement, which includes explicit time and implicit time; Step two two: determine whether the subquery is a time point query or a time interval query, if it is a time point query, execute step two three, if it is a time interval query, execute step two four; Step two three: determine the time subgraph corresponding to each time point query in the time knowledge graph ; Step two four: determine a continuous time subgraph sequence corresponding to the time constraint in the time sequence knowledge graph, and split the continuous time subgraph sequence into multiple time subgraphs . 3.The knowledge intelligent analysis and question-answering method based on the time-series knowledge graph retrieval enhancement of claim 1, characterized in that The time sequence knowledge graph is obtained by the following steps: Step 1: obtain long-term document data containing dynamic updates, i.e. original corpus; Step 2: divide the original corpus into multiple time segments according to the time dimension, and then obtain a time sequence knowledge base wherein each corresponds to an explicit time point or time interval , =1,2,... ; Step 3: divide each time slice into several fixed-size text blocks; Step 4: extract entities and relationships for each text block within each time segment; Step 5: perform entity fusion and relationship merging on the extracted entities and relationships; Step 6: Based on the processed entities and relations after entity fusion and relation merging, bind the corresponding explicit time points or time intervals for each entity and relation ; Step 7: Binding explicit time points or time intervals based on entities and relations, obtaining a description of each entity in different time slices i.e. temporalized knowledge; Step 8: construct a time sequence knowledge graph using all entities corresponding to the time sequence knowledge. 4.The knowledge intelligent analysis and question-answering method based on the time-series knowledge graph retrieval enhancement of claim 1, characterized in that The final score is represented as: wherein, is a query similarity to a knowledge piece in a semantic space, is a measure of the fit of the knowledge piece to the current query temporal condition, is a weight adjustment coefficient. 5.The knowledge intelligent analysis and question-answering method based on the time-series knowledge graph retrieval enhancement of claim 1, wherein The long-term document data containing dynamic updates includes business reports, annual reports, operation records, and meeting minutes.
6. The enhanced knowledge intelligent analysis and question answering system based on the time sequence knowledge graph, characterized in that The system includes a user query splitting module, a retrieval module, and a question and answer module; The user query splitting module specifically executes the following steps: Step A: receiving a user query involving multiple time points or time intervals, and through time semantic analysis and decomposition strategy, the user query is broken down into multiple single time subqueries, each subquery corresponds to a single time condition; Step B: For each subquery, use the time knowledge graph to obtain the time subgraph corresponding to each subquery ; The retrieval module specifically executes the following steps: Step C1: get query vector based on each subquery, and get time subgraph the semantic vector of each node, and then calculate the similarity between the query vector and the semantic vector of each node ; Step C2: Sort the similarity of all node pairs, and select the node pairs corresponding to the similarity from high to low in the sorting according to the set threshold to form a candidate set ; Step C3: for each candidate set each candidate node is performed to obtain a set of internal knowledge fragments of the node, and each internal knowledge fragment in the set is is performed, and then semantic similarity calculation is performed between each internal knowledge fragment after vector embedding encoding and the query vector, and a final score is generated in combination with the context matching weight; Step C4: sort the final scores of all internal knowledge segments, and select the top ranked knowledge segments as the final retrieval results according to the threshold value; The question and answer module specifically executes the following steps: Obtain the entity nodes and their relationships corresponding to the final retrieval results, and input the entity nodes and their relationships corresponding to the final retrieval results, the final retrieval results and their source text block references into a large language model to obtain the answers output by the large language model, aggregate the answers output by the large language model of all subqueries to obtain the final comprehensive answer. 7.The knowledge intelligent analysis and question-answering system based on the time-series knowledge graph retrieval enhancement of claim 6, wherein The specific steps of step B are: Step B1: for each subquery, analyze the time constraint information in the query statement, which includes explicit time and implicit time; Step B2: determine whether the subquery is a time point query or a time interval query, if it is a time point query, execute step B3, if it is a time interval query, execute step B4; Step B3: determining a time subgraph corresponding to each time point query in the time knowledge graph ; Step B4: determining a sequence of continuous time sub-graphs corresponding to the time constraint in the temporal knowledge graph, and splitting the sequence of continuous time sub-graphs into multiple time sub-graphs . 8.The knowledge intelligent analysis and question-answering system based on the time-series knowledge graph retrieval enhancement of claim 6, wherein The time sequence knowledge graph is obtained by the following steps: Step 1: Obtain long-term document data containing dynamic updates, i.e., original corpus; Step 2: divide the original corpus into multiple time segments according to the time dimension, and then obtain a time sequence knowledge base wherein each corresponds to an explicit time point or time interval , =1,2,... ; Step 3: divide each time slice into several fixed-size text blocks; Step 4: Perform entity and relationship extraction on each text block within each time slice; Step 5: Perform entity fusion and relationship merging processing on the extracted entities and relationships; Step 6: Based on the processed entities and relations after entity fusion and relation merging, bind the corresponding explicit time points or time intervals for each entity and relation ; Step 7: Binding explicit time points or time intervals based on entities and relations, resulting in a description of each entity in different time slices i.e. temporalized knowledge; Step 8: Construct a time-series knowledge graph using the time-series knowledge corresponding to all entities. 9.The knowledge intelligent analysis and question-answering system based on the time-series knowledge graph retrieval enhancement of claim 6, wherein The final score is represented as: wherein, is the similarity of the query to the knowledge piece in the semantic space, is the degree of fit of the knowledge piece to the current query temporal condition, is the weight adjustment coefficient. 10.The knowledge intelligent analysis and question-answering system based on the time-series knowledge graph retrieval enhancement of claim 6, wherein The long-term document data containing dynamic updates includes business reports, annual reports, operation records, and meeting minutes.
Citation Information
Patent Citations
Document intelligent analysis and question-answering method and system based on RAG and multi-modal knowledge graph
CN120705275A
Cited By
Geological data intelligent question and answer method based on GraphRAG
CN121882289A
GraphRAG-based intelligent question-answering method for geological data
CN121882289B
