A knowledge graph entity alignment method and apparatus based on ontology enhancement and feature fusion
By introducing an ontology-enhanced encoder and multi-feature fusion, the problem of low alignment efficiency in knowledge graphs in existing technologies is solved, achieving more efficient and accurate entity alignment results.
Patent Information
- Application Number
- CN202411936764.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2044-12-26
AI Technical Summary
Existing knowledge graph entity alignment methods rely on the structural information of the knowledge graph, resulting in low alignment efficiency when the structural information is insufficient or significantly different, and failing to fully utilize the semantic information of the knowledge graph.
By constructing an ontology-enhanced encoder to introduce ontology information and enrich the semantic expression of the knowledge graph, structural features are extracted by combining it with a structural encoder, and multi-feature fusion is performed using relation, attribute, and entity name information. An adaptive contrastive learning method is then used for entity alignment.
It improves the efficiency and accuracy of knowledge graph alignment, reduces the quality differences in structural information embedding, and makes full use of the semantic feature information of knowledge graphs to describe entity information more accurately.
Smart Images

Figure CN119808921B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of semantic recognition, knowledge graph entity alignment, and knowledge graph fusion, specifically to a knowledge graph entity alignment method, apparatus, electronic device, computer-readable storage medium, and computer program product based on ontology enhancement and feature fusion. Background Technology
[0002] In recent years, the rapid development of the Internet has prompted the establishment of more and more large-scale knowledge graphs containing complementary information in various fields. At the same time, with the development of the Linked Data Initiative, the amount of semantic data on the Internet is constantly increasing. One of the main challenges faced by various application fields is to integrate more and more independently designed entities that exist in different knowledge graphs, so that large-scale knowledge graphs can be coordinated efficiently. Therefore, how to discover the links between instances of different knowledge graphs has become an important problem that needs to be solved in various fields.
[0003] In particular, with the rapid development of knowledge graphs in recent years, a large number of knowledge graphs have emerged. However, many of these knowledge graphs are currently built by different institutions and individuals, with specific needs and inconsistent design and construction, resulting in heterogeneity and redundancy. Knowledge fusion aims to align and merge heterogeneous and redundant information in knowledge graphs to form globally unified knowledge identifiers and associations. Entity alignment is a key technology in the knowledge graph fusion process, primarily aimed at discovering equivalent entities between different knowledge graphs. Because the knowledge content of different knowledge graphs comes from different sources and is interpreted differently by different people, the textual expressions referring to the same thing will vary, which is a significant problem in the fusion and integration of different knowledge graphs, affecting the realization of shared data. Therefore, research on knowledge fusion based on knowledge graphs is of great significance for the subsequent exploration and development of technologies for big data integration and unification.
[0004] An unaligned knowledge graph refers to multiple knowledge graphs from different sources or construction methods that lack a unified representation of entities and relationships. In this state, the same or related entities may exist in different knowledge graphs with different names, attributes, or structures. An aligned knowledge graph, through entity alignment techniques, identifies and unifies the representation of nodes representing the same entities from different knowledge graphs. This process includes identifying similarities between entities, matching their attributes and relationships, and integrating them into a unified entity representation. An aligned knowledge graph eliminates redundancy and inconsistencies, enabling seamless integration of information from different sources to form a more coherent and complete knowledge network.
[0005] Entity alignment can generally be divided into ontology alignment and instance alignment. Ontology alignment focuses on classes, attributes, and relationships, while instance alignment focuses more on the specific things they refer to in the real world. Early work mainly focused on ontology alignment, but in recent years, with the development of machine learning and deep learning, it has gradually moved towards instance alignment. Ontology alignment is more general than instance alignment, mainly targeting a class of entities containing similar instances; while instance alignment requires more granular information and is more complex. Furthermore, entity alignment tasks differ from traditional entity disambiguation (linking) tasks. Traditional entity disambiguation requires linking entities mentioned in text content to entities in a knowledge graph or a knowledge graph entity. However, entity alignment involves equivalent alignment of two or more structured knowledge graphs or entities within a knowledge graph.
[0006] With the development of entity alignment technology, many scholars have proposed different types of entity alignment methods, resulting in a large number of research papers on entity alignment. Early on, researchers used various features of strings for entity alignment. In recent years, with the rapid development of knowledge representation learning technology, researchers have proposed many entity alignment methods based on knowledge representation learning, which have achieved better results than traditional methods.
[0007] Traditional entity alignment methods mostly focus on syntax and structure, especially early entity alignment and mapping techniques that primarily emphasized calculating the distance between labels and characters between entities. Traditional entity alignment methods address the problem from two main perspectives: one is based on similarity calculation to compare the symbolic features of entities, and the other is based on relational reasoning. Recent research has also used statistical machine learning to improve accuracy. Entity alignment methods based on similarity calculation mainly utilize techniques such as term frequency-inverse document probability, active learning and machine learning classification, as well as NGRAM matching / edit distance / digit matching, thesaurus sets and semantic verification, and filtering machines to calculate the similarity between entities. Essentially, these methods add machine learning classifiers, active learning, semantic verification, and filtering blocking techniques to the similarity calculation foundation to improve the performance of entity alignment algorithms.
[0008] The entity alignment method based on relational reasoning mainly utilizes the relationships between entities in the knowledge graph. By constructing functions, relational similarity functions, and relational comparability functions, it infers the semantic equivalence between relations, thereby achieving the alignment between the corresponding entities of the relations.
[0009] Entity alignment methods based on knowledge representation learning (also known as knowledge embedding) are currently widely used. These methods utilize machine learning techniques to represent descriptive objects as low-dimensional, dense vectors. The distance between two vectors reflects the semantic relationship between the two objects. Applying representation learning to knowledge representation aims to achieve a vector representation of the relationships between entities in a knowledge graph. By reducing the high-dimensionality of entities and relationships, a low-dimensional numerical representation of vectors is obtained. Leveraging the ability of knowledge representation learning to represent entities and relationships in a knowledge graph as a low-dimensional vector space, many researchers have proposed entity alignment methods based on knowledge representation learning, which have become the main techniques for solving entity alignment problems. The core idea is to first embed the knowledge graph using knowledge representation learning techniques (the embedding module); then, based on known entities, map the embedding spaces of different knowledge graphs to the same vector space (the interaction module); and finally, obtain the entity alignment result based on the distance or similarity between entities in the vector space (the alignment module). Furthermore, most methods introduce an iterative mechanism to add the entity alignment result to the already aligned entity pairs.
[0010] Existing embedding-based entity alignment methods can be broadly categorized into two types: translation-based entity alignment methods and graph neural network-based entity alignment methods. Translation-based methods, primarily based on TransE and its variants, embed entities from different knowledge graphs into the same vector space and identify aligned entities by comparing the similarity of these embeddings. However, translation-based methods have limited ability to capture complex relationship types, typically relying on simple vector operations and struggling to handle complex multi-relationships or categorized relationships. Graph neural network-based entity alignment methods treat neighboring nodes as root node information, using graph neural networks as encoders to capture the subgraph structure and aggregate entity information, ultimately converting it into vector representations. This effectively addresses the problem of poor alignment results due to excessively long paths. However, graph neural network-based methods are heavily reliant on the structural information of the knowledge graph, leading to poor alignment results when the knowledge graph's structural information is insufficient or exhibits significant structural differences. Summary of the Invention
[0011] While conducting research on entity alignment in knowledge graphs, the inventors discovered problems such as inconsistent construction standards, structural heterogeneity, and inaccurate semantic representation of entities in most knowledge graphs. These issues often lead to poor embedding of structural information during entity alignment. Existing knowledge graph entity alignment methods largely rely on the structural information of the knowledge graph, resulting in low alignment efficiency. To address these problems, this invention proposes an entity alignment method based on ontology enhancement and multi-feature fusion. The main idea of this method is as follows: First, by introducing ontology information, the semantic expressive power of the knowledge graph is enriched, effectively reducing structural differences between heterogeneous graphs and enhancing the embedding of structural information. Then, relational, attribute, and entity name information are used as semantic features for auxiliary alignment. Finally, multi-feature fusion entity alignment is performed by combining structural features with multiple semantic features. Existing knowledge graph alignment techniques are all based on structural feature alignment. Adding semantic features to assist alignment utilizes the rich semantic information of the knowledge graph, but the mainstream approach remains structural feature alignment. Therefore, this invention not only improves upon structural feature-based alignment, increasing the alignment effect, but also proposes auxiliary alignment utilizing the rich semantic information of the knowledge graph to further enhance the alignment effect.
[0012] To address the shortcomings of existing technologies, such as Figure 3 As shown, this invention proposes a knowledge graph entity alignment method based on ontology enhancement and feature fusion, which includes:
[0013] The initial steps involve obtaining multiple knowledge graphs for entity alignment; and constructing an ontology-enhanced encoder, a structure encoder, a relation encoder, an attribute encoder, and an entity name encoder.
[0014] The feature extraction steps are as follows: the ontology enhancement encoder introduces ontology information into the knowledge graph to obtain the enhanced graph; the structure encoder extracts the structural information of the enhanced graph to obtain the structural features of the knowledge graph; the relation encoder extracts the relation information of the knowledge graph to obtain relation features; the attribute encoder extracts the attribute information of the knowledge graph to generate attribute features; and the entity name encoder extracts the entity name information of the knowledge graph to generate entity name features.
[0015] The fusion and alignment step involves dynamically weighting the structural feature vector, relational feature vector, attribute feature vector, and entity name feature, and then fusing these features to form a unified entity vector representation. An adaptive contrastive learning method is then used to align the unified entity vectors, resulting in an entity-aligned knowledge graph of the multiple knowledge graphs, which serves as the entity alignment result.
[0016] The knowledge graph entity alignment method based on ontology enhancement and feature fusion includes an ontology enhancement encoder for enhancing ontology information in the knowledge graph. The ontology enhancement encoder consists of a topology aggregation layer based on graph convolutional networks, a ternary relation modeling layer, and an ontology enhancement ternary generation layer.
[0017] The knowledge graph entity alignment method based on ontology enhancement and feature fusion, wherein the structural encoder is used to extract the embedding of the knowledge graph structure, and a two-layer graph attention network is used to model the structural information of the source knowledge graph KG1 and the target knowledge graph KG2, V g ∈R d×d This represents a linear transformation of the diagonal weight matrix:
[0018]
[0019] in, Represents entity e i Randomly initialized graph embedding, A g Represents the adjacency matrix of the graph.
[0020] The knowledge graph entity alignment method based on ontology enhancement and feature fusion, wherein the relation encoder, attribute encoder, and entity name encoder are used to extract relation, attribute, and entity name information from the knowledge graph for embedding, and each employs an independent fully connected layer (FC). m Embedding different semantic features to prevent information contamination caused by mixing different features, the formula is as follows:
[0021]
[0022] Where: r, a, v represent the characteristics of the relation, attribute, and entity name, respectively; It is entity e i The input feature corresponding to feature m, V m This represents the relevant weight matrix.
[0023] like Figure 4 As shown, this invention also proposes a knowledge graph entity alignment device based on ontology enhancement and feature fusion, which includes:
[0024] The initial setup acquires multiple knowledge graphs for entity alignment; it then constructs an ontology-enhanced encoder, a structure encoder, a relation encoder, an attribute encoder, and an entity name encoder.
[0025] The feature extraction device uses the ontology enhancement encoder to introduce ontology information into the knowledge graph to obtain an enhanced graph; the structure encoder extracts the structural information of the enhanced graph to obtain the structural features of the knowledge graph; the relation encoder extracts the relation information of the knowledge graph to obtain relation features; the attribute encoder extracts the attribute information of the knowledge graph to generate attribute features; and the entity name encoder extracts the entity name information of the knowledge graph to generate entity name features.
[0026] The fusion alignment device dynamically weights the structural feature vector, relational feature vector, attribute feature vector, and entity name feature, and then fuses the features to form a unified entity vector representation. The unified entity vector is then aligned using an adaptive contrastive learning method to obtain an entity-aligned knowledge graph of the multiple knowledge graphs, which serves as the entity alignment result.
[0027] The knowledge graph entity alignment device based on ontology enhancement and feature fusion includes an ontology enhancement encoder for enhancing ontology information in the knowledge graph. The ontology enhancement encoder consists of a topology aggregation layer based on graph convolutional networks, a ternary relation modeling layer, and an ontology enhancement ternary generation layer.
[0028] The knowledge graph entity alignment device based on ontology enhancement and feature fusion, wherein the structural encoder is used to extract the embedding of the knowledge graph structure, and a two-layer graph attention network is used to model the structural information of the source knowledge graph KG1 and the target knowledge graph KG2, V g ∈R d×d This represents a linear transformation of the diagonal weight matrix:
[0029]
[0030] in, Represents entity e i Randomly initialized graph embedding, A g Represents the adjacency matrix of a graph;
[0031] The relation encoder, attribute encoder, and entity name encoder are used to extract relation, attribute, and entity name information from the knowledge graph for embedding, respectively, and each uses an independent fully connected layer (FC). m Embedding different semantic features to prevent information contamination caused by mixing different features, the formula is as follows:
[0032]
[0033] Where: r, a, v represent the characteristics of the relation, attribute, and entity name, respectively; It is entity e i The input feature corresponding to feature m, Vm This represents the relevant weight matrix.
[0034] The present invention also proposes an electronic device, including the aforementioned knowledge graph entity alignment device based on ontology enhancement and feature fusion. The electronic device may be connected to an information display device, which is used to display the entity alignment result with user-set display parameters, attributes, or through an artificial intelligence model.
[0035] The present invention also proposes a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the knowledge graph entity alignment method based on ontology enhancement and feature fusion.
[0036] The present invention also proposes a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, it implements the steps of the knowledge graph entity alignment method based on ontology enhancement and feature fusion.
[0037] As can be seen from the above solutions, the advantages of the present invention are:
[0038] By constructing an ontology-enhanced encoder to introduce ontology information, the semantic representation between entities in the knowledge graph is enriched, reducing structural differences between heterogeneous graphs. Then, knowledge graph structure embedding is performed, and different semantic codes are constructed to embed semantic feature information. Structural and semantic features are fused for multi-feature entity alignment. This reduces the poor quality of knowledge graph structural information embedding while fully utilizing the diverse semantic feature information contained in the knowledge graph, more accurately describing the entity information contained in the pre-aligned knowledge graph, and improving the efficiency of knowledge graph alignment. Attached Figure Description
[0039] Figure 1 This is a flowchart of an entity alignment method based on ontology enhancement and multi-feature fusion provided by an embodiment of the present invention;
[0040] Figure 2 This is a schematic diagram of the body-enhanced encoder structure according to an embodiment of the present invention;
[0041] Figure 3 This is a flowchart of the method of the present invention;
[0042] Figure 4 This is a block diagram of the device of the present invention;
[0043] Figure 5 This is a schematic diagram of the structure of the first electronic device of the present invention;
[0044] Figure 6 This is a schematic diagram of the application environment structure of the first electronic device of the present invention;
[0045] Figure 7This is a schematic diagram of the structure of the second electronic device of the present invention.
[0046] Figure label:
[0047] A - First electronic device;
[0048] B-Knowledge Graph Entity Alignment Device;
[0049] C-Data acquisition equipment;
[0050] D-Information display device;
[0051] 1000 - Second electronic device;
[0052] Ⅰ-Computational Unit;
[0053] II-ROM;
[0054] III-RAM;
[0055] N-bus;
[0056] V-Interface;
[0057] VI - Input Unit;
[0058] VII - Output Unit;
[0059] VIII - Storage medium;
[0060] IX - Communication Unit. Detailed Implementation
[0061] It should be noted that, in this application, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus.
[0062] In the absence of further restrictions, an element defined by the phrase "comprising a..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0063] The processor described in this invention is the control center of an electronic device. It can be a single processor or a collective term for multiple processing elements. For example, it can be one or more central processing units (CPUs), application-specific integrated circuits (ASICs), or one or more integrated circuits configured to implement embodiments of this invention, such as one or more digital signal processors (DSPs), or one or more field-programmable gate arrays (FPGAs).
[0064] Alternatively, the processor can perform various functions of the electronic device by running or executing software programs stored in memory and by calling data stored in memory.
[0065] In a specific implementation, as one example, the processor may include one or more CPUs. Each of these processors may be a single-core processor or a multi-core processor. Here, "processor" can refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions). Electronic devices may include servers, desktop computers, laptops, smartphones, tablets, embedded computers, etc., where the embedded computer includes vehicles and robots, etc.
[0066] The memory is used to store the software program that executes the solution of the present invention, and the execution is controlled by the processor. For specific implementation methods, please refer to the above method embodiments, which will not be repeated here.
[0067] It should be noted that the structure of the electronic device shown in the accompanying drawings of this invention does not constitute a limitation thereof. The actual knowledge structure recognition device may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0068] The above embodiments can be implemented, in whole or in part, by software, hardware (such as circuits), firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. A semiconductor medium can be a solid-state drive.
[0069] It should also be understood that the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. A and B can be singular or plural. Additionally, the character " / " in this article generally indicates an "or" relationship between the preceding and following related objects, but it can also represent an "and / or" relationship. Please refer to the context for a more accurate understanding.
[0070] In this invention, "at least one" means one or more, and "more than one" means two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of a single item or a plurality of items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be a single item or multiple items.
[0071] It should also be understood that, in various embodiments of the present invention, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0072] In the several embodiments provided by this invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0073] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0074] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0075] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0076] The purpose of this invention is to provide an entity alignment method and apparatus based on ontology enhancement and multi-feature fusion. By designing an ontology enhancement encoder, ontology information from the knowledge graph is introduced to enrich the semantic representation between entities and reduce the result differences between heterogeneous graphs. Simultaneously, a graph structure encoder is combined to embed graph structural features, thereby enhancing the expression of structural feature information. Different semantic encoders are constructed to embed semantic feature information such as relationships, attributes, and entity names contained in the knowledge graph. A dynamic cross-feature weighting mechanism is used to weight and fuse structural and semantic feature information, and feature adaptive contrastive learning is used to achieve multi-feature entity alignment.
[0077] To address the aforementioned issues, this paper proposes an entity alignment method based on ontology enhancement and multi-feature fusion, comprising:
[0078] Obtain pre-aligned knowledge graph data; pre-alignment refers to the preliminary matching or classification of entities or relationships in different knowledge graphs before performing knowledge graph alignment (i.e., cross-graph alignment).
[0079] Construct an ontology-enhanced encoder, a structure encoder, a relation encoder, an attribute encoder, and an entity name encoder;
[0080] The ontology enhancement encoder incorporates pre-aligned knowledge graphs into ontology information to enrich the semantic representations between entities and reduce the differences in results between heterogeneous graphs. Introducing ontology information via the ontology enhancement encoder can be replaced by incorporating pre-aligned knowledge graphs into ontology information. The structure of the ontology encoder is described in detail below.
[0081] The structural encoder embeds the structure into the pre-aligned knowledge graph to obtain a structural information representation of the pre-aligned knowledge graph and generates a structural feature vector.
[0082] The relation encoder embeds relation information contained in the pre-aligned knowledge graph to generate relation feature vectors.
[0083] The attribute encoder embeds attribute information from the pre-aligned knowledge graph to generate attribute feature vectors. Attribute information represents attribute triples in the knowledge graph. The basic form of an attribute triple is (entity, attribute, value), such as (Zhang San, age, 25), which represents an attribute triple.
[0084] The entity name encoder embeds entity name information from the pre-aligned knowledge graph to generate entity name feature vectors. Entity names are the names of the nodes representing various entities in the knowledge graph; for example, Li Hua and Zhang San are entity names representing nodes. The semantic information of the knowledge graph consists of entity names, relationships, and attributes.
[0085] The structural feature vector, relational feature vector, attribute feature vector, and entity name feature vector are represented by weighted methods using dynamic feature weighting.
[0086] A multi-feature fusion mechanism is used to fuse the weighted structural features and semantic feature vectors to form a unified entity vector representation.
[0087] Entity alignment is achieved by forming a unified entity vector through adaptive contrastive learning. The goal of the contrastive approach is to distinguish aligned entities (positive samples) from unaligned entities (negative samples) and to shorten the distance between positive samples and widen the distance between negative samples in the feature embedding space. The comparison is performed using a loss function, prioritizing positively aligned entity pairs towards each other and negatively aligned entity pairs towards each other.
[0088] This invention enhances the ontology information of a pre-aligned knowledge graph through an ontology enhancement encoder. The ontology enhancement encoder consists of a topology aggregation layer based on GCNs, a ternary relation modeling layer, and an ontology enhancement ternary generation layer. It aims to integrate ontology information, strengthen the semantic representation of entities, and reduce the heterogeneity of the knowledge graph.
[0089] To capture semantic and structural information from the graph, we employ an extended aggregation layer based on Graph Convolutional Networks (GCNs). This layer aggregates information to generate more comprehensive entity representations. The formula for generating entity embeddings through this extended aggregation layer is as follows:
[0090]
[0091] Where A is the adjacency matrix and I is the identity matrix. Let D be the adjacency matrix obtained by augmenting the adjacency matrix and the identity matrix. degree matrix, H k W represents the input embedding of layer k, and W is the learnable weight matrix.
[0092] To prevent gradient explosion and ensure efficient information transfer across layers, we introduce a layer-by-layer transfer function:
[0093] T(H k )=σ(H k U)
[0094] Where T(·) represents the transfer function, σ is the activation function, and U is the learnable weight matrix corresponding to the transfer function.
[0095] The final aggregation formula for this layer is:
[0096] H k+1 =T(H k )·H k+1 +(1-T(H K))·H k
[0097] The ternary intrinsic association modeling layer, in this layer we will model the triples (e... i ,r,e j An ordered connection of any two elements is considered a latent representation of another element. An attention mechanism is used to model the intrinsic relationships between elements to construct a set representation of semantic triples. The latent formula representing the relationship between the head and tail entities is:
[0098]
[0099] in, It is the latent representation of relation r. and Let be the parameter matrix and bias vector, and φ represent the nonlinear activation function. This indicates an addition operation.
[0100] To capture the triplet interactions of the triplet, we define the head entity X as... i Introduce interaction attention weights, defined as follows:
[0101]
[0102] in, and For a trainable parameter matrix, It is an activation function.
[0103] Similarly, the semantic representation of the tail entity is:
[0104]
[0105] Triplet (e) i ,r,e j The latent semantic representation of ) is:
[0106]
[0107] The ontology-enhanced triple generation layer combines semantic and ontological information to obtain enhanced ontology triple representations. First, the semantic representation X of the entity... i and X j Mapped to the ontology space:
[0108]
[0109] in: and Here are the trainable parameters, and ψ is the activation function.
[0110] Then, a global ontology relation representation is generated using all triples with the same relation:
[0111]
[0112] An enhanced relationship is represented as:
[0113]
[0114] in: and Let be the parameter matrix and bias vector, and ξ be the nonlinear activation function.
[0115] By fusing semantic and ontological information using a collaborative attention mechanism, an enhanced triple representation is obtained:
[0116]
[0117] Finally, we obtain the ontology-enhanced triple representation as follows:
[0118]
[0119] In another aspect of the invention, preferably, a graph structure encoder is used to embed the knowledge graph structure, and a two-layer graph attention network (GAT) is employed to model the structural information of the source knowledge graph KG1 and the target knowledge graph KG2, V g ∈R d×d This represents a linear transformation of the diagonal weight matrix:
[0120]
[0121] in, Represents entity e i Randomly initialized graph embedding, A g Represents the adjacency matrix of the graph.
[0122] In another aspect of the present invention, preferably, different semantic encoders are constructed to embed relation, attribute, and entity name information.
[0123] Uses an independent fully connected layer FC m Embedding different semantic features to prevent information contamination caused by mixing different features, the formula is as follows:
[0124]
[0125] Where r, a, and v represent the characteristics of the relation, attribute, and entity name, respectively. It is entity e i The input feature corresponding to feature m, V m This represents the relevant weight matrix.
[0126] To make the above-mentioned features and effects of the present invention clearer and easier to understand, specific embodiments are described below in conjunction with the accompanying drawings. This specification discloses one or more embodiments incorporating the features of the present invention. The disclosed embodiments are merely illustrative. The scope of protection of the present invention is not limited to the disclosed embodiments, but is defined by the appended claims.
[0127] An entity alignment method based on ontology enhancement and multi-feature fusion. Figure 1 A knowledge graph entity alignment architecture diagram according to an embodiment of the present invention is shown, such as... Figure 1 As shown, it includes:
[0128] Obtain the knowledge graph data to be aligned;
[0129] Construct different types of encoder models, including ontology-enhanced encoder model, graph structure embedding encoder model, relation encoder model, attribute encoder model, and entity name encoder model;
[0130] By leveraging ontology-enhanced encoder models to introduce ontology information, we can enrich the semantic representations between entities and reduce structural differences between heterogeneous knowledge graphs.
[0131] Figure 2 A schematic diagram of the body-enhanced encoder structure according to an embodiment of the present invention is shown;
[0132] We employ an extended aggregation layer based on Graph Convolutional Networks (GCNs). This layer aggregates information to generate more comprehensive entity representations. The formula for generating entity embeddings through this extended aggregation layer is:
[0133]
[0134] Where A is the adjacency matrix and I is the identity matrix. Let D be the adjacency matrix obtained by augmenting the adjacency matrix and the identity matrix. degree matrix, H k W represents the input embedding of layer k, and W is the learnable weight matrix.
[0135] To prevent gradient explosion and ensure efficient information transfer across layers, we introduce a layer-by-layer transfer function:
[0136] T(H k )=σ(H k U)
[0137] Where T(·) represents the transfer function, σ is the activation function, and U is the learnable weight matrix corresponding to the transfer function.
[0138] The final aggregation formula for this layer is:
[0139] H k+1 =T(H k )·H k+1 +(1-T(H K ))·H k
[0140] The ternary intrinsic association modeling layer, in this layer we will model the triples (e... i ,r,e j An ordered connection of any two elements is considered a latent representation of another element. An attention mechanism is used to model the intrinsic relationships between elements to construct a set representation of semantic triples. The latent formula representing the relationship between the head and tail entities is:
[0141]
[0142] in, It is the latent representation of relation r. and Let be the parameter matrix and bias vector, and φ represent the nonlinear activation function. This indicates an addition operation.
[0143] To capture the triplet interactions of the triplet, we define the head entity X as... i Introduce interaction attention weights, defined as follows:
[0144]
[0145] in, and For a trainable parameter matrix, It is an activation function.
[0146] Similarly, the semantic representation of the tail entity is:
[0147]
[0148] Triplet (e) i ,r,e j The latent semantic representation of ) is:
[0149]
[0150] The ontology-enhanced triple generation layer combines semantic and ontological information to obtain enhanced ontology triple representations. First, the semantic representation X of the entity... i and X j Mapped to the ontology space:
[0151]
[0152] in: and Here are the trainable parameters, and ψ is the activation function.
[0153] Then, a global ontology relation representation is generated using all triples with the same relation:
[0154]
[0155] An enhanced relationship is represented as:
[0156]
[0157] in: and Let be the parameter matrix and bias vector, and ξ be the nonlinear activation function.
[0158] By fusing semantic and ontological information using a collaborative attention mechanism, an enhanced triple representation is obtained:
[0159]
[0160] Finally, we obtain the ontology-enhanced triple representation as follows:
[0161]
[0162] The knowledge graph structure is embedded using a structural encoder, that is, the enhanced knowledge graph is introduced into the graph structure encoder to generate enhanced structural feature vectors;
[0163] A two-layer graph attention network (GAT) is used to model the structural information of the source knowledge graph KG1 and the target knowledge graph KG2, V g ∈R d×d This represents a linear transformation of the diagonal weight matrix:
[0164]
[0165] in, Represents entity e i Randomly initialized graph embedding, A g Represents the adjacency matrix of the graph.
[0166] The relation encoder, attribute encoder, and entity name encoder are used to embed relations, attributes, and entity names to generate relation feature vector representations, attribute feature vector representations, and entity name feature vector representations.
[0167] Independent fully connected layers are used to embed different semantic features to prevent information contamination caused by the mixing of different features. The formula is as follows:
[0168]
[0169] Where r, a, and v represent the characteristics of the relation, attribute, and entity name, respectively. It is entity e i The input feature corresponding to the feature, V m This represents the relevant weight matrix.
[0170] The dynamic cross-feature weighting method dynamically generates corresponding weights for each embedded feature;
[0171] We dynamically generate entity-level weights for each feature, using a multi-head cross-feature attention approach, in N h The attention function is executed on each of the i-th parallel heads, and the i-th head passes through a shared matrix. Parameterization, inputting multiple features into Z m Convert to feature-aware query key Sum
[0172] Attention weight β between entities m and j under the same feature mj The formula in each header is as follows:
[0173]
[0174] Therefore, the weights of the output for each feature d are defined as follows:
[0175]
[0176] Multi-feature fusion involves fusing the generated structural features, relational features, attribute features, and entity name features.
[0177] We fuse different features to generate a vector representation that fuses each feature, and the embedding is expressed as:
[0178]
[0179] in, For entity e j The weights of feature k, Represents entity e j Embedded in feature d.
[0180] Feature-adaptive contrastive learning compares features based on each type of embedding.
[0181] We use the seed alignment set S for the alignment sample set, for each entity pair In S,
[0182] We define
[0183] Therefore, the alignment probability is defined as follows:
[0184]
[0185] The bidirectional alignment target of the features is:
[0186]
[0187] The above method is used to generate a seed set of pre-aligned knowledge graph entity pairs.
[0188] The following are system embodiments corresponding to the above method embodiments. This embodiment can be implemented in conjunction with the above embodiments. The relevant technical details mentioned in the above embodiments are still valid in this embodiment, and will not be repeated here to reduce repetition. Accordingly, the relevant technical details mentioned in this embodiment can also be applied to the above embodiments.
[0189] like Figure 4 As shown, this invention also proposes a knowledge graph entity alignment device based on ontology enhancement and feature fusion, which includes:
[0190] The initial setup acquires multiple knowledge graphs for entity alignment; it then constructs an ontology-enhanced encoder, a structure encoder, a relation encoder, an attribute encoder, and an entity name encoder.
[0191] The feature extraction device uses the ontology enhancement encoder to introduce ontology information into the knowledge graph to obtain an enhanced graph; the structure encoder extracts the structural information of the enhanced graph to obtain the structural features of the knowledge graph; the relation encoder extracts the relation information of the knowledge graph to obtain relation features; the attribute encoder extracts the attribute information of the knowledge graph to generate attribute features; and the entity name encoder extracts the entity name information of the knowledge graph to generate entity name features.
[0192] The fusion alignment device dynamically weights the structural feature vector, relational feature vector, attribute feature vector, and entity name feature, and then fuses the features to form a unified entity vector representation. The unified entity vector is then aligned using an adaptive contrastive learning method to obtain an entity-aligned knowledge graph of the multiple knowledge graphs, which serves as the entity alignment result.
[0193] The knowledge graph entity alignment device based on ontology enhancement and feature fusion includes an ontology enhancement encoder for enhancing ontology information in the knowledge graph. The ontology enhancement encoder consists of a topology aggregation layer based on graph convolutional networks, a ternary relation modeling layer, and an ontology enhancement ternary generation layer.
[0194] The knowledge graph entity alignment device based on ontology enhancement and feature fusion, wherein the structural encoder is used to extract the embedding of the knowledge graph structure, and a two-layer graph attention network is used to model the structural information of the source knowledge graph KG1 and the target knowledge graph KG2, V g ∈R d×d This represents a linear transformation of the diagonal weight matrix:
[0195]
[0196] in, Represents entity e i Randomly initialized graph embedding, A g Represents the adjacency matrix of a graph;
[0197] The relation encoder, attribute encoder, and entity name encoder are used to extract relation, attribute, and entity name information from the knowledge graph for embedding, respectively, and each uses an independent fully connected layer (FC). m Embedding different semantic features to prevent information contamination caused by mixing different features, the formula is as follows:
[0198]
[0199] Where: r, a, v represent the characteristics of the relation, attribute, and entity name, respectively; It is entity e i The input feature corresponding to feature m, V m This represents the relevant weight matrix.
[0200] like Figure 5 As shown, in another embodiment of the present invention, a first electronic device A is also proposed, which includes the aforementioned knowledge graph entity alignment device based on ontology enhancement and feature fusion.
[0201] like Figure 6 As shown, the first electronic device A can also be connected to the data acquisition device C and the information display device D through wired or wireless information transmission schemes. The data acquisition device C is used to collect and acquire the knowledge graph to be aligned, such as the social knowledge graph of users on multiple social platforms, the shopping knowledge graph of users on different shopping platforms, and the video preview knowledge graph of users on different video platforms. The information display device D is used to display the entity alignment results obtained by the present invention.
[0202] Information display device D can process and organize the data output by the first electronic device A based on an information display mechanism to improve the readability of the data. This information display mechanism can be manually preset, for example, visualizing the data output by the first electronic device A. It can be based on user-defined display parameters and / or attributes, such as the data range to be displayed and font, color, and scrolling options. It can present users with their specified key information, such as the overall knowledge graph of multiple social media platforms, multiple shopping platforms, or multiple video platforms, allowing users to access this information more quickly without having to navigate to secondary pages or scroll through pages, saving user effort. Alternatively, this information display mechanism can be an artificial intelligence (AI) display model that learns the user's key information interests based on previous usage habits, such as viewing time, number of clicks, and number of edits, and automatically presents rich and necessary key information to the user.
[0203] The present invention also provides a computer program product, which includes a computer program that can be stored on a readable storage medium. When the computer program is executed by a processor, the computer is able to execute the knowledge graph entity alignment method based on ontology enhancement and feature fusion provided by the above methods.
[0204] In another embodiment, the present invention also proposes a storage medium VIII for storing a computer program that performs the knowledge graph entity alignment method based on ontology enhancement and feature fusion. It should be understood that the storage medium in the embodiments of the present invention can be volatile memory or non-volatile memory, or may include both. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which serves as an external cache. By way of example, but not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDR SDRAM), enhanced synchronous DRAM (ESDRAM), synchronous linked DRAM (SLDRAM), and direct rambus RAM (DR RAM).
[0205] Figure 7 A schematic block diagram of a second electronic device 1000 that can be used to implement embodiments of the present invention is shown. The second electronic device 1000 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The second electronic device 1000 can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein. The second electronic device 1000 may be the same as or different from the first electronic device A.
[0206] The second electronic device 1000 includes a computing unit I, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory II (ROM) or a computer program loaded from storage medium VIII into random access memory (RAM) III. The RAM III may also store various programs and data required for the operation of the device 1000. The computing unit I, ROM II, and RAM III are interconnected via bus IV. An input / output (I / O) interface V is also connected to bus IV.
[0207] Multiple components in the second electronic device 1000 are connected to I / O interface V, including: input unit VI, such as a keyboard, mouse, etc.; output unit VII, such as various types of displays, speakers, etc.; storage medium VIII, such as a disk, optical disk, etc.; and communication unit IX, such as a network card, modem, wireless transceiver, etc. Communication unit IX allows the second electronic device 1000 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0208] The computing unit I can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of computing unit I include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit I performs the various methods and processes described above, such as method steps S1-S3. For example, in some embodiments, the methods can be implemented as computer software programs tangibly contained in a machine-readable medium, such as storage medium VIII. In some embodiments, part or all of the computer program can be loaded and / or installed on device 1000 via ROM II and / or communication unit IX. When the computer program is loaded into RAM III and executed by computing unit I, one or more steps of the methods described above can be performed. Alternatively, in other embodiments, computing unit I can be configured to perform methods by any other suitable means (e.g., by means of firmware).
[0209] Although embodiments of the present invention have been disclosed above, they are not limited to the applications listed in the specification and embodiments. They can be applied to various fields suitable for the present invention. For those skilled in the art, other modifications can be easily made. Therefore, without departing from the general concept defined by the claims and their equivalents, the present invention is not limited to the specific details and illustrations shown and described herein.
Claims
1. A knowledge graph entity alignment method based on ontology enhancement and feature fusion, characterized in that, include: The initial step is to obtain multiple knowledge graphs for entity alignment. Construct an ontology-enhanced encoder, a structure encoder, a relation encoder, an attribute encoder, and an entity name encoder; The feature extraction steps are as follows: the ontology enhancement encoder introduces ontology information into the knowledge graph to obtain the enhanced graph; the structure encoder extracts the structural information of the enhanced graph to obtain the structural features of the knowledge graph; the relation encoder extracts the relation information of the knowledge graph to obtain relation features; the attribute encoder extracts the attribute information of the knowledge graph to generate attribute features; and the entity name encoder extracts the entity name information of the knowledge graph to generate entity name features. The fusion and alignment step involves dynamically weighting the structural feature vector, relational feature vector, attribute feature vector, and entity name feature, and then fusing these features to form a unified entity vector representation. An adaptive contrastive learning method is then used to align the unified entity vectors to obtain an entity-aligned knowledge graph from the multiple knowledge graphs, which serves as the entity alignment result. This ontology enhancement encoder is used to enhance ontology information in knowledge graphs. It consists of a topology aggregation layer based on graph convolutional networks, a triple relation modeling layer, and an ontology enhancement triple generation layer. The ontology enhancement triple generation layer is used to combine semantic and ontology information to obtain enhanced ontology triple representations.
2. The knowledge graph entity alignment method based on ontology enhancement and feature fusion as described in claim 1, characterized in that, This structural encoder is used to extract the embeddings of the knowledge graph structure. It employs a two-layer graph attention network to model the structural information of the source knowledge graph KG1 and the target knowledge graph KG2. g ∈R d×d This represents a linear transformation of the diagonal weight matrix: in, Represents entity e i Randomly initialized graph embedding, A g Represents the adjacency matrix of the graph.
3. The knowledge graph entity alignment method based on ontology enhancement and feature fusion as described in claim 1, characterized in that, The relation encoder, attribute encoder, and entity name encoder are used to extract relation, attribute, and entity name information from the knowledge graph for embedding, and each employs an independent fully connected layer (FC). m Embedding different semantic features to prevent information contamination caused by mixing different features, the formula is as follows: Where: r, a, v represent the characteristics of the relation, attribute, and entity name, respectively; It is entity e i The input feature corresponding to feature m, V m This represents the relevant weight matrix.
4. A knowledge graph entity alignment device based on ontology enhancement and feature fusion, characterized in that, include: The initial setup acquires multiple knowledge graphs for entity alignment. Construct an ontology-enhanced encoder, a structure encoder, a relation encoder, an attribute encoder, and an entity name encoder; The feature extraction device uses the ontology enhancement encoder to introduce ontology information into the knowledge graph to obtain an enhanced graph; the structure encoder extracts the structural information of the enhanced graph to obtain the structural features of the knowledge graph; the relation encoder extracts the relation information of the knowledge graph to obtain relation features; the attribute encoder extracts the attribute information of the knowledge graph to generate attribute features; and the entity name encoder extracts the entity name information of the knowledge graph to generate entity name features. The fusion alignment device dynamically weights the structural feature vector, relational feature vector, attribute feature vector, and entity name feature, and then fuses the features to form a unified entity vector representation. The unified entity vector is then aligned using an adaptive contrastive learning method to obtain an entity-aligned knowledge graph of the multiple knowledge graphs, which serves as the entity alignment result. This ontology enhancement encoder is used to enhance ontology information in knowledge graphs. It consists of a topology aggregation layer based on graph convolutional networks, a ternary relation modeling layer, and an ontology enhancement ternary generation layer.
5. The knowledge graph entity alignment device based on ontology enhancement and feature fusion as described in claim 4, characterized in that, This structural encoder is used to extract the embeddings of the knowledge graph structure. It employs a two-layer graph attention network to model the structural information of the source knowledge graph KG1 and the target knowledge graph KG2. g ∈R d×d This represents a linear transformation of the diagonal weight matrix: in, Represents entity e i Randomly initialized graph embedding, A g Represents the adjacency matrix of a graph; The relation encoder, attribute encoder, and entity name encoder are used to extract relation, attribute, and entity name information from the knowledge graph for embedding, respectively, and each uses an independent fully connected layer (FC). m Embedding different semantic features to prevent information contamination caused by mixing different features, the formula is as follows: Where: r, a, v represent the characteristics of the relation, attribute, and entity name, respectively; It is entity e i The input feature corresponding to feature m, V m This represents the relevant weight matrix.
6. An electronic device, characterized in that, The knowledge graph entity alignment device based on ontology enhancement and feature fusion as described in claim 4 or 5 includes an electronic device or an information display device connected to it, which displays the entity alignment result using user-set display parameters, attributes, or through an artificial intelligence model.
7. A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the knowledge graph entity alignment method based on ontology enhancement and feature fusion as described in any one of claims 1-3.
8. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the steps of the knowledge graph entity alignment method based on ontology enhancement and feature fusion as described in any of claims 1-3.
Citation Information
Patent Citations
Medical knowledge graph-oriented entity alignment method and related device
CN119025682A
Context-aware entity linking for knowledge graphs
US20220300831A1