Complex logic query method for incomplete time sequence knowledge graph

Through the combination of time index and probabilistic logic network learning model, the problem of low efficiency and incomplete information processing of timing knowledge graph query is solved, and complex logic query with high accuracy and high efficiency is achieved.

CN119088904APending Publication Date: 2024-12-06HARBIN UNIV OF SCI & TECH
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411214786.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-02
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

Time sequence knowledge graph query is inefficient and difficult to effectively process incomplete time information, resulting in low accuracy of query results.

Method used

Time index is used for preliminary pruning processing and parallel screening, combined with the probability logic network learning model, time sequence facts are represented and parallelized to eliminate ring structures and improve query efficiency.

Benefits of technology

It significantly improves the accuracy and efficiency of query results, can effectively process time information, and is suitable for complex logical query scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119088904A_ABST
    Figure CN119088904A_ABST
Patent Text Reader

Abstract

The invention discloses a complex logic query method oriented to an incomplete time sequence knowledge graph, and aims to answer a complex logic query problem on the incomplete time sequence knowledge graph and improve the efficiency of a query process. At present, a complex logic relationship between query problems is lack of effective processing, so that the precision of a query result is limited, and the query problem containing time sequence information is less concerned, which widely exists in the real world. According to the method, a complex logic problem is decomposed into atomic queries, and logic information between the atomic queries is learned and propagated by using a logic model based on a fuzzy Markov query tree. By separately representing the atomic query and the logic information in the query problem and combining the atomic query and the logic information in a probability form, the method can excellently solve the query problem containing various logic relationships. Finally, in order to improve the query efficiency, a novel index structure and a parallel query method are provided. According to the method, the result of executing the complex logic query on the time sequence knowledge graph can be quickly and accurately obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of temporal knowledge graph query, and specifically to a complex logic query method for incomplete temporal knowledge graphs. Background Art

[0002] In today's rapidly developing information age, the temporal characteristics of data have become one of the elements that cannot be ignored in decision analysis. The time series knowledge graph adds a time dimension to the traditional knowledge graph, and describes the changes of entities and relationships over time by recording the time point or time interval when the facts occur. As a text data with structural information, the time series knowledge graph can provide support for intelligent question-answering systems, recommendation systems, etc., and has a wide range of application scenarios.

[0003] Complex logical query with time information constraints is a knowledge query task for time series knowledge graphs, which has attracted widespread attention in recent years. Different from the first-order time series knowledge graph completion task and link prediction task, the time series knowledge graph query task needs to consider how to deal with the missing information in the time series knowledge graph and understand the logical information contained in the query question to perform reasoning, thereby obtaining the final query result. Summary of the invention

[0004] In order to solve the above problems, the purpose of the present invention is to provide a complex logic query method for incomplete temporal knowledge graphs, so as to increase the accuracy of query results and improve query efficiency, and can answer query questions about time information.

[0005] The technical solution of the present invention is: a complex logic query method for incomplete temporal knowledge graphs, comprising the following steps: Step 1: Design a corresponding time index at the beginning of the query to perform preliminary pruning on entities or relationships. And in the logic transfer stage, a parallel method is used to screen multiple candidate entities in parallel; Step 2: Based on the time index structure, the answer process for query questions with time information is accelerated, and the query questions whose results are time information are answered by reverse searching the time index. For query questions with a circular logic query structure, a de-looping operation is performed; Step 3: Propose a probabilistic logic network learning temporal knowledge graph embedding model to address the deficiencies in the representation of temporal facts, and comprehensively consider the query results. In addition, the logical probability matrix generated by multiple facts is flexibly divided and calculated in parallel to improve query efficiency;

[0006] The step of designing a corresponding time index to perform preliminary pruning of entities or relationships at the query start stage specifically includes: Entities are divided in the time dimension, and irrelevant entities are quickly filtered, thereby solving the problem of low efficiency of traditional time-series knowledge graph queries. The format of non-leaf nodes in the time index is (idx, MOL), where idx is the pointer of the node to its child node address, and MOL is the minimum outer segment data of the child node it points to. On this basis, the leaf node also contains a pointer to the entity information file (Info) of the node. The format of the Info file is (eArr, tArr), where eArr is the entity set stored in the leaf node sorted by the frequency of entity occurrence, and tArr is the time information corresponding to the entity. The start and end times of the entities in the set in the time dimension are covered by the time range of their leaf nodes. At the same time, since the nodes in the index tree are organized in chronological order and the structure of the tree itself is ordered, orderliness is maintained when data is stored. In order to enable entities to obtain their time information through indexes, leaf nodes point to their brother nodes in turn.

[0007] The step of answering the query question with the time information as the result by reverse searching the time index specifically includes: The time series knowledge graph embedding model is used to obtain entities associated with the query time, the entity order is sorted according to the model score, and the final query time result is obtained through the Info file information pointed to by the leaf node of the query time index. The atomic formulas contained in the query question are α 1 , α 2 and α 3 , and there are dependencies between atomic formulas that can form a closed loop. The specific FOL formula is expressed as: (1) In order to eliminate the ring structure in the query, the FOL formula is negated according to De Morgan's law. Through this method, the interdependent conjunction logic relationship between atomic formulas can be transformed into a relatively independent negation disjunction logic relationship. The specific formula is: (2).

[0008] The step of proposing a probabilistic logic network specifically includes: Introducing the important concept of potential function in Markov random field. The influence weights learned by neural network W i , the inverse potential function is proposed to describe the dependency between variables in the input atomic formula tensor. Different from the potential function, the larger the value of the inverse potential function, the stronger the dependency between these variables. Specifically, the inverse potential function is expressed as: (3).

[0009] 1. Conjunction transfer probability function: The conjunctive concept is formed based on the necessary attributes of a class of things, which means that if a concept is composed of several attributes, then these attributes are necessary. Probability value, as a mathematical concept to measure the probability of a random event, can better represent the mutual influence of events between logical reasoning. For conjunctive logic, the function is monotonically increasing and the range is between 0 and 1. Monotonically increasing means that as the probability of the input function increases, the value of the function output also increases. In the following formula, the ⊙ operator represents the Hadamard product, which is the element multiplication of the corresponding positions between tensors. The specific formula is: (4).

[0010] 2. Disjunctive transition probability function: Unlike conjunction concepts, the attributes that constitute disjunctive concepts are not all necessary. Things can have one or more of these attributes, but not all of them. The disjunctive function also needs to be monotonically increasing, and the formula is expressed as: (5).

[0011] 3. Negation transition probability function: Under the truth value condition, negation logic behaves as an inverse truth value, that is, when a proposition is true, its negation is false; vice versa. At the same time, negation logic has some basic rules, such as the double negation rule. The negation function is different from the above disjunction and conjunction functions. It needs to maintain monotonically decreasing on the specified domain. It is specifically expressed as: (6).

[0012] The parallel query process uses the logical operator as the unique key value of multiple Map processes in the Map phase, and the probability tensor calculated by the inverse potential function is used as the value corresponding to the key value. In the Reudce phase, it is responsible for calculating the probability logical value of the same logical operator, assigning the logical operator according to the query tree structure, and pushing the new data into the corresponding partition to complete the parallel query calculation.

[0013] Beneficial effects of the method of the present invention: The present invention decomposes complex logic problems into first-order sub-problems, namely atomic queries, through the idea of ​​problem decomposition, and establishes a new type of probabilistic logic neural network to transfer the logical relationship between sub-problems. At the same time, the query efficiency is improved by constructing a time index and a parallel query process. The method not only has excellent performance in answer accuracy, but also consumes less time for querying. The method is more modular and solves a variety of complex logic problems, and makes more effective use of the time information in the problem. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1It is a flowchart of the steps of a complex logic query method for an incomplete temporal knowledge graph of the present invention; Figure 2 is an example diagram of a time index according to a specific embodiment of the present invention; Figure 3 It is a structural diagram of an incomplete temporal knowledge graph query according to a specific embodiment of the present invention; Figure 4 is an example diagram of an algorithm for performing a query based on a time index according to a specific embodiment of the present invention; Figure 5 It is a flow chart of a specific embodiment of the present invention for performing a ring connection operation on a ring query structure. DETAILED DESCRIPTION

[0015] The present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. The step numbers in the following embodiments are only provided for the convenience of explanation and description, and the order between the steps is not limited in any way. The execution order of each step in the embodiment can be adaptively adjusted according to the understanding of those skilled in the art.

[0016] Reference Figure 1 , Figure 2 , Figure 3 , Figure 4 and Figure 5 The present invention provides a complex logic query method for an incomplete temporal knowledge graph, which includes the following steps.

[0017] Step 1: Divide entities in the time dimension and quickly filter out irrelevant entities, thereby solving the problem of low efficiency of traditional time-series knowledge graph queries. The format of non-leaf nodes in the time index is (idx, MOL), where idx is a pointer from the node to its child node address, and MOL is the minimum outer segment data of the child node it points to. On this basis, the leaf node also contains a pointer to the entity information file (Info) of the node. The format of the Info file is (eArr, tArr), where eArr is a set of entities stored in the leaf node sorted by the frequency of entity occurrence, and tArr is the time information corresponding to the entity. The start and end times of the entities in the set in the time dimension are covered by the time range of their leaf nodes. At the same time, since the nodes in the index tree are organized in chronological order and the structure of the tree itself is ordered, order is maintained when data is stored. In order to enable the entity to obtain its time information through the index, the leaf node points to its brother node in turn, and the index information and its format are as follows. Figure 2 shown.

[0018] The specific steps of the algorithm for querying based on time index are as follows Figure 4 As shown: Input: query question and time index about entity query; Output: entity collection; 1. Whether the current node is the last entity query node, if so, the entity set is returned directly, otherwise the node in the time index is put into the queue; 2. Determine whether the node is a leaf node; 3. The leaf node determines whether the node meets the query node requirements. If it meets the requirements, the data pointed to by the node is written into the entity answer set. If it does not meet the requirements, the next node in the queue is started to judge; 4. The non-leaf node determines whether the time information of the node meets the time constraint of the query. If it meets the time constraint, the node is added to the query queue. If it does not meet the time constraint, the next round of node new message query is started. 5. Return the final entity node.

[0019] Step 2: Use the temporal knowledge graph embedding model to obtain the entities associated with the query time, sort the entity order according to the model score, and obtain the final query time result through the Info file information pointed to by the leaf node of the query time index.

[0020] The atomic formulas contained in the query are α 1 , α 2 and α 3 , and there are dependencies between atomic formulas that can form a closed loop, such as Figure 5 In order to eliminate the ring structure in the query, the FOL formula is negated according to De Morgan's law. This method can transform the interdependent conjunction logic relationship between atomic formulas into a relatively independent negation disjunction logic relationship. The transformed query structure is as follows: Figure 5 As shown in sub-figure (b) in .

[0021] Step 3: The step of logical transfer between atomic queries specifically includes: proposing the deficiencies of the temporal fact representation of the probabilistic logic network learning temporal knowledge graph embedding model, and comprehensively considering the query results, such as Figure 3 In addition, the logical probability matrix generated by multiple facts is flexibly divided and calculated in parallel to improve query efficiency.

[0022] The specific steps of the parallel query algorithm based on probabilistic logic neural network are as follows: Input: entity set, atomic query and logical relationship between them, temporal knowledge graph embedding model; Output: entity answer set; 1. Create an empty answer set and probability matrix, embed the entity set into the model through the time series knowledge graph to obtain the probability value matrix, and link the answer entity and probability value to obtain the entity-probability key-value pair; 2. Merge entity-probability key-value pairs with the same logical relationship; 3. Calculate the inverse potential function based on the probabilistic logic neural network and update the entity-probability key-value pair; 4. Send the entity-probability key-value pair to the Reduce stage for merging and updating; 5. Repeat the above steps until the final answer entity set is obtained.

[0023] The above is a specific description of the preferred implementation of the present invention, but the invention is not limited to the embodiments. Those skilled in the art may make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of this application.

Claims

1. A complex logic query method for incomplete temporal knowledge graphs, characterized by In the process of model training, this method decouples the embedding process of the temporal knowledge graph and the training process of the logic network, and in the process of the model answering the query question, the query question is decomposed into sub-questions so that the process can be carried out in parallel. This method does not seek to find an embedding method to infer or represent the query question and the intermediate variables generated in the process, but decomposes the complex query question into semantic information and logical information for independent processing. Finally, the logic between the semantic information, that is, the atomic query, is transferred to find the final query answer. The specific operation steps include: Step 1: In order to improve the query efficiency, the corresponding time index is designed at the beginning of the query to perform preliminary pruning of entities or relationships. And in the logic transfer stage, a parallel method is used to screen multiple candidate entities in parallel. Step 2: Based on the time index structure established in step 1, the answer process of the query question with time information is accelerated, and the query question with the result of time information is answered by reversely searching the time index. If there is a ring structure in the complex query question, a ring decomposition operation is performed. Step 3: For the logical transfer between atomic queries after the complex query problem is decomposed, the proposed probabilistic logic network learns the shortcomings of the temporal knowledge graph embedding model in representing temporal facts and comprehensively considers the query results. In addition, the logical probability matrix generated by multiple facts can be flexibly divided and calculated in parallel to improve query efficiency.

2. According to claim 1, a complex logic query method for incomplete temporal knowledge graphs is characterized in that: The step of designing a corresponding time index at the beginning of the query specifically includes: the format of the non-leaf node of the time index is (idx, MOL), idx is the pointer of the node to its child node address, and MOL is the minimum outer segment data of the child node it points to. On this basis, the leaf node also contains a pointer to the node entity information file (Info). The format of the Info file is (eArr, tArr), where eArr is the entity set stored in the leaf node sorted by the frequency of entity occurrence, and tArr is the time information corresponding to the entity. The start and end times of the entities in the set in the time dimension are covered by the time range of their leaf nodes, and all leaf nodes point to their brother nodes according to the time dimension.

3. According to claim 1, a complex logic query method for incomplete temporal knowledge graphs is characterized in that: The query problem whose answer is time information by reverse search of time index specifically includes: using the temporal knowledge graph embedding model to obtain entities associated with the query time, and obtaining the final query time result by querying the Info file information pointed to by the leaf node of the time index. For complex logical queries with a ring query structure, the De Morgan rate is used for logical conversion.

4. According to claim 1, a complex logic query method for incomplete temporal knowledge graphs is characterized in that: The above-mentioned learning of the temporal knowledge graph embedding model through the probabilistic logic network to comprehensively consider the query results based on the inadequacy of the temporal fact representation, which specifically includes: based on the important concept of potential function in Markov random field, the influence weights learned through the neural network W i , an inverse potential function is proposed to describe the dependency between variables in the input atomic formula tensor. Unlike the potential function, the larger the value of the inverse potential function, the stronger the dependency between these variables. The parallel query process uses the logical operator as the unique key value of multiple Map processes in the Map phase, and the probability tensor calculated by the inverse potential function is used as the value corresponding to the key value. In the Reudce phase, it is responsible for calculating the probabilistic logical value of the same logical operator, assigning the logical operator according to the query tree structure, and pushing the new data into the corresponding partition to complete the parallel query calculation.

Citation Information

Patent Citations

  • Distributed attention time sequence knowledge graph reasoning method

    CN115033662A

  • Space-time knowledge graph indexing method and related equipment

    CN117033541A

  • Indexing method and system for space-time mapping knowledge domain

    CN118394877A

  • Time sequence knowledge graph logical reasoning method and device based on time probability distribution

    CN118504695A

  • Method and apparatus for processing spatio-temporal join query

    KR101997004B1