Electric power data management method based on heterogeneous data resource atlas
Through the power data governance method based on the heterogeneous data resource map, the problem of complex and diversified data resources is solved, the integration of data source information and the efficient query and visual display of associated relationships are realized, and more reliable data management and understand.
Patent Information
- Application Number
- CN202410942195.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-15
- Publication Date
- 2024-08-23
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In power data management, there are many types of data resources and diverse sources, making it difficult to effectively integrate and manage assets. In particular, the relationships between semi-structured data and diversified data sources are difficult to understand and query.
Adopting a power data governance method based on heterogeneous data resource graphs, through entity alignment, fusion and disambiguation, using multi-head graph neural network and graph convolution network to build a relationship extraction model to form a power resource graph, and through KD tree and heuristic search Perform queries and visual displays.
It achieves effective integration of information from different data sources, accurately models entity relationships, efficiently queries and matches data, helps users understand the relationships between data resources, and provides more reliable entity fusion results and visual display of data resources.
Smart Images

Figure CN118535749A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data management, and in particular to a power data governance method based on a heterogeneous data resource map. Background Art
[0002] With the development of electric power intelligence, the data assets of State Grid Corporation of China are growing continuously, and the data are complex, with huge data scale, various data formats and various data sources, making it difficult to manage assets. In terms of data format types, in addition to traditional structured data, there are semi-structured data such as text data, image data, voice data, and video data. In terms of data sources, data includes both internal data and external data from third parties, including business data collected by traditional business processing, as well as data generated by technologies such as sensors, machines and equipment, website networks, and logs. Data assets are characterized by massive, diverse, and diversified data objects. Therefore, how to transform complex data resources into data assets is an extremely urgent issue at present. Summary of the invention
[0003] In order to solve the above problems, the purpose of the present invention is to provide a power data governance method based on a heterogeneous data resource map, which can effectively integrate information from different data sources, accurately model entity relationships, efficiently query and match data, and help users better understand the relationship between data resources through visual display.
[0004] To achieve the above object, the present invention adopts the following technical solutions: A power data governance method based on a heterogeneous data resource map includes the following steps: S1: Extract entity information from various data sources and preprocess it, including entity alignment, entity fusion, and entity disambiguation; S2: Based on the preprocessed entities, the relationship between entities is extracted based on the relationship extraction model, specifically: S21: Use the preprocessed entities as nodes of the graph and obtain the initial representation of the entities through pre-trained word embedding; S22: construct the edges of the graph using the relationship information between entities, and construct the weights of the edges based on the co-occurrence and dependency relationships between entities; S23: A multi-head graph neural network based on the attention mechanism builds a relationship extraction model to capture the semantic relationship between entities by learning the attention weights between nodes: Use a multi-layer graph convolutional network GCN to update the embedding of the entity. Each layer of GCN is calculated by the following formula: ; in, is the entity embedding of the lth layer, A is the adjacency matrix, D is the diagonal matrix of the degree matrix, is the weight matrix of the lth layer, Non-linear activation function; Based on GCN, the attention mechanism is introduced to capture the relationship between entities. The attention layer is expressed as: ; in, is the attention weight between node u and node v, a is the learned attention parameter, W is the weight matrix, and are the characteristics of node u and node v respectively; N u represents the set of neighbor nodes of node u, is the feature of neighbor node k; Finally, a fully connected layer is used to predict the relationship category between entity pairs: ; in, is the weight matrix of relation classification, is the bias term, is the output of the fully connected layer, is the attention aggregation representation of node u; S3: Based on the extracted relationship information, establish the connection between entities, form a relationship network, and construct a power resource map; S4: Construct a KD tree based on the power resource map data. According to the vector representation of entities and relationships, recursively divide the space and construct a KD tree. Select a dimension and sort the vector set according to the dimension. Find the median vector as the partition point of the current node and divide the vector set into two left and right subsets. Recursively construct the KD tree for the left and right subsets until all vectors are processed. S5: Based on the subgraph queried by the user, TOP-K subgraph matching query is performed through KD tree and heuristic search; S6: Based on the query results, a visualization is performed to show the relationship between data resources and the situation of cross-city data resources.
[0005] Furthermore, the entity fusion is specifically as follows: First, entities are extracted from different data sources, an entity library is constructed, and a candidate entity set is generated based on the entity library. The candidate entities are represented as: ; ; in, , Represents data from different data sources. , is the corresponding candidate entity set; Represents entity extraction; For each candidate entity, represent it as a feature vector: ; ; in, , Represent the feature vectors of entities in different data sources, Represents feature extraction; The similarity between entities in different data sources is calculated by Euclidean distance to measure the degree of match between them; According to the similarity calculation results between entities, the most matching entity is selected as the alignment result, and the matching results are integrated: MatchedEntities=EntityAlignment(Data source ,Data target ); Among them, MatchedEntities is the matching result, which contains the corresponding relationship between entities in different data sources; For each pair of corresponding entities in the matching results, their features are fused to obtain a unified entity feature representation: MergedFeature i =FeatureFusion(Featuresource i ,Featuretarget j ); Among them, MergedFeature i is the fusion feature of entity i, Featuresource i and Featuretarget j are the feature vectors of entity i in different data sources respectively; FeatureFusion represents a fusion operation; Finally, by calculating the similarity between the fused features, the most similar entities are selected for merging, duplicate entities are eliminated, and a unique entity representation is established.
[0006] Furthermore, the entity disambiguation is as follows: For each entity to be disambiguated, generate a set of candidate entities from the entity library. Let Entities i For the i entities to be disambiguated, Candidates i For thei A set of candidate entities; For each entity to be disambiguated and candidate entity, it needs to be represented as a feature vector for entity matching. The process of entity feature representation is expressed as: Feature i =FeatureExtraction(Entities i ) ; Feature ij =FeatureExtraction(Candidates ij ) ; Among them, Feature i Indicates i Feature vector of entities to be disambiguated; ij Candidatesij represents the entity feature vector of the jth candidate entity in the candidate entity set of the i-th entity to be disambiguated; i The entity feature vector of the jth candidate entity in the set of candidate entities; For each entity and context information to be disambiguated, the context information is represented as a feature vector to consider the meaning of the entity in different contexts: ContextFeature i =ContextFeatureExtraction(Context i ) ; Among them, Context i For the i The context information of the entity to be disambiguated, ContextFeature i For the i context feature vector; ContextFeatureExtraction represents context feature extraction; Finally, by comprehensively considering entity features and context features, the similarity between the entity to be disambiguated and the candidate entity is calculated, and the most matching entity is selected as the disambiguation result. The entity matching process is expressed as: Similarity ij =Similarity(Feature i ,Feature ij ,ContextFeature i ) ; ; Among them, Similarity is similarity calculation; Similarity ijRepresents the similarity between the entity to be disambiguated and the candidate entity, DisambiguatedEntity i is the disambiguated entity.
[0007] Furthermore, the relationship extraction model training is as follows: Use the cross entropy loss function to train the relation extraction model: ; in, is the one-hot encoding of the true label of node u for category c, is the probability predicted by the model that node u is of category c, C is the number of categories; N is the total number of nodes; In each training step, the Adam optimizer calculates the parameter update amount based on the current gradient and updates the model parameters. For each parameter θ, its gradient is recorded as g, and the update steps are as follows: Compute the first moment estimate of the gradient and the second moment estimate :
[0008] in, It is a hyperparameter used to control the influence of historical gradients; t is the time step, g t is the current gradient; is the first-order moment estimate of the previous time step; It is a hyperparameter used to control the influence of the square of historical gradients; is the second-order moment estimate of the previous time step; First-order moment estimate and the second moment estimate To perform bias correction:
[0009] Use the corrected first-order moment estimates and second-order moment estimates to update the parameters: ; in, is the learning rate, is a constant, is the updated parameter, is an existing parameter.
[0010] Furthermore, the S3 is specifically: S31: Based on the knowledge graph embedding model, for each entity, the entity is mapped into a low-dimensional vector space; S32: For each relationship type, define a relationship embedding vector to represent the relationship between entities; S33: Use the extracted relational data and entity data to train the knowledge graph embedding model to learn the vector representation of entities and relations, and adjust the vector representation of entities and relations by optimizing the objective function: The loss function of the knowledge graph embedding model is defined as:
[0011] Where S is a positive triple, s and w are the vectors of the head entity and tail entity of the positive triple respectively, and r is the vector of the positive triple relation; is a negative triplet, is the interval hyperparameter, is the distance function, and is the vector of the head and tail entities of the negative triplet, is the vector of negative triple relations.
[0012] Furthermore, the S5 is specifically: S51: Design a heuristic function to calculate the similarity score based on the features of subgraph matching, including node similarity and edge similarity; Use the similarity score to guide the search process and prioritize subgraph matches with high similarity: There are two subgraphs G 1 and G 2 , respectively, by the node V 1 and V 2 and the edge set E 1 and E 2 Each node and edge has a corresponding vector representation, which is expressed as and ; For nodes , find the most similar node , calculate the similarity score between them: ; in, Represents a node vector and The cosine similarity of For edge , to the edge that is most similar to it , calculate the similarity score between them; ; Taking both node similarity and edge similarity into consideration, we can calculate the similarity score between two subgraphs: ; S52: Starting from the root node of the search tree, the subgraph matching is gradually expanded through a heuristic search algorithm.
[0013] Further, the S52 is specifically as follows: Add the query graph subgraph as the starting node to the priority queue, with an initial path cost of 0; Initialize an empty result set to store the most similar TOP-K subgraph matching results; Take the node with the smallest path cost from the priority queue for expansion; Expand the subgraph matching according to the current node, generate a new subgraph matching node, and calculate the path cost and heuristic function score; Add the newly generated subgraph matching nodes to the priority queue and sort them according to the path cost and heuristic function score; If the current node is the target node or the entire search tree has been searched, add it to the result set; When the number of subgraph matches in the result set reaches TOP-K, the search stops.
[0014] Furthermore, the S6 is specifically: According to the query results, the association relationship between data resources and the information of cross-city data resources are obtained from the power resource map; Represent data resources as nodes, and relationships as edges to construct a relationship network graph; Adjust the layout of the relationship network diagram to make the layout of related nodes and edges clearer and easier to understand; Mark and display cross-city data resources on the map, and use the geographic information system GIS for map display.
[0015] The present invention has the following beneficial effects: The present invention extracts entity information from various data sources and performs preprocessing, including entity alignment, entity fusion and entity disambiguation, which can effectively fuse entities in matching results, eliminate duplicate entities, establish unique entity representations, and provide more reliable entity fusion results for data fusion and knowledge graph construction. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 is a flow chart of the method of the present invention; Figure 2 Schematic diagram of the relationship extraction process in one embodiment of the present invention. DETAILED DESCRIPTION
[0017] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments: refer to Figure 1 In this embodiment, a power data governance method based on a heterogeneous data resource map is provided, comprising the following steps: S1: Extract entity information from various data sources and preprocess it, including entity alignment, entity fusion, and entity disambiguation; S2: Based on the preprocessed entities, the relationship between entities is extracted based on the relationship extraction model, specifically: S21: Use the preprocessed entities as nodes of the graph and obtain the initial representation of the entities through pre-trained word embedding; S22: construct the edges of the graph using the relationship information between entities, and construct the weights of the edges based on the co-occurrence and dependency relationships between entities; S23: A multi-head graph neural network based on the attention mechanism builds a relationship extraction model to capture the semantic relationship between entities by learning the attention weights between nodes: Use a multi-layer graph convolutional network GCN to update the embedding of the entity. Each layer of GCN is calculated by the following formula: ; in, is the entity embedding of the lth layer, A is the adjacency matrix, D is the diagonal matrix of the degree matrix, is the weight matrix of the lth layer, Non-linear activation function; Based on GCN, the attention mechanism is introduced to capture the relationship between entities. The attention layer is expressed as: ; in, is the attention weight between node u and node v, a is the learned attention parameter, W is the weight matrix, and are the characteristics of node u and node v respectively; N u represents the set of neighbor nodes of node u, is the feature of neighbor node k; Finally, a fully connected layer is used to predict the relationship category between entity pairs: ; in, is the weight matrix of relation classification, is the bias term, is the output of the fully connected layer, is the attention aggregation representation of node u; S3: Based on the extracted relationship information, establish the connection between entities, form a relationship network, and construct a power resource map; S4: Construct a KD tree based on the power resource map data. According to the vector representation of entities and relationships, recursively divide the space and construct a KD tree. Select a dimension and sort the vector set according to the dimension. Find the median vector as the partition point of the current node and divide the vector set into two left and right subsets. Recursively construct the KD tree for the left and right subsets until all vectors are processed. S5: Based on the subgraph queried by the user, TOP-K subgraph matching query is performed through KD tree and heuristic search; S6: Based on the query results, a visualization is performed to show the relationship between data resources and the situation of cross-city data resources.
[0018] In this embodiment, preferably, entity fusion is as follows: First, entities are extracted from different data sources, an entity library is constructed, and a candidate entity set is generated based on the entity library. The candidate entities are represented as: ; ; in, , Represents data from different data sources. , is the corresponding candidate entity set; Representation entity extraction (using NER); For each candidate entity, represent it as a feature vector: ; ; in, , Represent the feature vectors of entities in different data sources, Representation feature extraction (using bag-of-words model, TF-IDF or Word Embeddings); The Euclidean distance is used to calculate the similarity between entities in different data sources and measure the degree of matching between them. Specifically, ; Among them, e1 and e2 are the feature vectors of two entities, and Similarity(e1,e2) represents the similarity between them; According to the similarity calculation results between entities, the most matching entity is selected as the alignment result, and the matching results are integrated: MatchedEntities=EntityAlignment(Data source ,Data target ); in, EntityAlignmentIndicates the operation of aligning and matching entities; MatchedEntities is the matching result, which contains the corresponding relationship between entities in different data sources; For each pair of corresponding entities in the matching results, their features are fused to obtain a unified entity feature representation: MergedFeature i =FeatureFusion(Featuresource i ,Featuretarget j ); Among them, MergedFeature i is the fusion feature of entity i, Featuresource i and Featuretarget j are the feature vectors of entity i in different data sources respectively; FeatureFusion represents a fusion operation; Finally, by calculating the similarity between the fused features, the most similar entities are selected for merging, duplicate entities are eliminated, and a unique entity representation is established.
[0019] Preferably, in this embodiment, entity disambiguation is as follows: For each entity to be disambiguated, generate a set of candidate entities from the entity library. Let Entities i For the i entities to be disambiguated, Candidates i For the i A set of candidate entities; For each entity to be disambiguated and candidate entity, it needs to be represented as a feature vector for entity matching. The process of entity feature representation is expressed as: Feature i =FeatureExtraction(Entities i ) ; Feature ij =FeatureExtraction(Candidates ij ) ; Among them, Feature i Indicates i Feature vector of entities to be disambiguated; ij Candidatesij represents the entity feature vector of the jth candidate entity in the candidate entity set of the i-th entity to be disambiguated; iThe entity feature vector of the jth candidate entity in the set of candidate entities; For each entity and context information to be disambiguated, the context information is represented as a feature vector to consider the meaning of the entity in different contexts: ContextFeature i =ContextFeatureExtraction(Context i ) ; Among them, Context i For the i The context information of the entity to be disambiguated, ContextFeature i For the i context feature vector; ContextFeatureExtraction represents context feature extraction; Preferably, for the word vectors in the context around the entity to be disambiguated, the following methods can be used to obtain the context representation: Average Pooling: All word vectors are averaged to obtain an average context vector representation. Weighted Average Pooling: According to the importance or weight of the word, the word vectors are weighted averaged to obtain a weighted average context vector representation. RNN or LSTM: Use models such as recurrent neural network (RNN) or long short-term memory network (LSTM) to model the word sequence and obtain a sequence representation of the context.
[0020] Finally, by comprehensively considering entity features and context features, the similarity between the entity to be disambiguated and the candidate entity is calculated, and the most matching entity is selected as the disambiguation result. The entity matching process is expressed as: Similarity ij =Similarity(Feature i ,Feature ij ,ContextFeature i ) ; ; Among them, Similarity is similarity calculation; Similarity ij Represents the similarity between the entity to be disambiguated and the candidate entity, DisambiguatedEntity i is the disambiguated entity.
[0021] Preferably, in this embodiment, the relationship extraction model training is as follows: Use the cross entropy loss function to train the relation extraction model: ; in, is the one-hot encoding of the true label of node u for category c, is the probability predicted by the model that node u is of category c, C is the number of categories; N is the total number of nodes; In each training step, the Adam optimizer calculates the parameter update amount based on the current gradient and updates the model parameters. For each parameter θ, its gradient is recorded as g, and the update steps are as follows: Compute the first moment estimate of the gradient and the second moment estimate :
[0022] in, It is a hyperparameter used to control the influence of historical gradients; t is the time step, g t is the current gradient; is the first-order moment estimate of the previous time step; It is a hyperparameter used to control the influence of the square of historical gradients; is the second-order moment estimate of the previous time step; First-order moment estimate and the second moment estimate To perform bias correction:
[0023] Use the corrected first-order moment estimates and second-order moment estimates to update the parameters: ; in, is the learning rate, is a constant, is the updated parameter, is an existing parameter.
[0024] Preferably, in this embodiment, S3 is specifically: S31: Based on the knowledge graph embedding model, for each entity, the entity is mapped into a low-dimensional vector space; S32: For each relationship type, define a relationship embedding vector to represent the relationship between entities; S33: Use the extracted relational data and entity data to train the knowledge graph embedding model to learn the vector representation of entities and relations, and adjust the vector representation of entities and relations by optimizing the objective function: The loss function of the knowledge graph embedding model is defined as:
[0025] Where S is a positive triple, s and w are the vectors of the head entity and tail entity of the positive triple respectively, and r is the vector of the positive triple relation; is a negative triplet, is the interval hyperparameter, is the distance function, and is the vector of the head and tail entities of the negative triplet, is the vector of negative triple relations.
[0026] Preferably, in this embodiment, S5 is specifically: S51: Design a heuristic function to calculate the similarity score based on the features of subgraph matching, including node similarity and edge similarity; Use the similarity score to guide the search process and prioritize subgraph matches with high similarity: There are two subgraphs G 1 and G 2 , respectively, by the node V 1 and V 2 and the edge set E 1 and E 2 Each node and edge has a corresponding vector representation, which is expressed as and ; For nodes , find the most similar node , calculate the similarity score between them: ; in, Represents a node vector and The cosine similarity of For edge , to the edge that is most similar to it , calculate the similarity score between them; ; Taking both node similarity and edge similarity into consideration, we can calculate the similarity score between two subgraphs: ; S52: Starting from the root node of the search tree, the subgraph matching is gradually expanded through a heuristic search algorithm.
[0027] Preferably, in this embodiment, S52 is specifically as follows: Add the query graph subgraph as the starting node to the priority queue, with an initial path cost of 0; Initialize an empty result set to store the most similar TOP-K subgraph matching results; Take the node with the smallest path cost from the priority queue for expansion; Expand the subgraph matching according to the current node, generate a new subgraph matching node, and calculate the path cost and heuristic function score; Add the newly generated subgraph matching nodes to the priority queue and sort them according to the path cost and heuristic function score; If the current node is the target node or the entire search tree has been searched, add it to the result set; When the number of subgraph matches in the result set reaches TOP-K, the search stops.
[0028] Preferably, in this embodiment, S6 is specifically: According to the query results, the association relationship between data resources and the information of cross-city data resources are obtained from the power resource map; Represent data resources as nodes, and relationships as edges to construct a relationship network graph; Adjust the layout of the relationship network diagram to make the layout of related nodes and edges clearer and easier to understand; Mark and display cross-city data resources on the map, and use the geographic information system GIS for map display.
[0029] In this embodiment, D3.js is used to construct a network graph, which specifically includes the following steps: Data preparation: Store the preprocessed node and edge data in JavaScript objects, such as nodes and links. The node object contains the node's attributes, such as id, name, city, etc. The edge object contains the ids of the source and target nodes of the edge.
[0030] Create SVG elements: Use D3.js to create SVG elements for displaying network diagrams.
[0031] Binding data: Use D3.js's .selectAll() and .data() methods to bind node and edge data.
[0032] Draw nodes: Use the .append() method of D3.js to create SVG elements (such as circles or rectangles) that represent nodes, and set the position and style of the nodes.
[0033] Draw the edge: Use the .append() method of D3.js to create an SVG element (such as a line segment) to represent the edge and set the start and end points of the edge.
[0034] Set interactive functions: Add interactive functions such as mouse hover prompts and click events to enhance user experience.
[0035] Set up force-directed layout: Use D3.js's force-directed layout to simulate the physical force between nodes, so that the positions of nodes in the graph tend to be balanced.
[0036] Update node and edge positions: During the force-directed layout simulation, the positions of nodes and edges are updated by listening to tick events to achieve dynamic layout.
[0037] The above is only a preferred embodiment of the present invention, and does not limit the present invention in other forms. Any technician familiar with the profession may use the above disclosed technical content to change or modify it into an equivalent embodiment with equivalent changes. However, any simple modification, equivalent change and modification made to the above embodiment according to the technical essence of the present invention without departing from the technical solution of the present invention still belongs to the protection scope of the technical solution of the present invention.
Claims
1. A power data management method based on heterogeneous data resource map, characterized in that: The following steps are involved: S1: Extract entity information from various data sources and preprocess it, including entity alignment, entity fusion, and entity disambiguation; S2: Based on the preprocessed entities, the relationship between entities is extracted based on the relationship extraction model, specifically: S21: Use the preprocessed entities as nodes of the graph and obtain the initial representation of the entities through pre-trained word embedding; S22: construct the edges of the graph using the relationship information between entities, and construct the weights of the edges based on the co-occurrence and dependency relationships between entities; S23: A multi-head graph neural network based on the attention mechanism builds a relationship extraction model to capture the semantic relationship between entities by learning the attention weights between nodes: Use a multi-layer graph convolutional network GCN to update the embedding of the entity. Each layer of GCN is calculated by the following formula: ; in, is the entity embedding of the lth layer, A is the adjacency matrix, D is the diagonal matrix of the degree matrix, is the weight matrix of the lth layer, Non-linear activation function; Based on GCN, the attention mechanism is introduced to capture the relationship between entities. The attention layer is expressed as: ; in, is the attention weight between node u and node v, a is the learned attention parameter, W is the weight matrix, and are the characteristics of node u and node v respectively; N u represents the set of neighbor nodes of node u, is the feature of neighbor node k; Finally, a fully connected layer is used to predict the relationship category between entity pairs: ; in, is the weight matrix of relation classification, is the bias term, is the output of the fully connected layer, is the attention aggregation representation of node u; S3: Based on the extracted relationship information, establish the connection between entities, form a relationship network, and construct a power resource map; S4: Construct a KD tree based on the power resource map data. According to the vector representation of entities and relationships, recursively divide the space and construct a KD tree. Select a dimension and sort the vector set according to the dimension. Find the median vector as the partition point of the current node and divide the vector set into two left and right subsets. Recursively construct the KD tree for the left and right subsets until all vectors are processed. S5: Based on the subgraph queried by the user, TOP-K subgraph matching query is performed through KD tree and heuristic search; S6: Based on the query results, a visualization is performed to show the relationship between data resources and the situation of cross-city data resources.
2. According to claim 1, a method for power data management based on heterogeneous data resource map is characterized in that: The entity fusion is specifically as follows: First, entities are extracted from different data sources, an entity library is constructed, and a candidate entity set is generated based on the entity library. The candidate entities are represented as: ; ; in, , Represents data from different data sources. , is the corresponding candidate entity set; Represents entity extraction; For each candidate entity, represent it as a feature vector: ; ; in, , Represent the feature vectors of entities in different data sources, Represents feature extraction; The similarity between entities in different data sources is calculated by Euclidean distance to measure the degree of match between them; According to the similarity calculation results between entities, the most matching entity is selected as the alignment result, and the matching results are integrated: MatchedEntities=EntityAlignment(Data source ,Data target ); in, EntityAlignment Indicates the operation of aligning and matching entities; MatchedEntities is the matching result, which contains the corresponding relationship between entities in different data sources; For each pair of corresponding entities in the matching results, their features are fused to obtain a unified entity feature representation: MergedFeature i =FeatureFusion(Featuresource i ,Featuretarget j ); Among them, MergedFeature i is the fusion feature of entity i, Featuresource i and Featuretarget j are the feature vectors of entity i in different data sources; FeatureFusion represents a fusion operation; Finally, by calculating the similarity between the fused features, the most similar entities are selected for merging, duplicate entities are eliminated, and a unique entity representation is established.
3. The method for power data management based on heterogeneous data resource map according to claim 2 is characterized in that: The entity disambiguation is as follows: For each entity to be disambiguated, generate a set of candidate entities from the entity library. Let Entities i For the i entities to be disambiguated, Candidates i For the i A set of candidate entities; For each entity to be disambiguated and candidate entity, it needs to be represented as a feature vector for entity matching. The process of entity feature representation is expressed as: Feature i =FeatureExtraction(Entities i ) ; Feature ij =FeatureExtraction(Candidates ij ) ; Among them, Feature i Indicates i Feature vector of entities to be disambiguated; Feature ij Candidatesij represents the entity feature vector of the jth candidate entity in the candidate entity set of the i-th entity to be disambiguated; i The entity feature vector of the jth candidate entity in the set of candidate entities; For each entity and context information to be disambiguated, the context information is represented as a feature vector to consider the meaning of the entity in different contexts: ContextFeature i =ContextFeatureExtraction(Context i ) ; Among them, Context i For the i The context information of the entity to be disambiguated, ContextFeature i For the i context feature vector; ContextFeatureExtraction represents context feature extraction; Finally, by comprehensively considering entity features and context features, the similarity between the entity to be disambiguated and the candidate entity is calculated, and the most matching entity is selected as the disambiguation result. The entity matching process is expressed as: Similarity ij =Similarity(Feature i ,Feature ij ,ContextFeature i ) ; ; Among them, Similarity is similarity calculation; Similarity ij Represents the similarity between the entity to be disambiguated and the candidate entity, DisambiguatedEntity i is the disambiguated entity.
4. The method for power data management based on heterogeneous data resource map according to claim 1 is characterized in that: The training of the relationship extraction model is as follows: Use the cross entropy loss function to train the relation extraction model: ; in, is the one-hot encoding of the true label of node u for category c, is the probability predicted by the model that node u is of category c, C is the number of categories; N is the total number of nodes; In each training step, the Adam optimizer calculates the parameter update amount based on the current gradient and updates the model parameters. For each parameter θ, its gradient is recorded as g, and the update steps are as follows: Compute the first moment estimate of the gradient and the second moment estimate : in, It is a hyperparameter used to control the influence of historical gradients; t is the time step, gt is the current gradient; is the first-order moment estimate of the previous time step; It is a hyperparameter used to control the influence of the square of historical gradients; is the second-order moment estimate of the previous time step; First-order moment estimate and the second moment estimate To perform bias correction: Use the corrected first-order moment estimates and second-order moment estimates to update the parameters: ; in, is the learning rate, is a constant, is the updated parameter, is an existing parameter.
5. The method for power data management based on heterogeneous data resource map according to claim 1 is characterized in that: The S3 is specifically: S31: Based on the knowledge graph embedding model, for each entity, the entity is mapped into a low-dimensional vector space; S32: For each relationship type, define a relationship embedding vector to represent the relationship between entities; S33: Use the extracted relational data and entity data to train the knowledge graph embedding model to learn the vector representation of entities and relations, and adjust the vector representation of entities and relations by optimizing the objective function: The loss function of the knowledge graph embedding model is defined as: ; Where S is a positive triple, s and w are the vectors of the head entity and tail entity of the positive triple respectively, and r is the vector of the positive triple relation; is a negative triplet, is the interval hyperparameter, is the distance function, and is the vector of the head and tail entities of the negative triplet, is the vector of negative triple relations.
6. The method for power data management based on heterogeneous data resource map according to claim 1 is characterized in that: The S5 is specifically: S51: Design a heuristic function to calculate the similarity score based on the features of subgraph matching, including node similarity and edge similarity; Use the similarity score to guide the search process and prioritize subgraph matches with high similarity: There are two subgraphs G 1 and G 2 , respectively, by the node V 1 and V 2 and the edge set E 1 and E 2 Each node and edge has a corresponding vector representation, which is expressed as and ; For nodes , find the most similar node , calculate the similarity score between them: ; in, Represents a node vector and The cosine similarity of For edge , find the edge that is most similar to it , calculate the similarity score between them; ; Taking both node similarity and edge similarity into consideration, we can calculate the similarity score between two subgraphs: ; S52: Starting from the root node of the search tree, the subgraph matching is gradually expanded through a heuristic search algorithm.
7. The method for power data management based on heterogeneous data resource map according to claim 6 is characterized in that: The S52 is specifically as follows: Add the query graph subgraph as the starting node to the priority queue, with an initial path cost of 0; Initialize an empty result set to store the most similar TOP-K subgraph matching results; Take the node with the smallest path cost from the priority queue for expansion; Expand the subgraph matching according to the current node, generate a new subgraph matching node, and calculate the path cost and heuristic function score; Add the newly generated subgraph matching nodes to the priority queue and sort them according to the path cost and heuristic function score; If the current node is the target node or the entire search tree has been searched, add it to the result set; When the number of subgraph matches in the result set reaches TOP-K, the search stops.
8. The method for power data management based on heterogeneous data resource map according to claim 1 is characterized in that: The S6 is specifically: According to the query results, the association relationship between data resources and the information of cross-city data resources are obtained from the power resource map; Represent data resources as nodes, and relationships as edges to construct a relationship network graph; Adjust the layout of the relationship network diagram to make the layout of related nodes and edges clearer and easier to understand; Mark and display cross-city data resources on the map, and use the geographic information system GIS for map display.
Citation Information
Patent Citations
Subgraph matching method and device
CN105243064A
Knowledge graph representation learning method fusing entity description and types
CN111753101A
Construction method for multi-source heterogeneous data knowledge graph of power distribution network
CN117273133A
CNDT-based typical weapon equipment fault diagnosis method
CN118114118A
Related Entities
US20130218861A1
Cited By
Data query method based on graph convolutional network
CN120296177A
