CN114117063A - Entity alignment method, device, electronic equipment and computer readable storage medium - Google Patents

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

Info

Publication number
CN114117063A
CN114117063A CN202111268353.6A CN202111268353A CN114117063A CN 114117063 A CN114117063 A CN 114117063A CN 202111268353 A CN202111268353 A CN 202111268353A CN 114117063 A CN114117063 A CN 114117063A
Authority
CN
China
Prior art keywords
entity
vector representation
graph
knowledge
alignment
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.)
Pending
Application number
CN202111268353.6A
Other languages
Chinese (zh)
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.)
Beijing Mininglamp Software System Co ltd
Original Assignee
Beijing Mininglamp Software System 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 Beijing Mininglamp Software System Co ltd filed Critical Beijing Mininglamp Software System Co ltd
Priority to CN202111268353.6A priority Critical patent/CN114117063A/en
Publication of CN114117063A publication Critical patent/CN114117063A/en
Pending legal-status Critical Current

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
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/02Knowledge representation; Symbolic representation

Abstract

The invention provides an entity alignment method, an entity alignment device, electronic equipment and a computer readable storage medium, which relate to the technical field of data processing, and are used for acquiring a first entity and a second entity to be aligned when entity alignment is carried out; acquiring a first vector representation corresponding to a first entity and a second vector representation corresponding to a second entity through a Translate model; respectively acquiring a third vector representation corresponding to the first entity and a fourth vector representation corresponding to the second entity according to the knowledge base structure information of the first knowledge graph and the knowledge base structure information of the second knowledge graph; finally, the alignment result of the first entity and the second entity is determined according to the first vector representation and the third vector representation, and the second vector representation and the fourth vector representation. Therefore, knowledge fusion is carried out on the knowledge base structure information of the knowledge map and the text information obtained based on the Translate model, the representation capability of the entity can be effectively improved, and the entity alignment effect is improved.

Description

Entity alignment method, device, electronic equipment and computer readable storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to an entity alignment method, an entity alignment apparatus, an electronic device, and a computer-readable storage medium.
Background
Current entity alignment methods include traditional entity alignment methods and alignment methods based on knowledge representation learning.
The traditional entity alignment method is mainly realized in a mode of matching attribute similarity, and by utilizing a machine learning model with supervised learning, the method is easily influenced by context information and the like of an entity.
The alignment method based on knowledge representation learning directly uses mathematical expressions to calculate the similarity between entities by mapping the entities and the relations in the knowledge graph to low-dimensional space vectors, such as a transform method and the like, and the method is not enough for mining the related information of the entities.
In summary, the entity alignment effect of the existing entity alignment method still needs to be improved.
Disclosure of Invention
The invention aims to provide an entity alignment method, an entity alignment device, electronic equipment and a computer readable storage medium, so as to improve the entity alignment effect.
In a first aspect, an embodiment of the present invention provides an entity alignment method, including:
acquiring a first entity and a second entity to be aligned, wherein the first entity is from a first knowledge-graph and the second entity is from a second knowledge-graph;
acquiring a first vector representation corresponding to the first entity and a second vector representation corresponding to the second entity through a Translate model;
respectively acquiring a third vector representation corresponding to the first entity and a fourth vector representation corresponding to the second entity according to the knowledge base structure information of the first knowledge graph and the knowledge base structure information of the second knowledge graph;
determining an alignment result of the first entity and the second entity according to the first vector representation and the third vector representation corresponding to the first entity, and the second vector representation and the fourth vector representation corresponding to the second entity.
Further, the step of respectively obtaining a third vector representation corresponding to the first entity and a fourth vector representation corresponding to the second entity according to the knowledge base structure information of the first knowledge graph and the knowledge base structure information of the second knowledge graph includes:
obtaining a first neighboring entity from the first knowledge-graph that is adjacent to the first entity, and obtaining a second neighboring entity from the second knowledge-graph that is adjacent to the second entity;
respectively establishing a first graph convolution neural network and a second graph convolution neural network according to the first adjacent entity and the second adjacent entity;
and determining the vector representation of the first graph convolutional neural network and the vector representation of the second graph convolutional neural network as a third vector representation corresponding to the first entity and a fourth vector representation corresponding to the second entity respectively.
Further, the step of determining an alignment result of the first entity and the second entity according to the first vector representation and the third vector representation corresponding to the first entity, and the second vector representation and the fourth vector representation corresponding to the second entity includes:
splicing the first vector representation and the third vector representation to obtain a fifth vector representation corresponding to the first entity, and splicing the second vector representation and the fourth vector representation to obtain a sixth vector representation corresponding to the second entity;
constructing and obtaining a plurality of feature vectors according to the fifth vector representation and the sixth vector representation;
determining an alignment result of the first entity and the second entity according to the plurality of feature vectors.
Further, the step of constructing a plurality of feature vectors according to the fifth vector representation and the sixth vector representation includes:
performing dimension supplementing processing on the fifth vector representation and the sixth vector representation to obtain a processed fifth vector representation and a processed sixth vector representation;
the following feature vectors are constructed: xA'、XB'、XA'+XB'、XA'-XB'、XB'-XA'、XA'[0:dim/2]:XB'[dim/2:dim]、XB'[0:dim/2]:XA'[dim/2:dim]Wherein X isA' is the processed fifth vector representation, XB' is the processed sixth vector representation, XA'[0:dim/2]:XB'[dim/2:dim]To be XAFirst half of and XB'the second half of the' splicing to obtain a feature vector, XB'[0:dim/2]:XA'[dim/2:dim]To be XBFirst half of and XA' the second half of the process splices the resulting feature vectors.
Further, the step of determining an alignment result of the first entity and the second entity according to the plurality of feature vectors includes:
inputting the plurality of feature vectors into a full-connection layer to obtain a target vector with the dimension of 2;
inputting the target vector into a softmax function, and calculating to obtain the alignment probability of the first entity and the second entity;
and determining the alignment result of the first entity and the second entity according to the size relationship between the alignment probability and a preset probability threshold.
Further, the Translate model comprises a TransD model.
In a second aspect, an embodiment of the present invention further provides an entity alignment apparatus, including:
a first obtaining module, configured to obtain a first entity and a second entity to be aligned, where the first entity is from a first knowledge-graph and the second entity is from a second knowledge-graph;
a second obtaining module, configured to obtain, through a Translate model, a first vector representation corresponding to the first entity and a second vector representation corresponding to the second entity;
a third obtaining module, configured to obtain, according to the knowledge base structure information of the first knowledge graph and the knowledge base structure information of the second knowledge graph, a third vector representation corresponding to the first entity and a fourth vector representation corresponding to the second entity respectively;
a result determination module, configured to determine an alignment result of the first entity and the second entity according to the first vector representation and the third vector representation corresponding to the first entity, and the second vector representation and the fourth vector representation corresponding to the second entity.
Further, the third obtaining module is specifically configured to:
obtaining a first neighboring entity from the first knowledge-graph that is adjacent to the first entity, and obtaining a second neighboring entity from the second knowledge-graph that is adjacent to the second entity;
respectively establishing a first graph convolution neural network and a second graph convolution neural network according to the first adjacent entity and the second adjacent entity;
and determining the vector representation of the first graph convolutional neural network and the vector representation of the second graph convolutional neural network as a third vector representation corresponding to the first entity and a fourth vector representation corresponding to the second entity respectively.
In a third aspect, an embodiment of the present invention further provides an electronic device, including a memory and a processor, where the memory stores a computer program that is executable on the processor, and the processor implements the entity alignment method according to the first aspect when executing the computer program.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program performs the entity alignment method according to the first aspect.
In the entity alignment method, the apparatus, the electronic device, and the computer-readable storage medium provided in the embodiments of the present invention, when entity alignment is performed, a first entity and a second entity to be aligned are obtained first, where the first entity is from a first knowledge graph and the second entity is from a second knowledge graph; then, acquiring a first vector representation corresponding to the first entity and a second vector representation corresponding to the second entity through a Translate model; respectively acquiring a third vector representation corresponding to the first entity and a fourth vector representation corresponding to the second entity according to the knowledge base structure information of the first knowledge graph and the knowledge base structure information of the second knowledge graph; and finally, determining the alignment result of the first entity and the second entity according to the first vector representation and the third vector representation corresponding to the first entity and the second vector representation and the fourth vector representation corresponding to the second entity. Therefore, when entity alignment is carried out, knowledge fusion is carried out on the knowledge base structure information of the knowledge map and the text information obtained based on the Translate model, the representation capability of the entity can be effectively improved, and the entity alignment effect is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in 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 other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic flowchart of an entity alignment method according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of another entity alignment method according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an entity alignment apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the following embodiments, and it should be understood 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.
The traditional entity alignment method is easily influenced by context information and the like of an entity, and the alignment method based on knowledge representation learning has poor entity alignment effect due to insufficient mining depth of related information of the entity due to the short text characteristic of the knowledge base entity. Based on this, the entity alignment method, the apparatus, the electronic device and the computer-readable storage medium provided by the embodiments of the present invention jointly model the knowledge base structure information and the text information, and jointly model the entity and its neighboring entities according to the short text characteristics of the knowledge base entity, thereby making up the problem of short text characteristics and improving the entity alignment effect.
When knowledge graphs from different sources (such as self-built knowledge graphs and Baidu encyclopedia knowledge graphs) are subjected to knowledge fusion, the technical scheme provided by the invention can be applied to obtain the alignment probability of different knowledge graph entities, and whether two entities are the same entity or not is judged through the set probability threshold value. To facilitate understanding of the embodiment, a detailed description will be given of an entity alignment method disclosed in the embodiment of the present invention.
The embodiment of the invention provides an entity alignment method, which can be executed by an electronic device with data processing capability, wherein the electronic device can be a notebook computer, a desktop computer, a palm computer, a tablet computer, a mobile phone or the like. Referring to fig. 1, a schematic flow chart of an entity alignment method is shown, which mainly includes the following steps S102 to S108:
step S102, a first entity and a second entity to be aligned are obtained, wherein the first entity is from a first knowledge graph, and the second entity is from a second knowledge graph.
Step S104, a first vector representation corresponding to the first entity and a second vector representation corresponding to the second entity are obtained through a Translate model.
The above-mentioned Translate model may be, but is not limited to, a TransD model.
And step S106, respectively acquiring a third vector representation corresponding to the first entity and a fourth vector representation corresponding to the second entity according to the knowledge base structure information of the first knowledge base and the knowledge base structure information of the second knowledge base.
In some possible embodiments, the step S106 may be implemented by the following process: obtaining a first adjacent entity adjacent to the first entity from the first knowledge-graph and a second adjacent entity adjacent to the second entity from the second knowledge-graph; respectively establishing a first graph convolution neural network and a second graph convolution neural network according to the first adjacent entity and the second adjacent entity; and respectively determining the vector representation of the first graph convolution neural network and the vector representation of the second graph convolution neural network as a third vector representation corresponding to the first entity and a fourth vector representation corresponding to the second entity.
Step S108, according to the first vector representation and the third vector representation corresponding to the first entity and the second vector representation and the fourth vector representation corresponding to the second entity, determining an alignment result of the first entity and the second entity.
In some possible embodiments, the step S108 may be implemented by: splicing the first vector representation and the third vector representation to obtain a fifth vector representation corresponding to the first entity, and splicing the second vector representation and the fourth vector representation to obtain a sixth vector representation corresponding to the second entity; constructing and obtaining a plurality of feature vectors according to the fifth vector representation and the sixth vector representation; and determining an alignment result of the first entity and the second entity according to the plurality of feature vectors.
In specific implementation, a plurality of feature vectors can be constructed and obtained through the following processes: performing dimension supplementing processing on the fifth vector representation and the sixth vector representation to obtain a processed fifth vector representation and a processed sixth vector representation; the following feature vectors are constructed: xA'、XB'、XA'+XB'、XA'-XB'、XB'-XA'、XA'[0:dim/2]:XB'[dim/2:dim]、XB'[0:dim/2]:XA'[dim/2:dim]Wherein X isA' is the processed fifth vector representation, XB' is the processed sixth vector representation, XA'[0:dim/2]:XB'[dim/2:dim]To be XAFirst half of and XB'the second half of the' splicing to obtain a feature vector, XB'[0:dim/2]:XA'[dim/2:dim]To be XBFirst half ofAnd XA' the second half of the process splices the resulting feature vectors.
The alignment result may be determined by: inputting a plurality of feature vectors into a full-connection layer to obtain a target vector with dimension 2; inputting the target vector into a softmax function, and calculating to obtain the alignment probability of the first entity and the second entity; and determining the alignment result of the first entity and the second entity according to the size relationship between the alignment probability and a preset probability threshold. For example, if the alignment probability is smaller than the probability threshold, the alignment result is that the first entity and the second entity are not the same entity; and if the alignment probability is greater than or equal to the probability threshold, the alignment result is that the first entity and the second entity are the same entity. The probability threshold may be set according to actual requirements, and is not limited herein.
In the entity alignment method provided by the embodiment of the invention, when entity alignment is carried out, a first entity and a second entity to be aligned are obtained, wherein the first entity is from a first knowledge graph, and the second entity is from a second knowledge graph; then, acquiring a first vector representation corresponding to the first entity and a second vector representation corresponding to the second entity through a Translate model; respectively acquiring a third vector representation corresponding to the first entity and a fourth vector representation corresponding to the second entity according to the knowledge base structure information of the first knowledge graph and the knowledge base structure information of the second knowledge graph; and finally, determining the alignment result of the first entity and the second entity according to the first vector representation and the third vector representation corresponding to the first entity and the second vector representation and the fourth vector representation corresponding to the second entity. Therefore, when entity alignment is carried out, knowledge fusion is carried out on the knowledge base structure information of the knowledge map and the text information obtained based on the Translate model, the representation capability of the entity can be effectively improved, and the entity alignment effect is improved.
For ease of understanding, referring to fig. 2, a flow chart of another entity alignment method is shown, which includes the following steps:
the method comprises the following steps:
an entity a is taken out of the knowledge-graph 1.
Step two:
and acquiring a corresponding TransD vector representation of the entity A.
Step three:
all entities in the knowledge-graph 1 that are directly adjacent to entity a (the neighbors of entity a) are fetched.
Step four:
and establishing a GCN (Graph Convolutional neural Network) for the set of all adjacent entities, and obtaining GCN vector representations corresponding to the adjacent entities.
Step five:
splicing the TransD vector representation and the GCN vector representation corresponding to the entity A into the vector representation X corresponding to the entity AA
Step six:
taking out an entity B from the knowledge graph 2, repeating the steps to obtain a vector representation X corresponding to the entity BB
Step seven:
mixing XAAnd XBTo obtain XA'、XB'。
Step eight:
establishing XA' and XB' feature vector: xA'、XB'、XA'+XB'、XA'-XB'、XB'-XA'、XA'[0:dim/2]:XB'[dim/2:dim]、XB'[0:dim/2]:XA'[dim/2:dim]。
Step nine:
all feature vectors are input into an FC (Fully connected) layer, resulting in a vector with dimension 2.
Step ten:
and performing softmax operation on the vector with the dimension of 2 obtained in the step nine to obtain the alignment probability of the entity A and the entity B.
The entity alignment method provided by the embodiment of the invention can effectively improve the representation capability of the model on the entity, so that the model can be well represented in entity alignment tasks in different knowledge bases.
Corresponding to the above entity alignment method, an embodiment of the present invention further provides an entity alignment apparatus, referring to a schematic structural diagram of an entity alignment apparatus shown in fig. 3, where the apparatus includes:
a first obtaining module 32, configured to obtain a first entity and a second entity to be aligned, where the first entity is from a first knowledge-graph and the second entity is from a second knowledge-graph;
a second obtaining module 34, configured to obtain, through a Translate model, a first vector representation corresponding to the first entity and a second vector representation corresponding to the second entity;
a third obtaining module 36, configured to obtain, according to the knowledge base structure information of the first knowledge base and the knowledge base structure information of the second knowledge base, a third vector representation corresponding to the first entity and a fourth vector representation corresponding to the second entity respectively;
and a result determining module 38, configured to determine an alignment result of the first entity and the second entity according to the first vector representation and the third vector representation corresponding to the first entity, and the second vector representation and the fourth vector representation corresponding to the second entity.
Optionally, the above-mentioned Translate model comprises a TransD model.
Optionally, the third obtaining module 36 is specifically configured to: obtaining a first adjacent entity adjacent to the first entity from the first knowledge-graph and a second adjacent entity adjacent to the second entity from the second knowledge-graph; respectively establishing a first graph convolution neural network and a second graph convolution neural network according to the first adjacent entity and the second adjacent entity; and respectively determining the vector representation of the first graph convolution neural network and the vector representation of the second graph convolution neural network as a third vector representation corresponding to the first entity and a fourth vector representation corresponding to the second entity.
Optionally, the result determining module 38 is specifically configured to: splicing the first vector representation and the third vector representation to obtain a fifth vector representation corresponding to the first entity, and splicing the second vector representation and the fourth vector representation to obtain a sixth vector representation corresponding to the second entity; constructing and obtaining a plurality of feature vectors according to the fifth vector representation and the sixth vector representation; and determining an alignment result of the first entity and the second entity according to the plurality of feature vectors.
Further, the result determination module 38 is further configured to: performing dimension supplementing processing on the fifth vector representation and the sixth vector representation to obtain a processed fifth vector representation and a processed sixth vector representation; the following feature vectors are constructed: xA'、XB'、XA'+XB'、XA'-XB'、XB'-XA'、XA'[0:dim/2]:XB'[dim/2:dim]、XB'[0:dim/2]:XA'[dim/2:dim]Wherein X isA' is the processed fifth vector representation, XB' is the processed sixth vector representation, XA'[0:dim/2]:XB'[dim/2:dim]To be XAFirst half of and XB'the second half of the' splicing to obtain a feature vector, XB'[0:dim/2]:XA'[dim/2:dim]To be XBFirst half of and XA' the second half of the process splices the resulting feature vectors.
Further, the result determination module 38 is further configured to: inputting a plurality of feature vectors into a full-connection layer to obtain a target vector with dimension 2; inputting the target vector into a softmax function, and calculating to obtain the alignment probability of the first entity and the second entity; and determining the alignment result of the first entity and the second entity according to the size relationship between the alignment probability and a preset probability threshold.
When entity alignment is performed, a first entity and a second entity to be aligned are obtained, wherein the first entity is from a first knowledge graph, and the second entity is from a second knowledge graph; then, acquiring a first vector representation corresponding to the first entity and a second vector representation corresponding to the second entity through a Translate model; respectively acquiring a third vector representation corresponding to the first entity and a fourth vector representation corresponding to the second entity according to the knowledge base structure information of the first knowledge graph and the knowledge base structure information of the second knowledge graph; and finally, determining the alignment result of the first entity and the second entity according to the first vector representation and the third vector representation corresponding to the first entity and the second vector representation and the fourth vector representation corresponding to the second entity. Therefore, when entity alignment is carried out, knowledge fusion is carried out on the knowledge base structure information of the knowledge map and the text information obtained based on the Translate model, the representation capability of the entity can be effectively improved, and the entity alignment effect is improved.
The device provided by the embodiment has the same implementation principle and technical effect as the method embodiments, and for the sake of brief description, reference may be made to the corresponding contents in the method embodiments without reference to the device embodiments.
Referring to fig. 4, an embodiment of the present invention further provides an electronic device 100, including: a processor 40, a memory 41, a bus 42 and a communication interface 43, wherein the processor 40, the communication interface 43 and the memory 41 are connected through the bus 42; the processor 40 is arranged to execute executable modules, such as computer programs, stored in the memory 41.
The Memory 41 may include a Random Access Memory (RAM) or a non-volatile Memory (NVM), such as at least one disk Memory. The communication connection between the network element of the system and at least one other network element is realized through at least one communication interface 43 (which may be wired or wireless), and the internet, a wide area network, a local network, a metropolitan area network, etc. may be used.
The bus 42 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (Extended Industry Standard Architecture) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 4, but that does not indicate only one bus or one type of bus.
The memory 41 is used for storing a program, the processor 40 executes the program after receiving an execution instruction, and the method executed by the apparatus defined by the flow disclosed in any of the foregoing embodiments of the present invention may be applied to the processor 40, or implemented by the processor 40.
The processor 40 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 40. The Processor 40 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory 41, and the processor 40 reads the information in the memory 41 and completes the steps of the method in combination with the hardware thereof.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program performs the entity alignment method described in the foregoing method embodiment. The computer-readable storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a RAM, a magnetic disk, or an optical disk.
In all examples shown and described herein, any particular value should be construed as merely exemplary, and not as a limitation, and thus other examples of example embodiments may have different values.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
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 units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A method of entity alignment, comprising:
acquiring a first entity and a second entity to be aligned, wherein the first entity is from a first knowledge-graph and the second entity is from a second knowledge-graph;
acquiring a first vector representation corresponding to the first entity and a second vector representation corresponding to the second entity through a Translate model;
respectively acquiring a third vector representation corresponding to the first entity and a fourth vector representation corresponding to the second entity according to the knowledge base structure information of the first knowledge graph and the knowledge base structure information of the second knowledge graph;
determining an alignment result of the first entity and the second entity according to the first vector representation and the third vector representation corresponding to the first entity, and the second vector representation and the fourth vector representation corresponding to the second entity.
2. The entity alignment method according to claim 1, wherein the step of obtaining a third vector representation corresponding to the first entity and a fourth vector representation corresponding to the second entity according to the knowledge base structure information of the first knowledge-graph and the knowledge base structure information of the second knowledge-graph respectively comprises:
obtaining a first neighboring entity from the first knowledge-graph that is adjacent to the first entity, and obtaining a second neighboring entity from the second knowledge-graph that is adjacent to the second entity;
respectively establishing a first graph convolution neural network and a second graph convolution neural network according to the first adjacent entity and the second adjacent entity;
and determining the vector representation of the first graph convolutional neural network and the vector representation of the second graph convolutional neural network as a third vector representation corresponding to the first entity and a fourth vector representation corresponding to the second entity respectively.
3. The entity alignment method according to claim 1, wherein the step of determining the alignment result of the first entity and the second entity according to the first vector representation and the third vector representation corresponding to the first entity, and the second vector representation and the fourth vector representation corresponding to the second entity comprises:
splicing the first vector representation and the third vector representation to obtain a fifth vector representation corresponding to the first entity, and splicing the second vector representation and the fourth vector representation to obtain a sixth vector representation corresponding to the second entity;
constructing and obtaining a plurality of feature vectors according to the fifth vector representation and the sixth vector representation;
determining an alignment result of the first entity and the second entity according to the plurality of feature vectors.
4. The entity alignment method according to claim 3, wherein the step of constructing a plurality of feature vectors from the fifth vector representation and the sixth vector representation comprises:
performing dimension supplementing processing on the fifth vector representation and the sixth vector representation to obtain a processed fifth vector representation and a processed sixth vector representation;
the following feature vectors are constructed: xA'、XB'、XA'+XB'、XA'-XB'、XB'-XA'、XA'[0:dim/2]:XB'[dim/2:dim]、XB'[0:dim/2]:XA'[dim/2:dim]Wherein X isA' is the processed fifth vector representation, XB' is the processed sixth vector representation, XA'[0:dim/2]:XB'[dim/2:dim]To be XAFirst half of and XB'the second half of the' splicing to obtain a feature vector, XB'[0:dim/2]:XA'[dim/2:dim]To be XBFirst half of and XA' the second half of the process splices the resulting feature vectors.
5. The entity alignment method according to claim 3, wherein the step of determining the alignment result of the first entity and the second entity according to the plurality of feature vectors comprises:
inputting the plurality of feature vectors into a full-connection layer to obtain a target vector with the dimension of 2;
inputting the target vector into a softmax function, and calculating to obtain the alignment probability of the first entity and the second entity;
and determining the alignment result of the first entity and the second entity according to the size relationship between the alignment probability and a preset probability threshold.
6. The entity alignment method of claim 1, wherein the Translate model comprises a TransD model.
7. A physical alignment device, comprising:
a first obtaining module, configured to obtain a first entity and a second entity to be aligned, where the first entity is from a first knowledge-graph and the second entity is from a second knowledge-graph;
a second obtaining module, configured to obtain, through a Translate model, a first vector representation corresponding to the first entity and a second vector representation corresponding to the second entity;
a third obtaining module, configured to obtain, according to the knowledge base structure information of the first knowledge graph and the knowledge base structure information of the second knowledge graph, a third vector representation corresponding to the first entity and a fourth vector representation corresponding to the second entity respectively;
a result determination module, configured to determine an alignment result of the first entity and the second entity according to the first vector representation and the third vector representation corresponding to the first entity, and the second vector representation and the fourth vector representation corresponding to the second entity.
8. The entity alignment apparatus of claim 7, wherein the third obtaining module is specifically configured to:
obtaining a first neighboring entity from the first knowledge-graph that is adjacent to the first entity, and obtaining a second neighboring entity from the second knowledge-graph that is adjacent to the second entity;
respectively establishing a first graph convolution neural network and a second graph convolution neural network according to the first adjacent entity and the second adjacent entity;
and determining the vector representation of the first graph convolutional neural network and the vector representation of the second graph convolutional neural network as a third vector representation corresponding to the first entity and a fourth vector representation corresponding to the second entity respectively.
9. 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 method of any one of claims 1-6 when executing the computer program.
10. A computer-readable storage medium, having stored thereon a computer program, characterized in that the computer program, when being executed by a processor, is adapted to carry out the method of any one of claims 1-6.
CN202111268353.6A 2021-10-29 2021-10-29 Entity alignment method, device, electronic equipment and computer readable storage medium Pending CN114117063A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111268353.6A CN114117063A (en) 2021-10-29 2021-10-29 Entity alignment method, device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111268353.6A CN114117063A (en) 2021-10-29 2021-10-29 Entity alignment method, device, electronic equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN114117063A true CN114117063A (en) 2022-03-01

Family

ID=80377461

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111268353.6A Pending CN114117063A (en) 2021-10-29 2021-10-29 Entity alignment method, device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN114117063A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114676267A (en) * 2022-04-01 2022-06-28 北京明略软件系统有限公司 Method and device for entity alignment and electronic equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114676267A (en) * 2022-04-01 2022-06-28 北京明略软件系统有限公司 Method and device for entity alignment and electronic equipment

Similar Documents

Publication Publication Date Title
CN108701250B (en) Data fixed-point method and device
CN109542399B (en) Software development method and device, terminal equipment and computer readable storage medium
CN107832062B (en) Program updating method and terminal equipment
CN111078689B (en) Data processing method and system of discontinuous pre-ordering traversal tree algorithm
CN116466910A (en) Floating point number-based table lookup method and device, electronic equipment and storage medium
CN114117063A (en) Entity alignment method, device, electronic equipment and computer readable storage medium
CN113641873B (en) Data processing method and device, electronic equipment and readable storage medium
CN112765876A (en) Mechanical design scheme recommendation method and device and electronic equipment
CN111862343A (en) Three-dimensional reconstruction method, device and equipment and computer readable storage medium
CA2956155A1 (en) Methods and apparatus for comparing different types of data
CN107071553B (en) Method, device and computer readable storage medium for modifying video and voice
CN112816959B (en) Clustering method, device, equipment and storage medium for vehicles
CN111429388A (en) Image processing method and device and terminal equipment
JP2020525963A (en) Method and apparatus for comparing media characteristics
CN116152816A (en) Method and device for identifying closed area, electronic equipment and storage medium
JP2020021208A (en) Neural network processor, neural network processing method, and program
CN114117062A (en) Text vector representation method and device and electronic equipment
CN113971630A (en) Projection posture recommendation method and device for converting three-dimensional structure diagram into two-dimensional three-view diagram
CN111127478A (en) View block segmentation method and device
CN107766863B (en) Image characterization method and server
CN111384976A (en) Storage method and reading method of sparse check matrix
CN110807119B (en) Face duplicate checking method and device
TWI755176B (en) Method and device for calculating cell distribution density, electronic device, and storage unit
CN113656876B (en) Automatic cabinet model generation method, device, medium and electronic equipment
CN111243640B (en) Circuit and method for memory operation

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