A knowledge graph completion method based on decoupled representation

By using a completion model based on decoupled representations, and employing multiple mapping matrices and orthogonal regularization methods in conjunction with LSTM networks, the problems of long-tailed relationships and entity ambiguity in knowledge graphs are solved, achieving higher completion accuracy and interpretability of entity representations.

CN115221253BActive Publication Date: 2025-12-19CHONGQING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210850951.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-20
Publication Date
2025-12-19
Estimated Expiration
2042-07-20

AI Technical Summary

Technical Problem

Existing knowledge graph representation learning algorithms struggle to effectively train long-tail relation triples and cannot effectively model entity ambiguity, making entity representations difficult to interpret.

Method used

A completion model based on decoupled representation is adopted. Through a two-layer linear network and an LSTM network, multiple mapping matrices are used to obtain independent entity representations. The similarity calculation of entity pairs is trained by combining orthogonal regularization and maximum margin loss function.

Benefits of technology

It improves the accuracy of knowledge graph completion in long-tail relationship scenarios and enhances the interpretability of entity representation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115221253B_ABST
    Figure CN115221253B_ABST
Patent Text Reader

Abstract

The application belongs to the field of knowledge graph completion, and particularly relates to a knowledge graph completion method based on decoupled representation. The method comprises the following steps: obtaining all effective triplets in a knowledge graph to be completed for preprocessing, that is, dividing a support set and a query set; constructing a knowledge graph completion model based on decoupled representation learning; and completing the knowledge graph to be completed according to the model. The application adopts a combination of decoupled representation learning and small sample learning, learns the representation of multiple channels of entities through the decoupled representation learning method, and then more accurately matches the query set, so as to improve the accuracy of knowledge graph completion in a scenario with a large number of long-tail relations.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the field of knowledge graph completion, and particularly relates to a knowledge graph completion method based on decoupled representation. BACKGROUND

[0002] With the continuous development of intelligent information service applications, as the basic and core technology of artificial intelligence research and intelligent information service, knowledge graph can endow intelligent agents with the ability of precise query, attempt to understand and logical reasoning, and has been widely used in knowledge question answering, search engines, recommendation systems and other fields. Nowadays, knowledge graph is also used to refer to various large-scale knowledge bases, such as Freebase, NELL, Wiki-data, etc. These large-scale knowledge bases contain a large number of triples, but are still not complete and have many missing entities or relationships.

[0003] At present, there are many knowledge graph representation learning algorithms for knowledge graph completion tasks, but all have a limitation, that is, for each relationship, a large number of training triples are needed. However, by analyzing commonly used knowledge graphs such as NELL and Wiki-data, it can be found that there are a large number of long-tail relationships in them, that is, there are many relationships that have very few triples. The long-tail phenomenon is also common in many real knowledge graphs, and it is difficult to train a good model for knowledge graph completion through general knowledge graph representation learning algorithms.

[0004] Recently, some works have proposed a small sample learning method to solve the problem of long-tail relationships. Most of the small sample knowledge graph completion model ideas are to first learn entity representation through background graph knowledge, so as to avoid the disadvantage of few triples in long-tail relationship training. We only need to learn good entity representation, and theoretically we can get good relationship representation, and finally evaluate the similarity between the query set and the support set through a matching strategy. However, the proposed models cannot model the polysemy of entities, that is, a common entity may have multiple meanings, and these small sample knowledge graph completion models only learn an embedding representation, so they do not learn the polysemy representation of entities. At the same time, the entity representation they learn is always a whole representation, which makes it difficult to interpret the learned representation. The present application will model the polysemy of entities and improve the interpretability of the representation through decoupled representation learning, and obtain better entity representation, so as to indirectly learn the representation of long-tail relationships. SUMMARY

[0005] To solve the above problems, the application provides a knowledge graph completion method based on decoupled representation, which comprises the following steps: obtaining a knowledge graph to be completed; building a completion model based on decoupled representation; scoring query triples by using the completion model based on decoupled representation; and judging whether the query triples are added to the knowledge graph to be completed according to the scoring results.

[0006] The completion model based on decoupled representation comprises two linear networks and an LSTM network, and the training process comprises the following steps:

[0007] S1. Obtain a knowledge graph dataset, and divide all triples in the knowledge graph dataset into a support set and a query set, wherein the triples comprise a head entity, a relation and a tail entity, and the head entity and the tail entity are collectively referred to as entities;

[0008] S2. Use a pre-training model to perform initial embedding representation on the entities and the relation in the support set and the query set, and establish a neighbor matrix for each entity;

[0009] S3. Obtain K independent entity representations of each entity by using K different mapping matrices on the initial embedding representation of all entities;

[0010] S4. Calculate the similarity between the entity h i and its neighbor entities by using a neighbor encoder, wherein the K entity representations of the neighbor entities are respectively aggregated with the K entity representations of the entity h i to obtain K aggregated entity representations of the entity h i ;

[0011] S5. Obtain the aggregated entity representations of all entities, and calculate an orthogonal regularization loss by using an orthogonal regularization function;

[0012] S6. In the support set and the query set, respectively, splice and input the aggregated entity representations of the head entities and the aggregated entity representations of the tail entities into two linear networks to obtain a plurality of entity pair representations, so that there are corresponding entity pair representations of the support set and the query set;

[0013] S7. Input the entity pair representation S in the support set and the corresponding entity pair representation Q in the query set into an LSTM network, and the LSTM network outputs the latest entity pair representation Q' of the query set;

[0014] S8. Calculate the similarity between the latest entity pair representation Q' and the entity pair representation S in the support set, and calculate a maximum margin loss by using a maximum margin loss function;

[0015] S9. Train the completion model by using the orthogonal regularization function and the maximum margin loss function, and perform back propagation on the orthogonal regularization loss and the maximum margin loss until the completion model converges.

[0016] Furthermore, in step S3, the initial embedding representation of the entity is mapped to K independent entity representations in K embedding spaces using K different mapping matrices. The mapping formula is as follows:

[0017]

[0018] Among them, h i,k Represents the i-th entity h i The entity representation in the k-th embedding space, h represents the weight of the k-th embedding space. i Represents the i-th entity h i The initial embedding representation, b k This represents the offset of the k-th embedding space.

[0019] Furthermore, the neighbor matrix of each entity is divided into an out-degree neighbor matrix and an in-degree neighbor matrix. The out-degree neighbor matrix consists of neighbor entities that are tail entities, and the in-degree neighbor matrix consists of neighbor entities that are head entities.

[0020] Furthermore, entity h is obtained from the out-degree neighbor matrix and the in-degree neighbor matrix, respectively. i The out-degree aggregated entity representation and the in-degree aggregated entity representation are obtained, and then the out-degree aggregated entity representation and the in-degree aggregated entity representation are fused to obtain entity h. i The calculation process for the out-degree aggregate entity representation is as follows:

[0021]

[0022]

[0023]

[0024] in, Indicates r j With e j,k The result after the merging and linear transformation The weights r represent the linear transformation weights. j This indicates that the j-th out-degree neighbor entity is related to entity h. i The initial embedding representation, e j,k Let b represent the k-th entity of the j-th out-degree neighbor entity. attn This represents the offset of the linear transformation. This indicates a merge operation. This indicates that the j-th out-degree neighbor entity is related to entity h. i Attention coefficients for connecting factors k. Represents entity h i The number of outgoing neighbors, Represents the i-th entity h ithe kth out-degree aggregated entity representation of the ith entity.

[0025] Further, the K aggregated entity representations of each entity are pulled apart in step S5 using the orthogonal regularization method, and the orthogonal regularization loss value is calculated, with the formula being:

[0026]

[0027] wherein, represents the orthogonal regularization loss value, H i represents an entity vector matrix formed by the ith entity, Mean() represents the average value, diag() represents the construction of a diagonal matrix, and ε represents the number of entities.

[0028] Further, the formula for matching the entity pair representations in the support set and the query set is as follows:

[0029]

[0030]

[0031]

[0032]

[0033] g m+1 = g′ m+1 + Q

[0034] score = g m+1 * S T

[0035] wherein, S' k represents the output result of the combination result of the kth aggregated entity representation of the head entity and the kth aggregated entity representation of the tail entity in the support set after the first layer linear network, σ represents the activation function, represents the transformation weight of the first layer linear network, t i,k represents the kth aggregated entity representation of the ith entity h i , t i,k represents the kth aggregated entity representation of the mth entity h m , h i and h m one is a head entity and the other is a tail entity; b ref1 represents the transformation offset of the first layer linear network, S k represents the output result of the second layer linear network, represents the transformation weight of the second layer linear network, b ref2 represents the transformation offset of the second layer linear network, S represents the entity pair representation of the support set, g′ m+1represents the output of the hidden layer after the m+1th round, c m+1 represents the representation of the cell unit after the m+1th round, Q represents the entity pair representation of the query set, and g m represents the output of the hidden layer after the mth round, c m represents the representation of the cell unit after the mth round, g m+1 represents the latest entity pair representation of the query set, and score represents the matching score of the query set and the support set.

[0036] Further, the maximum interval loss function and the total loss function for training the completion model are represented as:

[0037]

[0038]

[0039] wherein, represents the maximum interval loss value, delta represents the maximum interval value allowed, score - represents the score obtained by the negative sample, score + represents the score obtained by the positive sample, represents the final loss value, and lambda represents a balance coefficient.

[0040] Advantages of the present application:

[0041] The present application designs a model for encoding neighbors by decoupling representation learning, and maps the initial embedding representation of an entity through multiple different mapping matrices, so that an entity is mapped to multiple different embedding spaces to obtain multiple independent entity representations. The similarity between the current entity and each neighbor is calculated to aggregate the information of different embedding spaces, and a kind of orthogonal regularization method is used to separate the entity representations in different embedding spaces. The representation of the entity pair is obtained by using the full connection network, and then the two entity pair representations are input into the LSTM network. Finally, the similarity of the entity pair representations of the support set and the query set is calculated, and according to the calculation result, it can be judged whether the current query triple is correct. The present application adopts the combination of decoupling representation learning and small sample learning, and improves the accuracy of knowledge graph completion in the long-tail relationship scene by learning the representation of multiple channels of the entity. BRIEF DESCRIPTION OF DRAWINGS

[0042] Figure 1 is the flow chart of the knowledge graph completion method based on decoupling representation learning of the present application;

[0043] Figure 2 is an embodiment of the knowledge graph completion of the present application. DETAILED DESCRIPTION

[0044] With reference to the accompanying drawings, the technical solutions in the embodiments of the present application will be clearly and completely described below, obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.

[0045] The present application provides a knowledge graph completion method based on decoupled representation, comprising: obtaining a knowledge graph to be completed; building a completion model based on decoupled representation; scoring the query triplets based on the completion model based on decoupled representation, and determining whether the query triplets are added to the knowledge graph to be completed according to the scoring results.

[0046] Specifically, the completion model based on decoupled representation includes two linear networks and an LSTM network, and its training process is as shown in Figure 1 The steps are as follows:

[0047] S1. Obtain a knowledge graph dataset, and divide all triplets in the knowledge graph dataset into a support set and a query set, wherein the triplets include a head entity, a relation and a tail entity, and the head entity and the tail entity are collectively referred to as entities;

[0048] Specifically, first, extract the relations corresponding to the triplets in the data set whose number is between (50, 500) as the knowledge graph data set, and then take the remaining relations as the background knowledge graph to learn the initial embedding; all triplets connected by each relation in the knowledge graph data set are regarded as a task, and a triplet is randomly sampled as a support set in each task, and the remaining can be used as a query set;

[0049] S2. Use a pre-training model to perform initial embedding representation on the entities and relations in the support set and the query set, and establish a neighbor matrix for each entity;

[0050] Specifically, the neighbor matrix of each entity is divided into an out-degree neighbor matrix and an in-degree neighbor matrix, the out-degree neighbor matrix is composed of neighbor entities as tail entities, i.e. out-degree neighbor entities, and the in-degree neighbor matrix is composed of neighbor entities as head entities, i.e. in-degree neighbor entities.

[0051] S3. Obtain K independent entity representations of each entity by passing the initial embedding representation of all entities through K different mapping matrices;

[0052] S4. Calculate the similarity of the entity h i and its neighbor entities using a neighbor encoder, and aggregate the K entity representations of the neighbor entities with the K entity representations of the entity h i respectively through the corresponding similarity, to obtain the entity h iK aggregated entity representations of K entities;

[0053] S5. Obtain the aggregated entity representation of all entities, and calculate the orthogonal regularization loss by using the orthogonal regularization function;

[0054] S6. Input the aggregated entity representation of the head entity and the aggregated entity representation of the tail entity into the two-layer linear network respectively in the support set and the query set to obtain the representation of the plurality of entity pairs;

[0055] S7. Input the entity pair representation S in the support set and the corresponding entity pair representation Q in the query set into the LSTM network, and the LSTM network outputs the latest entity pair representation Q' of the query set;

[0056] S8. Calculate the similarity between the latest entity pair representation Q' and the entity pair representation S of the support set, and calculate the maximum margin loss by using the maximum margin loss function;

[0057] S9. Train the completion model by using the orthogonal regularization function and the maximum margin loss function together, and the orthogonal regularization loss and the maximum margin loss are back propagated until the completion model converges.

[0058] Specifically, the initial embedding representation of any entity is mapped to K different embedding spaces through K different mapping matrices, thereby obtaining K independent entity representations of the entity, and the calculation formula is:

[0059]

[0060] Wherein, h i,k represents the i-th entity h i The entity representation in the k-th embedding space, represents the weight of the k-th embedding space, h i represents the initial embedding representation of the i-th entity h i , b k represents the offset of the k-th embedding space.

[0061] Specifically, all neighbor entities of the current entity are obtained, and the out-degree aggregated entity representation and the in-degree aggregated entity representation of the entity h i are obtained according to the out-degree neighbor matrix and the in-degree neighbor matrix respectively, and then the out-degree aggregated entity representation and the in-degree aggregated entity representation are fused to obtain the aggregated entity representation of the entity h i , so as to update the initial embedding representation of the current entity. The calculation process of the in-degree aggregated entity representation is the same as that of the out-degree aggregated entity representation, and the calculation process of the out-degree aggregated entity representation is as follows:

[0062]

[0063]

[0064]

[0065] in, Indicates r j With e j,k The result after the merging and linear transformation The weights r represent the linear transformation weights. j This indicates that the j-th out-degree neighbor entity is related to entity h. i The initial embedding representation, e j,k This indicates that the j-th out-degree neighbor entity is related to entity h. i The k-th entity is represented by b attn This represents the offset of the linear transformation. This indicates a merge operation. This indicates that the j-th out-degree neighbor entity is related to entity h. i Attention coefficients for connecting factors k. Represents entity h i The number of outgoing neighbors, Represents the i-th entity h i The k-th out-degree aggregate entity is represented by .

[0066] Specifically, after obtaining the aggregated entity representation of the current entity, an orthogonal regularization method is used to constrain the aggregated entity representation of the entity, separating the K aggregated entity representations of each entity, as follows:

[0067]

[0068] in, H represents the orthogonal regularization loss value. i The aggregate entity representation of the i-th entity is an entity vector matrix. Mean() calculates the average value, diag() constructs a diagonal matrix, and ε represents the number of entities.

[0069] In the stage of matching the query set and support set, the entity pair representation is first obtained through a linear layer, then further established through LSTM to build the interaction between the query set and support set, and finally the similarity is calculated by dot product, as shown in the following formula:

[0070]

[0071]

[0072]

[0073]

[0074] g m+1 =g′m+1 +Q

[0075] score=g m+1 *S T

[0076] wherein S' k denotes the output result of the merging result of the kth aggregated entity representation of the head entity and the kth aggregated entity representation of the tail entity in the support set after passing through the first layer linear network, σ denotes an activation function, denotes the transformation weight of the first layer linear network, t i,k denotes the kth aggregated entity representation of the ith entity h i , t i,k denotes the kth aggregated entity representation of the mth entity h m , h i and h m one is a head entity and the other is a tail entity; b ref1 denotes the transformation offset of the first layer linear network, S k denotes the output result of the second layer linear network, denotes the transformation weight of the second layer linear network, b ref2 denotes the transformation offset of the second layer linear network, S denotes the entity pair representation of the support set, g' m+1 denotes the output of the hidden layer after the m+1th round, c m+1 denotes the representation of the cell unit after the m+1th round, Q denotes the entity pair representation of the query set, g m denotes the output of the hidden layer after the mth round, c m denotes the representation of the cell unit after the mth round, g m+1 denotes the latest entity pair representation of the query set, score denotes the matching score of the query set and the support set.

[0077] In an embodiment, as Figure 2As shown, according to the background knowledge graph, entity h has multiple neighbor entities, and according to the structure of the head entity-relation-tail entity in the triple, the out-degree neighbor matrix and the in-degree neighbor matrix of entity h are constructed, the out-degree neighbor matrix is composed of neighbor entities as tail entities, including t1, t2, t5, t6, t9, t10, the in-degree neighbor matrix is composed of neighbor entities as head entities, including t3, t4, t7, t8, t11, t12, the in-degree neighbor entity and the out-degree neighbor entity are connected with entity h through different factors, and among them, t1 and t2 are circled together by a dashed line, indicating that they are connected with entity h through the same factor, for example: Wang, Wang Daxie, Li Daxie, movie and basketball are different entities, taking Wang as the center entity, Wang Daxie, Li Daxie, movie and basketball are neighbor entities of the center entity, Wang is the son of Wang Daxie and Li Daxie, then Wang Daxie and Li Daxie are connected with Wang through the "family" factor, Wang likes to watch movies and play basketball, then movie and basketball are connected with Wang through the "hobby" factor, when calculating the aggregated entity representation of the center entity in the subsequent calculation, the attention coefficient of the center entity and the neighbor entity about the connection of different factors needs to be calculated, so as to better express the polysemy of the center entity.

[0078] The pre-trained model is used to perform initial embedding representation on entity h and all neighbor entities thereof, and then mapped to 3 different embedding spaces for feature decoupling, W1, W2 and W3 represent the weights of the three embedding spaces respectively, and 3 independent entity representations of entity h and all neighbor entities thereof are obtained; the neighbor encoder is used to calculate the similarity between entity h and its neighbor entities, the 3 entity representations of all neighbor entities in the out-degree neighbor matrix are respectively aggregated with the 3 entity representations of entity h through the corresponding similarity, to obtain 3 out-degree aggregated entity representations of entity h; the 3 entity representations of all neighbor entities in the in-degree neighbor matrix are respectively aggregated with the 3 entity representations of entity h through the corresponding similarity, to obtain 3 in-degree aggregated entity representations of entity h; the 3 out-degree aggregated entity representations and the 3 in-degree aggregated entity representations are fused to obtain 3 aggregated entity representations, and regularization is used to ensure that the 3 aggregated entity representations are independent in the representation space. Then in the support set and the query set, the aggregated entity representation of the head entity is combined with the aggregated entity representation of the tail entity to obtain the entity pair representation, then the corresponding entity pair representations in the support set and the query set are input into the LSTM for training, to obtain the final entity pair representation of the query set, and then the similarity between the entity pair representation of the support set and the entity pair representation of the query set is calculated to obtain a score, the larger the score, the more correct the query set.

[0079] In the embodiment, the description of the entity and the relationship between the entities in the real world is described, and the description text of the entity can come from an online encyclopedia or a public corpus, such as a news corpus, an English corpus, a Chinese corpus, etc.

[0080] In the present application, unless otherwise explicitly specified and limited, the terms "mounting", "setting", "connecting", "fixing", "rotating" and other terms should be understood in a broad sense, for example, can be fixedly connected, or can be detachably connected, or can be integrated; can be mechanically connected, or can be electrically connected; can be directly connected, or can be indirectly connected through an intermediate medium, can be the internal communication of two elements or the interaction relationship between two elements, unless otherwise explicitly limited, the above-mentioned terms in the present application can be understood according to the specific meaning of the above-mentioned terms in the present application by the person skilled in the art.

[0081] Although the embodiments of the present application have been shown and described, it can be understood by those skilled in the art that various changes, modifications, replacements and variations can be made to the embodiments without departing from the principles and spirits of the present application, the scope of the present application is defined by the appended claims and their equivalents.

Claims

1. A method for knowledge graph completion based on decoupled representation, characterized in that, Acquire a to-be-completed knowledge graph; build a completion model based on decoupled representation; score the query triplets using the completion model based on decoupled representation, and determine whether the query triplets are added to the to-be-completed knowledge graph according to the scoring results; The completion model based on decoupled representation includes two linear networks and an LSTM network, and the training process includes the following steps: S1. Obtain a knowledge graph dataset, divide all triplets in the knowledge graph dataset into a support set and a query set, the triplets include a head entity, a relation and a tail entity, and the head entity and the tail entity are collectively referred to as entities; S2. Use a pre-trained model to perform initial embedding representation on the entities and relations in the support set and the query set, and establish a neighbor matrix for each entity; S3. Obtain K independent entity representations for each entity by passing the initial embedding representation of all entities through K different mapping matrices; S4. Compute entity h with neighbor encoder i The K entity representations of the neighbor entities are aggregated with their respective similarities to the entity h i The K entity representations of the neighbor entities are aggregated with their respective similarities to the entity h i The K aggregated entity representations of the entity h S5. Obtain the aggregated entity representation of all entities, and calculate the orthogonal regularization loss using an orthogonal regularization function; S6. In the support set and the query set, respectively, concatenate the aggregated entity representation of the head entity and the aggregated entity representation of the tail entity and input them into the two linear networks to obtain a plurality of entity pair representations; S7. The entity pair representation S in the support set and the corresponding entity pair representation Q in the query set are input into the LSTM network, and the LSTM network outputs the latest entity pair representation Q' of the query set; S8. Calculate the similarity between the latest entity pair representation Q' and the entity pair representation S of the support set, and calculate the maximum margin loss using a maximum margin loss function; S9. Train the completion model using the orthogonal regularization function and the maximum margin loss function, and perform back propagation on the orthogonal regularization loss and the maximum margin loss until the completion model converges.

2. The method of claim 1, wherein, In step S3, the initial embedding representation of the entity is passed through K different mapping matrices to obtain independent entity representations mapped to K embedding spaces, and the mapping formula is: where h i,k represents the i-th entity h i In the k-th embedding space, the entity representation, represents the weight of the k-th embedding space, h i represents the initial embedding representation of the i-th entity h i b k represents the offset of the k-th embedding space.

3. The method of claim 1, wherein, Each entity's neighbor matrix is divided into an out-degree neighbor matrix and an in-degree neighbor matrix, the out-degree neighbor matrix is composed of neighbor entities as tail entities, and the in-degree neighbor matrix is composed of neighbor entities as head entities.

4. The method of claim 3, wherein, According to the out-degree neighbor matrix and the in-degree neighbor matrix, an out-degree aggregated entity representation and an in-degree aggregated entity representation of the entity h i are obtained, and the out-degree aggregated entity representation and the in-degree aggregated entity representation are fused to obtain an aggregated entity representation of the entity h i , and a calculation process of the out-degree aggregated entity representation is as follows: wherein, represents r j represents e j,k the result of a linear transformation after merging, represents the weight of the linear transformation, r j represents the initial embedding representation of the relationship of the jth out-degree neighbor entity and entity h i , e j,k represents the kth entity representation of the jth out-degree neighbor entity, b attn represents the offset of the linear transformation, represents the merging operation, represents the jth out-degree neighbor entity and entity h i about the factor k to connect the attention coefficient, represents the number of out-degree neighbors of entity h i , represents the kth out-degree aggregated entity representation of the ith entity h i .

5. The method of claim 1, wherein, In step S5, the K aggregated entity representations of each entity are pulled apart using the orthogonal regularization method, and the orthogonal regularization loss value is calculated, and the formula is: wherein, denotes the orthogonal regularized loss value, H i denotes an entity vector matrix formed by the i-th entity, Mean() denotes an average value, diag() denotes a diagonal matrix, and ε denotes the number of entities.

6. The method of claim 1, wherein, The formula for matching the entity pair representations in the support set and the query set is as follows: g m+1 = g' m+1 + Q score = g m+1 S T where S k represents the output result of the merging result of the kth aggregated entity representation of the head entity and the kth aggregated entity representation of the tail entity after passing through the first layer linear network, and σ represents an activation function, represents the transformation weight of the first layer linear network, and t i,k represents the kth aggregated entity representation of the ith entity h i , t i,k represents the kth aggregated entity representation of the mth entity h m , h i and h m one is a head entity and the other is a tail entity; b ref1 represents the transformation offset of the first layer linear network, S k represents the output result of the second layer linear network, represents the transformation weight of the second layer linear network, and b ref2 represents the transformation offset of the second layer linear network, S represents the entity pair representation of the support set, and g′ m+1 represents the output of the hidden layer after the m+1th round, c m+1 represents the representation of the cell unit after the m+1th round, Q represents the entity pair representation of the query set, and g m represents the output of the hidden layer after the mth round, c m represents the representation of the cell unit after the mth round, g m+1 represents the latest entity pair representation of the query set, and score represents the matching score of the query set and the support set.

7. The method of claim 1, wherein, The maximum margin loss function and the total loss function for training the completion model are represented as follows: wherein, represents a maximum interval loss value, δ represents a maximum interval value allowed, score - represents a score obtained by a negative sample, score + represents a score obtained by a positive sample, represents a final loss value, λ represents a balance coefficient.