A time sequence event question answering method based on structured subgraph retrieval

By employing structured subgraph retrieval and adaptive generation techniques, the accuracy issues of event structure and time constraints in time-series event question answering are resolved, improving the accuracy and stability of question answering and making it suitable for plug-and-play applications of various large language models.

CN122432275APending Publication Date: 2026-07-21NANKAI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NANKAI UNIV
Filing Date
2026-03-11
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing question-answering methods for time-series events are prone to factual errors or temporal sequence confusion when faced with tasks that involve frequent knowledge updates and strict time constraints. Furthermore, the input length limitations of large language models lead to the loss of key information, resulting in insufficient accuracy and stability in question-answering.

Method used

A structured subgraph retrieval-based method is adopted. By obtaining background information of time-series event question-answering requests, extracting event structure constraints and time constraints, filtering relevant event subgraphs from the time-series knowledge graph, and performing adaptive retrieval and generation, the accuracy and completeness of event subgraphs are ensured.

Benefits of technology

It significantly improves the accuracy and stability of time-series question answering, reduces interference from irrelevant information, overcomes the input limitations of large language models, and has high versatility and low deployment cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122432275A_ABST
    Figure CN122432275A_ABST
Patent Text Reader

Abstract

The application relates to the field of artificial intelligence and knowledge graph, and discloses a time sequence event question and answer method based on structured subgraph retrieval, which comprises the following steps: performing text retrieval on event facts to obtain background information according to a question and answer request; analyzing the request in combination with the background information, extracting corresponding event structure constraints and time constraints; strictly screening event facts from a time sequence knowledge graph according to the constraints, and constructing an event subgraph with time attributes; performing adaptive retrieval generation on the subgraph, uniformly compressing along the time dimension or supplementing knowledge by using text retrieval, and obtaining a final subgraph after adaptive processing; and generating a time sequence question and answer result based on the subgraph. The application retains the structure and time constraints of the time sequence graph, overcomes the input length limitation of the model, and can significantly improve the question and answer accuracy and stability without fine-tuning the model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of artificial intelligence and knowledge graph technology, and in particular to a time-series event question-answering method based on structured subgraph retrieval. Background Technology

[0002] With the development of artificial intelligence technology, natural language-based question understanding and answering technologies have been widely applied in information retrieval, knowledge management, and intelligent decision-making. In recent years, Large Language Models (LLMs) have demonstrated excellent performance in open-domain question answering and complex semantic reasoning tasks due to their powerful natural language understanding and generation capabilities. However, existing large language models mainly rely on large-scale pre-training corpora, and their internal knowledge is static and uncontrollable. When faced with tasks that require frequent knowledge updates and strict time constraints, they are prone to factual errors or temporal inconsistencies.

[0003] To improve the reliability of large language models in knowledge-intensive tasks, combining external knowledge for reasoning has become an important research direction. Among these, knowledge graph-based question answering methods can store entity, relation, and temporal information in a structured form, providing clear factual support for complex reasoning. Especially in time-series event question answering scenarios, knowledge is usually organized in the form of "event-relationship-time." The question answering process not only needs to understand the semantic relationships between events but also needs to accurately characterize the temporal order and time interval of events.

[0004] Many existing time-series question-answering methods linearize facts from a knowledge graph into text, then perform retrieval based on text similarity, and input the retrieval results into a large language model for inference. While this approach is simple to implement, it has significant drawbacks: First, the textification process weakens the original structural and temporal constraints of the knowledge graph, leading to confusion of event roles or disruption of chronological order; second, similarity-based retrieval methods struggle to strictly distinguish between events that are "semantically similar but temporally or structurally unrelated," easily introducing a large amount of irrelevant facts, thereby increasing inference noise and reducing question-answering accuracy.

[0005] Furthermore, in time-series question answering, related events are often distributed along the timeline, and the number of events can be large. Directly inputting all related events into a large language model would be limited by the model's input length, while simple input truncation strategies are prone to missing key time node events and affecting the accuracy of question answering. Therefore, how to efficiently filter and organize key event information from time-series knowledge graphs while ensuring the accuracy of event structure relationships and time constraints remains a problem that urgently needs to be solved in existing technologies. Summary of the Invention

[0006] This invention aims to at least solve one of the technical problems existing in related technologies. To this end, this invention provides a time-series event question-answering method based on structured subgraph retrieval.

[0007] A time-series event question-answering method based on structured subgraph retrieval, comprising the following steps: Get the timing event Q&A request; For the time-series event question-and-answer request, text retrieval is performed on the event fact set of the time-series knowledge graph to obtain background information semantically related to the time-series event question-and-answer request; Based on the background information, the time-series event question-and-answer request is parsed to extract the event structure constraints and time constraints corresponding to the time-series event question-and-answer request, wherein the event structure constraints are used to limit the structural relationship between events, and the time constraints are used to limit the time range of the event occurrence. Based on the event structure constraints and the time constraints, event facts that meet the conditions are selected from the temporal knowledge graph, and an event subgraph related to the temporal event question and answer request is constructed. The event subgraph consists of multiple event facts with time attributes. Adaptive retrieval and generation are performed on the event subgraph to obtain an adaptively processed event subgraph; Based on the adaptively processed event subgraph, the time-series event question-and-answer result corresponding to the time-series event question-and-answer request is generated.

[0008] Furthermore, the step of performing text retrieval on the event fact set of the time-series knowledge graph to obtain background information semantically related to the time-series event question-answering request, in response to the time-series event question-answering request, includes: Each quadruple in the event fact set, containing a head entity, event relation, tail entity, and timestamp, is mapped to event fact text in natural language form; Calculate the semantic similarity between the time-series event question-and-answer request and the event fact text; The top n event facts with the highest semantic similarity are selected from the event fact set as the background information related to the semantics of the time-series event question-and-answer request, where n is the preset number of recommended input events.

[0009] Furthermore, the step of selecting the top n event facts with the highest semantic similarity from the set of event facts is expressed by the following text retrieval formula: in This represents the use of vector embedding models to compute the question-and-answer request text q and the factual text of a specific event. semantic similarity operations, Representative from the set of facts Select the n operations with the highest similarity.

[0010] Furthermore, the step of parsing the time-series event question-and-answer request in conjunction with the background information, and extracting the event structure constraints and time constraints corresponding to the time-series event question-and-answer request, includes: The time-series event question-and-answer request and the background information are used as input, and the large language model is used to parse them using prompt words; The large language model simultaneously outputs the event structure constraints and the time constraints corresponding to the time-series event question-and-answer request.

[0011] Furthermore, the event structure constraint is either an incomplete event triple or a complete event triple; The method further includes: mapping the event structure constraints returned by the large language model to the entity set or relation set of the temporal knowledge graph using strict text matching; When the entity and relation text returned by the large language model cannot be strictly matched with the entity set or relation set, the entity and relation text are semantically similar to the elements in the set to be mapped to the closest entity or relation. The time constraint is in the form of a time interval; the time interval form specifically includes a closed interval, a semi-open time interval, or no time interval. The method further includes: converting the time text returned by the large language model into a standard time format to ensure alignment with the timestamp format in the time-series knowledge graph; When the time text returned by the large language model cannot be converted into the standard time format, it is converted into an unknown time placeholder to ensure that the time interval is valid.

[0012] Further, the step of filtering event facts that meet the conditions from the temporal knowledge graph based on the event structure constraints and the time constraints, and constructing an event subgraph related to the temporal event question-and-answer request, includes: Using a deterministic filtering method, event facts that simultaneously satisfy the event structure constraints and the time constraints are defined as structured subgraph retrieval results; The event subgraph is composed of all event facts in the structured subgraph retrieval results; The event facts in the structured subgraph retrieval results are sorted from earliest to latest according to their timestamps in order to preserve the temporal evolution order of the events.

[0013] Further, the step of adaptively retrieving and generating the event subgraph to obtain the adaptively processed event subgraph includes: Obtain the number of event facts m contained in the event subgraph and the preset number of recommended input events n; when m is greater than n, use a time-series subgraph compression strategy to compress the event subgraph to obtain the adaptively processed event subgraph; When m is less than or equal to n, a retrieval fusion strategy is used to process the event subgraph to obtain the adaptively processed event subgraph.

[0014] Furthermore, the step of using a time-series subgraph compression strategy to compress the event subgraph includes: retaining the first and last event facts; uniformly sampling the event facts in the middle position to obtain the sampled event facts; and the retained first event facts, the last event facts, and the sampled event facts together constitute the adaptively processed event subgraph. The first event fact is the earliest event fact tagged; The last event fact is the event fact with the latest label.

[0015] Further, the step of processing the event subgraph using a retrieval fusion strategy to obtain the adaptively processed event subgraph includes: Select the first nm event facts from the background information that do not overlap with the event subgraph; expand the selected first nm event facts into the event subgraph to obtain the adaptively processed event subgraph.

[0016] Further, generating the time-series event question-and-answer result corresponding to the time-series event question-and-answer request based on the adaptively processed event subgraph includes: The adaptively processed event subgraph is linearized into contextual knowledge in text form according to the time sequence. The contextual knowledge, the sequential event question-and-answer request, the event structure constraints, and the time constraints are all input into the large language model; The corresponding time-series event question-and-answer results are generated by the large language model.

[0017] The above-described one or more technical solutions in the embodiments of the present invention have at least one of the following technical effects: By explicitly introducing structured and temporal constraints on events during the question-and-answer process, relevant event subgraphs can be accurately filtered from the temporal knowledge graph. This deterministic filtering naturally avoids problems such as event role confusion, relationship mismatch, or time boundary violations that are easily caused by traditional textual similarity retrieval. It effectively reduces interference from irrelevant information and improves the accuracy and anti-interference ability of temporal event question-and-answer.

[0018] To address the input context length limitations of large language models, this solution proposes a temporal subgraph compression strategy. This strategy effectively reduces the number of redundant events by retaining the first and last events and uniformly sampling the intermediate events. It avoids the problem that simple input truncation strategies can easily lead to the loss of key time nodes (such as "earliest" and "latest"), fully preserves the global evolution information of events, overcomes the input limitations of large models, and retains key temporal evolution patterns.

[0019] The solution proposes a retrieval fusion strategy. When structured parsing fails or the scale of the retrieved subgraph events is insufficient, it can adaptively utilize the preceding background information text retrieval results for fallback and expansion. This ensures that the question-answering model always has sufficient contextual knowledge support, enhancing the robustness and fault tolerance of the retrieval system.

[0020] This method requires no additional parameter fine-tuning or training of the large language model. It can adapt to different large language model applications by relying solely on the structured knowledge retrieval and adaptive organization at the front end, significantly reducing deployment costs and possessing extremely high versatility and "plug-and-play" characteristics.

[0021] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description

[0022] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0023] Figure 1 This is a schematic diagram of the overall framework of the time-series event question-answering method based on structured subgraph retrieval of the present invention.

[0024] Figure 2 This is a flowchart of the time-series event question-answering method based on structured subgraph retrieval according to the present invention. Detailed Implementation

[0025] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention. The following embodiments are used to illustrate this invention but cannot be used to limit the scope of this invention.

[0026] The purpose of this invention is to provide a time-series event question-answering method based on structured subgraph retrieval. By introducing structured constraints and time constraints in the question-answering process, the method accurately filters event subgraphs related to the question from the time-series knowledge graph and applies an adaptive retrieval generation strategy to the event subgraphs, thereby ensuring the integrity of relevant information and improving the accuracy and stability of time-series event question-answering.

[0027] Figure 1 and Figure 2 The main methods and processes of this invention are presented in general. This invention organically combines background information text retrieval, temporal question parsing, structured subgraph retrieval, and adaptive retrieval generation. While making full use of the semantic understanding capabilities of large language models, it explicitly preserves the structural and temporal constraints in the temporal knowledge graph, thereby effectively improving the accuracy and stability of temporal event question answering.

[0028] Step 1: Background Information Text Retrieval: For the input time-series event question-and-answer request, perform text retrieval on the event fact set to obtain background information related to the semantics of the time-series event question-and-answer request, which is used to help understand the event semantics and time clues involved in the question.

[0029] In this step, for the input time-series event question-answering request text q, we first start from the time-series knowledge graph. The set of all events and facts The system retrieves n background information items related to the semantics of q to assist in subsequent structured parsing and constraint extraction. Given a large language model input length limit of N event facts, the number of recommended events n in the input large language model is a random number between 10% and 15% of N. In a specific embodiment, the fact set... Each event fact in Each entity can be represented as a quadruple f = (h, r, t, τ) containing a head entity h, an event relation r, a tail entity t, and a timestamp τ. Both the head entity h and the tail entity t belong to the entity set. The event relation r belongs to the relation set. In order to perform semantic retrieval in the text space, the event facts are first textualized, mapping the quadruplets into a text sequence in natural language form. The textualization process can be defined as follows: Within the quotation marks, "h" represents the header entity name text, "r" represents the relation name text, and "in" is the natural text word "in". The natural text representation of the timestamp is ultimately concatenated with spaces to form natural text.

[0030] In a preferred embodiment, given a time-series event question-answering request, "Who first defeated Roger Federer in a major tournament between 2006 and 2008?", the event facts related to this question in the time-series knowledge graph can be represented in the form of quadruples, including (Rafael Nadal, defeated Roger Federer, 2006), (Novak Djokovic, defeated Roger Federer, 2007), and (Rafael Nadal, defeated Roger Federer, 2008), etc. These event facts can be further textualized, for example, mapped to natural language text forms such as "Rafael Nadal defeated Roger Federer in 2006" and "Novak Djokovic defeated Roger Federer in 2007," thereby facilitating semantic similarity calculation with the time-series event question-answering request in the text space to filter out the background information most relevant to the question.

[0031] Subsequently, semantic similarity is calculated between the input time-series event question-and-answer request and the textualized event facts. This semantic similarity can be achieved using a vector embedding model (such as the BGE-M3 model), but this embodiment does not limit the specific similarity calculation model or implementation method.

[0032] After completing the semantic similarity calculation, the top-scoring events are selected from all the event facts. These facts, as background information relevant to the question, are used in text retrieval. This can be formally represented as: in This represents the use of vector embedding models to compute the question-and-answer request text q and the factual text of a specific event. semantic similarity operations, Representative from the set of facts Select the n operations with the highest similarity.

[0033] It should be noted that the background information obtained in this step serves two purposes. First, it provides auxiliary information to support subsequent problem analysis and constraint extraction steps, offering semantic references for effective event structure constraints and time constraints in the problem, thereby reducing the analysis error rate. Second, the background information also serves as a retrieval candidate in the adaptive retrieval generation step, providing auxiliary knowledge when structured subgraph retrieval cannot provide sufficient relevant event entries.

[0034] Step 2, Problem Analysis and Constraint Extraction: Based on the background information, the time-series event question-and-answer request is analyzed, and the event structure constraints and time constraints corresponding to the question-and-answer request are extracted. The event structure constraints are used to limit the structural relationship between events, and the time constraints are used to limit the time range in which the events occur.

[0035] After obtaining the background information, the input time-series event question-and-answer request q is parsed to extract the event structure constraints and time constraints corresponding to the question. In one specific embodiment, this invention utilizes a large language model combined with background information to parse the question. The parsing process takes the request text q and the background information obtained in step 1 as input, and uses prompt words to guide the model to output a valid parsing result that is consistent with the graph.

[0036] Below are sample prompts for this process. In actual use, these can be expanded and modified according to specific needs.

[0037] You are a professional retrieval agent for Temporal Knowledge Graphs.Each TKG fact is a timestamped quadruple consisting of (head entity,relation, tail entity, date) . Your task is to analyze the given question together with a set of retrieved quadruples , determine what the question is asking for (an entity or a date), and rewrite the question into a clearer, retrieval-oriented form. Based on your reasoning, produce: 1. A target triple that captures what needs to be retrieved next. - Output this inside ` <fact> head entity; relation; tail entity< / fact> `. - If any component is unknown, replace it with `?`. 2. A time interval constraint for retrieval. - Output this inside ` <time> start_date; end_date< / time> `. - Use a closed interval. - If a boundary is unknown or cannot be inferred, use `?`. Examples: ... Input format: Question: {question} First, structural constraints are extracted from the problem to define the structural form of the events. These constraints can be incomplete event triples or complete event triples. Event Relationships Specifically, it is expressed as follows: In this formula, '?' represents an unknown placeholder, signifying the entity dimension and indicating an incomplete triplet structure constraint. Incomplete triples are used for entity-based question-answering questions, such as asking who initiated an action; complete triples are used for time-based question-answering questions, such as asking when a specific event occurred. For the structural constraints returned by the large language model, h, r, and t are mapped to entity sets using strict text matching. The specified entity or set of relations The specified relationship is defined within the set. When the large language model does not return strictly valid entity or relation text, it is semantically similar to the elements in the set to map it to the closest entity or relation. For example, for an invalid header entity h' parsed by the model, a valid relation header entity h can be obtained through the following process: Where e is the entity set entity elements in This represents the operation of calculating the semantic similarity between the two. The operation selects the entities with the highest semantic similarity, where h is represented as the entity set. The specified entity element that is semantically closest to h'.

[0038] Secondly, time constraints are extracted from the problem to limit the time frame in which the event occurs. These time constraints are uniformly represented as time intervals to cover various expressions of time in natural language, such as "in a certain year," "after a certain time," "before a certain time," and "when." Their formal representation is as follows: The time constraint is in the form of a time interval. , , or .

[0039] In this formula, the question mark (?) represents an unknown placeholder, reflecting the time dimension and indicating an incomplete time constraint. Constraints containing complete time intervals are used to limit time-related questions and answers, such as asking "in a certain year" for an event; constraints with semi-open event intervals are used for semi-open time-related questions and answers, such as asking "after a certain time" or "before a certain time" for an event; constraints without time intervals are used for time-based questions and answers, such as asking "when" a specified event occurred. For time constraints returned by the large language model, they are converted into a standard time format according to the returned time text, ensuring alignment with the timestamp format in the knowledge graph. When the large language model does not return strictly valid time text, it is converted into an unknown time placeholder (?) to ensure that the time interval remains valid.

[0040] In a preferred embodiment, for the question "Who first defeated Roger Federer in a major tournament between 2006 and 2008?", the time constraint can be resolved into a closed interval [2006, 2008] to limit the time range of candidate event facts. Simultaneously, the event structure constraint can be resolved into the form of... The structured form is used to define the event relationship type and tail entity.

[0041] In this embodiment, the event structure constraints and time constraints are obtained simultaneously in a single large language model parsing request, and their formal representation is as follows: The Parser is a large language model parsing request that requires the output of both structural and temporal constraints. By introducing background information during the parsing process, this step effectively avoids entity ambiguity or temporal parsing errors caused by relying solely on the question text, thus improving the accuracy of subsequent subgraph retrieval.

[0042] Step 3, Structured Subgraph Retrieval: Based on the event structure constraints and time constraints, select event facts that meet the conditions from the temporal knowledge graph, and construct an event subgraph related to the temporal event question and answer request. The event subgraph consists of multiple event facts with time attributes.

[0043] After obtaining the event structure constraints and time constraints, event facts that satisfy the constraints are selected from the temporal knowledge graph to construct an event subgraph related to the question. Unlike traditional similarity-based ranking retrieval methods, this step adopts a deterministic selection method based on constraints. Specifically, event facts that simultaneously satisfy both event structure constraints and time constraints are defined as structured subgraph retrieval results, formally represented as: in, This represents the event structure constraints extracted from the time-series event question-and-answer request. This indicates the corresponding time constraint. This indicates that the facts satisfy the corresponding constraints. In a specific embodiment, when the event structure constraint is... When the time constraint is a closed interval The subgraph retrieval results This can be specifically expressed as: Because this filtering process is based on explicit structural and temporal conditions, the resulting event subgraphs naturally avoid event facts with structural mismatches or out-of-time occurrences. To preserve the temporal evolution order of events, the event facts retrieved by the structured subgraph are sorted according to their timestamps. The final structured subgraph retrieval result should be a knowledge graph. The subgraph, i.e., the set of events retrieved, should be the knowledge graph event set. A subset of. Therefore, the range of the number of events m in structured subgraph retrieval is... ,in This represents the total number of events in the knowledge graph. Specifically, when m=0, it indicates errors in the structural and event constraints produced by the large language model, which need to be corrected in subsequent steps.

[0044] In one specific embodiment, when the event structure constraint is The time constraint is a closed interval. The event facts selected from the temporal knowledge graph include (Rafael Nadal, defeated Roger Federer, 2006), (Rafael Nadal, defeated Roger Federer, 2007), and (Rafael Nadal, defeated Roger Federer, 2008). These event facts collectively constitute an event subgraph related to the temporal event question-and-answer request. Because this selection process is based on explicit structural and time interval constraints, the resulting event subgraph naturally avoids event facts with mismatched relationships or time out-of-bounds occurrences. Furthermore, to preserve the evolutionary order of events along the timeline, the event facts in the event subgraph are sorted by timestamp from earliest to latest before being output, thus providing an ordered event foundation for subsequent "earliest" type temporal event question-and-answer sessions.

[0045] Step 4, Adaptive Retrieval Generation: Adaptive retrieval generation is performed on the event subgraph, compressing it along the time dimension to retain key event evolution information, or further supplementing retrieval knowledge using text retrieval.

[0046] In most question requests, the number of event facts *m* retrieved from the structured subgraph retrieval often does not match the number of recommended input events *n*. The retrieval results may exceed the context length limit of the question-answering model, preventing complete input, or the retrieval results may be too few to fully utilize the knowledge capacity of the context. Therefore, this invention further performs adaptive retrieval and generation processing on the event subgraph.

[0047] In one specific embodiment, suppose the sorted event subgraph contains m event facts, and the recommended number of input events is n. When the subgraph size exceeds the expected size (m>n), we adopt a time-series subgraph compression strategy, resulting in a compressed event subgraph set. It can be defined as: Among them, f i This represents the event fact at index i in the structured subgraph retrieval results. Index set This is constructed by retaining the first and last events and uniformly sampling the intermediate events, and is defined as follows: in The sampling strategy employs a floor function to ensure a uniform distribution of integer indices. When selecting indices, it consistently retains events with a starting index of 1 and an ending index of m, guaranteeing that subsequent inputs include key start and end state events and providing direct evidence for time-related questions such as "earliest" and "latest." Furthermore, the uniform sampling strategy preserves the temporal periodicity of the subgraph as much as possible, avoiding overly concentrated sampling results that could lead to the loss of global evolutionary information. Through this compression method, the temporal subgraph compression strategy effectively reduces the number of redundant events while preserving the overall time span and key evolutionary nodes, preventing the loss of important temporal information caused by simple truncation.

[0048] When the size of the subgraph does not exceed the expected number (m≤n), we employ a retrieval fusion strategy, utilizing background information to provide additional knowledge for the structural subgraph retrieval. Specifically, we select the first nm event facts from the non-repeating background information text retrieval results to expand the subgraph retrieval results. The set of event subgraphs after fusion retrieval. It can be defined as: Here, "Top" represents selecting events with the highest semantic similarity from the background information and excluding events present in the subgraph retrieval. Through this retrieval fusion strategy, when the expected number of input events is sufficient, this invention allows the use of text retrieval to expand the retrieved knowledge. In special cases, when the large model's parsing problem fails and the subgraph retrieval does not return the expected results (i.e., m=0), the fusion retrieval strategy can downgrade the results to background information text retrieval results, ensuring the robustness of the retrieval framework.

[0049] Step 5: Generation of Temporal Event Questions and Answers: Based on the event subgraph generated by adaptive retrieval, the text is converted into contextual knowledge of the large language model to generate corresponding temporal event question and answer results.

[0050] After adaptive retrieval and generation, the fused event subgraph is used as a structured knowledge context and input into the question-answering model to generate the final time-series event question-answering result. In one specific embodiment, the retrieved event facts are linearized into text form according to chronological order, and this text, along with the original question, the parsed event structure constraints, and time constraints, is used as model input. The question-answering result can be an event entity, a time point, or a time interval; the specific form is not limited. The process of obtaining the final question-answering result (Answer) can be represented as follows: Here, LLM represents the large-scale question-answering process. The question-answering model generates one or more candidate answers based on the input and outputs the final answer. By adaptively retrieving the generated event subgraph from the input, it ensures that the question-answering model obtains the event fact information most relevant to the question request q. Furthermore, and As a result of question parsing, it includes the abstract extraction of information from the question, which helps the question answering model understand the source of the retrieval results and the implicit semantics of the question.

[0051] Table 1 compares the prediction results of the method proposed in this invention with other methods on MultiTQ data.

[0052] This paper demonstrates the prediction performance of the proposed method on the MultiTQ temporal event question answering dataset, and compares its performance with that of various existing temporal knowledge graph question answering methods. The best results are shown in bold, and the second-best results are shown in underlined text. Experimental results show that the proposed method achieves significant improvements over the current best-performing RTQA method in terms of Hit@1 and Hit@10 evaluation metrics. Specifically, it improves the overall Hit@1 metric by approximately 5.9%, with particularly significant improvements in multi-hop and entity prediction problems.

[0053] Table 1 Table 2 compares the prediction results of the method proposed in this invention with other methods on TimelineKGQA data.

[0054] Experimental results of the proposed method on the TimelineKGQA dataset are presented, with the best results shown in bold and the second-best results shown in underlined. This also demonstrates that in complex time-related problem scenarios, the proposed method achieves higher prediction accuracy compared to existing methods, further validating the universality and stability of the proposed method in different types of time-series question-answering tasks.

[0055] Table 2 The results demonstrate that by introducing steps such as background information acquisition, event relationship and time constraint parsing, structured subgraph retrieval, and time series compression, this invention can more accurately locate key events related to time-related issues, effectively reduce interference from irrelevant information, and thus significantly improve the accuracy of time-series event question answering. The above experimental results fully illustrate that the method proposed in this invention has excellent performance and practical value in complex time-series event question answering tasks.

[0056] This invention differs from existing technologies in that it does not limit itself to retrieving event facts based on text similarity and then having a question-answering model perform reasoning. Instead, it introduces a structured subgraph retrieval mechanism into the temporal event question-answering process. First, it parses the question-answering request using background information obtained from text retrieval, explicitly extracting structural and temporal constraints between events. Then, based on these constraints, it selects event facts that meet the conditions from the temporal knowledge graph to construct an event subgraph. Furthermore, it adaptively generates subgraphs according to their size, thereby supplementing additional retrieval knowledge while retaining key event evolution information. This allows the subsequent question-answering process to proceed within a more accurate and stable event context. Moreover, the method of this invention requires no additional parameter fine-tuning or training of the large language model; it achieves plug-and-play integration with different large language models simply through structured knowledge retrieval and organization.

[0057] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A time-series event question-answering method based on structured subgraph retrieval, characterized in that, The steps include, Get the timing event Q&A request; For the time-series event question-and-answer request, text retrieval is performed on the event fact set of the time-series knowledge graph to obtain background information semantically related to the time-series event question-and-answer request; Based on the background information, the time-series event question-and-answer request is parsed to extract the event structure constraints and time constraints corresponding to the time-series event question-and-answer request, wherein the event structure constraints are used to limit the structural relationship between events, and the time constraints are used to limit the time range of the event occurrence. Based on the event structure constraints and the time constraints, event facts that meet the conditions are selected from the temporal knowledge graph, and an event subgraph related to the temporal event question and answer request is constructed. The event subgraph consists of multiple event facts with time attributes. Adaptive retrieval and generation are performed on the event subgraph to obtain an adaptively processed event subgraph; Based on the adaptively processed event subgraph, the time-series event question-and-answer result corresponding to the time-series event question-and-answer request is generated.

2. The time-series event question-answering method based on structured subgraph retrieval according to claim 1, characterized in that, The steps for responding to the time-series event question-and-answer request include: performing text retrieval on the event fact set of the time-series knowledge graph to obtain background information semantically related to the time-series event question-and-answer request; Each quadruple in the event fact set, containing a head entity, event relation, tail entity, and timestamp, is mapped to event fact text in natural language form; Calculate the semantic similarity between the time-series event question-and-answer request and the event fact text; The top n event facts with the highest semantic similarity are selected from the event fact set as the background information related to the semantics of the time-series event question-and-answer request, where n is the preset number of recommended input events.

3. The time-series event question-answering method based on structured subgraph retrieval according to claim 2, characterized in that, The selection of the top n event facts with the highest semantic similarity from the set of event facts is expressed by the following text retrieval formula: in This represents the use of vector embedding models to compute the question-and-answer request text q and the factual text of a specific event. semantic similarity operations, Representative from the set of facts Select the n operations with the highest similarity.

4. The time-series event question-answering method based on structured subgraph retrieval according to claim 1, characterized in that, The steps of parsing the time-series event question-and-answer request based on the background information and extracting the event structure constraints and time constraints corresponding to the time-series event question-and-answer request include: The time-series event question-and-answer request and the background information are used as input, and the large language model is used to parse them using prompt words. The large language model simultaneously outputs the event structure constraints and the time constraints corresponding to the time-series event question-and-answer request.

5. The time-series event question-answering method based on structured subgraph retrieval according to claim 1, characterized in that, The event structure constraint is either an incomplete event triple or a complete event triple; The method further includes: mapping the event structure constraints returned by the large language model to the entity set or relation set of the temporal knowledge graph using strict text matching; When the entity and relation text returned by the large language model cannot be strictly matched with the entity set or relation set, the entity and relation text are semantically similar to the elements in the set to be mapped to the closest entity or relation. The time constraint is in the form of a time interval; the time interval form specifically includes a closed interval, a semi-open time interval, or no time interval. The method further includes: converting the time text returned by the large language model into a standard time format to ensure alignment with the timestamp format in the time-series knowledge graph; When the time text returned by the large language model cannot be converted into the standard time format, it is converted into an unknown time placeholder to ensure that the time interval is valid.

6. The time-series event question-answering method based on structured subgraph retrieval according to claim 1, characterized in that, The step of filtering event facts that meet the conditions from the temporal knowledge graph based on the event structure constraints and the time constraints, and constructing an event subgraph related to the temporal event question-and-answer request, includes: Using a deterministic filtering method, event facts that simultaneously satisfy the event structure constraints and the time constraints are defined as structured subgraph retrieval results; The event subgraph is composed of all event facts in the structured subgraph retrieval results; The event facts in the structured subgraph retrieval results are sorted from earliest to latest according to their timestamps in order to preserve the temporal evolution order of the events.

7. The time-series event question-answering method based on structured subgraph retrieval according to claim 1, characterized in that, The step of adaptively retrieving and generating the event subgraph to obtain the adaptively processed event subgraph includes: Obtain the number of event facts m contained in the event subgraph and the preset number of recommended input events n; when m is greater than n, use a time-series subgraph compression strategy to compress the event subgraph to obtain the adaptively processed event subgraph; When m is less than or equal to n, a retrieval fusion strategy is used to process the event subgraph to obtain the adaptively processed event subgraph.

8. The time-series event question-answering method based on structured subgraph retrieval according to claim 7, characterized in that, The step of compressing the event subgraph using a temporal subgraph compression strategy includes: retaining the first and last event facts; uniformly sampling the event facts in the middle position to obtain the sampled event facts; and the retained first event facts, the last event facts, and the sampled event facts together constitute the adaptively processed event subgraph. The first event fact is the earliest event fact tagged; The last event fact is the event fact with the latest label.

9. The time-series event question-answering method based on structured subgraph retrieval according to claim 7, characterized in that, The step of processing the event subgraph using a retrieval fusion strategy to obtain the adaptively processed event subgraph includes: Select the first nm event facts from the background information that do not overlap with the event subgraph; expand the selected first nm event facts into the event subgraph to obtain the adaptively processed event subgraph.

10. The time-series event question-answering method based on structured subgraph retrieval according to claim 1, characterized in that, The step of generating the time-series event question-and-answer result corresponding to the time-series event question-and-answer request based on the adaptively processed event subgraph includes: The adaptively processed event subgraph is linearized into contextual knowledge in text form according to the time sequence. The contextual knowledge, the sequential event question-and-answer request, the event structure constraints, and the time constraints are all input into the large language model; The corresponding time-series event question-and-answer results are generated by the large language model.