Time-aware knowledge graph retrieval method and device

By performing time parsing on the query text and time matching during knowledge graph retrieval, the problem of insufficient fusion of time and semantic information in existing technologies is solved, resulting in higher relevance and ranking accuracy of search results.

CN122309758APending Publication Date: 2026-06-30BEIJING FLOW ELEMENT TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-03-12
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively handle time constraints in query texts, especially relative and fuzzy time expressions in natural language. Furthermore, their ability to integrate time and semantic information is insufficient, resulting in inadequate relevance and ranking accuracy of search results in the time dimension.

Method used

By performing time parsing on the query text to determine the target time interval, and then performing time matching during the knowledge graph retrieval process to calculate the time score of candidate nodes, the results are combined and adjusted to achieve joint retrieval of semantic and time information.

Benefits of technology

It improves the relevance and ranking accuracy of search results in the time dimension, reduces the interference of time-irrelevant but semantically similar results, and enhances the overall effectiveness of search results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122309758A_ABST
    Figure CN122309758A_ABST
Patent Text Reader

Abstract

This invention discloses a time-aware knowledge graph retrieval method and apparatus. The method includes: performing time parsing processing on the acquired query text to obtain the target time interval of the query text; performing a retrieval operation on a pre-established knowledge graph based on the query text to obtain a target candidate pool; wherein the target candidate pool includes: multiple candidate knowledge graph nodes and their corresponding candidate node scores; performing time matching between each candidate knowledge graph node and the target time interval, and determining the time bonus value of each candidate knowledge graph node; superimposing each time bonus value onto the corresponding candidate node score to generate the target candidate node score of each candidate knowledge graph node, and obtaining the retrieval result. This invention can realize the fusion of parsing time information in the query text and retrieval with time constraints, improving the relevance and ranking accuracy of the retrieval results in the time dimension.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of information retrieval technology, and in particular to a time-aware knowledge graph retrieval method and apparatus. Background Technology

[0002] With the continuous development and application of knowledge graph retrieval technology and Retrieval-Augmented Generation (RAG) technology, user queries during information retrieval often contain not only semantic content but also explicit or implicit time constraints. For example, in applications such as legal information retrieval, enterprise management analysis, and data statistics, users may request queries such as "project progress last month" or "financial report last year." For such queries, the retrieval system not only needs to understand and match the semantic content of the query text but also needs to identify and parse the time expressions contained in the query, and achieve joint matching of the time and semantic dimensions in the search results to return information that simultaneously satisfies semantic relevance and time constraints. Therefore, how to effectively identify and process time expressions in natural language during semantic retrieval to improve the matching ability of search results in the time dimension has become a pressing technical problem that knowledge graph retrieval systems and RAG systems need to solve.

[0003] In existing technologies, one approach involves setting time metadata fields, such as creation or publication time, for documents or knowledge nodes in a vector database. When a user initiates a query, the data is filtered using pre-defined structured time conditions. Then, semantic retrieval and ranking based on vector similarity are performed on the candidate data set that meets the time conditions. Another approach involves constructing a time-aware knowledge graph embedding model. This model extends the triple structure in the knowledge graph into a representation that includes time information. During model training, the time information, along with entities and relationships, is embedded into a unified vector space, enabling the model to reflect the time constraints of knowledge relationships at the vector representation level.

[0004] However, the aforementioned existing technologies still have certain limitations. On the one hand, time-based retrieval methods typically require users to input time range conditions in a structured form, making it difficult to automatically parse relative or fuzzy time expressions in natural language queries. Furthermore, these methods often employ hard filtering strategies, directly excluding data outside the specified time range, even if it is semantically highly relevant to the query, thus failing to enter the candidate set and easily leading to false exclusion of search results, reducing retrieval effectiveness. On the other hand, time-aware knowledge graph embedding methods typically rely on offline training. When the time data in the knowledge graph is updated, the embedding model often needs to be retrained, making it difficult to meet the real-time update requirements of dynamic knowledge base environments. In addition, these methods usually couple time embedding with the semantic embedding of entities and relationships in the same vector space, resulting in a lack of independent adjustment mechanisms between time and semantic information, making it difficult to flexibly adjust the weights of the time and semantic dimensions according to actual retrieval needs.

[0005] This section is intended to provide background or context for the embodiments of the invention set forth in the claims. The description herein is not an admission that it is prior art simply because it is included in this section. Summary of the Invention

[0006] This invention provides a time-aware knowledge graph retrieval method to achieve the parsing of time information in query text and the fusion of time-constrained retrieval, thereby improving the relevance and ranking accuracy of retrieval results in the time dimension.

[0007] Time-aware knowledge graph retrieval methods include: The obtained query text is processed by time parsing to obtain the target time range of the query text; Based on the query text, a retrieval operation is performed in a pre-established knowledge graph to obtain a target candidate pool; wherein, the target candidate pool includes: multiple candidate knowledge graph nodes and their corresponding candidate node scores; The candidate knowledge graph nodes are matched with the target time interval, and the time bonus value of each candidate knowledge graph node is determined. The time-based bonus values ​​are added to the corresponding candidate node scores to generate the target candidate node scores for each candidate knowledge graph node, thus obtaining the retrieval results.

[0008] In some embodiments, the target time interval includes: a target start time and a target end time; the step of performing time parsing processing on the obtained query text to obtain the target time interval of the query text includes: Based on a preset time type, feature extraction is performed on the query text to obtain multiple time expressions; Convert each of the time expressions into the corresponding timestamp range; The target start time of the query text is determined based on the start time of each of the timestamp intervals; The target end time of the query text is determined based on the end time of each of the timestamp intervals.

[0009] In some embodiments, the method further includes: Confidence values ​​are assigned to each of the time expressions based on the time type to obtain the confidence values ​​corresponding to each of the time expressions; The target confidence value of the query text is determined based on the confidence value corresponding to each of the aforementioned time expressions.

[0010] In some embodiments, the steps of constructing the knowledge graph nodes include: Retrieve the document to be stored in the database; The text content of each document is subjected to time keyword detection; if the time keyword is detected, the text content is subjected to time parsing processing based on the anchor time to obtain the time information of each document; wherein, the time information includes: event start time, event end time, event confidence and event time expression; Determine whether the confidence level of the event is greater than a first preset threshold; if the confidence level of the event is greater than the first preset threshold, write the time information into the time field of the corresponding knowledge graph node.

[0011] In some embodiments, the step of performing a retrieval operation on a pre-established knowledge graph based on the query text to obtain a target candidate pool includes: Delete each of the time expressions from the query text to generate a time-free query text; Perform vector transformation on the time-deleted query text to obtain the query vector; If the target confidence value exceeds the second preset threshold, the target candidate pool capacity is determined based on the preset candidate pool capacity and the preset expansion factor.

[0012] Based on the target candidate pool capacity and the query vector, semantic retrieval is performed in a pre-established knowledge graph to obtain the target candidate pool.

[0013] In some embodiments, the step of matching each candidate knowledge graph node with the target time interval and determining the time bonus value of each candidate knowledge graph node includes: The temporal matching degree of each candidate knowledge graph node is determined based on the target time interval and the target confidence value. Based on the preset scoring coefficients and the time matching degree of each node, the time score of each candidate knowledge graph node is determined.

[0014] In some embodiments, the time matching degree includes: a first time matching degree; determining the time matching degree of each of the candidate knowledge graph nodes based on the target time interval and the target confidence value includes: If the candidate knowledge graph node contains the time field and the event start time and event end time therein match the target time interval, the time overlap and minimum time span are determined based on the target start time, the target end time, the event start time and the event end time. The overlapping time matching value is determined based on the time overlap, the minimum time span, the event confidence in the time field, and the preset time weight parameters. The first time matching degree is determined based on the overlapping time matching value and the target confidence value.

[0015] In some embodiments, the time matching degree includes: a second time matching degree; determining the time matching degree of each of the candidate knowledge graph nodes based on the target time interval and the target confidence value includes: If the time field is not present in the candidate knowledge graph node or the event start time and event end time do not match the target time interval, a creation time matching value is determined based on the creation time of the candidate knowledge graph node and the preset creation time weight. The second time matching degree is determined based on the creation time matching value and the target confidence value.

[0016] In some embodiments, the time matching degree includes: a third time matching degree; determining the time matching degree of each of the candidate knowledge graph nodes based on the target time interval and the target confidence value includes: The query time span is determined based on the target start time and the target end time; If the query time span is greater than a preset time span threshold, a time decay factor is determined based on the query time span, the time span threshold, and a preset minimum time contribution value. The third time matching degree is determined based on the first time matching degree, the time decay factor, and the target confidence value.

[0017] In some embodiments, the target candidate pool further includes: the relationship edges between adjacent candidate knowledge graph nodes and their corresponding relationship edge scores; the method further includes: The target relation edge score of each relation edge is determined based on the time bonus of adjacent candidate knowledge graph nodes and the relation edge score.

[0018] This invention also provides a time-aware knowledge graph retrieval device to achieve the parsing of time information in query text and the retrieval fusion of time constraints, thereby improving the relevance and ranking accuracy of retrieval results in the time dimension.

[0019] Time-aware knowledge graph retrieval devices include: The time parsing module is used to perform time parsing processing on the obtained query text to obtain the target time interval of the query text; The semantic retrieval module is used to perform retrieval operations in a pre-established knowledge graph based on the query text to obtain a target candidate pool; wherein, the target candidate pool includes: multiple candidate knowledge graph nodes and their corresponding candidate node scores; The time matching module is used to match each of the candidate knowledge graph nodes with the target time interval and determine the time bonus value of each of the candidate knowledge graph nodes. The result sorting module is used to add the time-based scores to the corresponding candidate node scores, generate the target candidate node scores for each candidate knowledge graph node, and obtain the search results.

[0020] This invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the above-described time-aware knowledge graph retrieval method.

[0021] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the aforementioned time-aware knowledge graph retrieval method.

[0022] This invention also provides a computer program product, which includes a computer program that, when executed by a processor, implements the above-described time-aware knowledge graph retrieval method.

[0023] The time-aware knowledge graph retrieval method and apparatus provided in this invention determine the target time interval by parsing the query text over time, and then performs time matching between candidate knowledge graph nodes and the target time interval during the knowledge graph retrieval process. This calculates the time score for each candidate node and integrates and adjusts the time score with the candidate node scores. By introducing a time matching mechanism on top of the semantic retrieval results, the retrieval process can not only match based on the semantic relevance of the text but also consider the time constraints in the query, thus achieving joint retrieval of semantic and time information. Compared to retrieval methods that rely solely on semantic similarity, this invention effectively improves the relevance of retrieval results in the time dimension, giving higher priority to knowledge graph nodes that are more closely matched to the query time, reducing interference from time-irrelevant but semantically similar results, thereby improving the ranking accuracy and overall effectiveness of the retrieval results. Attached Figure Description

[0024] To more clearly illustrate the technical solutions in the embodiments of the present 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 only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings: Figure 1 This is a flowchart illustrating a time-aware knowledge graph retrieval method according to an embodiment of the present invention. Figure 2 This is a flowchart illustrating a time-aware knowledge graph retrieval method in another embodiment of the present invention; Figure 3 This is a flowchart illustrating a time-aware knowledge graph retrieval method in another embodiment of the present invention; Figure 4 This is a flowchart illustrating a time-aware knowledge graph retrieval method in another embodiment of the present invention; Figure 5 This is a flowchart illustrating a time-aware knowledge graph retrieval method in another embodiment of the present invention; Figure 6 This is a flowchart illustrating a time-aware knowledge graph retrieval method in another embodiment of the present invention; Figure 7 This is a flowchart illustrating a time-aware knowledge graph retrieval method in another embodiment of the present invention; Figure 8 This is a flowchart illustrating a time-aware knowledge graph retrieval method in another embodiment of the present invention; Figure 9This is a flowchart illustrating a time-aware knowledge graph retrieval method in another embodiment of the present invention; Figure 10 This is a schematic diagram of the structure of the time-aware knowledge graph retrieval device in an embodiment of the present invention; Figure 11 This is a schematic diagram of the physical structure of a computer device provided in an embodiment of the present invention. Detailed Implementation

[0025] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings. Here, the illustrative embodiments and their descriptions are used to explain the present invention, but are not intended to limit the present invention. It should be noted that, unless otherwise specified, the embodiments and features in the embodiments of this application can be arbitrarily combined with each other. The acquisition, storage, use, and processing of data in the technical solutions of this application all comply with relevant laws and regulations. The user information in the embodiments of this application is obtained through legal and compliant means, and the acquisition, storage, use, and processing of user information have been authorized and agreed upon by the customer.

[0026] To facilitate understanding of the technical solution provided in this application, the relevant content of the technical solution in this application will be explained below.

[0027] To address the shortcomings of existing knowledge graph or vector semantic retrieval methods in effectively handling time constraints in query text, accurately matching explicit, relative, and fuzzy time expressions in natural language, and the insufficient integration of time information with semantic retrieval results, which can lead to inaccurate ranking of time-related results, this application provides a time-aware knowledge graph retrieval method. This method performs time parsing on the query text to determine the target time interval and target confidence value. During the data storage phase, time information is extracted from the document and written into the time field of the corresponding knowledge graph node. In the retrieval phase, semantic retrieval is performed based on the time-determined query text to obtain a target candidate pool. The scores of the retrieved candidate nodes and relation edges are then fused and adjusted by combining the time field, time matching degree, and time bonus value of the candidate knowledge graph nodes. This achieves joint matching of query time constraints and knowledge graph retrieval results, improving the relevance and ranking accuracy of the retrieval results in the time dimension.

[0028] This invention provides a time-aware knowledge graph retrieval method, such as... Figure 1 As shown, the retrieval method includes steps 101 to 104.

[0029] Step 101: Perform time parsing processing on the obtained query text to obtain the target time range of the query text.

[0030] Step 102: Perform a retrieval operation on the pre-established knowledge graph based on the query text to obtain the target candidate pool. The target candidate pool includes multiple candidate knowledge graph nodes and their corresponding candidate node scores.

[0031] Step 103: Match each candidate knowledge graph node with the target time interval and determine the time bonus value for each candidate knowledge graph node.

[0032] Step 104: Add the time-based bonus values ​​to the corresponding candidate node scores to generate the target candidate node scores for each candidate knowledge graph node, and obtain the retrieval results.

[0033] According to the above embodiments, the target time interval is determined by parsing the query text over time, and candidate knowledge graph nodes are matched with the target time interval during the knowledge graph retrieval process. This calculates the time score for each candidate node, and the time score is then integrated and adjusted with the candidate node scores. By introducing a time matching mechanism based on semantic retrieval results, the retrieval process can not only match based on the semantic relevance of the text but also consider the time constraints in the query, thus achieving joint retrieval of semantic and time information. Compared to retrieval methods that rely solely on semantic similarity, this invention effectively improves the relevance of retrieval results in the time dimension, giving higher priority to knowledge graph nodes that are more closely matched to the query time, reducing interference from semantically similar but time-irrelevant results, thereby improving the ranking accuracy and overall effectiveness of the retrieval results.

[0034] In some embodiments, the target time interval includes: a target start time and a target end time. For example... Figure 2 As shown, step 101 includes steps 201 to 204.

[0035] Step 201: Extract features from the query text based on the preset time type to obtain multiple time expressions.

[0036] Step 202: Convert each time expression into its corresponding timestamp range (Time Normalization).

[0037] Step 203: Determine the target start time of the query text based on the start time of each timestamp interval.

[0038] Step 204: Determine the target end time of the query text based on the end time of each timestamp interval.

[0039] In this embodiment of the invention, the acquired user natural language query text is matched with regular expressions in descending order of preset priority to identify time expressions in the query text. The time types of these time expressions include: explicit time, relative time, and fuzzy time.

[0040] For example, explicit time includes explicit date, explicit month, and explicit year. Explicit date examples include "March 15, 2024", "2024-03-15", or "2024 / 3 / 15". For each identified explicit date, it is converted to a millisecond-level timestamp interval, for example, using 00:00:00 as the start time and 23:59:59 as the end time, and the time resolution confidence corresponding to the explicit date is set to C_explicit, with a preferred value of 0.9. Explicit month examples include "March 2024" or "March 2024". For each identified explicit month, it is converted to a timestamp interval from the first day to the last day of the corresponding month, and the time resolution confidence corresponding to the explicit month is set to C_month, with a preferred value of 0.8. Explicit year examples include "2024". For the identified explicit year, convert it into the timestamp range from January 1 to December 31 of the corresponding year, and set the time resolution confidence level corresponding to the explicit year to C_year, with a preferred value of 0.7.

[0041] Exemplarily, relative time includes: relative date, relative week, relative month, and relative year. Relative dates such as "yesterday", "today", "tomorrow", "the day before yesterday", "three days before yesterday", and "the day after tomorrow". For the recognized relative dates, calculate the timestamp interval of the corresponding date according to the current system time, and set the time parsing confidence corresponding to the relative date to C_relative_day, whose preferred value is 0.85. The present invention also supports various colloquial Chinese expressions, such as "今儿 (today)", "明儿 (tomorrow)", "昨晚 (last night)", and "今早 (this morning)". Relative weeks such as "last week", "this week", and "next week", and can include specific week information, such as "last Wednesday" or "next Friday". For the recognized relative weeks, determine the time range of the corresponding week according to the current system time, and set the time parsing confidence corresponding to the relative week to C_relative_week, whose preferred value is 0.8. The present invention supports different expressions such as "week", "礼拜 (week)", and "星期 (week)", and performs corresponding processing on special time expressions such as "周末 (weekend)". Relative months such as "last month", "this month", and "next month". For the recognized relative months, determine the start time and end time of the corresponding month according to the current system time, and set the time parsing confidence corresponding to the relative month to C_relative_month, whose preferred value is 0.75. Relative years such as "last year", "this year", "next year", and "the year before last". For the recognized relative years, determine the timestamp interval of the corresponding year according to the current system time, and set the time parsing confidence corresponding to the relative year to C_relative_year, whose preferred value is 0.7.

[0042] Exemplarily, fuzzy time includes: quarter expressions, within-year or within-month time period expressions, and fuzzy time expressions. Among them, quarter expressions such as "last quarter" or "this quarter". For the recognized quarter expressions, convert them into time intervals composed of the corresponding three natural months. Within-year or within-month time period expressions such as "年初 (beginning of the year)", "年中 (mid-year)", "年末 (end of the year)", "上半年 (first half of the year)", "下半年 (second half of the year)", "月初 (beginning of the month)", and "月底 (end of the month)". For the recognized such time expressions, convert them into preset month intervals or date intervals. Since the above time expressions usually have a relatively large time span, their corresponding time parsing confidence is relatively low, preferably set to 0.5 to 0.7, and a wide time interval strategy is adopted to determine the time range. In addition, fuzzy time also includes time expressions with unclear time boundaries, such as "最近 (recently)", "前阵子 (a while ago)", "这段时间 (this period of time)", "好几天前 (several days ago)", and "大半年前 (almost half a year ago)". For the recognized such time expressions, convert them into a preset number of days range based on the current system time, and set the corresponding time parsing confidence to a relatively low level, whose preferred value is 0.4 to 0.6.

[0043] In the aforementioned time expression recognition process, various time expressions are identified and matched sequentially according to a preset priority order. Text positions already covered by higher-priority time expressions are no longer subject to repeated matching by lower-priority time expressions, thus preventing the same text segment from being parsed repeatedly.

[0044] In the above time expression recognition process, if multiple time expressions are recognized in the query text, the time ranges corresponding to each time expression are merged to determine the target time interval of the query text.

[0045] Specifically, the start time of the target time interval is the minimum value among the start times of the timestamp intervals corresponding to each time expression, i.e., query_start_ms = min(start time of each time expression). The end time of the target time interval is the maximum value among the end times of the timestamp intervals corresponding to each time expression, i.e., query_end_ms = max(end time of each time expression). In this way, multiple time expressions can be uniformly mapped to a single overall time range.

[0046] According to the above embodiments, time expressions in the query text are identified and converted into corresponding timestamp intervals. A unified target time interval is determined based on the start and end times of each timestamp interval, enabling the standardization of various time expressions in natural language into a structured time range. Compared to methods that directly rely on text semantics for retrieval, this method effectively extracts and uniformly represents time information in the query, providing clear time constraints for subsequent time matching calculations. This improves the retrieval system's ability to handle multiple time expression scenarios, enhances the computability of time information during the retrieval process, and further improves the relevance and ranking accuracy of the retrieval results in the time dimension.

[0047] In some embodiments, such as Figure 3 As shown, the retrieval method further includes steps 301 to 302.

[0048] Step 301: Assign confidence values ​​to each time expression based on the time type to obtain the confidence value corresponding to each time expression.

[0049] Step 302: Determine the target confidence value of the query text based on the confidence values ​​corresponding to each time expression.

[0050] In this embodiment of the invention, during the above-mentioned time expression recognition process, a confidence value is assigned to each time expression according to the time type to which the time expression belongs, so as to obtain the confidence value corresponding to each time expression.

[0051] Specifically, different time types correspond to preset confidence parameters, which characterize the reliability of the time expression during the time parsing process. When determining the target confidence value of the query text, the confidence values ​​corresponding to each time expression are compared, and the largest confidence value is selected as the target confidence value of the query text to reflect the overall credibility of the time parsing results in the query text.

[0052] In some embodiments, such as Figure 4 As shown, the steps for constructing knowledge graph nodes include: steps 401 to 403.

[0053] Step 401: Obtain the document to be stored in the database.

[0054] Step 402: Perform time keyword detection on the text content of each document. If time keywords are detected, perform time parsing processing on the text content based on anchor time to obtain the time information of each document. The time information includes: event start time, event end time, event confidence level, and event time expression.

[0055] Step 403: Determine if the event confidence level is greater than the first preset threshold. If the event confidence level is greater than the first preset threshold, write the time information into the time field (mentioned_time) of the corresponding knowledge graph node.

[0056] In this embodiment of the invention, documents from multiple data sources are acquired, and each document is preprocessed and stored in a database to serve as the data foundation for constructing a knowledge graph. The data sources may include, but are not limited to, structured or unstructured data such as enterprise business system data, files in document management systems, email records, meeting minutes, news information, web page content, and database records.

[0057] For each acquired document, a rapid time signal detection is first performed on its content to determine whether it contains time keywords that may represent time information, such as time expressions like "year," "month," and "day." If the detection result indicates that the document content does not contain time keywords, it is considered that the document does not contain explicit time information, thus skipping the subsequent time parsing and extraction steps. This reduces the computational overhead of time parsing processing and improves the efficiency of data entry processing.

[0058] Steps 201 to 204 involve performing time parsing on the document content containing time keywords to obtain the corresponding document's time information. This time information includes: event start time (mentioned_time_start_ms), event end time (mentioned_time_end_ms), event confidence (mentioned_time_confidence), and time expression text (mentioned_time_text). The event start and end times represent the time range in which the event occurred within the document, the event confidence characterizes the reliability of the time parsing results, and the time expression text records the original time expressions identified from the document.

[0059] In this embodiment of the invention, the anchor time is used as the reference benchmark for time calculation in the parsing of relative time expressions. The anchor time can be the source time associated with the document, such as email sending time, file creation time, data recording time, or file modification time. The relative time expression is normalized by the anchor time to determine the corresponding timestamp interval, thereby improving the accuracy and consistency of the time parsing results.

[0060] A threshold judgment is applied to the event confidence level in the parsed time information. When the event confidence level is lower than a preset minimum threshold (preferably 0.5), the reliability of the current time parsing result is considered insufficient, and therefore the time information is not written into the corresponding knowledge graph node. Only when the event confidence level is greater than or equal to the minimum threshold is the corresponding time information stored in the mentioned_time field of the knowledge graph node, to ensure that the time information written into the knowledge graph has high reliability.

[0061] The time field is built into the base class MemoryNode of all knowledge graph nodes and is used to uniformly store time information related to the node. The time field can include time attributes such as event start time, event end time, time resolution confidence, and time expression text.

[0062] In some embodiments, such as Figure 5 As shown, step 102 includes steps 501 to 504.

[0063] Step 501: Delete each time expression from the query text to generate a time-free query text.

[0064] Step 502: Perform vector transformation on the time-based query text to obtain the query vector.

[0065] Step 503: If the target confidence value exceeds the second preset threshold, determine the target candidate pool capacity based on the preset candidate pool capacity and the preset expansion factor.

[0066] Step 504: Based on the target candidate pool capacity and query vector, perform semantic retrieval in the pre-established knowledge graph to obtain the target candidate pool.

[0067] In this embodiment of the invention, all time expressions identified in step 201 are stripped from the query text to generate time-de-expressed query text. This time-de-expressed query text is used in the subsequent vector retrieval process, thereby avoiding interference from date numbers or time expressions in the query text on the semantic vector representation and improving the accuracy of semantic matching.

[0068] For example, when the query text is "Property Registration under the Civil Code revised in 2024", the corresponding de-timed query text "Revised Civil Code Property Registration" can be obtained through time expression recognition and stripping. The recognized time information is then converted into a corresponding time range, such as [2024-01-01, 2024-12-31]. The de-timed query text is used to generate a query vector for semantic retrieval, while the time range is used for subsequent time matching calculations, thus achieving joint retrieval of semantic and time information.

[0069] Specifically, the de-timed query text undergoes word segmentation, text standardization, and encoding input processing. The processed de-timed query text is then input into a pre-trained text embedding model for semantic encoding. The text embedding model outputs the corresponding semantic feature vector, which is used as the query vector for subsequent semantic similarity retrieval within a pre-established knowledge graph.

[0070] In the semantic retrieval stage, the candidate pool capacity is first adaptively adjusted based on the target confidence value corresponding to the query text. Specifically, if the target confidence value is greater than the preset threshold Conf_min (preferably 0.4), the original vector search candidate pool capacity is multiplied by a preset expansion factor (preferably 2.0) to obtain the target candidate pool capacity. Simultaneously, to avoid an excessively large candidate pool, a preset upper limit (preferably 300) is set for the target candidate pool capacity. By expanding the candidate pool capacity, it is possible to prevent some time-related but semantically low-similar candidate nodes from being prematurely truncated during the vector retrieval stage due to slightly larger vector distances, thereby improving the recall rate of time-related candidate nodes.

[0071] Subsequently, semantic similarity retrieval is performed in the pre-established knowledge graph based on the query vector to obtain candidate knowledge graph nodes that are semantically related to the query vector, and the number of candidate knowledge graph nodes that does not exceed the capacity of the target candidate pool is formed into the target candidate pool.

[0072] According to the above embodiments, the time expression in the query text is stripped to generate time-de-templated query text, which is then vectorized to obtain query vectors. This allows the semantic retrieval process to more accurately reflect the semantic information of the query text, avoiding interference from time expressions on the semantic vector representation. The candidate pool capacity is adaptively expanded based on the target confidence value, enabling the acquisition of more potentially relevant candidate knowledge graph nodes during the semantic similarity retrieval stage. This reduces the premature truncation of relevant nodes due to slightly large vector distances, improves the recall capability of time-related candidate nodes, and further enhances the effectiveness of subsequent time matching calculations, as well as the accuracy and reliability of the overall retrieval results.

[0073] In some embodiments, such as Figure 6 As shown, step 103 includes steps 601 to 602.

[0074] Step 601: Determine the time matching degree of each candidate knowledge graph node based on the target time interval and the target confidence value.

[0075] Step 602: Determine the time bonus value for each candidate knowledge graph node based on the preset bonus coefficient and the time matching degree.

[0076] In this embodiment of the invention, the time matching degree between each candidate knowledge graph node and the target time interval corresponding to the query text is calculated. The target time interval consists of the target start time and the target end time.

[0077] Specifically, the time matching degree of each candidate knowledge graph node is obtained by comparing the time relationship between the time information corresponding to each candidate knowledge graph node and the target time interval. .

[0078] The time matching degree of each candidate knowledge graph node is obtained. Then, the time matching degree is converted into the corresponding time bonus value according to formula (1).

[0079]

[0080] in This represents the maximum time bonus value, used to limit the upper limit of time bonus. Its preferred value is 0.04 at the node level and 0.06 at the relationship edge level. This represents the temporal matching degree of candidate knowledge graph nodes.

[0081] According to the above embodiments, the time matching degree can be mapped to the corresponding time bonus value through the above calculation method, so as to adjust the score of candidate knowledge graph nodes in the subsequent ranking process, thereby improving the ranking priority of time-related candidate nodes in the retrieval results.

[0082] In some embodiments, time matching degree includes: first time matching degree. For example... Figure 7 As shown, step 601 includes steps 701 to 703.

[0083] Step 701: If a candidate knowledge graph node contains a time field and the event start time and event end time match the target time interval, determine the time overlap and minimum time span based on the target start time, target end time, event start time, and event end time.

[0084] Step 702: Determine the overlapping time matching value based on the time overlap, minimum time span, event confidence in the time field, and preset time weight parameters.

[0085] Step 703: Determine the first time matching degree based on the overlap time matching value and the target confidence value.

[0086] In this embodiment of the invention, if a time field exists in a candidate knowledge graph node, and the event time interval corresponding to the event start time to the event end time in the time field intersects with the target time interval of the query text, then the time overlap between the event time interval and the target time interval is calculated according to formula (2).

[0087] in, Indicates the end time of the event. Indicates the target end time of the query text. Indicates the start time of the event. Indicates the target start time of the query text.

[0088] Furthermore, by substituting the event time interval length and the query time interval length into formula (3), the minimum time span is calculated. .

[0089]

[0090] in, Indicates the end time of the event. Indicates the target end time of the query text. Indicates the start time of the event. Indicates the target start time of the query text.

[0091] Subsequently, the time overlap, minimum time span, event confidence, and preset time field weights are considered. Substitute into formula (4) to calculate the overlap time matching value. .

[0092]

[0093] in, Indicates the degree of overlap between the event time interval and the target time interval. Indicates the minimum time span. Indicates the confidence level of event time information. This indicates the weight of the time field, with a preferred value of 1.

[0094] After obtaining the overlapping time matching value, substitute the overlapping time matching value and the target confidence value of the query text into formula (5) to calculate the time matching degree of the candidate knowledge graph node. .

[0095]

[0096] in, Indicates the overlap time matching value. This represents the target confidence value obtained from the time parsing of the query text.

[0097] According to the above embodiments, when a candidate knowledge graph node has a time field and its event time interval matches the target time interval of the query text, the time matching degree is calculated based on the time overlap and minimum time span between the two time intervals. The overlap score is then determined by combining the event confidence score and preset time weight parameters, and finally, the first time matching degree is obtained by combining the target confidence value of the query text. This method comprehensively considers the overlap between the event time interval and the query time interval, as well as the reliability of the time parsing results, thereby more accurately assessing the relevance between candidate knowledge graph nodes and the query time. This improves the accuracy of time matching calculation, provides a more reliable time basis for subsequent candidate node ranking, and ultimately enhances the relevance of the search results in the time dimension and the overall ranking effect.

[0098] In some embodiments, the time matching degree includes: a second time matching degree. For example... Figure 8 As shown, step 601 includes steps 801 to 802.

[0099] Step 801: If the candidate knowledge graph node does not have a time field or the event start time and event end time do not match the target time interval, determine the creation time matching value based on the creation time of the candidate knowledge graph node and the preset creation time weight.

[0100] Step 802: Determine the second time matching degree based on the creation time matching value and the target confidence value.

[0101] In this embodiment of the invention, if a candidate knowledge graph node does not have a time field, or if the event time interval corresponding to the event start time to the event end time in the time field does not intersect with the target time interval of the query text, then it is further determined whether the creation time of the candidate knowledge graph node falls within the target time interval. If the creation time of the candidate knowledge graph node is within the target time interval, then the creation time matching value is calculated according to formula (6). .

[0102]

[0103] in, This represents the creation time weight, with a preferred value of 0.5.

[0104] After obtaining the creation time matching value, substitute the creation time matching value and the target confidence value of the query text into formula (7) to calculate the time matching degree of the candidate knowledge graph node. .

[0105]

[0106] in, This indicates the creation time matching value. This represents the target confidence value for the query text.

[0107] According to the above embodiments, when candidate knowledge graph nodes lack effective event time information or the event time interval does not match the target time interval, the node creation time can be used as a supplementary basis for time matching, thereby improving the coverage of time matching calculation and the robustness of retrieval results.

[0108] In some embodiments, time matching degree includes: a third time matching degree. For example... Figure 9 As shown, step 601 includes steps 901 to 903.

[0109] Step 901: Determine the query time span based on the target start time and target end time.

[0110] Step 902: If the query time span is greater than the preset time span threshold, determine the time decay factor based on the query time span, the time span threshold, and the preset minimum time contribution value.

[0111] Step 903: Determine the third time matching degree based on the first time matching degree, the time decay factor, and the target confidence value.

[0112] In this embodiment of the invention, the query time span This is the difference between the target end time and the target start time. If the query time span exceeds a preset time span threshold... (The preferred value is 365 days). Then, substitute the query time span, time span threshold, and preset minimum time contribution value into the following formula (8) to calculate the time decay factor. .

[0113]

[0114] in, This represents the minimum time contribution value. Indicates the time span threshold. Indicates the time span of the query.

[0115] Furthermore, after obtaining the time decay factor, the first time matching degree, the time decay factor, and the target confidence value are substituted into the following formula (9) to calculate the time matching degree of the candidate knowledge graph node. .

[0116]

[0117] in, Indicates the time decay factor. This represents the target confidence value for the query text. This indicates the initial matching degree.

[0118] According to the above embodiments, when the query time span is large, the time matching degree can be attenuated to reduce the impact of the wide time interval on the retrieval ranking, thereby improving the rationality of time matching calculation and the accuracy of retrieval results.

[0119] In some embodiments, the target candidate pool includes multiple candidate knowledge graph nodes and their corresponding candidate node scores. After the knowledge graph retrieval is completed, the system returns a list of retrieval results consisting of candidate knowledge graph nodes and their corresponding candidate node scores.

[0120] In the node scoring stage of knowledge graph retrieval, a time-based scoring process is applied to the candidate node score (Bundle_score) of each candidate knowledge graph node. Specifically, if the event time interval or creation time corresponding to the candidate knowledge graph node matches the target time interval of the query text, the corresponding time-based scoring is subtracted from the candidate node score to obtain the updated candidate node score. A lower candidate node score indicates higher relevance and a higher ranking priority. To avoid excessive influence of time-based scoring on the ranking results, a minimum threshold (score_floor) is set for the updated candidate node score, with a preferred value of 0.08, meaning the updated candidate node score is not lower than this threshold. This method integrates time matching information into the semantic retrieval results, thereby improving the relevance and ranking rationality of the retrieval results in the time dimension.

[0121] For example, in the search results, assume that node B's candidate node score (Bundle_score) is 1.8, and node A's candidate node score (Bundle_score) is 0.2. After time matching calculation, node A's time bonus is 0.03, while node B's time bonus is 0. According to the time bonus processing rules, the candidate node scores are updated by subtracting the corresponding time bonus from node A's candidate node score, resulting in an updated candidate node score of 0.17 for node A. Since node B has no time bonus, its candidate node score remains at 1.8. Because a smaller candidate node score indicates a higher relevance between the node and the query, after time bonus adjustment, node A's ranking priority in the search results is further improved.

[0122] In some embodiments, the target candidate pool further includes: the relationship edges between adjacent candidate knowledge graph nodes and their corresponding relationship edge scores. The time-aware knowledge graph retrieval method further includes: determining the target relationship edge score for each relationship edge based on the time-added scores and relationship edge scores of adjacent candidate knowledge graph nodes.

[0123] In this embodiment of the invention, during the relationship edge scoring stage of knowledge graph retrieval, a time-based score is calculated for each candidate knowledge graph node corresponding to both ends of each relationship edge. Then, the larger of the time-based scores of the candidate knowledge graph nodes at both ends of the relationship edge is used as the time-based score of that relationship edge. Further, the time-based score is subtracted from the relationship edge score to obtain the updated target relationship edge score. Through this method, node-level time matching information can be passed to the relationship edge scoring process, allowing relationship edges that better match the query time to receive higher priority in the ranking, thereby improving the relevance of the retrieval results in the time dimension and the overall rationality of the ranking.

[0124] For example, in the search results, assume that the original edge score (Edge_score) of relation edge AC is 0.22. After time matching calculation, the time bonus score for node A is 0.03, and the time bonus score for node C is 0.05. According to the relation edge scoring rules, the larger of the time bonus scores of the two nodes on the relation edge is taken as the time bonus score of relation edge AC, i.e., the time bonus score of relation edge AC is 0.05. Further, the time bonus score is subtracted from the original edge score of relation edge AC to obtain the updated relation edge score, i.e., the Edge_score of relation edge AC is updated to 0.17. Through the above processing, relation edges that are more closely matched to the query time can obtain higher priority in the ranking, thereby improving the relevance and ranking effect of the search results in the time dimension.

[0125] In some embodiments, if the target confidence value corresponding to the query text exceeds a preset threshold Conf_mismatch (preferably 0.7), and a time field exists in the candidate knowledge graph node, but the event time interval corresponding to the time field does not match the target time interval, then a penalty score P_mismatch is applied to the candidate knowledge graph node. The maximum optimal value for the penalty score is 0.03. The penalty score is then added to the candidate node score of the candidate knowledge graph node to reduce its priority in the ranking.

[0126] It should be noted that for candidate knowledge graph nodes with mismatched time, they are not directly removed from the search results. Instead, while maintaining their original semantic relevance, their ranking is moderately adjusted by increasing the penalty score. This improves the rationality of the time-dimension ranking of the search results while taking into account semantic relevance.

[0127] In some embodiments, the user query text is "Provisions on Cybercrime in the Criminal Law Revised in 2024". Through time expression recognition and time parsing, the explicit year "2024" is extracted, thus determining the target time interval of the query text as [2024-01-01, 2024-12-31]. Based on the confidence rule corresponding to the time type, the target confidence value of the query text is determined to be 0.7. Subsequently, time expression stripping is performed on the query text to generate de-timed query text. The resulting de-timed query text is "Provisions on Cybercrime in the Revised Criminal Law".

[0128] Since the target confidence value of 0.7 is greater than the preset threshold of 0.4, the candidate pool capacity is adaptively expanded. For example, when the default candidate pool capacity is 100, it is expanded to the target candidate pool capacity of 200 according to the preset expansion factor. Subsequently, semantic retrieval is performed on the pre-established knowledge graph or its corresponding vector index based on the time-determined query text, resulting in 200 candidate knowledge graph nodes. Further, it is checked whether the time field of each candidate knowledge graph node falls within the target time interval. For nodes of criminal law amendment clauses whose event time is within the 2024 range, their node scores are reduced through a time-based scoring mechanism to improve their ranking priority. For candidate knowledge graph nodes whose time field is not within the 2024 range, no time-based scoring is applied, but they are still retained in the candidate results, thereby improving the ranking priority of time-related results while ensuring semantic relevance.

[0129] In some embodiments, the user query text is "project progress report last month". Through time expression recognition and time parsing, the relative time expression "last month" can be extracted and identified as a relative month type, with a time offset of [missing information]. 1. Based on the confidence rules corresponding to the relative month, the target confidence value for the query text is determined to be 0.75. Subsequently, using the current system time as the base time, the relative time expression is normalized to calculate the time range corresponding to the previous month, namely the start time of the first day of the previous month and the end time of the last day of the previous month.

[0130] Furthermore, the query text is stripped of its temporal expression to generate de-timed query text. The resulting de-timed query text is "Project Progress Report". This de-timed query text is used for subsequent semantic vector retrieval, while the parsed time range is used for subsequent time matching calculations.

[0131] In some embodiments, the user query text is "recent technical solution discussion". Through time expression recognition and time parsing, the time expression "recent" can be extracted and identified as a fuzzy time type. The fuzzy time is preset to a 7-day time range based on the current system time. According to the confidence rules corresponding to the fuzzy time, the target confidence value for the query text is determined to be 0.5.

[0132] Because the target confidence value is greater than the preset threshold of 0.4, the time enhancement mechanism is triggered. However, since the confidence value corresponding to the fuzzy time type is relatively low, its time bonus weight is correspondingly small. In subsequent retrieval processes, the system prioritizes knowledge graph nodes created or updated within the aforementioned time range in the ranking. However, for candidate nodes outside the time range but with high semantic relevance, they are not removed from the search results but are retained in the ranking. This improves the relevance of the search results in the time dimension while ensuring semantic relevance.

[0133] This application provides a time-aware knowledge graph retrieval device applied to the aforementioned time-aware knowledge graph retrieval method. This time-aware knowledge graph retrieval device and the time-aware knowledge graph retrieval method in one embodiment of this application are based on the same inventive concept and have similar problem-solving principles. Therefore, the implementation of the time-aware knowledge graph retrieval device is the same as the implementation of the time-aware knowledge graph retrieval method in one embodiment of this application, and repeated details will not be described again. As used below, the terms "unit" or "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the system described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0134] like Figure 10 As shown, the time-aware knowledge graph retrieval device 1000 includes: The time parsing module 1001 is used to perform time parsing processing on the obtained query text to obtain the target time range of the query text.

[0135] The semantic retrieval module 1002 is used to perform retrieval operations on a pre-established knowledge graph based on the query text to obtain a target candidate pool. The target candidate pool includes multiple candidate knowledge graph nodes and their corresponding candidate node scores.

[0136] The time matching module 1003 is used to match each candidate knowledge graph node with the target time interval and determine the time bonus value of each candidate knowledge graph node.

[0137] The result sorting module 1004 is used to add the time-based bonus values ​​to the corresponding candidate node scores, generate the target candidate node scores for each candidate knowledge graph node, and obtain the search results.

[0138] In some embodiments, the target time interval includes: a target start time and a target end time. The time parsing module 1001 includes: The time expression extraction submodule is used to extract features from the query text based on preset time types, and obtain multiple time expressions.

[0139] The time normalization submodule is used to convert each time expression into the corresponding timestamp range.

[0140] The start time determination submodule is used to determine the target start time of the query text based on the start time of each timestamp interval.

[0141] The End Time Determination submodule is used to determine the target end time of the query text based on the end time of each timestamp interval.

[0142] In some embodiments, the apparatus further includes: The confidence assignment module is used to assign confidence values ​​to each time expression based on the time type, thereby obtaining the confidence value corresponding to each time expression.

[0143] The target confidence level determination module is used to determine the target confidence level of the query text based on the confidence level values ​​corresponding to each time expression.

[0144] In some embodiments, the apparatus further includes a knowledge graph construction module, which includes: The document retrieval submodule is used to retrieve documents that are to be stored in the database.

[0145] The time parsing submodule is used to detect time keywords in the text content of each document. If a time keyword is detected, the text content is parsed based on the anchor time to obtain the time information for each document. This time information includes: event start time, event end time, event confidence level, and event time expression.

[0146] The time field writing submodule is used to determine whether the event confidence level is greater than a first preset threshold. If the event confidence level is greater than the first preset threshold, the time information is written to the time field of the corresponding knowledge graph node.

[0147] In some embodiments, the semantic retrieval module 1002 includes: The Time Expression Stripping submodule is used to remove time expressions from the query text and generate time-free query text.

[0148] The vector transformation submodule is used to perform vector transformation on the time-determined query text to obtain the query vector.

[0149] The candidate pool capacity determination submodule is used to determine the target candidate pool capacity based on the preset candidate pool capacity and the preset expansion factor if the target confidence value exceeds the second preset threshold.

[0150] The semantic retrieval submodule is used to perform semantic retrieval in a pre-established knowledge graph based on the target candidate pool capacity and query vector to obtain the target candidate pool.

[0151] In some embodiments, the time matching module 1003 includes: The time matching degree calculation submodule is used to determine the time matching degree of each candidate knowledge graph node based on the target time interval and the target confidence value.

[0152] The time-based bonus calculation submodule is used to determine the time bonus value of each candidate knowledge graph node based on the preset bonus coefficient and the time matching degree.

[0153] In some embodiments, the time matching degree includes: a first time matching degree. The time matching degree calculation submodule includes: The time overlap calculation unit is used to determine the time overlap degree and minimum time span if a candidate knowledge graph node has a time field and the event start time and event end time therein match the target time interval, based on the target start time, target end time, event start time, and event end time.

[0154] The overlap matching value calculation unit is used to determine the overlap time matching value based on the time overlap, minimum time span, event confidence in the time field, and preset time weight parameters.

[0155] The first matching degree determination unit is used to determine the first time matching degree based on the overlap time matching value and the target confidence value.

[0156] In some embodiments, the time matching degree includes: a second time matching degree. The time matching degree calculation submodule includes: The creation time matching value determination unit is used to determine the creation time matching value based on the creation time of the candidate knowledge graph node and the preset creation time weight if the candidate knowledge graph node does not have a time field or the event start time and event end time do not match the target time interval.

[0157] The second matching degree determination unit is used to determine the second time matching degree based on the creation time matching value and the target confidence value.

[0158] In some embodiments, the time matching degree includes: a third time matching degree. The time matching degree calculation submodule includes: The time span calculation unit is used to determine the query time span based on the target start time and target end time.

[0159] The decay factor determination unit is used to determine the time decay factor based on the query time span, the time span threshold, and the preset minimum time contribution value if the query time span is greater than the preset time span threshold.

[0160] The third matching degree determination unit is used to determine the third time matching degree based on the first time matching degree, the time decay factor and the target confidence value.

[0161] In some embodiments, the target candidate pool further includes: the relationship edges between adjacent candidate knowledge graph nodes and their corresponding relationship edge scores. The apparatus further includes: a relationship edge scoring module, used to determine the target relationship edge score of each relationship edge based on the time-based bonus values ​​of adjacent candidate knowledge graph nodes and the relationship edge scores.

[0162] Figure 11 This is a schematic diagram of the physical structure of a computer device provided in an embodiment of the present invention, such as... Figure 11 As shown, the computer device includes: a processor 1101, a memory 1102, and a bus 1103.

[0163] The processor 1101 and the memory 1102 communicate with each other via the bus 1103.

[0164] The processor 1101 is used to call program instructions in the memory 1102 to execute the methods provided in the above-described method embodiments.

[0165] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the aforementioned time-aware knowledge graph retrieval method.

[0166] This invention also provides a computer program product, which includes a computer program that, when executed by a processor, implements the above-described time-aware knowledge graph retrieval method.

[0167] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0168] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0169] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0170] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0171] In the description of this specification, the references to terms such as "an embodiment," "a specific embodiment," "some embodiments," "for example," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0172] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A time-aware knowledge graph retrieval method, characterized in that, include: The obtained query text is processed by time parsing to obtain the target time range of the query text; Based on the query text, a retrieval operation is performed in a pre-established knowledge graph to obtain a target candidate pool; wherein, the target candidate pool includes: multiple candidate knowledge graph nodes and their corresponding candidate node scores; The candidate knowledge graph nodes are matched with the target time interval, and the time bonus value of each candidate knowledge graph node is determined. The time-based bonus values ​​are added to the corresponding candidate node scores to generate the target candidate node scores for each candidate knowledge graph node, thus obtaining the retrieval results.

2. The method according to claim 1, characterized in that, The target time interval includes: target start time and target end time; the step of performing time parsing processing on the obtained query text to obtain the target time interval of the query text includes: Based on a preset time type, feature extraction is performed on the query text to obtain multiple time expressions; Convert each of the time expressions into the corresponding timestamp range; The target start time of the query text is determined based on the start time of each of the timestamp intervals; The target end time of the query text is determined based on the end time of each of the timestamp intervals.

3. The method according to claim 2, characterized in that, Also includes: Confidence values ​​are assigned to each of the time expressions based on the time type to obtain the confidence values ​​corresponding to each of the time expressions; The target confidence value of the query text is determined based on the confidence value corresponding to each of the aforementioned time expressions.

4. The method according to claim 3, characterized in that, The steps for constructing the knowledge graph nodes include: Retrieve the document to be stored in the database; The text content of each document is subjected to time keyword detection; if the time keyword is detected, the text content is subjected to time parsing processing based on the anchor time to obtain the time information of each document; wherein, the time information includes: event start time, event end time, event confidence and event time expression; Determine whether the confidence level of the event is greater than a first preset threshold; if the confidence level of the event is greater than the first preset threshold, write the time information into the time field of the corresponding knowledge graph node.

5. The method according to claim 4, characterized in that, The step of performing a retrieval operation on a pre-established knowledge graph based on the query text to obtain a target candidate pool includes: Delete each of the time expressions from the query text to generate a time-free query text; Perform vector transformation on the time-deleted query text to obtain the query vector; If the target confidence value exceeds the second preset threshold, the target candidate pool capacity is determined based on the preset candidate pool capacity and the preset expansion factor. Based on the target candidate pool capacity and the query vector, semantic retrieval is performed in a pre-established knowledge graph to obtain the target candidate pool.

6. The method according to claim 4, characterized in that, The step of matching each candidate knowledge graph node with the target time interval and determining the time bonus value of each candidate knowledge graph node includes: The temporal matching degree of each candidate knowledge graph node is determined based on the target time interval and the target confidence value. Based on the preset scoring coefficients and the time matching degree of each node, the time score of each candidate knowledge graph node is determined.

7. The method according to claim 6, characterized in that, The time matching degree includes: a first time matching degree; the step of determining the time matching degree of each candidate knowledge graph node based on the target time interval and the target confidence value includes: If the candidate knowledge graph node contains the time field and the event start time and event end time therein match the target time interval, the time overlap and minimum time span are determined based on the target start time, the target end time, the event start time and the event end time. The overlapping time matching value is determined based on the time overlap, the minimum time span, the event confidence in the time field, and the preset time weight parameters. The first time matching degree is determined based on the overlapping time matching value and the target confidence value.

8. The method according to claim 7, characterized in that, The time matching degree includes: a second time matching degree; the step of determining the time matching degree of each candidate knowledge graph node based on the target time interval and the target confidence value includes: If the time field is not present in the candidate knowledge graph node or the event start time and event end time do not match the target time interval, a creation time matching value is determined based on the creation time of the candidate knowledge graph node and the preset creation time weight. The second time matching degree is determined based on the creation time matching value and the target confidence value.

9. The method according to claim 7, characterized in that, The time matching degree includes: a third time matching degree; the determination of the time matching degree of each candidate knowledge graph node based on the target time interval and the target confidence value includes: The query time span is determined based on the target start time and the target end time; If the query time span is greater than a preset time span threshold, a time decay factor is determined based on the query time span, the time span threshold, and a preset minimum time contribution value. The third time matching degree is determined based on the first time matching degree, the time decay factor, and the target confidence value.

10. The method according to claim 6, characterized in that, The target candidate pool further includes: the relationship edges between adjacent candidate knowledge graph nodes and their corresponding relationship edge scores; the method further includes: The target relation edge score of each relation edge is determined based on the time bonus of adjacent candidate knowledge graph nodes and the relation edge score.

11. A time-aware knowledge graph retrieval device, characterized in that, include: The time parsing module is used to perform time parsing processing on the obtained query text to obtain the target time interval of the query text; The semantic retrieval module is used to perform retrieval operations in a pre-established knowledge graph based on the query text to obtain a target candidate pool; wherein, the target candidate pool includes: multiple candidate knowledge graph nodes and their corresponding candidate node scores; The time matching module is used to match each of the candidate knowledge graph nodes with the target time interval and determine the time bonus value of each of the candidate knowledge graph nodes. The result sorting module is used to add the time-based scores to the corresponding candidate node scores, generate the target candidate node scores for each candidate knowledge graph node, and obtain the search results.

12. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 10.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method of any one of claims 1 to 10.

14. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the method of any one of claims 1 to 10.