Knowledge graph entity alignment method and device for high-speed rail data

Through the twin graph convolutional network and multi-view adjacency matrix, a twin graph is constructed and features are aggregated, which solves the problem of high-speed rail data entity alignment relying on auxiliary information, achieves high-precision automatic alignment, and reduces the cost of manual labeling.

CN120654793APending Publication Date: 2025-09-16SICHUAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510770041.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-10
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

Existing high-speed rail data entity alignment methods rely on auxiliary information, resulting in poor alignment quality in high-speed rail data scenarios, and requiring a large amount of manual annotation to improve accuracy, which is costly.

Method used

Using the twin graph convolutional network model and multi-view adjacency matrix, we construct a twin graph and generate a twin graph by exchanging pre-aligned entity pairs. Combined with the context-aware graph convolutional network, we capture the deep semantic information of entities and relationships, and aggregate features through the multi-view adjacency matrix to achieve entity alignment.

Benefits of technology

It improves the accuracy and automation level of high-speed rail data entity alignment, reduces dependence on manual labeling, saves labor costs, and improves the processing capabilities of complex data sets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120654793A_ABST
    Figure CN120654793A_ABST
Patent Text Reader

Abstract

The invention provides a knowledge graph entity alignment method and device for high-speed rail data, and relates to the technical field of deep learning, and the method comprises the steps: constructing a first original graph and a second original graph according to two pieces of heterogeneous high-speed rail source data, and exchanging pre-aligned entity pairs in the first original graph and the second original graph, obtaining a first twin map and a second twin map; performing feature extraction by using a twin graph convolutional network model to obtain a first entity feature and a relationship feature and a second entity feature and a relationship feature; performing feature aggregation by using the multi-view adjacency matrix to obtain a first enhanced entity feature of the first original map and a second enhanced entity feature of the second original map; and determining an entity alignment result of the first original map and the second original map according to the similarity of the first enhanced entity feature and the second enhanced entity feature. According to the method, the data alignment limitation of data annotation depending on a manual rule traditionally is avoided, and the labor cost is saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of deep learning technology, and in particular to a knowledge graph entity alignment method and device for high-speed rail data. Background Art

[0002] As the high-speed rail industry continues to integrate more deeply with social and economic life, high-speed rail data has become a vital national economic resource and strategic asset. The industry's complex organizational structure has led to the generation of a vast amount of heterogeneous and interconnected data. Current data integration solutions, which rely primarily on manual analysis of data relationships, are unable to cope with the massive and ever-changing data landscape.

[0003] High-speed rail data is inherently highly structured, especially its relational data, which can be expressed through the construction of knowledge graphs. Entity alignment, a technique designed to discover equivalent entities across different knowledge graphs, has garnered widespread attention in the field of data integration in recent years and has been proven to effectively facilitate the integration of diverse data sources. Currently, mainstream entity alignment methods rely primarily on representation learning techniques, encoding entities and their relationships into a vector space. These methods then calculate the similarity between entities using a metric function to generate the alignment results.

[0004] However, existing methods incorporate auxiliary information such as entity names, text descriptions, and images, and leverage pre-trained models to assist in the generation of entity feature vectors. The alignment performance of these methods relies heavily on the completeness of this auxiliary information and the quality of the auxiliary encoding module. In the real-world context of high-speed rail data, much of this auxiliary information is unavailable, resulting in poor alignment quality for existing methods. Improving alignment accuracy for high-speed rail data still requires manual annotation, which incurs significant labor costs. Summary of the Invention

[0005] An embodiment of the present invention provides a knowledge graph entity alignment method for high-speed rail data, aiming to solve the problems existing in the above-mentioned background technology.

[0006] In order to solve the above-mentioned technical problems, the present invention is achieved as follows: In a first aspect, an embodiment of the present invention provides a knowledge graph entity alignment method for high-speed rail data, the method comprising: Based on two heterogeneous high-speed rail source data, a first original graph and a second original graph are constructed, and pre-aligned entity pairs in the first original graph and the second original graph are exchanged to obtain a first twin graph and a second twin graph, wherein the entities in the first original graph and the second original graph are tables or fields of at least one of high-speed rail train operation data, equipment monitoring data, infrastructure data and passenger service data; the edges in the first original graph and the second original graph are inclusion relationships between tables and fields, or foreign key association relationships between tables; the pre-aligned entity pairs are a pair of pre-labeled entities with the same high-speed rail business semantics; Performing feature extraction on the first original graph, the second original graph, the first twin graph, and the second twin graph using a twin graph convolutional network model to obtain first entity features and relationship features and second entity features and relationship features, wherein the twin graph convolutional network model is pre-trained based on the pre-aligned entity pairs; Performing feature aggregation on the first entity features and relationship features, and the second entity features and relationship features using a multi-view adjacency matrix to obtain a first enhanced entity feature of the first original graph and a second enhanced entity feature of the second original graph, wherein the multi-view adjacency matrix represents the adjacency relationship between entities at different viewing angles; An entity alignment result of the first original graph and the second original graph is determined according to the similarity between the first enhanced entity feature and the second enhanced entity feature.

[0007] Optionally, exchanging pre-aligned entity pairs in the first original graph and the second original graph to obtain a first twin graph and a second twin graph includes: Generate a corresponding reverse edge for each original edge in the first original graph and the second original graph, wherein the reverse edge has a direction opposite to the original edge and has opposite semantics; Determining a set of pre-aligned entity pairs from the high-speed rail dataset, the pre-aligned entity pairs comprising a first pre-aligned entity in the first original atlas and a second pre-aligned entity in the second original atlas; The first pre-aligned entity in the first original map is replaced by the second pre-aligned entity to generate a first twin map, and the second pre-aligned entity in the second original map is replaced by the first pre-aligned entity to generate a second twin map.

[0008] Optionally, the twin graph convolutional network model includes multiple network blocks; using the twin graph convolutional network model to perform feature extraction on the first original graph, the second original graph, the first twin graph, and the second twin graph to obtain first entity features and relationship features and second entity features and relationship features, including: The first original graph, the second original graph, the first twin graph, and the second twin graph are sequentially subjected to feature extraction by the multiple network blocks to obtain output results of each network block; wherein the latter network block processes the output result of the former network block, and the output result includes intermediate entity features and intermediate relationship features of the first original graph, the second original graph, the first twin graph, and the second twin graph; The first original graph output by each of the multiple network blocks and the intermediate entity features and intermediate relationship features of the first original graph are spliced ​​along the feature dimension to obtain the first entity features and relationship features, and the second original graph output by each of the multiple network blocks and the intermediate entity features and intermediate relationship features of the second twin graph are spliced ​​along the feature dimension to obtain the second entity features and relationship features.

[0009] Optionally, each network block processes the output of the previous network block as follows: Aggregate the entity features of each entity and its neighboring entities in the first original graph, the second original graph, the first twin graph, and the second twin graph through the context-aware graph convolution layer to obtain the intermediate entity features of the first original graph, the second original graph, the first twin graph, and the second twin graph output by the current network block. The adjacent entities of each entity are other entities directly connected to the entity through edges; Exchanging intermediate entity features of entities shared between the first original graph and the second twin graph, and exchanging intermediate entity features of entities shared between the second original graph and the first twin graph through the pre-aligned entity interaction layer; Through the fully connected layer, the relationship features of each edge in the first original graph, the second original graph, the first twin graph and the second twin graph are linearly transformed to obtain the intermediate relationship features of the first original graph, the second original graph, the first twin graph and the second twin graph output by the current network block.

[0010] Optionally, before performing feature aggregation on the first entity features and relationship features, and the second entity features and relationship features using a multi-view adjacency matrix, the method further includes: Based on the first original graph and the second original graph in which reverse edges are generated, a first adjacency matrix, a second adjacency matrix, a third adjacency matrix, and a fourth adjacency matrix are constructed respectively; wherein the first adjacency matrix represents the number of edges directly connected between entities; the second adjacency matrix represents whether the target entity is directly connected to other entities through a target relationship; the third adjacency matrix represents whether the target entity is directly connected to other entities through a target relationship; and the fourth adjacency matrix represents whether entities are directly connected through a target relationship; The first adjacency matrix, the second adjacency matrix, the third adjacency matrix, and the fourth adjacency matrix are used as the multi-view adjacency matrix.

[0011] Optionally, performing feature aggregation on the first entity features and relationship features, and the second entity features and relationship features using a multi-view adjacency matrix to obtain a first enhanced entity feature of the first original graph and a second enhanced entity feature of the second original graph includes: Based on the adjacency relationship between different views in the multi-view adjacency matrix, respectively aggregating the entity features and relationship features of the first original graph and the second original graph to obtain entity features of the first original graph and the second original graph with different degrees of enhancement; The entity features of the first original map with different enhancement degrees are spliced ​​along the feature dimension to generate enhanced entity features of the first original map, and the entity features of the second original map with different enhancement degrees are spliced ​​along the feature dimension to generate enhanced entity features of the second original map.

[0012] Optionally, based on the adjacency relationship between different views in the multi-view adjacency matrix, entity features and relationship features of the first original graph and the second original graph are respectively aggregated to obtain entity features of the first original graph and the second original graph with different degrees of enhancement, including: Aggregating the entity features of the first original graph and the second original graph using the third adjacency matrix to obtain corresponding enhanced relationship features; Combining the entity features and enhanced relationship features of the first original graph and the second original graph using the first adjacency matrix and the second adjacency matrix to obtain corresponding first enhanced entity features; Aggregating the relationship features of the first original graph and the second original graph using the fourth adjacency matrix to generate corresponding adjacent entity pair features; According to the adjacent entity pair features of the first original map and the second original map, corresponding second enhanced entity features are further calculated, and the enhancement degree of the second enhanced entity features is higher than that of the first enhanced entity features.

[0013] Optionally, determining an entity alignment result of the first original graph and the second original graph according to a similarity between the first enhanced entity feature and the second enhanced entity feature includes: Determining a feature vector corresponding to each entity based on the enhanced entity features of the first original graph to obtain a first entity feature vector set; and extracting a feature vector corresponding to each entity based on the enhanced entity features of the second original graph to obtain a second entity feature vector set; Based on the first entity feature vector set and the second entity feature vector set, calculating the feature distance between each entity in the first original graph and the second original graph, and generating a distance matrix; wherein each element of the distance matrix represents the feature distance between an entity in the first original graph and an entity in the second original graph, and a smaller feature distance indicates a higher similarity; Sort each row of the distance matrix in ascending order to obtain a candidate alignment entity list for each entity in the first original graph in the second original graph; A pair of entities with the smallest feature distance is screened out from the candidate alignment entity list to determine an entity alignment result of the first original graph and the second original graph.

[0014] Optionally, constructing entities of the first original graph and the second original graph based on data objects in the high-speed rail dataset includes: Acquire first metadata and second metadata from different data sources from the high-speed rail dataset; Based on the first metadata, extract tables and fields as entities of the first original graph, and construct edges of the first original graph according to the inclusion relationship between tables and fields and the foreign key relationship between tables; Based on the second metadata, tables and fields are extracted as entities of the second original graph, and edges of the second original graph are constructed according to the inclusion relationship between tables and fields and the foreign key relationship between tables.

[0015] In a second aspect, an embodiment of the present invention provides a knowledge graph entity alignment device for high-speed rail data, the device comprising: A construction module is used to construct a first original graph and a second original graph based on two heterogeneous high-speed rail source data, and exchange pre-aligned entity pairs in the first original graph and the second original graph to obtain a first twin graph and a second twin graph, wherein the entities in the first original graph and the second original graph are tables or fields of at least one of high-speed rail train operation data, equipment monitoring data, infrastructure data and passenger service data; the edges in the first original graph and the second original graph are inclusion relationships between tables and fields, or foreign key association relationships between tables; the pre-aligned entity pairs are a pair of pre-labeled entities with the same high-speed rail business semantics; A feature extraction module, configured to extract features from the first original graph, the second original graph, the first twin graph, and the second twin graph using a twin graph convolutional network model, to obtain first entity features and relationship features and second entity features and relationship features, wherein the twin graph convolutional network model is pre-trained based on the pre-aligned entity pairs; a feature aggregation module, configured to perform feature aggregation on the first entity features and relationship features, and the second entity features and relationship features using a multi-view adjacency matrix to obtain a first enhanced entity feature of the first original graph and a second enhanced entity feature of the second original graph, wherein the multi-view adjacency matrix represents the adjacency relationship between entities at different viewing angles; An alignment inference module is used to determine an entity alignment result of the first original map and the second original map according to the similarity between the first enhanced entity feature and the second enhanced entity feature.

[0016] Optionally, the building blocks include: A first construction submodule is configured to generate a corresponding reverse edge for each original edge in the first original graph and the second original graph, wherein the reverse edge has a direction opposite to the original edge and has opposite semantics; A second construction submodule is configured to determine a set of pre-aligned entity pairs from the high-speed rail dataset, wherein the pre-aligned entity pairs include a first pre-aligned entity in the first original map and a second pre-aligned entity in the second original map; The third construction submodule is used to replace the first pre-aligned entity in the first original map with the second pre-aligned entity to generate a first twin map, and to replace the second pre-aligned entity in the second original map with the first pre-aligned entity to generate a second twin map.

[0017] Optionally, the twin graph convolutional network model includes multiple network blocks; the feature extraction module includes: A first feature extraction submodule is configured to perform feature extraction on the first original graph, the second original graph, the first twin graph, and the second twin graph in sequence through the multiple network blocks to obtain output results of each network block; wherein the latter network block processes the output result of the former network block, and the output result includes intermediate entity features and intermediate relationship features of the first original graph, the second original graph, the first twin graph, and the second twin graph; The second feature extraction submodule is used to splice the first original graph output by each of the multiple network blocks and the intermediate entity features and intermediate relationship features of the first original graph along the feature dimension to obtain the first entity features and relationship features, and to splice the second original graph output by each of the multiple network blocks and the intermediate entity features and intermediate relationship features of the second twin graph along the feature dimension to obtain the second entity features and relationship features.

[0018] Optionally, the device further comprises: An aggregation module is used to aggregate the entity features of each entity and its neighboring entities in the first original graph, the second original graph, the first twin graph, and the second twin graph through a context-aware graph convolution layer to obtain the intermediate entity features of the first original graph, the second original graph, the first twin graph, and the second twin graph output by the current network block. The adjacent entities of each entity are other entities directly connected to the entity through edges; an exchange module, configured to exchange intermediate entity features of entities shared between the first original graph and the second twin graph, and exchange intermediate entity features of entities shared between the second original graph and the first twin graph, through a pre-aligned entity interaction layer; The transformation module is used to perform linear transformation on the relationship features of each edge in the first original graph, the second original graph, the first twin graph and the second twin graph through a fully connected layer to obtain the intermediate relationship features of the first original graph, the second original graph, the first twin graph and the second twin graph output by the current network block.

[0019] Optionally, the device further comprises: An adjacency matrix construction module is configured to construct a first adjacency matrix, a second adjacency matrix, a third adjacency matrix, and a fourth adjacency matrix based on the first original graph and the second original graph in which reverse edges are generated, respectively; wherein the first adjacency matrix indicates the number of edges directly connected between entities; the second adjacency matrix indicates whether a target entity is directly connected to other entities through a target relationship; the third adjacency matrix indicates whether a target entity is directly connected to other entities through a target relationship; and the fourth adjacency matrix indicates whether entities are directly connected through a target relationship. An application module is configured to use the first adjacency matrix, the second adjacency matrix, the third adjacency matrix, and the fourth adjacency matrix as the multi-view adjacency matrix.

[0020] Optionally, the feature aggregation module includes: A first feature aggregation submodule is configured to aggregate entity features and relationship features of the first original graph and the second original graph based on the adjacency relationship between different views in the multi-view adjacency matrix, respectively, to obtain entity features of the first original graph and the second original graph with different degrees of enhancement; The second feature aggregation submodule is used to splice the entity features of different enhancement degrees of the first original map along the feature dimension to generate enhanced entity features of the first original map, and to splice the entity features of different enhancement degrees of the second original map along the feature dimension to generate enhanced entity features of the second original map.

[0021] Optionally, the first feature aggregation submodule includes: a first feature aggregation unit, configured to aggregate entity features of the first original graph and the second original graph using the third adjacency matrix to obtain corresponding enhanced relationship features; A second feature aggregation unit is configured to combine the entity features and enhanced relationship features of the first original graph and the second original graph using the first adjacency matrix and the second adjacency matrix to obtain corresponding first enhanced entity features respectively; a third feature aggregation unit, configured to aggregate the relationship features of the first original graph and the second original graph using the fourth adjacency matrix to generate corresponding adjacent entity pair features; The fourth feature aggregation unit is used to further calculate the corresponding second enhanced entity feature based on the adjacent entity pair features of the first original map and the second original map, where the enhancement degree of the second enhanced entity feature is higher than that of the first enhanced entity feature.

[0022] Optionally, the alignment inference module includes: a first alignment inference submodule, configured to determine a feature vector corresponding to each entity based on the enhanced entity features of the first original graph to obtain a first entity feature vector set, and to extract a feature vector corresponding to each entity based on the enhanced entity features of the second original graph to obtain a second entity feature vector set; a second alignment inference submodule, configured to calculate, based on the first entity feature vector set and the second entity feature vector set, the feature distance between each pair of entities in the first original graph and the second original graph, and generate a distance matrix; wherein each element of the distance matrix represents the feature distance between an entity in the first original graph and an entity in the second original graph, and a smaller feature distance indicates a higher similarity; a third alignment inference submodule, configured to sort each row of the distance matrix in ascending order to obtain a candidate alignment entity list for each entity of the first original graph in the second original graph; The fourth alignment inference submodule is used to screen out a pair of entities with the smallest feature distance from the candidate alignment entity list, and determine the entity alignment result of the first original map and the second original map.

[0023] Optionally, the building blocks include: A fourth construction submodule is configured to obtain first metadata and second metadata from different data sources from the high-speed rail dataset; a fifth construction submodule, configured to extract tables and fields as entities of the first original graph based on the first metadata, and to construct edges of the first original graph according to the inclusion relationship between tables and fields and the foreign key relationship between tables; The sixth construction submodule is used to extract tables and fields as entities of the second original graph based on the second metadata, and to construct edges of the second original graph according to the inclusion relationship between tables and fields and the foreign key relationship between tables.

[0024] The technical solutions provided by the embodiments of the present invention bring at least the following beneficial effects: The present invention combines the twin graph convolutional network model and the multi-view adjacency matrix to effectively solve the entity alignment problem of traditional methods in the context of high-speed rail data heterogeneity and complexity. First, by constructing the original graphs of two heterogeneous high-speed rail data sources and exchanging the pre-aligned entity pairs, a twin graph is generated, and then the twin graph convolutional network model is used to extract features and fully explore the deep semantic information of entities and relationships. Subsequently, the extracted features are aggregated through the multi-view adjacency matrix to capture the association relationship between entities from different perspectives, effectively enhancing the expressive power of entity features. Not only does it improve the accuracy of entity alignment, but it can also automatically process entity alignment tasks, avoiding the limitations of traditional reliance on manual rules, improving the processing capabilities of complex data sets, and saving labor costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0026] Figure 1 This is a schematic diagram of the steps of a knowledge graph entity alignment method for high-speed rail data provided by one embodiment of the present invention; Figure 2 This is a schematic diagram of the overall architecture of a knowledge graph entity alignment method for high-speed rail data in one embodiment of the present invention; Figure 3 1 is a schematic diagram of the processing flow of the Kth network block of the twin graph convolutional network model in one embodiment of the present invention; Figure 4 This is a structural block diagram of a knowledge graph entity alignment device for high-speed rail data provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0027] Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention. In the description of the embodiments of the present invention, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In the present invention, "at least one" refers to one or more, and "more than one" refers to two or more. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or multiple items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.

[0028] Entity alignment (EA), a technique designed to discover equivalent entities between different knowledge graphs, has received increasing attention in recent years. It can facilitate the integration of disparate data sources. Currently, mainstream entity alignment methods are based on representation learning. These methods encode entities and relationships into a vector space and calculate the similarity between entities using a metric function to achieve alignment. Existing methods primarily embed entities with high-dimensional information into a low-dimensional vector space through the construction of deep learning models. However, these methods suffer from two core flaws: First, these techniques fail to fully integrate the structural interactions between entities and relationships and overly rely on auxiliary information (such as high-quality entity names, entity-related textual descriptions, and entity-related images). This information is often missing in high-speed rail data (for example, data tables lack annotations, and table and field names contain semantically ambiguous abbreviations). Methods that rely on auxiliary information underutilize this structural information in this scenario, resulting in a sharp decline in accuracy. Second, mainstream methods focus on encoder design, while decoding strategies are based solely on similarity matrices, ignoring the inherent structural information of the knowledge graph. This results in information loss and limited alignment accuracy.

[0029] Based on the inherent characteristics of high-speed rail business data itself, and in response to the problems existing in the above-mentioned existing methods, the present invention proposes a knowledge graph entity alignment method for high-speed rail data integration. The core idea is to fully explore the deep structural associations of heterogeneous data by constructing a twin graph structure and a multi-view adjacency matrix, combined with a context-aware graph convolutional network. Specifically, first, a twin graph is generated based on the exchange of pre-aligned entity pairs to enhance cross-graph signal propagation; secondly, a twin graph convolutional network model is constructed to capture the composite features of entities and relationships through multi-layer network blocks with shared parameters, and a pre-aligned entity interaction layer is introduced to enhance the cross-graph alignment capability; further, the multi-view adjacency matrix is ​​used to aggregate adjacency relationships of different dimensions to generate fine-grained enhanced entity features, and finally high-precision entity alignment is achieved through similarity calculation. The present invention abandons the reliance on auxiliary information and only uses structural information and a small amount of pre-aligned seeds to significantly improve the accuracy and automation level of entity alignment in heterogeneous data integration scenarios.

[0030] Figure 1 This is a schematic diagram of the steps of a knowledge graph entity alignment method for high-speed rail data provided by an embodiment of the present invention. Figure 1 , the method comprising: Step S101: construct a first original graph and a second original graph based on two heterogeneous high-speed rail source data, and exchange the pre-aligned entity pairs in the first original graph and the second original graph to obtain a first twin graph and a second twin graph. The entities in the first original graph and the second original graph are tables or fields of at least one of high-speed rail train operation data, equipment monitoring data, infrastructure data and passenger service data; the edges in the first original graph and the second original graph are inclusion relationships between tables and fields, or foreign key association relationships between tables; the pre-aligned entity pairs are a pair of pre-labeled entities with the same high-speed rail business semantics.

[0031] This step aims to construct an initial knowledge graph (i.e., the first original graph and the second original graph) from two heterogeneous high-speed rail data sources and generate twin graphs by exchanging pre-aligned entity pairs to enhance cross-graph semantic relevance. Specifically, by parsing the first and second metadata of the heterogeneous data sources, the tables, fields, and their relationships in the high-speed rail data are converted into a structured representation of the knowledge graph. By exchanging pre-aligned entity pairs, the first and second twin graphs with cross-graph alignment signals are generated. This provides high-information structured input for subsequent entity alignment, addressing the accuracy issues inherent in existing methods due to insufficient utilization of structural information.

[0032] The entities in the first and second original graphs are tables and fields extracted from the following data: high-speed rail train operation data (including train number, departure time, arrival time, train type, etc.), equipment monitoring data (including sensor data, equipment status, fault information, etc.), infrastructure data (including station information, track status, power equipment and other infrastructure-related data) and passenger service data (including passenger ticket booking information, service evaluation, station facilities, etc.).

[0033] In an embodiment, there are two types of edges between the first original graph and the second original graph. One is the inclusion relationship between tables and fields, which means that a table contains certain fields, such as a "train" table containing "train number" and "departure time" fields. This inclusion relationship indicates the connection between the "train" table and its fields. The second is the foreign key association relationship between tables. In a database, different tables are associated through foreign keys. For example, the "train table" can be associated with the "station table" through the "station number". The edges of the first original graph and the second original graph represent how the entities of different high-speed rail data are related to each other.

[0034] In this embodiment, entities can be understood as nodes in a graph, and edges can be understood as connections between entity nodes in the graph.

[0035] In an optional implementation, step S101 specifically includes: Step S1011: Acquire first metadata and second metadata from different data sources from the high-speed rail dataset.

[0036] Use database management tools (such as SQL queries and ETL tools) or APIs to access the metadata repository for the high-speed rail dataset (e.g., database system tables) and obtain primary and secondary metadata from different data sources. Primary and secondary metadata include table information, foreign key information, and field attributes. Clean and standardize primary and secondary metadata to eliminate naming ambiguities (e.g., unifying uppercase and lowercase letters and removing special characters) to ensure consistency in subsequent graph construction.

[0037] Step S1012: Based on the first metadata, extract tables and fields as entities of the first original graph, and construct edges of the first original graph according to the inclusion relationship between tables and fields and the foreign key relationship between tables.

[0038] Step S1013: Based on the second metadata, extract tables and fields as entities of the second original graph, and construct edges of the second original graph according to the inclusion relationship between tables and fields and the foreign key relationship between tables.

[0039] For the first and second metadata, tables or fields are identified as entities in the corresponding graph. The relationships between entities are treated as edges in the corresponding graph, including the affiliation between tables and fields (e.g., "Train Schedule" contains the "Train Number" field) and the foreign key relationships between tables (e.g., the "Train Number Table" is linked to the "Station Table" through a foreign key).

[0040] Specifically, for the first metadata and the second metadata, each table is mapped to an entity with a type marked as Table, and each field is mapped to another entity with a type marked as Field.

[0041] Add edges from a table entity to its field entities, and add edges between table entities that have foreign key relationships.

[0042] The first original graph can be represented as a set of triples:

[0043] in, is the entity set of the first original graph, is the relationship set of the first original graph, is the triple set of the first original graph.

[0044] In this embodiment, each triple in the triple set consists of a head entity, a relationship, and a tail entity, which can intuitively represent the relationship between entities. For example, (head entity: train 101, relationship: departure from, tail entity: Beijing Station) means that train 101 departs from Beijing Station.

[0045] Similarly, the second original graph can be represented as a set of triples:

[0046] in, is the entity set of the second original graph, is the relationship set of the second original graph, is the triple set of the second original graph.

[0047] In an optional implementation, step S101 further includes steps S1014 to S1016: Step S1014: Generate a corresponding reverse edge for each original edge in the first original graph and the second original graph, wherein the reverse edge has a direction opposite to the original edge and has opposite semantics.

[0048] A reverse edge is a directed edge with the opposite direction and semantics to the original edge. The semantics of a reverse edge correspond to those of the original edge. For example, the reverse edge of a "reference" relationship can be defined as "referenced by." If the original edge represents a "contains" relationship, its reverse edge can be defined as "contained by."

[0049] For each triple in the first original graph and the second original graph , generate the corresponding reverse triples ,in, Represents A semantically opposite relationship.

[0050] Backward edges allow information to propagate in both directions. For example, "Table A references Table B" and "Table B is referenced by Table A" both reflect bidirectional dependencies. By adding reverse edges, the density of the graph's adjacency matrix increases, providing more neighborhood interaction signals for subsequent graph convolutional networks.

[0051] The triplet set of the first / second original graph is , the set of reverse edges expanded is:

[0052] The reverse edge relationship set is defined as ={ | ∈ }.

[0053] By generating reverse edges, the topological structure of the graph is explicitly expanded, solving the problem of feature expression deviation caused by insufficient unidirectional relationship modeling in traditional methods, and providing more comprehensive structural information support for subsequent entity alignment.

[0054] Step S1015: determining a set of pre-aligned entity pairs from the high-speed rail dataset, where the pre-aligned entity pairs include a first pre-aligned entity in the first original map and a second pre-aligned entity in the second original map.

[0055] Pre-aligned entity pairs refer to semantically equivalent entity pairs in two graphs that are pre-determined by manual annotation or automated tools, that is, a pair of entities with the same high-speed rail business semantics, such as the first original graph The first pre-aligned entity "train timetable" and the second original graph The second pre-alignment entity "schedule" in constitutes a pre-alignment entity pair.

[0056] The set of pre-aligned entity pairs is defined as:

[0057] in, is the first pre-aligned entity, is the second pre-aligned entity, Indicates semantic equivalence.

[0058] Step S1016: Replace the first pre-aligned entity in the first original map with the second pre-aligned entity to generate a first twin map, and replace the second pre-aligned entity in the second original map with the first pre-aligned entity to generate a second twin map.

[0059] The first twin graph and the second twin graph are derived graphs generated by replacing pre-aligned entity pairs. Their structure is partially consistent with the corresponding original graph, but contains cross-graph entity mappings. The first pre-aligned entity in the first original graph and the second pre-aligned entity in the second original graph are replaced with the corresponding entity in the other graph, forcing the cross-graph structure to align.

[0060] Figure 2 This is a schematic diagram of the overall architecture of a knowledge graph entity alignment method for high-speed rail data in one embodiment of the present invention. Figure 2 The legend shown in the data enhancement processing section is to transform the first original atlas All first pre-aligned entities in Replace with the second original map The corresponding entity in , get the first twin map Similarly, the second original map All second pre-aligned entities in Replace with the first original map The corresponding entity in , get the second twin map ,.

[0061] Defining a mapping function :

[0062] As a mathematical description of the replacement process of the above pre-aligned entity pairs.

[0063] The set of triples of the first / second twin graph is:

[0064] Step S102: Use the twin graph convolutional network model to extract features from the first original graph, the second original graph, the first twin graph, and the second twin graph to obtain first entity features and relationship features and second entity features and relationship features. The twin graph convolutional network model is pre-trained based on the pre-aligned entity pairs.

[0065] This step aims to extract multi-level features from the first original graph, the second original graph, the first twin graph, and the second twin graph using a twin graph convolutional network model, generating highly expressive entity and relationship features. This step utilizes a cascaded structure of multiple network blocks, combined with context-aware graph convolution, pre-aligned entity interactions, and feature splicing techniques, to fully exploit the structural and semantic information of the graphs and provide fine-grained feature representations for subsequent entity alignment.

[0066] In an optional implementation, step S102 specifically includes steps S1021 to S1022: Step S1021, feature extraction is performed on the first original graph, the second original graph, the first twin graph and the second twin graph in sequence through the multiple network blocks to obtain the output results of each network block; wherein, the latter network block processes the output result of the previous network block, and the output results include the intermediate entity features and intermediate relationship features of the first original graph, the second original graph, the first twin graph and the second twin graph.

[0067] The twin graph convolutional network block is a composite module consisting of a context-aware graph convolution layer, a pre-aligned entity interaction layer, and a fully connected layer, which is used to extract and enhance graph features layer by layer. The context-aware graph convolution layers of the first and second original graphs share weights (see Figure 3), ensuring the consistency of the feature embedding space. Each network block outputs intermediate entity features and intermediate relationship features, retaining information at different levels of abstraction through a cascade structure.

[0068] See Figure 2 In the process shown in the "Twin Graph Convolutional Coding" section, in an optional implementation, each network block processes the output of the previous network block according to the following steps: Through the context-aware graph convolution layer, the entity features of each entity and its neighboring entities in the first original graph, the second original graph, the first twin graph and the second twin graph are aggregated to obtain the intermediate entity features of the first original graph, the second original graph, the first twin graph and the second twin graph output by the current network block. The adjacent entities of each entity are other entities directly connected to the entity through edges.

[0069] In this embodiment, entity features and relationship features are embedded in two forms: entity embeddings and relationship embeddings. Entity embeddings are generated via a context-aware graph convolutional layer. Entity embeddings not only include their own features but also aggregate contextual information from neighboring entities and relationships. Relationship embeddings are directly updated via fully connected layers. Relationship embeddings, on the other hand, do not rely on neighborhood aggregation. Instead, they are mapped from the embedding of the previous layer to a new space via a linear transformation, preserving the independence of relationships. Entity embeddings focus on capturing the structural associations between entities (such as foreign key relationships and inter-table associations), while relationship embeddings focus on modeling the semantics of relationships.

[0070] Figure 3 This is a schematic diagram of the processing flow of the Kth network block of the twin graph convolutional network model in one embodiment of the present invention. Please refer to Figure 3 , the input of the K+1th context-aware graph convolutional layer is the entity embedding matrix of the kth layer , the input of the K+1th fully connected layer is the relation embedding matrix of the kth layer , where the entity embedding matrix includes the entity embedding matrix composed of the entity features of the first original graph , the entity embedding matrix composed of the entity features of the second original graph , the entity embedding matrix composed of entity features of the first twin graph And the entity embedding matrix composed of the entity features of the second twin graph The dimension of the entity embedding matrix is ​​d, and the dimension of the relationship embedding matrix is .

[0071] Each entity Neighbor set It is defined as the set of entities directly connected to it via edges.

[0072] For each entity Neighbor entity , calculate its semantic context vector :

[0073] in, Neighbor entity Embedding at layer k. For connection and relationship Embedding at layer k. It is a multi-channel learnable parameter used to dynamically adjust the weights of entities and relations (range 0, 1).

[0074] Through the scoring function Calculate each neighbor context pair central entity Contribution weight , to distinguish the importance of different neighbors, for example, foreign key relationship neighbors may be more critical than containment relationship neighbors.

[0075]

[0076] Weighted aggregation of all neighbor features and through learnable parameters and normalization operations to update entity embeddings :

[0077] , a learnable matrix for feature transformation. Represents L2 normalization along the feature dimension to prevent gradient explosion.

[0078] The context-aware graph convolutional layer solves the feature bias problem caused by ignoring the contribution of relationships in traditional methods by dynamically fusing entity and relationship semantics, and significantly improves the accuracy of local structure modeling.

[0079] Through the pre-aligned entity interaction layer, the intermediate entity features of the common entities between the first original map and the second twin map are exchanged, and the intermediate entity features of the common entities between the second original map and the first twin map are exchanged.

[0080] For the pre-aligned entity pair set , do the following: The first original map and the second twin map between:

[0081] The second original atlas and the first twin map between:

[0082] in, Represents an embedded bidirectional exchange.

[0083] Assumptions Entity and Entity For pre-aligned entity pairs, layer, in middle The intermediate solid feature of middle The intermediate entity features. middle The intermediate solid feature of middle The intermediate entity features of . Similarly, in middle The intermediate solid feature of middle The intermediate entity features. middle The intermediate solid feature of middle The intermediate entity features.

[0084] Through embedding exchange, the Siamese Graph Convolutional Network model explicitly perceives alignment relationships in the feature space, enabling subsequent graph convolution computations to directly leverage cross-graph semantic consistency. The pre-aligned entity interaction layer transforms manually annotated alignment knowledge into hard constraints in the feature space, addressing the issue of weakening implicit alignment signals due to data heterogeneity.

[0085] Through the fully connected layer, the relationship features of each edge in the first original graph, the second original graph, the first twin graph and the second twin graph are linearly transformed to obtain the intermediate relationship features of the first original graph, the second original graph, the first twin graph and the second twin graph output by the current network block.

[0086] The fully connected layer improves the expressiveness of relational embeddings through linear transformations, adapting them to different levels of semantic abstraction. The relational transformations between the first / second original graph and the first / second twin graph share weights, ensuring consistency of relational semantics across graphs.

[0087] The input of the fully connected layer is the relation embedding matrix of the kth layer .

[0088] Update the relationship features through a single-layer fully connected network:

[0089] Where, Learnable weight matrix and bias . Weight matrix Use Xavier initialization.

[0090] The fully connected layer enhances the distinguishability of relational semantic spaces at different abstraction levels through nonlinear transformation, making up for the insufficient feature expression ability of traditional methods due to the single relational representation method.

[0091] No. The network block is Output of the layer and As input, the context-aware graph convolution layer, pre-aligned entity interaction layer and fully connected layer operations are performed in sequence to generate a higher level (like Figure 3 shown 、 )and For example, after 3 network blocks, entity features contain multi-level information of local structure (1st layer), cross-graph alignment (2nd layer), and global semantics (3rd layer).

[0092] Step S1022: splice the intermediate entity features and intermediate relationship features of the first original graph and the first twin graph output by each of the multiple network blocks along the feature dimension to obtain the first entity features and relationship features, and splice the intermediate entity features and intermediate relationship features of the second original graph and the second twin graph output by each of the multiple network blocks along the feature dimension to obtain the second entity features and relationship features.

[0093] Concatenate the first original graph output by each network block with the intermediate entity features and intermediate relationship features of the first twin graph along the feature dimension:

[0094]

[0095] in, Represents a concatenation operation along the feature dimension.

[0096] Do the same for the first and second original maps:

[0097]

[0098] Assume that the entity embedding dimension output by each network block is ,go through After the network blocks are spliced ​​together, the final entity feature dimension is (The original graph and the twin graph each contribute dimensions).

[0099] This embodiment integrates features from different levels and sources (original graph and twin graph), so that the final entity representation contains both underlying structural details and high-level semantic abstractions, significantly improving the ability to discriminate complex semantics in alignment tasks.

[0100] In an optional embodiment, the twin graph convolutional network model is constructed according to the following steps: Step S201: Generate multiple pairs of negative sample data based on multiple pairs of positive sample data to obtain a training data set, where each pair of positive sample data is a pair of entities with the same high-speed rail business semantics, and each pair of negative sample data is a pair of entities with different high-speed rail business semantics.

[0101] Positive sample data refers to pre-aligned entity pairs with the same high-speed rail business semantics (with annotated alignment relationship), for example ,in, is a set of pre-aligned entity pairs, and from the first original map and the second original map, respectively.

[0102] Negative sample data refers to entity pairs with different high-speed rail business semantics (unaligned), which are generated through a negative sampling strategy and used to train the model to distinguish aligned and non-aligned entities.

[0103] From the set of pre-aligned entity pairs Divide the training set into a ratio (e.g. 7:3) and validation set .

[0104] like , but Contains the top 70% of pre-aligned entity pairs.

[0105] For each positive example , randomly select non-aligned entities from another graph , generate negative pairs and Based on the local structure of the first / second original graph, entities with similar neighbors but not aligned with the positive entity are selected as negative examples. For example, if If the neighbors of contain table A, then entities whose neighbors contain table B are selected from another graph as negative examples.

[0106] Training dataset Contains positive example set and negative example set ,in:

[0107] Step S202, with the goal of minimizing the embedding distance of each pair of positive sample data and maximizing the embedding distance of each pair of negative sample data, uses the training data set to train the twin graph convolutional network model, and obtains the twin graph convolutional network model when the training end condition is met.

[0108] This embodiment uses a contrast loss function to optimize model parameters. The loss function can be shown as follows:

[0109] Where, is the L2 norm distance of entity features; is the negative example loss weight, which is used to balance the contribution of positive and negative examples. is the spacing parameter, forcing the embedding distance of negative pairs to be at least greater than .

[0110] Input the first / second original graph and the first / second twin graph into the twin graph convolutional network model, extract entity features and relationship features through multiple network blocks, and generate an embedding matrix .

[0111] The contrast loss of positive and negative pairs is calculated based on the embedding matrix, and the model parameters are updated through the gradient descent algorithm. The optimization goal is to minimize the total loss. .

[0112] Monitor the alignment accuracy on the validation set. If the accuracy does not improve within two consecutive validation cycles, stop training early, save the optimal model parameters, and apply them to the twin graph convolutional network model.

[0113] Step S103: Perform feature aggregation on the first entity features and relationship features, and the second entity features and relationship features using a multi-view adjacency matrix to obtain first enhanced entity features of the first original graph and second enhanced entity features of the second original graph. The multi-view adjacency matrix represents the adjacency relationship between entities under different perspectives.

[0114] This embodiment uses a multi-view adjacency matrix to perform multi-dimensional aggregation of entity and relationship features from the first and second original graphs to generate fine-grained enhanced entity features. The multi-view adjacency matrix describes the adjacency relationships between entities from different perspectives, including the number of direct connections, relationship type, directionality, etc., thereby comprehensively capturing the structural information of the graphs. Through multi-view feature fusion, the model can overcome the limitations of a single adjacency matrix and significantly improve the accuracy of entity alignment.

[0115] Before performing feature aggregation on the first entity features and relationship features and the second entity features and relationship features using the multi-view adjacency matrix, the method further includes: Step S301, based on the first original graph and the second original graph that generate reverse edges, construct a first adjacency matrix, a second adjacency matrix, a third adjacency matrix and a fourth adjacency matrix respectively; wherein the first adjacency matrix represents the number of edges directly connected between entities; the second adjacency matrix represents whether the target entity is directly connected to other entities through the target relationship; the third adjacency matrix represents whether the target entity is directly connected to other entities through the target relationship; the fourth adjacency matrix represents whether the entities are directly connected through the target relationship.

[0116] See Figure 2 The process shown in the "Multi-view Enhanced Decoding" section in , where the first adjacency matrix (entity-entity adjacency matrix, ) represents the number of directly connected edges between entities, reflecting the connection strength between entities. The elements of the first adjacency matrix can be expressed as:

[0117] in, is the cardinality of the set, counting entities and The number of direct edges between . For Entity The degree (number of neighbor entities) of .

[0118] The second adjacency matrix (head entity-relationship adjacency matrix, ) indicates whether the entity is connected to other entities as the head entity through a specific relationship. The elements of the second adjacency matrix can be expressed as:

[0119] The second adjacency matrix dimension is , in the above formula, is the number of entities, is the number of relationship types.

[0120] The third adjacency matrix (relation-tail entity adjacency matrix, ) indicates whether the entity is connected to other entities as a tail entity through a specific relationship. The elements of the third adjacency matrix can be expressed as:

[0121] The third adjacency matrix dimension is .

[0122] The fourth adjacency matrix (entity pair-relationship adjacency matrix, ) indicates whether the entity pairs are directly connected through a specific relationship, characterizing the multiple relationships of the entity pairs. The elements of the fourth adjacency matrix can be expressed as:

[0123] The fourth adjacency matrix dimension is , in the above formula, is the number of unique entity pairs.

[0124] Step S302: Use the first adjacency matrix, the second adjacency matrix, the third adjacency matrix, and the fourth adjacency matrix as the multi-view adjacency matrix.

[0125] The four types of adjacency matrices are combined into a unified feature aggregation input to achieve the complementarity and enhancement of structural information. Different views focus on the quantitative strength of the connection ( ), relationship directionality ( 、 ) and multiple semantics ( ).

[0126] Specifically, the four types of adjacency matrices are used as multi-view inputs and formally expressed as:

[0127] The integration of multi-view adjacency matrices provides a more comprehensive structural representation, enabling the feature aggregation process to adaptively utilize information from different views and significantly improve the discriminability of entity representation.

[0128] In an optional implementation, step S103 specifically includes steps S1031 to S1032: Step S1031: Based on the adjacency relationship between different views in the multi-view adjacency matrix, the entity features and relationship features of the first original graph and the second original graph are aggregated respectively to obtain entity features of the first original graph and the second original graph with different enhancement degrees.

[0129] This step aggregates the entity features and relationship features of the first original graph and the second original graph in layers through the different viewpoint adjacency relationships of the multi-view adjacency matrix to generate entity features with different enhancement levels. In an optional embodiment, step S1031 specifically includes steps S10311 to S1034: Step S10311: Aggregate the entity features of the first original graph and the second original graph through the third adjacency matrix to obtain corresponding enhanced relationship features.

[0130] The third adjacency matrix (relationship-tail entity adjacency matrix) indicates whether the entity serves as a tail entity (connected by other entities through specific relationships), reflecting the passive relevance of the entity in the relationship.

[0131] Input the entity feature matrix (output from step S102) and the third adjacency matrix. For each relation, average the embeddings of all the tail entities connected to it.

[0132] An enhanced relation feature matrix with the same dimension as entity feature is generated to reflect the semantic role of the entity in the passive relation.

[0133] By capturing the passive association pattern of entities as tail entities, the enhanced relationship features supplement the reverse semantic information ignored in traditional methods and improve the model's ability to understand complex relationships.

[0134] Step S10312: Combine the entity features and enhanced relationship features of the first original graph and the second original graph using the first adjacency matrix and the second adjacency matrix to obtain corresponding first enhanced entity features.

[0135] The first adjacency matrix is ​​used to perform neighbor aggregation on entity features. For each entity, the features of its neighboring entities are weighted averaged according to the number of connections to generate structure-enhanced entity features.

[0136] The second adjacency matrix is ​​used to fuse the relational features. For each entity, the relational features involved when it is used as the head entity (from step S10311) are averaged and summed to generate a relation-aware composite feature.

[0137] The structure-enhanced features and the relationship-aware features are linearly combined to form the first enhanced entity features. For example, for the table entity "Train Schedule", its structure features reflect the number of fields it contains, and its relationship features reflect the other tables referenced by its foreign keys.

[0138] The first enhanced entity feature combines structural connection strength and active relationship semantics, providing basic discriminant information for entity alignment.

[0139] Step S10313: Aggregate the relationship features of the first original graph and the second original graph through the fourth adjacency matrix to generate corresponding adjacent entity pair features.

[0140] Input the relation feature matrix and the fourth adjacency matrix. Traverse all entity pairs and extract the types of their connections through different relations.

[0141] For each entity pair, the embeddings of all the relationships involved are averaged and summed, and then compressed into a fixed-dimensional feature vector through a fully connected layer. For example, an entity pair (train schedule, station information) may be connected by two relationships: "reference" and "dependency", and its features will incorporate the semantics of these two relationships.

[0142] The adjacent entity pair feature captures the joint effect of multiple relationships between entities and addresses the limitations of single relationship modeling.

[0143] Step S10314: further calculating and obtaining corresponding second enhanced entity features based on the adjacent entity pair features of the first original graph and the second original graph, wherein the enhancement degree of the second enhanced entity features is higher than that of the first enhanced entity features.

[0144] Expand the first adjacency matrix into a multi-channel adjacency matrix with the following dimensions: , where d is the feature dimension of the adjacent entity pair feature. The multi-channel adjacency matrix can be viewed as a stack of d slices of the first adjacency matrix, where the adjacency weight in the kth slice is the value of the kth dimension of the corresponding adjacent entity pair feature.

[0145] The entity features of the first and second original graphs are fused using a multi-channel adjacency matrix. For each entity, the features of its neighboring entities are weighted and summed according to the slices of the multi-channel adjacency matrix to obtain multiple feature vectors. These feature vectors are compressed into fixed-dimensional feature vectors through a fully connected layer and concatenated to generate the second enhanced entity feature. The second enhanced entity feature significantly improves the discriminative power of entity representation through multi-level semantic fusion, making it particularly suitable for capturing complex neighborhood structure information in heterogeneous data.

[0146] Step S1032: splice the entity features of different enhancement degrees of the first original atlas along the feature dimension to generate enhanced entity features of the first original atlas, and splice the entity features of different enhancement degrees of the second original atlas along the feature dimension to generate enhanced entity features of the second original atlas.

[0147] The entity features of different enhancement levels are connected along the feature dimension to form a composite feature vector. Specifically, for the first original atlas, its entity features, the first enhanced entity features and the second enhanced entity features are spliced ​​according to the dimension to form the final enhanced entity feature matrix . Perform the same operation on the second original atlas to form the final enhanced entity feature matrix .

[0148] It is understandable that traditional entity alignment methods usually rely on simple rule matching or processing methods based on translation models, which often cannot fully explore the deep semantic information of entities and relationships, resulting in inaccurate alignment between entities. At the same time, when processing information from different data sources, traditional solutions are difficult to effectively connect entities and relationships in heterogeneous graphs, especially for the problem of aligning entities with different representations. The twin graph convolutional encoding and multi-view enhanced decoding method proposed in the present invention combines the advantages of the twin graph convolutional network and introduces multi-view data enhancement to optimize the encoding and decoding process. Specifically, the present invention can simultaneously process entities and relationships in two graphs through the twin graph convolutional network, capturing semantic information from different perspectives. Unlike traditional methods, the twin graph convolutional network model can effectively capture the deep semantic associations between entities through contextual graph convolution. It does not rely on surface features, but fully combines graph structure information for deep learning. By introducing multi-view enhanced decoding, entity and relationship information from multiple perspectives is combined. Each perspective provides a different knowledge granularity, which helps to maximize the fusion of information from all parties in the decoding stage. This effectively eliminates the information loss problem found in traditional methods, improving the accuracy of entity alignment while ensuring decoding efficiency. Multi-view enhanced decoding avoids the over-reliance on a single viewpoint in traditional methods when processing complex cross-domain knowledge graphs, thereby improving the system's adaptability and robustness.

[0149] It can be seen that the present invention can more effectively capture the relationship and similarity between entities, significantly improve the alignment accuracy, and has stronger robustness and processing capabilities than traditional solutions.

[0150] Step S104: determining an entity alignment result of the first original graph and the second original graph according to the similarity between the first enhanced entity feature and the second enhanced entity feature.

[0151] See Figure 2 The process shown in the "Alignment Inference" section determines the final entity alignment result by calculating the similarity between the enhanced entity features of the first and second original graphs. Specifically, high-precision entity matching is achieved through feature vector distance measurement, distance matrix generation, and candidate list sorting and screening. This invention combines multi-view enhancement features with structured similarity calculation and screening to significantly improve the reliability and applicability of the alignment results.

[0152] In an optional implementation, step S104 specifically includes steps S1041 to S1044: Step S1041: Determine the feature vector corresponding to each entity based on the enhanced entity features of the first original graph to obtain a first entity feature vector set; and extract the feature vector corresponding to each entity based on the enhanced entity features of the second original graph to obtain a second entity feature vector set.

[0153] Input the enhanced entity feature matrix of the first original graph and the enhanced entity feature matrix of the second original graph .

[0154] Traverse each entity and extract its corresponding feature vector from the matrix by index. For example, the entity The eigenvector of .

[0155] Output the first entity feature vector set , and the second entity feature vector set .

[0156] in, express Middle The feature vector of an entity. express Middle The feature vector of an entity.

[0157] Through index extraction operations, complex high-dimensional feature matrices are converted into directly calculable vector forms, providing efficient input for subsequent similarity calculations.

[0158] Step S1042: Calculate the characteristic distance between each entity in the first original graph and the second original graph based on the first entity feature vector set and the second entity feature vector set, and generate a distance matrix; wherein each element of the distance matrix represents the characteristic distance between an entity in the first original graph and an entity in the second original graph, and the smaller the characteristic distance, the higher the similarity.

[0159] In this embodiment, the feature distance is the distance between two feature vectors measured using the L2 norm (Euclidean distance). The smaller the distance, the higher the semantic similarity. express Medium Entity and Medium Entity The distance of the matrix is .

[0160] Specifically, Each entity in , calculate its All entities in L2 distance:

[0161] in, is the dimension of the feature vector.

[0162] Fill the calculation results into the distance matrix .

[0163] Among them, the distance matrix .

[0164] Step S1043 , sorting each row of the distance matrix in ascending order to obtain a candidate alignment entity list for each entity of the first original graph in the second original graph.

[0165] Distance Matrix Each row of Each entity in All distance values ​​corresponding to all entities in the , sorted in ascending order, to obtain a sorted index list. For example, if Medium Entity and The distance order of entities in is , then the candidate list is .

[0166] for Each entity generates a candidate list with a length of .

[0167] Step S1044 , screening out a pair of entities with the smallest feature distance from the candidate alignment entity list, and determining an entity alignment result of the first original graph and the second original graph.

[0168] For each candidate list, the entity pair with the smallest distance is selected as the alignment result, that is, the entity alignment result of the first original graph and the second original graph is obtained.

[0169] Optionally, select distance less than threshold The smallest entity pair is taken as the alignment result, and the alignment result set is obtained .

[0170] The present invention combines the twin graph convolutional network model and the multi-view adjacency matrix to effectively solve the entity alignment problem of traditional methods in the context of high-speed rail data heterogeneity and complexity. First, by constructing the original graphs of two heterogeneous high-speed rail data sources and exchanging the pre-aligned entity pairs, a twin graph is generated, and then the twin graph convolutional network model is used to extract features and fully explore the deep semantic information of entities and relationships. Subsequently, the extracted features are aggregated through the multi-view adjacency matrix to capture the association relationship between entities from different perspectives, effectively enhancing the expressive power of entity features. It not only improves the processing capabilities of complex data sets and the accuracy of entity alignment, but also improves the degree of automation of high-speed rail data integration tasks, avoiding the limitations of traditional over-reliance on manual rules.

[0171] Figure 4 This is a structural block diagram of a knowledge graph entity alignment device for high-speed rail data provided by an embodiment of the present invention. Figure 4 As shown, the device includes: Construction module 401 is used to construct a first original graph and a second original graph based on two heterogeneous high-speed rail source data, and exchange pre-aligned entity pairs in the first original graph and the second original graph to obtain a first twin graph and a second twin graph, wherein the entities in the first original graph and the second original graph are tables or fields of at least one of high-speed rail train operation data, equipment monitoring data, infrastructure data, and passenger service data; the edges in the first original graph and the second original graph are inclusion relationships between tables and fields, or foreign key association relationships between tables; the pre-aligned entity pairs are a pair of pre-labeled entities with the same high-speed rail business semantics; A feature extraction module 402 is configured to extract features from the first original graph, the second original graph, the first twin graph, and the second twin graph using a twin graph convolutional network model, to obtain first entity features and relationship features and second entity features and relationship features, wherein the twin graph convolutional network model is pre-trained based on the pre-aligned entity pairs; A feature aggregation module 403 is configured to perform feature aggregation on the first entity features and relationship features, and the second entity features and relationship features using a multi-view adjacency matrix to obtain a first enhanced entity feature of the first original graph and a second enhanced entity feature of the second original graph, wherein the multi-view adjacency matrix represents the adjacency relationship between entities at different viewing angles; The alignment inference module 404 is configured to determine an entity alignment result of the first original graph and the second original graph according to a similarity between the first enhanced entity feature and the second enhanced entity feature.

[0172] In an optional embodiment, the building block includes: A first construction submodule is configured to generate a corresponding reverse edge for each original edge in the first original graph and the second original graph, wherein the reverse edge has a direction opposite to the original edge and has opposite semantics; A second construction submodule is configured to determine a set of pre-aligned entity pairs from the high-speed rail dataset, wherein the pre-aligned entity pairs include a first pre-aligned entity in the first original map and a second pre-aligned entity in the second original map; The third construction submodule is used to replace the first pre-aligned entity in the first original map with the second pre-aligned entity to generate a first twin map, and to replace the second pre-aligned entity in the second original map with the first pre-aligned entity to generate a second twin map.

[0173] In an optional embodiment, the twin graph convolutional network model includes multiple network blocks; the feature extraction module includes: A first feature extraction submodule is configured to perform feature extraction on the first original graph, the second original graph, the first twin graph, and the second twin graph in sequence through the multiple network blocks to obtain output results of each network block; wherein the latter network block processes the output result of the former network block, and the output result includes intermediate entity features and intermediate relationship features of the first original graph, the second original graph, the first twin graph, and the second twin graph; The second feature extraction submodule is used to splice the first original graph output by each of the multiple network blocks and the intermediate entity features and intermediate relationship features of the first original graph along the feature dimension to obtain the first entity features and relationship features, and to splice the second original graph output by each of the multiple network blocks and the intermediate entity features and intermediate relationship features of the second twin graph along the feature dimension to obtain the second entity features and relationship features.

[0174] In an optional embodiment, the device further includes: An aggregation module is used to aggregate the entity features of each entity and its neighboring entities in the first original graph, the second original graph, the first twin graph, and the second twin graph through a context-aware graph convolution layer to obtain the intermediate entity features of the first original graph, the second original graph, the first twin graph, and the second twin graph output by the current network block. The adjacent entities of each entity are other entities directly connected to the entity through edges; an exchange module, configured to exchange intermediate entity features of entities shared between the first original graph and the second twin graph, and exchange intermediate entity features of entities shared between the second original graph and the first twin graph, through a pre-aligned entity interaction layer; The transformation module is used to perform linear transformation on the relationship features of each edge in the first original graph, the second original graph, the first twin graph and the second twin graph through a fully connected layer to obtain the intermediate relationship features of the first original graph, the second original graph, the first twin graph and the second twin graph output by the current network block.

[0175] In an optional embodiment, the device further includes: A training sample module is used to generate multiple pairs of negative sample data based on multiple pairs of positive sample data to obtain a training data set, where each pair of positive sample data is a pair of entities with the same high-speed rail business semantics, and each pair of negative sample data is a pair of entities with different high-speed rail business semantics; A training module is used to train the twin graph convolutional network model using the training data set with the goal of minimizing the embedding distance of each pair of positive sample data and maximizing the embedding distance of each pair of negative sample data, and obtain the twin graph convolutional network model when the training completion condition is met.

[0176] In an optional embodiment, the device further includes: An adjacency matrix construction module is configured to construct a first adjacency matrix, a second adjacency matrix, a third adjacency matrix, and a fourth adjacency matrix based on the first original graph and the second original graph in which reverse edges are generated, respectively; wherein the first adjacency matrix indicates the number of edges directly connected between entities; the second adjacency matrix indicates whether a target entity is directly connected to other entities through a target relationship; the third adjacency matrix indicates whether a target entity is directly connected to other entities through a target relationship; and the fourth adjacency matrix indicates whether entities are directly connected through a target relationship. An application module is configured to use the first adjacency matrix, the second adjacency matrix, the third adjacency matrix, and the fourth adjacency matrix as the multi-view adjacency matrix.

[0177] In an optional embodiment, the feature aggregation module includes: A first feature aggregation submodule is configured to aggregate entity features and relationship features of the first original graph and the second original graph based on the adjacency relationship between different views in the multi-view adjacency matrix, respectively, to obtain entity features of the first original graph and the second original graph with different degrees of enhancement; The second feature aggregation submodule is used to splice the entity features of different enhancement degrees of the first original map along the feature dimension to generate enhanced entity features of the first original map, and to splice the entity features of different enhancement degrees of the second original map along the feature dimension to generate enhanced entity features of the second original map.

[0178] In an optional embodiment, the first feature aggregation submodule includes: a first feature aggregation unit, configured to aggregate entity features of the first original graph and the second original graph using the third adjacency matrix to obtain corresponding enhanced relationship features; A second feature aggregation unit is configured to combine the entity features and enhanced relationship features of the first original graph and the second original graph using the first adjacency matrix and the second adjacency matrix to obtain corresponding first enhanced entity features respectively; a third feature aggregation unit, configured to aggregate the relationship features of the first original graph and the second original graph using the fourth adjacency matrix to generate corresponding adjacent entity pair features; The fourth feature aggregation unit is used to further calculate the corresponding second enhanced entity feature based on the adjacent entity pair features of the first original map and the second original map, where the enhancement degree of the second enhanced entity feature is higher than that of the first enhanced entity feature.

[0179] In an optional implementation, the determining module includes: a first alignment inference submodule, configured to determine a feature vector corresponding to each entity based on the enhanced entity features of the first original graph to obtain a first entity feature vector set, and to extract a feature vector corresponding to each entity based on the enhanced entity features of the second original graph to obtain a second entity feature vector set; a second alignment inference submodule, configured to calculate, based on the first entity feature vector set and the second entity feature vector set, the feature distance between each pair of entities in the first original graph and the second original graph, and generate a distance matrix; wherein each element of the distance matrix represents the feature distance between an entity in the first original graph and an entity in the second original graph, and a smaller feature distance indicates a higher similarity; a third alignment inference submodule, configured to sort each row of the distance matrix in ascending order to obtain a candidate alignment entity list for each entity of the first original graph in the second original graph; The fourth alignment inference submodule is used to screen out a pair of entities with the smallest feature distance from the candidate alignment entity list, and determine the entity alignment result of the first original map and the second original map.

[0180] In an optional embodiment, the building block includes: A fourth construction submodule is configured to obtain first metadata and second metadata from different data sources from the high-speed rail dataset; a fifth construction submodule, configured to extract tables and fields as entities of the first original graph based on the first metadata, and to construct edges of the first original graph according to the inclusion relationship between tables and fields and the foreign key relationship between tables; The sixth construction submodule is used to extract tables and fields as entities of the second original graph based on the second metadata, and to construct edges of the second original graph according to the inclusion relationship between tables and fields and the foreign key relationship between tables.

[0181] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, apparatuses, electronic devices, and storage media. Accordingly, embodiments of the present invention may take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to magnetic disk storage, CD-ROMs, optical storage, etc.) containing computer-usable program code.

[0182] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods and apparatus according to the embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as the combination of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 These computer program instructions can also be stored in a computer readable memory that can guide a computer or other programmable data processing terminal device to work in a specific way, so that the instructions stored in the computer readable memory produce a product including an instruction device, which implements the functions specified in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device, so that a series of operation steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for implementing the process in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0183] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they become aware of the basic creative concepts. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.

[0184] Finally, it should be noted that, in this document, relational terms such as first and second are used solely to distinguish one entity or operation from another, and do not necessarily require or imply any actual relationship or order between these entities or operations. Furthermore, the term "comprising" or any other variant thereof is intended to encompass non-exclusive inclusion, such that a process, method, article, or terminal device comprising a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or terminal device. Without further limitation, elements qualified by the phrase "comprising..." do not preclude the presence of additional identical elements in the process, method, article, or terminal device comprising the recited elements. The above detailed description of the knowledge graph entity alignment method and apparatus for high-speed rail data provided by the present invention has been provided. Specific examples have been used herein to illustrate the principles and implementations of the present invention. The description of the above examples is intended only to facilitate understanding of the present invention's method and core concepts. Furthermore, those skilled in the art will appreciate that variations in the specific implementation and scope of application are possible based on the principles of the present invention. In summary, the contents of this specification should not be construed as limiting the present invention.

Claims

1. A knowledge graph entity alignment method for high-speed rail data, characterized by: The method comprises: Based on two heterogeneous high-speed rail source data, a first original graph and a second original graph are constructed, and pre-aligned entity pairs in the first original graph and the second original graph are exchanged to obtain a first twin graph and a second twin graph, wherein the entities in the first original graph and the second original graph are tables or fields of at least one of high-speed rail train operation data, equipment monitoring data, infrastructure data and passenger service data; the edges in the first original graph and the second original graph are inclusion relationships between tables and fields, or foreign key association relationships between tables; the pre-aligned entity pairs are a pair of pre-labeled entities with the same high-speed rail business semantics; Performing feature extraction on the first original graph, the second original graph, the first twin graph, and the second twin graph using a twin graph convolutional network model to obtain first entity features and relationship features and second entity features and relationship features, wherein the twin graph convolutional network model is pre-trained based on the pre-aligned entity pairs; Performing feature aggregation on the first entity features and relationship features, and the second entity features and relationship features using a multi-view adjacency matrix to obtain a first enhanced entity feature of the first original graph and a second enhanced entity feature of the second original graph, wherein the multi-view adjacency matrix represents the adjacency relationship between entities at different viewing angles; An entity alignment result of the first original graph and the second original graph is determined according to the similarity between the first enhanced entity feature and the second enhanced entity feature.

2. The method according to claim 1, characterized in that Exchanging pre-aligned entity pairs in the first original graph and the second original graph to obtain a first twin graph and a second twin graph, comprising: Generate a corresponding reverse edge for each original edge in the first original graph and the second original graph, wherein the reverse edge has a direction opposite to the original edge and has opposite semantics; Determining a set of pre-aligned entity pairs from the high-speed rail dataset, the pre-aligned entity pairs comprising a first pre-aligned entity in the first original atlas and a second pre-aligned entity in the second original atlas; The first pre-aligned entity in the first original map is replaced by the second pre-aligned entity to generate a first twin map, and the second pre-aligned entity in the second original map is replaced by the first pre-aligned entity to generate a second twin map.

3. The method according to claim 2, characterized in that The twin graph convolutional network model includes multiple network blocks; the twin graph convolutional network model is used to extract features from the first original graph, the second original graph, the first twin graph, and the second twin graph to obtain first entity features and relationship features and second entity features and relationship features, including: The first original graph, the second original graph, the first twin graph, and the second twin graph are sequentially subjected to feature extraction by the multiple network blocks to obtain output results of each network block; wherein the latter network block processes the output result of the former network block, and the output result includes intermediate entity features and intermediate relationship features of the first original graph, the second original graph, the first twin graph, and the second twin graph; The first original graph output by each of the multiple network blocks and the intermediate entity features and intermediate relationship features of the first original graph are spliced ​​along the feature dimension to obtain the first entity features and relationship features, and the second original graph output by each of the multiple network blocks and the intermediate entity features and intermediate relationship features of the second twin graph are spliced ​​along the feature dimension to obtain the second entity features and relationship features.

4. The method according to claim 3, characterized in that Each network block processes the output of the previous network block by following these steps: Aggregate the entity features of each entity and its neighboring entities in the first original graph, the second original graph, the first twin graph, and the second twin graph through the context-aware graph convolution layer to obtain the intermediate entity features of the first original graph, the second original graph, the first twin graph, and the second twin graph output by the current network block. The adjacent entities of each entity are other entities directly connected to the entity through edges; Exchanging intermediate entity features of entities shared between the first original graph and the second twin graph, and exchanging intermediate entity features of entities shared between the second original graph and the first twin graph through the pre-aligned entity interaction layer; Through the fully connected layer, the relationship features of each edge in the first original graph, the second original graph, the first twin graph and the second twin graph are linearly transformed to obtain the intermediate relationship features of the first original graph, the second original graph, the first twin graph and the second twin graph output by the current network block.

5. The method according to claim 2, characterized in that Before performing feature aggregation on the first entity features and relationship features and the second entity features and relationship features using the multi-view adjacency matrix, the method further includes: Based on the first original graph and the second original graph in which reverse edges are generated, a first adjacency matrix, a second adjacency matrix, a third adjacency matrix, and a fourth adjacency matrix are constructed respectively; wherein the first adjacency matrix represents the number of edges directly connected between entities; the second adjacency matrix represents whether the target entity is directly connected to other entities through a target relationship; the third adjacency matrix represents whether the target entity is directly connected to other entities through a target relationship; and the fourth adjacency matrix represents whether entities are directly connected through a target relationship; The first adjacency matrix, the second adjacency matrix, the third adjacency matrix, and the fourth adjacency matrix are used as the multi-view adjacency matrix.

6. The method according to claim 5, characterized in that Performing feature aggregation on the first entity features and relationship features, and the second entity features and relationship features using a multi-view adjacency matrix to obtain a first enhanced entity feature of the first original graph and a second enhanced entity feature of the second original graph, including: Based on the adjacency relationship between different views in the multi-view adjacency matrix, respectively aggregating the entity features and relationship features of the first original graph and the second original graph to obtain entity features of the first original graph and the second original graph with different degrees of enhancement; The entity features of the first original map with different enhancement degrees are spliced ​​along the feature dimension to generate enhanced entity features of the first original map, and the entity features of the second original map with different enhancement degrees are spliced ​​along the feature dimension to generate enhanced entity features of the second original map.

7. The method according to claim 6, characterized in that Based on the adjacency relationship between different views in the multi-view adjacency matrix, entity features and relationship features of the first original graph and the second original graph are respectively aggregated to obtain entity features of the first original graph and the second original graph with different degrees of enhancement, including: Aggregating the entity features of the first original graph and the second original graph using the third adjacency matrix to obtain corresponding enhanced relationship features; Combining the entity features and enhanced relationship features of the first original graph and the second original graph using the first adjacency matrix and the second adjacency matrix to obtain corresponding first enhanced entity features; Aggregating the relationship features of the first original graph and the second original graph using the fourth adjacency matrix to generate corresponding adjacent entity pair features; According to the adjacent entity pair features of the first original map and the second original map, corresponding second enhanced entity features are further calculated, and the enhancement degree of the second enhanced entity features is higher than that of the first enhanced entity features.

8. The method according to claim 1, characterized in that Determining an entity alignment result of the first original graph and the second original graph according to a similarity between the first enhanced entity feature and the second enhanced entity feature includes: Determining a feature vector corresponding to each entity based on the enhanced entity features of the first original graph to obtain a first entity feature vector set; and extracting a feature vector corresponding to each entity based on the enhanced entity features of the second original graph to obtain a second entity feature vector set; Based on the first entity feature vector set and the second entity feature vector set, calculating the feature distance between each entity in the first original graph and the second original graph, and generating a distance matrix; wherein each element of the distance matrix represents the feature distance between an entity in the first original graph and an entity in the second original graph, and a smaller feature distance indicates a higher similarity; Sort each row of the distance matrix in ascending order to obtain a candidate alignment entity list for each entity in the first original graph in the second original graph; A pair of entities with the smallest feature distance is screened out from the candidate alignment entity list to determine an entity alignment result of the first original graph and the second original graph.

9. The method according to claim 1, characterized in that According to the data objects in the high-speed rail dataset, the entities of the first original map and the second original map are constructed, including: Acquire first metadata and second metadata from different data sources from the high-speed rail dataset; Based on the first metadata, extract tables and fields as entities of the first original graph, and construct edges of the first original graph according to the inclusion relationship between tables and fields and the foreign key relationship between tables; Based on the second metadata, tables and fields are extracted as entities of the second original graph, and edges of the second original graph are constructed according to the inclusion relationship between tables and fields and the foreign key relationship between tables.

10. A knowledge graph entity alignment device for high-speed rail data, characterized in that: The device comprises: A construction module is used to construct a first original graph and a second original graph based on two heterogeneous high-speed rail source data, and exchange pre-aligned entity pairs in the first original graph and the second original graph to obtain a first twin graph and a second twin graph, wherein the entities in the first original graph and the second original graph are tables or fields of at least one of high-speed rail train operation data, equipment monitoring data, infrastructure data and passenger service data; the edges in the first original graph and the second original graph are inclusion relationships between tables and fields, or foreign key association relationships between tables; the pre-aligned entity pairs are a pair of pre-labeled entities with the same high-speed rail business semantics; A feature extraction module, configured to extract features from the first original graph, the second original graph, the first twin graph, and the second twin graph using a twin graph convolutional network model, to obtain first entity features and relationship features and second entity features and relationship features, wherein the twin graph convolutional network model is pre-trained based on the pre-aligned entity pairs; a feature aggregation module, configured to perform feature aggregation on the first entity features and relationship features, and the second entity features and relationship features using a multi-view adjacency matrix to obtain a first enhanced entity feature of the first original graph and a second enhanced entity feature of the second original graph, wherein the multi-view adjacency matrix represents the adjacency relationship between entities at different viewing angles; An alignment inference module is used to determine an entity alignment result of the first original map and the second original map according to the similarity between the first enhanced entity feature and the second enhanced entity feature.