CN113704495A - Entity alignment method and device, electronic equipment and storage medium - Google Patents

Entity alignment method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113704495A
CN113704495A CN202111006095.4A CN202111006095A CN113704495A CN 113704495 A CN113704495 A CN 113704495A CN 202111006095 A CN202111006095 A CN 202111006095A CN 113704495 A CN113704495 A CN 113704495A
Authority
CN
China
Prior art keywords
entity
neighbor
target
information
entities
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111006095.4A
Other languages
Chinese (zh)
Other versions
CN113704495B (en
Inventor
李直旭
马桂林
邓宸博
陈嘉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hefei Intelligent Voice Innovation Development Co ltd
Iflytek Suzhou Technology Co Ltd
Original Assignee
Hefei Intelligent Voice Innovation Development Co ltd
Iflytek Suzhou Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hefei Intelligent Voice Innovation Development Co ltd, Iflytek Suzhou Technology Co Ltd filed Critical Hefei Intelligent Voice Innovation Development Co ltd
Priority to CN202111006095.4A priority Critical patent/CN113704495B/en
Publication of CN113704495A publication Critical patent/CN113704495A/en
Application granted granted Critical
Publication of CN113704495B publication Critical patent/CN113704495B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/36Creation of semantic tools, e.g. ontology or thesauri
    • G06F16/367Ontology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/25Fusion techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • G06F40/295Named entity recognition

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Animal Behavior & Ethology (AREA)
  • Databases & Information Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides an entity alignment method, an entity alignment device, electronic equipment and a storage medium, wherein the method comprises the following steps: determining two target entities to be aligned; determining neighbor difference information of two target entities, wherein the neighbor difference information is the difference between the neighbor information of the corresponding target entity and the neighbor information of the other target entity; determining an entity alignment result between two target entities based on neighbor difference information and entity information of the two target entities. The method utilizes the neighbor difference information to make up short-term neighbor difference caused by the heterogeneity of the knowledge graph, and weakens the interference of the short-term neighbor difference on the entity representation of the two target entities, thereby determining the entity alignment result between the two target entities and improving the accuracy of entity alignment.

Description

Entity alignment method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of natural language processing technologies, and in particular, to an entity alignment method and apparatus, an electronic device, and a storage medium.
Background
The development of natural language processing technology enables knowledge maps to be completely open in the fields of information search, intelligent question-answering and recommendation systems and the like. For the upstream tasks such as question and answer searching and the like, the knowledge quantity covered by the knowledge graph is the premise of high accuracy, and the number and the types of the knowledge graph are more and more complicated as time goes on. Therefore, it is necessary to align entities from different knowledge maps, and to merge multiple knowledge maps to implement knowledge sharing in different scenes and fields.
However, in the current entity alignment methods, an entity and its corresponding entity in different maps have similar neighborhood structures as a premise, and the knowledge maps in real scenes mostly have incompleteness and heterogeneity, so that the neighborhood difference caused by the incompleteness affects the accuracy of entity alignment.
Disclosure of Invention
The invention provides an entity alignment method, an entity alignment device, electronic equipment and a storage medium, which are used for overcoming the defect of poor accuracy in the prior art.
The invention provides an entity alignment method, which comprises the following steps:
determining two target entities to be aligned;
determining neighbor difference information of the two target entities, wherein the neighbor difference information is the difference between the neighbor information of the corresponding target entity and the neighbor information of the other target entity;
and determining an entity alignment result between the two target entities based on the neighbor difference information and the entity information of the two target entities.
According to an entity alignment method provided by the present invention, the determining neighbor difference information of the two target entities includes:
and matching the entity information of each neighbor entity in the neighbor information of the two target entities to obtain neighbor difference information of the two target entities, wherein the neighbor difference information of any target entity comprises the difference between each neighbor entity of any target entity and each neighbor entity of the other target entity.
According to an entity alignment method provided by the present invention, the matching entity information of each neighbor entity in the neighbor information of the two target entities to obtain neighbor difference information between the two target entities includes:
matching entity information of each neighbor entity in the neighbor information of the two target entities to obtain matching degrees between each neighbor entity of any target entity and each neighbor entity of the other target entity;
fusing entity information of each neighbor entity of another target entity based on matching degrees between any neighbor entity of any target entity and each neighbor entity of another target entity to obtain neighbor fusion information of any neighbor entity of any target entity;
and determining the difference between the entity information of each neighbor entity of any target entity and the corresponding neighbor fusion information as the neighbor difference information of any target entity.
According to an entity alignment method provided by the present invention, determining an entity alignment result between two target entities based on neighbor difference information and entity information of the two target entities comprises:
determining neighbor representations of respective neighbor entities of any one target entity based on differences between the respective neighbor entities of the any one target entity and respective neighbor entities of another target entity, and entity information of the respective neighbor entities of the any one target entity;
fusing entity information of any target entity with neighbor representations of all neighbor entities of the target entity to obtain entity structure information of the target entity;
and determining an entity alignment result between the two target entities based on the entity structure information of the two target entities.
According to an entity alignment method provided by the present invention, the merging the entity information of any target entity with the neighbor representations of its respective neighbor entities to obtain the entity structure information of any target entity includes:
based on the correlation degree between the neighbor entities with different orders of any target entity and any target entity, respectively fusing the neighbor representations of the neighbor entities with different orders to obtain the same-order fusion results corresponding to different orders;
and fusing the same-order fusion results corresponding to the different orders with the entity information of any target entity to obtain the entity structure information of any target entity.
According to the entity alignment method provided by the invention, the correlation degree between the neighbor entity of any order and any target entity is obtained by performing attention transformation on the neighbor representation of the neighbor entity of any order and the entity information of any target entity;
wherein, the attention transformation parameters adopted by the neighbor entities with different orders in the process of attention transformation are different.
According to an entity alignment method provided by the present invention, determining an entity alignment result between two target entities based on neighbor difference information and entity information of the two target entities comprises:
determining an entity alignment result between the two target entities based on neighbor difference information, entity information of the two target entities and entity attribute information of the two target entities;
the entity attribute information of any target entity is determined based on the importance degree of each attribute of any target entity.
According to the entity alignment method provided by the invention, the entity attribute information of any target entity is determined based on the following steps:
determining the importance degree of each attribute based on the correlation among the attributes of any target entity;
and based on the importance degree of each attribute, fusing attribute name information corresponding to each attribute and attribute value information corresponding to each attribute to obtain entity attribute information of any target entity.
The present invention also provides an entity alignment apparatus, comprising:
the alignment target entity determining unit is used for determining two target entities to be aligned;
a neighbor difference obtaining unit, configured to determine neighbor difference information of the two target entities, where the neighbor difference information is a difference between neighbor information of a corresponding target entity and neighbor information of another target entity;
and the entity alignment unit is used for determining an entity alignment result between the two target entities based on the neighbor difference information and the entity information of the two target entities.
The present invention also provides an electronic device, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any of the entity alignment methods described above when executing the computer program.
The invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the entity alignment method as described in any one of the above.
According to the entity alignment method, the entity alignment device, the electronic equipment and the storage medium, the neighbor difference information of the two target entities is determined to reflect the short-term neighbor difference brought by the isomerism of the knowledge graph, the entity representations corresponding to the two target entities are generated based on the neighbor difference information and the entity information of the two target entities, the short-term neighbor difference brought by the isomerism of the knowledge graph is made up by using the neighbor difference information, the interference brought to the entity representations of the two target entities by the short-term neighbor difference is weakened, the entity alignment result between the two target entities is determined, and the accuracy of entity alignment is improved.
Drawings
In order to more clearly illustrate the technical solutions of the present invention or the prior art, the drawings needed for the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
FIG. 1 is a schematic flow chart of a method for entity alignment according to the present invention;
fig. 2 is a schematic flow chart of a method for determining neighbor difference information according to the present invention;
fig. 3 is a schematic flow chart of the method for determining the entity alignment result according to the present invention;
FIG. 4 is a schematic diagram of a stable matching method provided by the present invention;
FIG. 5 is a flowchart illustrating a neighbor entity fusion method according to the present invention;
FIG. 6 is a diagram illustrating an entity alignment method based on structure information and attribute information according to the present invention;
FIG. 7 is a schematic structural diagram of a physical alignment apparatus provided in the present invention;
fig. 8 is a schematic structural diagram of an electronic device provided in the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
With the lapse of time, the number of knowledge maps is more and more, and the variety is more and more tedious. Therefore, it is necessary to align entities from different knowledge maps, fuse a plurality of knowledge maps, and implement knowledge sharing in different scenes and fields, so as to improve accuracy of upstream tasks such as question and answer search.
Current entity alignment methods are generally based on an important assumption: entities have similar neighborhood structures to their counterparts in different maps, so that entity alignment can be performed based on structural information of the entities. However, since different knowledge-maps typically have different construction modes and data preferences, entities that point to the same object in the real world typically have different neighborhood structures. When generating the entity representation based on the neighborhood structure, the different neighborhood structures may introduce differences to the entity representation of the entity pointing to the same real object, which is hereinafter referred to as short-term neighbor differences. This short term neighbor difference can reduce the entity representation similarity of entities pointing to the same object, so that the accuracy of the above entity alignment method is reduced.
In view of the above, the embodiment of the present invention provides an entity alignment method. Fig. 1 is a schematic flowchart of an entity alignment method according to an embodiment of the present invention, as shown in fig. 1, the method includes:
step 110, two target entities to be aligned are determined.
In particular, the two target entities that need to be entity aligned come from different knowledge-graphs. Here, in order to perform entity alignment between a certain knowledge graph and another knowledge graph, one optional target entity in the two knowledge graphs may be used as a target entity pair to be aligned, or after one target entity in one knowledge graph is selected, a target entity with higher similarity (which may be determined by using a similarity calculation method between entity representations) to the target entity is screened from the other knowledge graph to perform entity alignment. It should be noted that, when there are a plurality of target entities to be aligned, two-by-two alignment may be performed when actually performing entity alignment.
The knowledge graph can be extracted from various encyclopedic webpage texts and unstructured texts, entities in the knowledge graph can be key information in the various texts, for example, in a medical knowledge graph, the entities can be key information recorded in medical literature, such as medicines, treatment means, diseases and the like, and in an agricultural knowledge graph, the entities can be key information in an agricultural knowledge text, such as crops, diseases, pesticides and the like.
Step 120, determining neighbor difference information of two target entities, where the neighbor difference information is a difference between neighbor information of a corresponding target entity and neighbor information of another target entity.
In particular, since different knowledge-graph data sources are different and often have different construction modes and data preferences, entities that point to the same object in the real world often have different neighborhood structures and consequently short-term neighbor differences. In order to avoid the reduction of the entity alignment accuracy caused by short-term neighbor difference, the neighbor difference information of two target entities can be determined based on the neighbor information of the two target entities to be aligned. The neighbor information of the target entity includes entity information of neighbor entities of the target entity and relationships between the neighbor entities and the target entity, and the neighbor entities may be one-hop neighbors or multi-hop neighbors. The entity information may include semantic information of the corresponding entity itself, and may also include semantic information of neighbor entities of the corresponding entity. The neighbor difference information is a difference between neighbor information of a corresponding target entity and neighbor information of another target entity, and includes a difference between neighbor entities of the two target entities and may also include a difference between adjacent relations between the two target entities and the neighbor entities thereof. Therefore, the neighbor difference information of each target entity can reflect short-term neighbor differences brought by the heterogeneity of the knowledge graph.
Step 130, determining an entity alignment result between the two target entities based on the neighbor difference information and the entity information of the two target entities.
Specifically, according to the neighbor difference information and the entity information of the two target entities, entity representations corresponding to the two target entities can be generated, and then the two target entities are matched, so that an entity alignment result between the two target entities can be determined. The entity alignment result may represent whether the two target entities point to the same real object. Here, short-term neighbor differences caused by the heterogeneity of the knowledge graph may cause certain interference to the entity information of each target entity, and even if there may be a large difference between the entity information of target entities pointing to the same real object, if entity alignment is performed using the entity information as an entity representation, accuracy of the entity alignment may be reduced. Therefore, the embodiment of the invention combines the neighbor difference information of the target entity on the basis of the entity information of the target entity, thereby forming the entity representation of the target entity, and utilizes the neighbor difference information to make up the short-term neighbor difference caused by the heterogeneity of the knowledge graph. For target entities pointing to the same real object, the method can reduce interference brought by short-term neighbor differences to entity representations of the target entities, and is favorable for improving the accuracy of entity alignment.
According to the method provided by the embodiment of the invention, the neighbor difference information of the two target entities is determined to reflect the short-term neighbor difference caused by the isomerism of the knowledge graph, the entity representations corresponding to the two target entities are generated based on the neighbor difference information and the entity information of the two target entities, the short-term neighbor difference caused by the isomerism of the knowledge graph is made up by using the neighbor difference information, the interference caused by the short-term neighbor difference to the entity representations of the two target entities is weakened, the entity alignment result between the two target entities is determined, and the entity alignment accuracy is improved.
Based on the above embodiment, step 120 includes:
and matching the entity information of each neighbor entity in the neighbor information of the two target entities to obtain neighbor difference information of the two target entities, wherein the neighbor difference information of any target entity comprises the difference between each neighbor entity of the target entity and each neighbor entity of the other target entity.
Specifically, when determining the neighbor difference information of any target entity, each neighbor entity of the target entity may be matched with each neighbor entity of another target entity, and the difference between each neighbor entity of the target entity and each neighbor entity of another target entity is calculated according to the matching result, so as to obtain the neighbor difference information of the target entity. Specifically, when the neighbor entities of two target entities are matched, the entity information of the corresponding neighbor entities may be matched. Here, the neighbor subgraphs of each target entity can be obtained from the corresponding knowledge graph, and the matching of the neighbor entities of each target entity is realized by using a graph matching mode. The neighbor subgraph may include a target entity, neighbor entities of the target entity, and relationships between the target entity and its neighbor entities. In order to improve matching efficiency, the neighbor subgraph can be composed of a target entity, one-hop neighbor entities and two-hop neighbor entities.
Based on any of the above embodiments, fig. 2 is a schematic flow chart of the method for determining neighbor difference information according to the embodiment of the present invention, and as shown in fig. 2, matching entity information of each neighbor entity in neighbor information of two target entities to obtain neighbor difference information between the two target entities includes:
step 121, matching entity information of each neighbor entity in neighbor information of two target entities to obtain matching degrees between each neighbor entity of any target entity and each neighbor entity of another target entity;
step 122, based on the matching degree between any neighbor entity of any target entity and each neighbor entity of another target entity, fusing the entity information of each neighbor entity of another target entity to obtain neighbor fusion information of the neighbor entity of the target entity;
step 123, determining the difference between the entity information of each neighbor entity of the target entity and the corresponding neighbor fusion information as the neighbor difference information of the target entity.
Specifically, the entity information of each neighbor entity in the neighbor information of two target entities is subjected to cross-map matching, so that the matching degree between each neighbor entity of any target entity and each neighbor entity of another target entity is obtained. The similarity between the entity information corresponding to the neighbor entities can be calculated and used as the matching degree of the two entities, and the similarity can also be normalized and used as the matching degree of the two entities. Assume that two target entities are
Figure BDA0003237254900000091
Is a target entity
Figure BDA0003237254900000092
The set of neighboring entities of (a),
Figure BDA0003237254900000093
is a target entity
Figure BDA0003237254900000094
Set of neighbour entities of
Figure BDA0003237254900000095
And
Figure BDA0003237254900000096
the entity information of n and m can be matched as follows:
Figure BDA0003237254900000097
wherein h isnAnd hmEntity information for neighbor entities n and m, an→mIs the degree of match between the neighboring entities n and m.
And taking the matching degree between any neighbor entity of any target entity and each neighbor entity of another target entity as a weight, and performing weighted fusion on the entity information of each neighbor entity of another target entity to obtain neighbor fusion information of the neighbor entity of the target entity. And then, calculating the difference between the entity information of each neighbor entity of the target entity and the corresponding neighbor fusion information as the neighbor difference information of the target entity. For example, the difference between the entity information of each neighbor entity of the target entity and the corresponding neighbor fusion information may be calculated as follows:
Figure BDA0003237254900000098
wherein,
Figure BDA0003237254900000099
is neighbor fusion information of neighbor entity n, munThe difference of the fusion information of the neighbor entity n and the corresponding neighbor is obtained. Mu.snCaptures the neighbor entity n and the target entity
Figure BDA00032372549000000910
The smaller the difference, the more the vector will tend to be a zero vector. And the difference between all the neighbor entities of any target entity and the corresponding neighbor fusion information thereof forms the neighbor difference information of the target entity.
Based on any of the above embodiments, fig. 3 is a schematic flowchart of a method for determining an entity alignment result according to an embodiment of the present invention, as shown in fig. 3, step 130 includes:
131, determining neighbor representation of each neighbor entity of any target entity based on differences between each neighbor entity of the target entity and each neighbor entity of another target entity and entity information of each neighbor entity of the target entity;
step 132, fusing the entity information of any target entity with the neighbor representations of the neighbor entities to obtain the entity structure information of the target entity;
step 133, determining an entity alignment result between the two target entities based on the entity structure information of the two target entities.
Specifically, the difference between each neighboring entity of any target entity and each neighboring entity of another target entity is fused with the entity information of each neighboring entity of the target entity respectively, so as to obtain the neighboring representation of each neighboring entity of the target entity. For example, in obtaining a target entity
Figure BDA0003237254900000101
Neighbor entity n and target entity
Figure BDA0003237254900000102
Is different mu between the respective neighbour entities ofnThen, mu can benEntity information h with the neighbor entity nnAnd fusing to obtain the neighbor representation of the neighbor entity n. Here, inspired by the hopping connection in neural networks, a gating mechanism can also be employed to fuse μnAnd hn
hn′=gate(hn)·μn+(1-gate(hn))·hn
Wherein h isn′For the neighbor representation of the neighbor entity n, gate () is the gating mechanism.
And then, fusing the entity information of any target entity with the neighbor representations of all the neighbor entities to obtain the entity structure information of the target entity. The entity structure information of the target entity includes entity information of the target entity, entity information of a neighbor entity of the target entity, and difference information between the neighbor entity of the target entity and a neighbor entity of another target entity.
And matching the entity structure information of the two target entities to obtain the structure matching degree of the two target entities, and determining an entity alignment result between the two target entities according to the structure matching degree. Here, the entity alignment result between the two target entities, that is, the single entity alignment, may be determined only according to the structure matching degrees of the two target entities; and the method can also realize batch entity alignment by utilizing a stable matching mode in combination with the structural matching degree among other target entities to be aligned in the knowledge graph.
Based on any of the above embodiments, when generating the entity alignment result, it is a common practice to take the target entity with the highest matching degree in another knowledge graph as the alignment entity of the target entity based on the matching result between any target entity in any knowledge graph and all target entities in another knowledge graph. However, this approach does not recognize that there are conflicts in the alignment entities, and each pair of alignment entities is treated independently, rendering the results of the entity alignments inaccurate. As shown on the left side of fig. 4, when two target entities
Figure BDA0003237254900000111
And
Figure BDA0003237254900000112
simultaneously with
Figure BDA0003237254900000113
When the matching degree of (2) is highest, upperThe above-mentioned manner will generate
Figure BDA0003237254900000114
And
Figure BDA0003237254900000115
these two pairs align the entities.
Therefore, the alignment of all target entities is modeled as a Stable Matching Problem (SMP) in consideration of the interdependencies between different aligned entity pairs, with the idea of global optimization. Specifically, for any two sets M and W of the same size, where any one element has a preference list for all element selections in the other set, stable matching proves that a set of bi-directional mappings can be found, such that no pair of mappings can find a more suitable match than the currently matching element.
For the entity alignment task, the preference lists in the stable matching can be obtained by arranging the matching degrees (such as the structure matching degree in the above or the attribute matching degree in the below) between the target entities in a descending order, as shown in the left side of fig. 4,
Figure BDA0003237254900000116
the preference lists for three target entities in another knowledge graph are
Figure BDA0003237254900000117
If the first element in its selection preference list is left aligned, it will be aligned with
Figure BDA0003237254900000118
The alignment results of (2) conflict. To generate non-conflicting pairs of stable aligned entities, a delayed acceptance algorithm in a stable matching manner may be applied. The idea of the algorithm under the alignment scene is as follows:
(1) knowledge-graph KG1Each target entity in
Figure BDA0003237254900000119
According to its preferenceList to KG2The target entity that is most likely to align sends an alignment request.
(2)KG2Entity in which an alignment request is received
Figure BDA00032372549000001110
Sorting the received alignment requests, selecting the most front target entity in the preference list thereof to send back an alignment success signal, if not, sending a failure signal, which is the end of one-pair alignment, as shown in the left side of fig. 4, thereby obtaining partial alignment entity pairs
Figure BDA00032372549000001111
And
Figure BDA00032372549000001112
(3) at each subsequent turn, KG1The target entity which is not successfully paired continues to move towards KG according to the preference list2The target entity in (2) sends an alignment request, but this time cannot send the best preference, but selects the target entity in the corresponding position in the preference list, as shown in the middle of figure 4,
Figure BDA0003237254900000121
target entity to which second preference is given
Figure BDA0003237254900000122
Sends an alignment request to
Figure BDA0003237254900000123
Albeit by
Figure BDA0003237254900000124
The choices are matched, but it has the opportunity to change the choices in this round according to its own preferences, choosing the ones that are more likely to be paired and to which to send alignment requests in this round
Figure BDA0003237254900000125
Thereby replacing the aligned entity pair
Figure BDA0003237254900000126
Is composed of
Figure BDA0003237254900000127
(4) Repeating the previous step until KG1Without a target entity being misaligned.
After the matching degree of each target entity pair to be aligned in different knowledge maps is obtained, the delay acceptance algorithm can be applied to realize batch entity alignment.
Based on any of the above embodiments, fig. 5 is a schematic flow chart of a neighbor entity fusion method provided by the embodiment of the present invention, as shown in fig. 5, step 132 includes:
step 1321, based on the correlation degree between the neighboring entities with different orders of any target entity and the target entity, respectively fusing the neighboring representations of the neighboring entities with different orders to obtain the same-order fusion results corresponding to different orders;
step 1322, fusing the same-order fusion result corresponding to different orders with the entity information of the target entity to obtain the entity structure information of the target entity.
Specifically, the correlation degree between each neighbor entity of any target entity and the target entity is different, for example, generally, the correlation degree between a one-hop neighbor and the target entity is higher than that between a two-hop neighbor and the target entity, and the information difference between the two-hop entities is larger than that between the two-hop entities, so that the contributions of the neighbor entities with different orders are different when determining the entity structure information of the target entity. However, simply aggregating one-hop neighbor information and then propagating two-hop and more distant neighbor information via GCN (Graph Convolutional Network) is not desirable, because it not only can not capture the difference information between the physical one-hop and two-hop neighbors, but also introduces a lot of noise when propagating. In addition, all the neighbor entities are fused without distinction to generate the entity structure information of the target entity, so that the semantic information of the neighbor entities (such as one-hop neighbors) with higher order of correlation degree can be weakened, and the semantic expression capability of the entity structure information is reduced.
Therefore, the neighbor entities of different orders of the target entity may be processed separately to distinguish different contribution degrees of the neighbor entities of different orders when generating the entity structure information of the target entity. The correlation degree between the neighboring entities with different orders of any target entity and the target entity can be determined, and accordingly, the neighbors of the neighboring entities with the same order are represented and fused, and the same-order fusion result corresponding to the order is obtained. And then fusing the same-order fusion results with different orders with the entity information of the target entity to obtain the entity structure information of the target entity.
For example, the degree of correlation between all one-hop neighbor entities of any target entity and the target entity, and the degree of correlation between all two-hop neighbor entities and the target entity, may be determined. And taking the correlation degree between all the one-hop neighbor entities and the target entity as a weight, and performing weighted fusion on the neighbor representations of all the one-hop neighbor entities to obtain a same-order fusion result corresponding to one order. Similarly, taking the correlation degree between all the two-hop neighbor entities and the target entity as the weight, and performing weighted fusion on the neighbor representations of all the two-hop neighbor entities to obtain a second-order corresponding same-order fusion result. And then fusing the same-order fusion result corresponding to the first order, the same-order fusion result corresponding to the second order and the entity information of the target entity to obtain the entity structure information of the target entity.
For the sake of clarity, let
Figure BDA0003237254900000131
Is a target entity eiThe set of one-hop neighbor entities of (a),
Figure BDA0003237254900000132
is its set of two-hop neighbor entities. The neighbor representations of the neighbor entities of different orders may be fused separately as follows:
Figure BDA0003237254900000133
wherein j is a one-hop neighbor entity of the target entity i, hjFor the neighbor representation of the neighbor entity,
Figure BDA0003237254900000134
as to the degree of correlation between the neighboring entity and the target entity,
Figure BDA0003237254900000135
is a weight matrix, σ is an activation function, hi,1Is the result of the same-order fusion corresponding to the first order.
Figure BDA0003237254900000136
Wherein j is a two-hop neighbor entity of the target entity i, hjFor the neighbor representation of the neighbor entity,
Figure BDA0003237254900000137
as to the degree of correlation between the neighboring entity and the target entity,
Figure BDA0003237254900000138
is a weight matrix, σ is an activation function, hi,2Is the result of the second order corresponding to the same order fusion.
And finally, fusing the same-order fusion results corresponding to different orders with the entity information of the target entity, for example, by using a vector splicing mode, to obtain the entity structure information of the target entity. For example, the entity structure information of the target entity can be obtained by fusion in the following way:
h′i=[hi||hi,1||hi,2]
wherein h isiIs entity information of a target entity i, h'iIs the entity structure information of the target entity i.
The method provided by the embodiment of the invention is characterized in that based on the correlation degree between the target entity and the neighbor entities with different orders of any target entity, the neighbor representations of the neighbor entities with different orders are respectively fused to obtain the same-order fusion results corresponding to different orders, and then are fused with the entity information of the target entity to obtain the entity structure information of the target entity.
Based on any embodiment, the correlation degree between the neighbor entity of any order and the target entity is obtained by performing attention transformation on the neighbor representation of the neighbor entity of the order and the entity information of the target entity;
wherein, the attention transformation parameters adopted by the neighbor entities with different orders in the process of attention transformation are different.
Specifically, the correlation degree between the target entity and each of the neighboring entities of the same order is not completely the same, so the correlation degree between the target entity and each of the neighboring entities can be calculated. Specifically, attention transformation may be performed on the entity information of the target entity and the neighbor representation of the neighbor entity of the order through a graph attention mechanism, so as to obtain a degree of correlation between each neighbor entity of the order and the target entity. Because the correlation degrees of the neighbor entities with different orders and the target entity are different, the neighbor entities with different orders need to be treated differently when calculating the correlation degrees, so that the neighbor entities with different orders adopt different attention transformation parameters when performing attention transformation.
For example, the correlation degree between each neighboring entity of any order and the target entity can be calculated as follows:
Figure BDA0003237254900000151
wherein LeakyRelu is an activation function,
Figure BDA0003237254900000152
for a learnable linear transformation matrix, hiIs the entity information of the target entity i,
Figure BDA0003237254900000153
a neighbor representation of an m-hop neighbor entity for target entity i,
Figure BDA0003237254900000154
is the degree of correlation between the m-hop neighbor entity and the target entity i.
In the knowledge graph, each entity has corresponding attribute information. The attribute information of each entity may describe the nature of the entity from multiple angles, such as entity "zhang san" with attributes of "nationality", "gender", and "date of birth", which describe the entity from different angles. Therefore, the attribute information of the target entities to be aligned is used for being beneficial to judging whether the two target entities point to the same real object. However, in the existing scheme of performing entity alignment by using attribute information of an entity, each attribute of the entity is usually treated indiscriminately, and the entity representation obtained on the basis is poor in semantic expression capability due to the introduction of some noise attributes.
In this regard, according to any of the above embodiments, the step 130 includes:
determining an entity alignment result between two target entities based on neighbor difference information, entity information of the two target entities and entity attribute information of the two target entities;
the entity attribute information of any target entity is determined based on the importance of each attribute of the target entity.
Specifically, on the basis of the neighbor difference information and the entity information of each target entity, the entity alignment result between two target entities can be determined by combining the entity attribute information of each target entity. The entity attribute information of any target entity comprises attribute name information and attribute value information of each attribute of the target entity.
A target entity may have multiple attributes, but different attributes may be of different importance to the target entity. For example, to distinguish between two entities of the same name, the attributes of birth date, gender, etc. are more important than the name attribute. Therefore, the entity attribute information of each target entity can be determined according to the importance degree of each attribute relative to the target entity, the attribute with high importance degree is highlighted, and the attribute with low importance degree is weakened, so that the semantic expression capability of the entity attribute information is improved, and the accuracy of entity alignment is further improved.
Specifically, when determining the entity alignment result of two target entities, the method provided in any of the above embodiments may be adopted to determine the first entity alignment result based on the neighbor difference information and the entity information of the two target entities. And meanwhile, determining a second entity alignment result based on the entity attribute information of the two target entities. And then, integrating the first entity alignment result and the second entity alignment result to determine the final entity alignment result of the two target entities. Here, the entity attribute information of the two target entities to be aligned may be matched to obtain an attribute matching degree of the two target entities, and a second entity alignment result between the two target entities may be determined according to the attribute matching degree. Here, the second entity alignment result between the two target entities, that is, the single entity alignment, may be determined only according to the attribute matching degrees of the two target entities; and realizing batch entity alignment by using a stable matching mode by combining the attribute matching degrees between other target entities to be aligned in the knowledge graph to obtain a second entity alignment result between the target entities and the stable entity alignment result.
The method provided by the embodiment of the invention determines the entity attribute information of any target entity based on the importance degree of each attribute of the target entity, and determines the entity alignment result between two target entities based on the neighbor difference information and the entity information of the two target entities and the entity attribute information of the two target entities, thereby highlighting the attribute with high importance degree, improving the semantic expression capability of the entity attribute information and further improving the accuracy of entity alignment.
Based on any of the above embodiments, the entity attribute information of any target entity is determined based on the following steps:
determining the importance degree of each attribute based on the correlation among the attributes of the target entity;
and based on the importance degree of each attribute, fusing attribute name information corresponding to each attribute and attribute value information corresponding to each attribute to obtain entity attribute information of the target entity.
Specifically, the correlation between the attributes of any target entity is calculated. For any target entity, attribute name information of a plurality of attributes of the target entity can be acquired, and the correlation among the attribute name information of the plurality of attributes is determined as the correlation among the attributes. Specifically, the correlation between attribute name information of a plurality of attributes may be obtained by an attention mechanism, and the degree of importance of each attribute may be calculated. For example, the importance of each attribute may be calculated as follows:
αi=softmax(aTWaai)
wherein, aiAttribute name information of i-th attribute of the target entity, a ═ a1,a2,…,ap) A vector formed by attribute name information of all attributes of the target entity, p is the number of attributes of the target entity, WaFor the learnable attribute weight matrix, αiIs the importance of the ith attribute.
In view of the one-to-one correspondence between the attribute names and the attribute values, the importance degree of each attribute learned from the attribute name information can be shared with the attribute value information, and the attribute name information corresponding to each attribute and the attribute value information corresponding to each attribute are fused according to the importance degree of each attribute to obtain the entity attribute information of the target entity. Weighting and fusing attribute name information of all attributes according to the importance degree of each attribute to obtain attribute name fusion representation; and performing weighted fusion on the attribute value information of all the attributes according to the importance degree of each attribute to obtain attribute value fusion representation. And then, fusing the attribute name fusion representation and the attribute value fusion representation to obtain the entity attribute information of the target entity. For example, the entity attribute information of the target entity may be determined as follows:
Figure BDA0003237254900000171
Figure BDA0003237254900000172
ha=[a′||v′]
wherein a 'and v' are attribute name fusion representation and attribute value fusion representation, haEntity attribute information for the target entity, viAttribute value information of the ith attribute.
Here, for any attribute value of the target entity, if the participle corresponding to the attribute value exists in the dictionary, the attribute value information of the attribute value may be determined using a BERT (Bidirectional Encoder representation from converters) model trained based on the dictionary:
vn=BERT(wn)
wherein, wnAnd the word segmentation is the word segmentation corresponding to the attribute value of the nth attribute.
If the participle corresponding to the attribute value is not in the dictionary, the participle can be divided into characters, the character representation of each character is obtained by using a BERT model, and then the character representation of each character is synthesized into corresponding attribute value information based on an N-gram function. For example, the attribute value information may be synthesized using the following formula:
Figure BDA0003237254900000181
wherein N represents the maximum value of N used in the N-gram combination function, m is the character length of the word segmentation corresponding to the attribute value,
Figure BDA0003237254900000183
is the jth character.
Based on any of the above embodiments, fig. 6 is a schematic diagram of an entity alignment method based on structure information and attribute information according to an embodiment of the present invention, as shown in fig. 6, the method includes two branch tasks: and realizing entity alignment by using the entity structure information of the target entity, and realizing entity alignment by using the entity attribute information of the target entity.
Specifically, taking two knowledge maps to be aligned as an example, two target entities from different knowledge maps may be combined to obtain a plurality of target entity pairs to be aligned.
Since the entity structure information and the entity attribute information are independent from each other, and the emphasis of each entity on these two types of information is also different, as shown in fig. 6, an entity structure information learning model and an entity attribute information learning model are respectively constructed, the entity structure information determination process given in the above embodiment is executed by using the entity structure information learning model, and the entity attribute information determination process given in the above embodiment is executed by using the entity attribute information learning model, which is not described herein again. The two models are obtained by respective independent training, and the loss function of the entity structure information learning model during training can be as follows:
Figure BDA0003237254900000182
wherein,
Figure BDA0003237254900000194
and
Figure BDA0003237254900000195
are respectively target entities
Figure BDA0003237254900000191
And
Figure BDA0003237254900000192
the entity structure information of (1), represents the L2 paradigm, | represents the distance between two entity structure information, A |, dt () represents the distance between two entity structure information+Representing aligned pairs of entities, ARepresenting unaligned pairs of entities,[·]+=max(0,x),λsAnd α is a hyperparameter. By minimizing the above loss, the entity structure information of aligned entities can be made to approach as quickly as possible, while the entity structure information of non-aligned entities is made to be as far apart as possible.
The loss function of the entity attribute information learning model during training can be as follows:
Figure BDA0003237254900000193
wherein λ isaIs a hyper-parameter.
For any target entity pair to be aligned, the structure matching degree of the target entity pair can be determined based on the entity structure information of each target entity, and the attribute matching degree of the target entity pair can be determined based on the entity attribute information of each target entity. Based on the structure matching degrees of a plurality of target entity pairs to be aligned, a first entity alignment result of two knowledge maps can be obtained by using a stable matching method (SMP); based on the attribute matching degrees of the target entity pairs to be aligned, a second entity alignment result of the two knowledge graphs can be obtained by using a stable matching method (SMP). And (4) taking intersection of the first entity alignment result and the second entity alignment result to obtain a final entity alignment result of the two knowledge graphs.
The entity structure information learning model needs to use entity information of any target entity or its neighboring entities (hereinafter, referred to as entities) when determining the entity structure information of the target entity, as described in the above embodiments. Here, in order to improve the semantic expression capability of the entity information, when determining the entity information of any entity, a long-term dependency relationship of the entity may be established. Specifically, the entity information of any entity may be determined as follows:
performing sequence sampling on two knowledge maps to be aligned by using a degree-sensing-based random walk algorithm to generate a heterogeneous sequence in which entity nodes and relationship nodes appear alternately;
and performing sequence learning on the heterogeneous sequence, and obtaining entity information of each entity based on the positions of the entity nodes and the relation nodes in the heterogeneous sequence and the correlation between the relation nodes and the entity nodes.
The random walk algorithm based on degree perception is shown in table 1:
TABLE 1
Figure BDA0003237254900000201
And fusing the plurality of knowledge maps by using preset pre-aligned seeds to obtain a combined knowledge map. In the combined knowledge graph, all relation triples with a tail entity of a relation triple as a head entity are used as candidate triples of the relation triple, and a candidate triple set is constructed. And calculating the transition probability of each candidate triple according to the degree perception deviation of each candidate triple relative to other candidate triples in the candidate triple set, and selecting the candidate triple with the maximum transition probability as an additional triple to be added into the heterogeneous sequence. And determining the supplementary triple of the new relation triple by taking the supplementary triple as the new relation triple until the heterogeneous sequence reaches the preset length.
For any heterogeneous sequence, sequence learning can be carried out by utilizing an embedding layer, a self-attention module and a prediction layer of an entity structure information learning model according to the following modes:
1) embedding layer: because there are two types of nodes (entities and relations) in the input heterogeneous sequence, two kinds of embedded matrices are generated, denoted as E and R, where E includes the initial vector representation of each entity and R includes the initial vector representation of each relation. Meanwhile, since a subsequently adopted self-attention mechanism is insensitive to position information, a position matrix P containing position vectors of all nodes is generated. And adding the initial vector representation of each entity node and each relation node in the sequence to the corresponding position vector to obtain the embedded representation of each entity node and each relation node.
2) Self-attention module-this module is made up of a self-attention layer and a feed-forward layer, more complex features can be learned by stacking multiple self-attention modules. The self-attention layer is realized through a multi-head attention mechanism, and in consideration of the uniqueness of a triple structure, different from the residual connection in the traditional attention mechanism, the self-attention layer is replaced by cross residual connection, namely when the input current node is a relationship node, the embedded representation of an entity node before the relationship node is added with the representation learned by the relationship node in the self-attention mechanism to serve as the relationship representation output of the relationship node; when the current node of the input is the entity node, the representation learned by the entity node in the self-attention mechanism is taken as the entity representation output of the entity. By the method, long-term dependency among the entities is considered, the structural characteristics of the triples are considered, and the importance of the head entities is highlighted through the cross residual connection.
The feedforward layer is composed of two fully-connected layers, and the nonlinear capability of the model is given, so that the representations with different dimensions can be interacted, and better vector representation can be obtained; finally, in order to prevent overfitting and instability of training, regularization and dropout strategies are added in both layers.
And finally, the entity representation of the entity node output from the attention module can be used as the entity information of the entity and applied to the subsequent step of determining the entity structure information.
3) Prediction layer: based on the entity information of the entity nodes output from the attention module and the relationship representation of the relationship nodes, the long-term dependency relationship between the entities can be learned by adopting the prediction loss so as to improve the semantic expression capability of the entity information of the entity nodes. The predicted loss may consist of an entity predicted loss and a relationship predicted loss:
Figure BDA0003237254900000211
wherein p iseAnd neRespectively representing the number of positive and negative instances of the entity in the sequence,
Figure BDA0003237254900000213
representsThe entity information of the entity is transmitted to the user,
Figure BDA0003237254900000212
is a label thereof; p is a radical ofrAnd nrRespectively represent the number of positive examples and negative examples of the relation in the sequence,
Figure BDA0003237254900000221
a relational representation that represents a relationship is provided,
Figure BDA0003237254900000222
is its label.
It should be noted that after the entity structure information learning model is trained, the prediction layer does not participate in the determination of the entity structure information any more.
Based on any of the above embodiments, fig. 7 is a schematic structural diagram of an entity alignment apparatus provided in an embodiment of the present invention, as shown in fig. 7, the apparatus includes: an entity to be aligned determining unit 710, a neighbor difference obtaining unit 720 and an entity aligning unit 730.
The entity to be aligned determining unit 710 is configured to determine two target entities to be aligned;
the neighbor difference obtaining unit 720 is configured to determine neighbor difference information of two target entities, where the neighbor difference information is a difference between neighbor information of a corresponding target entity and neighbor information of another target entity;
the entity alignment unit 730 is configured to determine an entity alignment result between two target entities based on the neighbor difference information and the entity information of the two target entities.
The device provided by the embodiment of the invention reflects the short-term neighbor difference brought by the isomerism of the knowledge graph by determining the neighbor difference information of the two target entities, generates the entity representations corresponding to the two target entities based on the neighbor difference information and the entity information of the two target entities, compensates the short-term neighbor difference brought by the isomerism of the knowledge graph by using the neighbor difference information, weakens the interference brought to the entity representations of the two target entities by the short-term neighbor difference, thereby determining the entity alignment result between the two target entities and improving the accuracy of entity alignment.
Based on any of the above embodiments, the neighbor difference obtaining unit 720 is configured to:
and matching the entity information of each neighbor entity in the neighbor information of the two target entities to obtain neighbor difference information of the two target entities, wherein the neighbor difference information of any target entity comprises the difference between each neighbor entity of the target entity and each neighbor entity of the other target entity.
Based on any of the above embodiments, matching the entity information of each neighbor entity in the neighbor information of two target entities to obtain neighbor difference information between the two target entities includes:
matching entity information of each neighbor entity in neighbor information of two target entities to obtain matching degree between each neighbor entity of any target entity and each neighbor entity of another target entity;
based on the matching degree between any neighbor entity of any target entity and each neighbor entity of another target entity, fusing the entity information of each neighbor entity of another target entity to obtain neighbor fusion information of the neighbor entity of the target entity;
and determining the difference between the entity information of each neighbor entity of the target entity and the corresponding neighbor fusion information as the neighbor difference information of the target entity.
Based on any of the above embodiments, the entity alignment unit 730 is configured to:
determining neighbor representations of respective neighbor entities of any one target entity based on differences between the respective neighbor entities of the target entity and respective neighbor entities of another target entity, and entity information of the respective neighbor entities of the target entity;
fusing the entity information of any target entity with the neighbor representations of all neighbor entities to obtain the entity structure information of the target entity;
and determining an entity alignment result between the two target entities based on the entity structure information of the two target entities.
Based on any of the above embodiments, fusing the entity information of any target entity with the neighbor representations of its respective neighbor entities to obtain the entity structure information of the target entity, including:
based on the correlation degree between the neighbor entities with different orders of any target entity and the target entity, respectively fusing the neighbor representations of the neighbor entities with different orders to obtain the same-order fusion results corresponding to different orders;
and fusing the same-order fusion results corresponding to different orders with the entity information of the target entity to obtain the entity structure information of the target entity.
The device provided by the embodiment of the invention respectively fuses the neighbor representations of the neighbor entities with different orders based on the correlation degree between the neighbor entities with different orders of any target entity and the target entity to obtain the same-order fusion results corresponding to different orders, and further fuses with the entity information of the target entity to obtain the entity structure information of the target entity.
Based on any embodiment, the correlation degree between the neighbor entity of any order and the target entity is obtained by performing attention transformation on the neighbor representation of the neighbor entity of the order and the entity information of the target entity;
wherein, the attention transformation parameters adopted by the neighbor entities with different orders in the process of attention transformation are different.
Based on any of the above embodiments, the entity alignment unit 730 is configured to:
determining an entity alignment result between two target entities based on neighbor difference information, entity information of the two target entities and entity attribute information of the two target entities;
the entity attribute information of any target entity is determined based on the importance of each attribute of the target entity.
The device provided by the embodiment of the invention determines the entity attribute information of any target entity based on the importance degree of each attribute of the target entity, and determines the entity alignment result between two target entities based on the neighbor difference information and the entity information of the two target entities and the entity attribute information of the two target entities, thereby highlighting the attribute with high importance degree, improving the semantic expression capability of the entity attribute information and further improving the accuracy of entity alignment.
Based on any of the above embodiments, the entity attribute information of any target entity is determined based on the following steps:
determining the importance degree of each attribute based on the correlation among the attributes of the target entity;
and based on the importance degree of each attribute, fusing attribute name information corresponding to each attribute and attribute value information corresponding to each attribute to obtain entity attribute information of the target entity.
Fig. 8 illustrates a physical structure diagram of an electronic device, and as shown in fig. 8, the electronic device may include: a processor (processor)810, a communication Interface 820, a memory 830 and a communication bus 840, wherein the processor 810, the communication Interface 820 and the memory 830 communicate with each other via the communication bus 840. The processor 810 may call logic instructions in the memory 830 to perform an entity alignment method comprising: determining two target entities to be aligned; determining neighbor difference information of two target entities, wherein the neighbor difference information is the difference between the neighbor information of the corresponding target entity and the neighbor information of the other target entity; determining an entity alignment result between two target entities based on neighbor difference information and entity information of the two target entities.
In addition, the logic instructions in the memory 830 may be implemented in software functional units and stored in a computer readable storage medium when the logic instructions are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform the entity alignment method provided by the above methods, the method comprising: determining two target entities to be aligned; determining neighbor difference information of two target entities, wherein the neighbor difference information is the difference between the neighbor information of the corresponding target entity and the neighbor information of the other target entity; determining an entity alignment result between two target entities based on neighbor difference information and entity information of the two target entities.
In yet another aspect, the present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program, which when executed by a processor is implemented to perform the entity alignment methods provided above, the method comprising: determining two target entities to be aligned; determining neighbor difference information of two target entities, wherein the neighbor difference information is the difference between the neighbor information of the corresponding target entity and the neighbor information of the other target entity; determining an entity alignment result between two target entities based on neighbor difference information and entity information of the two target entities.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (11)

1. A method of entity alignment, comprising:
determining two target entities to be aligned;
determining neighbor difference information of the two target entities, wherein the neighbor difference information is the difference between the neighbor information of the corresponding target entity and the neighbor information of the other target entity;
and determining an entity alignment result between the two target entities based on the neighbor difference information and the entity information of the two target entities.
2. The entity alignment method according to claim 1, wherein the determining neighbor difference information of the two target entities comprises:
and matching the entity information of each neighbor entity in the neighbor information of the two target entities to obtain neighbor difference information of the two target entities, wherein the neighbor difference information of any target entity comprises the difference between each neighbor entity of any target entity and each neighbor entity of the other target entity.
3. The entity alignment method according to claim 2, wherein the matching entity information of each neighbor entity in the neighbor information of the two target entities to obtain neighbor difference information between the two target entities comprises:
matching entity information of each neighbor entity in the neighbor information of the two target entities to obtain matching degrees between each neighbor entity of any target entity and each neighbor entity of the other target entity;
fusing entity information of each neighbor entity of another target entity based on matching degrees between any neighbor entity of any target entity and each neighbor entity of another target entity to obtain neighbor fusion information of any neighbor entity of any target entity;
and determining the difference between the entity information of each neighbor entity of any target entity and the corresponding neighbor fusion information as the neighbor difference information of any target entity.
4. The entity alignment method according to claim 2, wherein the determining the entity alignment result between the two target entities based on the neighbor difference information and the entity information of the two target entities comprises:
determining neighbor representations of respective neighbor entities of any one target entity based on differences between the respective neighbor entities of the any one target entity and respective neighbor entities of another target entity, and entity information of the respective neighbor entities of the any one target entity;
fusing entity information of any target entity with neighbor representations of all neighbor entities of the target entity to obtain entity structure information of the target entity;
and determining an entity alignment result between the two target entities based on the entity structure information of the two target entities.
5. The entity alignment method according to claim 4, wherein the fusing the entity information of any target entity with the neighbor representations of its respective neighbor entities to obtain the entity structure information of any target entity comprises:
based on the correlation degree between the neighbor entities with different orders of any target entity and any target entity, respectively fusing the neighbor representations of the neighbor entities with different orders to obtain the same-order fusion results corresponding to different orders;
and fusing the same-order fusion results corresponding to the different orders with the entity information of any target entity to obtain the entity structure information of any target entity.
6. The entity alignment method according to claim 5, wherein the degree of correlation between the neighboring entity of any order and the any target entity is obtained by performing attention transformation on the neighboring representation of the neighboring entity of any order and the entity information of the any target entity;
wherein, the attention transformation parameters adopted by the neighbor entities with different orders in the process of attention transformation are different.
7. The entity alignment method according to any one of claims 1 to 6, wherein the determining the entity alignment result between the two target entities based on the neighbor difference information and the entity information of the two target entities comprises:
determining an entity alignment result between the two target entities based on neighbor difference information, entity information of the two target entities and entity attribute information of the two target entities;
the entity attribute information of any target entity is determined based on the importance degree of each attribute of any target entity.
8. The entity alignment method according to claim 7, wherein the entity attribute information of any target entity is determined based on the following steps:
determining the importance degree of each attribute based on the correlation among the attributes of any target entity;
and based on the importance degree of each attribute, fusing attribute name information corresponding to each attribute and attribute value information corresponding to each attribute to obtain entity attribute information of any target entity.
9. A physical alignment device, comprising:
the alignment target entity determining unit is used for determining two target entities to be aligned;
a neighbor difference obtaining unit, configured to determine neighbor difference information of the two target entities, where the neighbor difference information is a difference between neighbor information of a corresponding target entity and neighbor information of another target entity;
and the entity alignment unit is used for determining an entity alignment result between the two target entities based on the neighbor difference information and the entity information of the two target entities.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executing the program performs the steps of the entity alignment method according to any of claims 1 to 8.
11. A non-transitory computer readable storage medium, having stored thereon a computer program, wherein the computer program, when executed by a processor, implements the steps of the entity alignment method according to any of claims 1 to 8.
CN202111006095.4A 2021-08-30 2021-08-30 Entity alignment method, device, electronic equipment and storage medium Active CN113704495B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111006095.4A CN113704495B (en) 2021-08-30 2021-08-30 Entity alignment method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111006095.4A CN113704495B (en) 2021-08-30 2021-08-30 Entity alignment method, device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113704495A true CN113704495A (en) 2021-11-26
CN113704495B CN113704495B (en) 2024-05-28

Family

ID=78656919

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111006095.4A Active CN113704495B (en) 2021-08-30 2021-08-30 Entity alignment method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113704495B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114265982A (en) * 2021-12-22 2022-04-01 北京中科闻歌科技股份有限公司 Intelligent recommendation method based on knowledge graph
CN114579762A (en) * 2022-03-04 2022-06-03 腾讯科技(深圳)有限公司 Knowledge graph alignment method, device, equipment, storage medium and program product
CN114676261A (en) * 2022-02-15 2022-06-28 南京航空航天大学 Graph convolution network entity alignment method based on multi-information aggregation

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3276551A1 (en) * 2016-07-25 2018-01-31 Fujitsu Limited A method, computer program and system for detecting a discrepancy arising from a mismatch between incoming and outgoing flows of resource
CN110413704A (en) * 2019-06-27 2019-11-05 浙江大学 Entity alignment schemes based on weighting neighbor information coding
CN111046186A (en) * 2019-10-30 2020-04-21 平安科技(深圳)有限公司 Entity alignment method, device and equipment of knowledge graph and storage medium
CN112417159A (en) * 2020-11-02 2021-02-26 武汉大学 Cross-language entity alignment method of context alignment enhanced graph attention network
CN113157935A (en) * 2021-03-16 2021-07-23 中国科学技术大学 Graph neural network model and method for entity alignment based on relationship context
CN113282676A (en) * 2020-02-20 2021-08-20 清华大学 Knowledge base entity alignment method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3276551A1 (en) * 2016-07-25 2018-01-31 Fujitsu Limited A method, computer program and system for detecting a discrepancy arising from a mismatch between incoming and outgoing flows of resource
CN110413704A (en) * 2019-06-27 2019-11-05 浙江大学 Entity alignment schemes based on weighting neighbor information coding
CN111046186A (en) * 2019-10-30 2020-04-21 平安科技(深圳)有限公司 Entity alignment method, device and equipment of knowledge graph and storage medium
CN113282676A (en) * 2020-02-20 2021-08-20 清华大学 Knowledge base entity alignment method and device
CN112417159A (en) * 2020-11-02 2021-02-26 武汉大学 Cross-language entity alignment method of context alignment enhanced graph attention network
CN113157935A (en) * 2021-03-16 2021-07-23 中国科学技术大学 Graph neural network model and method for entity alignment based on relationship context

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
开放知识图谱: "论文浅尝 - ACL2020 | 用于实体对齐的邻居匹配网络", pages 3 - 5, Retrieved from the Internet <URL:https://blog.csdn.net/TgqDT3gGaMdkHasLZv/article/details/112645494> *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114265982A (en) * 2021-12-22 2022-04-01 北京中科闻歌科技股份有限公司 Intelligent recommendation method based on knowledge graph
CN114265982B (en) * 2021-12-22 2022-08-26 北京中科闻歌科技股份有限公司 Intelligent recommendation method based on knowledge graph
CN114676261A (en) * 2022-02-15 2022-06-28 南京航空航天大学 Graph convolution network entity alignment method based on multi-information aggregation
CN114579762A (en) * 2022-03-04 2022-06-03 腾讯科技(深圳)有限公司 Knowledge graph alignment method, device, equipment, storage medium and program product
CN114579762B (en) * 2022-03-04 2024-03-22 腾讯科技(深圳)有限公司 Knowledge graph alignment method, device, equipment, storage medium and program product

Also Published As

Publication number Publication date
CN113704495B (en) 2024-05-28

Similar Documents

Publication Publication Date Title
US11687728B2 (en) Text sentiment analysis method based on multi-level graph pooling
US20220044094A1 (en) Method and apparatus for constructing network structure optimizer, and computer-readable storage medium
CN113704495A (en) Entity alignment method and device, electronic equipment and storage medium
CN109033107B (en) Image retrieval method and apparatus, computer device, and storage medium
US20240233877A1 (en) Method for predicting reactant molecule, training method, apparatus, and electronic device
CN108921657B (en) Knowledge-enhanced memory network-based sequence recommendation method
CN110659678B (en) User behavior classification method, system and storage medium
KR102223382B1 (en) Method and apparatus for complementing knowledge based on multi-type entity
CN112131261B (en) Community query method and device based on community network and computer equipment
CN114491263B (en) Recommendation model training method and device, recommendation method and device
WO2022166125A1 (en) Recommendation system with adaptive weighted baysian personalized ranking loss
CN112257841A (en) Data processing method, device and equipment in graph neural network and storage medium
CN113610610B (en) Session recommendation method and system based on graph neural network and comment similarity
CN113761219A (en) Knowledge graph-based retrieval method and device, electronic equipment and storage medium
CN111597276B (en) Entity alignment method, device and equipment
CN114119123A (en) Information pushing method and device
CN115599990A (en) Knowledge perception and deep reinforcement learning combined cross-domain recommendation method and system
CN116992151A (en) Online course recommendation method based on double-tower graph convolution neural network
CN115114419A (en) Question and answer processing method and device, electronic equipment and computer readable medium
Zhao et al. [Retracted] Application of Knowledge Map Based on BiLSTM‐CRF Algorithm Model in Ideological and Political Education Question Answering System
KR20210064817A (en) Method for Transfer Learning between Different Deep Learning Models
CN109582802B (en) Entity embedding method, device, medium and equipment
CN116756554B (en) Training method, device, equipment, medium and program product for alignment model
US20240005170A1 (en) Recommendation method, apparatus, electronic device, and storage medium
CN112364258B (en) Recommendation method and system based on map, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant