Entity relationship optimization method of knowledge graph based on embedded learning

By constructing a triplet line graph and a deep learning model, and combining word2vec and t-SNE algorithms, the triplet relationships in the knowledge graph are optimized, solving the problem of insufficient accuracy in existing technologies and achieving efficient relation extraction and model optimization.

CN116910271BActive Publication Date: 2026-02-17HANGZHOU DIANZI UNIVERSITY SHANGYU INSTITUTE OF SCIENCE & ENGINEERING CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310931506.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-27
Publication Date
2026-02-17
Estimated Expiration
2043-07-27

AI Technical Summary

Technical Problem

Existing technologies lack attention to the embedding of individual triples in knowledge graphs, and deep learning methods do not fully utilize topological structures, resulting in insufficient accuracy and scalability of relation extraction.

Method used

By constructing a triplet line graph, using the Triple2Vec weighting method and a deep learning model, combined with word2vec and t-SNE algorithms, the similarity of triplet relationships is captured, and relationship recommendation is optimized through human-computer interaction to achieve efficient correction of triplets.

Benefits of technology

It improves the accuracy of triple relation extraction in knowledge graphs and the generalization ability of deep learning models, and enhances the interpretability of results and the efficiency of correction for users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116910271B_ABST
    Figure CN116910271B_ABST
Patent Text Reader

Abstract

The application discloses an entity relationship optimization method of a knowledge graph based on embedded learning. The method regards the triples of an original knowledge graph as nodes, and adds a group of virtual relationship nodes; a weighting method is used to ensure that the more relevant the relationship in the triples of two nodes in a triple line graph is, the higher the weight of the edge between the nodes is; the confidence of each relationship obtained by the triples through a deep learning model is mapped into the weight of each triple node to the relationship node, so that the triples that are far apart in the topological structure become closer by sharing similar relationships. In the embedding space, the similarity of entities and semantics can be captured, and the correctness of triple relationships can be inferred, the relationship recommendation is performed for the triples with low credibility, the relationship correction of the triples is performed in combination with the man-machine interaction mode, the deep learning model is iteratively optimized by using the corrected data, and the quality of the relationship extraction result of the deep learning model is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the fields of computer science and artificial intelligence technology, and specifically relates to an entity relationship optimization method based on embedded learning knowledge graph. Background Technology

[0002] Knowledge graphs are an effective method for organizing various structured and unstructured information, data, and connections into knowledge. They store knowledge in the form of triples and possess powerful semantic processing and open organizational capabilities, forming the foundation for knowledge-based organizations and intelligent applications in the internet age. Relation extraction aims to solve the problem of semantic links between entities. Early relation extraction relied primarily on manually constructing semantic rules and templates to identify entity relationships, but this method consumed significant time and effort from domain experts and had poor portability, failing to adapt to new text corpora.

[0003] The development of machine learning algorithms has provided new solutions to the relation extraction problem. Traditional machine learning methods are divided into three categories: supervised, semi-supervised, and unsupervised. Supervised relation extraction algorithms have high accuracy, but are affected by the quality and quantity of labeled data and cannot be extended to new relations. Semi-supervised and unsupervised methods have weaker dependence on labeled data and are suitable for large-scale open-domain relation extraction, but their accuracy is lower and their scalability is limited. In recent years, deep learning-based methods have begun to dominate the field of relation extraction. These methods use neural networks to automatically extract features from raw text, avoiding tedious manual feature engineering, and have strong generalization ability when dealing with complex text relations. According to the order of entity and relation extraction, relation extraction methods can be divided into pipelined methods and joint entity and relation extraction methods, which typically use CNNs, RNNs, and their improved models for relation extraction.

[0004] Data visualization plays a crucial role in rapidly acquiring knowledge and discerning patterns. Applying visual analytics techniques to knowledge graphs can improve their construction and representation. Common knowledge graph visualizations include node connections, matrices, and hierarchical structures. Visual analytics techniques express the importance and relevance of entities and relationships through node size, edge thickness, and other methods. Simplified visualization methods for knowledge graphs are suitable for large-scale knowledge graphs, characterized by massive data volumes, multi-dimensional attributes, and complex structures. Some research focuses on the integration of knowledge graphs to promote the improvement and expansion of the entire knowledge graph system.

[0005] Knowledge graph embedding is a technique that maps entities and relations in a knowledge graph to a vector space. It transforms structured knowledge graph data into numerical features that machine learning algorithms can process, facilitating subsequent data mining, reasoning, and prediction tasks. Typical knowledge graph embedding techniques can be categorized into translation distance models and semantic matching models. Translation distance models utilize the translation invariance of word vector embedding spaces to represent relations as translations of entity vectors. Semantic matching models measure the credibility of facts by matching the latent semantics of entities with the relations contained in the vector space representation. These embedding methods have proven highly effective in tasks such as link prediction and knowledge graph completion. However, most methods encode entities and predicates in independent embedding vectors, lacking attention to the embedding of individual triples. Existing research primarily focuses on the visualization and processing of knowledge graphs. Summary of the Invention

[0006] The purpose of this invention is to provide a method for optimizing entity relationships in knowledge graphs based on embedded learning.

[0007] This invention treats triples in the original knowledge graph as nodes and adds a set of virtual relation nodes. Utilizing the weighting method in Triple2Vec, it ensures that the more relevant the relations between the triples of two nodes in the triplet graph, the higher the weight of the edge between these nodes. Simultaneously, it maps the confidence of each relation obtained from the deep learning model to the weight of each triplet node relative to the relation node, making triples that are geographically distant in the topology closer together by sharing similar relations. The specific method is as follows:

[0008] Step (1) Define the knowledge graph G = (VE, EG, TG); where the set of triples TG = {(h1, r1, t1), (h2, r2, t2), ..., (h K ,r K ,t K )}, where K represents the number of triples; in a triple, h represents the head entity, t represents the head and tail entities, and r represents the relationship between the head entity and the tail entity; the entity set VE = {(h1,t1),(h2,t2),…,(h K ,t K The relation set EG = {r1, r2, ..., r} K};

[0009] Construct a triplet graph GL = (VL, EL, w); where the node set VL includes triplet nodes and relation nodes. Triplet nodes are all triples in the triplet set TG, and relation nodes are all relations in the relation set EG. The connection between each triplet node and all relation nodes is an edge, EL represents the set of edges, and w represents the weight of the edge. If the triplet (h...i ,r i ,t i ) and (h j ,r j ,t j )satisfy If two triples have the same entity, then add an undirected edge E in GL. i,j ∈EL, which is the connection between two triple nodes;

[0010] The weight w of the edge formed by two triplet nodes T The setup method is as follows:

[0011] a. Calculate the nodes of the two triplet pairs (h) i ,r i ,t i ) and (h j ,r j ,t j ) relational word frequency TF(r) i ,r j )=lg(1+C i,j ), C i,j Indicates that r is one of the two triplet nodes i and r j The number of times the same entity is connected;

[0012] b. Calculate inverse document frequency |·| represents the number of elements in the set;

[0013] c. Establish the co-occurrence matrix C M (i,j,EG)=TF(r i ,r j )×IDF(r j ,EG);

[0014] d. Calculate the weights w T =Softmax(cos(w i ,w j )), Softmax(·) represents the normalization function, w i and w j These are r in the co-occurrence matrix. i and r j The corresponding line, cos(w i ,w j ) indicates taking w i with w j The cosine of .

[0015] This method guarantees that the more relevant the relations in the triples between two nodes in a triplet graph, the higher the weight of the edge between those nodes. However, measuring relation relevance solely by word frequency is insufficient to interpret the true semantics of triples. Furthermore, its effectiveness is even more limited when the number of triples is small. Therefore, this paper aims to capture the similarity of relations within triples by characterizing the degree of connection between triples and relation nodes.

[0016] For triple node (h) i ,r i ,t i ) and relation node r j The weight w of the formed edge R =P i,j ;P i,j The triplet (h) obtained in the deep learning model i ,r i ,t i In relation r j The confidence level value.

[0017] Step (2) Set the weight w T and w R Given the proportions α and β, where α > 0, β > 0, and α + β = 1, then the walk probability of the edge formed by the two triplet nodes is... The probability of traversing an edge formed by a triplet node and a relation node.

[0018] Starting from each triple node, the system walks according to the walk probability until a specified walk length is reached, which is the number of triple nodes walked. The triple node sequence generated by the walk constitutes the corpus. The corpus learns the relationship between triple nodes through the Skip-gram model in the word2vec algorithm to obtain the vector representation corresponding to each triple node, which is the joint probability of each word as the center word generating the background word.

[0019] Negative samples are sampled and trained to improve the efficiency of the Skip-gram model and the quality of vector representation. Parallel asynchronous stochastic gradient descent algorithm is used to optimize the objective function so that the probability distribution of the Skip-gram model when predicting context words is close to the actual distribution.

[0020] The t-SNE dimensionality reduction algorithm is used to project the vector representation learned by the Skip-gram model onto a two-dimensional plane, resulting in the two-dimensional planar distribution of each triple. The two-dimensional planar distribution of all triples constitutes the embedding space, which maps the similarity of triples to the distance distribution in the low-dimensional space. The greater the distance, the smaller the similarity.

[0021] Step (3) In the embedding space, for triples with the same head entity to tail entity relation r, calculate the center coordinates of these triples. Triples whose Euclidean distance from the center coordinates is greater than a set value are considered low-reliability triples, and more likely correct relations are recommended for them: Calculate the center coordinates of each relation r, and the Euclidean distance between the low-reliability triples and their center coordinates. Rank the relations according to the distance values, and select the relations with the smallest Euclidean distances as the recommended relations for the low-reliability triples. In this way, by providing more reliable relation recommendations for triples that are highly likely to be incorrect, efficient triple relation extraction and correction is achieved.

[0022] Step (4) The user selects a recommendation relation, corrects the relation r in the low credibility triplet, feeds the corrected data back to the deep learning model for retraining, and repeats steps (2) and (3) until the requirements are met.

[0023] This invention presents a triple-based embedding method that projects triples into a low-dimensional space for easier interpretation. Within this embedding space, it captures the similarity between entities and semantics, as well as the correctness of inferred triple relationships. Relationship recommendations are then made for triples with low reliability, and human-computer interaction is used to correct these relationships. This allows for iterative optimization of the deep learning model using higher-quality correction data, significantly improving the quality of relation extraction results and meeting user needs. Attached Figure Description

[0024] Figure 1 A schematic diagram for constructing a ternary group line graph;

[0025] Figure 2 This is a diagram illustrating the relationship between confidence level and relation extraction accuracy.

[0026] Figure 3 This is a schematic diagram of the embedded space;

[0027] Figure 4 This is a schematic diagram of a human-computer interaction page. Detailed Implementation

[0028] The entity relationship optimization method for knowledge graphs based on embedded learning is as follows:

[0029] Step (1) Define the knowledge graph G = (VE, EG, TG); where the set of triples TG = {(h1, r1, t1), (h2, r2, t2), ..., (h K ,r K ,t K )}, where K represents the number of triples; in a triple, h represents the head entity, t represents the head and tail entities, and r represents the relationship between the head entity and the tail entity; the entity set VE = {(h1,t1),(h2,t2),…,(hK ,t K The relation set EG = {r1, r2, ..., r} K};

[0030] Construct a triplet line graph GL = (VL, EL, w), as follows: Figure 1 As shown, the node set VL includes triple nodes and relation nodes. Triple nodes are all triples in the triple set TG, and relation nodes are all relations in the relation set EG. The connection between each triple node and all relation nodes is an edge, EL represents the set of edges, and w represents the weight of the edge. If the triple (h... i ,r i ,t i ) and (h j ,r j ,t j )satisfy If two triples have the same entity, then add an undirected edge E in GL. i,j ∈EL, which is the connection between two triplet nodes. Figure 1 The triples (h1,r1,t1) and (h2,r2,t2) have the same head entity h.

[0031] The weight w of the edge formed by two triplet nodes T The setup method is as follows:

[0032] a. Calculate the nodes of the two triplet pairs (h) i ,r i ,t i ) and (h j ,r j ,t j ) relational word frequency TF(r) i ,r j )=lg(1+C i,j ), C i,j Indicates that r is one of the two triplet nodes i and r j The number of times the same entity is connected;

[0033] b. Calculate inverse document frequency |·| represents the number of elements in the set;

[0034] c. Establish the co-occurrence matrix C M (i,j,EG)=TF(r i ,r j )×IDF(r j ,EG);

[0035] d. Calculate the weights w T =Softmax(cos(wi ,w j )), Softmax(·) represents the normalization function, w i and w j These are r in the co-occurrence matrix. i and r j The corresponding line, cos(w i ,w j ) indicates taking w i with w j The cosine of .

[0036] For triple node (h) i ,r i ,t i ) and relation node r j The weight w of the formed edge R =P i,j ;P i,j The triplet (h) obtained in the deep learning model i ,r i ,t i In relation r j The confidence score. The relationship between confidence score and relation extraction accuracy is as follows: Figure 2 As shown in the three sets of data, the higher the confidence level, the higher the accuracy of relation extraction.

[0037] Step (2) Set the weight w T and w R Given the proportions α and β, where α > 0, β > 0, and α + β = 1, then the walk probability of the edge formed by the two triplet nodes is... The probability of traversing an edge formed by a triplet node and a relation node.

[0038] Starting from each triple node, the system walks according to the walk probability until a specified walk length is reached, which is the number of triple nodes walked. The triple node sequence generated by the walk constitutes the corpus. The corpus learns the relationship between triple nodes through the Skip-gram model in the word2vec algorithm to obtain the vector representation corresponding to each triple node, which is the joint probability of each word as the center word generating the background word.

[0039] Negative samples are sampled and trained to improve the efficiency of the Skip-gram model and the quality of vector representation. Parallel asynchronous stochastic gradient descent algorithm is used to optimize the objective function so that the probability distribution of the Skip-gram model when predicting context words is close to the actual distribution.

[0040] The t-SNE dimensionality reduction algorithm is used to project the vector representations learned by the Skip-gram model onto a two-dimensional plane, obtaining the two-dimensional planar distribution of each triplet. The two-dimensional planar distributions of all triplets constitute the embedding space, such as... Figure 3 The similarity of triples is mapped to a distance distribution in a low-dimensional space; the greater the distance, the smaller the similarity.

[0041] Step (3) In the embedding space, for triples with the same head entity to tail entity relation r, calculate the center coordinates of this part of the triples. Triples with a Euclidean distance greater than a set value from the center coordinates are considered low-confidence triples, and more likely correct relations are recommended for them: calculate the center coordinates of each relation r, and the Euclidean distance between the low-confidence triples and the center coordinates. Rank each relation according to the distance value, and select multiple relations with small Euclidean distances as the recommended relations for the low-confidence triples.

[0042] Step (4) The user selects a recommendation relation, corrects the relation r in the low credibility triplet, feeds the corrected data back to the deep learning model for retraining, and repeats steps (2) and (3) until the requirements are met.

[0043] To quickly identify relation errors in triples, the extraction results of the knowledge graph are visualized and overviewed. A confidence view is used. Figure 4 (Part C)) and projection view ( Figure 4 (Part b) enhances the visual perception of the correctness of triples extracted from different perspectives. In the confidence view, each axis represents a relation, and the graph's values ​​map the confidence values ​​of the relation extraction model. Each triple is represented by a line spanning all axes, and the width of the small rectangles on the axes shows the distribution of confidence values ​​across each relation. Filtering allows users to select specific relations or confidence intervals to highlight data that meets their needs, enabling a more focused and accurate analysis of the extracted results. Triples with the highest confidence across all relations are often triples with incorrect relations.

[0044] The dimensionality reduction technique used maps the features of triple nodes to a two-dimensional space for easier human interpretation. Each point in the projected view corresponds to a triple, and the current relationship is mapped by color. The embedding method makes triples with the same relationship closer together, thus identifying triples with low confidence, which users can select for further examination. When users filter or select specific triples in the parallel coordinate graph, the corresponding projection point in the projected view is highlighted. Clicking on the projection point highlights the confidence distribution of the corresponding triple in the parallel coordinate graph.

[0045] After initially identifying suspicious triples from a large number of triples through an overview of the extraction results, some auxiliary methods are needed to help users achieve efficient and accurate relation correction. This invention provides detailed information on specific triples from both topological and contextual perspectives.

[0046] The topological graph structure of a knowledge graph, as a semantic network, reveals the association patterns between different triples. However, current deep learning-based extraction methods often fail to fully utilize this topological structure. To address this issue, a local knowledge graph view (…) is introduced. Figure 4 (Part d) allows users to view the topological information of selected triples and their neighboring triples in the knowledge graph, where the number of neighboring hops can be specified by the user. In the local knowledge graph view, the credibility of a triple can be evaluated by examining its topological features, such as the degrees of the head and tail entities, the number of reachable paths between them, and the meaning of the neighbors, which helps in interpreting and inferring its credibility. Furthermore, additional contextual information is provided to the user to help assess the reliability and accuracy of the selected triple. This includes the original triple corpus as well as other triples with similar projection positions displayed in the corrected view. Figure 4 (Part e)

[0047] After determining the correctness of relation extraction for a specific triple, the system needs to automatically recommend more correct relations for correction, thereby significantly improving the efficiency and accuracy of manual judgment. Based on the designed embedding method, projection points that are geographically close in the projection view have more similar characteristics. Therefore, the three relations with the smallest distance to the center of each relation category for the currently selected triple are recommended. Simultaneously, interactive functions are provided in the projection view; for example, users can select a region containing the current triple, and neighboring triples will be added to the correction view for detailed comparison, thus helping users select the correct relations and achieving high-quality triple correction.

[0048] The corrected, high-quality data is fed back into the deep learning model, which helps the model better adapt to labeled data, improving its accuracy and generalization ability. Furthermore, interpreting this optimization process facilitates a more intuitive understanding of model performance during training. An update list is provided ( Figure 4 (Part f) records the updated triplet counts identified by the model in each training session. A series of stacked bar charts are designed to be arranged in descending order, each bar depicting the change in the number of triplets for a given relation during training, where the black border and the filled colored rectangle represent the previous and current heights, respectively. In this way, different roles in different relations can be revealed and compared in each training session. For example, from ( Figure 4As seen in (f section), this training resulted in an increase in the number of triples identified as CE.

[0049] Historical views based on thematic rivers Figure 4 (Part h) is used to track how relation extraction quality changes with the number of training sessions. Each river corresponds to a type of relation, stacked together, with the horizontal axis representing the number of training sessions. The width of the river represents the average information entropy value of the confidence of each triple at the current number of training sessions. Information entropy measures the uncertainty of relation extraction results; a smaller value indicates a more certain extraction result. Therefore, this graph shows the trend of triple relation extraction quality for different relations with the number of training sessions. It's conceivable that the width of the river becomes narrower as the number of training sessions increases.

Claims

1. A method for optimizing entity relationships in knowledge graphs based on embedded learning, characterized in that, The method includes the following steps: Step (1) Set the knowledge graph G = (VE, EG, TG); The set of triples TG = {(h1,r1,t1),(h2,r2,t2),…,(h…} K ,r K ,t K )}, where K represents the number of triples; in a triple, h represents the head entity, t represents the head and tail entities, and r represents the relationship between the head entity and the tail entity; the entity set VE = {(h1,t1),(h2,t2),…,(h K ,t K The relation set EG = {r1, r2, ..., r} K }; Construct a triplet graph GL = (VL, EL, w); where the node set VL includes triplet nodes and relation nodes. Triplet nodes are all triples in the triplet set TG, and relation nodes are all relations in the relation set EG. The connection between each triplet node and all relation nodes is an edge, EL represents the set of edges, and w represents the weight of the edge, including the weight w of the edge formed by two triplet nodes. T The weight w of the edge formed by the triple node and the relation node R If the triple (h) i ,r i ,t i ) and (h j ,r j ,t j )satisfy If two triples have the same entity, then add an undirected edge E in GL. i,j ∈EL, which is the connection between two triple nodes; Step (2) Set the weight w T and w R Given the proportions α and β, where α > 0, β > 0, and α + β = 1, then the walk probability of the edge formed by the two triplet nodes is... The probability of traversing an edge formed by a triplet node and a relation node. Starting from each triple node, the system walks according to the walk probability until a specified walk length is reached, which is the number of triple nodes walked. The triple node sequence generated by the walk constitutes the corpus. The corpus learns the relationship between triple nodes through the Skip-gram model in the word2vec algorithm to obtain the vector representation corresponding to each triple node, which is the joint probability of each word as the center word generating the background word. The t-SNE dimensionality reduction algorithm is used to project the vector representation learned by the Skip-gram model onto a two-dimensional plane to obtain the two-dimensional plane distribution of each triplet. The two-dimensional plane distribution of all triplets constitutes the embedding space. Step (3) In the embedding space, for triples with the same head entity to tail entity relation r, calculate the center coordinates of the triples. Triples with a Euclidean distance greater than a set value from the center coordinates are considered low-confidence triples. Recommend more likely correct relations to them: calculate the center coordinates of each relation r, and the Euclidean distance between the low-confidence triples and the center coordinates. Rank the relations according to the distance values ​​and select the relations with smaller Euclidean distances as the recommended relations for the low-confidence triples. Step (4) The user selects a recommendation relation, corrects the relation r in the low credibility triplet, feeds the corrected data back to the deep learning model for retraining, and repeats steps (2) and (3) until the requirements are met.

2. The entity relationship optimization method based on embedded learning knowledge graph as described in claim 1, characterized in that: For the weight w of the edge consisting of two triad nodes T The setting method is as follows: a. Calculate the nodes of the two triplet pairs (h) i ,r i ,t i ) and (h j ,r j ,t j ) relational word frequency TF(r) i ,r j )=lg(1+C i,j ), C i,j Indicates that r is one of the two triplet nodes i and r j The number of times the same entity is connected; b. Calculate inverse document frequency ·| indicates the number of elements in the set; c. Establish the co-occurrence matrix C M (i,j,EG)=TF(r i ,r j )×IDF(r j ,EG); d. Compute weights w T = Softmax(cos(w i ,w j )), Softmax( · ) denotes a normalization function, w i and w j are the rows in the co-occurrence matrix corresponding to r i and r j respectively, and cos(w i ,w j ) denotes the cosine of w i and w j .

3. The entity relationship optimization method based on embedded learning knowledge graph as described in claim 1, characterized in that: For the edge consisting of the triple node (h i ,r i ,t i ) and the relation node r j , the weight w R = P i,j ; P i,j represents the confidence value of the triple (h i ,r i ,t i ) obtained in the deep learning model on the relation r j .

Citation Information

Patent Citations

  • Domain knowledge graph recommendation method for global comprehensive observation results

    CN113254630A

  • Collaborative relation graph-based recommendation method and related device

    CN114461929A