Entity alignment method and device, electronic equipment and computer storage medium
By processing knowledge graphs through multi-layer graph convolutional neural networks, calculating the matching vector of an entity's neighbor node and updating the embedding representation, the problems of different neighborhood sizes and the common occurrence of neighbor nodes in knowledge graph entity alignment are solved, and efficient entity alignment is achieved.
Patent Information
- Application Number
- CN202211682651.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-27
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2042-12-27
AI Technical Summary
Existing technologies suffer from problems such as different neighborhood sizes and the common occurrence of neighbor nodes in knowledge graph entity alignment, which affect the accuracy of entity alignment.
A multi-layer graph convolutional neural network is used to preprocess the physical model knowledge graph and the logical model knowledge graph, calculate the cross-graph matching vector of the neighbor nodes of the entity, update the embedding representation of the entity by aggregating the neighbor node information of the central node, and achieve alignment based on the entity's embedding representation and distance.
It improves the accuracy and efficiency of entity alignment in knowledge graphs, enabling efficient completion of entity alignment and matching tasks between physical and logical models.
Smart Images

Figure CN116010615B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, electronic device, and computer storage medium for aligning entities. Background Technology
[0002] Currently, entity alignment in knowledge graphs is one of the most researched problems in the field of knowledge graphs. Early studies on entity alignment in knowledge graphs adopted embedding-based entity alignment methods.
[0003] The most typical example is the translation-based model – the TransE model. This method assumes that a correct knowledge graph triple satisfies the condition that the sum of the head entity embedding and the relation embedding equals the tail entity embedding. Later improvements were made to this model, resulting in methods such as MTransE, IPTransE, and JAPE. However, these methods still have some issues that affect the accuracy of entity alignment, such as the difference in neighborhood sizes between two knowledge graphs, and the common occurrence of generic neighbor nodes in knowledge graphs. Summary of the Invention
[0004] In view of this, this application provides an entity alignment method, apparatus, electronic device, and computer storage medium to efficiently complete the entity alignment and matching task between two knowledge graphs: a physical model knowledge graph and a logical model knowledge graph.
[0005] The first aspect of this application provides a method for aligning entities, including:
[0006] Obtain a physical model knowledge graph and a logical model knowledge graph; wherein, the knowledge graph is represented by a directed graph, the directed graph includes entities, relations and triples; the triple is composed of an entity, a relation / attribute, and an entity;
[0007] The physical model knowledge graph and the logical model knowledge graph are preprocessed respectively to obtain the relation triples and attribute triples of the physical model knowledge graph, and the relation triples and attribute triples of the logical model knowledge graph.
[0008] The relationship triples and attribute triples of the physical model knowledge graph and the logical model knowledge graph are input into a multi-layer graph convolutional neural network to obtain the embedded representation of entities in the knowledge graph;
[0009] For each entity, calculate the cross-graph matching vector of the entity's neighboring nodes;
[0010] The target embedding representation of the entity is determined based on the cross-graph matching vectors of the entity's neighbor nodes and the entity's embedding representation.
[0011] Aggregate entities in the knowledge graph to obtain optimized entity embedding representations;
[0012] The distance between entities in two knowledge graphs is determined based on the optimized embedded representation of entities in one knowledge graph and the vectorized representation of entities in another knowledge graph.
[0013] Alignment of entities in the two knowledge graphs is achieved based on the distance between them.
[0014] Optionally, the preprocessing of the physical model knowledge graph and the logical model knowledge graph to obtain relation triples and attribute triples of the physical model knowledge graph, and relation triples and attribute triples of the logical model knowledge graph, includes:
[0015] Extract the triples from the physical model knowledge graph and perform normalization processing to obtain the relation triples and attribute triples of the physical model knowledge graph;
[0016] The triples in the knowledge graph of the logical model are extracted and normalized to obtain the relation triples and attribute triples of the knowledge graph of the logical model.
[0017] Optionally, for each entity, calculating the cross-graph matching vector of the entity's neighboring nodes includes:
[0018] For each entity, calculate the entity sampling probability of its neighboring nodes;
[0019] The subgraph of the entity is compared with all subgraphs in another knowledge graph, and the most similar subgraph is selected as the target subgraph;
[0020] The cross-graph matching vector of the entity is determined based on the target subgraph, attention weights, and the embedded representation of the entity in the knowledge graph.
[0021] Optionally, the aggregation of entities in the knowledge graph to obtain optimized entity embedding representations includes:
[0022] The embedded representation of the central node is updated by aggregating the neighbor node information of the central node. By aggregating the information of all related nodes, the optimized embedded representation of the entity is obtained.
[0023] A second aspect of this application provides an alignment device for entities, comprising:
[0024] The acquisition unit is used to acquire the physical model knowledge graph and the logical model knowledge graph; wherein, the knowledge graph is represented by a directed graph, which includes entities, relations and triples; the triple is composed of an entity, a relation / attribute, and an entity;
[0025] The preprocessing unit is used to preprocess the physical model knowledge graph and the logical model knowledge graph respectively to obtain the relation triples and attribute triples of the physical model knowledge graph, and the relation triples and attribute triples of the logical model knowledge graph.
[0026] The input unit is used to input the relationship triples and attribute triples of the physical model knowledge graph and the logical model knowledge graph into the multilayer graph convolutional neural network to obtain the embedded representation of the entity in the knowledge graph;
[0027] A computing unit is used to calculate, for each entity, the cross-graph matching vector of the entity's neighboring nodes;
[0028] The first determining unit is configured to determine the target embedding representation of the entity based on the cross-graph matching vectors of the entity's neighbor nodes and the entity's embedding representation.
[0029] Aggregation units are used to aggregate entities in a knowledge graph to obtain optimized embedded representations of the entities;
[0030] The second determining unit is used to determine the distance between two entities in a knowledge graph based on the optimized embedded representation of an entity in the knowledge graph and the vectorized representation of an entity in another knowledge graph.
[0031] The alignment unit is used to align entities in two knowledge graphs based on the distance between them.
[0032] Optionally, the preprocessing unit includes:
[0033] The first preprocessing subunit is used to extract triples from the physical model knowledge graph and perform normalization processing to obtain relation triples and attribute triples of the physical model knowledge graph.
[0034] The second preprocessing subunit is used to extract triples from the knowledge graph of the logical model and perform normalization processing to obtain relation triples and attribute triples of the knowledge graph of the logical model.
[0035] Optionally, the computing unit includes:
[0036] The first calculation subunit is used to calculate the entity sampling probability of the entity's neighbor nodes for each entity;
[0037] The selection unit is used to compare the subgraph of the entity with all subgraphs in another knowledge graph and select the most similar subgraph as the target subgraph;
[0038] The second computational subunit is used to determine the cross-graph matching vector of the entity based on the target subgraph, attention weights, and the embedded representation of the entity in the knowledge graph.
[0039] Optionally, the aggregation unit includes:
[0040] The aggregation subunit is used to update the embedding representation of the central node by aggregating the neighbor node information of the central node. It aggregates the information of all related nodes to obtain the optimized embedding representation of the entity.
[0041] A third aspect of this application provides an electronic device, comprising:
[0042] One or more processors;
[0043] A storage device on which one or more programs are stored;
[0044] When the one or more programs are executed by the one or more processors, the one or more processors implement the entity alignment method as described in any one of the first aspects.
[0045] The fourth aspect of this application provides a computer storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the alignment method for entities as described in any one of the first aspects.
[0046] As can be seen from the above solutions, this application provides an entity alignment method, apparatus, electronic device, and computer storage medium. The entity alignment method includes: first, acquiring a physical model knowledge graph and a logical model knowledge graph; wherein, the knowledge graph is represented by a directed graph, and the directed graph includes entities, relations, and triples; the triples consist of an entity, a relation / attribute, and an entity; then, preprocessing the physical model knowledge graph and the logical model knowledge graph respectively to obtain relation triples and attribute triples of the physical model knowledge graph, and relation triples and attribute triples of the logical model knowledge graph; finally, aligning the physical model knowledge graph with the logical model knowledge graph... The relation triples and attribute triples of the spectrum are input into a multi-layer graph convolutional neural network to obtain the embedded representations of entities in the knowledge graph. For each entity, the cross-graph matching vectors of the entity's neighboring nodes are calculated. Based on the cross-graph matching vectors of the entity's neighboring nodes and the entity's embedded representation, the target embedded representation of the entity is determined. Then, the entities in the knowledge graph are aggregated to obtain optimized entity embedded representations. Based on the optimized embedded representations of entities in one knowledge graph and the vectorized representations of entities in another knowledge graph, the distance between the entities in the two knowledge graphs is determined. Finally, based on the distance between the entities in the two knowledge graphs, the alignment of entities in the two graphs is achieved. This efficiently completes the entity alignment and matching task between the physical model knowledge graph and the logical model knowledge graph. Attached Figure Description
[0047] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0048] Figure 1 A detailed flowchart of an entity alignment method provided in an embodiment of this application;
[0049] Figure 2 A flowchart illustrating an entity alignment method provided in another embodiment of this application;
[0050] Figure 3 A flowchart illustrating an entity alignment method provided in another embodiment of this application;
[0051] Figure 4 A schematic diagram of an alignment device for an entity provided in another embodiment of this application;
[0052] Figure 5 This is a schematic diagram of an electronic device that implements an entity alignment method according to another embodiment of this application. Detailed Implementation
[0053] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0054] It should be noted that the concepts of "first," "second," etc., mentioned in this application are used only to distinguish different devices, modules, or units, and are not intended to limit the order of functions performed by these devices, modules, or units or their interdependencies. The terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0055] This application provides an embodiment of an entity alignment method, such as... Figure 1 As shown, the specific steps include:
[0056] S101. Obtain the physical model knowledge graph and the logical model knowledge graph.
[0057] The knowledge graph is represented by a directed graph, which includes entities, relations, and triples; a triple consists of an entity, a relation / attribute, and an entity.
[0058] Specifically, based on the physical model knowledge graph KG1 and logical model knowledge graph KG2 of the State Grid Unified Data Model (SG-CIM), the knowledge graph is represented by a directed graph G = (E, R, T), where E represents an entity, R represents a relation, T represents a triple, and each triple consists of (entity, relation / attribute, entity).
[0059] S102. Preprocess the physical model knowledge graph and the logical model knowledge graph respectively to obtain the relation triples and attribute triples of the physical model knowledge graph, and the relation triples and attribute triples of the logical model knowledge graph.
[0060] Optionally, in another embodiment of this application, one implementation of step S102 is as follows: Figure 2 As shown, it includes:
[0061] S201. Extract the triples from the physical model knowledge graph and perform normalization processing to obtain the relation triples and attribute triples of the physical model knowledge graph.
[0062] S202. Extract the triples from the logical model knowledge graph and perform normalization processing to obtain the relation triples and attribute triples of the logical model knowledge graph.
[0063] S103. Input the relationship triples and attribute triples of the physical model knowledge graph and the logical model knowledge graph into a multi-layer graph convolutional neural network to obtain the embedded representation of entities in the knowledge graph.
[0064] Specifically, the relationship triples and attribute triples of the physical model knowledge graph and the logical model knowledge graph are used as inputs to a multi-layer graph convolutional neural network to continuously update the vector representations of entities in the knowledge graph, thereby obtaining the embedded representations of entities in the knowledge graph.
[0065] Entity e in a multi-layer graph convolutional neural network i The embedding representation function is expressed by the following formula:
[0066]
[0067] in, It is entity e i Embedding representation in the l-th layer GNN, ∈ i It is a regularization constant, N i It is entity e i All neighboring entities, Represents entity e j Embedding representation in the (l-1)th layer GNN.
[0068] S104. For each entity, calculate the cross-graph matching vector of the entity's neighboring nodes.
[0069] Optionally, in another embodiment of this application, one implementation of step S104 is as follows: Figure 3 As shown, it includes:
[0070] S301. For each entity, calculate the entity sampling probability of the entity's neighboring nodes.
[0071] Specifically, for entity e in entity set E1 i The neighbor sampling subgraph is compared with the neighbor sampling subgraph of each entity in the entity set E2, and entity sampling is performed once. The entity sampling probability is calculated by the following formula:
[0072]
[0073] Among them, p(hi_j |h i ) is entity e i Neighbor e i_j The entity sampling probability, N i It is node e i The set of indices of adjacent nodes, h i and h i-j It is the learned entity vector representation, W S It is a shared parameter matrix. It is h i-j The transpose of the entity vector representation, Yes, the entity vector h i-k Transpose of expression.
[0074] S302. Compare the subgraph of an entity with all subgraphs in another knowledge graph, and select the most similar subgraph as the target subgraph.
[0075] S303. Determine the cross-graph matching vector of the entity based on the target subgraph, attention weights, and the embedded representation of the entity in the knowledge graph.
[0076] Specifically, all subgraphs are used as input, and a matching vector is calculated for each neighboring vertex. i ,e ik ) are the entity pairs to be evaluated, belonging to entity set E1 and entity set E2 respectively, where p and q are respectively from e i and e ik For each candidate entity, the cross-graph matching vector of its neighboring nodes is calculated based on the candidate subgraph corresponding to the candidate entity. The calculation function for the cross-graph matching vector of node q is expressed by the following formula:
[0077]
[0078]
[0079] Among them, a pq These are the weighting coefficients of the attention mechanism. It is C ik The sampling neighborhood set, q′ and q are the neighbor samples, m p It is the cross-graph matching vector of node p, which is the measure of h. p h p and h q It is the GCN output embedding representation of entity nodes p and q.
[0080] S105. Determine the target embedding representation of the entity based on the cross-graph matching vectors of the entity's neighboring nodes and the entity's embedding representation.
[0081] Specifically, considering the GCN representation of node p itself, the embedding representation of node p is calculated using the following formula:
[0082]
[0083] in, It is e i The embedded representation of the neighbor node p after computation, h p It is the GCN embedding representation of the previous neighbor node p itself, m p It is the cross-graph matching vector of node p.
[0084] S106. Aggregate the entities in the knowledge graph to obtain the optimized embedded representation of the entities.
[0085] Optionally, in another embodiment of this application, one implementation of step S106 includes:
[0086] The embedded representation of the central node is updated by aggregating the neighbor node information of the central node. By aggregating the information of all related nodes, the optimized embedded representation of the entity is obtained.
[0087] Specifically, for each entity node in the knowledge graph, aggregation is performed. The embedding representation of the central node is updated by aggregating the neighbor node information, and the information of all related nodes is aggregated. The optimized embedding representation of the central entity is expressed by the following formula:
[0088]
[0089] in, For the central entity e i The optimized embedding representation, g i For the central entity e i The neighbor representation learned by the gated graph neural network, h i Represents the central entity e i Previous embedding representation.
[0090] S107. Determine the distance between entities in two knowledge graphs based on the optimized embedded representation of entities in one knowledge graph and the vectorized representation of entities in another knowledge graph.
[0091] Specifically, the distance function for calculating entities is expressed by the following formula:
[0092]
[0093] Where d(r,t) is the distance between entity r in the logical model knowledge graph and entity t in the physical model knowledge graph. It is a vectorized representation of the central entity r of the logical model. It is the optimized embedded representation of the central entity t in the physical model.
[0094] S108. Align entities in two knowledge graphs based on the distance between them.
[0095] Specifically, entity alignment in the two graphs is achieved by calculating an objective function, which is expressed by the following formula:
[0096]
[0097] Among them, L w Here, L is the objective function, L is the pre-aligned set of entity pairs, and r and t are the node pairs to be aligned. It is the integrated information of all adjacent nodes of entity node r. It is the integrated information of all adjacent nodes of entity node t.
[0098] As can be seen from the above scheme, this application provides a method for entity alignment: First, obtain the physical model knowledge graph and the logical model knowledge graph; wherein, the knowledge graph is represented by a directed graph, and the directed graph includes entities, relations, and triples; the triples consist of an entity, a relation / attribute, and an entity; then, preprocess the physical model knowledge graph and the logical model knowledge graph respectively to obtain the relation triples and attribute triples of the physical model knowledge graph, and the relation triples and attribute triples of the logical model knowledge graph; finally, input the relation triples and attribute triples of the physical model knowledge graph and the logical model knowledge graph into... The algorithm feeds data into a multi-layer graph convolutional neural network to obtain the embedded representations of entities in the knowledge graph. For each entity, it calculates the cross-graph matching vectors of its neighboring nodes. Based on the cross-graph matching vectors of the entity's neighboring nodes and the entity's embedded representation, it determines the target embedded representation of the entity. Then, it aggregates the entities in the knowledge graph to obtain optimized entity embedded representations. Based on the optimized embedded representations of entities in one knowledge graph and the vectorized representations of entities in another knowledge graph, it determines the distance between the entities in the two knowledge graphs. Finally, based on the distance between the entities in the two knowledge graphs, it aligns the entities in the two graphs. This efficiently completes the entity alignment and matching task between the physical model knowledge graph and the logical model knowledge graph.
[0099] Another embodiment of this application provides an alignment device for an entity, such as Figure 4 As shown, it specifically includes:
[0100] Acquisition unit 401 is used to acquire the physical model knowledge graph and the logical model knowledge graph.
[0101] The knowledge graph is represented by a directed graph, which includes entities, relations, and triples; a triple consists of an entity, a relation / attribute, and an entity.
[0102] The preprocessing unit 402 is used to preprocess the physical model knowledge graph and the logical model knowledge graph respectively to obtain the relation triples and attribute triples of the physical model knowledge graph, and the relation triples and attribute triples of the logical model knowledge graph.
[0103] Optionally, in another embodiment of this application, one implementation of the preprocessing unit 402 includes:
[0104] The first preprocessing subunit is used to extract triples from the physical model knowledge graph and perform normalization processing to obtain relation triples and attribute triples of the physical model knowledge graph.
[0105] The second preprocessing subunit is used to extract triples from the logical model knowledge graph and perform normalization processing to obtain relation triples and attribute triples of the logical model knowledge graph.
[0106] For details on the specific working process of the units disclosed in the above embodiments of this application, please refer to the corresponding method embodiments, such as... Figure 2 As shown, it will not be elaborated further here.
[0107] Input unit 403 is used to input the relationship triples and attribute triples of the physical model knowledge graph and the logical model knowledge graph into the multilayer graph convolutional neural network to obtain the embedded representation of entities in the knowledge graph.
[0108] The computation unit 404 is used to compute the cross-graph matching vector of the entity's neighboring nodes for each entity.
[0109] Optionally, in another embodiment of this application, one implementation of the computing unit 404 includes:
[0110] The first computational subunit is used to calculate the entity sampling probability of the entity's neighboring nodes for each entity.
[0111] The selection unit is used to compare the subgraph of an entity with all subgraphs in another knowledge graph, and select the most similar subgraph as the target subgraph.
[0112] The second computational subunit is used to determine the cross-graph matching vector of an entity based on the target subgraph, attention weights, and the embedded representation of entities in the knowledge graph.
[0113] For details on the specific working process of the units disclosed in the above embodiments of this application, please refer to the corresponding method embodiments, such as... Figure 3 As shown, it will not be elaborated further here.
[0114] The first determining unit 405 is used to determine the target embedding representation of an entity based on the cross-graph matching vectors of the entity's neighboring nodes and the entity's embedding representation.
[0115] Aggregation unit 406 is used to aggregate entities in the knowledge graph to obtain optimized embedded representations of the entities.
[0116] Optionally, in another embodiment of this application, one implementation of the aggregation unit 406 includes:
[0117] The aggregation subunit is used to update the embedding representation of the central node by aggregating the neighbor node information of the central node. It aggregates the information of all related nodes to obtain the optimized embedding representation of the entity.
[0118] For details on the specific working process of the units disclosed in the above embodiments of this application, please refer to the corresponding method embodiments, such as... Figure 3 As shown, it will not be elaborated further here.
[0119] The second determining unit 407 is used to determine the distance between two knowledge graph entities based on the optimized embedded representation of an entity in one knowledge graph and the vectorized representation of an entity in another knowledge graph.
[0120] Alignment unit 408 is used to align entities in two knowledge graphs based on the distance between them.
[0121] For details on the specific working process of the units disclosed in the above embodiments of this application, please refer to the corresponding method embodiments, such as... Figure 1 As shown, it will not be elaborated further here.
[0122] As can be seen from the above scheme, this application provides an entity alignment device: First, the acquisition unit 401 acquires the physical model knowledge graph and the logical model knowledge graph; wherein, the knowledge graph is represented by a directed graph, and the directed graph includes entities, relations, and triples; the triples consist of an entity, a relation / attribute, and an entity; then, the preprocessing unit 402 preprocesses the physical model knowledge graph and the logical model knowledge graph respectively to obtain the relation triples and attribute triples of the physical model knowledge graph, and the relation triples and attribute triples of the logical model knowledge graph; after that, the input unit 403 inputs the relation triples and attribute triples of the physical model knowledge graph and the logical model knowledge graph into a multi-layer graph convolutional neural network. The process involves several steps: First, the embedding representations of entities in the knowledge graph are obtained via a network. Second, the computation unit 404 calculates the cross-graph matching vectors of the entity's neighboring nodes for each entity. Third, the first determining unit 405 determines the target embedding representation of the entity based on the cross-graph matching vectors of the entity's neighboring nodes and the entity's embedding representation. Fourth, the aggregation unit 406 aggregates the entities in the knowledge graph to obtain optimized entity embedding representations. Fifth, the second determining unit 407 determines the distance between entities in the two knowledge graphs based on the optimized embedding representations of entities in one knowledge graph and the vectorized representations of entities in another knowledge graph. Finally, the alignment unit 408 aligns the entities in the two knowledge graphs based on the distance between them. This efficiently completes the entity alignment and matching task between the physical model knowledge graph and the logical model knowledge graph.
[0123] Another embodiment of this application provides an electronic device, such as... Figure 5 As shown, it includes:
[0124] One or more processors 501.
[0125] Storage device 502, on which one or more programs are stored.
[0126] When the one or more programs are executed by the one or more processors 501, the one or more processors 501 implement the entity alignment method as described in any of the above embodiments.
[0127] Another embodiment of this application provides a computer storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the entity alignment method as described in any of the above embodiments.
[0128] In the embodiments disclosed in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus and method embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0129] Furthermore, the functional modules in the various embodiments of this disclosure can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part. If the functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a live streaming device, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this disclosure. The aforementioned storage medium includes: USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, optical disks, and other media capable of storing program code.
[0130] Those skilled in the art will be able to implement or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for aligning entities, characterized in that, include: Obtain a physical model knowledge graph and a logical model knowledge graph; wherein, the knowledge graph is represented by a directed graph, the directed graph includes entities, relations and triples; the triple is composed of an entity, a relation / attribute, and an entity; The physical model knowledge graph and the logical model knowledge graph are preprocessed respectively to obtain the relation triples and attribute triples of the physical model knowledge graph, and the relation triples and attribute triples of the logical model knowledge graph. The relationship triples and attribute triples of the physical model knowledge graph and the logical model knowledge graph are input into a multi-layer graph convolutional neural network to obtain the embedded representation of entities in the knowledge graph; For each entity, calculate the entity sampling probability of its neighboring nodes; The subgraph of the entity is compared with all subgraphs in another knowledge graph, and the most similar subgraph is selected as the target subgraph; Based on the target subgraph, attention weights, and the embedded representations of entities in the knowledge graph, determine the cross-graph matching vector of the entity; The target embedding representation of the entity is determined based on the cross-graph matching vectors of the entity's neighbor nodes and the entity's embedding representation. The embedded representation of the central node is updated by aggregating the neighbor node information of the central node. The optimized entity embedded representation is obtained by aggregating the information of all related nodes. The distance between entities in two knowledge graphs is determined based on the optimized embedded representation of entities in one knowledge graph and the vectorized representation of entities in another knowledge graph. Alignment of entities in the two knowledge graphs is achieved based on the distance between them.
2. The entity alignment method according to claim 1, characterized in that, The preprocessing of the physical model knowledge graph and the logical model knowledge graph to obtain relation triples and attribute triples of the physical model knowledge graph, and relation triples and attribute triples of the logical model knowledge graph, includes: Extract the triples from the physical model knowledge graph and perform normalization processing to obtain the relation triples and attribute triples of the physical model knowledge graph; The triples in the knowledge graph of the logical model are extracted and normalized to obtain the relation triples and attribute triples of the knowledge graph of the logical model.
3. An alignment device for a solid object, characterized in that, include: The acquisition unit is used to acquire the physical model knowledge graph and the logical model knowledge graph; wherein, the knowledge graph is represented by a directed graph, which includes entities, relations and triples; the triple is composed of an entity, a relation / attribute, and an entity; The preprocessing unit is used to preprocess the physical model knowledge graph and the logical model knowledge graph respectively to obtain the relation triples and attribute triples of the physical model knowledge graph, and the relation triples and attribute triples of the logical model knowledge graph. The input unit is used to input the relationship triples and attribute triples of the physical model knowledge graph and the logical model knowledge graph into the multilayer graph convolutional neural network to obtain the embedded representation of the entity in the knowledge graph; The first calculation subunit is used to calculate the entity sampling probability of the entity's neighbor nodes for each entity; The selection unit is used to compare the subgraph of the entity with all subgraphs in another knowledge graph and select the most similar subgraph as the target subgraph. The second computational subunit is used to determine the cross-graph matching vector of the entity based on the target subgraph, attention weights, and the embedded representation of the entity in the knowledge graph. The first determining unit is configured to determine the target embedding representation of the entity based on the cross-graph matching vectors of the entity's neighbor nodes and the entity's embedding representation. The aggregation subunit is used to update the embedding representation of the central node by aggregating the neighbor node information of the central node. It aggregates the information of all related nodes to obtain the optimized embedding representation of the entity. The second determining unit is used to determine the distance between two entities in a knowledge graph based on the optimized embedded representation of an entity in the knowledge graph and the vectorized representation of an entity in another knowledge graph. The alignment unit is used to align entities in two knowledge graphs based on the distance between them.
4. The alignment device for entities according to claim 3, characterized in that, The preprocessing unit includes: The first preprocessing subunit is used to extract triples from the physical model knowledge graph and perform normalization processing to obtain relation triples and attribute triples of the physical model knowledge graph. The second preprocessing subunit is used to extract triples from the knowledge graph of the logical model and perform normalization processing to obtain relation triples and attribute triples of the knowledge graph of the logical model.
5. An electronic device, characterized in that, include: One or more processors; A storage device on which one or more programs are stored; When the one or more programs are executed by the one or more processors, the one or more processors implement the entity alignment method as described in any one of claims 1 to 2.
6. A computer storage medium, characterized in that, It stores a computer program, wherein the computer program, when executed by a processor, implements the alignment method of entities as described in any one of claims 1 to 2.
Citation Information
Patent Citations
Knowledge graph entity alignment method based on graph neural network
CN113761221A
SG-CIM model-oriented entity alignment method
CN114911946A