Power dispatching knowledge graph entity alignment method based on joint embedding

By combining graph attention networks and the TransH model, a joint embedding method is used to solve the problems of multi-source feature fusion and complex relationship modeling in power dispatch knowledge graphs. This method achieves efficient and accurate entity alignment and improves the quality and consistency of the knowledge graph.

CN121615748APending Publication Date: 2026-03-06ELECTRIC POWER RESEARCH INSTITUTE OF STATE GRID NINGXIA ELECTRIC POWER COMPANY +3
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511482813.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-16
Publication Date
2026-03-06

AI Technical Summary

Technical Problem

Power dispatch knowledge graphs have limitations in multi-source feature fusion, complex relationship modeling, and structural and semantic consistency, making it difficult to effectively align entities, resulting in insufficient quality and consistency of the knowledge graph.

Method used

We employ a joint embedding-based approach, extracting entity neighborhood structures through a graph attention network, capturing complex semantic relationships by combining a TransH model, and designing a joint loss function for entity alignment, thereby achieving deep fusion and collaborative optimization of multi-source knowledge.

Benefits of technology

It improves the comprehensiveness and structure awareness of entity embedding, enhances semantic consistency and reasoning reliability, improves the overall performance and stability of the model, and ensures efficient and accurate alignment of the knowledge graph.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121615748A_ABST
    Figure CN121615748A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of power system intellectualization, and particularly relates to a power dispatching knowledge graph entity alignment method based on joint embedding. The method comprises the following steps: S1, integrating multi-source heterogeneous data, determining a power dispatching knowledge graph entity alignment target, and obtaining a small number of aligned entity pairs from the target as supervision samples; s2, extracting an entity neighborhood structure by a design drawing attention network, dynamically adjusting the weight of a neighborhood entity through calculation, aggregating multi-source entity features, generating entity embedding with rich information, and measuring the possibility of entity alignment through the Euclidean distance between the entity embedding; s3, on the basis of entity embedding, in combination with a TransH model thought, capturing a complex semantic relationship between entities, and generating relationship embedding with semantic discrimination and reasoning guidance; and S4, designing a joint loss function, and carrying out unified modeling on entity embedding and relation embedding, so that the entity embedding and the relation embedding are collaboratively optimized in a joint embedding space.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of intelligent power system technology, specifically relating to a power dispatch knowledge graph entity alignment method based on joint embedding. Background Technology

[0002] Power dispatching systems are typical information- and knowledge-intensive decision-making and control centers, generating rich heterogeneous data during operation. Knowledge graphs (KG), as carriers for representing and storing knowledge, utilize triples... This approach organically integrates and correlates massive, dispersed, heterogeneous knowledge data, providing a more effective method for managing massive heterogeneous information. and Let represent the head entity and the tail entity, respectively, and 'r' represent the relationship between the two entities. Currently, some research has explored the construction of knowledge graphs in the power dispatching field. However, in the process of constructing power dispatching knowledge graphs, knowledge extracted from multi-source heterogeneous data may contain a large amount of fuzzy or redundant information. For example, "No. 1 main transformer" may be expressed as "#1 main transformer," "No. 1 transformer," etc., especially in manually written dispatching text data, where inconsistent terminology is very common. When fusing multi-source knowledge, entity alignment is necessary to avoid creating duplicate nodes and the inability to form links, thereby ensuring the quality of the constructed knowledge graph. Therefore, researching entity alignment methods for power dispatching knowledge graphs is of great significance.

[0003] Currently, traditional entity alignment methods can be mainly divided into similarity-based methods, logical rule-based methods, and knowledge embedding-based methods. These methods have different focuses in different application scenarios. First, similarity-based methods mainly rely on matching attribute information between entities, such as names, descriptions, category labels, and relationships with other entities. These methods typically evaluate the degree of matching between entities in different knowledge graphs by designing specific similarity metrics (such as cosine similarity, Jaccard coefficient, Levenshtein distance, etc.). Their advantages lie in their simplicity, strong interpretability, and suitability for scenarios with relatively clear structures and rich attributes. However, when faced with problems such as missing attributes, semantic ambiguity, or vagueness, these methods usually exhibit low robustness and adaptability, showing significant limitations in practical applications. Second, logical rule-based methods emphasize using manually defined or automatically learned logical rules for entity alignment. These rules are usually formulated by domain experts based on specific task contexts or derived from existing alignment results through rule mining techniques. This type of method demonstrates strong reasoning ability in knowledge graphs with clear semantic relationships and canonical structures. However, due to the high cost of rule construction and limited generalization ability, especially when facing cross-linguistic or multimodal data, its adaptability and scalability are poor. In recent years, with the development of deep learning, knowledge embedding-based methods have gradually become a research hotspot. The core idea of ​​this type of method is to map entities and relations in the knowledge graph to a low-dimensional continuous vector space, so that semantic information can be modeled through the distance or similarity between vectors. Typical examples include TransE, DistMult, and ComplEx models. These methods can effectively capture complex semantic relationships and have good generalization ability, showing significant advantages in processing large-scale heterogeneous knowledge graphs.

[0004] Despite their unique characteristics, these three approaches still face several challenges in the application of power dispatch knowledge graphs. Their main limitations are as follows: First, the complex structure and diverse information sources of power dispatch knowledge graphs make it difficult to effectively integrate multi-source entity features to generate entity embeddings with rich information. Second, the semantic relationships in the power dispatch domain are rich and crucial, especially in cross-knowledge or cross-model scenarios, which places higher demands on the model's ability to model complex relational semantics. Third, entities and relationships are highly interdependent; independent training makes it difficult to guarantee the synergistic consistency between structural features and semantic information, reducing the overall model performance and stability. Summary of the Invention

[0005] To address the problems in the construction of power dispatch knowledge graphs and the shortcomings of existing entity alignment methods, this invention proposes a power dispatch knowledge graph entity alignment method based on joint embedding. This method aims to effectively solve the limitations of current technologies in multi-source feature fusion, complex relationship modeling, and structural and semantic consistency. Furthermore, it performs entity alignment in the joint embedding space, achieving deep fusion of multi-source knowledge in the power dispatch knowledge graph and improving the overall quality and consistency of the knowledge graph.

[0006] To address the aforementioned technical problems, this invention provides the following technical solution: a power dispatching knowledge graph entity alignment method based on joint embedding, the method comprising the following steps:

[0007] S1. Integrate multi-source heterogeneous data, clarify the entity alignment target of the power dispatch knowledge graph, and obtain a small number of aligned entity pairs as supervision samples.

[0008] S2. The design graph attention network extracts the entity neighborhood structure, dynamically adjusts the weights of neighboring entities by calculation, aggregates multi-source entity features, generates entity embeddings with rich information, and measures the possibility of entity alignment by the Euclidean distance between entity embeddings.

[0009] S3. Based on entity embedding, and combined with the TransH model idea, further capture the complex semantic relationships between entities to generate a relation embedding with semantic distinctiveness and reasoning guidance, as an auxiliary constraint in the entity alignment process.

[0010] S4. Design a joint loss function to model the entity embeddings generated in S2 and the relation embeddings generated in S3 in a unified manner, so that the two can be optimized in the joint embedding space to achieve efficient and accurate entity alignment.

[0011] This technical solution is further optimized in step S1,

[0012] For the power dispatching knowledge graph, the multi-source heterogeneous data sources mainly include: power grid topology files, which contain power entities such as transmission lines, substations, and power plants, as well as the connection relationships between entities; equipment inventory files, which contain various primary or secondary equipment entities and entity attributes such as generators, main transformers, switches, disconnecting switches, busbars, and instrument transformers; dispatching regulation files, stable operation regulation files, dispatching log files, etc. accumulated and refined in the field of power dispatching for a long time. Based on the above data and business requirements, the sub-graphs included in the power dispatching knowledge graph are: power grid topology knowledge graph, equipment topology knowledge graph, dispatching rule knowledge graph, and dispatching event knowledge graph. Among them, the power grid topology knowledge graph and the equipment topology graph knowledge come from the actual situation of the power grid and have high standardization; the dispatching rule knowledge graph contains standardized dispatching terms and operation specifications, with high unity and guidance; the dispatching event knowledge graph mainly uses events such as the adjustment of dispatching operation modes, equipment maintenance, and operation risk handling recorded or written manually as the data source. Due to the subjectivity of manual records, the unstructured expression form, and the lack of a unified record template and standard, its overall standardization is relatively low.

[0013] On this basis, clarify the entity alignment task objectives: on the one hand, use the power grid topology knowledge graph and the equipment topology knowledge graph to align the event subjects of the dispatching event knowledge graph, mainly for various station yards, lines, and equipment entities. On the other hand, use the dispatching rule knowledge graph to align various professional terms and terms inside the dispatching event knowledge graph events.

[0014] For the further optimization of this technical solution, let represent a set of pre-aligned sub-graphs, where m represents the number of sub-graphs, respectively represent the entity set, relationship set, and triple set of the th sub-graph. Then, use prior knowledge such as existing mapping tables, equipment coding specifications, and naming rules for entity matching, construct a set of marked entity pairs with partially the same semantics as the training samples for supervised learning, and use S to represent this set, that is: ;

[0015] where represents an equivalence relationship, represents the entity in the sub-graph and the entity in the sub-graph is an entity pair with the same semantics, represents the Cartesian product of the entity sets of the two sub-graphs, that is, the set of all possible entity pairs composed of the two entity sets.

[0016] A further optimization of this technical solution involves, in step S2, the Graph Attention Network (GAT) takes the knowledge graph G as input and defines... , , , , where n represents the total number of entities in the graph.

[0017] First, for each entity attribute (such as capacity, voltage level, etc.), word vector encoding is used to represent it, and multiple attribute features are concatenated to generate an initial feature vector for each entity. ,in Let the dimension of the entity be defined. For the map The adjacency matrix is ​​obtained by using the initial eigenvector X and the adjacency matrix A as... The input to the stacked layers of GAT is that each layer aggregates neighborhood information through a self-attention mechanism. The propagation mechanism of GAT is as follows: ;

[0018] in, In G, n entities are in the nth order. The hidden state of a layer, i.e., after The entity embedding matrix output by stacked GAT layers. , , Represents the learnable weight matrix. Represented as It is a non-linear activation function. Indicates passage The adjacency matrix calculated by the layer self-attention mechanism.

[0019] Secondly, by calculating the dynamic adjustment of the first Layer adjacency matrix medium entity To the entity Attention weights This adaptively suppresses unimportant neighboring entities and enhances the contribution of key entities. The Middle element The calculation is as follows: ;

[0020] in, , representing entities The first-order neighborhood in the graph G Representing entities To the entity Relationship coefficient, relationship coefficient The calculation is as follows: ;

[0021] in, , respectively representing entities and entity The The hidden state vector of the layer, i.e. The first in Line and number OK. It is a non-linear function. It is a learning ability parameter. This indicates vector concatenation.

[0022] At the same time, in use from Layer vector space transformation to When using a layer vector space, restricting it to a diagonal matrix reduces the size of model parameters and computational complexity, effectively mitigating the overfitting problem that may be caused by high-dimensional parameter spaces.

[0023] After stacking After layer GAT, entity embedding It gradually captures entity information from nearest to farthest neighboring regions, and intelligently selects neighboring entities by combining an attention mechanism to generate multi-source feature entity embeddings that simultaneously consider entity features, local neighborhood structural features, and cross-sub-graph semantic features.

[0024] Finally, loss function constraints are used to align the similarity of entities in the embedding space: ;

[0025] in, This represents the maximum value between 0 and the input. It is a marginal hyperparameter. The entity embedding matrix represents a positive sample, which comes from the set of labeled entity pairs. , The entity embedding matrix representing the negative samples. Represents the negative sample set. and Representing entity pairs and entity embedding vector, , and Representing entity pairs and The negative sample entity embedding vector, Represents entity pairs and The Euclidean distance between entity embedding vectors is used to determine the quality of negative samples. To ensure the quality of negative samples, the non-target entity that is closest to the target entity is selected as the negative sample, and the Euclidean distance between the two is used as the metric for the search.

[0026] This technical solution is further optimized in step S3.

[0027] To further capture complex semantic relationships between entities, without increasing model complexity or training difficulty, the TransH model, a representative translation-based method, is chosen as the relation embedding model. Its core idea is to interpret relations as transformation operations on a hyperplane, representing each relation type... Represented as two learnable vectors: a normal vector This is used to define the hyperplane direction corresponding to the relationship; and a translation vector. , representing the offset of the relationship between entities on the hyperplane. Based on this, the head entity... Tail-end entity The projection onto the hyperplane can be expressed as: ; ;

[0028] in, express Projection onto the hyperplane express Projection onto the hyperplane, constraining the normal vector. .

[0029] The projection of the head entity onto the hyperplane plus the translation vector. The projection of the tail volume onto the hyperplane is approximately represented as follows: ;

[0030] Although entity embeddings generated by stacking multiple layers of GAT incorporate multi-source features, GAT focuses more on the connection structure between entities and dynamically emphasizes or weakens the influence of these connections through an attention mechanism, neglecting the understanding of relational semantics. Furthermore, in the context of power dispatch knowledge graph applications, relations are not merely simple edges but also carry rich semantic information. Therefore, to achieve more accurate entity alignment, this paper borrows the idea of ​​the TransH model and integrates triples in the knowledge graph G... This is further projected onto the hyperplane defined by each relation. Specifically, the initial vector representation of the entity originates from... Entity embedding matrix generated by layer GAT stacking And each relationship The embedding is represented as a normal vector. and a translation vector , are used to represent the offset between the hyperplane direction corresponding to this relationship and the entity, respectively. Based on this, the projections of the head entity embedding vector and the tail entity embedding vector onto the hyperplane can be expressed as: ; ;

[0031] in, , respectively representing the head entity Tail-end entity entity embedding vector, and These represent the head entity embedding vectors respectively. Tail-end entity Projection onto the hyperplane.

[0032] The projection of the head entity onto the hyperplane plus the translation vector. The projection of the tail volume onto the hyperplane is approximately represented as follows: ;

[0033] A further optimization of this technical solution is that if two entities have the same type of relationship with the same entity, then these two entities are likely semantically equivalent, i.e., they are aligned entities. Therefore, if entities... and When they are both head entities under a certain relationship, their entity embedding vectors and The projection onto the corresponding hyperplane satisfies: ;

[0034] Then the entity can be determined. and entity To align entities. Where... Representing entities entity embedding vector The projection onto the hyperplane, where Representing entities entity embedding vector Projection under the hyperplane, and They represent solid pairs on the hyperplane. and Entity embedding vector projection as a kind of relation The translation vector below.

[0035] Similarly, if entity pairs and When they are both tail entities under a certain relation, their entity embedding vectors and Projections onto the same hyperplane satisfy: ;

[0036] Then the entity can be determined. and entity To align entities.

[0037] Relying solely on indirect reasoning consistency (i.e., different entities predicting another similar entity through the same relationship) as the only criterion for entity alignment is obviously insufficient and prone to misjudgment. However, based on entity embeddings generated by multi-layer GAT stacking, using this reasoning consistency as an auxiliary constraint mechanism and further introducing relational semantic guidance can help improve the model's representation ability and alignment accuracy.

[0038] Therefore, the objective function is defined as follows: To further measure entity pair and The rationality of alignment.

[0039] Finally, the loss function is used to constrain the rationality of the aligned entity on the hyperplane: ;

[0040] in, It is a marginal hyperparameter used to separate positive and negative sample triples.

[0041] This technical solution is further optimized in step S4.

[0042] To achieve unified modeling of entity embeddings and relation embeddings, and to promote their collaborative optimization in the joint embedding space, a joint loss function is designed for joint training of the entity embeddings generated by multi-layer GAT in step S2 and the relation embeddings based on the TransH model for relational semantic representation in step S3. To reflect the equal importance of entity embeddings and relation embeddings in the entity alignment task and to ensure that they contribute equally during training, the model assigns the same weight coefficients to both embeddings during optimization, thus defining the final joint loss function as follows: ;

[0043] in, The loss function represents the entity embedding part. The loss function represents the relation embedding part.

[0044] To effectively optimize the joint loss function, the Adaptive Moment Estimation (Adam) algorithm is used for collaborative optimization to improve the model's training efficiency and convergence stability. The Adam algorithm combines the advantages of the Adaptive Gradient Algorithm (AdaGrad) and the Root Mean Square Propagation (RMSProp) algorithm. It updates the network parameters by dynamically adjusting the first and second moment estimates of the gradient, making it well-suited for this complex joint training scenario. Its update rule is as follows:

[0045] Initialize first-order and second-order moment estimates: ;

[0046] At each step t, the gradient is calculated. Then update the first-order moment estimate. and second-order moment estimation : ; ;

[0047] Calculate the estimated value after bias correction: ; ;

[0048] Update parameters: ;

[0049] in, It's the learning rate. and It is an exponential decay rate. It is a very small constant to prevent division by zero.

[0050] During the entity alignment phase, the model determines whether entities are aligned by calculating the Euclidean distance between them in the joint embedding space. Specifically, for any pair of entities, if the Euclidean distance between their embedding vectors is less than a predefined threshold... If the threshold is met, then the entities are considered aligned. The choice of threshold can be determined through validation set tuning. That is, during model training, a portion of supervised samples are reserved as a validation set, multiple different thresholds are tried, and the alignment performance under each threshold is evaluated on the validation set. Finally, the threshold with the best performance is selected.

[0051] As can be seen from the above technical solution, the power dispatching knowledge graph entity alignment method based on joint embedding provided by the embodiments of the present invention first integrates multi-source heterogeneous data, clarifies the entity alignment target of the power dispatching knowledge graph, and obtains a small number of aligned entity pairs as supervision samples; designs a graph attention network to extract the entity neighborhood structure, dynamically adjusts the weights of neighborhood entities by calculation, aggregates multi-source entity features, generates entity embeddings, and measures the possibility of entity alignment by the Euclidean distance between entity embeddings; based on entity embedding, combines the idea of ​​TransH model to further capture the complex semantic relationships between entities, and generates a relation embedding with semantic discriminability and reasoning guidance as an auxiliary constraint in the entity alignment process; designs a joint loss function to uniformly model the entity embedding generated by S2 and the relation embedding generated by S3, so that the two can be collaboratively optimized in the joint embedding space to achieve entity alignment.

[0052] Unlike existing technologies, the above technical solution has the following beneficial effects:

[0053] 1. By designing a multi-layer GAT stack, multi-source features are effectively fused, improving the comprehensiveness of entity embedding and the ability to perceive structure;

[0054] 2. A relational hyperplane is introduced to model complex semantics, and an auxiliary constraint mechanism is designed on this basis to enhance semantic consistency and reasoning reliability in the entity alignment process;

[0055] 3. By adopting a joint training strategy, entity embedding and relation embedding are optimized in a joint embedding space, which effectively improves the overall performance and stability of the model. Attached Figure Description

[0056] Figure 1 This is a task relationship structure diagram for aligning entities in the subgraph of the power dispatch knowledge graph.

[0057] Figure 2 This is a schematic diagram of information aggregation in a multi-layer graph attention network.

[0058] Figure 3 This is a schematic diagram of the TransH hyperplane projection for the knowledge embedding model.

[0059] Figure 4 This is a schematic diagram of the overall framework for entity alignment in a knowledge graph based on joint embedding. Detailed Implementation

[0060] To explain in detail the technical content, structural features, objectives, and effects of the technical solution, the following description is provided in conjunction with specific embodiments and accompanying drawings.

[0061] A preferred embodiment of the present invention provides a method for aligning entities in a power dispatch knowledge graph based on joint embedding, the method comprising the following steps:

[0062] S1. Integrate multi-source heterogeneous data, clarify the entity alignment target of the power dispatch knowledge graph, and obtain a small number of aligned entity pairs as supervision samples.

[0063] For the power dispatch knowledge graph, the main sources of multi-source heterogeneous data include: power grid topology files, which contain power entities such as transmission lines, substations, and power plants, as well as the connections between entities; equipment ledger files, which contain various primary or secondary equipment entities such as generators, main transformers, switches, disconnectors, busbars, and instrument transformers, as well as their attributes; and dispatching procedure documents, stable operation procedure documents, and dispatching log files accumulated and refined over a long period in the power dispatching field. Based on the above data and business needs, the power dispatch knowledge graph includes the following sub-graphs: power grid topology knowledge graph, equipment topology knowledge graph, dispatching rule knowledge graph, and dispatching event knowledge graph. Among them, the power grid topology knowledge graph and equipment topology knowledge graph are derived from the actual situation of the power grid and have a high degree of standardization; the dispatching rule knowledge graph contains standardized dispatching terminology and operating specifications, and has a high degree of uniformity and guidance; the dispatching event knowledge graph mainly uses manually recorded or written events such as dispatching operation mode adjustments, equipment maintenance, and operation risk handling as its data source. Due to the subjectivity of manual recording, the unstructured expression, and the lack of unified recording templates and standards, its overall standardization is relatively low.

[0064] Based on this, the objectives of entity alignment are clarified: On the one hand, the power grid topology knowledge graph and equipment topology knowledge graph are used to align the event subjects of the scheduling event knowledge graph, mainly targeting various substations, lines, and equipment entities. On the other hand, the scheduling rule knowledge graph is used to align various professional terms and jargon within the events of the scheduling event knowledge graph. The relationship structure of the entity alignment task in the subgraph of the power dispatching knowledge graph is as follows: Figure 1 As shown.

[0065] set up Let m represent a set of pre-aligned subgraphs, where m represents the number of subgraphs. They represent the first The system constructs a set of entity sets, relation sets, and triple sets for each sub-graph. Then, it utilizes existing mapping tables, device coding standards, naming rules, and other prior knowledge to perform entity matching, constructing a set of partially semantically identical labeled entity pairs as training samples for supervised learning. This set is denoted by S, i.e.: (1)

[0066] in This represents an equivalence relation. Subgraphs Entities in and the sub-graph Entities in are entity pairs with the same semantics. It represents the Cartesian product of the entity sets of two sub-graphs, that is, the set of all possible entity pairs formed by the two entity sets.

[0067] S2. The graph attention network extracts the entity neighborhood structure, dynamically adjusts the weights of neighborhood entities by calculation, aggregates multi-source entity features, generates entity embeddings with rich information, and measures the possibility of entity alignment through the Euclidean distance between entity embeddings.

[0068] The graph attention network takes the knowledge graph G as input and defines , , , , where n represents the total number of graph entities.

[0069] First, for each entity attribute (such as capacity, voltage level, etc.), it is represented by the word vector encoding method, and multiple attribute features are concatenated to generate the initial feature vector of each entity , where is the entity dimension, and it is defined that is the adjacency matrix of the graph. The initial feature vector X and the adjacency matrix A are used as the input of the stacked layers of GAT. Each layer aggregates neighborhood information through the self-attention mechanism. The propagation mechanism of GAT is:

[0070] Among them, represents the hidden state of the n entities in G at the layer, that is, the entity embedding matrix output after the stacked layers of GAT, , , represents the learnable weight matrix, is represented as , which is a non-linear activation function, represents the adjacency matrix calculated through the layer of self-attention mechanism.

[0071] Secondly, by calculating, the attention weight of the entity in the to the entity in the layer of the adjacency matrix in the element The calculation is as follows: (3)

[0072] in, , representing entities The first-order neighborhood in the graph G Representing entities To the entity Relationship coefficient, relationship coefficient The calculation is as follows: (4)

[0073] in, , respectively representing entities and entity The The hidden state vector of the layer, i.e. The first in Line and number OK. It is a non-linear function. It is a learning ability parameter. This indicates vector concatenation.

[0074] At the same time, in use from Layer vector space transformation to When using a layer vector space, restricting it to a diagonal matrix reduces the size of model parameters and computational complexity, effectively mitigating the overfitting problem that may be caused by high-dimensional parameter spaces.

[0075] After stacking After layer GAT, entity embedding It gradually captures entity information from nearest to farthest neighboring regions, and intelligently selects neighboring entities by combining an attention mechanism to generate multi-source feature entity embeddings that simultaneously consider entity features, local neighborhood structural features, and cross-sub-graph semantic features. Figure 2 This demonstrates the process of information aggregation through the stacking of multi-layer graph attention networks, in which... to From entity set E, , , .

[0076] Finally, loss function constraints are used to align the similarity of entities in the embedding space: (5)

[0077] in, This represents the maximum value between 0 and the input. It is a marginal hyperparameter. The entity embedding matrix represents a positive sample, which comes from the set of labeled entity pairs. , The entity embedding matrix representing the negative samples. Represents the negative sample set. and Representing entity pairs and entity embedding vector, , and Representing entity pairs and The negative sample entity embedding vector, Represents entity pairs and The Euclidean distance between entity embedding vectors is used to determine the quality of negative samples. To ensure the quality of negative samples, the non-target entity that is closest to the target entity is selected as the negative sample, and the Euclidean distance between the two is used as the metric for the search.

[0078] S3. Based on entity embedding, and combined with the TransH model concept, we further capture the complex semantic relationships between entities and generate a relation embedding with semantic distinctiveness and reasoning guidance, which serves as an auxiliary constraint in the entity alignment process.

[0079] To further capture complex semantic relationships between entities, without increasing model complexity or training difficulty, the TransH model, a representative translation-based method, is chosen as the relation embedding model. The core idea of ​​TransH is to interpret relations as transformation operations on a hyperplane, such as... Figure 3 As shown. Specifically, for each relationship type Represented as two learnable vectors: a normal vector This is used to define the hyperplane direction corresponding to the relationship; and a translation vector. , representing the offset of the relationship between entities on the hyperplane. Based on this, the head entity... Tail-end entity The projection onto the hyperplane can be expressed as: (6) (7)

[0080] in, express Projection onto the hyperplane express Projection onto the hyperplane, constraining the normal vector. .

[0081] The projection of the head entity onto the hyperplane plus the translation vector. The projection of the tail volume onto the hyperplane is approximately represented as follows: (8)

[0082] Although entity embeddings generated by stacking multiple layers of GAT incorporate multi-source features, GAT focuses more on the connection structure between entities and dynamically emphasizes or weakens the influence of these connections through an attention mechanism, neglecting the understanding of relational semantics. Furthermore, in the context of power dispatch knowledge graph applications, relations are not merely simple edges but also carry rich semantic information. Therefore, to achieve more accurate entity alignment, this paper borrows the idea of ​​the TransH model and integrates triples in the knowledge graph G... This is further projected onto the hyperplane defined by each relation. Specifically, the initial vector representation of the entity originates from... Entity embedding matrix generated by layer GAT stacking And each relationship The embedding is represented as a normal vector. and a translation vector , are used to represent the offset between the hyperplane direction corresponding to this relationship and the entity, respectively. Based on this, the projections of the head entity embedding vector and the tail entity embedding vector onto the hyperplane can be expressed as: (9) (10)

[0083] in, , respectively representing the head entity Tail-end entity entity embedding vector, and These represent the head entity embedding vectors respectively. Tail-end entity Projection onto the hyperplane.

[0084] The projection of the head entity onto the hyperplane plus the translation vector. The projection of the tail volume onto the hyperplane is approximately represented as follows: (11)

[0085] If two entities have the same type of relationship with the same entity, then these two entities are likely semantically equivalent, that is, they are aligned entities. Therefore, if entities are paired... and When they are both head entities under a certain relationship, their entity embedding vectors and The projection onto the corresponding hyperplane satisfies: (12)

[0086] Then the entity can be determined. and entity To align entities. Where... Representing entities entity embedding vector The projection onto the hyperplane, where Representing entities entity embedding vector Projection under the hyperplane, and They represent solid pairs on the hyperplane. and Entity embedding vector projection as a kind of relation The translation vector below.

[0087] Similarly, if entity pairs and When they are both tail entities under a certain relation, their entity embedding vectors and Projections onto the same hyperplane satisfy: (13)

[0088] Then the entity can be determined. and entity To align entities.

[0089] Relying solely on indirect reasoning consistency (i.e., different entities predicting another similar entity through the same relationship) as the only criterion for entity alignment is obviously insufficient and prone to misjudgment. However, based on entity embeddings generated by multi-layer GAT stacking, using this reasoning consistency as an auxiliary constraint mechanism and further introducing relational semantic guidance can help improve the model's representation ability and alignment accuracy.

[0090] Therefore, the objective function is defined as follows: To further measure entity pair and The rationality of alignment.

[0091] Finally, the loss function is used to constrain the rationality of the aligned entity on the hyperplane: (14)

[0092] in, It is a marginal hyperparameter used to separate positive and negative sample triples.

[0093] S4. Design a joint loss function to model the entity embeddings generated in S2 and the relation embeddings generated in S3 in a unified manner, so that the two can be optimized in the joint embedding space to achieve efficient and accurate entity alignment.

[0094] To achieve unified modeling of entity embedding and relation embedding, and to promote their collaborative optimization in the joint embedding space, this invention constructs a general framework for knowledge graph entity alignment based on joint embedding, such as... Figure 4 As shown, where Represents the attention weights between entities. , and Representing the relationship and Translation vectors on the hyperplane. Based on this framework, a joint loss function is designed to jointly train the entity embeddings generated by multi-layer GAT in step S2 and the relation embeddings based on the TransH model for relational semantic representation in step S3. To reflect the equal importance of entity embeddings and relation embeddings in the entity alignment task and to ensure that they contribute equally during training, the model assigns the same weight coefficients to both embeddings during optimization, thus defining the final joint loss function as follows: (15)

[0095] in, The loss function represents the entity embedding part. The loss function represents the relation embedding part.

[0096] To effectively optimize the joint loss function, the Adaptive Moment Estimation (Adam) algorithm is used for collaborative optimization to improve the model's training efficiency and convergence stability. The Adam algorithm combines the advantages of the Adaptive Gradient Algorithm (AdaGrad) and the Root Mean Square Propagation (RMSProp) algorithm. It updates the network parameters by dynamically adjusting the first and second moment estimates of the gradient, making it well-suited for this complex joint training scenario. Its update rule is as follows:

[0097] Initialize first-order and second-order moment estimates: ;

[0098] At each step t, the gradient is calculated. Then update the first-order moment estimate. and second-order moment estimation : (16) (17)

[0099] Calculate the estimated value after bias correction: (18) (19)

[0100] Update parameters: ;

[0101] Where α is the learning rate. and It is the exponential decay rate, where ε is a very small constant to prevent division by zero.

[0102] During the entity alignment phase, the model determines whether entities are aligned by calculating the Euclidean distance between them in the joint embedding space. Specifically, for any pair of entities, if the Euclidean distance between their embedding vectors is less than a predefined threshold... If the threshold is met, then the entities are considered aligned. The choice of threshold can be determined through validation set tuning. That is, during model training, a portion of supervised samples are reserved as a validation set, multiple different thresholds are tried, and the alignment performance under each threshold is evaluated on the validation set. Finally, the threshold with the best performance is selected.

[0103] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Unless otherwise specified, an element defined by the phrase "comprising..." or "including..." does not exclude the presence of additional elements in the process, method, article, or terminal device that includes said element. Additionally, in this document, "greater than," "less than," "exceeding," etc., are understood to exclude the stated number; "above," "below," "within," etc., are understood to include the stated number.

[0104] Although the above embodiments have been described, those skilled in the art, once they understand the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the above descriptions are merely embodiments of the present invention and do not limit the scope of patent protection of the present invention. Any equivalent structural or procedural transformations made using the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.

[0105] The above-disclosed embodiments are merely preferred embodiments of the present invention and should not be construed as limiting the scope of the invention. Those skilled in the art will understand that implementing all or part of the above-described embodiments and making equivalent changes in accordance with the claims of the present invention are still within the scope of the invention.

Claims

1. A joint embedding-based power dispatch knowledge graph entity alignment method, characterized in that, The method comprises the following steps: S1, integrating multi-source heterogeneous data, determining the entity alignment target of the power dispatch knowledge graph, and obtaining a small amount of aligned entity pairs as supervised samples from the multi-source heterogeneous data; S2, designing a graph attention network to extract the entity neighborhood structure, adjusting the weight of the neighborhood entity by calculation, aggregating the multi-source entity features, generating entity embedding, and measuring the possibility of entity alignment by the Euclidean distance between entity embeddings; S3, on the basis of the entity embedding, combining the TransH model idea, further capturing the complex semantic relationship between entities, generating a relationship embedding with semantic distinction and reasoning guidance as an auxiliary constraint in the entity alignment process; S4, designing a joint loss function to model the entity embedding generated by S2 and the relationship embedding generated by S3, so that the two are optimized in the joint embedding space, and the entity alignment is realized.

2. The joint embedding-based power dispatch knowledge graph entity alignment method of claim 1, wherein, In the step S1, for the power dispatch knowledge graph, the multi-source heterogeneous data sources are: power grid topology files, which contain power entities such as transmission lines, substations and power plants, and the connection relationship between entities; equipment account files, which contain various primary or secondary equipment entities and entity attributes such as generators, transformers, switches, switches, buses and mutual inductors; dispatching procedures, stable operation procedures and dispatching log files accumulated and refined in the power dispatching field for a long time; The sub-graphs contained in the power dispatch knowledge graph are: power grid topology knowledge graph, device topology knowledge graph, dispatching rule knowledge graph and dispatching event knowledge graph, wherein the power grid topology knowledge graph and the device topology knowledge graph are derived from the actual situation of the power grid, the dispatching rule knowledge graph contains standardized dispatching terms and operation specifications, and the dispatching event knowledge graph takes the dispatching operation mode adjustment, equipment maintenance and operation risk handling events recorded or written by artificial as the main data source; The task target of entity alignment includes: on the one hand, aligning the event subjects of the dispatching event knowledge graph by using the power grid topology knowledge graph and the device topology knowledge graph, the event subjects including station entities, line entities and device entities; on the other hand, aligning various professional terms and terminologies in the dispatching event knowledge graph by using the dispatching rule knowledge graph.

3. The joint embedding-based power dispatch knowledge graph entity alignment method of claim 2, wherein, The selection of samples in the step S1 includes: Let denote a set of pre-aligned sub-graphs, where m denotes the number of sub-graphs, E a , R a , T a denote the entity set, relation set and triple set of the a-th sub-graph, respectively. Then, the set of labeled entity pairs S with partially same semantics is constructed by using the existing mapping table, device coding specification and naming rule prior knowledge for entity matching, which is used as the training sample for supervised learning: ; wherein represents an equivalence relation, represents a subgraph of entities and a subgraph of entities are semantically identical entity pairs, represents the Cartesian product of two sets of subgraph entities, i.e. the set of all possible entity pairs composed of the two sets of entities.

4. The joint embedding-based power dispatch knowledge graph entity alignment method of claim 1, wherein, In the step S2: The graph attention network takes a knowledge graph G as input, defines , , , n represents the total number of graph entities; First, for each entity attribute, the word vector encoding method is used for representation, and multiple attribute features are spliced to generate the initial feature vector of each entity wherein is the entity dimension, define A as the adjacency matrix of the graph G, take the initial feature vector X and the adjacency matrix A as the input of the GAT stacked layer, and each layer aggregates neighborhood information through self-attention mechanism, and the propagation mechanism of GAT is: ; in, In G, n entities are in the nth order. The hidden state of a layer, i.e., after The entity embedding matrix output by stacked GAT layers. , , Represents the learnable weight matrix. Represented as , is a non-linear activation function. Indicates passage The adjacency matrix calculated by the layer self-attention mechanism; Secondly, by calculating the dynamic adjustment of the first Layer adjacency matrix medium entity To the entity Attention weights This adaptively suppresses unimportant neighboring entities and enhances the contribution of key entities. The (i,j)th element The calculation is as follows: ; wherein, denotes an entity a first order neighborhood in the graph G, denotes an entity a relationship coefficient to an entity a relationship coefficient is calculated as follows: ; wherein, , respectively, denote the hidden state vectors of the first and second layers of the entity , i.e. the first row and the second row in , is a non-linear function, is a learning capacity parameter, denotes vector concatenation; Meanwhile, in using From Layer vector space to Layer vector space, it is limited to a diagonal matrix; After stacking entity embedding after layer GAT Step by step capture entity information from near neighbors to more distant neighbors, and through the combination of attention mechanism, intelligently select neighborhood entities, generate multi-source feature entity embedding considering entity itself features, local neighborhood structure features and cross subgraph semantic features. Finally, the similarity of aligned entities in the embedding space is constrained by using the loss function: ; wherein, represents the maximum value between 0 and the input, is a marginal hyperparameter, represents the entity embedding matrix of positive samples from the set of labeled entity pairs , represents the entity embedding matrix of negative samples, represents the set of negative samples, and respectively represent the entity embedding vectors of entity pairs and , , and respectively represent the negative sample entity embedding vectors of entity pairs and , represents the Euclidean distance between the entity embedding vectors of entity pairs and , to ensure the quality of negative samples, the non-target entity closest to the target entity is selected as the negative sample, and the Euclidean distance between the two is used as a measure to search.

5. The joint embedding-based power dispatch knowledge graph entity alignment method of claim 1, wherein: The step S3 adopts a TransH model as a relation embedding model to obtain two vectors representing a head entity and a tail entity of each relation type , respectively. A normal vector is used to define the direction of the hyperplane corresponding to the relation, and a translation vector represents the offset of the relation between the entities on the hyperplane. The projection of the head entity and the tail entity on the hyperplane is represented as: ; ; wherein represents projection onto hyperplane, represents projection onto hyperplane, constraint normal vector ; the head entity's projection on the hyperplane plus the translation vector approximating the tail entity's projection on the hyperplane, i.e.: ; Triples in knowledge graph G Projecting further onto the hyperplane defined by each relation, the initial vector representation of the entity is derived from... Entity embedding matrix generated by layer GAT stacking And each relationship The embedding is represented as a normal vector. Translation vector , respectively, are used to represent the offset between the hyperplane direction corresponding to the relationship and the entity. The projections of the head entity embedding vector and the tail entity embedding vector onto the hyperplane are expressed as: ; ; wherein, respectively represent the entity embedding vectors of the head entity and the tail entity , and respectively represent the projections of the head entity embedding vector and the tail entity onto the hyperplane. the head entity's projection on the hyperplane plus the translation vector approximating the tail entity's projection on the hyperplane, i.e.: ; On the basis of the above relationship embedding, the auxiliary constraint mechanism based on projection consistency is constructed by using the characteristic that the semantics of entities with the same relationship context are similar, and the consistency constraint and optimization reference are provided for joint embedding learning.

6. The joint embedding-based power dispatch knowledge graph entity alignment method of claim 1, wherein: The auxiliary constraint mechanism of entity alignment in the step S3 is as follows: If entity pair and are jointly the head entity under some relation, their entity embedding vectors and satisfy the following: ; then the entities are determined and the entities are aligned entities, wherein denotes the entity embedding vector of an entity is the projection of the entity embedding vector of an entity under the hyperplane, denotes the entity embedding vector and denote the projections of the entity embedding vectors of the entity pair and on the hyperplane as translation vectors under a certain relation ; Similarly, if entities a and are tail entities under some relation, their entity embedding vectors and satisfy the projection under the same hyperplane: ; then the entity is determined and the entity is an alignment entity; Define the objective function: ; The rationality of aligned entities on the hyperplane is constrained by using the loss function: ; wherein, is a marginal hyperparameter for separating positive-negative sample triplets.

7. The joint embedding-based power dispatch knowledge graph entity alignment method of claim 1, wherein: In the step S4, a joint loss function L is defined for joint training of entity embedding and relationship embedding: ; wherein, a loss function representing the entity embedding part, a loss function representing the relation embedding part; The adaptive matrix estimation optimization algorithm is used for collaborative optimization. For any pair of entities, if the Euclidean distance between the embedding vectors is less than a pre-defined threshold τ, it is considered that the pair of entities is aligned, and the selection of threshold τ is determined by the verification set.