Knowledge graph construction method for structural information aggregation
By converting the entity attribute information in the cross-source knowledge graph into structured vectors and aggregating them step by step, the problems of pattern differences and structural breaks in the cross-source knowledge graph fusion are solved, the semantic consistency and density of the knowledge graph are improved, and the consistency and discriminability of entity representation are enhanced.
Patent Information
- Application Number
- CN202511101993.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-07
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2045-08-07
AI Technical Summary
Existing technologies have problems with pattern differences, semantic drift, redundant loss, and structural breaks when fusing cross-source knowledge graphs. Traditional triple modeling methods can only capture local information, and graph neural networks and Transformers have the problem of incomplete structural representation when used alone.
The discrete, disordered, and heterogeneous entity attribute information in the cross-source knowledge graph is converted into a continuous, ordered, and structured entity attribute vector. Selective modeling is performed through the attention mechanism to achieve step-by-step aggregation from the local triple structure to the graph-level semantic structure. Multiple completions and alignments are performed alternately to enhance the consistency and discriminability of entity representation.
It significantly improves the integrity and practicality of the knowledge graph after fusion, realizes the comparability and fusion of heterogeneous entities in the same vector space, and enhances the semantic space consistency and knowledge density of the knowledge graph.
Smart Images

Figure CN120598017A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of knowledge graph technology, and specifically to a method for constructing a knowledge graph by aggregating structural information. Background Art
[0002] Knowledge graphs are widely used in government, finance, healthcare, and other fields. Graph fusion is difficult due to diverse data sources, inconsistent entity naming, and widely varying relationship structures. Cross-source knowledge graph fusion typically suffers from pattern differences, semantic drift, redundant loss, and structural fractures. Traditional triple modeling methods can only capture local information and struggle to unify the semantic space of multi-source graphs. While graph neural networks and Transformers each have their own advantages, they also suffer from incomplete structural representation when used alone. Therefore, a unified modeling approach is needed that integrates contextual semantics, structural adjacency features, and attribute expression capabilities. Summary of the Invention
[0003] In view of the above situation, in order to overcome the defects of the prior art, the present invention provides a knowledge graph construction method for structural information aggregation. In view of the problems of pattern differences, semantic drift, redundant loss, and structural breaks in the fusion of general cross-source knowledge graphs, this solution converts the discrete, disordered, and heterogeneous entity attribute information in the cross-source knowledge graph into continuous, ordered, and structured entity attribute vectors. As a carrier of structural information aggregation, it helps to connect different knowledge graphs and model the structural semantics of the graph, so that heterogeneous entities are comparable and fusible in the same vector space. The traditional triple modeling method can only capture local information and is difficult to unify the semantic space of multi-source graphs. To solve the problem of incomplete structural representation, this solution realizes the step-by-step aggregation from local triple structure to graph-level semantic structure, retains the structural semantic role of entities in different knowledge graphs, selectively models the adjacency relationship through the attention mechanism, introduces relational semantic similarity, and enhances the consistency and discriminability of entity representation; Graph neural networks and Transformer each have their own advantages, but there is also the problem of incomplete structural representation when used alone. This solution realizes the closed-loop enhancement process at the entity level and structure level, and realizes the consistency of the semantic space of the knowledge graph and the improvement of knowledge density through multiple completion and alignment executions, which significantly improves the integrity and practicality of the knowledge graph after fusion.
[0004] The technical solution adopted by the present invention is as follows: The present invention provides a method for constructing a knowledge graph by aggregating structural information, the method comprising the following steps:
[0005] Step S1: Data collection: collect at least two knowledge graphs to be aligned. Each knowledge graph contains entity, relationship, and attribute triples, which are summarized into entity sets, relationship sets, and attribute sets respectively. Each entity corresponds to multiple attribute key-value pairs, and the knowledge graphs are preprocessed.
[0006] Step S2: Entity semantic understanding: traverse each entity in the entity set in turn, obtain context-aware semantic embedding, and capture the structural associations between multiple attributes corresponding to the entity to generate an entity attribute vector;
[0007] Step S3: Structural context aggregation, extracting all adjacent triples of the entity in the knowledge graph and generating the entity's contextual structural representation and graph-level structural representation;
[0008] Step S4: weighted relationship representation, constructing a weighted adjacency matrix for each relationship in the relationship set;
[0009] Step S5: Fusion graph construction: Based on the entity attribute vector, context structure representation and graph-level structure representation, all entities in the knowledge graph to be aligned are aligned and merged, and the fused knowledge graph is output in combination with the weighted adjacency matrix.
[0010] Furthermore, in step S2, the entity semantic understanding includes the following steps:
[0011] Step S21: Attribute extraction, traversing each entity in the entity set in turn, and extracting all attribute key-value pairs corresponding to the entity;
[0012] Step S22: semantic embedding, introducing a pre-trained BERT word vector model, inputting the keys and values of all attribute key-value pairs corresponding to the entity into the BERT word vector model respectively, obtaining context-aware semantic embedding, and generating attribute vectors; the pre-trained BERT word vector model uses the bert-base-chinese model pre-trained on the Chinese Wikipedia corpus, including a 12-layer Transformer encoder, and a word vector dimension of 768;
[0013] Step S23: Temporal encoding, obtaining a pre-trained BiLSTM model, inputting all attribute vectors into the BiLSTM model in sequence, capturing the structural associations between attributes, and obtaining a sequence representation of the attribute vectors; the pre-trained BiLSTM model is constructed based on a bidirectional structure, including a forward LSTM with 128 hidden units and a reverse LSTM with 128 hidden units, and is combined with public NER corpus for transfer training to output a sequence context feature vector;
[0014] Step S24: Attention weighted aggregation, using the weighted self-attention mechanism to aggregate the sequence representation of the attribute vector to generate the entity attribute vector. The formula used is as follows: ;
[0015] Where, represents any entity in the entity set E, Representing an entity Entity attribute vector of Representing an entity The total number of corresponding attribute key-value pairs, Represents the index of the attribute key-value pair, and Represents the key and value of the attribute key-value pair respectively, represents the attribute vector, represents the sequence representation of the attribute vector, Represents weight.
[0016] Furthermore, in step S3, the structural context aggregation includes the following steps:
[0017] Step S31: extract local subgraphs. Taking the entity as the center, extract all adjacent triplets of the entity in the knowledge graph to be aligned, construct a graph structure adjacency matrix, and generate a local subgraph of the entity.
[0018] Step S32: Extracting the contextual structure representation, a pre-trained lightweight Transformer sequence encoder is introduced, each triple in the local subgraph is input, converted into a vector sequence, and the contextual structure representation of the entity is output; the lightweight Transformer sequence encoder uses the TinyBERT model released by Huawei NOAH Laboratory, which contains 4 Transformer layers, a hidden dimension of 312, 12 attention heads, and a total parameter volume of approximately 14.5M;
[0019] Step S33: Extract graph-level structural representation. Merge the contextual structural representations of the entity in different local subgraphs, introduce a pre-trained graph-level Transformer model, use the graph structure adjacency matrix to constrain the attention propagation path, use the relationship semantic similarity as the attention bias, and output the graph-level structural representation of the entity. The pre-trained graph-level Transformer model uses a Graphormer model with graph structure perception capabilities, and fuses the structural distance information between nodes through the Attention Bias mechanism to promote the representation learning of subgraphs in the knowledge graph. The formula used is as follows: ;
[0020] Where, Representing an entity The graph-level structure representation of Representing an entity The context structure representation of Represents the graph structure adjacency matrix, Indicates the semantic similarity of the relationship, Represents a graph-level Transformer model.
[0021] Furthermore, in step S5, the fusion map is constructed, including the following steps:
[0022] Step S51: Graph convolution fusion: Input the entity attribute vector, the entity context structure representation, the entity graph structure representation, and the weighted adjacency matrix of the relationship into a multi-layer graph convolutional network, and output a unified entity semantic vector. The graph convolution propagation formula is as follows: ; ;
[0023] Where, represents the number of training layers, 、 Respectively represent Layer and The entity semantic vector output by the layer, The weighted adjacency matrix representing the relationship, represents the identity matrix, represents the node degree matrix of the multi-layer graph convolutional network, represents the activation function, Indicates the The trainable parameters of the layer, Represents the initial input of the multi-layer graph convolutional network;
[0024] Step S52: Alignment determination: use the aligned entity pairs in the original knowledge graph as positive samples, randomly select non-aligned entity pairs as negative samples, construct a training set, and use the SVM linear discriminant function to train the threshold classifier;
[0025] Step S53: Entity pair merging: calculate the Manhattan distance for any entity pair and set a merging threshold. If the Manhattan distance is lower than the set threshold, it is determined to be the same entity and the merging operation is performed;
[0026] Step S54: triples are merged to construct a fused entity set from all aligned entities, and the original triples and newly added cross-source edges are merged to construct a fused relationship set and a fused triple set;
[0027] Step S55: Knowledge graph generation. Take the current knowledge graph as input and repeat steps S2 to S4 until the number of newly added triples is lower than the preset threshold. Stop the iteration and finally output the fused knowledge graph.
[0028] The beneficial effects achieved by the present invention using the above scheme are as follows:
[0029] (1) In response to the problems of pattern differences, semantic drift, redundant loss, and structural breaks in the fusion of general cross-source knowledge graphs, this solution transforms the discrete, disordered, and heterogeneous entity attribute information in the cross-source knowledge graphs into continuous, ordered, and structured entity attribute vectors. As a carrier for structural information aggregation, it helps to connect different knowledge graphs and model graph structure semantics, making heterogeneous entities comparable and fusible in the same vector space.
[0030] (2) To address the problem that traditional triple modeling methods can only capture local information and are difficult to unify the semantic space of multi-source graphs, this solution realizes step-by-step aggregation from local triple structures to graph-level semantic structures, retains the structural semantic roles of entities in different knowledge graphs, selectively models adjacency relationships through the attention mechanism, introduces relational semantic similarity, and enhances the consistency and discriminability of entity representation.
[0031] (3) Graph neural networks and Transformers each have their own advantages, but when used alone, they also have the problem of incomplete structural representation. This solution implements a closed-loop enhancement process at the entity level and structure level. By alternating multiple completions and alignments, it achieves the consistency of the semantic space of the knowledge graph and the improvement of knowledge density, significantly improving the integrity and practicality of the knowledge graph after fusion. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 A schematic diagram of the process of constructing a knowledge graph for structural information aggregation proposed in the present invention;
[0033] Figure 2 Schematic diagram of the process of step S2;
[0034] Figure 3 Schematic diagram of the process of step S3.
[0035] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention. DETAILED DESCRIPTION
[0036] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0037] Example 1, see Figure 1 The present invention provides a method for constructing a knowledge graph by aggregating structural information, which comprises the following steps:
[0038] Step S1: Data collection: collect two knowledge graphs to be aligned. Each knowledge graph contains entity, relationship, and attribute triples, which are summarized into entity sets, relationship sets, and attribute sets respectively. Each entity corresponds to multiple attribute key-value pairs, and the knowledge graphs are preprocessed.
[0039] Step S2: Entity semantic understanding: traverse each entity in the entity set in turn, obtain context-aware semantic embedding, and capture the structural associations between multiple attributes corresponding to the entity to generate an entity attribute vector;
[0040] Step S3: Structural context aggregation, extracting all adjacent triples of the entity in the knowledge graph and generating the entity's contextual structural representation and graph-level structural representation;
[0041] Step S4: weighted relationship representation, constructing a weighted adjacency matrix for each relationship in the relationship set;
[0042] Step S5: Fusion graph construction: Based on the entity attribute vector, context structure representation and graph-level structure representation, all entities in the knowledge graph to be aligned are aligned and merged, and the fused knowledge graph is output in combination with the weighted adjacency matrix.
[0043] Example 2, see Figure 1 This embodiment is based on the above embodiment. In step S1, data collection specifically includes the following steps:
[0044] Step S11: Data input, obtain two knowledge graphs G1 and G2 to be aligned. Each knowledge graph contains entity, relationship, and attribute triples, which are summarized as entity set E, relationship set R, and attribute set A. Each entity e in the entity set E corresponds to multiple attribute key-value pairs. ;
[0045] Step S12: Data preprocessing, all attribute key-value pairs in attribute set A Attribute value Standardization is performed and missing values are filled with special markers.
[0046] Example 3, see Figure 1 and Figure 2 This embodiment is based on the above embodiment. In step S2, entity semantic understanding specifically includes the following steps:
[0047] Step S21: Attribute extraction, traverse each entity e from the entity set E in turn, and extract all attribute key-value pairs corresponding to entity e ;
[0048] Step S22: semantic embedding, introducing a pre-trained BERT word vector model, inputting the keys and values of all attribute key-value pairs corresponding to entity e into the BERT word vector model respectively, obtaining context-aware semantic embedding, and generating attribute vectors; the pre-trained BERT word vector model uses the bert-base-chinese model pre-trained on the Chinese Wikipedia corpus, including a 12-layer Transformer encoder, and a word vector dimension of 768;
[0049] Step S23: Temporal encoding, obtaining a pre-trained BiLSTM model, inputting all attribute vectors into the BiLSTM model in sequence, capturing the structural associations between attributes, and obtaining a sequence representation of the attribute vectors; the pre-trained BiLSTM model is constructed based on a bidirectional structure, including a forward LSTM with 128 hidden units and a reverse LSTM with 128 hidden units, and is combined with public NER corpus for transfer training to output a sequence context feature vector;
[0050] Step S24: Attention weighted aggregation, using the weighted self-attention mechanism to aggregate the sequence representation of the attribute vector to generate the entity attribute vector. The formula used is as follows: ;
[0051] Where, represents any entity in the entity set E, Representing an entity Entity attribute vector of Representing an entity The total number of corresponding attribute key-value pairs, Represents the index of the attribute key-value pair, and Represents the key and value of the attribute key-value pair respectively, represents the attribute vector, represents the sequence representation of the attribute vector, Represents weight.
[0052] By performing the above operations, this solution transforms the discrete, disordered, and heterogeneous entity attribute information in cross-source knowledge graphs into continuous, ordered, and structured entity attribute vectors to address the problems of pattern differences, semantic drift, redundant loss, and structural breaks that occur during the fusion of general cross-source knowledge graphs. As a carrier for aggregating structural information, this solution helps connect different knowledge graphs and model graph structure semantics, making heterogeneous entities comparable and fusible in the same vector space.
[0053] Example 4, see Figure 1 and Figure 3 This embodiment is based on the above embodiment. In step S3, the structure context is aggregated, specifically including the following steps:
[0054] Step S31: Extract local subgraphs, based on entities Extract entities as the center For all adjacent triples in the knowledge graphs G1 and G2, a graph structure adjacency matrix is constructed to generate a local subgraph of the entity e.
[0055] Step S32: Context structure representation extraction, introduce pre-trained lightweight Transformer sequence encoder, input each triple in the local subgraph, convert it into a vector sequence, and output the entity The lightweight Transformer sequence encoder uses the TinyBERT model released by Huawei NOAH Laboratory, which contains 4 Transformer layers, a hidden dimension of 312, 12 attention heads, and a total parameter size of approximately 14.5M.
[0056] Step S33: Extract graph-level structure representation, merge the context structure representations of entity e in different local subgraphs, introduce the pre-trained graph-level Transformer model, use the graph structure adjacency matrix to constrain the attention propagation path, use the relational semantic similarity as the attention bias, and output the entity The pre-trained graph-level Transformer model uses a Graphormer model with graph structure perception capabilities and fuses the structural distance information between nodes through the Attention Bias mechanism. The formula used is as follows: ;
[0057] Where, Representing an entity The graph-level structure representation of Representing an entity The context structure representation of Represents the graph structure adjacency matrix, Indicates the semantic similarity of the relationship, Represents a graph-level Transformer model.
[0058] By performing the above operations, this solution implements step-by-step aggregation from local triple structures to graph-level semantic structures to address the problem that traditional triple modeling methods can only capture local information and are difficult to unify the semantic space of multi-source graphs. It retains the structural semantic roles of entities in different knowledge graphs, selectively models adjacency relationships through the attention mechanism, introduces relational semantic similarity, and enhances the consistency and discriminability of entity representation.
[0059] Example 5, see Figure 1 This embodiment is based on the above embodiment. In step S4, the weighted relationship is expressed, specifically including the following steps:
[0060] Step S41: Relation semantics calculation, using the pre-trained BERT word vector model to obtain semantic representations for all relations r in the relation set R and generate semantic embedding vectors;
[0061] Step S42: Relationship semantic weighting, calculate the maximum cosine similarity between the relationship r in the knowledge graph G1 and all the relationships in the knowledge graph G2 as the weight of the relationship, and construct a weighted adjacency matrix of the relationship.
[0062] Example 6, see Figure 1 This embodiment is based on the above embodiment. In step S5, the fusion map is constructed, which specifically includes the following steps:
[0063] Step S51: Graph convolution fusion, entity attribute vector, entity Context structure representation, entity The graph-level structure representation and the weighted adjacency matrix of the relationship are input into the multi-layer graph convolutional network, and a unified entity semantic vector is output. The graph convolution propagation formula is as follows: ; ;
[0064] Where, represents the number of training layers, 、 Respectively represent Layer and The entity semantic vector output by the layer, The weighted adjacency matrix representing the relationship, represents the identity matrix, represents the node degree matrix of the multi-layer graph convolutional network, represents the activation function, Indicates the The trainable parameters of the layer, Represents the initial input of the multi-layer graph convolutional network;
[0065] Step S52: Alignment determination: use the aligned entity pairs in the original knowledge graph as positive samples, randomly select non-aligned entity pairs as negative samples, construct a training set, and use the SVM linear discriminant function to train the threshold classifier;
[0066] Step S53: Entity pair merging: calculate the Manhattan distance for any entity pair and set a merging threshold. If the Manhattan distance is lower than the set threshold, it is determined to be the same entity and the merging operation is performed;
[0067] Step S54: Merge the triples to construct a fused entity set E* from all aligned entities, and merge the original triples with the newly added cross-source edges to construct a fused relationship set R* and a fused triple set T*.
[0068] Step S55: Knowledge graph generation. Take the current knowledge graph as input and repeat steps S2 to S4 until the number of newly added triples is lower than the preset threshold. Stop the iteration and finally output the fused knowledge graph.
[0069] By executing the above operations, graph neural networks and Transformers each have their own advantages, but when used alone, there is also the problem of incomplete structural representation. This solution implements a closed-loop enhancement process at the entity level and structure level. By alternating multiple completions and alignments, the semantic space of the knowledge graph is consistent and the knowledge density is improved, significantly improving the integrity and practicality of the knowledge graph after fusion.
[0070] Example 7, see Figure 1 Based on the above embodiment, this embodiment automatically extracts drug-related knowledge from structured HTML web pages and constructs a knowledge graph with "drug-disease-attribute" as the core. The implementation process is as follows:
[0071] Step T1: Data collection: Get structured HTML web pages through crawlers, obtain knowledge graphs G1 and G2 through HTML parsing, and standardize the attribute values. The triples are as follows:
[0072] Entity set E: aspirin, myocardial infarction, acetylsalicylic acid;
[0073] Attribute set A: (type, nonsteroidal anti-inflammatory drugs), (main ingredient, acetylsalicylic acid);
[0074] Relationship set R: indications, main components;
[0075] Step T2: Entity semantic understanding, for each attribute key-value pair Use the pre-trained bert-base-chinese model to embed word vectors and concatenate them as attribute vectors. Use the pre-trained bidirectional BiLSTM model to model multiple attributes under the same entity, capture the dependencies between attributes, and generate entity attribute vectors: enter: ; The output BiLSTM sequence is represented as: ; ;
[0076] Step T3: Structural context aggregation. Adjacent triplets are collected around each entity to build a local subgraph. Each triple is encoded as a semantic vector using the TinyBERT model to output the contextual structure representation of the entity. All triplets are combined into a graph structure. The Graphormer model is used to fuse the adjacency matrix and attention bias to calculate the global contextual structure representation. The final output graph-level vector representation is as follows: ;
[0077] In the graph-level vector representation of aspirin entities, 0.26 represents the first-dimensional semantic feature of the aggregation of adjacent structures with myocardial infarction and cerebral infarction, reflecting the strength of a certain type of semantics in the local indication structure of aspirin; 0.31 integrates the relational features and structural influence of "main ingredient = acetylsalicylic acid" to represent the structural semantics of pharmacological properties; 0.41 integrates the global representation features after integrating all adjacent triples, the entire graph structure, and semantic bias, reflecting the semantic centrality of aspirin in the entire graph;
[0078] Step T4: Weighted relationship representation. This solves the problem of similar but differently named relationships between two web pages, establishes relationship semantic alignment, embeds the relationship names, and calculates the semantic similarity of relationships across web pages using cosine similarity. The calculation process is as follows: ;
[0079] From the calculation results, we know that the cosine similarity between the main component and the active component is 0.92, and 0.92 is used as the weight to update the adjacency matrix;
[0080] Step T5: Fusion graph construction, finally constructing the extracted triples into a structured knowledge graph, and outputting them as a set of triples and a set of attribute vectors. The fused triple set is represented as follows: , , , ;
[0081] Where, Represents a set of fused triples.
[0082] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus.
[0083] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.
[0084] The present invention and its embodiments are described above. This description is not restrictive. The drawings show only one embodiment of the present invention, and the actual structure is not limited thereto. In short, if a person skilled in the art is inspired by this and, without departing from the purpose of the present invention, designs structures and embodiments similar to this technical solution without inventiveness, they shall fall within the scope of protection of the present invention.
Claims
1. A knowledge graph construction method for structural information aggregation, characterized by: The method comprises the following steps: Step S1: Data collection: collect at least two knowledge graphs to be aligned. Each knowledge graph contains entity, relationship, and attribute triples, which are summarized into entity sets, relationship sets, and attribute sets respectively. Each entity corresponds to multiple attribute key-value pairs, and the knowledge graphs are preprocessed. Step S2: Entity semantic understanding: traverse each entity in the entity set in turn, obtain context-aware semantic embedding, and capture the structural associations between multiple attributes corresponding to the entity to generate an entity attribute vector; Step S3: Structural context aggregation, extracting all adjacent triples of the entity in the knowledge graph and generating the entity's contextual structural representation and graph-level structural representation; Step S4: weighted relationship representation, constructing a weighted adjacency matrix for each relationship in the relationship set; Step S5: Fusion graph construction: Based on the entity attribute vector, context structure representation and graph-level structure representation, all entities in the knowledge graph to be aligned are aligned and merged, and the fused knowledge graph is output in combination with the weighted adjacency matrix.
2. The method for constructing a knowledge graph based on structural information aggregation according to claim 1, characterized in that: In step S2, the entity semantic understanding includes the following steps: Step S21: Attribute extraction, traversing each entity in the entity set in turn, and extracting all attribute key-value pairs corresponding to the entity; Step S22: semantic embedding, introducing a pre-trained BERT word vector model, inputting the keys and values of all attribute key-value pairs corresponding to the entity into the BERT word vector model respectively, obtaining context-aware semantic embedding, and generating attribute vectors; Step S23: Temporal encoding, obtain a pre-trained BiLSTM model, input all attribute vectors into the BiLSTM model in sequence, capture the structural associations between attributes, and obtain a sequence representation of the attribute vectors; Step S24: Attention weighted aggregation, using the weighted self-attention mechanism to aggregate the sequence representation of the attribute vector to generate an entity attribute vector.
3. The method for constructing a knowledge graph based on structural information aggregation according to claim 1, characterized in that: In step S3, the structural context aggregation includes the following steps: Step S31: extracting local subgraphs, taking the entity as the center, extracting all adjacent triplets of the entity in the knowledge graph to be aligned, constructing a graph structure adjacency matrix, and generating a local subgraph of the entity; Step S32: Context structure representation extraction: introduce a pre-trained lightweight Transformer sequence encoder, input each triple in the local subgraph, convert it into a vector sequence, and output the context structure representation of the entity; Step S33: Extract graph-level structural representation, merge the contextual structural representations of the entity in different local subgraphs, introduce a pre-trained graph-level Transformer model, use the graph structure adjacency matrix to constrain the attention propagation path, use the relational semantic similarity as the attention bias, and output the graph-level structural representation of the entity.
4. The method for constructing a knowledge graph by aggregating structural information according to claim 1, characterized in that: In step S5, the fusion map is constructed, including the following steps: Step S51: Graph convolution fusion, inputting the entity attribute vector, the entity context structure representation, the entity graph-level structure representation, and the weighted adjacency matrix of the relationship into a multi-layer graph convolutional network, and outputting a unified entity semantic vector; Step S52: Alignment determination: use the aligned entity pairs in the original knowledge graph as positive samples, randomly select non-aligned entity pairs as negative samples, construct a training set, and use the SVM linear discriminant function to train the threshold classifier; Step S53: Entity pair merging: calculate the Manhattan distance for any entity pair and set a merging threshold. If the Manhattan distance is lower than the set threshold, it is determined to be the same entity and the merging operation is performed; Step S54: triples are merged to construct a fused entity set from all aligned entities, and the original triples and newly added cross-source edges are merged to construct a fused relationship set and a fused triple set; Step S55: Knowledge graph generation. Take the current knowledge graph as input and repeat steps S2 to S4 until the number of newly added triples is lower than the preset threshold. Stop the iteration and finally output the fused knowledge graph.
Citation Information
Patent Citations
Entity alignment method, device and system for multi-source knowledge graph fusion
CN113641826A
Heterogeneous knowledge graph fusion method and system
CN114090783A
BERT-BiLSTM-CRF-based medicine entity identification method
CN116501884A
Multi-source knowledge graph construction method and system for chronic disease diagnosis and treatment
CN118820486A
Network security knowledge graph completion method fusing neighborhood entity information
CN118863034A
Cited By
Heterogeneous device attack identification method and system based on heterogeneous device behavior map and adaptive feature learning
CN121283724A
Psychiatry pre-diagnosis triage knowledge reasoning method based on knowledge graph
CN121543713A
