Knowledge graph entity alignment method and device based on ontology enhancement and feature fusion
By introducing ontology information and multi-feature fusion technology into knowledge graph entity alignment, the problem of inefficient alignment of existing methods is solved, and more accurate and efficient entity alignment is achieved.
Patent Information
- Application Number
- CN202411936764.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2044-12-26
AI Technical Summary
The existing knowledge graph entity alignment methods rely on the structural information of the knowledge graph, resulting in inefficient alignment, inconsistent construction standards, structural heterogeneity and inaccurate entity semantic expression.
A solid alignment method based on ontology enhancement and multi-feature fusion is proposed. By introducing ontology information to enrich semantic expression, the structural differences between heterogeneous patterns are reduced, and the multi-feature fusion alignment is combined with structural features and multiple semantic features.
It improves the efficiency and accuracy of knowledge graph alignment, makes full use of the semantic information of knowledge graph, and reduces the problem of poor quality of structural information embedding.
Smart Images

Figure CN119808921A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical fields of semantic recognition, knowledge graph entity alignment, and knowledge graph fusion, and specifically to a knowledge graph entity alignment method, device, electronic device, computer-readable storage medium, and computer program product based on ontology enhancement and feature fusion. Background Art
[0002] In recent years, the rapid development of the Internet has prompted various fields to establish more and more large-scale knowledge graphs containing complementary information. At the same time, with the development of linked data projects, the amount of semantic data on the Internet continues to increase. 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 efficiently coordinated. Therefore, how to discover links between different knowledge graph instances 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 knowledge graphs are currently constructed by different institutions and individuals. These knowledge graphs have specific needs, and their designs and constructions are not unified, so there are heterogeneity and redundancy problems between them. Knowledge fusion aims to align and merge heterogeneous and redundant information in knowledge graphs to form a globally unified knowledge identification and association. Entity alignment is a key technology in the knowledge graph fusion process, and its main purpose is to discover equivalent entities between different knowledge graphs. Since the knowledge content of different knowledge graphs has different sources and different human understandings, the textual expressions referring to the same thing will be different. This is a significant problem in the fusion and integration of different knowledge graphs, which affects the realization of shared data. Therefore, the research on knowledge fusion based on knowledge graphs is of great significance to the subsequent exploration and development of unified technologies for big data integration.
[0004] Unaligned knowledge graphs refer to the lack of unified entity and relationship representations between multiple knowledge graphs from different sources or construction methods. In this state, the same or related entities may exist in each knowledge graph with different names, attributes, or structures. The aligned knowledge graph uses entity alignment technology to identify and unify the nodes representing the same entity from different knowledge graphs. This process includes identifying similarities between entities, matching their attributes and relationships, and integrating them into a unified entity representation. The aligned knowledge graph eliminates redundancy and inconsistency, allowing information from different sources to be seamlessly integrated 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 pays more attention to specific things in the real world. Early related work mainly focused on ontology alignment. In recent years, with the development of machine learning and deep learning, it has gradually developed 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 sophisticated information and is more complex. In addition, the entity alignment task is different from the traditional entity disambiguation (linking) task. Traditional entity disambiguation requires linking the entities mentioned in the text content to the knowledge graph or the entities in the knowledge graph. However, entity alignment is to equivalence align the entities in two or more structured knowledge graphs or knowledge graphs.
[0006] With the development of entity alignment technology, many scholars have proposed different types of entity alignment methods, and a large number of entity alignment research papers have emerged. In the early days, researchers used various features of strings to perform 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] Most traditional entity alignment methods focus on syntax and structure, especially early entity alignment and mapping technologies, which mainly focus on calculating the distance between labels and characters between entities. Traditional entity alignment methods mainly solve the entity alignment problem from two perspectives: one is based on similarity calculation to compare the symbolic features of entities, and the other is based on relational reasoning. Recent studies also use statistical machine learning to improve accuracy. The method of entity alignment based on similarity calculation mainly uses word frequency-inverse document probability, active learning and machine learning classification, NGram matching / edit distance / digital matching, synonym sets and semantic verification, and filters to calculate the similarity between entities. In fact, it is to add machine learning classifiers, active learning, semantic verification, and filtering blocking technologies on the basis of similarity calculation to improve the performance of entity alignment algorithms.
[0008] The entity alignment method based on relational reasoning mainly utilizes the relationship between entities in the knowledge graph, and infers the semantic equivalence between relations through constructors, relational similarity functions, and relational comparability functions, thereby achieving alignment between entities corresponding to the relations.
[0009] Entity alignment methods based on knowledge representation learning, also known as knowledge embedding, are currently the most widely used entity alignment methods. Entity alignment methods based on knowledge representation learning use machine learning technology to represent the description object as a low-dimensional dense vector. The distance between two vectors reflects the semantic relationship between the two objects. The purpose of applying representation learning to knowledge representation is to achieve the vector representation of the relationship between entities in the knowledge graph. By reducing high-dimensional entities and relationships, the numerical representation of low-dimensional vectors is obtained. Based on the ability of knowledge representation learning technology to represent entities and relationships in knowledge graphs as low-dimensional vector spaces, many researchers have proposed entity alignment methods based on knowledge representation learning, which has become the main technology for solving entity alignment problems. The idea is to first embed the knowledge graph through knowledge representation learning technology, that is, the embedding module; then map the embedding spaces of different knowledge graphs to the same vector space according to known entities, that is, the interaction module; finally, the entity alignment result is obtained according to the distance or similarity between entities in the vector space, that is, the alignment module. In addition, most methods also introduce an iterative mechanism to add the entity alignment results to the aligned entity pairs.
[0010] Existing embedding-based entity alignment methods can be roughly divided into two categories: entity alignment methods based on translation models and entity alignment methods based on graph neural network models. The translation model is mainly based on TransE and its variant methods. This type of entity alignment method embeds entities from different knowledge graphs into the same vector space and identifies aligned entities by comparing the similarity of these embeddings. However, the translation model-based method has limited ability to capture complex relationship types. It usually relies on simple vector operations and has difficulty in handling complex multiple relationships or typed relationships. The entity alignment method based on the graph neural network model regards neighboring nodes as the information of the root node, uses the graph neural network as an encoder to capture the subgraph structure, aggregates the entity information, and finally converts it into a vector representation, which can effectively solve the problem of poor alignment due to long paths. However, the graph neural network-based method relies heavily on the structural information of the knowledge graph, resulting in poor alignment when the knowledge graph structure information is insufficient or the structure is large. Summary of the invention
[0011] When the inventors conducted research on knowledge graph entity alignment, they found that most knowledge graphs had inconsistent construction standards, heterogeneous structures, and inaccurate entity semantic expressions. When aligning entities, it is often easy to cause poor embedding of knowledge graph structural information, and most of the existing knowledge graph entity alignment methods rely on the structural information of the knowledge graph, which easily leads to low alignment efficiency. In view of the above problems, the present invention proposes an entity alignment method based on ontology enhancement and multi-feature fusion. The main idea of the method is: first, by introducing ontology information, enrich the semantic expression ability of the knowledge graph, effectively reduce the structural differences between heterogeneous graphs, enhance the embedding of structural information, and then use the relationship, attribute and entity name information as semantic feature information for auxiliary alignment, and finally combine structural features with multiple semantic features to perform multi-feature fusion entity alignment. Existing knowledge graph alignment technologies are all based on structural feature alignment, and adding semantic feature auxiliary alignment is to use the rich semantic information of the knowledge graph, but the mainstream is still based on structural feature alignment. That is, the present invention not only improves the alignment based on structural features and increases the alignment effect, but also proposes to use the auxiliary alignment of the rich semantic information of the knowledge graph to further increase the alignment effect.
[0012] In view of the shortcomings of existing technologies, such as Figure 3 As shown, the present invention proposes a knowledge graph entity alignment method based on ontology enhancement and feature fusion, which includes:
[0013] In the initial step, multiple knowledge graphs to be aligned with entities are obtained; ontology enhancement encoder, structure encoder, relationship encoder, attribute encoder and entity name encoder are constructed;
[0014] In the feature extraction step, the knowledge graph is introduced into the ontology information through the ontology enhancement encoder to obtain the enhanced graph; the structure encoder extracts the structure information of the enhanced graph to obtain the structure feature of the knowledge graph; the relationship encoder extracts the relationship information of the knowledge graph to obtain the relationship feature; the attribute encoder extracts the attribute information of the knowledge graph to generate the attribute feature; the entity name encoder extracts the entity name information of the knowledge graph to generate the entity name feature;
[0015] In the fusion alignment step, the structural feature vector, relationship feature, attribute feature vector and entity name feature are dynamically weighted and then fused to form a unified entity vector representation. The unified entity vector is entity aligned through an adaptive contrast learning method to obtain an entity aligned knowledge graph of the multiple knowledge graphs as the entity alignment result.
[0016] The knowledge graph entity alignment method based on ontology enhancement and feature fusion, wherein the ontology enhancement encoder is used to enhance the ontology information of the knowledge graph, and the ontology enhancement encoder is composed of a topological aggregation layer based on a graph convolutional network, a ternary relationship 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 structure 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 KG2, V g ∈R d×d Represents a linear transformation of the diagonal weight matrix:
[0018]
[0019] in, Represents entity e i A randomly initialized graph embedding g Represents the adjacency matrix of a graph.
[0020] The knowledge graph entity alignment method based on ontology enhancement and feature fusion, wherein the relationship encoder, the attribute encoder and the entity name encoder are respectively used to extract the relationship, attribute and entity name information of the knowledge graph for embedding, and all use independent fully connected layers FC m Embed different semantic features to prevent information pollution caused by mixing different features. The formula is as follows:
[0021]
[0022] Among them: r, a, v represent the characteristics of relationship, attribute and entity name respectively; It is entity e i The input features corresponding to feature m, V m Represents the associated weight matrix.
[0023] like Figure 4 As shown, the present invention also proposes a knowledge graph entity alignment device based on ontology enhancement and feature fusion, which includes:
[0024] Initial device, obtains multiple knowledge graphs to be aligned with entities; constructs ontology enhancement encoder, structure encoder, relationship encoder, attribute encoder and entity name encoder;
[0025] The feature extraction device introduces the knowledge graph into the ontology information through the ontology enhancement encoder to obtain the enhanced graph; the structure encoder extracts the structure information of the enhanced graph to obtain the structure feature of the knowledge graph; the relationship encoder extracts the relationship information of the knowledge graph to obtain the relationship feature; the attribute encoder extracts the attribute information of the knowledge graph to generate the attribute feature; the entity name encoder extracts the entity name information of the knowledge graph to generate the entity name feature;
[0026] The fusion alignment device performs dynamic feature weighting on the structural feature vector, relationship feature, attribute feature vector and the entity name feature respectively, and then performs feature fusion to form a unified entity vector representation. The unified entity vector is entity aligned through an adaptive contrast learning method to obtain an entity aligned knowledge graph of the multiple knowledge graphs as an entity alignment result.
[0027] The knowledge graph entity alignment device based on ontology enhancement and feature fusion, wherein the ontology enhancement encoder is used to enhance the ontology information of the knowledge graph, and the ontology enhancement encoder is composed of a topological aggregation layer based on a graph convolutional network, a ternary relationship 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 structure 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 KG2, V g ∈R d×d Represents a linear transformation of the diagonal weight matrix:
[0029]
[0030] in, Represents entity e i A randomly initialized graph embedding g Represents the adjacency matrix of a graph;
[0031] The relation encoder, the attribute encoder and the entity name encoder are used to extract the relation, attribute and entity name information of the knowledge graph for embedding respectively, and all of them use independent fully connected layers FC. m Embed different semantic features to prevent information pollution caused by mixing different features. The formula is as follows:
[0032]
[0033] Among them: r, a, v represent the characteristics of relationship, attribute and entity name respectively; It is entity e i The input features corresponding to feature m, Vm Represents the associated weight matrix.
[0034] The present invention also proposes an electronic device, which includes the knowledge graph entity alignment device based on ontology enhancement and feature fusion. The electronic device may be connected to an information display device, and the information display device is used to display the entity alignment result according to display parameters and attributes set by the user 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, including a computer program, wherein when the computer program is executed by a processor, the steps of the knowledge graph entity alignment method based on ontology enhancement and feature fusion are implemented.
[0037] It can be seen from the above scheme that the advantages of the present invention are:
[0038] By constructing an ontology enhancement encoder to introduce ontology information, enrich the semantic expression between graph entities, reduce the structural differences of heterogeneous graphs, and then embed the structure of the knowledge graph, construct different semantic encodings to embed semantic feature information, fuse structural and semantic features, and perform multi-feature entity alignment. This reduces the poor quality of knowledge graph structural information embedding while making full use of the different 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. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 It is a flow chart of an entity alignment method based on ontology enhancement and multi-feature fusion provided by an embodiment of the present invention;
[0040] Figure 2 is a schematic diagram of the structure of an ontology enhanced encoder according to an embodiment of the present invention;
[0041] Figure 3 is a flow chart of the method of the present invention;
[0042] Figure 4 It is a module diagram of the device of the present invention;
[0043] Figure 5 This is a schematic diagram of the structure of a 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 7It is a schematic diagram of the structure of a second electronic device of the present invention.
[0046] Reference numerals:
[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] IV-bus;
[0056] V-interface;
[0057] VI - input unit;
[0058] VII-output unit;
[0059] VIII- Storage medium;
[0060] Ⅸ-Communication unit. DETAILED DESCRIPTION
[0061] It should be noted that, in this application, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0062] Without more constraints, an element defined by the phrase "comprising a..." does not exclude the existence of other identical elements in the process, method, article or apparatus comprising the element.
[0063] The processor described in the present invention is the control center of the electronic device, which can be a processor or a general term for multiple processing elements. For example, it can be one or more central processing units (CPUs), or application specific integrated circuits (ASICs), or one or more integrated circuits configured to implement the embodiments of the present invention, such as one or more microprocessors (digital signal processors, DSPs), or one or more field programmable gate arrays (FPGAs).
[0064] Optionally, the processor can perform various functions of the electronic device by running or executing a software program stored in the memory, and calling data stored in the memory.
[0065] In a specific implementation, as an embodiment, the processor may include one or more CPUs. Each of these processors may be a single-core processor (single-CPU) or a multi-core processor (multi-CPU). The processor here may refer to one or more devices, circuits, and / or processing cores for processing data (such as computer program instructions). Electronic devices may include: servers, desktop computers, laptops, smart phones, tablet computers, embedded computers, etc., wherein the embedded computers include vehicles and robots, etc.
[0066] The memory is used to store the software program for executing the solution of the present invention, and the execution is controlled by the processor. The specific implementation method can refer to the above method embodiment, which will not be repeated here.
[0067] It should be noted that the structure of the electronic device shown in the drawings of the present invention does not constitute a limitation thereto, and the actual knowledge structure recognition device may include more or fewer components than shown in the drawings, or a combination of certain components, or a different arrangement of components.
[0068] The above embodiments can be implemented in whole or in part by software, hardware (such as circuits), firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of 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, the process or function described in the embodiment of the present invention is generated in whole or in part. 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 computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.
[0069] It should also be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship, but it may also indicate an "and / or" relationship. Please refer to the context for specific understanding.
[0070] In the present 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 refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can be represented by: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0071] It should also be understood that in various embodiments of the present invention, the size of the serial numbers of the above-mentioned processes does not mean 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 the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0073] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0074] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0075] If the functions are implemented in the form of 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 can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0076] The purpose of the present invention is to provide an entity alignment method and device based on ontology enhancement and multi-feature fusion. By designing an ontology enhancement encoder to introduce the ontology information of the knowledge graph, the semantic representation between entities is enriched, and the result differences between heterogeneous graphs are reduced. At the same time, the graph structure encoder is combined to embed the graph structure features to enhance the expression of structural feature information. Different semantic encoders are constructed to embed the semantic feature information such as relationships, attributes and entity names contained in the knowledge graph, and the structural and semantic feature information is weighted and fused through a dynamic cross-feature weighting mechanism, and multi-feature entity alignment is achieved using feature adaptive contrast learning.
[0077] In order to solve the above problems, this paper invented an entity alignment method based on ontology enhancement and multi-feature fusion, including:
[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] Constructing ontology enhancement encoder, structure encoder, relation encoder, attribute encoder and entity name encoder;
[0080] The ontology enhancement encoder introduces the pre-aligned knowledge graph into the ontology information to enrich the semantic representation between entities and reduce the result differences between heterogeneous graphs. The ontology enhancement encoder can be used to introduce the pre-aligned knowledge graph into the ontology information. The structure of the ontology encoder is described in detail below.
[0081] The structural encoder embeds the structure of the pre-aligned knowledge graph, obtains the structural information representation of the pre-aligned knowledge graph, and generates a structural feature vector.
[0082] The relation encoder embeds the relation information contained in the pre-aligned knowledge graph and generates a relation feature vector.
[0083] The attribute encoder embeds the attribute information contained in the pre-aligned knowledge graph and generates an attribute feature vector. The attribute information represents the attribute triple of the knowledge graph. The basic form of the attribute triple is (entity, attribute, value). For example, (Zhang San, age, 25) represents an attribute triple.
[0084] The entity name encoder embeds the entity name information of the pre-aligned knowledge graph and generates an entity name feature vector. The entity name is the name of the node of each entity in the knowledge graph. For example, Li Hua and Zhang San are both entity names representing nodes. The semantic information of the knowledge graph refers to the entity name, relationship and attribute composition.
[0085] The dynamic feature weighting method is used to weight the structural feature vector, relationship feature vector, attribute feature vector and entity name feature vector respectively.
[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] The entity vectors are aligned by adaptive contrastive learning. The goal of the comparison is to distinguish the aligned entities (positive samples) from the unaligned entities (negative samples), and to shorten the distance between positive samples and increase the distance between negative samples in the feature embedding space. The comparison is performed through the loss function, and the positive aligned entity pairs are close to each other and the negative aligned entity pairs are separated from each other.
[0088] The present invention enhances the ontology information of the pre-aligned knowledge graph through an ontology enhancement encoder, which consists of a topological aggregation layer based on GCNs, a ternary relationship 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 knowledge graphs.
[0089] To capture semantic and structural information from the graph, we adopt an extended aggregation layer based on graph convolutional networks (GCNs). This layer aggregates information to generate a more comprehensive entity representation. The formula for generating entity embeddings through this extended aggregation layer is:
[0090]
[0091] Among them, Α is the adjacency matrix, I is the identity matrix, is the adjacency matrix augmented with the identity matrix, and D is The degree matrix, H k represents the input embedding of layer k, and W is the learnable weight matrix.
[0092] In order to prevent gradient explosion and ensure that information is effectively transferred 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 through 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 transform the triples (e i ,r,e j ) The ordered connection of any two elements is regarded as the potential representation of another element, and the intrinsic association between the elements is modeled through the attention mechanism to construct the set representation of semantic triples. The potential formula for representing the relationship between the head entity and the tail entity is:
[0098]
[0099] in, is the potential representation of relation r, and is the parameter matrix and bias vector, φ represents the nonlinear activation function, Represents the addition operation.
[0100] To capture the triple interactions of triples, we define the head entity X i Introduce the interactive attention weight, which is defined as follows:
[0101]
[0102] in, and is the trainable parameter matrix, is the activation function.
[0103] Similarly, the semantics of the tail entity is expressed as:
[0104]
[0105] Triple (e i ,r,e j ) is represented as follows:
[0106]
[0107] Ontology-enhanced triple generation layer,In this layer, we combine semantic and ontological information to obtain enhanced ontology triple representation. First, the semantic representation of the entity X i and X j is mapped into the ontology space:
[0108]
[0109] in: and is a trainable parameter and ψ is the activation function.
[0110] Then, all triples with the same relationship are used to generate a global ontology relationship representation:
[0111]
[0112] The enhanced relationship is expressed as:
[0113]
[0114] in: and are parameter matrices and bias vectors, and ξ is a nonlinear activation function.
[0115] The collaborative attention mechanism is used to fuse semantic and ontological information to obtain an enhanced triple representation:
[0116]
[0117] Finally, we get the triple representation of ontology enhancement as:
[0118]
[0119] In another aspect of the present invention, preferably, a graph structure encoder is used to embed the knowledge graph structure, and a two-layer graph attention network (GAT) is used to model the structural information of the source knowledge graph KG1 and the target knowledge KG2, V g ∈R d×d Represents a linear transformation of the diagonal weight matrix:
[0120]
[0121] in, Represents entity e i A randomly initialized graph embedding g Represents the adjacency matrix of a graph.
[0122] In another aspect of the present invention, preferably, different semantic encoders are constructed to embed the relationship, attribute, and entity name information respectively.
[0123] Use independent fully connected layer FC m Embed different semantic features to prevent information pollution caused by mixing different features. The formula is as follows:
[0124]
[0125] Among them: r, a, v represent the characteristics of relationship, attribute and entity name respectively. It is entity e i The input features corresponding to feature m, V m Represents the associated weight matrix.
[0126] In order to make the above features and effects of the present invention more clearly and understandably described, embodiments are given below and described in detail with reference to the accompanying drawings. This specification discloses one or more embodiments that include the features of the present invention. The disclosed embodiments are only for illustration. The scope of protection of the present invention is not limited to the disclosed embodiments, and the present invention is defined by the attached claims.
[0127] An entity alignment method based on ontology enhancement and multi-feature fusion, Figure 1 A knowledge graph entity alignment architecture diagram of an embodiment of the present invention is shown as follows: Figure 1 As shown, including:
[0128] Obtain the knowledge graph data to be aligned;
[0129] Constructing different types of encoder models, including an ontology enhancement encoder model, a graph structure embedding encoder model, a relationship encoder model, an attribute encoder model, and an entity name encoder model;
[0130] The ontology-enhanced encoder model is used to introduce ontology information, enrich the semantic representation between entities, and reduce the structural differences between heterogeneous knowledge graphs.
[0131] Figure 2 A schematic diagram of the structure of an ontology enhanced encoder according to an embodiment of the present invention is shown;
[0132] We use an extended aggregation layer based on graph convolutional networks (GCNs). This layer aggregates information to generate a more comprehensive entity representation. The formula for generating entity embeddings through this extended aggregation layer is:
[0133]
[0134] Among them, Α is the adjacency matrix, I is the identity matrix, is the adjacency matrix augmented with the identity matrix, and D is The degree matrix, H k represents the input embedding of layer k, and W is the learnable weight matrix.
[0135] In order to prevent gradient explosion and ensure that information is effectively transferred 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 through 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 transform the triples (e i ,r,e j ) The ordered connection of any two elements is regarded as the potential representation of another element, and the intrinsic association between the elements is modeled through the attention mechanism to construct the set representation of semantic triples. The potential formula for representing the relationship between the head entity and the tail entity is:
[0141]
[0142] in, is the potential representation of relation r, and is the parameter matrix and bias vector, φ represents the nonlinear activation function, Represents the addition operation.
[0143] To capture the triple interactions of triples, we define the head entity X i Introduce the interactive attention weight, which is defined as follows:
[0144]
[0145] in, and is the trainable parameter matrix, is the activation function.
[0146] Similarly, the semantics of the tail entity is expressed as:
[0147]
[0148] Triple (e i ,r,e j ) is represented as follows:
[0149]
[0150] Ontology-enhanced triple generation layer,In this layer, we combine semantic and ontological information to obtain enhanced ontology triple representation. First, the semantic representation of the entity X i and X j is mapped into the ontology space:
[0151]
[0152] in: and is a trainable parameter and ψ is the activation function.
[0153] Then, all triples with the same relationship are used to generate a global ontology relationship representation:
[0154]
[0155] The enhanced relationship is expressed as:
[0156]
[0157] in: and are parameter matrices and bias vectors, and ξ is a nonlinear activation function.
[0158] The collaborative attention mechanism is used to fuse semantic and ontological information to obtain an enhanced triple representation:
[0159]
[0160] Finally, we get the triple representation of ontology enhancement as:
[0161]
[0162] Use the structure encoder to embed the knowledge graph structure, that is, introduce the enhanced knowledge graph into the graph structure encoder to generate the enhanced structure feature vector;
[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 KG2. g ∈R d×d Represents a linear transformation of the diagonal weight matrix:
[0164]
[0165] in, Represents entity e i A randomly initialized graph embedding g Represents the adjacency matrix of a graph.
[0166] Use the relation encoder, attribute encoder and entity name encoder to embed the relation, attribute and entity name, and generate the relation feature vector representation, attribute feature vector representation and entity name feature vector representation;
[0167] An independent fully connected layer is used to embed different semantic features to prevent information pollution caused by mixing different features. The formula is as follows:
[0168]
[0169] Among them: r, a, v represent the characteristics of relationship, attribute and entity name respectively. It is entity e i The input features of the corresponding features, V m Represents the associated weight matrix.
[0170] Dynamic cross-feature weighting method, dynamically generating corresponding weights for each embedded feature;
[0171] We dynamically generate entity-level weights for each feature and use a multi-head cross-feature attention method to h The attention function is performed on the i-th head through the shared matrix Parameterization, multiple features input Z m Convert to feature-aware queries key Sum
[0172] The attention weight β between entities m and j under the same feature mj The formula in each head is as follows:
[0173]
[0174] Therefore, the output weight of each feature d is defined as follows:
[0175]
[0176] Multi-feature fusion, we fuse the generated structural features, relational features, attribute features, and entity name features;
[0177] We fuse different features to generate a vector representation of each feature, and the embedding is expressed as:
[0178]
[0179] in, For entity e j The weight of feature k, Represents entity e j The embedding of feature d.
[0180] Feature adaptive contrast learning, which compares features based on each embedded feature;
[0181] We use the seed alignment set S for the aligned sample set, and for each entity pair In S,
[0182] We define
[0183] The alignment probability is thus defined as follows:
[0184]
[0185] The bidirectional alignment targets for features are:
[0186]
[0187] Through the above method, a seed set of pre-aligned knowledge graph entity pairs is generated.
[0188] The following is a system embodiment corresponding to the above method embodiment. This embodiment can be implemented in conjunction with the above embodiment. The relevant technical details mentioned in the above embodiment are still valid in this embodiment. In order to reduce repetition, they are not repeated here. Accordingly, the relevant technical details mentioned in this embodiment can also be applied in the above embodiment.
[0189] like Figure 4 As shown, the present invention also proposes a knowledge graph entity alignment device based on ontology enhancement and feature fusion, which includes:
[0190] Initial device, obtains multiple knowledge graphs to be aligned with entities; constructs ontology enhancement encoder, structure encoder, relationship encoder, attribute encoder and entity name encoder;
[0191] The feature extraction device introduces the knowledge graph into the ontology information through the ontology enhancement encoder to obtain the enhanced graph; the structure encoder extracts the structure information of the enhanced graph to obtain the structure feature of the knowledge graph; the relationship encoder extracts the relationship information of the knowledge graph to obtain the relationship feature; the attribute encoder extracts the attribute information of the knowledge graph to generate the attribute feature; the entity name encoder extracts the entity name information of the knowledge graph to generate the entity name feature;
[0192] The fusion alignment device performs dynamic feature weighting on the structural feature vector, relationship feature, attribute feature vector and the entity name feature respectively, and then performs feature fusion to form a unified entity vector representation. The unified entity vector is entity aligned through an adaptive contrast learning method to obtain an entity aligned knowledge graph of the multiple knowledge graphs as an entity alignment result.
[0193] The knowledge graph entity alignment device based on ontology enhancement and feature fusion, wherein the ontology enhancement encoder is used to enhance the ontology information of the knowledge graph, and the ontology enhancement encoder is composed of a topological aggregation layer based on a graph convolutional network, a ternary relationship 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 structure 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 KG2, V g ∈R d×d Represents a linear transformation of the diagonal weight matrix:
[0195]
[0196] in, Represents entity e i A randomly initialized graph embedding g Represents the adjacency matrix of a graph;
[0197] The relation encoder, the attribute encoder and the entity name encoder are used to extract the relation, attribute and entity name information of the knowledge graph for embedding respectively, and all of them use independent fully connected layers FC. m Embed different semantic features to prevent information pollution caused by mixing different features. The formula is as follows:
[0198]
[0199] Among them: r, a, v represent the characteristics of relationship, attribute and entity name respectively; It is entity e i The input features corresponding to feature m, V m Represents the associated weight matrix.
[0200] like Figure 5 As shown, the present invention also proposes a first electronic device A in another embodiment, which includes the 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 a wired or wireless information transmission scheme. The data acquisition device C is used to collect and obtain the knowledge graphs to be aligned, such as user social knowledge graphs of multiple social platforms, user shopping knowledge graphs of different shopping platforms, and user video preview knowledge graphs of different video platforms. The information display device D is used to display the entity alignment results obtained by the analysis of the present invention.
[0202] The information display device D can process the data output by the first electronic device A based on the information display mechanism to improve the readability of the data output by the first electronic device A. The information display mechanism can be manually preset, for example, the data output by the first electronic device A is visually displayed, which can be based on the display parameters and / or attributes set by the user, the display parameters can be, for example, the display data range, and the display attributes can be, for example, the display font, color, whether to scroll and play, etc. The user is presented with the key information specified by the user, for example, the knowledge graph of multiple social platforms on the Internet as a whole, the knowledge graph of multiple shopping platforms as a whole, the knowledge graph of multiple video platforms as a whole, etc., so that the user can understand this information more timely without having to visit the secondary page or scroll the page, saving the user's operation. Or the information display mechanism can be an artificial intelligence AI display model, which can learn the user's key information based on the user's previous usage habits, such as viewing time, number of clicks, number of edits, etc., and then automatically present rich and necessary key information to the user.
[0203] The present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a readable storage medium. When the computer program is executed by a processor, the computer can execute the knowledge graph entity alignment method based on ontology enhancement and feature fusion provided by the above methods.
[0204] The present invention also proposes a storage medium VIII in another embodiment for storing a computer program for executing the knowledge graph entity alignment method based on ontology enhancement and feature fusion. It should be understood that the storage medium in the embodiment of the present invention may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus random access memory (DR RAM).
[0205] Figure 7 A schematic block diagram of a second electronic device 1000 that can be used to implement an embodiment of the present invention is shown. The second electronic device 1000 electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, 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 processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples, and are not intended to limit the implementation of the present invention described and / or required herein. The second electronic device 1000 may be the same 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 a storage medium VIII into a random access memory (RAM) III. In RAM III, various programs and data required for the operation of the device 1000 can also be stored. The computing unit I, ROM II, and RAM III are connected to each other via a bus IV. An input / output (I / O) interface V is also connected to the bus IV.
[0207] A plurality of components in the second electronic device 1000 are connected to the I / O interface V, including: an input unit VI, such as a keyboard, a mouse, etc.; an output unit VII, such as various types of displays, speakers, etc.; a storage medium VIII, such as a disk, an optical disk, etc.; and a communication unit IX, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit IX allows the second electronic device 1000 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0208] The computing unit I may be a variety of general and / or special 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 dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, 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 method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage medium VIII. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 1000 via ROM II and / or a communication unit IX. When the computer program is loaded into RAM III and executed by the computing unit I, one or more steps of the method described above may be performed. Alternatively, in other embodiments, the computing unit I may be configured to execute the method in any other appropriate manner (e.g., by means of firmware).
[0209] Although the embodiments of the present invention have been disclosed as above, they are not limited to the applications listed in the specification and the implementation modes, and they can be fully applied to various fields suitable for the present invention. For those familiar with the art, additional modifications can be easily implemented. Therefore, without departing from the general concept defined by the claims and the scope of equivalents, the present invention is not limited to the specific details and the 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 to be aligned with entities; Constructing ontology enhancement encoder, structure encoder, relation encoder, attribute encoder and entity name encoder; In the feature extraction step, the knowledge graph is introduced into the ontology information through the ontology enhancement encoder to obtain the enhanced graph; the structure encoder extracts the structure information of the enhanced graph to obtain the structure feature of the knowledge graph; the relationship encoder extracts the relationship information of the knowledge graph to obtain the relationship feature; the attribute encoder extracts the attribute information of the knowledge graph to generate the attribute feature; the entity name encoder extracts the entity name information of the knowledge graph to generate the entity name feature; In the fusion alignment step, the structural feature vector, relationship feature, attribute feature vector and entity name feature are dynamically weighted and then fused to form a unified entity vector representation. The unified entity vector is entity aligned through an adaptive contrast learning method to obtain an entity aligned knowledge graph of the multiple knowledge graphs as the entity alignment result.
2. The knowledge graph entity alignment method based on ontology enhancement and feature fusion as claimed in claim 1, characterized in that: The ontology enhancement encoder is used to enhance the ontology information of the knowledge graph. The ontology enhancement encoder is composed of a topological aggregation layer based on a graph convolutional network, a ternary relationship modeling layer and an ontology enhancement ternary generation layer.
3. The knowledge graph entity alignment method based on ontology enhancement and feature fusion as claimed in claim 1, characterized in that: The structure encoder is used to extract the embedding of the knowledge graph structure. A two-layer graph attention network is used to model the structural information of the source knowledge graph KG1 and the target knowledge KG2. g ∈R d×d Represents a linear transformation of the diagonal weight matrix: in, Represents entity e i A randomly initialized graph embedding g Represents the adjacency matrix of a graph.
4. The knowledge graph entity alignment method based on ontology enhancement and feature fusion as claimed in claim 1, characterized in that: The relation encoder, the attribute encoder and the entity name encoder are used to extract the relation, attribute and entity name information of the knowledge graph for embedding respectively, and all use independent fully connected layers FC. m Embed different semantic features to prevent information pollution caused by mixing different features. The formula is as follows: Among them: r, a, v represent the characteristics of relationship, attribute and entity name respectively; It is entity e i The input features corresponding to feature m, V m Represents the associated weight matrix.
5. A knowledge graph entity alignment device based on ontology enhancement and feature fusion, characterized in that: include: Initial device, obtaining multiple knowledge graphs to be aligned with entities; Constructing ontology enhancement encoder, structure encoder, relation encoder, attribute encoder and entity name encoder; The feature extraction device introduces the knowledge graph into the ontology information through the ontology enhancement encoder to obtain the enhanced graph; the structure encoder extracts the structure information of the enhanced graph to obtain the structure feature of the knowledge graph; the relationship encoder extracts the relationship information of the knowledge graph to obtain the relationship feature; the attribute encoder extracts the attribute information of the knowledge graph to generate the attribute feature; the entity name encoder extracts the entity name information of the knowledge graph to generate the entity name feature; The fusion alignment device performs dynamic feature weighting on the structural feature vector, relationship feature, attribute feature vector and the entity name feature respectively, and then performs feature fusion to form a unified entity vector representation. The unified entity vector is entity aligned through an adaptive contrast learning method to obtain an entity aligned knowledge graph of the multiple knowledge graphs as an entity alignment result.
6. The knowledge graph entity alignment device based on ontology enhancement and feature fusion as claimed in claim 5, characterized in that: The ontology enhancement encoder is used to enhance the ontology information of the knowledge graph. The ontology enhancement encoder is composed of a topological aggregation layer based on a graph convolutional network, a ternary relationship modeling layer and an ontology enhancement ternary generation layer.
7. The knowledge graph entity alignment device based on ontology enhancement and feature fusion according to claim 5, characterized in that: The structure encoder is used to extract the embedding of the knowledge graph structure. A two-layer graph attention network is used to model the structural information of the source knowledge graph KG1 and the target knowledge KG2. g ∈R d×d Represents a linear transformation of the diagonal weight matrix: in, Represents entity e i A randomly initialized graph embedding g Represents the adjacency matrix of a graph; The relation encoder, the attribute encoder and the entity name encoder are used to extract the relation, attribute and entity name information of the knowledge graph for embedding respectively, and all of them use independent fully connected layers FC. m Embed different semantic features to prevent information pollution caused by mixing different features. The formula is as follows: Among them: r, a, v represent the characteristics of relationship, attribute and entity name respectively; It is entity e i The input features corresponding to feature m, V m Represents the associated weight matrix.
8. An electronic device, characterized in that: It includes a knowledge graph entity alignment device based on ontology enhancement and feature fusion as described in claims 5-7, and the electronic device is connected to an information display device, which is used to display the entity alignment result according to the display parameters and attributes set by the user or through an artificial intelligence model.
9. 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-4.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the knowledge graph entity alignment method based on ontology enhancement and feature fusion described in any one of claims 1-4 are implemented.
Citation Information
Patent Citations
Knowledge graph fusion method based on approximate ontology matching
CN113032516A
Knowledge graph entity alignment method and device fusing time information
CN118035459A
Medical knowledge graph-oriented entity alignment method and related device
CN119025682A
Context-aware entity linking for knowledge graphs
US20220300831A1
Cited By
Intelligent knowledge graph fusion method based on efficient decoding and multi-dimensional feature gain
CN120745773A