Main distribution network dynamic structure knowledge graph construction method and system, medium and processor
By combining real-time acquisition of multi-source heterogeneous data with spatiotemporal attention networks and temporal graph convolutional networks, changes in power grid equipment are dynamically perceived, solving the real-time management problem of traditional knowledge graphs in smart grids and achieving efficient power grid status reflection and fault diagnosis support.
Patent Information
- Application Number
- CN202510878595.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-27
- Publication Date
- 2025-11-25
AI Technical Summary
Traditional static knowledge graphs are insufficient to meet the real-time management needs of smart grids. They lack the ability to integrate multi-source heterogeneous data, and the extraction accuracy of dynamic entities and relationships is lagging. As a result, knowledge graphs cannot accurately reflect the real-time operating status of the power grid.
The system employs real-time acquisition and preprocessing of multi-source heterogeneous data, performs dynamic entity and relation extraction based on spatiotemporal attention networks and temporal graph convolutional networks, and combines device coordinates and real-time measurement values to achieve dynamic evolution of the knowledge graph.
It enables real-time identification of newly added and faulty power grid equipment, accurate capture of dynamic relationships, and real-time updating of knowledge graphs, improving data standardization efficiency and consistency, and ensuring accurate reflection of power grid status.
Smart Images

Figure CN121009967A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of knowledge graph construction, in particular to a main and distribution network dynamic structure knowledge graph construction method, system, medium and processor. BACKGROUND
[0002] With the development of smart grid towards digitization and networking, the topology structure and operation state of main and distribution network system present high dynamics, and the traditional static knowledge graph has been difficult to meet the real-time management needs of power grid. The main and distribution network knowledge graph characterizes the power grid entities and relationships through structuring, and plays a key role in fault location, load prediction and other scenarios, but the existing technology has significant defects in dealing with dynamic changes of power grid: the real-time integration capability of multi-source heterogeneous data is insufficient, the extraction accuracy of dynamic entities and relationships lags behind, and the continuous evolution mechanism of knowledge graph is missing, which leads to the fact that the graph cannot accurately reflect the real-time operation state of power grid, and restricts the intelligent decision-making level of smart grid.
[0003] In the operation of power grid, dynamic events such as device addition and fault occurrence frequently change the entity composition, but the traditional method is difficult to dynamically perceive the newly added device by combining device coordinates and real-time measurement values, and cannot accurately extract fault-related entities through feature analysis of fault recording data, resulting in that the entity information in the knowledge graph lags behind the actual changes of power grid.
[0004] Therefore, there is a need for a main and distribution network dynamic structure knowledge graph construction method, system, medium and processor. SUMMARY
[0005] In view of the problem in the prior art that the traditional static knowledge graph has been difficult to meet the real-time management needs of power grid, the present application provides a main and distribution network dynamic structure knowledge graph construction method, system, medium and processor, which can dynamically perceive changes of newly added devices, fault-related entities, entity relationships and the like, and realize dynamic evolution of knowledge graph. The specific technical solutions are as follows:
[0006] A main and distribution network dynamic structure knowledge graph construction method, comprising:
[0007] S1: real-time collection and preprocessing of multi-source heterogeneous data to obtain a standardized real-time data set and a topology verification report;
[0008] S2: dynamic entity extraction based on a spatio-temporal attention network to obtain a dynamic entity set;
[0009] S3: dynamic relationship extraction based on a temporal graph convolution network to obtain a dynamic relationship set;
[0010] S4: fusion of the dynamic entity set, the dynamic relationship set and the existing knowledge graph to realize dynamic evolution of the knowledge graph.
[0011] Further, in step S1, the multi-source heterogeneous data is collected and pre-processed in real time to obtain a standardized real-time data set and a topology verification report, including the following steps:
[0012] S11: The stream processing engine deployed on the edge node performs noise reduction filtering on the real-time collected voltage and current data, calculates active power and reactive power, and sends the aggregated data to the cloud;
[0013] S12: The cloud obtains the model, parameters, and geographic location coordinate data of the device from the device account, and standardizes the device account to unify the coordinate system and parameter units;
[0014] S13: The cloud obtains the network connection relationship, switch state sequence, and relay protection action information and fault recording data from the CIM model, and identifies topology errors in the CIM model using a topology verification algorithm to generate a topology verification report;
[0015] S14: The cloud aggregates the standardized real-time data set and the topology verification report.
[0016] Further, in step S2, the dynamic entity set is extracted based on the spatio-temporal attention network, including the following steps:
[0017] S21: Based on the spatio-temporal attention network, the newly added device is identified according to the device coordinates and real-time measurement values in the standardized real-time data set;
[0018] S22: Feature extraction is performed on the fault recording data in the topology verification report to identify fault-related entities;
[0019] S23: The newly added device and the fault-related entity are used as dynamic entities, and the information of each dynamic entity is obtained and sorted by timestamp to form a unified dynamic entity set.
[0020] Further, in step S21, the newly added device is identified based on the spatio-temporal attention network according to the device coordinates and real-time measurement values in the standardized real-time data set, including the following steps:
[0021] The feature vector of device node i in the lth layer is calculated
[0022]
[0023] where, is the neighborhood node set of node i; c ij is the normalization coefficient; W (l) , is a trainable weight matrix; p i is the geographic location coordinate feature of node i;
[0024] Compute the spatio-temporal attention weight a ij :
[0025]
[0026] where a T is the attention vector; W s , W t are feature transformation matrices; d ij is the Euclidean distance between nodes i and j; || denotes vector concatenation;
[0027] Compute the aggregated attention weight value S i :
[0028]
[0029] If S i > λ · mean(S), then determine that node i is a new device; where λ is a threshold coefficient; mean(S) is the average aggregated value of all nodes in the network.
[0030] Further, in step S22, the feature extraction is performed on the fault recording data in the topology verification report to identify fault-related entities, including the following steps:
[0031] Obtain the wavelet transform coefficient W x (a, b) of the fault recording signal x(t) of entity i:
[0032]
[0033] where a is the scale parameter; b is the translation parameter; ψ(t) is the mother wavelet function; * denotes complex conjugate; t is time;
[0034] Extract the energy feature E(a) of the wavelet transform coefficient:
[0035]
[0036] where T is the fault duration window;
[0037] Form the feature vector f i of entity i with the energy feature E(a):
[0038] f i = [E(a1), E(a2), …, E(an)]; n
[0039] In the above formula, n represents the number of scale parameters a;
[0040] Define the fault feature similarity Sim(f i , fref ) is:
[0041]
[0042] wherein f ref is a standard fault feature template;
[0043] If Sim(f i ,f ref ) >= 0.7, the entity i is determined as a fault-related entity, and the confidence is Sim(f i ,f ref ).
[0044] Further, in step S3, the dynamic relationship extraction based on the time graph convolution network to obtain a dynamic relationship set, comprising the following steps:
[0045] S31: extracting the time dimension feature of node i
[0046]
[0047] In the above formula, k is the size of the time window; W τ is the convolution kernel weight corresponding to the time step, and sigma is the ReLU activation function; b t is the bias vector; p t is the time position vector; is the feature sequence of node i in the time window [t-k+1, t];
[0048] S32: for the historical time step feature of node i, the attention weight of each time point is calculated, and the time attention feature with time preference is generated by weighted summation:
[0049]
[0050] wherein, is the attention vector; W q , W r are trainable matrices; alpha i,τ is the attention weight of time step t-tau; is the time attention feature;
[0051] S33: through the spatial graph convolution operation, the spatial graph convolution feature of node i is obtained by considering the neighborhood topological relation N(i) of node i
[0052]
[0053] wherein c ij is a normalization coefficient; W s is a spatial feature transformation matrix;
[0054] S34: Splice the temporal attention feature and the spatial graph convolution feature to generate the dynamic spatio-temporal representation of the node:
[0055]
[0056] wherein W f , b f are fusion layer parameters, and || represents vector splicing
[0057] S35: Based on the dynamic spatio-temporal representation of the two nodes, calculate the relationship type probability distribution p(r|i,j):
[0058] p(r|i,j)=softmax(W r ·[z i ||z j ]+b r );
[0059] wherein r is the relationship type; W r , b r are classification layer parameters
[0060] S36: Search the time duration interval of the relationship type probability distribution through a sliding window:
[0061]
[0062] wherein [t start , t end ] is the time duration interval; t' and t" are the start time and end time of the sliding window, respectively
[0063] S37: The final dynamic relationship set is obtained as follows:
[0064]
[0065] Further, in step S4, the dynamic entity set, the dynamic relationship set and the existing knowledge graph are fused to realize the dynamic evolution of the knowledge graph, including the following steps:
[0066] S41: Based on the spatio-temporal features and attributes of the dynamic entity set ε dynamic and the existing graph entity ε existing , calculate the comprehensive similarity, and obtain the entity update set ε updated according to the comprehensive similarity:
[0067]
[0068] S42: Based on the dynamic relationship set and the existing graph relationship, perform relationship fusion and temporal integration to obtain the relationship update set
[0069]
[0070] S43: Remove conflicting entities and relationships, formula as follows:
[0071]
[0072]
[0073] ε old is the existing entity set in the existing knowledge graph; ε old is the existing entity set after removing the conflicting entities; ε dynamic is the dynamic entity set; e i is a single entity in the dynamic entity set; e j is a single entity in the existing entity set; Sim(e i ,e j is the comprehensive similarity of entities; τ is the similarity threshold; is the existing relationship set in the existing knowledge graph; is the existing relationship set after removing the conflicting relationships; r old is a single relationship in the existing relationship set; ε old -ε′ old is the removed entity set;
[0074] S44: Generate a new graph, formula as follows:
[0075] ε new = ε updated ∪ε′old;
[0076]
[0077] ε new is the newly generated knowledge graph entity set; is the newly generated knowledge graph relationship set; is the main distribution network knowledge graph after dynamic evolution.
[0078] A main distribution network dynamic structure knowledge graph construction system applied to the main distribution network dynamic structure knowledge graph construction method described above, comprising:
[0079] A collection module for real-time collection and preprocessing of multi-source heterogeneous data to obtain a standardized real-time data set and a topology verification report;
[0080] An entity module for dynamic entity extraction based on a spatiotemporal attention network to obtain a dynamic entity set;
[0081] a relationship module configured to perform dynamic relationship extraction based on a temporal graph convolution network to obtain a dynamic relationship set;
[0082] an updating module configured to fuse the dynamic entity set, the dynamic relationship set and an existing knowledge graph to realize dynamic evolution of the knowledge graph.
[0083] A computer readable storage medium comprises a stored program, wherein the computer readable storage medium controls the device where the computer readable storage medium is located to execute the main power distribution network dynamic structure knowledge graph construction method described above when the program runs.
[0084] A processor is configured to run a program, wherein the processor executes the main power distribution network dynamic structure knowledge graph construction method described above when the program runs.
[0085] Compared with the prior art, the beneficial effects of the present application are:
[0086] 1. The processing efficiency and reliability of multi-source heterogeneous data are significantly improved. The prior art is difficult to integrate multi-source heterogeneous data such as SCADA real-time measurement data, device account and CIM topological relationship in the main power distribution network, resulting in poor data source consistency. The new scheme realizes real-time noise reduction filtering of voltage and current data, device parameter coordinate unification and CIM model topological error checking through the edge node stream processing engine and cloud standardized processing, improves the data standardization efficiency by about 40%, and the topological error identification accuracy is more than 95%, providing a high-precision data source for the knowledge graph.
[0087] 2. The real-time identification capability of dynamic entities and relationships is broken through. The traditional method cannot realize real-time perception of new devices or fault entities in the power grid, and the relationship extraction lacks spatio-temporal semantics. The new scheme is based on spatio-temporal attention network and temporal graph convolution network, combines device coordinates, real-time measurement values and fault recording features, realizes new device identification delay less than 200ms, and fault related entity identification accuracy more than 92%; at the same time, through time window modeling dynamic relationship, the time sequence correlation identification accuracy of switch state sequence and protection action relationship is improved by 35%, effectively capturing the dynamic interaction in the operation of the power grid.
[0088] 3. The dynamic evolution and consistency maintenance capability of the knowledge graph is greatly improved. The prior art lacks a dynamic updating mechanism of the graph, resulting in entity conflict and time relationship integration failure. The new scheme automatically completes the weighted fusion of new and old entity attributes, conflict relationship elimination and time interval merging through entity comprehensive similarity calculation and relationship time fusion strategy, shortens the graph updating delay to seconds, the entity conflict resolution accuracy is 98%, the graph consistency index is improved to more than 95%, and the knowledge graph accurately reflects the topology and operation state of the main power distribution network in real time, providing dynamic knowledge support for power grid fault diagnosis, load prediction and other applications. BRIEF DESCRIPTION OF DRAWINGS
[0089] In order to more clearly illustrate the technical solutions in the specific embodiments or prior art of the present application, the drawings needed to be used in the specific embodiments or prior art description will be briefly introduced below. In all the drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, each element or part is not necessarily drawn according to the actual proportion.
[0090] Figure 1 A flowchart of a main distribution network dynamic structure knowledge graph construction method is shown in the figure.
[0091] Figure 2 A structure flowchart of a main distribution network dynamic structure knowledge graph construction system is shown in the figure. DETAILED DESCRIPTION
[0092] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0093] It should be understood that, when used in the present application, the terms "comprise" and "include" indicate the existence of described features, integers, steps, operations, elements and / or components, but do not exclude the existence or addition of one or more other features, integers, steps, operations, elements, components and / or sets thereof.
[0094] It should also be understood that the terms used in the present application specification are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in the present application specification and the appended claims, the singular forms "a", "an" and "the" are intended to include the plural forms unless the context clearly indicates otherwise.
[0095] It should be further understood that the term "and / or" used in the present application means any combination of one or more of the associated listed items and all possible combinations, and includes these combinations.
[0096] Embodiment one
[0097] As shown in the figure, a main distribution network dynamic structure knowledge graph construction method includes the following steps: Figure 1 S1: Real-time acquisition and preprocessing of multi-source heterogeneous data to obtain standardized real-time data set and topology verification report.
[0098]
[0099] S11: Deploy a stream processing engine (such as Apache Flink) at the edge node to perform noise reduction filtering (using Kalman filtering to remove measurement noise) on the voltage and current data collected in real time by the SCADA system at a high frequency (sampling frequency ≥ 100 Hz), and calculate active power and reactive power, etc. After summarizing the data, send it to the cloud.
[0100] S12: The cloud obtains the model, parameters, and geographic location coordinates (accuracy ≥ meter level) of the transformer, circuit breaker, and other devices from the device account, and processes the device account through an ETL tool (such as Kettle) to standardize the coordinate system (such as WGS84) and parameter units.
[0101] S13: The cloud obtains the network connection relationship, switch state sequence (including opening and closing timestamp) of the power grid based on the CIM model, as well as the relay protection action information and fault recording data (sampling rate ≥ 1 kHz), and uses a topology verification algorithm (such as ring network detection based on graph theory) to identify topology errors in the CIM model and generate a topology verification report.
[0102] S14: The cloud summarizes the standardized real-time data set and the topology verification report, where the standardized real-time data set contains structured data such as timestamp, measurement value, and device ID. The topology verification report records the location of topology errors and correction suggestions.
[0103] S2: Dynamic entity extraction based on spatio-temporal attention network (STA-GNN) to obtain a dynamic entity set. Further, the dynamic entity set contains triples of entity ID, type, spatio-temporal coordinates, and confidence.
[0104] S21: Based on the spatio-temporal attention network (STA-GNN), according to the device coordinates and real-time measurement values in the standardized real-time data set, identify new devices (such as temporary emergency power supply) and determine the relevance of device locations through coordinate clustering (DBSCAN algorithm, neighborhood radius 50 meters).
[0105] For device node i, the feature vector is The update formula at the l-th layer is:
[0106]
[0107]
[0108] where, is the set of neighboring nodes of node i; c ij is the normalization coefficient; W (l) , is the trainable weight matrix; p i is the geographic location coordinate feature of node i (such as WGS84 coordinate vector).
[0109] For nodes i and j, the spatio-temporal attention weight a ij is:
[0110]
[0111] where a T is the attention vector; W s , W t is the feature transformation matrix; d ij is the Euclidean distance between nodes i and j; || represents vector concatenation.
[0112] The attention weight aggregation value of node i is calculated as follows:
[0113]
[0114] If S i > λ · mean(S), then node i is determined to be a new device (λ is the threshold coefficient, default value is 1.5, mean(S) is the average aggregation value of all network nodes).
[0115] The neighborhood distance is calculated by the DBSCAN coordinate clustering formula:
[0116] The Euclidean distance between device coordinates p i = (x i , y i ) and p j = (x j , y j ) is:
[0117]
[0118] When d(p i , p j ) ≤ 50 meters, it is considered that the positions of the two devices are related.
[0119] Core point determination: If the ∈-neighborhood (∈ = 50 meters) of device i contains at least MinPts = 1 other device, it is determined to be a core point, forming a clustering cluster.
[0120] S22: Feature extraction (such as wavelet transform to extract transient features) is performed on the fault recording data in the topology verification report, and fault-related entities (such as fault lines and protection devices) are identified.
[0121] For the fault recording signal x(t) of entity i, the wavelet transform coefficient W x (a, b) is:
[0122]
[0123] where a is a scale parameter (controls frequency resolution); b is a translation parameter (controls time localization); ψ(t) is a mother wavelet function (such as Meyer wavelet); * denotes complex conjugate; t is time.
[0124] The energy feature of the extracted wavelet transform coefficients is as follows:
[0125]
[0126] where T is a fault duration window;
[0127] The energy feature E(a) forms a feature vector of the entity i:
[0128] f i =[E(a1),E(a2),…,E(a n )];
[0129] In the above formula, n represents the number of values of the scale parameter a;
[0130] The fault feature similarity Sim(f i ,f ref ) is defined as:
[0131]
[0132] where f i is the feature vector of the entity i; f ref is the standard fault feature template; if Sim(f i ,f ref )≥0.7, the entity i is determined as a fault-related entity, and the confidence degree is Sim(f i ,f ref ).
[0133] S23: Take the newly added device and the fault-related entity as a dynamic entity, obtain information of each dynamic entity, then merge them after sorting according to the time stamp to form a unified dynamic entity set ε dynamic :
[0134] ε dynamic ={e1,e2,…,e m};
[0135] The format is as follows: e i =(entity ID, entity type, spatiotemporal coordinates, confidence degree).
[0136] The newly added device includes entity ID, type (such as “temporary power supply”), spatiotemporal coordinates (x, y, t), and confidence degree (obtained by normalizing the attention weight aggregation value S i ).
[0137] Faulty entity: contains entity ID, type (such as "faulty line"), spatiotemporal coordinates (location and time of fault occurrence), confidence (obtained from feature similarity Sim).
[0138] New device: (Dev-001, temporary power supply, (116.40, 39.91, 2025-06-17), 0.85);
[0139] Faulty entity: (Line-012, faulty line, (116.35, 39.89, 2025-06-17), 0.92);
[0140] S3: Dynamic relation extraction based on temporal graph convolution network (T-GCN) to obtain a dynamic relation set. Further, the dynamic relation set contains a five-tuple of head entity, relation type, tail entity, time window, and confidence.
[0141] S31: Time dimension feature of node i Extraction (independent of attention mechanism time series processing).
[0142] Feature sequence of node i in time window [t-k+1, t] One-dimensional convolution to extract time-dependent relationships
[0143]
[0144] where k is the size of the time window; W τ is the convolution kernel weight corresponding to the time step, σ is the ReLU activation function; b t is the bias vector.
[0145] Time position encoding:
[0146]
[0147] To distinguish the features of different time steps, introduce the time position vector p t (such as sine cosine encoding):
[0148]
[0149] S32: Calculate the attention weight of each time point for the historical time step feature of node i, and generate time attention features with time preference through weighted summation:
[0150]
[0151] where, is the attention vector; W q , W r are trainable matrices; αi,τ is the attention weight for time step t-τ; is the time attention feature.
[0152] S33: Obtain the spatial graph convolution feature by considering the neighborhood topology relationship N(i) of node i through the spatial graph convolution operation
[0153]
[0154] wherein, is the normalization coefficient; W s is the spatial feature transformation matrix.
[0155] S34: Concatenate the time attention feature and the spatial graph convolution feature to generate the dynamic spatio-temporal representation of the node:
[0156]
[0157] wherein, W f , b f are fusion layer parameters, and || represents vector concatenation.
[0158] S35: Calculate the relationship type probability distribution p(r|i,j) based on the dynamic spatio-temporal representation of the two nodes:
[0159] p(r|i,j) = softmax(W r ·[z i ||z j ]+b r );
[0160] wherein, r is the relationship type (such as "connected to" "protection association"), W r , b r are classification layer parameters.
[0161] S36: Search the time duration interval of the relationship type probability distribution through the sliding window:
[0162]
[0163] wherein, [t start ,t end ] is the time duration interval; t' and t" are the start time and end time of the sliding window, respectively.
[0164] S37: Obtain the final dynamic relationship set as follows:
[0165]
[0166] 4. Format example:
[0167] (Line-012, fault association, Relay-005, [2025-06-17 10:02:15, 2025-06-17 10:02:30], 0.89)
[0168] 5. Time feature transfer path:
[0169] Temporal convolution → Time attention → Spatial graph convolution → Spatio-temporal fusion → Relationship prediction
[0170] S4: Fuse the dynamic entity set, dynamic relationship set and existing knowledge graph to realize the dynamic evolution of the knowledge graph.
[0171] S41: Based on the dynamic entity set ε dynamic and the spatio-temporal features and attributes of the existing graph entity ε existing , calculate the comprehensive similarity, and obtain the entity update set ε updated according to the comprehensive similarity.
[0172] 1. Calculate the spatio-temporal feature similarity by weighting the Euclidean distance and time difference:
[0173]
[0174]
[0175] Where d xy (e i ,e j ) is the coordinate distance; t i , t j are the timestamps; σ x , σ t are scale parameters.
[0176] 2. Use cosine similarity as the attribute feature similarity for structured attributes such as device type and parameters:
[0177]
[0178] Where, is the vectorized representation of entity attributes (such as BERT encoding).
[0179] 3. Calculate the comprehensive similarity:
[0180] Sim(e i ,e j )=λ st ·Sim st (e i ,e j )+λ attr ·Sim attr (e i ,ej
[0181] In the above formula, the default λ st = 0.6; λ attr = 0.4.
[0182] 4. When Sim(e i ,e j ) ≥ τ (threshold τ = 0.7), it is determined to be the same entity, and the following rules are updated:
[0183] Spacetime coordinate fusion:
[0184]
[0185] Where w old = confidence j is the existing entity confidence; w new = confidence i is the new entity confidence.
[0186] For numerical value type attributes (such as voltage), weighted average is used for conflict resolution fusion:
[0187]
[0188] For enumerated type attributes (such as switch state), confidence priority conflict resolution is used:
[0189]
[0190] When Sim(e i ,e j ) < τ, e i is retained as a new entity.
[0191] The entity update set ε updated after conflict resolution:
[0192]
[0193] S42: Relationship fusion and temporal integration based on the dynamic relationship set and the existing graph relationship, to obtain a relationship update set.
[0194] 1. Time association of dynamic relationship and existing relationship
[0195] For new relationship r new = (i, r, j, [t s , t e ], c new ) and existing relationship r old = (i, r, j, [t s ', t e '], cold ), calculate time overlap:
[0196] time overlap rate:
[0197]
[0198] Fusion condition: when Overlap≥0.3 and Sim(i,i')≥τ, Sim(j,j')≥τ, trigger fusion.
[0199] 2. Temporal relationship weighted fusion
[0200] Fused relationship time window and confidence calculation:
[0201] Time window merging:
[0202]
[0203] Confidence fusion:
[0204]
[0205] wherein, is the time proportion weight.
[0206] 3. For non-overlapping new relationships, take direct insertion into the atlas processing.
[0207] 4. Relationship update set is:
[0208] S43: Eliminate conflict entities and relationships
[0209]
[0210] ε old is the entity set in the existing knowledge graph, that is, the existing entity set before fusion; ε old ' is the existing entity set after removing the conflict entities, that is, removing the part that is judged as the same entity from the original set; ε dynamic is the dynamic entity set, the new equipment or fault related entities extracted by S2 step (such as temporary power supply, fault line, etc.); e i is a single entity in the dynamic entity set, in the format of (entity ID, type, spatiotemporal coordinates, confidence); e j is a single entity in the existing entity set, including equipment, line and other entities in the original knowledge graph; Sim(e i ,e j ) is the entity comprehensive similarity, calculated by weighting the spatiotemporal feature similarity and attribute feature similarity in S41, used to judge e i and e jwhether the same entity; τ is a similarity threshold (the default value is 0.7), when Sim(e i ,e j ) ≥ τ, it is determined that the two entities conflict and need to be removed.
[0211] is a set of relations in the existing knowledge graph, including the association between the original entities (such as "connected to" "protection association" and the like); is a set of existing relations after removing the conflict relations, removing the relations related to the removed entities; r old is a single relation in the existing relation set, in the format of (head entity, relation type, tail entity, time window, confidence); ε old -ε′ old is a set of removed entities, that is, the part of the existing entities that conflicts with the dynamic entities. If the head entity or the tail entity associated with r old belongs to the set, the relation is removed.
[0212] S44: New graph generation
[0213] ε new = ε updated ∪ ε' old ;
[0214]
[0215] ε new is a set of entities of the newly generated knowledge graph, which is merged from the updated entities and the original entities after removing the conflicts; is a set of relations of the newly generated knowledge graph, which is merged from the updated relations and the original relations after removing the conflicts; is the main distribution network knowledge graph after dynamic evolution.
[0216] S35: Evolution effectiveness verification
[0217] Graph consistency index:
[0218]
[0219] Temporal and spatial integrity index:
[0220]
[0221] Evolution trigger condition: when Consistency < 0.8 or Completeness < 0.7, trigger global retraining.
[0222] Compared with the prior art, the beneficial effects of the present application are:
[0223] 1. Multi-source heterogeneous data processing efficiency and reliability are significantly improved. The existing technology is difficult to integrate multi-source heterogeneous data such as SCADA real-time measurement data, equipment account and CIM topological relationship in the main distribution network, resulting in poor data source consistency. The new scheme realizes real-time noise reduction filtering of voltage and current data, unification of device parameter coordinates and CIM model topological error checking through edge node stream processing engine and cloud standardized processing, improves the data standardization efficiency by about 40%, and the topological error identification accuracy is more than 95%, providing high-precision data source for knowledge graph.
[0224] 2. The real-time identification capability of dynamic entities and relationships is broken through. Traditional methods cannot realize real-time perception of new equipment or fault entities in the power grid, and relationship extraction lacks temporal and spatial semantics. The new scheme is based on spatiotemporal attention network and temporal graph convolution network, combined with device coordinates, real-time measurement values and fault recording characteristics, realizes new equipment identification delay less than 200ms, and fault related entity identification accuracy more than 92%; at the same time, through time window modeling dynamic relationship, the time sequence correlation identification accuracy of switch state sequence and protection action relationship is improved by 35%, effectively capturing the dynamic interaction in the operation of power grid.
[0225] 3. The dynamic evolution and consistency maintenance capability of knowledge graph is greatly improved. The existing technology lacks dynamic updating mechanism of graph, resulting in entity conflict and invalid integration of temporal relationship. The new scheme automatically completes new and old entity attribute weighted fusion, conflict relationship elimination and temporal interval merging through entity comprehensive similarity calculation and relationship temporal fusion strategy, shortens the graph updating delay to seconds, the entity conflict resolution accuracy is 98%, the graph consistency index is improved to more than 95%, and ensures that the knowledge graph accurately reflects the topology and operation state of the main distribution network in real time, providing dynamic knowledge support for power grid fault diagnosis, load prediction and other applications.
[0226] Embodiment two
[0227] As shown in Figure 2 A main distribution network dynamic structure knowledge graph construction system applied to the main distribution network dynamic structure knowledge graph construction method described above, comprising:
[0228] The acquisition module is used for real-time acquisition and preprocessing of multi-source heterogeneous data to obtain a standardized real-time data set and a topological verification report;
[0229] The entity module is used for dynamic entity extraction based on a spatiotemporal attention network to obtain a dynamic entity set;
[0230] The relationship module is used for dynamic relationship extraction based on a temporal graph convolution network to obtain a dynamic relationship set;
[0231] The update module is used for fusing the dynamic entity set, the dynamic relationship set and the existing knowledge graph to realize dynamic evolution of the knowledge graph.
[0232] Embodiment three
[0233] A computer readable storage medium, comprising a stored program, wherein the computer readable storage medium controls the device where the computer readable storage medium is located to execute the main power distribution network dynamic structure knowledge graph construction method described above when the program runs.
[0234] Embodiment four
[0235] A processor for running a program, wherein the processor executes the main power distribution network dynamic structure knowledge graph construction method described above when the program runs.
[0236] The application discloses a main power distribution network dynamic structure knowledge graph construction method and system, a processor and a medium. The method realizes real-time collection and preprocessing of multi-source heterogeneous data, extracts dynamic entities by using a space-time attention network, extracts dynamic relationships based on a time graph convolution network, and finally realizes knowledge graph dynamic evolution by fusing dynamic entities, relationships and existing graphs. The scheme solves the problems of low multi-source data processing efficiency, lagging dynamic entity and relationship identification, and insufficient graph evolution capability in the prior art, realizes real-time perception of main power distribution network entities and relationships and dynamic updating of the graph, improves the real-time representation capability of the knowledge graph for the power grid operation state, and can be applied to fault diagnosis, topology analysis and other scenes of the smart grid.
[0237] Those skilled in the art can appreciate that the units of the examples described in combination with the embodiments disclosed herein can be realized in electronic hardware, computer software or a combination of both. In order to clearly illustrate the interchangeability of hardware and software, the components of the examples have been described in the above description in general terms. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. The skilled person can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0238] In the embodiments provided by the present application, it should be understood that the division of units is only a logical functional division, and actual implementation can have another division manner, for example, multiple units can be combined into one unit, one unit can be split into multiple units, or some features can be ignored, etc.
[0239] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or software functional unit.
[0240] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or say the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the method described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store program codes.
[0241] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application, and they should be covered in the scope of the present application.
Claims
1. A method for constructing a main grid and distribution network dynamic structure knowledge graph, characterized in that, Comprise: S1: multi-source heterogeneous data real-time acquisition and preprocessing, get standardized real-time data set and topology verification report; S2: based on spatio-temporal attention network for dynamic entity extraction to get dynamic entity set; S3: based on time graph convolution network for dynamic relation extraction to get dynamic relation set; S4: the dynamic entity set, dynamic relation set and existing knowledge graph are fused to realize the dynamic evolution of knowledge graph.
2. The master dynamic configuration knowledge graph construction method according to claim 1, characterized in that, In step S1, the multi-source heterogeneous data real-time acquisition and preprocessing, get standardized real-time data set and topology verification report, comprising the following steps: S11: deploy stream processing engine on edge node to filter noise of real-time collected voltage and current data, and calculate active power and reactive power, then send the data to cloud after summarizing; S12: cloud obtains the model, parameter and geographic position coordinate data of equipment from equipment account, and standardizes the equipment account, unifies the coordinate system and parameter unit; S13: cloud obtains power grid network connection relationship, switch state sequence according to CIM model, and obtains relay protection action information and fault recording data, and identifies topology error in CIM model by using topology verification algorithm to generate topology verification report; S14: get standardized real-time data set and topology verification report in cloud. 3.The master dynamic configuration knowledge graph construction method of claim 1, characterized in that, In step S2, the dynamic entity set is obtained by dynamic entity extraction based on spatio-temporal attention network, comprising the following steps: S21: based on spatio-temporal attention network, identify new equipment according to equipment coordinates and real-time measurement values in standardized real-time data set; S22: feature extraction is performed on fault recording data in topology verification report to identify fault related entities; S23: take the new equipment and fault related entities as dynamic entities, get each dynamic entity information and merge after sorting by timestamp to form a unified dynamic entity set.
4. The master dynamic configuration knowledge graph construction method according to claim 3, characterized in that, In step S21, the new equipment is identified according to the equipment coordinates and real-time measurement values in the standardized real-time data set based on the spatio-temporal attention network, comprising the following steps: Compute the eigenvector of device node i at layer l wherein, is a set of neighboring nodes of node i; c ij is a normalization coefficient; W (l) , is a trainable weight matrix; p i is a geographical location coordinate feature of node i; Compute the spatio-temporal attention weight a for nodes i and j ij : where a T is the attention vector; W s , W t is the feature transformation matrix; d ij is the Euclidean distance between nodes i and j; || denotes vector concatenation; The attention weight aggregated value S of the computing node i i : If S i > λ · mean(S), then determine that the node i is a new device; wherein λ is a threshold coefficient; mean(S) is the average aggregation value of the whole network nodes.
5. The master dynamic configuration knowledge graph construction method according to claim 4, characterized in that, In step S22, the feature extraction is performed on the fault recording data in the topology verification report to identify the fault related entities, comprising the following steps: Wavelet transform coefficients W of the fault recording signal x(t) of the entity i are acquired x (a, b): Wherein, a is the scale parameter; b is the translation parameter; ψ(t) is the mother wavelet function; * represents complex conjugate; t is time; The energy feature E(a) of wavelet transform coefficient is extracted: Wherein, T is the fault duration window; Forming a feature vector f of an entity i from energy features E(a) i : f i = [E(a1), E(a2),..., E(an)] ; and n )] ; In the above formula, n represents the value number of scale parameter a; The fault feature similarity Sim(f i ,f ref ) is defined as: wherein f ref is a standard failure feature template; If Sim(f i ,f ref ) ≥ 0.7, then entity i is determined to be a failure-related entity with a confidence of Sim(f i ,f ref ).
6. The master dynamic configuration knowledge graph construction method of claim 5, wherein, In step S3, the dynamic relation set is obtained by dynamic relation extraction based on time graph convolution network, comprising the following steps: S31: Extract the time-dimension feature of node i In the above formula, k is the size of the time window; W τ is the convolution kernel weight corresponding to the time step, and σ is the ReLU activation function; b t is the bias vector; p t is the time position vector; is the feature sequence of node i in the time window [t-k+1, t]. S32: calculate the attention weight of each time point for the historical time step feature of node i, and generate time attention feature with time preference through weighted sum: wherein, is the attention vector; W q , W r is a trainable matrix; a i,τ is the attention weight at time step t - τ; is the temporal attention feature; S33: Obtain the spatial graph convolution feature by considering the neighborhood topological relation N(i) of the node i through the spatial graph convolution operation where c ij is a normalization coefficient; W s is a spatial feature transformation matrix; S34: concatenate the time attention feature and the spatial graph convolution feature to generate the dynamic spatio-temporal representation of node: where W f , b f are fusion layer parameters, and || denotes vector concatenation S35: calculate the relationship type probability distribution p(r|i,j) based on the dynamic spatio-temporal representation of two nodes: p(r | i, j) = softmax(W r · [z i ||z j ]+b r ) ; wherein r is a relation type; W r , b r is a classification layer parameter; S36: search the time duration interval of relationship type probability distribution through sliding window: wherein, [t start ,t end ] is a time duration interval; t' and t" are the start time and end time of the sliding window, respectively; S37: get the final dynamic relation set as follows:
7. The master dynamic configuration knowledge graph construction method according to claim 6, characterized in that, In step S4, the dynamic entity set, the dynamic relationship set and the existing knowledge graph are fused to realize dynamic evolution of the knowledge graph, including the following steps: S41: Based on the dynamic entity set ε dynamic With the spatiotemporal features and attributes of the existing atlas entity ε existing , the comprehensive similarity is calculated, and the entity update set ε updated is obtained according to the comprehensive similarity. S42: relationship fusion and time integration based on the dynamic relationship set and the existing graph relationship to obtain a relationship update set S43: eliminating conflict entities and relationships, the formula is as follows: ε old is the existing entity set in the existing knowledge graph; ε old is the existing entity set after removing the conflict entities; ε dynamic is the dynamic entity set; e i is a single entity in the dynamic entity set; e j is a single entity in the existing entity set; Sim(e i ,e j ) is the comprehensive similarity of entities; τ is the similarity threshold; is the existing relationship set in the existing knowledge graph; is the existing relationship set after removing the conflict relationships; r old is a single relationship in the existing relationship set; ε old -ε′ old is the removed entity set; S44: generating a new graph, the formula is as follows: ε new = ε updated ∪ ε' old ; ε new is a newly generated knowledge graph entity set; is a newly generated knowledge graph relationship set; is a main power distribution network knowledge graph after dynamic evolution.
8. A main grid dynamic structure knowledge graph construction system, characterized in that, The main grid dynamic structure knowledge graph construction method according to any one of claims 1 to 7 comprises: A collection module is configured to collect and preprocess multi-source heterogeneous data in real time to obtain a standardized real-time data set and a topology verification report; An entity module is configured to extract dynamic entities based on a spatiotemporal attention network to obtain a dynamic entity set; A relationship module is configured to extract dynamic relationships based on a temporal graph convolution network to obtain a dynamic relationship set; An update module is configured to fuse the dynamic entity set, the dynamic relationship set and the existing knowledge graph to realize dynamic evolution of the knowledge graph.
9. A computer-readable storage medium, characterized in that, The computer readable storage medium comprises a stored program, wherein the program controls the device where the computer readable storage medium is located to execute the main grid dynamic structure knowledge graph construction method according to any one of claims 1 to 7 when the program is running.
10. A processor, comprising: The processor is configured to run a program, wherein the program executes the main grid dynamic structure knowledge graph construction method according to any one of claims 1 to 7 when the program is running.