A multi-layer path-aware based knowledge graph extrapolation method and system

By employing a multi-layer path-aware knowledge graph extrapolation method, and utilizing relational graph convolutional networks and multi-classification tasks, the incompleteness problem in temporal knowledge graphs is solved, achieving high-accuracy prediction of future events and enhanced interpretability.

CN115757804BActive Publication Date: 2025-11-25HUAZHONG UNIV OF SCI & TECH
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211088984.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-06
Publication Date
2025-11-25
Estimated Expiration
2042-09-06

AI Technical Summary

Technical Problem

Existing temporal knowledge graph models cannot effectively predict future events when dealing with incompleteness, and they ignore unseen entities or relationships in history, resulting in low reasoning accuracy and incomplete scene topology.

Method used

We employ a knowledge graph extrapolation method based on multi-layer path awareness. By learning the embedded representations of entities, relations, and timestamps through a relational graph convolutional network encoder, we design an emerging task processing unit, construct a multi-layer entity set, and use a multi-classification task solution to obtain the predicted probability distribution of the target entity.

Benefits of technology

It achieves high-accuracy prediction of future events, can flexibly handle reasoning scenarios that include entities or relationships not seen in history, and provides stronger semantic expressiveness and interpretability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115757804B_ABST
    Figure CN115757804B_ABST
Patent Text Reader

Abstract

The application relates to a multi-layer path perception-based knowledge graph extrapolation method and system. The knowledge graph extrapolation method comprises the following steps: learning embedded representations of entities, relationships and timestamps by applying a relational graph convolution network encoder to capture the dynamic evolution of facts; designing a new task processing unit to construct a multi-layer entity set and match the entity sets of different layers with corresponding historical relevance; dividing the prediction task into multiple reasoning scenarios and connecting each reasoning scenario to a corresponding level processing unit to complete the division of the multi-layer historical relevant entity set; using a multi-classification task solution method to obtain the prediction probability distribution of the target entity, taking the entity with the highest probability as the prediction answer to complete the extrapolation task of the time-series knowledge graph. The prediction task is divided into reasoning scenarios according to whether the entity and relationship that do not exist in the history exist. The knowledge graph extrapolation system comprises a processor capable of processing program code information of the knowledge graph extrapolation method.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of temporal knowledge graph reasoning, and particularly relates to a knowledge graph extrapolation method and system based on multi-layer path perception. BACKGROUND

[0002] A knowledge graph is a series of various different graphs that show the development process and structural relationship of knowledge, and uses visualization technology to describe knowledge resources and their carriers, and to mine, analyze, construct, draw, and display knowledge and their mutual connections. A knowledge graph combines theories and methods of applied mathematics, graphics, information visualization technology, information science, and other disciplines with methods such as citation analysis and co-occurrence analysis, and uses a visual graph to visually display the core structure, development history, frontier field, and overall knowledge architecture of a discipline to achieve the purpose of multidisciplinary integration.

[0003] A temporal knowledge graph is a new form of representation of a series of temporal facts (or knowledge) in the real world, and is commonly stored in the form of a quadruple, that is, (subject entity, predicate relationship, object entity, time stamp), which is abbreviated as (s, r, o, t). A temporal knowledge graph has rich semantic information such as concepts, attributes, and relationships, and enables machine language cognition, and is widely used in basic natural language processing tasks such as common sense knowledge extraction and reading comprehension. In addition, a temporal knowledge graph enables knowledge-guided and interpretable artificial intelligence, and can help to implement recommendation systems and intelligent dialogue systems.

[0004] Temporal knowledge graph reasoning is essentially predicting new facts from existing temporal facts, that is, knowledge completion or link prediction. If a quadruple (s, r, o, [t0, t1]) is established in the time stamp interval from t0 to t1, then temporal knowledge graph reasoning can be divided into two modes: extrapolation and extrapolation. The main difference between the two modes is that the time stamp of the known fact in the extrapolation setting can be later than t1, while the time stamp of the known fact in the extrapolation setting is earlier than t1. Existing reasoning models mostly focus on extrapolation, while extrapolation models have also received some attention in recent years, including models that use time embedding, time hyperplane, and additive time series decomposition to encode time information, models that capture rich interaction information between time and multi-relation features by rotating facts, and models that use message passing networks to capture graph snapshot neighborhood information.

[0005] CN114780739A discloses a time graph convolution network-based time knowledge graph completion method and system. The time graph convolution network of the invention includes three modules: a structure encoder, a time encoder, and a decoder. The invention first selects a time knowledge graph to be completed and determines the target time step of the time knowledge graph to be completed. Then, the structure encoder generates entity embedding vectors and relation embedding vectors for each time step of the time knowledge graph. Next, the time encoder generates the final embedding vectors of entities and relations at the predicted time step. Finally, the decoder predicts the missing content in the time knowledge graph to be completed based on the final embedding vectors of the head entity s, the relation r, and the tail entity o at time step t, and completes the time knowledge graph. The invention can effectively improve the accuracy of the time knowledge graph completion task.

[0006] CN112860918A discloses a time knowledge graph representation learning method based on co-evolution modeling. The invention initializes the parameters of the model and the embedding representation of any entity and relation based on the time knowledge graph to be represented. The occurrence probability of each known fact is calculated, and the evolution loss of the local structure is obtained by maximizing the occurrence probability of the known fact. The soft modularity of the graph structure of each time knowledge graph snapshot is calculated, and the evolution loss of the global structure is maximized. The overall loss function of the model is calculated. The overall loss function of the model is iteratively optimized using the gradient descent method until the model converges. The invention solves the problem of obtaining accurate embedding representation due to the neglect of the evolution nature of the time knowledge graph in previous work.

[0007] However, with the wide application in various fields, the time knowledge graph is usually incomplete, and limited by the assumption of closed world and existing facts, which limits the development breadth and depth of time knowledge graph application programs and hinders the accuracy and explainability of many reasoning applications. For example: (1) the existing model cannot predict the events at future time stamps in sequence without the facts given by the previous events within a certain time stamp range; (2) the existing model encodes the history records of each query separately, so the efficiency is low; (3) the existing model does not specially consider the unseen entities or relations in the prediction task, which will greatly reduce the reasoning accuracy.

[0008] In addition, on the one hand, there are differences in understanding between technical personnel in the field; on the other hand, the applicant has studied a large number of literatures and patents when making the invention, but due to the limited space, all the details and contents are not listed in detail, which does not mean that the invention does not have these characteristics of the prior art. On the contrary, the invention already has all the characteristics of the prior art, and the applicant reserves the right to add relevant prior art in the background art. SUMMARY

[0009] In view of the deficiencies of the prior art, the present application provides a knowledge graph extrapolation method and system based on multi-layer path perception, in particular, a computing model that flexibly handles prediction tasks containing entities or relationships invisible in history by performing multi-layer path mining around historical events, to at least solve the above technical problems.

[0010] Preferably, in view of the incompleteness of the time sequence knowledge graph, some existing models ignore the consideration of the prediction task containing information invisible in history, resulting in weak reasoning ability and inaccurate results, and some existing models only consider invisible entities, resulting in imperfect topology structure of the reasoning scene, the present application designs a knowledge graph extrapolation method based on time sequence multi-layer path perception, which can predict potential future events based on historical facts, can mine implicit knowledge, and is more practically meaningful than static methods and dynamic extrapolation methods.

[0011] The present application provides a novel knowledge graph extrapolation model TMP-Net based on multi-layer path perception, which continuously learns the representation of entities, relationships and timestamps for each snapshot, thereby having the ability to capture long-term dependencies, making the model more semantically expressive; further, it can divide the existing entity set according to historical relevance to provide four layers of entity sets with different relevance for the prediction task, combining the mechanisms of reviewing known and looking into unknown, and making relatively accurate predictions. The special feature is that entities and relationships are considered separately, which can flexibly handle four reasoning scenarios containing entities or relationships invisible in history, a new task processing unit is designed to complete the mining of four layers of entity sets for the four reasoning scenarios, a multi-classification task solving method is used to obtain the prediction probability distribution of the target entity, and a certain explainability is provided for the reasoning result.

[0012] The present application discloses a knowledge graph extrapolation method based on multi-layer path perception, which comprises:

[0013] An application relationship graph convolution network encoder is used to learn the embedded representation of entities, relationships and timestamps, and to capture the dynamic evolution of facts;

[0014] A new task processing unit is designed to construct a multi-layer entity set, and to match the historical relevance of different layers of entity sets;

[0015] The prediction task is divided into multiple reasoning scenarios, and each reasoning scenario is connected to the corresponding processing unit at different levels to complete the division of the multi-layer historical relevant entity set;

[0016] A multi-classification task solving method is used to obtain the prediction probability distribution of the target entity, and the entity with the highest probability is taken as the prediction answer to complete the extrapolation task of the time sequence knowledge graph,

[0017] The prediction task is to divide the inference scene according to whether the entity and the relationship that do not exist in the history.

[0018] According to a preferred embodiment, the emerging task processing unit searches for entities related to the prediction task in the existing facts as the first, second and third layer entity sets, and obtains entities that do not exist in the history as the fourth layer entity set from the entire entity set of the data set, wherein the first layer is the entity set directly connected with the relationship predicate of the prediction task, the second layer is the entity set reachable by one hop and two hops from the subject entity of the prediction task, the third layer is the entity set reachable by multiple hops in the remaining path of the existing facts, and the fourth layer is the entity set that cannot be seen in the history.

[0019] According to a preferred embodiment, the historical relevance degree set for the four-layer entity set is scalarized from the inside to the outside by the number of layers as α, β, γ and δ, wherein α>β>γ>δ, and α+β+γ+δ=1.

[0020] According to a preferred embodiment, the prediction task can at least divide the following four inference scenes: scene 1 without unseen entities and relationships, scene 2 with only unseen entities, scene 3 with only unseen relationships, and scene 4 with both unseen entities and relationships.

[0021] According to a preferred embodiment, different numbers of layers of multi-layer path extrapolation are used for processing according to different prediction tasks, and each inference scene is connected to the processing unit of the corresponding layer, wherein the different numbers of layers of multi-layer path extrapolation correspond to the multi-layer entity set.

[0022] According to a preferred embodiment, each entity, relationship and timestamp data of the data set is mapped to a low-dimensional dense vector space, all predetermined parameters are initialized by Xavier initialization, and then the global loss is minimized by using the cross-entropy loss function to optimize parameter learning.

[0023] According to a preferred embodiment, an ω-layer relationship graph convolution network encoder is used for representation learning to aggregate and extract features from different relationships, wherein the ω-layer relationship graph convolution network encoder is represented as:

[0024]

[0025] In the formula, respectively, the first layer embedding of the entity s and o on the graph snapshot at the timestamp t T respectively, the weight matrix for aggregating features from different relationships and the first layer self-loop matrix.

[0026] ​​According to a preferred embodiment, the multi-classification task solving method can apply a multi-layer perceptron and a SoftMax logistic regression model to convert the prediction task into an entity multi-classification task, wherein each class corresponds to the probability of each target entity, so as to take the entity with the highest probability as the predicted answer.

[0027] According to a preferred embodiment, the final prediction is the entity with the highest combined probability, defined as follows:

[0028]

[0029] The application also discloses a knowledge graph extrapolation system based on multi-layer path perception, comprising at least one processor configured to:

[0030] apply a relation graph convolution network encoder to learn embedded representations of entities, relations and timestamps, and capture the dynamic evolution of facts;

[0031] design an emerging task processing unit to build multi-layer entity sets and match the entity sets of different layers with corresponding historical relevance;

[0032] divide the prediction task into multiple reasoning scenarios and connect each reasoning scenario to a corresponding level processing unit to complete the division of multi-layer historical relevant entity sets;

[0033] use a multi-classification task solving method to obtain the prediction probability distribution of the target entity, and take the entity with the highest probability as the predicted answer to complete the extrapolation task of the time-series knowledge graph,

[0034] wherein the prediction task is divided into reasoning scenarios according to whether the entity and relation that do not exist in the history exist.

[0035] Preferably, the emerging task processing unit is configured in the processor.

[0036] Preferably, the knowledge graph extrapolation method based on time-series multi-layer path perception of the application comprehensively considers the entities and relations that cannot be seen in the history, and accordingly designs an emerging task processing unit and four reasoning scenarios (no unseen entity and relation, only unseen entity, only unseen relation, and both unseen entity and relation). To address the challenges of reasoning scenarios 1, 2 and 3, this method innovatively considers entities and relations separately, performs path mining in known facts based on historical relevance, and obtains entity sets directly connected to the relation (first layer of relevance), entity sets reachable by two-hop and multi-hop of the relation (second and third layers of relevance); to solve reasoning scenario 4, this method obtains entity sets that do not exist in the history (fourth layer of relevance); finally, joint four-layer reasoning mode, and use a multi-classification task solving method to obtain a prediction probability distribution to complete fact reasoning. BRIEF DESCRIPTION OF DRAWINGS

[0037] Figure 1 is a TMP-Net model structure diagram of a preferred embodiment provided by the present application.

[0038] Figure 2 is a modeling flowchart of an emerging task processing unit of a preferred embodiment provided by the present application.

[0039] LIST OF REFERENCE NUMERALS

[0040] s E : existing subject entity; s N : invisible subject entity; r E : existing relation predicate; r N : invisible relation predicate; t q : timestamp. DETAILED DESCRIPTION

[0041] The following will be described in detail with reference to the accompanying drawings.

[0042] Figure 1 is a TMP-Net model structure diagram of a preferred embodiment provided by the present application. Figure 2 is a modeling flowchart of an emerging task processing unit of a preferred embodiment provided by the present application.

[0043] The present application provides a knowledge graph extrapolation method based on multi-layer path perception. The present application can also provide a knowledge graph extrapolation system based on multi-layer path perception, which can be a device using the knowledge graph extrapolation method or an electronic device with a knowledge graph extrapolation function, etc. Preferably, the knowledge graph extrapolation system can include an emerging task processing unit.

[0044] The present application can also provide a storage medium storing program code information of the knowledge graph extrapolation method of the present application.

[0045] The present application can also provide a processor capable of running the program code information of the knowledge graph extrapolation method of the present application. Preferably, the emerging task processing unit can be configured in the processor.

[0046] Preferably, the knowledge graph refers to a directed graph composed of a large number of nodes and edges, the nodes represent entity concepts in reality, and the edges represent rich association relationships between entities, wherein each piece of knowledge is generally in the form of a triple, indicating that there is a relationship between the head entity and the tail entity.

[0047] Further, the time sequence knowledge graph is a new form of expression of a series of time sequence facts (or knowledge) in the real world, which is often stored in the form of a quadruple, that is, (subject entity, predicate relationship, object entity, time stamp), which is abbreviated as (s, r, o, t).

[0048] Preferably, the multi-layer path perception is an experimental method adopted by the present application, that is, by multi-layer path mining, each layer has its corresponding method of obtaining an entity set.

[0049] Preferably, the subgraph is a subgraph of the time sequence knowledge graph at a certain time stamp, and the time sequence knowledge graph is composed of quadruples, so that after sorting according to the time stamp from small to large, all the quadruples can be naturally divided into subgraphs according to the time stamp.

[0050] Preferably, the convolutional network encoder is a relation graph convolutional network encoder, wherein the relation graph convolutional network, that is, R-GCN, is a deep learning neural network model, which can help to realize the link prediction task, because R-GCN is an encoder-decoder model, which is originally used as follows: first, use the encoder to represent all entities and relationships as vectors through encoder representation learning, and then use the decoder (generally a scoring function) to obtain the prediction probability distribution of each entity. Specifically, in the present application, only the encoder of the relation graph convolutional network is used to obtain the vector representation of the entity, the relationship and the time stamp, and then a multi-layer perception and a Softmax are used to realize a multi-classification task.

[0051] Preferably, the initialization tool Xavier initialization is a variable initialization method for solving the problem of random initialization, the main idea of which is to make the input and output as much as possible to follow the same distribution, so as to avoid the output value of the activation function of the subsequent layer tending to 0. Specifically, in the present application, the gradient vanishing (the gradient is particularly close to 0) and the gradient explosion (the gradient is particularly large) are prone to occur during network training, which leads to the fact that most of the gradients obtained by back propagation do not work or work in the opposite direction (back propagation is mainly realized by the cross-entropy loss function and the Adam optimizer in the present application), so it is particularly important to reasonably initialize all the vectors and variables to be trained. According to the excellent performance of Xavier initialization, the entity, relationship, time stamp vector, and weight, offset and other training parameters are initialized in the present application.

[0052] Preferably, the cross-entropy loss function, CrossEntropy Loss Function in deep learning, is a commonly used loss function in dealing with classification problems. Specifically, the application uses it to obtain the loss between the prediction result after each training and the correct result, and uses the Adam optimizer to propagate the reverse gradient descent, which is used to update all the trained variables in real time to achieve the purpose of more accurate prediction results in the next training.

[0053] Preferably, the multi-layer perceptron, MLP, is a simple and original neural network model, which is commonly used to implement multi-classification tasks. A general multi-layer perceptron includes three layers: an input layer, a hidden layer and an output layer, and the different layers are fully connected (fully connected means that any neuron in the previous layer is connected to all neurons in the next layer), and its implementation includes three elements: weight, bias and activation function, which correspond to W mlp , b mlp and tanh in the formula in this paper. Specifically, the multi-layer perceptron receives the vector of the four types of entity sets trained by the relational graph convolutional network encoder through multi-layer path perception, uses the activation function after the hidden layer to limit the output of each entity in the multi-layer perceptron to a numerical range of (-1, 1).

[0054] Preferably, the logistic regression algorithm is a machine learning algorithm widely used in various fields, and Softmax is one of them, which is commonly used in multi-classification task models, and can convert the output value of multi-classification into a probability distribution with a range of [0, 1] and a value of 1. Specifically, the application uses Softmax to receive the output of each entity in the prediction from the multi-layer perceptron, converts it into the prediction probability of each entity, and the maximum (max) is the candidate entity.

[0055] Preferably, the goal of deep learning is to constantly change network parameters so that the parameters can make various nonlinear transformations on the input to fit the output. Essentially, it is a function to find the optimal solution, so how to update the parameters is the focus of deep learning research. The algorithm commonly used to update the parameters is called the optimizer, which literally means optimizing the parameters of the network model through what algorithm. The commonly used optimizer is gradient descent. The Adam optimizer is a first-order optimization algorithm that can replace the traditional stochastic gradient descent process, which can iteratively update the weights of the neural network based on the training data. Specifically, the application uses the Adam optimizer to iteratively update and optimize the parameters of the entire model training process in order to improve the prediction accuracy.

[0056] Preferably, in the present application, the predicted timestamp is defined as a future timestamp, and the timestamp before it is defined as a past timestamp, i.e. a historical fact. Therefore, the existing entity is an entity contained in the historical four tuple; the invisible entity is an entity that has never appeared in the history; the existing relationship is a relationship predicate contained in the historical four tuple; and the invisible relationship is a relationship that has never appeared in the history.

[0057] According to a preferred embodiment, the multi-layer path-aware knowledge graph extrapolation method of the present application comprises the following steps:

[0058] S1. Subgraph division of the time-series knowledge graph according to timestamps The relationship graph convolution network encoder is applied to learn the embedded representation of entities, relationships and timestamps, and to capture the dynamic evolution of facts.

[0059] Specifically, all training parameters are initialized using Xavier initialization, and each snapshot is continuously divided into training batches to learn the representation, and to capture the dynamic evolution of facts.

[0060] S2. Design a new task processing unit to construct a multi-layer entity set and match the corresponding historical relevance of the entity set in different layers.

[0061] Specifically, the new task processing unit searches for entities related to the prediction task in the existing facts as the first, second and third layer entity sets, obtains entities that have never appeared in the entire entity set of the dataset as the fourth layer entity set, and matches the corresponding historical relevance of the above four layer entity sets.

[0062] S3. Divide the prediction task into four reasoning scenarios and connect each reasoning scenario to the corresponding level processing unit to complete the division of the four-layer historical relevant entity set.

[0063] Specifically, the prediction task is divided into four reasoning scenarios according to whether the entity and relationship that have never appeared in the history exist.

[0064] S4. Use a multi-classification task solving method to obtain the prediction probability distribution of the target entity, and finally take the entity with the highest probability as the prediction answer.

[0065] Specifically, the vector representation of the four-layer entity set is combined in the first part, a multi-layer perceptron is used to access a Softmax logistic regression model to obtain the prediction probability distribution of the target entity, and finally the entity with the highest probability is taken as the prediction answer to complete the extrapolation task of the time-series knowledge graph.

[0066] Preferably, in step S1, the time sequence knowledge graph is arranged in ascending order of timestamp. Preferably, in step S1, the "application relation graph convolution network encoder learns the embedded representation of entities, relations and timestamps", mainly contains the following functions:

[0067] (1) Map each entity, relation and timestamp data of the data set to a low-dimensional dense vector space, initialize all parameters by Xavier initialization, and then minimize the global loss using the cross-entropy loss function to optimize parameter learning;

[0068] (2) Use the ω-layer relation graph convolution network encoder for representation learning, aggregate and extract features from different relations, and make the entity pairs with relations on each timestamp rich in certain calculation and correlation.

[0069] Further, Figure 1 In the vector and parameter training process in the TMP-Net model structure diagram, the entity, relation, timestamp vector, weight, offset, and other training parameters are mapped to a low-dimensional continuous vector space as input, and the commonly used initialization tool Xavier initialization in deep learning is used to let the relation graph convolution network learn more useful semantic information in the training process, wherein the ω-layer relation graph convolution network encoder is represented as:

[0070]

[0071] In the formula, The lth layer embedding of entity s and o on the graph snapshot T at timestamp t , respectively, The weight matrix and the lth layer self-loop matrix for aggregating features from different relations, respectively.

[0072] In order to optimize parameter learning, TMP-Net adopts a multivariate cross-entropy loss function:

[0073]

[0074] In the formula, ε t is the entity set of snapshot , p(o i |s,r,t) is the combined probability value of the i-th object entity when the real object entity is o q under the condition of given query (s,r,?,t truth ), and the training loss is performed using the Adam optimizer.

[0075] Preferably, in step S2, the emerging task processing unit searches for entities related to the predicted task history in the existing facts as the first, second, third layer entity set, and obtains entities that have never appeared in the entire entity set of the data set as the fourth layer entity set.

[0076] Illustratively, taking the predicted object (s, r,?, t q ) as an example, the emerging task processing unit learning process includes the following steps:

[0077] (1) All entities directly connected to the relationship of the predicted task in the existing facts as the first layer of multi-layer path extrapolation;

[0078] (2) Search for the entity set reachable in one hop and two hops from the subject entity of the predicted task in the existing facts to form the second layer of multi-layer path extrapolation;

[0079] (3) The entity set reachable in multiple hops in the remaining paths of the existing facts to form the third layer of multi-layer path extrapolation to eliminate the limitations brought by two-hop path search;

[0080] (4) Based on the possibility of unseen entities in the history of the target predicate, difference analysis is performed on the entire entity set to obtain the entity subset that has never appeared to form the fourth layer of multi-layer path extrapolation;

[0081] (5) Then, the first, second, third, and fourth layer entity sets are assigned a historical correlation degree, and the layers are marked from the inside out as α, β, γ, and δ, to realize the interaction in the entire training and reasoning stage.

[0082] Further, taking the predicted object (s, r,?, t q ) as an example, the first layer is the entity set directly connected to the relationship predicate of the predicted task, the second layer is the entity set reachable in one hop and two hops from the subject entity of the predicted task, the third layer is the entity set reachable in multiple hops in the remaining paths of the existing facts, and the fourth layer is the entity set that is unseen in the history to eliminate the influence of the target predicate which may be an unseen entity in the history, which are respectively represented as where X, Y, Z, U are N-dimensional multi-hot indicator vectors, N is the total number of entity sets in the data set, and the specific implementation process can be as shown in Figure 2 .

[0083] Preferably, the historical correlation degree matched for the four-layer entity set is marked from the inside out as α, β, γ, and δ, where α>β>γ>δ, and α+β+γ+δ=1.

[0084] Further, the history correlation table acquired by the TMP-Net can be expressed as:

[0085]

[0086] Preferably, if an entity appears in X, Y and Z at the same time, the prediction probability of the entity is superimposed accordingly, and c (s,r) The maximum and minimum scalar of the entity in the middle are 1 and 0, respectively.

[0087] Preferably, in step S3, the TMP-Net can divide the prediction task into the following four inference scenarios according to whether s, r is s N , r N , respectively: case 1: (s E , r E ,?, t q ), case 2: (s N , r E ,?, t q ), case 3: (s E , r N ,?, t q ) and case 4: (s N , r N ,?, t q ), wherein s E and s N represent the existing and invisible subject entities, respectively, and r E and r N represent the existing and invisible relationship predicates, respectively. Therefore, the type of the prediction task needs to be identified first, and then the emerging task processing unit adopts the corresponding procedures in Figure 2 to obtain the entity set with different degrees of correlation with the query history.

[0088] Further, different numbers of layers of multi-layer path extrapolation are adopted according to different prediction tasks, and each inference scenario is connected to the processing unit of the corresponding layer, so as to complete the division of the four-layer history-related entity set.

[0089] Specifically, scenario 1 passes through the first, second, third and fourth layers of multi-layer path perception, scenario 2 passes through the first, third and fourth layers of multi-layer path perception, scenario 3 passes through the second, third and fourth layers of multi-layer path perception, and scenario 4 passes through the third and fourth layers of multi-layer path perception.

[0090] Further, the more relevant an entity is to the query, the greater its prediction probability will be.

[0091] Preferably, in step S4, a multi-layer perceptron and Softmax logistic regression model can be applied to transform the prediction task into an entity multi-classification task, where each class corresponds to the probability of each target entity, so that the entity with the highest probability is naturally taken as the predicted answer, completing the knowledge graph prediction task.

[0092] Further, the TMP-Net dedicated to predicting events that have not yet occurred compared to existing facts can first use a multi-layer perceptron to train an index vector V O ;

[0093] Then, by adding c (s,r) to V O , the estimated probability of the entity most relevant to the given query is increased:

[0094]

[0095] In the formula, are training parameters, and tanh is a nonlinear activation function.

[0096] Finally, the Softmax function is used to estimate the probability of the target predicate entity in the existing facts:

[0097] In the formula, p(r) is an N-dimensional vector containing the reasoning probabilities of all entities, and the maximum dimension in p(r) ultimately represents the target object entity.

[0098] Preferably, the final prediction will be the entity with the highest combined probability, defined as follows:

[0099]

[0100] In the formula, p(o|s, r, t q ) is another representation of p(r), representing the prediction probability distribution in the existing facts.

[0101] Preferably, to complete the training closed loop of testing, the cross-entropy loss function of the first part is used to update the tensor and parameters during the training process to adjust the prediction results appropriately.

[0102] Illustratively, the server device used by the knowledge graph extrapolation method of the present application is Dell R740, with a central processing unit (CPU) of Intel(R) Xeon(R) Gold 6132 @ 2.60 GHz, a graphics processing unit (GPU) of Tesla M40, a memory capacity of 128 GB DDR4 RAM, and a storage capacity of 1 TB SSD + 4 TB HDD.

[0103] Preferably, the knowledge graph extrapolation method of the present application or the server applying the knowledge graph extrapolation method can be used in a comprehensive technology service platform to provide recommendation (reasoning) services of technology data for users. For example, it can be applied to platforms such as CNKI, VIP, and Wanfang to provide recommendation (reasoning) services of technology data such as papers, patents, and projects.

[0104] Specifically, when a user searches data in a comprehensive technology service platform, the present application can automatically recommend technology data in related fields in a time sequence knowledge graph according to the user's historical search records and the pre-set favorite tags. In this case, if searching for paper data, the vertices represent important attribute information of the paper, such as the conference / journal of publication, the year, or the author, name, and total number of pages of the paper, i.e., the nodes of the time sequence knowledge graph visualization; the edges represent the dependent relationship between the vertices, which can be specific to a certain attribute relationship, such as the conference / journal belonging to a certain organization, the author working for a certain unit, or the paper being published in a certain year, i.e., the edges of the time sequence knowledge graph visualization. Since entities evolve over time, the dependent relationship records the time period of the attribute relationship (also known as the survival period), such as the effective period of all related information about a paper, which starts from the time when the paper is accepted, and the survival period is permanent because an accepted paper will not be withdrawn unless there is a serious academic integrity problem. In addition, for example, the life information of a person (Isaac Newton, born on January 4, 1643, and died on March 31, 1727) can only be trusted or recognized within the corresponding time period ([1643.1.3, 1727.3.31]), and outside this period it is not trusted or recognized.

[0105] Preferably, the data processed by the processor can be text (.txt), structured relational data such as tables (.xls,.xlsx,.csv,.sql), or graph data of a Neo4j graph database. In the server backend, a KGQL data processing unit (mainly implemented by Java programming language) is constructed, which communicates between systems by calling platform API interfaces to interactively collect the above-mentioned data. The application layer network protocol used is HTTPS (HTTP channel with security as the goal), which has the advantage of protecting the security of data compared with HTTP. On this basis, KGQL processes the data collected through the interface to form a series of quadruple knowledge, which is finally delivered to the processor for subsequent work inside the server.

[0106] Preferably, the server will transmit the processed data to the SSD, HDD, etc. disk array storage system, and then save it through the MYSQL, Neo4j, etc. database management system to provide reorganization and management services for data; and on this basis, provide data support for subsequent applications to realize the knowledge representation learning function, multi-functional data retrieval service, multi-dimensional data analysis and statistical service, and high-precision data reasoning and recommendation service; and finally applied to the transformation and application demonstration of scientific and technological achievements in the comprehensive science and technology service platform, to provide all-round science and technology service functions for government units or individual enterprises.

[0107] Preferably, after processing, the data is stored in the database in the storage mode of the time sequence knowledge graph, which can be transmitted to the knowledge representation learning module by the database interface, and the vector representation of each entity, relationship and timestamp can be obtained using GPU acceleration; it can be transmitted to the multi-layer path mining module by the database interface to obtain entity sets with different historical relevance; it can be transmitted to the knowledge reasoning module by the database interface to obtain relevant data for queries, and API interface is used to provide data recommendation services for the comprehensive science and technology service platform.

[0108] It should be noted that the above specific embodiments are exemplary, and those skilled in the art can think of various solutions under the inspiration of the disclosure of the present application, and these solutions also belong to the disclosed range of the present application and fall within the protection scope of the present application. Those skilled in the art should understand that the specification and drawings of the present application are illustrative and not constitute a limitation on the claims. The protection scope of the present application is defined by the claims and their equivalents. The specification of the present application contains multiple inventive concepts, such as "preferably", "according to a preferred embodiment" or "optionally", which means that the corresponding paragraph discloses an independent concept, and the applicant reserves the right to file a divisional application according to each inventive concept. Throughout the text, the features introduced by "preferably" are only optional ways, and should not be understood as necessarily set, therefore the applicant reserves the right to abandon or delete the relevant preferred features at any time.

Claims

1. A multi-layer path-aware based knowledge graph extrapolation method, characterized in that, It comprises: The application of a relational graph convolutional network encoder learns the embedding representation of entities, relationships, and timestamps, capturing the dynamic evolution of facts; Design a new task processing unit to search for entities related to the prediction task in existing facts as the first, second, and third layers of entity sets, and obtain entities that have never appeared in the entire entity set of the dataset as the fourth layer of entity sets, where the first layer is the entity set directly connected to the relationship predicate of the prediction task, the second layer is the entity set reachable by one-hop and two-hop from the subject entity of the prediction task, the third layer is the entity set reachable by multiple hops in the remaining path of existing facts, and the fourth layer is the entity set that cannot be seen in history, to construct a multi-layer entity set, and match the corresponding historical relevance of the entity sets in different layers; Divide the prediction task into multiple reasoning scenarios, including scenario 1 without unseen entities and relationships, scenario 2 with only unseen entities, scenario 3 with only unseen relationships, and scenario 4 with both unseen entities and relationships, and process different layers of multi-layer path extrapolation according to the different prediction tasks, and connect each reasoning scenario to the corresponding processing unit at different levels to complete the division of the multi-layer historical relevant entity set, where the different layers of multi-layer path extrapolation correspond to the multi-layer entity set. Use a multi-classification task solving method to obtain the prediction probability distribution of the target entity, and take the entity with the highest probability as the prediction answer to complete the extrapolation task of the time series knowledge graph. The prediction task is divided into reasoning scenarios according to whether the entity and relationship that have never appeared in history exist. Map each entity, relationship, and timestamp data in the dataset to a low-dimensional dense vector space, initialize all parameters using Xavier initialization, and then minimize the global loss using the cross-entropy loss function to optimize parameter learning.

2. The knowledge graph extrapolation method of claim 1, wherein, The historical relevance set for the four-layer entity set is scalarized from the inside out by the number of layers , , and where and .

3. The knowledge graph extrapolation method of claim 1, wherein, The multi-classification task solving method can apply a multi-layer perceptron and a SoftMax logistic regression model to convert the prediction task into an entity multi-classification task, where each class corresponds to the probability of each target entity, so that the entity with the highest probability is taken as the prediction answer. 4.The knowledge graph extrapolation method of claim 1, wherein, The present application relates to a method for training a neural network for image recognition, comprising the steps of: The layer-wise relational graph convolutional network encoder is represented as: The layer-wise relational graph convolutional network encoder is represented as: , wherein, , are the first-layer embeddings of entities s and o on the snapshot of the knowledge graph at timestamp , , are the weight matrices for aggregating weights from different relation features and the first-layer self-loop matrix, respectively.​​​ 5. The knowledge graph extrapolation method of claim 1, wherein, It comprises at least one processor configured to:

6. The knowledge graph extrapolation method of claim 5, wherein, Final prediction is the entity that obtains the highest combined probability, defined as follows: 。 7. A multi-layer path-aware based knowledge graph extrapolation system, characterized in that, Apply a relational graph convolutional network encoder to learn the embedding representation of entities, relationships, and timestamps, capturing the dynamic evolution of facts; Design a new task processing unit to search for entities related to the prediction task in existing facts as the first, second, and third layers of entity sets, and obtain entities that have never appeared in the entire entity set of the dataset as the fourth layer of entity sets, where the first layer is the entity set directly connected to the relationship predicate of the prediction task, the second layer is the entity set reachable by one-hop and two-hop from the subject entity of the prediction task, the third layer is the entity set reachable by multiple hops in the remaining path of existing facts, and the fourth layer is the entity set that cannot be seen in history, to construct a multi-layer entity set, and match the corresponding historical relevance of the entity sets in different layers; ​ The prediction task is divided into multiple inference scenarios, including scenario 1 without visible entities and relationships, scenario 2 only with visible entities, scenario 3 only with visible relationships, and scenario 4 with both visible entities and relationships, and different layers of multi-layer path extrapolation are used for processing according to different prediction tasks. Each inference scenario is connected to the corresponding processing unit at different levels to complete the division of the multi-layer historical related entity set, wherein the different layers of multi-layer path extrapolation correspond to the multi-layer entity set. A multi-classification task solving method is used to obtain the prediction probability distribution of the target entity, and the entity with the highest probability is taken as the prediction answer to complete the extrapolation task of the time sequence knowledge graph. Among them, The prediction task is divided into inference scenarios according to whether the entity and relationship in the history exist or not.

Citation Information

Patent Citations

  • Time sequence knowledge graph representation learning method based on co-evolution modeling

    CN112860918A

  • Hierarchical perception tense knowledge graph representation learning method

    CN113688253A

  • Time sequence knowledge graph completion method and system based on time graph convolutional network

    CN114780739A