Entity alignment method based on graph neural network

By introducing time information into the graph neural network and combining entity and relational information for entity alignment of railway events, the problem of low entity alignment efficiency in the prior art is solved, and more efficient and reliable railway safety management is achieved.

CN120523958APending Publication Date: 2025-08-22CHINA ACADEMY OF RAILWAY SCI CORP LTD +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510356568.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-25
Publication Date
2025-08-22

AI Technical Summary

Technical Problem

In the prior art, the entity alignment of railway safety events lacks consideration of time information, which makes it difficult to quickly achieve entity alignment, affecting the accuracy and efficiency of quantitative analysis of safety risks.

Method used

The entity alignment method based on graph neural network is adopted, and the entity alignment is improved by introducing time information and using the time relationship graph attention network to perform entity alignment, combining entity information and relationship information.

Benefits of technology

It significantly improves the alignment efficiency and accuracy of railway events, improves the efficiency and reliability of railway safety management, and reduces the risk of accidents.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120523958A_ABST
    Figure CN120523958A_ABST
Patent Text Reader

Abstract

The invention provides an entity alignment method based on a graph neural network. The method comprises the following steps: acquiring a plurality of knowledge graphs; the knowledge graph comprises entity information, relation information and time information related to the railway event; inputting the plurality of knowledge graphs into a time relation graph attention network to obtain entity alignment results in the plurality of knowledge graphs; the time relation graph attention network is used for performing entity alignment in the multiple knowledge graphs based on the entity information, the relation information and the time information. According to the method provided by the embodiment of the invention, the accuracy of entity alignment is enhanced, the alignment efficiency of railway events is remarkably improved, the railway safety management is more efficient and reliable, the efficiency and accuracy of the railway safety management are effectively improved, and the risk of accidents is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of entity alignment technology, and in particular to an entity alignment method based on graph neural network. Background Art

[0002] With the continuous deepening of the research on comprehensive evaluation of railway safety effects, relying on the railway safety event chain model, quantitative analysis of safety risks for various event chains can be carried out to effectively realize the comprehensive evaluation of safety effects in different dimensions such as units and professions.

[0003] In related technologies, a large number of events, such as railway accidents and equipment failures, require precise entity alignment with railway safety event chains. Therefore, achieving entity alignment within railway events, and thus obtaining historical events that align with the event chain as data support, has become a pressing technical challenge for those skilled in the art. Summary of the Invention

[0004] The present invention provides an entity alignment method based on graph neural networks. During the entity alignment process, the accuracy of entity alignment is enhanced by introducing time information, which significantly improves the alignment efficiency of railway events, making railway safety management more efficient and reliable, effectively improving the efficiency and accuracy of railway safety management, and reducing the risk of accidents.

[0005] The present invention provides an entity alignment method based on graph neural network, comprising the following steps.

[0006] Acquire multiple knowledge graphs; the knowledge graphs include entity information, relationship information, and time information related to railway events; The multiple knowledge graphs are input into a temporal relationship graph attention network to obtain entity alignment results in the multiple knowledge graphs; the temporal relationship graph attention network is used to perform entity alignment in the multiple knowledge graphs based on entity information, relationship information and time information.

[0007] According to the entity alignment method based on graph neural network provided by the present invention, the temporal relationship graph attention network is trained based on the following method: Acquire multiple knowledge graph samples; the knowledge graph samples include entity information samples, relationship information samples and time information samples; Inputting the plurality of knowledge graph samples into a temporal relationship graph attention network to obtain target features corresponding to entities in the plurality of knowledge graph samples; the target features include aggregated entity information features, aggregated relationship information features, and aggregated time information features; Obtaining entity alignment results between the plurality of knowledge graph samples according to target features corresponding to entities in the plurality of knowledge graph samples; According to the entity alignment results and target loss function between the plurality of knowledge graph samples, a trained temporal relationship graph attention network is obtained.

[0008] According to an entity alignment method based on graph neural network provided by the present invention, the target loss function includes: in, represents a sparse matrix; Represents the difference measurement between the head entity and the tail entity; Represents the relationship measurement between the source entity and the target entity; Represents the time measurement between the source entity time information and the target entity time information.

[0009] According to the entity alignment method based on graph neural network provided by the present invention, the aggregated entity information features are determined based on the following method: , The aggregation relationship information characteristics are determined based on the following method: , The aggregated time information feature is determined based on the following method: , The target features are determined based on the following method: in, Represents the information characteristics of aggregated entities; Represents an entity; Represents the characteristics of aggregate relationship information; Represents the relational orthogonal transformation matrix; Represents the relational attention matrix; Represents the characteristics of aggregated time information; represents the time orthogonal transformation matrix; represents the time coordination transformation matrix; Represents the target features corresponding to the entities in the knowledge graph sample.

[0010] According to a graph neural network-based entity alignment method provided by the present invention, the temporal coordination transformation matrix is ​​determined based on the following method: in, represents the temporal attention weight vector; Represents an entity; represents the time orthogonal transformation matrix; Represents a set of time links.

[0011] According to the entity alignment method based on graph neural network provided by the present invention, after inputting the multiple knowledge graphs into the time relationship graph attention network to obtain the entity alignment results in the multiple knowledge graphs, the method further includes: Determine the similarity between the source entity and the target entity based on the dynamic similarity measurement algorithm; The entity alignment result is updated according to the similarity between the source entity and the target entity.

[0012] The present invention also provides an entity alignment device based on a graph neural network, comprising the following modules: An acquisition module is used to acquire multiple knowledge graphs; the knowledge graphs include entity information, relationship information and time information related to railway events; An alignment module is used to input the multiple knowledge graphs into a temporal relationship graph attention network to obtain entity alignment results in the multiple knowledge graphs; the temporal relationship graph attention network is used to align entities in the multiple knowledge graphs based on entity information, relationship information and time information.

[0013] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and runnable on the processor, wherein when the processor executes the program, an entity alignment method based on a graph neural network as described above is implemented.

[0014] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-described entity alignment methods based on graph neural networks.

[0015] The present invention also provides a computer program product, comprising a computer program, which, when executed by a processor, implements any of the above-described entity alignment methods based on graph neural networks.

[0016] The entity alignment method based on graph neural network provided by the present invention enhances the accuracy of entity alignment by introducing time information during the entity alignment process, significantly improves the alignment efficiency of railway events, makes railway safety management more efficient and reliable, effectively improves the efficiency and accuracy of railway safety management, and reduces the risk of accidents. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are 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.

[0018] Figure 1 This is one of the flow charts of the entity alignment method based on graph neural network provided by the present invention.

[0019] Figure 2 This is the second flow chart of the entity alignment method based on graph neural network provided by the present invention.

[0020] Figure 3 It is a structural schematic diagram of the entity alignment device based on graph neural network provided by the present invention.

[0021] Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0022] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0023] The following combination Figures 1-4 Describe the entity alignment method based on graph neural network of the present invention.

[0024] In order to facilitate a clearer understanding of the technical solutions of the various embodiments of the present application, some technical contents related to the various embodiments of the present application are first introduced.

[0025] With the continuous deepening of the research on comprehensive evaluation of railway safety effects, relying on the railway safety event chain model, quantitative analysis of safety risks for various event chains can be carried out to effectively realize the comprehensive evaluation of safety effects in different dimensions such as units and professions.

[0026] In railway safety management, time information is crucial for safety management, scheduling and operational efficiency, data analysis and decision support, passenger experience, compliance, and auditing. A large number of events, such as railway accidents and equipment failures, require precise entity alignment with railway safety event chains, especially when considering time. Accurate timestamp recording and analysis not only facilitates rapid incident response and event tracking, but also optimizes train scheduling, improves operational efficiency, and enhances passenger satisfaction. For example, identifying the specific time of an accident allows managers to more effectively analyze the relationship between event chains and historical events, enabling appropriate preventive and response measures. However, existing work models rely primarily on manual search, which is not only time-consuming and labor-intensive, but also often requires personnel with non-professional backgrounds to fully understand the event chain model and its complexity. This makes it difficult to quickly align entities between historical events and event chains, impacting the accuracy of quantitative safety risk analysis results. Therefore, how to achieve entity alignment in railway events and obtain historical events that conform to the event chain as data support has become a pressing technical challenge for those skilled in the art.

[0027] Figure 1 This is one of the flow charts of the entity alignment method based on graph neural network provided by the present invention, such as Figure 1 As shown, the method includes the following: Step 101: Acquire multiple knowledge graphs; the knowledge graphs include entity information, relationship information, and time information related to railway events.

[0028] Specifically, in the embodiment of the present application, multiple knowledge graphs corresponding to multiple data sources are first obtained. Optionally, the knowledge graph includes entity information, relationship information, and time information related to railway events.

[0029] For example, in the context of railway construction, the entities in data source 1 include railway projects, construction units, equipment used, construction materials, etc. The relationships between entities can describe project progress, collaboration among participating units, resource usage, etc. For example, the "use" relationship can describe that a certain equipment is used in a certain project. Time information can include the construction time period, the start and end time of the project, the use time of the equipment, etc. Optionally, in one embodiment, data source 1 is a railway engineering management system, the entity can be a railway project (such as "A high-speed railway expansion project"), the relationship can be "use" (such as "A high-speed railway expansion project uses concrete C30"), and the time is the time period when the project uses concrete (such as "January 10, 2025 to February 20, 2025").

[0030] The entities in data source 2 include government approval documents, project contracts, supplier information, etc. The relationship between entities can describe the approval process, contract execution status, supplier supply records, etc. For example, the "approval" relationship can describe that a project has been approved by a government department. Time information may involve contract signing time, approval time, material delivery time, etc. Optionally, in one embodiment, data source 2 is a government approval system, the entity can be a project approval document (such as "A High-speed Railway Expansion Project Approval"), the relationship can be "approval" (such as "Ministry of Transport Approves A High-speed Railway Expansion Project"), and the time is the approval date (such as "December 15, 2024").

[0031] Step 102: Input multiple knowledge graphs into the temporal relationship graph attention network to obtain entity alignment results in multiple knowledge graphs; the temporal relationship graph attention network is used to align entities in multiple knowledge graphs based on entity information, relationship information and time information.

[0032] Specifically, when multiple knowledge graphs corresponding to multiple data sources are obtained, and the knowledge graphs include entity information, relationship information, and time information related to railway events, the temporal graph attention network can combine the comprehensive and rich information in the knowledge graphs, such as entity features, semantic features, and time information, to align entities, thereby improving the efficiency and accuracy of railway safety management. In other words, in the embodiment of the present application, the introduction of time information during entity alignment significantly enhances the accuracy of entity alignment, improves the efficiency of railway event alignment, and makes railway safety management more efficient and reliable. Based on the entity alignment method in the embodiment of the present application, railway managers can obtain accurate data support in a shorter time, providing strong technical support for railway safety management, ensuring the comprehensiveness and accuracy of information, facilitating more efficient decision-making and response in complex railway safety environments, effectively improving overall safety management, and reducing the risk of accidents. Optionally, by analyzing the timestamps and contextual information of different railway events, related events can be effectively identified and matched, achieving automatic and rapid alignment, and improving the efficiency and accuracy of railway safety management. It should be noted that in the related art, time information is not considered in the process of entity alignment. However, this application encodes the entity information, relationship information and time information related to railway events, so that the temporal relationship graph attention network can predict the entity alignment results more accurately and efficiently based on rich information such as entity features, semantic features and time information, thereby improving the alignment efficiency and accuracy of railway events.

[0033] It should be noted that the method of the embodiment of the present application fully considers the importance of time information in entity alignment, so that the model can more flexibly adapt to the needs of different scenarios when dealing with dynamically changing time attributes. This method effectively solves the problem of the diversity of entity time attributes, and properly models the complex relationships between entities in the time knowledge graph, effectively integrates time information, and enhances the accuracy and robustness of time entity alignment. Through this innovative time coding strategy, the present invention provides a more reliable solution for time entity alignment, laying a solid foundation for the accuracy and efficiency of related applications.

[0034] The method of the above embodiment enhances the accuracy of entity alignment by introducing time information during entity alignment, significantly improves the alignment efficiency of railway events, makes railway safety management more efficient and reliable, effectively improves the efficiency and accuracy of railway safety management, and reduces the risk of accidents.

[0035] In one embodiment, the temporal graph attention network is trained based on the following method: Obtain multiple knowledge graph samples; the knowledge graph samples include entity information samples, relationship information samples, and time information samples; Input multiple knowledge graph samples into the temporal relationship graph attention network to obtain target features corresponding to entities in the multiple knowledge graph samples; the target features include aggregated entity information features, aggregated relationship information features, and aggregated time information features; According to the target features corresponding to the entities in multiple knowledge graph samples, the entity alignment results between the multiple knowledge graph samples are obtained; According to the entity alignment results and target loss function between multiple knowledge graph samples, the trained temporal relationship graph attention network is obtained.

[0036] Specifically, in order to enable the temporal relationship graph attention network in the embodiment of the present application to efficiently and accurately align entities based on entity features, semantic features and time information, the temporal relationship graph attention network can be trained based on the following method. Optionally, first, multiple knowledge graph samples corresponding to multiple data sources can be obtained; wherein the knowledge graph samples include entity information samples, relationship information samples and time information samples. Then, the multiple knowledge graph samples are input into the temporal relationship graph attention network to obtain target features corresponding to the entities in the multiple knowledge graph samples; the target features include aggregated entity information features, aggregated relationship information features and aggregated time information features; that is, the relationship information and time information corresponding to each entity are extracted from the knowledge graph and expressed in the form of a vector, thereby providing more comprehensive and rich information for the temporal relationship graph attention network, so that the temporal relationship graph attention network can accurately predict the entity alignment results between multiple knowledge graph samples based on rich information such as entity features, semantic features and time information. Finally, the temporal relationship graph attention network can be trained according to the entity alignment results predicted by the temporal relationship graph attention network and the target loss function, thereby obtaining the trained temporal relationship graph attention network. Optionally, the target loss function is expressed as the difference between the predicted value of the temporal graph attention network and the label value, that is, when the predicted value of the temporal graph attention network is the same as the label value, it indicates that the training of the temporal graph attention network has been completed.

[0037] The method of the above embodiment extracts the relationship information and time information corresponding to each entity from the knowledge graph and expresses it in the form of a vector, thereby providing more comprehensive and rich information for the time relationship graph attention network. The trained time relationship graph attention network can accurately predict the entity alignment results between multiple knowledge graph samples based on rich information such as entity features, semantic features and time information, thereby improving the alignment efficiency and accuracy of railway events.

[0038] In one embodiment, the objective loss function includes: in, Represents a preset sparse matrix; Represents the difference measurement between the head entity and the tail entity; Represents the relationship measurement between the source entity and the target entity; Represents the time measurement between the source entity time information and the target entity time information.

[0039] Specifically, the target loss function in the embodiment of the present application is ;in, Represents a preset sparse matrix; Represents the difference measurement between the head entity and the tail entity; Represents the relationship measurement between the source entity and the target entity; Represents the time measurement between the source entity time information and the target entity time information.

[0040] Optionally, during the training of the temporal graph attention network, the head entity and tail entity The L2 distance is used to measure and represent the difference measurement value, which is calculated as follows: .

[0041] Optionally, a relationship measurement value is obtained based on the distance between the source entity and the target entity. Optionally, a specific calculation formula for the relationship measurement value is as follows: , Optionally, calculate source entity time information , target entity time information Distance to obtain time measurement information , similar to the translation assumption of TransE, is calculated as follows: .

[0042] Optionally, is the final optimization target, logsumexp is a function that returns the reduced tensor, is the one-hot matrix of any entity not in the seed.

[0043] , according to The numerical training model is trained until convergence, and the trained temporal graph attention network that can accurately align entities can be obtained.

[0044] That is, in the embodiment of the present application, based on the difference measurement value between the head entity and the tail entity, the relationship measurement value between the source entity and the target entity, and the time measurement value between the source entity time information and the target entity time information, a target loss function is constructed, that is, the prediction results of the time relationship graph attention network are evaluated from multiple dimensions and aspects, so that the finally trained time relationship graph attention network can perform entity alignment more efficiently and accurately, effectively improving the alignment efficiency and accuracy of railway events.

[0045] It should be noted that the loss function designed in this application provides a more detailed optimization objective for the model, bringing equivalent entities closer together in a unified vector space. Through comprehensive evaluation across multiple dimensions, including L2 distance metric, relationship measurement, and time measurement, the model can more comprehensively reflect the similarity between entities. This innovative design not only improves model training results but also provides a solid foundation for subsequent entity alignment.

[0046] In the method of the above embodiment, the target loss function includes the difference measurement value between the head entity and the tail entity, the relationship measurement value between the source entity and the target entity, and the time measurement value between the source entity time information and the target entity time information. That is, the present application evaluates the prediction results of the time relationship graph attention network from multiple dimensions and aspects, so that the finally trained time relationship graph attention network can perform entity alignment more efficiently and accurately, effectively improving the alignment efficiency and accuracy of railway events.

[0047] In one embodiment, the aggregated entity information features are determined based on the following: , The characteristics of the aggregated relationship information are determined based on the following methods: , Aggregate time information features are determined based on the following: , The target features are determined based on the following: in, Represents the information characteristics of aggregated entities; Represents an entity; Represents the characteristics of aggregate relationship information; Represents the relational orthogonal transformation matrix; Represents the relational attention matrix; Represents the characteristics of aggregated time information; represents the time orthogonal transformation matrix; represents the time coordination transformation matrix; Represents the target features corresponding to the entities in the knowledge graph sample.

[0048] Specifically, in the embodiment of the present application, the aggregated entity information features are determined based on the following method: , The characteristics of the aggregated relationship information are determined based on the following methods: , Aggregate time information features are determined based on the following: , The target features are determined based on the following: That is, in the related art, time information is not considered in the process of entity alignment. However, this application encodes the entity information, relationship information and time information related to railway events, so that the time relationship graph attention network can predict the entity alignment results more accurately and efficiently based on rich information such as entity features, semantic features and time information, thereby improving the alignment efficiency and accuracy of railway events.

[0049] The method of the above embodiment encodes entity information, relationship information and time information related to railway events. That is, in the process of entity alignment, the accuracy of entity alignment is enhanced by introducing time information, which significantly improves the alignment efficiency of railway events, making railway safety management more efficient and reliable, effectively improving the efficiency and accuracy of railway safety management, and reducing the risk of accidents.

[0050] In one embodiment, the time coordination transformation matrix is ​​determined based on the following method: in, Represents the preset time attention weight vector; Represents an entity; Represents a preset time orthogonal transformation matrix; Represents the set of time links corresponding to the knowledge graph.

[0051] Specifically, in the embodiment of the present application, accurate encoding of railway event time information is achieved based on the time coordination transformation matrix, so that the time characteristics of the entity can be accurately represented. Based on rich information such as entity characteristics, semantic characteristics and time information, the entity alignment results can be predicted more accurately and efficiently, thereby improving the alignment efficiency and accuracy of railway events.

[0052] In one embodiment, after inputting multiple knowledge graphs into a temporal graph attention network and obtaining entity alignment results in the multiple knowledge graphs, the method further includes: Determine the similarity between the source entity and the target entity based on the dynamic similarity measurement algorithm; Update the entity alignment result based on the similarity between the source entity and the target entity.

[0053] Specifically, in an embodiment of the present application, after obtaining the entity alignment result based on the temporal relationship graph attention network, the similarity between the source entity and the target entity is further determined based on the dynamic similarity measurement algorithm; and the entity alignment result is updated based on the similarity between the source entity and the target entity. That is, the present application verifies the alignment result predicted by the temporal relationship graph attention network based on the dynamic similarity measurement algorithm, and retains the entity alignment result if the similarity between the source entity and the target entity is greater than a threshold. Optionally, if the similarity between the source entity and the target entity is less than a threshold, the entity alignment result is discarded.

[0054] For example, if the similarity measurement threshold θ is set, Similarity If it is greater than θ, they are considered as reliable matching pairs. , if it is less than θ, recalculate.

[0055] The method of the above embodiment, after obtaining the entity alignment result based on the temporal relationship graph attention network, further determines the similarity between the source entity and the target entity based on the dynamic similarity measurement algorithm; and updates the entity alignment result based on the similarity between the source entity and the target entity, making the final entity alignment result more accurate, thereby improving the alignment accuracy of railway events.

[0056] For example, Figure 2 As shown, an embodiment of the present application provides a flow chart of an entity alignment method based on a graph neural network, and the specific steps are as follows: To simulate real-world scenarios, the experimental data in this application uses three public temporal knowledge graphs: (1) DICEWS*: This is a mixed noise label dataset consisting of entity alignment task datasets between temporal knowledge graphs built from time-based knowledge bases. It contains events with specific time annotations, and mixes noise entity pairs into the training dataset. By fixing entity 1 and randomly selecting the dataset of entity 2, new entity pairs are combined to generate noise entity pairs. In the training dataset, 20% and 40% of noise entity pairs are mixed, respectively. (2) YAGO-WIKI20K*: This is a mixed noise dataset containing mixed data of temporal and non-temporal facts, with approximately 20,000 entity pairs. The timestamps in this dataset are represented in various forms, such as time points, start or end times, and time intervals. This diverse representation of temporal information poses challenges to building advanced temporal entity alignment models. The statistical information of the experimental data is shown in Table 1.

[0057] Table 1

[0058] This application uses Hits@k (Hk) and MRR to evaluate the model. This evaluation measures the proportion of correct rankings among the top k knowledge graph entity pairs to calculate the Hits@k (Hk) score (higher scores are better). MRR stands for Mean Reciprocal Ranking (MRR), and higher scores are better (i.e., higher predicted rankings, larger reciprocal scores, and larger sums are better).

[0059] Optionally, the specific steps of entity alignment in the embodiment of the present application are as follows: Step 1: Encode and calculate relevant features.

[0060] Step 1.1: Extract output features from the temporal graph attention network through aggregation operation , this aggregation process is to combine adjacent entities The input features are linearly combined, while taking into account the entity information , relationship information and time information Orthogonal transformation.

[0061] Step 1.2: Establish a relational attention matrix.

[0062] is the shared relation attention weight vector, Represents an entity set, Represents a set of relationship links, Represents a relational orthogonal transformation matrix.

[0063] , Step 1.3: Establish a time-coordinated transformation matrix.

[0064] is the temporal attention weight vector, represents a set of time links, Represents the time orthogonal transformation matrix.

[0065] Step 1.4: Aggregate entity information features.

[0066] , Step 1.5: Aggregate relationship information features.

[0067] , Step 1.6: Aggregate time information features.

[0068] , Step 1.7: Output features ,|| indicates concatenation.

[0069] Step 2: Calculate the loss of the model. The quartet loss function scheme is used as the optimization target of the model during the training phase, which makes equivalent entities close to each other in the unified vector space.

[0070] Step 2.1: First, during the training process, the head entity and tail entity The L2 distance is used to measure the difference between the two values. The specific calculation is as follows: , Step 2.2: Calculate the source seed entity and the target seed entity The distance between the two results in a relationship measure.

[0071] , Step 2.3: Calculate source seed entity time information , target seed entity time information Distance to obtain time measurement information , which is similar to the translation assumption of TransE.

[0072] , Step 2.4 is the final optimization target, logsumexp is a function that returns the reduced tensor, is the one-hot matrix of any entity not in the seed.

[0073] , Step 3: According to The model is trained numerically until convergence.

[0074] Step 4: Dynamic similarity measurement algorithm is used to obtain reliable matching pairs between source entities and target entities.

[0075] Step 4.1: Calculate the source entity set and the target entity set .

[0076] Step 4.2, set the similarity measurement threshold θ, if the entity pair Similarity If it is greater than θ, they are considered as reliable matching pairs. , and delete the entity pair If the entity is less than θ, recalculate it.

[0077] Step 4.3: Repeat step 4.2 for T iterations.

[0078] Step 4.4: Finally obtain entity matching pairs .

[0079] Step 5: Use the trained model to align entities using a dynamic similarity metric algorithm.

[0080] In step 6, the test results on the temporal knowledge graph DICEWS* dataset showed that the final accuracy was Hit@1 = 0.905, Hit@10 = 0.946, and MMR = 0.926. Although the accuracy did not reach 100%, all three indicators exceeded 90%, indicating that the present invention has significant effects and is worthy of promotion. Further improvements may bring the accuracy close to or even reach 100%.

[0081] In summary, the graph neural network-based entity alignment method proposed in this application provides an innovative and effective solution to the existing problem of insufficient representation capabilities when processing entities with time labels. By introducing a coordinated transformation of temporal information, the model can more accurately capture the complex temporal attributes and relationships between entities. This method effectively addresses the challenges posed by the diversity of temporal attributes, enabling the model to maintain high alignment accuracy even in the presence of noisy labels. Reducing the dimensionality of the similarity metric not only enhances the model's resilience to perturbations but also allows for more flexible adaptation to entity alignment requirements in different temporal scenarios. This design provides the model with greater adaptability and stability when handling dynamically changing temporal attributes. The loss function designed in this application provides the model with a more refined optimization objective, ensuring that equivalent entities are close to each other in a unified vector space. Through a comprehensive evaluation of multiple dimensions, including the L2 distance metric, relationship measurement, and temporal measurement, the model can more comprehensively reflect the similarity between entities. This innovative design not only improves model training performance but also provides a solid foundation for subsequent entity alignment. The dynamic similarity metric algorithm in this application can generate reliable matching pairs between source and target entities. The algorithm uses the trained model to perform further similarity calculations, ensuring that the output entity alignment results are highly reliable and consistent. This approach allows users to obtain more accurate entity alignment results in their applications, thereby improving the overall efficiency and performance of related applications.

[0082] The following describes the entity alignment device based on graph neural network provided by the present invention. The entity alignment device based on graph neural network described below and the entity alignment method based on graph neural network described above can be referred to each other. The entity alignment device based on graph neural network in the embodiment of the present application is as follows: Figure 3 Shown, including: An acquisition module 310 is configured to acquire a plurality of knowledge graphs, wherein the knowledge graphs include entity information, relationship information, and time information related to railway events; The alignment module 320 is used to input multiple knowledge graphs into the time relationship graph attention network to obtain entity alignment results in multiple knowledge graphs; the time relationship graph attention network is used to align entities in multiple knowledge graphs based on entity information, relationship information and time information.

[0083] Optionally, the temporal graph attention network is trained as follows: Obtain multiple knowledge graph samples; the knowledge graph samples include entity information samples, relationship information samples, and time information samples; Input multiple knowledge graph samples into the temporal relationship graph attention network to obtain target features corresponding to entities in the multiple knowledge graph samples; the target features include aggregated entity information features, aggregated relationship information features, and aggregated time information features; According to the target features corresponding to the entities in multiple knowledge graph samples, the entity alignment results between the multiple knowledge graph samples are obtained; According to the entity alignment results and target loss function between multiple knowledge graph samples, the trained temporal relationship graph attention network is obtained.

[0084] Optionally, the objective loss function includes: in, represents a sparse matrix; Represents the difference measurement between the head entity and the tail entity; Represents the relationship measurement between the source entity and the target entity; Represents the time measurement between the source entity time information and the target entity time information.

[0085] Optionally, the aggregate entity information feature is determined based on the following method: , The characteristics of the aggregated relationship information are determined based on the following methods: , Aggregate time information features are determined based on the following: , The target features are determined based on the following: in, Represents the information characteristics of aggregated entities; Represents an entity; Represents the characteristics of aggregate relationship information; Represents the relational orthogonal transformation matrix; Represents the relational attention matrix; Represents the characteristics of aggregated time information; represents the time orthogonal transformation matrix; represents the time coordination transformation matrix; Represents the target features corresponding to the entities in the knowledge graph sample.

[0086] Optionally, the time coordination conversion matrix is ​​determined based on the following method: in, represents the temporal attention weight vector; Represents an entity; represents the time orthogonal transformation matrix; Represents a set of time links.

[0087] Optionally, the alignment module 320 is further configured to: Determine the similarity between the source entity and the target entity based on the dynamic similarity measurement algorithm; Update the entity alignment result based on the similarity between the source entity and the target entity.

[0088] Figure 4 The diagram illustrates the physical structure of an electronic device, which may include: a processor 410, a communications interface 420, a memory 430, and a communications bus 440. The processor 410, the communications interface 420, and the memory 430 communicate with each other via the communications bus 440. The processor 410 may invoke logic instructions in the memory 430 to execute a graph neural network-based entity alignment method, which includes: obtaining multiple knowledge graphs; the knowledge graphs include entity information, relationship information, and time information related to railway events; inputting the multiple knowledge graphs into a temporal graph attention network to obtain entity alignment results in the multiple knowledge graphs; and the temporal graph attention network is used to align entities in the multiple knowledge graphs based on the entity information, relationship information, and time information.

[0089] Furthermore, the logic instructions in the aforementioned memory 430 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product, stored in a storage medium, includes instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0090] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the entity alignment method based on graph neural network provided by the above methods, which includes: obtaining multiple knowledge graphs; the knowledge graph includes entity information, relationship information and time information related to railway events; inputting multiple knowledge graphs into a time relationship graph attention network to obtain entity alignment results in multiple knowledge graphs; the time relationship graph attention network is used to perform entity alignment in multiple knowledge graphs based on entity information, relationship information and time information.

[0091] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the entity alignment method based on graph neural network provided by the above-mentioned methods, the method comprising: obtaining multiple knowledge graphs; the knowledge graphs include entity information, relationship information and time information related to railway events; the multiple knowledge graphs are input into a time relationship graph attention network to obtain entity alignment results in the multiple knowledge graphs; the time relationship graph attention network is used to perform entity alignment in the multiple knowledge graphs based on entity information, relationship information and time information.

[0092] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.

[0093] Through the description of the above embodiments, those skilled in the art will clearly understand that each embodiment can be implemented using software plus a necessary general-purpose hardware platform, or of course, hardware. Based on this understanding, the essence of the above technical solution, or the portion that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, or an optical disk, and includes a number of instructions for causing a computer device (such as a personal computer, server, or network device) to execute the methods described in each embodiment or certain portions of the embodiments.

[0094] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. An entity alignment method based on graph neural network, characterized in that: include: Obtain multiple knowledge graphs; The knowledge graph includes entity information, relationship information and time information related to railway events; The multiple knowledge graphs are input into a temporal relationship graph attention network to obtain entity alignment results in the multiple knowledge graphs; the temporal relationship graph attention network is used to perform entity alignment in the multiple knowledge graphs based on entity information, relationship information and time information.

2. The entity alignment method based on graph neural network according to claim 1 is characterized in that The temporal graph attention network is trained based on the following method: Acquire multiple knowledge graph samples; the knowledge graph samples include entity information samples, relationship information samples and time information samples; Inputting the plurality of knowledge graph samples into a temporal relationship graph attention network to obtain target features corresponding to entities in the plurality of knowledge graph samples; the target features include aggregated entity information features, aggregated relationship information features, and aggregated time information features; Obtaining entity alignment results between the plurality of knowledge graph samples according to target features corresponding to entities in the plurality of knowledge graph samples; According to the entity alignment results and target loss function between the plurality of knowledge graph samples, a trained temporal relationship graph attention network is obtained.

3. The entity alignment method based on graph neural network according to claim 2 is characterized in that The objective loss function includes: in, represents a sparse matrix; Represents the difference measurement between the head entity and the tail entity; Represents the relationship measurement between the source entity and the target entity; Represents the time measurement between the source entity time information and the target entity time information.

4. The entity alignment method based on graph neural network according to claim 2, characterized in that The aggregate entity information features are determined based on the following method: , The aggregation relationship information characteristics are determined based on the following method: , The aggregated time information feature is determined based on the following method: , The target features are determined based on the following method: in, Represents the information characteristics of aggregated entities; Represents an entity; Represents the characteristics of aggregate relationship information; Represents the relational orthogonal transformation matrix; Represents the relational attention matrix; Represents the characteristics of aggregated time information; represents the time orthogonal transformation matrix; represents the time coordination transformation matrix; Represents the target features corresponding to the entities in the knowledge graph sample.

5. The entity alignment method based on graph neural network according to claim 4 is characterized in that: The time coordination conversion matrix is ​​determined based on the following method: in, represents the temporal attention weight vector; Represents an entity; represents the time orthogonal transformation matrix; Represents a set of time links.

6. The entity alignment method based on graph neural network according to any one of claims 2 to 5, characterized in that: After inputting the multiple knowledge graphs into the temporal graph attention network to obtain entity alignment results in the multiple knowledge graphs, the method further includes: Determine the similarity between the source entity and the target entity based on the dynamic similarity measurement algorithm; The entity alignment result is updated according to the similarity between the source entity and the target entity.

7. An entity alignment device based on graph neural network, characterized in that: include: Acquisition module, used to obtain multiple knowledge graphs; The knowledge graph includes entity information, relationship information and time information related to railway events; An alignment module, configured to input the plurality of knowledge graphs into a temporal graph attention network to obtain entity alignment results in the plurality of knowledge graphs; The temporal relationship graph attention network is used to align entities in multiple knowledge graphs based on entity information, relationship information and time information.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the entity alignment method based on graph neural network as described in any one of claims 1 to 6 is implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the entity alignment method based on graph neural network as described in any one of claims 1 to 6 is implemented.

10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the entity alignment method based on graph neural network as described in any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Automatic noise reduction and enhanced entity alignment method based on adaptive fusion of time information

    CN116502101A

  • Semi-supervised entity alignment method based on multi-hop attention mechanism

    CN118153679A