Knowledge graph entity alignment method, system and device, medium and product

By using attribute value embedding, graph attention mechanism and edge convolution module in the knowledge graph entity alignment method, combined with the feature fusion of the gating mechanism, the problem of existing methods failing to fully capture semantic information and neglecting relationships between entities is solved, and a more accurate and generalized entity alignment effect is achieved.

CN119886145AActive Publication Date: 2025-04-25SHANDONG UNIV

Patent Information

Application Number
CN202510368680.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-27
Publication Date
2025-04-25
Estimated Expiration
2045-03-27

AI Technical Summary

Technical Problem

Existing knowledge graph entity alignment methods fail to adequately capture semantic information in attribute triplets and ignore the important role of similarity between entities in identifying equivalent entities, resulting in limited alignment accuracy.

Method used

The embedded representation of attributes is obtained by using the attribute value embedding vector, and the attribute-aware embedding is obtained in combination with the graph attention mechanism, and the relationship between entities is effectively represented through the edge convolution module. The gate control mechanism is introduced to perform feature fusion, adaptively balance the contribution of attributes and relationship information, and generate more expressive entity embeddings.

Benefits of technology

By more accurately capturing attribute semantic features and effectively representing relationships between entities, the accuracy and generalization performance of entity alignment are improved, and knowledge graph integration in complex application scenarios can be better supported.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119886145A_ABST
    Figure CN119886145A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of open knowledge maps, and provides a knowledge map entity alignment method, system and device, a medium and a product, attribute value embedding vectors and attribute embedding vectors are obtained based on an attribute triple of an entity and spliced, all splicing results are aggregated according to each spliced weight, and attribute perception embedding of the entity is obtained; obtaining a relation information code and a neighborhood information code based on the relation triple of the entity, splicing the relation information code and the neighborhood information code, aggregating all neighbor nodes of the entity according to each spliced weight, and obtaining relation perception embedding of the entity; fusing the attribute perception embedding and the relation perception embedding by utilizing a learnable fusion gating mechanism to generate information enhanced entity embedding; and realizing entity alignment of the knowledge maps according to the similarity between information enhancement entity embedding in the two knowledge maps. According to the method, information redundancy and conflicts are avoided, so that the expression ability and generalization performance of entity embedding are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of open knowledge graph technology, and specifically relates to a knowledge graph entity alignment method, system, device, medium and product. Background Art

[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.

[0003] Knowledge graphs organize entities, attributes, and relationships through graph structures, providing an efficient way to represent knowledge and playing an important role in information retrieval, intelligent question answering, recommendation systems, and other fields. With the in-depth application of knowledge graphs, a single knowledge graph usually cannot provide enough knowledge to support downstream tasks and cannot meet the knowledge needs of complex application scenarios. Therefore, in order to improve the coverage of knowledge, it is necessary to integrate the information in different knowledge graphs. However, due to the diverse sources of knowledge graphs and the non-uniform construction standards, there are often semantic and structural differences when representing the same entity. For example, the entity "Mount_Everest" in the DBpedia knowledge graph and the entity "Q513" in Wikidata refer to the same geographic object, but they use completely different naming methods. Entity alignment technology can automatically identify these equivalent entities with different expressions, thereby promoting the widespread application of knowledge graphs in various fields.

[0004] Entity alignment technology maps entities in different knowledge graphs to a unified vector space, and determines the corresponding relationship between entities by the similarity between them, so as to obtain accurate alignment results. Although existing methods have achieved good results, they do not fully capture the semantic information in attribute triples, and do not consider the important role of the similarity of the relationship between entities in identifying equivalent entities, thus affecting the accuracy of entity alignment. Summary of the invention

[0005] In order to solve the above problems, the present invention proposes a knowledge graph entity alignment method, system, device, medium and product. The present invention uses the embedding vector of the attribute value to obtain the embedding representation of the attribute, so as to more accurately capture the semantic characteristics of the attribute, and then uses the graph attention mechanism to obtain the attribute-aware embedding. At the same time, the model considers the important role of the similarity of the relationship between entities, and proposes a novel edge convolution module to achieve an effective representation of the relationship in a neighborhood aggregation manner. Finally, the model introduces a gating mechanism for feature fusion, adaptively balancing the contributions of attribute-aware embedding and relationship-aware embedding, and generating a more expressive entity embedding representation.

[0006] According to some embodiments, a first solution of the present invention provides a knowledge graph entity alignment method, which adopts the following technical solution: A knowledge graph entity alignment method, comprising: Get any two knowledge graphs for preprocessing to determine the attribute triples and relationship triples of the entities; Use the pre-trained knowledge graph entity alignment model to perform entity alignment, specifically: Based on the attribute triples of the entity, the attribute values ​​of the entity are obtained and encoded to obtain the attribute value embedding vector, and the attribute value embedding vector is feature extracted to obtain the attribute embedding vector. All the splicing results are aggregated according to the weight of each attribute value embedding vector and the attribute embedding vector after splicing to obtain the attribute-aware embedding of the entity; Based on the relationship triples of entities, the relationship between entities and the neighbor node information of entities are encoded respectively to obtain the relationship information encoding and the neighborhood information encoding. According to the weight of each concatenated relationship information encoding and neighborhood information encoding, all the neighbor nodes of the entity are aggregated to obtain the relationship-aware embedding of the entity. Attribute-aware embedding and relation-aware embedding are fused using a learnable fusion gating mechanism to generate information-enhanced entity embedding. Entity alignment of knowledge graphs is achieved based on the similarity between information-enhanced entity embeddings in two knowledge graphs.

[0007] Furthermore, all the concatenation results are aggregated according to the weights of each attribute value embedding vector and the attribute embedding vector to obtain the attribute-aware embedding of the entity, specifically: Concatenate the attribute value embedding vector and the attribute embedding vector to obtain the attribute triple representation vector of the entity; The mean of all attribute triples of the entity is used as the initial attribute embedding of the entity. The graph attention mechanism is used to calculate the weight between the initial attribute embedding of the entity and its attribute triple representation vector; All attribute triplet representation vectors are aggregated using the weight corresponding to each attribute triplet representation vector, and regularized based on the aggregation result and the initial attribute embedding of the entity to obtain the attribute-aware embedding of the entity.

[0008] Furthermore, the entity-based relationship triples encode the relationship between entities and the neighbor node information of the entities respectively to obtain the relationship information encoding and the neighborhood information encoding, which is specifically: Based on the entity's relationship triples, a multi-layer graph convolutional network is used to encode the entity's neighbor node information to obtain neighborhood information encoding; Based on the relationship triples of entities, the edges in the knowledge graph are initialized, that is, the adjacency relationships of entities are initialized to obtain the relationship edge vectors; All relationship edge vectors are aggregated based on the aggregation weights corresponding to the entity adjacency relationships to obtain the relationship information encoding.

[0009] Furthermore, the attribute-aware embedding and the relationship-aware embedding are fused using a learnable fusion gating mechanism to generate information-enhanced entity embedding, specifically: Determine a proportional gate signal based on the attribute-aware embedding and the relationship-aware embedding and the corresponding learnable weight matrix; The combination ratio of attribute-aware embedding and relationship-aware embedding is determined according to the ratio gate signal, and the attribute-aware embedding and relationship-aware embedding are fused based on the combination ratio to obtain information-enhanced entity embedding.

[0010] Furthermore, the entity alignment of the knowledge graphs is achieved according to the similarity between the information-enhanced entity embeddings in the two knowledge graphs, specifically: Calculate the Manhattan distance between the information-enhanced entity embeddings of entities in two knowledge graphs as the similarity between entities and construct a similarity matrix; The rows and columns of the similarity matrix are converted into probability distribution to generate a refined similarity matrix; By sorting the distance values ​​stored in each row of the refined similarity matrix, matching entity pairs are found with the smallest distance value.

[0011] Furthermore, the knowledge graph entity alignment model is trained based on the entity alignment results, specifically: Determine the negative samples in the two knowledge graphs based on the entity alignment results, and calculate the Manhattan distance between entity pairs in the negative samples; The hinge loss function is constructed by minimizing the Manhattan distance between aligned entities and maximizing the Manhattan distance between negative sample entity pairs. The knowledge graph entity alignment model is trained using the hinge loss function to optimize the model parameters; Until the hinge loss is minimized, the trained knowledge graph entity alignment model is obtained.

[0012] According to some embodiments, a second solution of the present invention provides a knowledge graph entity alignment system, which adopts the following technical solution: A knowledge graph entity alignment system, comprising: A data preprocessing module is configured to obtain any two knowledge graphs for preprocessing to determine the attribute triples and relationship triples of the entities; The knowledge graph entity alignment module is configured to use the pre-trained knowledge graph entity alignment model to perform entity alignment, specifically: Based on the attribute triples of the entity, the attribute values ​​of the entity are obtained and encoded to obtain the attribute value embedding vector, and the attribute value embedding vector is feature extracted to obtain the attribute embedding vector. All the splicing results are aggregated according to the weight of each attribute value embedding vector and the attribute embedding vector after splicing to obtain the attribute-aware embedding of the entity; Based on the relationship triples of entities, the relationship between entities and the neighbor node information of entities are encoded respectively to obtain the relationship information encoding and the neighborhood information encoding. According to the weight of each concatenated relationship information encoding and neighborhood information encoding, all the neighbor nodes of the entity are aggregated to obtain the relationship-aware embedding of the entity. Attribute-aware embedding and relation-aware embedding are fused using a learnable fusion gating mechanism to generate information-enhanced entity embedding. Entity alignment of knowledge graphs is achieved based on the similarity between information-enhanced entity embeddings in two knowledge graphs.

[0013] According to some embodiments, a third aspect of the present invention provides a computer-readable storage medium.

[0014] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in a knowledge graph entity alignment method as described in the first aspect above.

[0015] According to some embodiments, a fourth aspect of the present invention provides a computer device.

[0016] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps in a knowledge graph entity alignment method as described in the first aspect above are implemented.

[0017] According to some embodiments, a fifth aspect of the present invention provides a computer program product or a computer program.

[0018] The present invention provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps in a knowledge graph entity alignment method as described in the first aspect above.

[0019] Compared with the prior art, the present invention has the following beneficial effects: Based on the attribute triple data of the entity, the present invention uses the pre-trained model to obtain the embedded representation of the attribute value, and encodes the corresponding attribute through the attribute value. Compared with directly embedding the attribute, this method can make fuller use of the information of the attribute value, thereby more accurately capturing the semantic characteristics of the attribute in the knowledge graph.

[0020] The present invention takes into account that equivalent entities in different knowledge graphs are not only similar in neighborhood nodes, but also in the relationship information between entities. Therefore, the model realizes independent encoding of relationships in the form of neighborhood aggregation, which enhances the model's ability to represent entity relationships.

[0021] The present invention introduces a gating mechanism to effectively fuse attribute-aware embedding with relationship-aware embedding. Compared with simple vector concatenation, this adaptive fusion can dynamically adjust the weights of attribute information and relationship information, avoid information redundancy and conflict, and thus improve the expressiveness and generalization performance of entity embedding.

[0022] The present invention generates a refined similarity matrix by performing a softmax operation on the obtained similarity matrix, so that each value in the matrix reflects the matching degree of the entity pairs evaluated from two directions, and obtains a comprehensive similarity representation, thereby better supporting the alignment algorithm. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0024] Figure 1 This is a training flow chart of a knowledge graph entity alignment method in an embodiment of the present invention; Figure 2 This is a diagram of a training data flow processing process of a knowledge graph entity alignment method in an embodiment of the present invention; Figure 3 It is a structural diagram of the knowledge graph entity alignment model in an embodiment of the present invention. DETAILED DESCRIPTION

[0025] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0026] It should be noted that the following detailed descriptions are all illustrative and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.

[0027] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.

[0028] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.

[0029] Embodiment 1 The present embodiment provides a knowledge graph entity alignment method. The present embodiment uses the method applied to the server as an example for illustration. It is understandable that the method can also be applied to terminals, and can also be applied to terminals, servers and systems, and is implemented through the interaction between terminals and servers. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network servers, cloud communications, middleware services, domain name services, security services CDN, and big data and artificial intelligence platforms. The terminal can be a smart phone, tablet computer, laptop computer, desktop computer, smart speaker, smart watch, etc., but is not limited to this. The terminal and the server can be directly or indirectly connected via wired or wireless communication, and this application is not limited here. The present embodiment relies on the Shandong Provincial Key Laboratory of Artificial Intelligence Application for People's Livelihood Services and the Future Industry Laboratory of Shandong Higher Education Institutions of General Artificial Intelligence, and the method includes the following steps: Get any two knowledge graphs for preprocessing to determine the attribute triples and relationship triples of the entities; Use the pre-trained knowledge graph entity alignment model to perform entity alignment, specifically: Based on the attribute triples of the entity, the attribute values ​​of the entity are obtained and encoded to obtain the attribute value embedding vector, and the attribute value embedding vector is feature extracted to obtain the attribute embedding vector. All the splicing results are aggregated according to the weight of each attribute value embedding vector and the attribute embedding vector after splicing to obtain the attribute-aware embedding of the entity; Based on the relationship triples of entities, the relationship between entities and the neighbor node information of entities are encoded respectively to obtain the relationship information encoding and the neighborhood information encoding. According to the weight of each concatenated relationship information encoding and neighborhood information encoding, all the neighbor nodes of the entity are aggregated to obtain the relationship-aware embedding of the entity. Attribute-aware embedding and relation-aware embedding are fused using a learnable fusion gating mechanism to generate information-enhanced entity embedding. Entity alignment of knowledge graphs is achieved based on the similarity between information-enhanced entity embeddings in two knowledge graphs.

[0030] like Figure 1 and Figure 2 As shown, the training process of the method described in this embodiment is specifically as follows: This embodiment provides an attribute-aware graph neural network with gating mechanism for entity alignment (AGNG) knowledge graph entity alignment model. Figure 3 As shown in Figure 1, the model consists of four modules, among which the attribute-aware embedding module uses the embedding vector of the attribute value to obtain the embedding representation of the attribute, so as to more accurately capture the semantic features of the attribute, and then uses the graph attention mechanism to obtain the attribute-aware embedding. At the same time, the relationship-aware embedding module considers the important role of the similarity of the relationship between entities, and proposes a novel edge convolution module to achieve effective representation of the relationship in the form of neighborhood aggregation. Then, the information-enhanced entity embedding module introduces a gating mechanism for feature fusion, adaptively balances the contributions of attribute-aware embedding and relationship-aware embedding, and generates a more expressive entity embedding representation. Finally, the entity alignment module uses Manhattan distance to calculate the similarity between entities, constructs a refined similarity matrix, and optimizes the model parameters through hinge loss to improve the accuracy of the alignment results.

[0031] A. In this implementation, the input of the model is two knowledge graphs that need to be entity aligned.

[0032] Collect and process data based on the data source, obtain two knowledge graphs at random for preprocessing, and determine the attribute triples and relationship triples of the entity; Based on the attribute triple of the entity, the attribute value of the entity is obtained and encoded to obtain the attribute value embedding vector, and the feature of the attribute value embedding vector is extracted to obtain the attribute embedding vector; Aggregate all the concatenation results according to the weight of each attribute value embedding vector and the attribute embedding vector to obtain the attribute-aware embedding of the entity, specifically: Concatenate the attribute value embedding vector and the attribute embedding vector to obtain the attribute triple representation vector of the entity; The mean of all attribute triples of the entity is used as the initial attribute embedding of the entity. The graph attention mechanism is used to calculate the weight between the initial attribute embedding of the entity and its attribute triple representation vector; All attribute triplet representation vectors are aggregated using the weight corresponding to each attribute triplet representation vector, and regularized based on the aggregation result and the initial representation of the entity to obtain the attribute-aware embedding of the entity.

[0033] Based on the attribute triplet data of the entity, the attribute values ​​of the entity attributes appearing in the knowledge graph are obtained, and the embedded representation of the attribute values ​​is obtained using word embedding or a pre-trained language model. The fully connected layer is used to encode the corresponding attributes through these attribute value embedding vectors, thereby reducing the output dimension while performing feature extraction and generating an embedded representation of the attribute; then, the graph attention mechanism is used to highlight the contribution of beneficial attributes and obtain the attribute-aware embedding of the entity.

[0034] Specifically, for the entity Properties , get the attribute value of the attribute in the knowledge graph. For the attribute value of the entity, use the BERT pre-trained model to encode it to generate the attribute value embedding vector; The fully connected layer is used to reduce the dimension of the attribute value embedding vector, and then the low-dimensional vector of the dimension reduction output is averaged to complete feature extraction and generate the attribute embedding vector : (1); in, is a learnable weight matrix, is the dimension of the output vector of the pre-trained model, is the dimension of attribute embedding, Is an attribute The embedding vector corresponding to the attribute value of Is an attribute No. The embedding vector corresponding to the attribute value, is the number of attribute values.

[0035] For any attribute triple of an entity, it represents a vector , represented by concatenating the attribute embedding vector and the attribute value embedding vector, as follows: (2); in, express Regularization, is a learnable linear transformation matrix. This embodiment uses a graph attention mechanism to highlight the contribution of beneficial attributes, and takes the mean of all attribute triples of the entity e as the entity The initial attribute embedding is denoted as .

[0036] entity Its attribute triple represents a vector The weight between The calculation process is as follows: (3); in, is a learnable vector, is a learnable weight matrix, Representing Entities A collection of attribute triplets.

[0037] Finally, all attribute triples are aggregated using the weight corresponding to each attribute triple to obtain the entity Attribute-aware embedding , the specific calculation is as follows: (4); B. Based on the relationship triples of entities, the relationship between entities and the neighbor node information of entities are encoded respectively to obtain the relationship information encoding and the neighborhood information encoding; Based on the relationship triples of entities, the relationship between entities and the neighbor node information of entities are encoded respectively to obtain the relationship information encoding and neighborhood information encoding, which are specifically: Based on the entity's relationship triples, a multi-layer graph convolutional network is used to encode the entity's neighbor node information to obtain neighborhood information encoding; Based on the relationship triples of entities, the edges in the knowledge graph are initialized, that is, the adjacency relationships of entities are initialized to obtain the relationship edge vectors; All relationship edge vectors are aggregated based on the aggregation weights corresponding to the entity adjacency relationships to obtain the relationship information encoding.

[0038] According to the weights of each concatenation of the relationship information encoding and the neighborhood information encoding, all neighbor nodes of the entity are aggregated to obtain the relationship-aware embedding of the entity, specifically: Concatenate the neighborhood information encoding and the relationship information encoding to obtain the updated entity embedding; Use graph attention network to obtain the weights between an entity and all its neighbor nodes; All neighbor nodes of the entity are aggregated based on the weight corresponding to each neighbor node, and then the updated entity embedding is concatenated to obtain the relationship-aware embedding of the entity.

[0039] Based on the entity relation triple data, the neighborhood entity information is effectively represented through neighborhood aggregation, and the edge convolution module is used to obtain independent encoding of the relationship between entities. At the same time, learnable weights are introduced to adjust the influence of different relationship types. Then the graph attention network is used to fuse the updated entity embedding to obtain the entity's relation-aware embedding; In a specific embodiment, in order to capture the semantic association between entities, this embodiment uses a multi-layer graph convolutional network (GCN) to encode entities based on attribute-aware embedding of entities. The neighbor node information of The input of the layer GCN consists of a collection of entity embedding vectors, starting from Layer to The message passing mechanism of layer GCN is as follows: (5); in, is the adjacency matrix after adding self-loops, is the initial adjacency matrix of the knowledge graph, is the identity matrix, correspond The degree matrix of It is The output of layer GCN, It is The output of layer GCN, It is a feature matrix consisting of attribute-aware embeddings of entities and is the initial state input of the multi-layer graph convolutional network.

[0040] Based on the above message transmission mechanism, for any entity , the vector representation learned from the multi-layer graph convolutional network layer is recorded as the neighborhood information encoding of the entity .

[0041] In this implementation, in order to extract the relationship information between entities, a novel edge convolution module is designed. The working process of the edge convolution module is as follows: First, use one-hot type vectors to initialize all edges in the knowledge graph, that is, initialize the adjacency relationship of the entity to obtain the relationship edge vector; Then, the neighborhood aggregation method is used to aggregate all the relationship edge vectors, and learnable weights are introduced to adjust the influence of different relationship edges, so as to obtain the relationship information encoding of the entity. , the calculation process is as follows: (6); in, Is Entity The set of all adjacency relations, It is an adjacency relationship The corresponding aggregation weight, It is an adjacency relationship The corresponding embedding vector is So is a transformation function of the parameters.

[0042] The entity Neighborhood information encoding Encoding relational information Concatenate to obtain updated entity embedding In order to improve the model's ability to express complex relationships, this embodiment uses a layer of graph attention network to obtain the relationship-aware embedding of entities. .

[0043] Computational Entities With a neighbor node The weight between ,as follows: (7); Aggregate all neighbor nodes of the entity based on the weight corresponding to each neighbor node, and then concatenate the updated entity embedding to obtain the relationship-aware embedding of the entity. ,as follows: (8); in, is a learnable vector, Neighbor node The updated embedding representation is, Is Entity and neighbor nodes The weight between Representing Entities The set of neighbor nodes.

[0044] C. Use a learnable fusion gating mechanism to concatenate attribute-aware embedding and relationship-aware embedding to generate information-enhanced entity embedding, specifically: Determine a proportional gate signal based on the attribute-aware embedding and the relationship-aware embedding and the corresponding learnable weight matrix; The combination ratio of attribute-aware embedding and relationship-aware embedding is determined according to the ratio gate signal, and the attribute-aware embedding and relationship-aware embedding are fused based on the combination ratio to obtain information-enhanced entity embedding.

[0045] Using the obtained attribute-aware embedding and relationship-aware embedding, a learnable fusion gate is introduced to adaptively control the combination of two different types of embedding vectors to generate information-enhanced entity embedding, thereby improving the embedding vector's ability to model complex semantic relationships; Specifically, based on the attribute-aware embedding obtained in step A and the relationship-aware embedding obtained in step B, a gating mechanism is used to adaptively balance the contributions of the two embeddings. Thus, the final information-enhanced entity embedding is The calculation process is as follows: (9); (10); in, , is the learnable weight matrix, is the Sigmoid function, symbol is a gate signal between 0 and 1.

[0046] D. Calculate the similarity between the information-enhanced entity embeddings in the two knowledge graphs, and align the entities of the knowledge graphs based on the similarity results, specifically: Calculate the Manhattan distance between the information-enhanced entity embeddings of entities in two knowledge graphs as the similarity between entities and construct a similarity matrix; The rows and columns of the similarity matrix are converted into probability distribution to generate a refined similarity matrix; By sorting the distance values ​​stored in each row of the refined similarity matrix, the matching entity pair is found with the minimum distance value; The obtained information is used to enhance entity embedding, and the Manhattan distance is used to calculate the similarity between entities. Then a refined similarity matrix is ​​generated through the softmax operation to obtain a comprehensive similarity representation. Finally, the loss function of the similarity output value is calculated, and the learning parameters of the model are trained using the back propagation algorithm to complete entity alignment; In this implementation, the nearest neighbor method is used to sample negative samples in two knowledge graphs, and the Manhattan distance is used to calculate the similarity between entities.

[0047] The knowledge graph entity alignment model is trained based on the entity alignment results, specifically: Determine the negative samples in the two knowledge graphs based on the entity alignment results, and calculate the Manhattan distance between entity pairs in the negative samples; The hinge loss function is constructed by minimizing the Manhattan distance between aligned entities and maximizing the Manhattan distance between negative sample entity pairs. The knowledge graph entity alignment model is trained using the hinge loss function to optimize the model parameters; Until the hinge loss is minimized, the trained knowledge graph entity alignment model is obtained.

[0048] After the model training is completed, the alignment results of the experimental sample set are output, compared with the actual situation, and feedback is used to update the underlying data information, so as to continuously optimize the data weight value in the model and continuously improve the entity alignment effect.

[0049] Specifically, the goal of model training is to minimize the distance between equivalent entity pairs and maximize the distance between negative sampling entity pairs, and use Hinge Loss as the loss function to optimize the model: )(11); in, is the seed entity pair of the model input, Is Entity and entities The negative sample set, >0 is a marginal hyperparameter.

[0050] Based on the information-enhanced entity embedding obtained in step C, we first calculate the Manhattan distance between the entities from the two knowledge graphs and construct a similarity matrix In this implementation, the similarity matrix The softmax operation is applied to the rows and columns of to generate a refined similarity matrix for entity alignment. This allows each value in the matrix to reflect the degree of matching of entity pairs evaluated from two directions, and obtain a comprehensive similarity representation, thereby better supporting the alignment algorithm. Refined similarity matrix It can be expressed as: (12); in, is the number of entities to be matched in the knowledge graph. Finally, the matching entity pairs are found by sorting the distance values ​​stored in each row of the similarity matrix.

[0051] Entity alignment is performed on the EN-FR-15K dataset in the benchmark dataset OpenEA and compared with the existing entity alignment methods. This embodiment uses H@1, H@5 and MRR as evaluation indicators. The comparison results are shown in Table 1.

[0052] Table 1 Comparison of entity alignment methods;

[0053] Based on the results in Table 1, the performance of the entity alignment method proposed in this embodiment is better than other methods, which shows that the AGNG model can fully capture the semantic information in the attribute triples, thereby generating more accurate alignment results. It also proves the important role of the similarity of the relationship between entities in the entity alignment task.

[0054] Embodiment 2 This embodiment provides a knowledge graph entity alignment system, including: A data preprocessing module is configured to obtain any two knowledge graphs for preprocessing to determine the attribute triples and relationship triples of the entities; The knowledge graph entity alignment module is configured to use the pre-trained knowledge graph entity alignment model to perform entity alignment, specifically: Based on the attribute triples of the entity, the attribute values ​​of the entity are obtained and encoded to obtain the attribute value embedding vector, and the attribute value embedding vector is feature extracted to obtain the attribute embedding vector. All the splicing results are aggregated according to the weight of each attribute value embedding vector and the attribute embedding vector after splicing to obtain the attribute-aware embedding of the entity; Based on the relationship triples of entities, the relationship between entities and the neighbor node information of entities are encoded respectively to obtain the relationship information encoding and the neighborhood information encoding. According to the weight of each concatenated relationship information encoding and neighborhood information encoding, all the neighbor nodes of the entity are aggregated to obtain the relationship-aware embedding of the entity. Attribute-aware embedding and relation-aware embedding are fused using a learnable fusion gating mechanism to generate information-enhanced entity embedding. Entity alignment of knowledge graphs is achieved based on the similarity between information-enhanced entity embeddings in two knowledge graphs.

[0055] The examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the contents disclosed in the above embodiment 1. It should be noted that the above modules as part of the system can be executed in a computer system such as a set of computer executable instructions.

[0056] The description of each embodiment in the above embodiments has different emphases. For parts not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0057] The proposed system can be implemented in other ways. For example, the system embodiment described above is only illustrative, and the division of the modules is only a logical function division. In actual implementation, there may be other division methods, such as multiple modules can be combined or integrated into another system, or some features can be ignored or not executed.

[0058] Embodiment 3 This embodiment provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps in the knowledge graph entity alignment method described in the above-mentioned embodiment 1 are implemented.

[0059] Embodiment 4 This embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps in a knowledge graph entity alignment method as described in the first embodiment above are implemented.

[0060] Embodiment 5 This embodiment provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps in the knowledge graph entity alignment method described in the first embodiment.

[0061] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program code.

[0062] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0063] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0064] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0065] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0066] Although the above describes the specific implementation mode of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art on the basis of the technical solution of the present invention without creative work are still within the scope of protection of the present invention.

Claims

1. A knowledge graph entity alignment method, characterized in that: include: Get any two knowledge graphs for preprocessing to determine the attribute triples and relationship triples of the entities; Use the pre-trained knowledge graph entity alignment model to perform entity alignment, specifically: Based on the attribute triples of the entity, the attribute values ​​of the entity are obtained and encoded to obtain the attribute value embedding vector, and the attribute value embedding vector is feature extracted to obtain the attribute embedding vector. All the splicing results are aggregated according to the weight of each attribute value embedding vector and the attribute embedding vector after splicing to obtain the attribute-aware embedding of the entity; Based on the relationship triples of entities, the relationship between entities and the neighbor node information of entities are encoded respectively to obtain the relationship information encoding and the neighborhood information encoding. According to the weight of each concatenated relationship information encoding and neighborhood information encoding, all the neighbor nodes of the entity are aggregated to obtain the relationship-aware embedding of the entity. Attribute-aware embedding and relation-aware embedding are fused using a learnable fusion gating mechanism to generate information-enhanced entity embedding. Entity alignment of knowledge graphs is achieved based on the similarity between information-enhanced entity embeddings in two knowledge graphs.

2. A knowledge graph entity alignment method as claimed in claim 1, characterized in that: The method aggregates all the concatenation results according to the weights of each attribute value embedding vector and the attribute embedding vector to obtain the attribute-aware embedding of the entity, specifically: Concatenate the attribute value embedding vector and the attribute embedding vector to obtain the attribute triple representation vector of the entity; The mean of all attribute triples of the entity is used as the initial attribute embedding of the entity. The graph attention mechanism is used to calculate the weight between the initial attribute embedding of the entity and its attribute triple representation vector; All attribute triplet representation vectors are aggregated using the weight corresponding to each attribute triplet representation vector, and regularized based on the aggregation result and the initial attribute embedding of the entity to obtain the attribute-aware embedding of the entity.

3. A knowledge graph entity alignment method as claimed in claim 1, characterized in that: The entity-based relationship triples encode the relationship between entities and the neighbor node information of the entities respectively to obtain the relationship information encoding and the neighborhood information encoding, which are specifically: Based on the entity's relationship triples, a multi-layer graph convolutional network is used to encode the entity's neighbor node information to obtain neighborhood information encoding; Based on the relationship triples of entities, the edges in the knowledge graph are initialized, that is, the adjacency relationships of entities are initialized to obtain the relationship edge vectors; All relationship edge vectors are aggregated based on the aggregation weights corresponding to the entity adjacency relationships to obtain the relationship information encoding.

4. A knowledge graph entity alignment method as claimed in claim 1, characterized in that: The attribute-aware embedding and the relationship-aware embedding are fused using a learnable fusion gating mechanism to generate information-enhanced entity embeddings, specifically: Determine a proportional gate signal based on the attribute-aware embedding and the relationship-aware embedding and the corresponding learnable weight matrix; The combination ratio of attribute-aware embedding and relationship-aware embedding is determined according to the ratio gate signal, and the attribute-aware embedding and relationship-aware embedding are fused based on the combination ratio to obtain information-enhanced entity embedding.

5. A knowledge graph entity alignment method as claimed in claim 1, characterized in that: The entity alignment of the knowledge graphs is achieved according to the similarity between the information-enhanced entity embeddings in the two knowledge graphs, specifically: Calculate the Manhattan distance between the information-enhanced entity embeddings of entities in two knowledge graphs as the similarity between entities and construct a similarity matrix; The rows and columns of the similarity matrix are converted into probability distribution to generate a refined similarity matrix; By sorting the distance values ​​stored in each row of the refined similarity matrix, matching entity pairs are found with the smallest distance value.

6. A knowledge graph entity alignment method as claimed in claim 5, characterized in that: The knowledge graph entity alignment model is trained based on the entity alignment results, specifically: Determine the negative samples in the two knowledge graphs based on the entity alignment results, and calculate the Manhattan distance between entity pairs in the negative samples; The hinge loss function is constructed by minimizing the Manhattan distance between aligned entities and maximizing the Manhattan distance between negative sample entity pairs. The knowledge graph entity alignment model is trained using the hinge loss function to optimize the model parameters; Until the hinge loss is minimized, the trained knowledge graph entity alignment model is obtained.

7. A knowledge graph entity alignment system, characterized in that: include: A data preprocessing module is configured to obtain any two knowledge graphs for preprocessing to determine the attribute triples and relationship triples of the entities; The knowledge graph entity alignment module is configured to use the pre-trained knowledge graph entity alignment model to perform entity alignment, specifically: Based on the attribute triples of the entity, the attribute values ​​of the entity are obtained and encoded to obtain the attribute value embedding vector, and the attribute value embedding vector is feature extracted to obtain the attribute embedding vector. All the splicing results are aggregated according to the weight of each attribute value embedding vector and the attribute embedding vector after splicing to obtain the attribute-aware embedding of the entity; Based on the relationship triples of entities, the relationship between entities and the neighbor node information of entities are encoded respectively to obtain the relationship information encoding and the neighborhood information encoding. According to the weight of each concatenated relationship information encoding and neighborhood information encoding, all the neighbor nodes of the entity are aggregated to obtain the relationship-aware embedding of the entity. Attribute-aware embedding and relation-aware embedding are fused using a learnable fusion gating mechanism to generate information-enhanced entity embedding. Entity alignment of knowledge graphs is achieved based on the similarity between information-enhanced entity embeddings in two knowledge graphs.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps in a knowledge graph entity alignment method as described in any one of claims 1 to 6 are implemented.

9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps in the knowledge graph entity alignment method as described in any one of claims 1-6 are implemented.

10. A computer program product, characterized in that The computer program product includes a computer program, and when the computer program is executed by a processor, it implements the steps of a knowledge graph entity alignment method and system as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Multi-information perception knowledge graph entity alignment method

    CN117150036A

  • Self-supervised learning knowledge graph entity alignment method and device, equipment and medium

    CN118036728A

  • Target word detection method and apparatus, electronic device and storage medium

    WO2023159767A1

  • Multi-source knowledge graph fusion-oriented entity alignment method and apparatus, and system

    WO2023273182A1

Cited By

  • Knowledge graph construction method for structural information aggregation

    CN120598017A