A multi-channel entity alignment method and device for large-scale knowledge graphs

By introducing a multi-channel entity alignment method into a large-scale knowledge graph, combining name features and structural features, and using small batch generation strategy to draw molecular graphs, the problem of high complexity in the alignment of large-scale knowledge graph entities in the existing technology is solved. Achieve efficient and high-precision solid alignment.

CN114461812BActive Publication Date: 2025-02-07ZHEJIANG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210031549.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-12
Publication Date
2025-02-07
Estimated Expiration
2042-01-12

AI Technical Summary

Technical Problem

The existing entity alignment method has high time-time and space-time complexity in handling large-scale knowledge graphs, which is difficult to apply to actual scenarios, and ordinary users are unable to withstand the overhead of computing clusters.

Method used

A multi-channel entity alignment method for large-scale knowledge graphs is proposed. By obtaining the entity names of two knowledge graphs, semantic feature matrix and literal feature matrix are extracted, name feature matrix is ​​constructed, and structural feature channels are combined with small batch generation strategy. Digitize the graph to reduce calculation overhead.

Benefits of technology

It realizes efficient and high-precision entity alignment, reduces calculation complexity, avoids the reduction in accuracy caused by graph segmentation, and is suitable for entity alignment of large-scale knowledge graphs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114461812B_ABST
    Figure CN114461812B_ABST
Patent Text Reader

Abstract

The present invention discloses a multi-channel entity alignment method and device for large-scale knowledge graphs, the method comprising: obtaining two large-scale knowledge graphs; adding known aligned entity pairs in the two large-scale knowledge graphs to a training set; extracting a semantic feature matrix and a literal feature matrix according to the name of each entity in the two large-scale knowledge graphs; constructing a name feature matrix according to the semantic feature matrix and the literal feature matrix; performing data expansion on the training set according to the name feature matrix; dividing the source knowledge graph and the target knowledge graph into a plurality of subgraphs according to the expanded training set using a small batch generation strategy; obtaining the structural features of the entities in each subgraph and constructing a structural feature matrix according to the structural features; fusing the name feature matrix and the structural feature matrix to obtain the entity alignment result of the two large-scale knowledge graphs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of knowledge graph entity alignment, and in particular to a multi-channel entity alignment method and device for large-scale knowledge graphs. Background Art

[0002] In recent years, more and more companies or organizations have begun to build their own knowledge graphs, which are widely used in various knowledge-driven tasks, such as semantic retrieval, recommendation systems, intelligent answers, etc. However, the knowledge graphs built by companies or organizations are often very incomplete, which limits the use of knowledge graphs in downstream tasks. Therefore, knowledge graph expansion technology has received widespread attention. Fusion of knowledge graphs from different sources is a very common method for expanding knowledge graphs. The first step in knowledge graph fusion is to find entities pointing to the same real-world object from different knowledge graphs. This process is called "entity alignment." Therefore, entity alignment is a prerequisite for knowledge graph fusion.

[0003] Existing entity alignment methods are mainly based on learning the structural features of knowledge graphs. They are based on the assumption that if the neighbors of two entities in the knowledge graph are more similar, then the two entities are more likely to point to the same real object. In addition, some methods also use other auxiliary information (such as entity name, entity introduction, etc.) to improve the accuracy of entity alignment methods based on structural features.

[0004] In the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art:

[0005] Most of these methods have high time and space complexity and are difficult to apply to large knowledge graphs in reality. To solve this problem, a common method is to run the entity alignment model in a distributed manner on a machine cluster, but in actual applications, it is difficult for ordinary users to afford the overhead of the computing cluster and it is also difficult to effectively manage the computing cluster. Summary of the invention

[0006] The purpose of the embodiments of the present application is to provide a multi-channel entity alignment method and device for large-scale knowledge graphs to solve the technical problems existing in related technologies that are difficult to apply to large knowledge graphs.

[0007] According to a first aspect of an embodiment of the present application, a multi-channel entity alignment method for a large-scale knowledge graph is provided, comprising:

[0008] Obtain two large-scale knowledge graphs, which are respectively denoted as a source knowledge graph and a target knowledge graph, wherein each of the large-scale knowledge graphs includes a plurality of knowledge tuples, and each of the knowledge tuples includes two entities;

[0009] Adding known aligned entity pairs in the two large-scale knowledge graphs to the training set;

[0010] Extracting a semantic feature matrix and a literal feature matrix according to the name of each entity in the two large-scale knowledge graphs;

[0011] Constructing a name feature matrix according to the semantic feature matrix and the literal feature matrix, and using the name feature matrix as the output of the name feature channel;

[0012] According to the name feature matrix, data expansion is performed on the training set;

[0013] Based on the expanded training set, the source knowledge graph and the target knowledge graph are divided into several subgraphs using a small batch generation strategy;

[0014] Obtaining structural features of entities in each subgraph and constructing a structural feature matrix based on the structural features, and using the structural feature matrix as the output of the structural feature channel;

[0015] The name feature matrix and the structure feature matrix are fused to obtain the entity alignment results of the two large-scale knowledge graphs.

[0016] Furthermore, according to the name of each entity in the two large-scale knowledge graphs, a semantic feature matrix and a literal feature matrix are extracted, including:

[0017] Convert the name of each entity in the two large-scale knowledge graphs into a tag sequence;

[0018] Assigning embedding vectors of the same dimension to all tags and obtaining the maximum value of the embedding vectors corresponding to the tags;

[0019] Taking the maximum value of the embedding vector corresponding to the tag as the semantic feature of the entity name corresponding to the tag;

[0020] According to the similarity of semantic features of names between entities in the source knowledge graph and the target knowledge graph, a semantic feature matrix is ​​constructed;

[0021] A literal feature matrix is ​​constructed based on the similarity of the literal features of the names between each entity in the source knowledge graph and the target knowledge graph.

[0022] Furthermore, according to the name feature matrix, data expansion is performed on the training set, including:

[0023] According to the name feature matrix, the similarity between each entity in the two large-scale knowledge graphs and all entities in the other large-scale knowledge graph is obtained;

[0024] If the entities from different knowledge graphs happen to be the entities with the highest similarity to another entity in their respective knowledge graphs, then a pair of entities is regarded as aligned entities;

[0025] Add all aligned entities to the training set.

[0026] Furthermore, based on the expanded training set, the source knowledge graph and the target knowledge graph are divided into several subgraphs using a small batch generation strategy, including:

[0027] Assigning the same weight to the edges in the source knowledge graph and the target knowledge graph;

[0028] Dividing the source knowledge graph into a plurality of subgraphs, each subgraph containing a plurality of first entities;

[0029] Obtain a second entity in the target knowledge graph corresponding to the first entity;

[0030] Adding fictitious edges between a predetermined number of randomly selected second entities and the remaining second entities and setting a weight much greater than 1 for the fictitious edges;

[0031] If there is no virtual edge between two entities from the source knowledge graph in the training set and there is a virtual edge between the corresponding two entities from the target knowledge graph, then the edge weight between these entities from the target knowledge graph is set to 0;

[0032] According to the set weights, the target knowledge graph is divided into several subgraphs.

[0033] According to a second aspect of an embodiment of the present application, a multi-channel entity alignment device for a large-scale knowledge graph is provided, comprising:

[0034] An acquisition module, used for acquiring two large-scale knowledge graphs, which are respectively denoted as a source knowledge graph and a target knowledge graph, wherein each of the large-scale knowledge graphs includes a plurality of knowledge tuples, and each of the knowledge tuples includes two entities;

[0035] An adding module, used for adding known aligned entity pairs in the two large-scale knowledge graphs to a training set;

[0036] An extraction module, used for extracting a semantic feature matrix and a literal feature matrix according to the name of each entity in the two large-scale knowledge graphs;

[0037] A first construction module is used to construct a name feature matrix according to the semantic feature matrix and the literal feature matrix, and use the name feature matrix as the output of the name feature channel;

[0038] An expansion module, used for expanding the data of the training set according to the name feature matrix;

[0039] A partitioning module is used to partition the source knowledge graph and the target knowledge graph into several subgraphs based on the expanded training set and using a small batch generation strategy;

[0040] The second construction module is used to obtain the structural features of the entity in each sub-graph and construct a structural feature matrix according to the structural features, and use the structural feature matrix as the output of the structural feature channel;

[0041] A fusion module is used to fuse the name feature matrix and the structure feature matrix to obtain the entity alignment results of the two large-scale knowledge graphs.

[0042] Furthermore, according to the name of each entity in the two large-scale knowledge graphs, a semantic feature matrix and a literal feature matrix are extracted, including:

[0043] Convert the name of each entity in the two large-scale knowledge graphs into a tag sequence;

[0044] Assigning embedding vectors of the same dimension to all tags and obtaining the maximum value of the embedding vectors corresponding to the tags;

[0045] Taking the maximum value of the embedding vector corresponding to the tag as the semantic feature of the entity name corresponding to the tag;

[0046] According to the similarity of semantic features of names between entities in the source knowledge graph and the target knowledge graph, a semantic feature matrix is ​​constructed;

[0047] A literal feature matrix is ​​constructed based on the similarity of the literal features of the names between each entity in the source knowledge graph and the target knowledge graph.

[0048] Furthermore, according to the name feature matrix, data expansion is performed on the training set, including:

[0049] According to the name feature matrix, the similarity between each entity in the two large-scale knowledge graphs and all entities in the other large-scale knowledge graph is obtained;

[0050] If the entities from the different knowledge graphs happen to be the entities with the highest similarity to another entity in their respective knowledge graphs, then a pair of entities is regarded as aligned entities;

[0051] Add all aligned entities to the training set.

[0052] Furthermore, based on the expanded training set, the source knowledge graph and the target knowledge graph are divided into several subgraphs using a small batch generation strategy, including:

[0053] Assigning the same weight to the edges in the source knowledge graph and the target knowledge graph;

[0054] Dividing the source knowledge graph into a plurality of subgraphs, each subgraph containing a plurality of first entities;

[0055] Obtain a second entity in the target knowledge graph corresponding to the first entity;

[0056] Adding fictitious edges between a predetermined number of randomly selected second entities and the remaining second entities and setting a weight much greater than 1 for the fictitious edges;

[0057] If there is no virtual edge between two entities from the source knowledge graph in the training set and there is a virtual edge between the corresponding two entities from the target knowledge graph, then the edge weight between these entities from the target knowledge graph is set to 0;

[0058] According to the set weights, the target knowledge graph is divided into several subgraphs.

[0059] According to a third aspect of an embodiment of the present application, there is provided an electronic device, including:

[0060] one or more processors;

[0061] A memory for storing one or more programs;

[0062] When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in the first aspect.

[0063] According to a third aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which computer instructions are stored, characterized in that when the instructions are executed by a processor, the steps of the method described in the first aspect are implemented.

[0064] The technical solution provided by the embodiments of the present application may have the following beneficial effects:

[0065] As can be seen from the above embodiments, this application integrates the information of the two channels of structural features and name features of the knowledge graph to solve the entity alignment problem. The former is called the "structural channel" and the latter is called the "name channel". In the structural channel, a small batch generation strategy is used to divide the source knowledge graph and the target knowledge graph into several subgraphs to construct a structural feature matrix, reducing the computational overhead of large-scale knowledge graph entity alignment; at the same time, since graph segmentation will inevitably cause graph structure destruction, the introduction of the name feature channel can enrich the feature information and compensate for the decrease in accuracy caused by the destruction of the graph structure features, thereby achieving efficient and high-precision entity alignment.

[0066] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0067] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0068] Figure 1 It is a flowchart of a multi-channel entity alignment method for large-scale knowledge graphs according to an exemplary embodiment.

[0069] Figure 2 is a flowchart of step S13 according to an exemplary embodiment.

[0070] Figure 3 is a flowchart of step S15 according to an exemplary embodiment.

[0071] Figure 4 is a flowchart of step S16 according to an exemplary embodiment.

[0072] Figure 5 is a schematic diagram of a small batch generation strategy according to an exemplary embodiment.

[0073] Figure 6 It is a block diagram of a multi-channel entity alignment device for large-scale knowledge graphs according to an exemplary embodiment. DETAILED DESCRIPTION

[0074] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0075] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0076] It should be understood that although the terms first, second, third, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0077] Glossary:

[0078] Large-scale knowledge graph: A knowledge graph is a semantic network that reveals the relationship between entities. It contains several knowledge tuples, including a head entity, a tail entity, and an entity reference relationship between the head entity and the tail entity. The knowledge tuples contained in a large-scale knowledge graph have the characteristics of a large number of entities and diverse relationships between entities.

[0079] Figure 1 is a flowchart of a multi-channel entity alignment method for large-scale knowledge graphs according to an exemplary embodiment. Figure 1 As shown, the method is applied in a terminal and may include the following steps:

[0080] Step S11: obtaining two large-scale knowledge graphs, which are respectively recorded as a source knowledge graph and a target knowledge graph, wherein each of the large-scale knowledge graphs includes a plurality of knowledge tuples, and each of the knowledge tuples includes two entities;

[0081] Step S12: adding the known aligned entity pairs in the two large-scale knowledge graphs to the training set;

[0082] Step S13: extracting a semantic feature matrix and a literal feature matrix according to the name of each entity in the two large-scale knowledge graphs;

[0083] Step S14: constructing a name feature matrix according to the semantic feature matrix and the literal feature matrix, and using the name feature matrix as the output of the name feature channel;

[0084] Step S15: expanding the training set data according to the name feature matrix;

[0085] Step S16: Based on the expanded training set, the source knowledge graph and the target knowledge graph are divided into several subgraphs using a small batch generation strategy;

[0086] Step S17: obtaining structural features of the entities in each subgraph and constructing a structural feature matrix according to the structural features, and using the structural feature matrix as the output of the structural feature channel;

[0087] Step S18: Fuse the name feature matrix and the structure feature matrix to obtain the entity alignment result of the two large-scale knowledge graphs.

[0088] As can be seen from the above embodiments, this application integrates the information of the two channels of structural features and name features of the knowledge graph to solve the entity alignment problem. The former is called the "structural channel" and the latter is called the "name channel". In the structural channel, a small batch generation strategy is used to divide the source knowledge graph and the target knowledge graph into several subgraphs to construct a structural feature matrix, reducing the computational overhead of large-scale knowledge graph entity alignment; at the same time, since graph segmentation will inevitably cause graph structure destruction, the introduction of the name feature channel can enrich the feature information and compensate for the decrease in accuracy caused by the destruction of the graph structure features, thereby achieving efficient and high-precision entity alignment.

[0089] In the specific implementation of step S11, two large-scale knowledge graphs are obtained, which are respectively recorded as a source knowledge graph and a target knowledge graph, wherein each of the large-scale knowledge graphs includes a plurality of knowledge tuples, and each of the knowledge tuples includes two entities;

[0090] Specifically, two large-scale knowledge graphs are input, namely the source knowledge graph and the target knowledge graph, denoted as G s and G t , wherein each of the knowledge graphs includes several knowledge tuples, each of which includes a head entity, a tail entity, and an entity reference relationship between the head entity and the tail entity. In other words, the knowledge graph is composed of pieces of knowledge, each of which is represented by an SPO triple (Subject-Predicate-Object), wherein the head entity and the tail entity are concrete things that exist objectively, usually referring to actual, functional organizations, institutions, objects, people, and other nouns. In this method, no distinction is made between the head entity and the tail entity, so they are collectively referred to as entities. The large-scale knowledge graph forms a graph structure based on the entity reference relationship between the entities.

[0091] In a specific implementation of step S12, the known aligned entity pairs in the two large-scale knowledge graphs are added to the training set;

[0092] Specifically, multiple pairs of entities pointing to the same physical object in the source knowledge graph and the target knowledge graph are obtained as training sets. For example, in a specific embodiment, there are two entities named "Matt Damon" and "Matt Damon" in the Chinese source knowledge graph and the English target knowledge graph, respectively, and they both refer to the same famous American actor, so this pair of entities is included in the training set.

[0093] In the specific implementation of step S13, a semantic feature matrix and a literal feature matrix are extracted according to the name of each entity in the two large-scale knowledge graphs;

[0094] Specifically, Figure 2 As shown, this step includes the following sub-steps:

[0095] Step S21: converting the name of each entity in the two large-scale knowledge graphs into a tag sequence;

[0096] Specifically, the tag sequence refers to the result of word segmentation of the entity name, and each tag refers to a sub-character in the word segmentation result. In one embodiment, the large-scale knowledge graph G is transformed into a large-scale knowledge graph using a pre-trained language model such as BERT, RoBERTa, or XLNet. s and G t Each entity name in the target knowledge graph is converted into a tag sequence. For example, in a specific embodiment, an entity name "Matt Damon" in the English target knowledge graph is converted into a tag sequence ["Matt", "Damon"] by the pre-trained language model BERT.

[0097] Step S22: assigning embedding vectors of the same dimension to all tags and obtaining the maximum value of the embedding vectors corresponding to the tags;

[0098] Specifically, assigning embedding vectors of the same dimension to all tags means assigning embedding vectors of the same dimension to each sub-character in the word segmentation result, and the assignment of embedding vectors can be achieved through any pre-trained language model such as BERT, RoBERTa, etc. In a specific embodiment, 768-dimensional vectors t1 and t2 are respectively assigned to the sub-characters ["Matt", "Damon"] in the tag sequence, and obtaining the maximum value of the embedding vector corresponding to the tag means selecting the maximum value in each dimension in the embedding vectors of all tags using a maximum pooling operation. For example, by selecting the maximum value of each dimension in the embedding vectors t1 and t2, 768 maximum values ​​can be obtained.

[0099] Step S23: taking the maximum value of the embedding vector corresponding to the tag as the semantic feature of the entity name corresponding to the tag;

[0100] Specifically, the maximum values ​​of the embedding vectors corresponding to each tag in the tag sequence are concatenated to form a new vector as the semantic information feature of the entity name. For example, the 768 maximum values ​​obtained in the specific embodiment described in step S22 are concatenated to form a new vector as the semantic information feature of the entity name "Matt Damon".

[0101] Step S24: constructing a semantic feature matrix according to the similarity of the semantic features of the names between two entities in the source knowledge graph and the target knowledge graph;

[0102] Specifically, similarity is used to describe the degree of similarity between two things. s and the target knowledge graph G t The semantic features of the names between the two entities are measured by similarity measurement methods such as Manhattan similarity or cosine similarity to construct a semantic feature matrix. Since the Manhattan similarity measurement method has a small amount of calculation, Manhattan similarity is used in this embodiment to measure the similarity of the semantic features of the names. Assuming that the source knowledge graph contains m entities and the target knowledge graph contains n entities, the similarity between m*n entities needs to be calculated.

[0103] Step S25: Construct a literal feature matrix based on the similarity of the literal features of the names between each entity in the source knowledge graph and the target knowledge graph.

[0104] Specifically, any character similarity measurement method, such as Levenshtein distance, Jaccard similarity, etc., is used to construct G s and G t The similarity matrix of the literal features of the names between two entities in . Assuming that the source knowledge graph contains m entities and the target knowledge graph contains n entities, the similarity between m*n entities needs to be calculated.

[0105] In the specific implementation of step S14, a name feature matrix is ​​constructed according to the semantic feature matrix and the literal feature matrix, and the name feature matrix is ​​used as the output of the name feature channel;

[0106] Specifically, the semantic feature matrix and the literal feature matrix are fused in a weighted sum manner to obtain the name feature matrix as the output of the name feature channel. Generally, the same weight is set for the two. Through this step, the name feature channel is introduced to enrich the feature information, making full use of the rich information contained in the knowledge graph, and thus achieving high-precision entity alignment.

[0107] In the specific implementation of step S15, data expansion is performed on the training set according to the name feature matrix;

[0108] Specifically, Figure 3 As shown, this step may include the following sub-steps:

[0109] Step S31: according to the name feature matrix, obtain the similarity between each entity in the two large-scale knowledge graphs and all entities in the other large-scale knowledge graph;

[0110] Specifically, the name feature matrix contains the similarity between two entities in two large-scale knowledge graphs. Assuming that the source knowledge graph contains m entities and the target knowledge graph contains n entities, an m*n-scale name feature matrix is ​​obtained. The similarity between the i-th entity in the source knowledge graph and all entities in the target knowledge graph is the i-th row of the name feature matrix.

[0111] Step S32: If the entities from different knowledge graphs happen to be the entities with the highest similarity to another entity in their respective knowledge graphs, then a pair of entities is taken as aligned entities;

[0112] Specifically, assuming that the value with the largest similarity in the i-th row of the name feature matrix is ​​in the j-th column, and the value with the largest similarity in the j-th column is in the i-th row, then the i-th entity in the source knowledge graph and the j-th entity in the target knowledge graph are considered to be aligned, that is, referring to the same real object.

[0113] Step S33: Add all aligned entities to the training set.

[0114] In the specific implementation of step S31-step S33, if the two entities from the different knowledge graphs happen to be the entities with the most similar name features to the other entity in their respective knowledge graphs, then this pair of entities is considered to be aligned entities, and all entity pairs that meet this condition are included in the training set. By expanding the training set data, the problem of original training set data loss caused by subsequent factor graph partitioning is compensated, and more supervision information is provided for the subsequent supervised learning of subgraph structure information.

[0115] In the specific implementation of step S16, based on the expanded training set, the source knowledge graph and the target knowledge graph are divided into several subgraphs using a small batch generation strategy;

[0116] Specifically, Figure 4 As shown, this step may include the following sub-steps:

[0117] Step S41: assigning the same weight to the edges in the source knowledge graph and the target knowledge graph;

[0118] Specifically, the same weights are assigned to the edges in the source knowledge graph and the target knowledge graph. Figure 5 For example, G s and G t The weights of all the edges in are assigned as w, and in this embodiment the weights are set to 1.

[0119] Step S42: Divide the source knowledge graph into a plurality of subgraphs, each subgraph containing a plurality of first entities;

[0120] Specifically, METIS is used to transform the source knowledge graph G sDivide into K subgraphs Subgraph The entities in the training set included in by Figure 5 For example, METIS divides the source knowledge graph into two subgraphs, namely and Subgraph The entities in the training set included in Subgraph The entities in the training set included in

[0121] Step S43: Obtain a second entity in the target knowledge graph corresponding to the first entity;

[0122] Specifically, according to the expanded training set, in the target knowledge graph G t Find the first entity The corresponding second entity by Figure 5 For example, with the first entity The corresponding second entity With the first entity The corresponding second entity

[0123] Step S44: adding fictitious edges between a predetermined number of randomly selected second entities and the remaining second entities and setting a weight much greater than 1 for the fictitious edges;

[0124] Specifically, from the second entity Randomly select q entities from the q entities and compare them with the remaining Add imaginary edges between entities (which only serve to assist in subgraph division and do not change the structure of the graph), and assign a weight w much larger than 1 to these edges ′ .like Figure 5 , Corresponding for Select Therefore, according to the above rules, and There is an imaginary edge between them.

[0125] Step S45: If there is no virtual edge between two entities from the source knowledge graph in the training set and there is a virtual edge between the corresponding two entities from the target knowledge graph, then the edge weight between these entities from the target knowledge graph is set to 0;

[0126] Specifically, if there is no edge between two entities from the source knowledge graph in the training set, but there is an edge between the corresponding two entities from the target knowledge graph, then the edge weight between these entities from the target knowledge graph is set to 0. Figure 5 As shown, in the source knowledge graph G s middle and There is no edge between them, but the target knowledge graph G t middle and There is an edge, so according to the above rules, and The edge weights between them are set to 0. and Same reason.

[0127] Step S46: Divide the target knowledge graph into several subgraphs according to the set weights;

[0128] Specifically, based on steps S43 to S45, METIS is used to divide the target knowledge graph into K subgraphs, namely Figure 5 The result of subgraph division is shown in the figure. Through this step, while reducing the complexity of the entity alignment model by dividing the subgraph, it is also possible to ensure that the divided subgraph does not change the original structural feature information.

[0129] In the specific implementation of step S17, the structural features of the entity in each subgraph are obtained and a structural feature matrix is ​​constructed according to the structural features, and the structural feature matrix is ​​used as the output of the structural feature channel;

[0130] Specifically, any entity alignment model based on the knowledge graph structure, such as GCN-Align, RREA, etc., is used to independently learn the entity structure features in each subgraph, and then a similarity measurement method such as Manhattan distance or cosine similarity is used to construct a similarity matrix of structural features between each entity in the source knowledge graph and the target knowledge graph. The similarity matrix of structural features is the structural feature matrix.

[0131] In the specific implementation of step S18, the name feature matrix and the structure feature matrix are fused to obtain the entity alignment result of the two large-scale knowledge graphs.

[0132] Specifically, the name feature matrix and the structure feature matrix are added together, and the entity alignment result is obtained based on the fused matrix.

[0133] Corresponding to the aforementioned embodiment of the multi-channel entity alignment method for large-scale knowledge graphs, the present application also provides an embodiment of a multi-channel entity alignment device for large-scale knowledge graphs.

[0134] Figure 6 is a block diagram of a multi-channel entity alignment device for large-scale knowledge graphs according to an exemplary embodiment. Figure 6 , the device may include:

[0135] An acquisition module 21 is used to acquire two large-scale knowledge graphs, which are respectively recorded as a source knowledge graph and a target knowledge graph, wherein each of the large-scale knowledge graphs includes a plurality of knowledge tuples, and each of the knowledge tuples includes two entities;

[0136] An adding module 22, used to add known aligned entity pairs in the two large-scale knowledge graphs to a training set;

[0137] An extraction module 23, used to extract a semantic feature matrix and a literal feature matrix according to the name of each entity in the two large-scale knowledge graphs;

[0138] A first construction module 24 is used to construct a name feature matrix according to the semantic feature matrix and the literal feature matrix, and use the name feature matrix as the output of the name feature channel;

[0139] An expansion module 25, used for expanding the data of the training set according to the name feature matrix;

[0140] A partitioning module 26 is used to partition the source knowledge graph and the target knowledge graph into a plurality of sub-graphs using a small batch generation strategy according to the expanded training set;

[0141] A second construction module 27 is used to obtain the structural features of the entity in each sub-graph and construct a structural feature matrix according to the structural features, and use the structural feature matrix as the output of the structural feature channel;

[0142] The fusion module 28 is used to fuse the name feature matrix and the structure feature matrix to obtain the entity alignment result of the two large-scale knowledge graphs.

[0143] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0144] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present application scheme. A person of ordinary skill in the art can understand and implement it without paying any creative work.

[0145] Correspondingly, the present application also provides an electronic device, including: one or more processors; a memory for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the multi-channel entity alignment method for large-scale knowledge graphs as described above.

[0146] Correspondingly, the present application also provides a computer-readable storage medium on which computer instructions are stored, characterized in that when the instructions are executed by a processor, the multi-channel entity alignment method for large-scale knowledge graphs as described above is implemented.

[0147] Those skilled in the art will readily appreciate other embodiments of the present application after considering the description and practicing the contents disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary techniques in the art that are not disclosed in the present application. The description and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0148] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A multi-channel entity alignment method for large-scale knowledge graphs, characterized in that: include: Obtain two large-scale knowledge graphs, which are respectively denoted as a source knowledge graph and a target knowledge graph, wherein each of the large-scale knowledge graphs includes a plurality of knowledge tuples, and each of the knowledge tuples includes two entities; Adding known aligned entity pairs in the two large-scale knowledge graphs to the training set; Extracting a semantic feature matrix and a literal feature matrix according to the name of each entity in the two large-scale knowledge graphs; Constructing a name feature matrix according to the semantic feature matrix and the literal feature matrix, and using the name feature matrix as the output of the name feature channel; According to the name feature matrix, data expansion is performed on the training set; Based on the expanded training set, the source knowledge graph and the target knowledge graph are divided into several subgraphs using a small batch generation strategy; Obtaining structural features of entities in each subgraph and constructing a structural feature matrix based on the structural features, and using the structural feature matrix as the output of the structural feature channel; The name feature matrix and the structure feature matrix are merged to obtain entity alignment results of the two large-scale knowledge graphs; Among them, according to the expanded training set, the small batch generation strategy is used to divide the source knowledge graph and the target knowledge graph into several subgraphs, including: Assigning the same weight to the edges in the source knowledge graph and the target knowledge graph; Dividing the source knowledge graph into a plurality of subgraphs, each subgraph containing a plurality of first entities; Obtain a second entity in the target knowledge graph corresponding to the first entity; Adding fictitious edges between a predetermined number of randomly selected second entities and the remaining second entities and setting a weight much greater than 1 for the fictitious edges; If there is no virtual edge between two entities from the source knowledge graph in the training set and there is a virtual edge between the corresponding two entities from the target knowledge graph, then the edge weight between these entities from the target knowledge graph is set to 0; According to the set weights, the target knowledge graph is divided into several subgraphs.

2. The method according to claim 1, characterized in that According to the name of each entity in the two large-scale knowledge graphs, a semantic feature matrix and a literal feature matrix are extracted, including: Convert the name of each entity in the two large-scale knowledge graphs into a tag sequence; Assigning embedding vectors of the same dimension to all tags and obtaining the maximum value of the embedding vectors corresponding to the tags; Taking the maximum value of the embedding vector corresponding to the tag as the semantic feature of the entity name corresponding to the tag; According to the similarity of semantic features of names between entities in the source knowledge graph and the target knowledge graph, a semantic feature matrix is ​​constructed; A literal feature matrix is ​​constructed based on the similarity of the literal features of the names between each entity in the source knowledge graph and the target knowledge graph.

3. The method according to claim 1, characterized in that According to the name feature matrix, the training set is expanded, including: According to the name feature matrix, the similarity between each entity in the two large-scale knowledge graphs and all entities in the other large-scale knowledge graph is obtained; If the entities from different knowledge graphs happen to be the entities with the highest similarity to another entity in their respective knowledge graphs, then a pair of entities is regarded as aligned entities; Add all aligned entities to the training set.

4. A multi-channel entity alignment device for large-scale knowledge graphs, characterized in that: include: An acquisition module, used for acquiring two large-scale knowledge graphs, which are respectively denoted as a source knowledge graph and a target knowledge graph, wherein each of the large-scale knowledge graphs includes a plurality of knowledge tuples, and each of the knowledge tuples includes two entities; An adding module, used for adding known aligned entity pairs in the two large-scale knowledge graphs to a training set; An extraction module, used for extracting a semantic feature matrix and a literal feature matrix according to the name of each entity in the two large-scale knowledge graphs; A first construction module is used to construct a name feature matrix according to the semantic feature matrix and the literal feature matrix, and use the name feature matrix as the output of the name feature channel; An expansion module, used for expanding the data of the training set according to the name feature matrix; A partitioning module is used to partition the source knowledge graph and the target knowledge graph into several subgraphs based on the expanded training set and using a small batch generation strategy; The second construction module is used to obtain the structural features of the entity in each sub-graph and construct a structural feature matrix according to the structural features, and use the structural feature matrix as the output of the structural feature channel; A fusion module, used to fuse the name feature matrix and the structure feature matrix to obtain entity alignment results of the two large-scale knowledge graphs; Among them, according to the expanded training set, the small batch generation strategy is used to divide the source knowledge graph and the target knowledge graph into several subgraphs, including: Assigning the same weight to the edges in the source knowledge graph and the target knowledge graph; Dividing the source knowledge graph into a plurality of subgraphs, each subgraph containing a plurality of first entities; Obtain a second entity in the target knowledge graph corresponding to the first entity; Adding fictitious edges between a predetermined number of randomly selected second entities and the remaining second entities and setting a weight much greater than 1 for the fictitious edges; If there is no virtual edge between two entities from the source knowledge graph in the training set and there is a virtual edge between the corresponding two entities from the target knowledge graph, then the edge weight between these entities from the target knowledge graph is set to 0; According to the set weights, the target knowledge graph is divided into several subgraphs.

5. The device according to claim 4, characterized in that According to the name of each entity in the two large-scale knowledge graphs, a semantic feature matrix and a literal feature matrix are extracted, including: Convert the name of each entity in the two large-scale knowledge graphs into a tag sequence; Assigning embedding vectors of the same dimension to all tags and obtaining the maximum value of the embedding vectors corresponding to the tags; Taking the maximum value of the embedding vector corresponding to the tag as the semantic feature of the entity name corresponding to the tag; According to the similarity of semantic features of names between entities in the source knowledge graph and the target knowledge graph, a semantic feature matrix is ​​constructed; A literal feature matrix is ​​constructed based on the similarity of the literal features of the names between each entity in the source knowledge graph and the target knowledge graph.

6. The device according to claim 4, characterized in that According to the name feature matrix, the training set is expanded, including: According to the name feature matrix, the similarity between each entity in the two large-scale knowledge graphs and all entities in the other large-scale knowledge graph is obtained; If the entities from different knowledge graphs happen to be the entities with the highest similarity to another entity in their respective knowledge graphs, then a pair of entities is regarded as aligned entities; Add all aligned entities to the training set.

7. An electronic device, characterized in that: include: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 3.

8. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the instruction is executed by a processor, the steps of the method according to any one of claims 1 to 3 are implemented.

Citation Information

Patent Citations

  • Knowledge graph fusion method based on short text similarity calculation

    CN110472061A

  • Knowledge representation learning method and device, equipment and storage medium

    CN111475658A