Knowledge representation method and system based on deep embedding representation and deep graph calculation
By combining deep embedding representation and deep graph computing, and utilizing deep graph computing link prediction algorithms and adaptive measurement methods, we solve the problems of high time overhead and low accuracy in large-scale knowledge graph completion, and achieve efficient and accurate knowledge graph updates.
Patent Information
- Application Number
- CN202210725208.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-24
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2042-06-24
AI Technical Summary
Existing knowledge representation learning methods are time-consuming and inflexible when completing large-scale knowledge graphs, and their accuracy is affected by irrelevant dimensions.
By combining deep embedding representation and deep graph computation, the deep graph computation link prediction algorithm is used to screen out the entity pairs that are most likely to form links. In the relationship verification stage, adaptive measurement methods and deep embedding space projection are used to form correct triples and update the knowledge graph.
It improves the accuracy and efficiency of knowledge graph completion, can efficiently screen out entity pairs that are most likely to form links, reduces the impact of irrelevant dimensions, and improves the accuracy of knowledge representation.
Smart Images

Figure CN114969381B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field related to knowledge graphs, and more specifically, to a knowledge representation method and system based on deep embedding representation and deep graph calculation. Background Art
[0002] The statements in this section merely provide background information related to the present disclosure and do not necessarily constitute prior art.
[0003] Knowledge graphs play a vital role in many AI applications, such as intelligent question-answering, information recommendation, and web search. A knowledge graph is a structured semantic network that stores a large number of fact triplets (consisting of a head entity, a relationship, and a tail entity), often simplified as (h, r, t). Knowledge representation learning is the process of learning representations for entities and relationships within a knowledge base. When building large-scale knowledge graphs and continuously supplementing relationships between entities, knowledge representation learning can be used to complete the knowledge graph.
[0004] At present, the mainstream methods of knowledge representation are as follows:
[0005] (1) Translation model: Among the existing knowledge representation learning methods, the TransE model is a very representative method. By taking advantage of the translation invariance of word vectors, the relationships in the knowledge base are regarded as translation vectors between entities, that is, the Euclidean distance between the head entity vector and the tail entity vector after the transformation of the relationship vector in the knowledge representation space. The TransE model has fewer parameters and low computational complexity, and can directly establish complex semantic relationships between entities and relationships. Subsequently, several translation models such as TransR were proposed based on the TransE model, which can handle one-to-many, many-to-one, and many-to-many relationships. The TransR model models entities and relationships in the entity space and the relationship space by considering multiple attributes of entities and different aspects of entities in different relationships, and uses the relationship projection matrix to transform them in the corresponding relationship space. TransA uses elliptical equipotential surfaces instead of spherical equipotential surfaces, which can better represent the complex embedding topology caused by complex relationships. In addition, TransA can be regarded as a feature dimension after weighted transformation, which suppresses noise from irrelevant dimensions.
[0006] (2) Neural Network Model (DKRL Model): The DKRL model extends the TransE model by enhancing embedding by using a deep neural network model to enhance entity descriptions. However, the DKRL model requires additional space to store inner layer parameters and relies on more hyperparameters for tuning. The RLKB model establishes a single-layer neural model that requires fewer parameters to achieve representation learning of the knowledge base. Previously, most models for this task were shallow and had weaker feature learning capabilities than deep multi-layer models. Therefore, researchers later proposed a multi-layer convolutional network ConvE model. The ConvE model first converts the head entity and relationship into a two-dimensional vector, then uses convolutional layers and fully connected layers to obtain interaction information, and then calculates with the matrix W and the tail entity to determine the credibility of the current triple. However, the ConvE model ignores the global features of the triple, so subsequent researchers proposed the ConvKB model, which can capture the global relationships and transition characteristics between entities, as well as the relationships in the knowledge base. The CapsE model uses a capsule neural network model. It first represents the head entity, relationship, and tail entity as a k×3 matrix. Next, it obtains their feature information through a convolutional layer, compresses the feature information and performs dynamic routing, and finally calculates the credibility of the triples.
[0007] (3) Other models: In addition to the widely used translation model and neural network model, the distance model, single-layer neural network model, tensor neural network model and bilinear model are also widely used. The structural representation in the distance model is an early knowledge representation method. In the structural representation, entities are represented by d-dimensional vectors, and all entities are projected into the same d-dimensional vector space. The single-layer neural network model uses the nonlinear operation of the single-layer neural network to reduce the problem that the structural representation cannot accurately depict the semantic relationship between entities and relationships. The semantic matching energy model proposes complex operations to find the semantic relationship between entities and relationships. The tensor neural network model uses bilinear tensors to replace the linear transformation layer in the traditional neural network to connect the head entity and the tail entity vectors in different dimensions. The latent variable model in the bilinear model proposes to use the relationship-based bilinear transformation to depict the second-order relationship between entities and relationships.
[0008] The inventors discovered that the aforementioned knowledge representation learning methods, including TransE and some improved models, often use Euclidean distance as the metric in the scoring function. Each feature dimension participates in the calculation with equal weight, resulting in accuracy being affected by irrelevant dimensions and limited flexibility. Furthermore, the time consumption is significant when applied to large-scale knowledge graphs in the real world. Summary of the Invention
[0009] In order to solve the above problems, the present disclosure proposes a knowledge representation method and system based on deep embedding representation and deep graph calculation, which fully considers the internal information of the knowledge graph, and realizes the missing completion of the knowledge graph based on deep embedding representation and deep graph calculation by combining the two improved methods.
[0010] In order to achieve the above objectives, the present disclosure adopts the following technical solutions:
[0011] One or more embodiments provide a knowledge representation method based on deep embedding representation and depth map calculation, including the following process:
[0012] For the processed knowledge graph, a link prediction algorithm is calculated using a deep graph to predict entity pairs that may form links in the knowledge graph based on the graph structure and semantic information of the knowledge graph;
[0013] Using the deep embedding adaptive knowledge embedding method, the adaptive measurement method is combined with the deep embedding space projection to verify the relationship between the entity pairs obtained in the link prediction stage, form the correct triples, and update the knowledge graph.
[0014] One or more embodiments provide a knowledge representation system based on deep embedding representation and depth map calculation, including:
[0015] Link prediction module: configured to use the deep graph to calculate the link prediction algorithm for the processed knowledge graph, and predict the entity pairs that may form links in the knowledge graph based on the graph structure and semantic information of the knowledge graph;
[0016] Relationship Verification Module: It is configured to use the deep embedding adaptive knowledge embedding method, combining the adaptive measurement method with the deep embedding space projection to verify the relationship between the entity pairs obtained in the link prediction phase, form the correct triples, and update the knowledge graph.
[0017] An electronic device includes a memory and a processor, and computer instructions stored in the memory and executed on the processor. When the computer instructions are executed by the processor, the steps of the above method are completed.
[0018] A computer-readable storage medium is used to store computer instructions, and when the computer instructions are executed by a processor, the steps of the above method are completed.
[0019] Compared with the prior art, the present invention has the following beneficial effects:
[0020] This paper uses a deep graph computing link prediction algorithm that takes into account both the graph structure and semantic information of the knowledge graph. Furthermore, the entity pairs most likely to form links selected by the deep graph computing link prediction algorithm are more representative. In the relationship verification phase, combining adaptive metrics with spatial projection models can improve verification accuracy, thereby enabling efficient completion of the knowledge graph.
[0021] The advantages of the present disclosure and additional advantages will be described in detail in the following specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The accompanying drawings, which constitute a part of the present disclosure, are used to provide a further understanding of the present disclosure. The exemplary embodiments of the present disclosure and their descriptions are used to explain the present disclosure but do not constitute a limitation of the present disclosure.
[0023] Figure 1 is a flow chart of the method of embodiment 1 of the present disclosure;
[0024] FIG2( a ) is a schematic diagram of entity class initialization in the entity clustering algorithm of Example 1 of the present disclosure;
[0025] FIG2( b ) is a schematic diagram of the entity class merging process in the entity clustering algorithm of Example 1 of the present disclosure;
[0026] FIG3( a ) shows the characteristic dimensions of Example 1 of the present disclosure without adding the adaptive weight matrix;
[0027] FIG3( b ) shows the characteristic dimensions of the embodiment 1 of the present disclosure with the adaptive weight matrix added;
[0028] Figure 4 is a schematic diagram of a spatial projection model according to embodiment 1 of the present disclosure; DETAILED DESCRIPTION
[0029] The present disclosure will be further described below with reference to the accompanying drawings and embodiments.
[0030] It should be noted that the following detailed descriptions are exemplary and intended to provide further explanation of the present disclosure. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which the present disclosure belongs.
[0031] It should be noted that the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit the exemplary embodiments according to the present disclosure. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components and / or combinations thereof. It should be noted that, in the absence of conflict, the various embodiments in the present disclosure and the features in the embodiments can be combined with each other. The embodiments will be described in detail below with reference to the accompanying drawings.
[0032] Example 1
[0033] In the technical solutions disclosed in one or more embodiments, Figure 1 As shown in the figure, a knowledge representation method based on deep embedding representation and deep graph calculation is proposed. This method fully considers the internal information of the knowledge graph. For the processed knowledge graph, in the link prediction stage, a deep graph calculation link prediction algorithm is used to predict the entity pairs that may form links in the knowledge graph based on the graph structure and semantic information of the knowledge graph.
[0034] In the relationship verification stage, the deep embedding adaptive knowledge embedding method is used, and the adaptive measurement method and deep embedding space projection are combined to verify the relationship between the entity pairs obtained in the link prediction stage, form correct triples, and update the knowledge graph.
[0035] In this embodiment, the deep graph link prediction algorithm takes into account both the graph structure and semantic information of the knowledge graph. Furthermore, the entity pairs most likely to form links, selected by the deep graph link prediction algorithm, are more representative. In the relationship verification phase, combining adaptive metrics with spatial projection models can improve verification accuracy, enabling efficient completion of the knowledge graph.
[0036] In the link prediction stage, the top k pairs of entities that are most likely to form links are selected from the knowledge graph (e i ,e j );
[0037] Optionally, the deep graph link prediction algorithm can be combined with the Rooted PageRank algorithm and the entity clustering algorithm for joint screening, so that the selected candidate entity pairs are more likely to form links. The specific method is as follows:
[0038] Step 13: Calculate the confidence value between any head entity class and tail entity class according to the entity class obtained by the entity clustering algorithm. If the confidence value is greater than the set threshold β, and for the entity pair e that may form a link obtained by the Rooted PageRank algorithm,i and e j , respectively belong to two entity classes whose confidence is greater than the threshold β, then the entity pair e i and e j Belongs to the filtered entity candidate pairs.
[0039] The Rooted PageRank algorithm and entity clustering algorithm in the deep graph calculation link prediction algorithm are two relatively independent sub-modules. Through the joint screening of these two modules, the entity pairs that are most likely to form links in the knowledge graph can be screened out.
[0040] Use entity clustering algorithm to mine semantic information in knowledge graph and exclude entity pairs that cannot form links based on semantic information;
[0041] In a knowledge graph, nodes and edges represent entities and relationships, respectively, each with its own semantics. Entity clustering methods can be used to quickly identify entity classes within the knowledge graph. These identified entity classes can then be used for joint filtering within deep graph computation and link prediction algorithms.
[0042] In step 11, an entity clustering algorithm is used to mine the semantic information in the knowledge graph, and entity pairs that cannot form links are excluded based on the semantic information. Specifically, it includes the initialization of entity classes and the merging of entity classes.
[0043] (1) Initialization of entity class: define the knowledge graph as a directed graph from the head entity to the tail entity through the relationship, and the entity is the node in the directed graph. Traverse the relationship set of the knowledge graph to obtain the head entity class and tail entity class corresponding to each relationship, and obtain the initial entity class.
[0044] Specifically, the initialization process is as follows:
[0045] The knowledge graph can be viewed as a directed graph G, where the entity class E is a node of the directed graph G, and the triple It can be viewed as a directed edge from node h to node t in a directed graph G. Define H={H1,H2,…,H 2m} represents the head node class set, T={T1,T2,…,T 2m} represents the tail node class collection.
[0046] For the relationship r i ∈R, there is a set of triples where h ij ∈H i , t ij ∈T i As shown in Figure 2(a), the head node class H i Entity h in ijThere are certain similarities. For example, the head entity class corresponding to the Nationality relationship is generally a person. The tail entity class T i Entity t in ij There are also certain similarities. For example, the tail entity class corresponding to the Gender relationship is generally gender.
[0047] The initialization process of the entity class needs to traverse the relationship set R, for each relationship r i ∈R, record the corresponding head entity class H i and tail entity class T i Finally, we get 2m initial entity classes, and the entity class set is recorded as S = {H1, H2, ..., H 2m ,T1,T2,…,T 2m It is worth noting that since the knowledge graph contains some incorrect data and the head entity class and tail entity class of some relations have certain duplications, any entity e∈E may belong to one or more entity classes.
[0048] (2) Merging of entity classes: Calculate the similarity between the initial entity classes and merge the entity classes whose similarity is greater than the set threshold; during the merging process, entity pairs that cannot form a link can be excluded.
[0049] The second stage of the entity clustering algorithm is to merge the initial entity classes. The entity classes extracted in the previous step have many errors. These errors are mainly reflected in the following aspects:
[0050] 1) Some edges in the knowledge graph may be wrong, and the wrong ones should be deleted directly.
[0051] 2) There may be a large number of duplicate entities between some collections, and the duplicate entities are merged.
[0052] Since the entity classes extracted by entity class initialization have the above problems, it is necessary to further process the entity classes extracted in the previous step.
[0053] The entity class merging process is shown in Figure 2(b). When it is found that the two entity classes {e1, e2} and {e2, e3} are relatively similar, these two entity classes need to be merged. After the merger, the remaining entity classes are {e1, e2, e3}, {e4, e5}, and {e6, e7}, which are recorded as {H1, T1, T2}.
[0054] For entity class s i ,s j ∈S, count(s i )、count(s j ) represent entity classes s i and s jThe number of entities in . Define the similarity between two sets:
[0055]
[0056] Any two entity classes whose similarity exceeds a threshold τ need to be merged, and the process continues until no two entity classes have similarities exceeding the threshold τ. Since each iteration of the entity class process requires calculating the similarity between each two entity classes, when there are many entity classes, each iteration takes a long time. Optionally, a greedy strategy can be used to accelerate the merging of entity classes.
[0057] Specifically, the entity class merging process is as follows:
[0058] Step 11.1 randomly selects an entity class set and calculates the similarity between other entity class sets and the current entity class set.
[0059] Step 11.2 selects an entity class set with the greatest similarity to the current entity class set. If the similarity exceeds a threshold value τ, the two entity class sets are merged, and the new entity class set is used as the current entity class set. If it does not exceed the threshold value τ, the current entity class set is marked as a final state and will not participate in set merging in the future.
[0060] Step 11.3 Repeat steps 1.1-1.2 until all sets are in the final state.
[0061] In step 12, the Rooted PageRank algorithm is used to mine the graph structure information in the knowledge graph and filter entity pairs that may form links based on the graph structure information. The specific method is as follows:
[0062] Step 12.1 Initialization: Consider the knowledge graph as an undirected graph G, where entity E is a node of the undirected graph G, and triples It can be regarded as an undirected edge from node h to node t in the undirected graph G.
[0063] Step 12.2 calculates the stable probability of walking from one node to another node in the undirected graph according to the Rooted PageRank algorithm. When the probability is greater than the probability threshold, the entity pair corresponding to the two nodes is an entity pair that may form a link.
[0064] Before using the Rooted PageRank algorithm, we first introduce the random walk algorithm. For any node x, the random walk algorithm walks to the nodes adjacent to the node x with equal probability. Define the hit time H x,y The expected step length of a random walk from node x to node y is: x,y The definition is as follows:
[0065] C x,y =Hx,y +H y,x (2)
[0066] Although the hit time H x,y Can be used for link prediction, but H x,y It is usually an asymmetric matrix, so the round trip time C that can form a symmetric matrix is often used. x,y .
[0067] The Rooted PageRank algorithm introduces a restart mechanism based on the random walk algorithm. For any node x in the graph G, each time it randomly walks, it returns to the node x with a probability of α and walks to the node adjacent to the node x with a probability of 1-α. This paper defines score(x,y) as the stable probability of randomly walking from node x to y. Select k entity pairs with higher scores (e i ,e j ) as the entity pair that is most likely to form a link in the knowledge graph.
[0068] The corresponding graph kernel method is used to calculate the stability probability: score(x,y)=(1-α)(I-αD-1A)-1, where D represents the degree matrix and A represents the adjacency matrix.
[0069] The kernel method is an algorithm in graph algorithms that calculates the number of kernels per node. The result is one of the most commonly used reference values for judging node importance.
[0070] In step 13, the method of combining the Rooted PageRank algorithm and the entity clustering algorithm to screen entity pairs is as follows:
[0071] After the entity clustering algorithm clusters the entities in the knowledge graph, for any two entity classes S i ,S j ∈S, define the triple set And satisfy h ik ∈S i ,t jk ∈S j The confidence between entity classes is defined as follows:
[0072]
[0073] Here, O refers to the triple set O = {(h, r, t)}.
[0074] If the confidence between two entity classes is greater than the threshold β, then any two entities e i and e j All belong to the selected entity candidate pairs. Therefore, for the entity pair (e i ,e j),e i ∈S i ,e j ∈S j , there is the following relationship:
[0075] confidence(e i ,e j )=confidence(S i ,S j ) (4)
[0076] The Deep Graph Link Prediction algorithm uses a combined Rooted PageRank algorithm and an entity clustering algorithm for link prediction. The clustering algorithm further refines the Rooted PageRank algorithm's results, taking into account both the graph structure and semantic information within the knowledge graph. Furthermore, the k entity pairs most likely to form links, selected by the Deep Graph Link Prediction algorithm, are more representative.
[0077] In the TransE model, the loss function is overly simple, treating every dimension of entity and relationship vectors equally. This can lead to model accuracy being affected by irrelevant dimensions. This is because, after different mapping rules are applied to entities and relationships, the same scoring function is used to optimize the target. However, each feature dimension has a different impact on different relationships. Therefore, using only Euclidean distance—that is, calculating the weights of all feature dimensions using the same formula—can generate significant noise, reducing the accuracy of knowledge representation and directly impacting its effectiveness.
[0078] In this embodiment, during the relationship verification phase, the adaptive measurement method specifically designs an adaptive measurement score function, that is, adds an adaptive weight matrix to the score function. The weight matrix is introduced into the score function to determine the importance of each feature dimension, thereby achieving an adaptive distance measurement.
[0079] As shown in Figure 3(a), x and y represent the two latent feature dimensions of the influencing relations r1 and r2 (indicated by arrows), (h1, r1, t1) and (h2, r2, t2) are the two correct triplet vectors (indicated by solid circles), and t3 and t4 are the incorrectly predicted tail entities (indicated by hollow circles). Because both dimensions are treated equally, in the link prediction task, the head entity h1 will be matched to the incorrect tail entity t3, and the head entity h2 will be matched to the incorrect tail entity t4. As shown in Figure 3(b), if the vectors are weighted along two different dimensions x and y, for example, by reducing the weight on the x-axis and increasing the weight on the y-axis, the correct entities t1 and t2 will be correctly predicted due to their closer distance along the x-axis or y-axis. By adjusting the weights across different dimensions, the loss is increased or decreased along a particular dimension, reducing the loss along that dimension, thereby optimizing the embedding representation. The weight matrix produces the optimization result during gradient descent, affecting each dimension.
[0080] Specifically, the adaptive weight matrix is the diagonal weight matrix W r , giving each feature dimension a reasonable adaptive weight, so the score function is adjusted to:
[0081] f r (h,t)=(h+rt) T W r (h+rt) (5)
[0082] Where: W r =diag(ω1,ω2,ω3…), which is a diagonal weight matrix, the weight of the i-th feature dimension is represented by ω i Indicates that W r It is a non-negative symmetric weight matrix specifically for the relationship, obtained through training optimization, and is set to the unit matrix during initialization. The unit matrix indicates that each vector is independent and identically distributed.
[0083] TransE builds entity and relation embeddings by treating relations as translations from a head entity to a tail entity. However, the TransE model simply assumes that entities and relations reside in the same semantic space. In reality, an entity is a composite of multiple attributes, and different relations focus on different attributes of an entity. Simply modeling them in the same space is insufficient.
[0084] like Figure 4 As shown, in this embodiment, entities and relationships are modeled in an entity space and multiple relationship spaces, and converted in corresponding relationship spaces.
[0085] In this embodiment, the deep embedding space projection is specifically to transform the entity in the triple (h, r, t) Through the relationship matrix Reproject to the relationship In the space, we get a new embedding vector h r and t r For each relation r, the projection vector is defined as:
[0086] h r =M r h,t r =M r t (6)
[0087] Therefore the score function is defined as:
[0088] f r (h,t)=||h r +rt r || (7)
[0089] After the model is trained, entities with a specific relationship will be closer to each other, and entities without a specific relationship will be farther away from each other.
[0090] Alternatively, the adaptive metric method and the spatial projection model are combined and modeled in a unified model framework. Finally, the TransAR model is proposed. An adaptive weight matrix is added to the scoring function, and the entity embedding vector in the scoring function is the new embedding vector obtained by projecting the entity triple into the relational space through the relation matrix. The scoring function of the TransAR model is:
[0091] f r (h, t) = (M r h+rM r t) T W r (M r h+rM r t) (8)
[0092] During the TransAR model training phase, the traditional translation-based approach can be adopted, using a boundary-based sorting error function as the optimization objective function for the training model:
[0093] loss=∑ (h,r,t)∈S ∑ (h′,r,t′)∈S′ max(0,f r (h, t)+γ-f r (h′, t′)) (9)
[0094] In the above formula, S is the set of correct triplets, and S′ is the set of incorrect triplets. Incorrect triplets are obtained by shuffling existing correct triplets. γ is the margin, which is the threshold that distinguishes positive from negative examples.
[0095] Traditional translation-based models often use stochastic gradient descent (SGD) to minimize the objective function. SGD uses a global learning rate λ to update all parameters without considering data characteristics. However, infrequent entities require a longer learning time, while frequently occurring entities require a shorter learning time. Therefore, the adaptive learning rate stochastic gradient descent optimization algorithm (AdadeltaSGD) is used to train the model because it dynamically adjusts parameters, resulting in a larger learning rate for small gradients and a smaller learning rate for large gradients. Furthermore, to accelerate convergence and avoid overfitting, all mapping matrices are initialized with the identity matrix.
[0096] In the relationship verification phase, the data within the knowledge graph is used to treat the relationship verification as a classification problem. i , e j ), it is necessary to make a binary classification for all r∈R. That is, for all r∈R, judge the triple (e i ,r,e j ) is established. Relationship verification can also be regarded as a multi-classification task, that is, for entity pairs (e i , e j ), classify and select the correct relation r to form the correct triple (e i ,r,e j ).
[0097] For any entity pair (e i , e j ), if there is a relation r i ∈R such that f(e i +r i , e j ) is less than the threshold τ, then it is considered that (e i , r i , e j ) belongs to the correct triple. Therefore, for the entity pairs output by the link prediction module, relationship verification can verify the entity pair relationship, return the correct triple to the link prediction module for active learning of the model, and return it to the knowledge graph for knowledge graph completion.
[0098] Example 2
[0099] Based on Example 1, this embodiment provides a knowledge representation system based on deep embedding representation and depth map calculation, including:
[0100] Link prediction module: configured to use the deep graph to calculate the link prediction algorithm for the processed knowledge graph, and predict the entity pairs that may form links in the knowledge graph based on the graph structure and semantic information of the knowledge graph;
[0101] Relationship Verification Module: It is configured to use the deep embedding adaptive knowledge embedding method, combining the adaptive measurement method with the deep embedding space projection to verify the relationship between the entity pairs obtained in the link prediction phase, form the correct triples, and update the knowledge graph.
[0102] The system of this embodiment can be based on the knowledge representation method of deep embedding representation and deep graph calculation, and can be used as a knowledge graph completion framework to continuously update and improve the missing knowledge graph. The knowledge graph completion framework consists of a continuously updated knowledge graph, a link prediction module, and a relationship verification module. In the link prediction module, the link prediction algorithm calculated using the deep graph fully considers the semantic information and graph structure information in the knowledge graph, and can accurately predict the links of the knowledge graph. The relationship verification module uses a basic verification method to verify the relationship. This relationship verification method can use the internal data of the knowledge graph to verify the correctness of the triples. The relationship verification module can verify the relationship between the entity pairs output by the link prediction module, form correct triples, and thus update the knowledge graph.
[0103] It should be noted here that the various modules in this embodiment correspond one-to-one to the various steps in Example 1, and the specific implementation processes are the same, which will not be repeated here.
[0104] Example 3
[0105] This embodiment provides an electronic device, including a memory and a processor, and computer instructions stored in the memory and running on the processor. When the computer instructions are run by the processor, the steps described in the method of embodiment 1 are completed.
[0106] Example 4
[0107] This embodiment provides a computer-readable storage medium for storing computer instructions. When the computer instructions are executed by a processor, the steps described in the method of embodiment 1 are completed.
[0108] The foregoing description is merely a preferred embodiment of the present disclosure and is not intended to limit the present disclosure. Those skilled in the art will readily appreciate that various modifications and variations are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present disclosure shall be included within the scope of protection of the present disclosure.
[0109] Although the above describes the specific implementation methods of the present disclosure in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present disclosure. Those skilled in the art should understand that on the basis of the technical solution of the present disclosure, various modifications or variations that can be made by those skilled in the art without creative work are still within the scope of protection of the present disclosure.
Claims
1. A knowledge representation method based on deep embedding representation and depth map calculation, characterized by: The process includes the following: For the processed knowledge graph, a link prediction algorithm is calculated using a deep graph to predict entity pairs that may form links in the knowledge graph based on the graph structure and semantic information of the knowledge graph; The depth map calculation link prediction algorithm specifically includes the following steps: An entity clustering algorithm is used to mine semantic information in the knowledge graph, and entities in the knowledge graph are clustered according to the semantic information, eliminating entity pairs that cannot form links to obtain clustered entity classes. The Rooted PageRank algorithm is used to calculate and mine the graph structure information in the knowledge graph, and the entity pairs that may form links are screened based on the graph structure information; According to the entity class obtained by the entity clustering algorithm, the confidence value between any head entity class and tail entity class is calculated. If the confidence value is greater than the set threshold , and for the entity pairs that may form links obtained by using the Rooted PageRank algorithm and , respectively, the confidence level is greater than the threshold , then the entity pair and Belong to the filtered entity candidate pairs; Using the deep embedding adaptive knowledge embedding method, we combine the adaptive metric method with the deep embedding space projection to verify the relationship between the entity pairs obtained in the link prediction stage, form the correct triples, and update the knowledge graph; The adaptive measurement method is to add an adaptive weight matrix to the score function, and the adaptive weight matrix is a diagonal weight matrix; The adaptive weight matrix is a diagonal weight matrix , giving each feature dimension a reasonable adaptive weight, so the score function is adjusted to: ; in: , which is a diagonal weight matrix, The weight of the feature dimension is used express, It is a non-negative symmetric weight matrix specifically for the relationship, obtained through training optimization, and is set to the identity matrix during initialization. The identity matrix indicates that each vector is independent and identically distributed; Deep embedding space projection, specifically: projecting the entities in the triple into the relational space through the relation matrix to obtain a new embedding vector; The method combines the adaptive metric method with the deep embedding space projection. Specifically, the adaptive metric method and the spatial projection model are combined and modeled under a unified model framework. Finally, the TransAR model is proposed. The adaptive weight matrix is added to the scoring function. The entity embedding vector in the scoring function is the new embedding vector obtained by projecting the entity triple into the relation space through the relation matrix. The Rooted PageRank algorithm is used to mine the graph structure information in the knowledge graph and screen entity pairs that may form links based on the graph structure information. The specific method is as follows: Treat the knowledge graph as an undirected graph , where the entity is an undirected graph Node, triple As an undirected graph Middle slave node Departure to the node An undirected edge of ; The Rooted PageRank algorithm is used to calculate the stable probability of walking from one node to another in an undirected graph. When the probability is greater than the threshold, the entity pair corresponding to the two nodes is an entity pair that may form a link.
2. The knowledge representation method based on deep embedding representation and depth map calculation according to claim 1, characterized in that: The deep graph calculation link prediction algorithm combines the Rooted PageRank algorithm and the entity clustering algorithm for joint screening, making the screened candidate entity pairs more likely to form links.
3. The knowledge representation method based on deep embedding representation and depth map calculation according to claim 1, characterized in that: The entity clustering algorithm is used to mine the semantic information in the knowledge graph and exclude entity pairs that cannot form links based on the semantic information. The steps include: Initialize the knowledge graph as a directed graph from the head entity to the tail entity through the relationship. The entity is the node in the directed graph. Traverse the relationship set of the knowledge graph to obtain the head entity class and tail entity class corresponding to each relationship to obtain the initial entity class. Calculate the similarity between the initialized entity classes and merge the entity classes whose similarity is greater than the set threshold.
4. A knowledge representation system based on deep embedding representation and deep map computation, characterized by: include: Link prediction module: configured to use the deep graph to calculate the link prediction algorithm for the processed knowledge graph, and predict the entity pairs that may form links in the knowledge graph based on the graph structure and semantic information of the knowledge graph; The depth map calculation link prediction algorithm specifically includes the following steps: An entity clustering algorithm is used to mine semantic information in the knowledge graph, and entities in the knowledge graph are clustered according to the semantic information, eliminating entity pairs that cannot form links to obtain clustered entity classes. The Rooted PageRank algorithm is used to calculate and mine the graph structure information in the knowledge graph, and the entity pairs that may form links are screened based on the graph structure information; According to the entity class obtained by the entity clustering algorithm, the confidence value between any head entity class and tail entity class is calculated. If the confidence value is greater than the set threshold , and for the entity pairs that may form links obtained by using the Rooted PageRank algorithm and , respectively, the confidence level is greater than the threshold , then the entity pair and Belong to the filtered entity candidate pairs; Relationship Verification Module: This module is configured to utilize a deep embedding adaptive knowledge embedding method, combining an adaptive metric method with deep embedding space projection, to verify the relationship between entity pairs obtained in the link prediction phase, form correct triples, and update the knowledge graph. The adaptive measurement method is to add an adaptive weight matrix to the score function, and the adaptive weight matrix is a diagonal weight matrix; The adaptive weight matrix is a diagonal weight matrix , giving each feature dimension a reasonable adaptive weight, so the score function is adjusted to: ; in: , which is a diagonal weight matrix, The weight of the feature dimension is used express, It is a non-negative symmetric weight matrix specifically for the relationship, obtained through training optimization, and is set to the identity matrix during initialization. The identity matrix indicates that each vector is independent and identically distributed; Deep embedding space projection, specifically: projecting the entities in the triple into the relational space through the relation matrix to obtain a new embedding vector; The method combines the adaptive metric method with the deep embedding space projection. Specifically, the adaptive metric method and the spatial projection model are combined and modeled under a unified model framework. Finally, the TransAR model is proposed. The adaptive weight matrix is added to the scoring function. The entity embedding vector in the scoring function is the new embedding vector obtained by projecting the entity triple into the relation space through the relation matrix. The Rooted PageRank algorithm is used to mine the graph structure information in the knowledge graph and screen entity pairs that may form links based on the graph structure information. The specific method is as follows: Treat the knowledge graph as an undirected graph , where the entity is an undirected graph Node, triple As an undirected graph Middle slave node Departure to the node An undirected edge of The Rooted PageRank algorithm is used to calculate the stable probability of walking from one node to another in an undirected graph. When the probability is greater than the threshold, the entity pair corresponding to the two nodes is an entity pair that may form a link.
5. An electronic device, characterized in that: The method comprises a memory and a processor, and computer instructions stored in the memory and executed on the processor, wherein the steps of any one of the methods of claims 1 to 3 are completed when the computer instructions are executed by the processor.
6. A computer-readable storage medium, characterized in that Used to store computer instructions, which, when executed by a processor, complete the steps of any one of the methods of claims 1 to 3.
Citation Information
Patent Citations
A method for constructing a fair link prediction evaluation system
CN109086373A
Knowledge graph relation prediction method based on feature extraction
CN114385831A