Power grid modeling and scheduling method, device and medium for graph computing platform

By using Laplace spectral features and a multi-head attention mechanism to generate a multi-scale graph dataset of the power grid, the problems of limited graphical expression capabilities and insufficient robustness in existing power grid dispatching analysis are solved, achieving more accurate power grid dispatching and more efficient power grid operation.

CN120497926BActive Publication Date: 2025-09-09STATE GRID SHANGHAI MUNICIPAL ELECTRIC POWER CO +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510990219.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-18
Publication Date
2025-09-09
Estimated Expiration
2045-07-18

AI Technical Summary

Technical Problem

Existing power grid dispatching analysis methods fail to effectively integrate the electrical physical quantities, spectral structure characteristics and local and global multi-scale graphical expression capabilities of nodes, lack robustness to graph structure disturbances and strategy diversity, and fail to achieve effective mapping from graph structure to dispatching behavior.

Method used

Spectral position encoding is generated by Laplace spectral feature extraction, and three-dimensional scattering features are extracted by combining spectral wavelet scattering transform. A multi-head attention mechanism is used to generate a composite vector, a multi-scale graph dataset is constructed, and a fusion embedding vector is generated through perturbation view encoding to finally generate scheduling instructions.

Benefits of technology

It enhances the grid model's ability to capture topological structures and node coupling relationships, improves the efficiency and safety of grid dispatching, and enhances its robust response capabilities to the uncertainty and dynamics of grid operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120497926B_ABST
    Figure CN120497926B_ABST
Patent Text Reader

Abstract

The present invention relates to a power grid modeling and scheduling method, device, and medium for a graph computing platform, and relates to the technical field of power grid scheduling analysis. The method comprises: step S1: constructing a power grid structure diagram, generating spectral position codes, and extracting three-dimensional scattering features; step S2: concatenating the physical quantities, spectral position codes, three-dimensional scattering features, and spatial codes on the nodes to obtain a composite vector; step S3: constructing a similarity matrix based on the composite vector and further generating a multi-scale graph dataset; step S4: constructing feature perturbation views and structural perturbation views based on the multi-scale graph to generate a multi-scale perturbation view set, performing view coding, minimizing representation differences, and constructing a fused embedding vector; and step S5: solving the power flow state, generating a first feature based on the fused embedding vector, and obtaining node scheduling instructions based on the first feature. Compared with the existing technology, the present invention has the advantages of improving the efficiency and safety of power grid scheduling.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power grid dispatching analysis, and in particular to a power grid framework modeling and dispatching method, device and medium oriented to a graph computing platform. Background Art

[0002] With the continuous expansion of the scale of modern power systems and the continuous increase in operational complexity, the dispatching, control and safe operation of power grids are facing increasingly severe challenges. Traditional power grid dispatching analysis methods are mostly based on centralized structures and rule-driven power flow analysis models, relying on expert experience and static rule reasoning. They are difficult to efficiently adapt to the dynamic and complex network structure and frequently changing dispatching requirements in actual operation. In recent years, with the development of big data and graph computing technologies, methods such as graph neural networks and graph learning have provided new ideas for power grid topology modeling and intelligent dispatching.

[0003] For example, Chinese patent CN119294872A discloses a grid dispatch decision-making method and large model based on graph neural networks. The method includes collecting the original grid data set, generating a fused feature tensor through adaptive distribution mapping and recursive decomposition, importing the fused feature tensor and the grid topology matrix, and generating a dynamic graph embedding matrix through spectral decomposition and matrix manifold analysis, performing Markov jump process analysis and optimal transmission fusion on the dynamic graph embedding matrix to generate an integrated feature matrix, constructing a multi-objective Lyapunov function based on the integrated feature matrix, and generating a robust decision strategy by solving the Hamilton-Jacobi-Bellman equation, and performing multi-dimensional performance monitoring and statistical manifold learning on the robust decision strategy to achieve strategy optimization. This method can effectively handle the uncertainty in grid operation and improve the accuracy and reliability of dispatch decisions.

[0004] However, solutions including the above-mentioned existing technologies still have several technical bottlenecks. On the one hand, traditional graph modeling methods mostly rely solely on static topological information and fail to effectively integrate the electrical physical quantities, spectral structure characteristics, and local and global multi-scale graphical expression capabilities of nodes, resulting in limited model expression capabilities and difficulty in accurately capturing the multi-dimensional coupling relationships in complex power grid operations. On the other hand, current scheduling strategy generation mostly relies on fixed strategy templates or general structures in deep learning, lacking in-depth modeling of graph structure perturbation robustness and strategy diversity. In addition, existing power flow prediction methods often ignore the multi-level similarity structure information between nodes and fail to achieve effective mapping from graph structure to scheduling behavior. Summary of the Invention

[0005] The purpose of the present invention is to provide a power grid modeling and scheduling method, device and medium for a graph computing platform in order to solve the defects of the above-mentioned prior art.

[0006] The purpose of the present invention can be achieved by the following technical solutions:

[0007] A power grid modeling and scheduling method for a graph computing platform, including:

[0008] Step S1: constructing a power grid structure diagram based on the basic data of the power grid, generating a spectral position code by extracting Laplace spectrum features, and extracting three-dimensional scattering features by performing scattering transform based on spectral wavelet;

[0009] Step S2: Through multi-head attention spatial encoding, the physical quantity, spectral position encoding, three-dimensional scattering characteristics and spatial encoding on the node are spliced ​​to obtain a composite vector;

[0010] Step S3: construct a similarity matrix based on the composite vector and further generate a multi-scale graph dataset;

[0011] Step S4: Construct feature perturbation views and structure perturbation views based on the multi-scale graph, generate a multi-scale perturbation view set, perform view encoding, minimize representation differences, and construct a fusion embedding vector;

[0012] Step S5: Solve the power flow state, generate a first feature by combining the fused embedded vector, and obtain the node scheduling instruction based on the first feature.

[0013] The step S1 comprises:

[0014] Step S1-1: extracting busbar attribute data and transmission line attribute data;

[0015] Step S1-2: Take the busbars in the power grid as a node set and the transmission lines between the busbars as an edge set to construct a power grid structure diagram;

[0016] Step S1-3: Construct an adjacency matrix for all nodes in the power grid structure diagram, where if there is no transmission line connecting the busbars corresponding to any two nodes, the corresponding element in the adjacency matrix is ​​0; otherwise, the absolute value of the line admittance of the transmission line is used as the value of the corresponding element in the adjacency matrix;

[0017] Step S1-4: Calculate the degree matrix based on the adjacency matrix;

[0018] Step S1-5: constructing a normalized first Laplacian matrix based on the adjacency matrix and the degree matrix;

[0019] Step S1-6: Find the maximum eigenvalue of the first Laplacian matrix by power iteration algorithm l max , perform eigenvalue decomposition on the first Laplacian matrix and extract k The eigenvector corresponding to the smallest non-zero eigenvalue is used as the spectral position code of each node PEi ;

[0020] Step S1-7: Based on the maximum eigenvalue of the first Laplacian matrix l max Defining scale parameters s 1 and s 2;

[0021] Step S1-8: According to the scale parameter s 1 and s 2. Define the spectral wavelet kernel function, standardize the first Laplace matrix based on the spectral wavelet kernel function, and calculate the first-order scattering response under each scale parameter in combination with the unit pulse signal of each node;

[0022] Step S1-9: Using two scale parameters s 1 and s The larger of the two is used to calculate the first-order scattering response under the other scale parameter by polynomial approximation, and the second-order scattering response is extracted;

[0023] Step S1-10: averaging the secondary scattering response and all primary scattering responses to obtain the three-dimensional scattering characteristics of each node.

[0024] The step S2 comprises:

[0025] Step S2-1: Based on the physical quantities of each node, combined with spectral position encoding and three-dimensional scattering characteristics, the input features of the cut point are obtained, and the spatial encoding is obtained through a multi-head attention mechanism and linear mapping;

[0026] Step S2-2: The physical quantity, spectral position code, three-dimensional scattering characteristics and spatial code on the node are spliced ​​to obtain the composite vector of each node.

[0027] The step S3 comprises:

[0028] Step S3-1: Calculate the cosine similarity of the composite vector of each node as the similarity between nodes, and construct a similarity matrix;

[0029] Step S3-2: Initialize scale control parameter m=1;

[0030] Step S3-3: constructing a normalized second Laplacian matrix for the similarity matrix, solving the eigenvectors corresponding to the first set number of minimum non-zero eigenvalues ​​of the second Laplacian matrix, and constructing a characteristic matrix;

[0031] Step S3-3: Cluster all nodes into a first set number of clusters based on the feature matrix, and use each cluster as a super node. Obtain the feature vector of the super node by weighted averaging the composite vectors of all original nodes in the cluster, and obtain a coarse graph at the current scale.

[0032] Step S3-4: Determine whether the scale control parameter m reaches M. If so, all coarse images are combined into a multi-scale image dataset. Otherwise, obtain the similarity matrix of the coarse images at the current scale, set the scale control parameter m=m+1, and return to step S3-3.

[0033] In step S4, the feature perturbation view and the structure perturbation view are constructed based on the multi-scale graph to generate a multi-scale perturbation view set, including:

[0034] Step S4-1-1: define a perturbation tensor for the coarse image at each scale in the multi-scale image by using Gaussian noise;

[0035] Step S4-1-2: superimpose the node features of each coarse graph in the multi-scale perturbation view set with the perturbation tensor corresponding to the coarse graph as new node features to obtain the feature perturbation view corresponding to each coarse graph;

[0036] Step S4-1-3: Based on the connection weights of the nodes in each coarse graph, multiple edges are selected from the edges with connection weights lower than the average value to form an edge perturbation set, where the number of selected edges is positively correlated with the total number of edges in the coarse graph;

[0037] Step S4-1-4: Delete all selected edges to obtain the structural perturbation views corresponding to each coarse graph;

[0038] Step S4-1-5: Combine each coarse image, and the corresponding feature perturbation view and structure perturbation view into a first atlas, and combine the first atlases of each scale into a unified multi-scale perturbation view set.

[0039] The step S4 performs view encoding, minimizes representation differences, and constructs a fused embedding vector, including:

[0040] Step S4-2-1: Encode the three images in the first atlas at each scale;

[0041] Step S4-2-2: After the encoding results of different views converge to a consistent representation by minimizing the consistency alignment loss, the encoding results of the three graphs are weighted averaged and fused to obtain the fused node embedding vector as the fused embedding vector.

[0042] The minimized consistency alignment loss is:

[0043]

[0044] in: To minimize the consistency alignment loss, is the encoding result of the coarse image at scale m, is the encoding result of the feature perturbation view at scale m, is the encoding result of the structure perturbation view at scale m, is the square of the Frobenius norm.

[0045] The step S5 comprises:

[0046] Step S5-1: Use a linear regressor to construct and train a linear power flow predictor, taking the m-scale fused embedding vector as input and outputting the m-scale node voltage amplitude and phase angle estimation results;

[0047] Step S5-2: Calculate the power flow state corresponding to each scale based on the node voltage amplitude and phase angle estimation;

[0048] Step S5-3: concatenate the flow state and the fused embedding vector to form a secondary fused vector of each scale, and combine the secondary fused vectors of each scale to obtain the first feature;

[0049] Step S5-4: Input the first feature into a Transformer encoder with global attention to generate multiple scheduling instruction sets, where each scheduling instruction set corresponds to each scale and contains scheduling instructions for each node;

[0050] Step S5-5: weighted sum of the scheduling instruction sets of all scales to obtain the final scheduling instruction of the node.

[0051] A power grid modeling and scheduling device for a graph computing platform includes a memory, a processor, and a program stored in the memory. When the processor executes the program, the method described above is implemented.

[0052] A storage medium stores a program, which implements the above method when executed.

[0053] Compared with the prior art, the present invention has the following beneficial effects:

[0054] Constructing a weighted adjacency matrix and generating spectral position coding through Laplace spectral feature extraction can effectively capture the topological structure of the power grid and the coupling relationship between nodes. The three-dimensional scattering features are extracted through scattering transform to reveal the response characteristics and structural characteristics of nodes at different scales. The multi-head attention mechanism can focus on the adjacency relationship between different nodes in the power grid from multiple perspectives at the same time, generating a more comprehensive spatial coding. The multi-scale graph dataset is constructed through the spectral clustering algorithm to provide spatial differentiation support for subsequent disturbance modeling. By constructing disturbance views, the uncertainty and dynamics of the power grid in real operation are simulated, and the model's robust response to abnormal data and topological changes is enhanced. By selecting the optimal dispatching instruction set, the efficiency and safety of power grid dispatch can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Figure 1 Schematic diagram of the main steps of the method of the present invention. DETAILED DESCRIPTION

[0056] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments. This embodiment is implemented based on the technical solution of the present invention, and provides a detailed implementation method and specific operation process, but the protection scope of the present invention is not limited to the following embodiments.

[0057] Example 1

[0058] A power grid modeling and scheduling method based on a graph computing platform, such as Figure 1 Shown, including:

[0059] Step S1: constructing a power grid structure diagram based on the basic data of the power grid, generating a spectral position code by extracting Laplace spectrum features, and extracting three-dimensional scattering features by performing scattering transform based on spectral wavelet, including:

[0060] Step S1-1: extracting busbar attribute data and transmission line attribute data, specifically, extracting busbar attribute data and line attribute data from the power grid EMS system;

[0061] Among them, bus attribute data includes active power P i , reactive power Q i , voltage setting value and busbar type labels;

[0062] Line attribute data including line resistance R ij , line reactance X ij , line admittance Y ij Connection relationship with busbar f ij ;

[0063] Step S1-2: Take the busbars in the power grid as the node set V and the transmission lines between the busbars as the edge set E to construct the power grid structure diagram ;

[0064] Step S1-3: Construct an adjacency matrix for all nodes in the power grid structure diagram. If there is no transmission line connection between the buses corresponding to any two nodes, the corresponding element in the adjacency matrix is ​​0. Otherwise, the absolute value of the line admittance of the transmission line is used as the value of the corresponding element in the adjacency matrix:

[0065]

[0066] in, Indicates busbar i With busbar j The connection weights between nodes are also called nodes i and nodes j The connection weight between them;

[0067] If the bus i With busbar j If there is no connection between ;

[0068] Get the weighted adjacency matrix A ;

[0069] Step S1-4: Based on the adjacency matrix A Calculate degree matrix D , degree matrix D The size of the adjacency matrix A The size of the matrix is ​​always D Except for the diagonal elements from the upper left to the lower right, all are 0, and the diagonal elements are its adjacency matrix A The sum of all elements in the same row, where, when calculating the diagonal elements of the degree matrix, the adjacency matrix A All non-zero elements in are considered as 1 for summation.

[0070] Step S1-5: constructing a normalized first Laplacian matrix based on the adjacency matrix and the degree matrix;

[0071] Construct the normalized Laplace matrix L based on the adjacency matrix A and the degree matrix D,

[0072] ;

[0073] in, represents the self-loop matrix of the adjacency matrix A;

[0074] Step S1-6: Find the maximum eigenvalue of the first Laplacian matrix by power iteration algorithm l max , perform eigenvalue decomposition on the first Laplacian matrix and extract k The eigenvector corresponding to the smallest non-zero eigenvalue is used as the spectral position code of each node PE i ;

[0075] Step S1-7: Based on the maximum eigenvalue of the first Laplacian matrix l max Defining scale parameters s 1 and s 2:

[0076] ;

[0077] ;

[0078] in: c 1 and c 2 represents the scale factor, which is two typical effective frequency bands selected according to the spectrum distribution law;

[0079] Step S1-8: According to the scale parameter s 1 and s 2Define the spectral wavelet kernel function:

[0080]

[0081] in, represents the spectral wavelet kernel function, s represents the scale parameter;

[0082] Based on the spectral wavelet kernel function and normalized Laplace L, L is standardized so that the eigenvalues ​​of L are distributed in , for each node , generating a unit pulse signal , respectively calculated by Chebyshev polynomial approximation and First-order scattering response at scale

[0083] Unit pulse signal , expressed as:

[0084] in, Indicates in The unit pulse signal at the position, the unit pulse signal is only at the The node is set to 1, and the other positions are set to 0;

[0085] Calculate separately and First-order scattering response at scale , expressed as:

[0086] ;

[0087] in, represents the spectral wavelet kernel function, Indicates the application of the spectral wavelet kernel function to the normalized Laplace L;

[0088] Step S1-9: Use the larger of the two scale parameters to calculate the first-order scattering response under the other scale parameter by Chebyshev polynomial approximation to extract the second-order scattering response :

[0089]

[0090] in, express s First-order scattering response at scale 1

[0091] Step S1-10: Calculate the average of the secondary scattering response and all the primary scattering responses to obtain the three-dimensional scattering characteristics of each node .

[0092] By collecting and standardizing basic data on the power grid, power grid information from different sources can be unified and standardized, improving data compatibility and availability, while ensuring that all node and line attributes are traceable. By constructing a weighted adjacency matrix and generating spectral position encoding through Laplace spectral feature extraction, the topological structure of the power grid and the coupling relationship between nodes can be effectively captured, providing a robust spectral structure for subsequent graph calculations, which is used to reveal the global and local characteristics of the entire power grid topology. Directly using spectral domain information can capture static global patterns, but power grid power fluctuations have multi-scale characteristics. The scattering transform based on spectral wavelets can obtain multi-scale, invariant signal descriptions without training, and can reveal the response characteristics of nodes at different scales and more detailed structural characteristics in the power grid network, especially high-frequency characteristics. It helps to deeply model the power grid from multiple dimensions and improve the prediction and control capabilities of the power grid status.

[0093] Step S2: Through multi-head attention spatial encoding, the physical quantity, spectral position encoding, three-dimensional scattering characteristics and spatial encoding on the node are spliced ​​to obtain a composite vector, including:

[0094] Step S2-1: Based on the physical quantities of each node, combined with spectral position encoding and three-dimensional scattering characteristics, the input features of the cut point are obtained, and the spatial encoding is obtained through a multi-head attention mechanism and linear mapping;

[0095] Specifically, based on the Transformer-style multi-head attention mechanism, the attention head parameters are initialized. As input features, for any node i and its neighbor node j, in each attention head h, query-key scoring and Softmax normalization are performed to obtain the attention weight on the h-th head. , expressed as:

[0096] ;

[0097] in, represents the attention weight of node i and neighbor node j on the hth head, and denote the query weight matrix and key weight matrix on the h-th attention head, respectively. and Represent the input features of node i and node j respectively, represents the neighbor node index, represents the set of neighbor nodes of node i, Indicates the representation dimension of each attention head;

[0098] After obtaining the attention weights, the neighborhood features are weighted and summed using the value weight matrix to obtain the output representation corresponding to each head. , expressed as:

[0099] ;

[0100] in, represents the output representation of the h-th head for node i, represents the value weight matrix;

[0101] Concatenate all head outputs of the i-th node into a long vector , and obtain the final spatial encoding through linear mapping , expressed as:

[0102] ;

[0103] in, W o and b o are the trainable weight matrix and bias term, respectively. z i It is the long vector obtained by concatenating all headers;

[0104] Step S2-2: The physical quantity, spectral position code, three-dimensional scattering characteristics and spatial code on the node are spliced ​​to obtain the composite vector of each node.

[0105] The physical quantity on the node , spectral position encoding, scattering characteristics and spatial encoding splicing to obtain a composite vector f i .

[0106] Although there are spectral position information and scattering features, in order to flexibly capture arbitrary neighbor relationships and higher-order interactions in graph neural networks, the attention mechanism is still needed. The multi-head mechanism can learn multiple topological semantics in parallel (such as long-distance coupling and short-circuit loops). By introducing the multi-head attention mechanism, it can focus on the adjacency relationship between different nodes in the power grid from multiple perspectives at the same time, thereby generating a more comprehensive spatial encoding, which not only retains the physical properties of the power grid (voltage, power) but also strengthens contextual coupling, and provides fine-grained and adaptive neighbor interaction representation for downstream scheduling models. This process not only improves the model's ability to capture local information, but also effectively improves the model's expression ability and ability to handle complex power grid node relationships through multi-head parallel attention weight calculation. After splicing the physical quantity, spectral position coding, scattering features and spatial coding on the node to obtain a composite vector, it can integrate information from multiple dimensions for feature learning, thereby providing richer input features for subsequent graph clustering and scheduling decisions, and enhancing the model's generalization ability and accuracy.

[0107] Step S3: construct a similarity matrix based on the composite vector and further generate a multi-scale graph dataset, including:

[0108] Step S3-1: Calculate the cosine similarity of the composite vector of each node as the similarity between nodes S ij , and construct the similarity matrix;

[0109] Step S3-2: Initialize scale control parameter m=1;

[0110] Step S3-3: constructing a normalized second Laplacian matrix for the similarity matrix, using ARPACK to solve the eigenvectors corresponding to the first set number of smallest non-zero eigenvalues ​​of the second Laplacian matrix, and constructing a characteristic matrix;

[0111] Step S3-3: Cluster all nodes into a first set number of clusters based on the feature matrix, and take each cluster as a super node. The feature vector of the super node is obtained by weighted average of the composite vectors of all original nodes in the cluster, and the coarse graph at the current scale is obtained. During this period, if there are connected clusters in the original graph midpoint and The edges of the midpoints are connected in the coarse graph and , the weight is the sum of the similarities of the connecting edges;

[0112] Step S3-4: Determine whether the scale control parameter m reaches M. If so, all coarse images are combined into a multi-scale image dataset. Otherwise, obtain the similarity matrix of the coarse images at the current scale, set the scale control parameter m=m+1, and return to step S3-3.

[0113] By calculating the similarity of composite vectors between nodes and constructing a similarity matrix, the similarity between nodes and their relationship in the power grid can be measured more accurately, which provides a more detailed basis for graph clustering and node partitioning. The similarity matrix is ​​processed and node clusters are divided by the spectral clustering algorithm, effectively simplifying the power grid graph into multiple smaller clusters. After constructing the coarse graph, the hierarchical structure of the power grid topology can be better captured. The generated multi-scale graph dataset provides a more diverse and multi-level structure for subsequent graph neural network training, enabling the model to handle power grid problems at different scales and improving the robustness and adaptability of scheduling optimization. The original graph describes the connection relationship between substations, transmission lines, switchgear and other equipment in detail.

[0114] The coarse map aggregates local area devices to form super nodes, captures the energy flow pattern and structural stability between regions, retains the microscopic electrical characteristics (such as power flow and branch impedance), and abstracts the macroscopic topological structure (such as the coupling between grid areas and load centers), providing spatial differentiation support for subsequent disturbance modeling.

[0115] Step S4: Construct feature perturbation views and structure perturbation views based on the multi-scale graph, generate a multi-scale perturbation view set, perform view encoding, minimize representation differences, and construct a fusion embedding vector;

[0116] Among them, feature perturbation views and structural perturbation views are constructed based on the multi-scale graph to generate a multi-scale perturbation view set, including:

[0117] Step S4-1-1: Define the perturbation tensor for the coarse image at each scale in the multi-scale image by Gaussian noise:

[0118]

[0119] in, The perturbation tensor representing the j-th dimension eigenvalue of node i, represents the symbolic function, represents the j-th dimension eigenvalue of node i, The mean is 0 and the standard deviation is Gaussian noise, Usually set to 0.05;

[0120] Step S4-1-2: Superimpose the node features of each coarse graph in the multi-scale perturbation view set with the perturbation tensor corresponding to the coarse graph as new node features to obtain the feature perturbation view corresponding to each coarse graph ;

[0121] The node characteristics after disturbance are , expressed as:

[0122] ;

[0123] in, represents the original node features of the m-th layer multi-scale graph, represents the node features of the m-th layer perturbation graph, represents the perturbation tensor of the mth layer;

[0124] Step S4-1-3: Based on the connection weights of the nodes in each coarse graph, multiple edges are selected from the edges with connection weights lower than the average value to form an edge perturbation set, where the number of selected edges is positively correlated with the total number of edges in the coarse graph;

[0125] Specifically, according to the connection weights between nodes in the mth layer graph, select no more than edges, forming an edge perturbation set , Represents the total number of edges in the m-th level graph.

[0126] Step S4-1-4: Delete all selected edges to obtain the structural perturbation view corresponding to each coarse graph ;

[0127] Step S4-1-5: Combine each coarse image, and the corresponding feature perturbation view and structure perturbation view into a first atlas, and combine the first atlas of each scale into a unified multi-scale perturbation view set .

[0128] In step S4, view encoding is performed to minimize the representation difference and construct a fused embedding vector, including:

[0129] Step S4-2-1: Encode the three images in the first atlas at each scale:

[0130] ;

[0131] ;

[0132] ;

[0133] Step S4-2-2: After the encoding results of different views converge to a consistent representation by minimizing the consistency alignment loss, the encoding results of the three graphs are weighted averaged and fused to obtain the fused node embedding vector as the fused embedding vector. The minimum consistency alignment loss is:

[0134]

[0135] in: To minimize the consistency alignment loss, is the encoding result of the coarse image at scale m, is the encoding result of the feature perturbation view at scale m, is the encoding result of the structure perturbation view at scale m, is the square of the Frobenius norm.

[0136] Node characteristics (such as voltage level, real-time load, and current direction) may be subject to measurement errors, transmission delays, or losses during actual acquisition. By constructing feature perturbation views and structural perturbation views on multi-scale graphs, various possible disturbances in the power grid can be simulated, including changes in node characteristics and structural connections. This perturbation view set can provide the model with richer training samples and enhance the model's robustness to grid scheduling in a perturbation environment. During training, the diversity of the view set enables the model to better cope with grid state changes and potential uncertainties, improving the stability and adaptability of the grid scheduling strategy. The characteristic perturbation view simulates the above-mentioned errors by introducing a controllable perturbation vector. The model is forced to learn the ability to maintain stable output under characteristic uncertainty. The grid structure may undergo topological changes during operation due to events such as load adjustment, temporary maintenance, and fault tripping. The structural perturbation view simulates the addition or deletion of edges to construct a view with slight differences from the original graph structure. The model learns the changes in scheduling strategies under different structural states and has structural tolerance and topological generalization capabilities. By constructing characteristic perturbation views and structural perturbation views, it not only simulates the uncertainty and dynamics of the grid in real operation, but also significantly enhances the model's robust response to abnormal data, topological changes, and scheduling strategy drift. This method essentially realizes the transition from data-driven modeling to robust intelligent modeling and is a core innovative means for future complex power system scheduling tasks.

[0137] Using the GNN model for view encoding and minimizing representation differences effectively integrates information from different views and optimizes graph representation learning. By introducing a consistency alignment loss function, the encoding results of different views are made as consistent as possible, ensuring effective fusion between views. The fused embedding vector not only preserves the grid structure and node information but also comprehensively considers the effects of various disturbances, providing a more accurate representation for scheduling decisions. This step significantly improves the accuracy and computational efficiency of grid scheduling strategies.

[0138] Step S5: Solve the power flow state, combine the fused embedded vector to generate the first feature, and obtain the node scheduling instruction based on the first feature, including:

[0139] Step S5-1: Use a linear regressor to construct and train a linear power flow predictor, taking the m-scale fused embedding vector as input and outputting the m-scale node voltage amplitude and phase angle estimation results;

[0140] Step S5-2: Calculate the power flow state corresponding to each scale based on the node voltage amplitude and phase angle estimation;

[0141] Step S5-3: concatenate the flow state and the fused embedding vector to form a secondary fused vector of each scale, and combine the secondary fused vectors of each scale to obtain the first feature;

[0142] Step S5-4: Input the first feature into a Transformer encoder with global attention to generate multiple scheduling instruction sets, where each scheduling instruction set corresponds to each scale and contains scheduling instructions for each node;

[0143] Step S5-5: weighted sum of the scheduling instruction sets of all scales to obtain the final scheduling instruction of the node.

[0144] Among them, for each scale, l The Newton-Raphson power flow algorithm is used to perform power flow verification. The power flow error and scheduling fluctuation are used as indicators to obtain the strategy quality evaluation score. The optimal scheduling instruction set with the highest strategy quality evaluation score is selected from each scale graph. The optimal scheduling instruction set at each scale is fused through weighted averaging to generate the final power grid scheduling strategy hypergraph.

[0145] Furthermore, the final grid dispatching strategy hypergraph is applied to the EMS system to issue dispatching instructions and complete the precise dispatching of grid nodes.

[0146] By constructing a linear power flow predictor and using the Transformer encoder to generate a scheduling instruction set, the power grid's power flow state and scheduling requirements can be effectively combined to quickly generate accurate scheduling instructions. Based on the node's power flow state estimation, the Newton method is used to iteratively solve the power flow state, and the Transformer encoder is trained in combination with historical optimal scheduling samples, which can further improve the accuracy of scheduling decisions. Finally, by selecting the optimal scheduling instruction set to generate a power grid scheduling strategy hypergraph, the scheduling strategy can be optimized according to the actual operation of the power grid, thereby achieving accurate scheduling of power grid nodes. This process can significantly improve the efficiency and safety of power grid scheduling, reduce power waste and ensure stable operation of the system.

[0147] Example 2

[0148] The electronic device of the present invention includes a central processing unit (CPU), which can perform various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) or loaded from a storage unit into a random access memory (RAM). In the RAM, various programs and data required for device operation can also be stored. The CPU, ROM, and RAM are connected to each other via a bus. An input / output (I / O) interface is also connected to the bus.

[0149] Many components in a device are connected to the I / O interface, including: input units, such as a keyboard and mouse; output units, such as various types of displays and speakers; storage units, such as magnetic disks and optical disks; and communication units, such as network cards, modems, and wireless communication transceivers. The communication unit allows the device to exchange information / data with other devices via computer networks such as the Internet and / or various telecommunication networks.

[0150] The processing unit performs the various methods and processes described above, such as methods S1 to S5. For example, in some embodiments, methods S1 to S5 can be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit. In some embodiments, part or all of the computer program can be loaded and / or installed on the device via a ROM and / or a communication unit. When the computer program is loaded into the RAM and executed by the CPU, one or more steps of methods S1 to S5 described above can be performed. Alternatively, in other embodiments, the CPU can be configured to execute methods S1 to S5 by any other appropriate means (for example, by means of firmware).

[0151] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.

[0152] The program code for implementing the method of the present invention can be written in any combination of one or more programming languages. Such program code can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0153] In the context of the present invention, machine-readable medium can be a tangible medium that can contain or store a program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

Claims

1. A power grid modeling and scheduling method for a graph computing platform, characterized in that: include: Step S1: constructing a power grid structure diagram based on the basic data of the power grid, generating a spectral position code by extracting Laplace spectrum features, and extracting three-dimensional scattering features by performing scattering transform based on spectral wavelet; Step S2: Through multi-head attention spatial encoding, the physical quantity, spectral position encoding, three-dimensional scattering characteristics and spatial encoding on the node are spliced ​​to obtain a composite vector; Step S3: construct a similarity matrix based on the composite vector and further generate a multi-scale graph dataset; Step S4: Construct feature perturbation views and structure perturbation views based on the multi-scale graph, generate a multi-scale perturbation view set, perform view encoding, minimize representation differences, and construct a fusion embedding vector; Step S5: solving the power flow state, and generating a first feature by combining the fused embedded vector, and obtaining the node scheduling instruction based on the first feature; In step S4, the feature perturbation view and the structure perturbation view are constructed based on the multi-scale graph to generate a multi-scale perturbation view set, including: Step S4-1-1: define a perturbation tensor for the coarse image at each scale in the multi-scale image by using Gaussian noise; Step S4-1-2: superimpose the node features of each coarse graph in the multi-scale perturbation view set with the perturbation tensor corresponding to the coarse graph as new node features to obtain the feature perturbation view corresponding to each coarse graph; Step S4-1-3: Based on the connection weights of the nodes in each coarse graph, multiple edges are selected from the edges with connection weights lower than the average value to form an edge perturbation set, where the number of selected edges is positively correlated with the total number of edges in the coarse graph; Step S4-1-4: Delete all selected edges to obtain the structural perturbation views corresponding to each coarse graph; Step S4-1-5: combining each coarse image, and the corresponding feature perturbation view and structure perturbation view into a first atlas, and combining the first atlases of each scale into a unified multi-scale perturbation view set; The step S4 performs view encoding, minimizes representation differences, and constructs a fused embedding vector, including: Step S4-2-1: Encode the three images in the first atlas at each scale; Step S4-2-2: After the encoding results of different views converge to a consistent representation by minimizing the consistency alignment loss, the encoding results of the three graphs are fused by weighted average to obtain the fused node embedding vector as the fused embedding vector; The minimized consistency alignment loss is: in: To minimize the consistency alignment loss, is the encoding result of the coarse image at scale m, is the encoding result of the feature perturbation view at scale m, is the encoding result of the structure perturbation view at scale m, is the square of the Frobenius norm; The step S5 comprises: Step S5-1: Use a linear regressor to construct and train a linear power flow predictor, taking the m-scale fused embedding vector as input and outputting the m-scale node voltage amplitude and phase angle estimation results; Step S5-2: Calculate the power flow state corresponding to each scale based on the node voltage amplitude and phase angle estimation; Step S5-3: concatenate the flow state and the fused embedding vector to form a secondary fused vector of each scale, and combine the secondary fused vectors of each scale to obtain the first feature; Step S5-4: Input the first feature into a Transformer encoder with global attention to generate multiple scheduling instruction sets, where each scheduling instruction set corresponds to each scale and contains scheduling instructions for each node; Step S5-5: weighted sum of the scheduling instruction sets of all scales to obtain the final scheduling instruction of the node.

2. A method for power grid modeling and scheduling based on a graph computing platform according to claim 1, characterized in that: The step S1 comprises: Step S1-1: extracting busbar attribute data and transmission line attribute data; Step S1-2: Take the busbars in the power grid as a node set and the transmission lines between the busbars as an edge set to construct a power grid structure diagram; Step S1-3: Construct an adjacency matrix for all nodes in the power grid structure diagram, where if there is no transmission line connecting the busbars corresponding to any two nodes, the corresponding element in the adjacency matrix is ​​0; otherwise, the absolute value of the line admittance of the transmission line is used as the value of the corresponding element in the adjacency matrix; Step S1-4: Calculate the degree matrix based on the adjacency matrix; Step S1-5: constructing a normalized first Laplacian matrix based on the adjacency matrix and the degree matrix; Step S1-6: Find the maximum eigenvalue of the first Laplacian matrix by power iteration algorithm λ max , perform eigenvalue decomposition on the first Laplacian matrix and extract k The eigenvector corresponding to the smallest non-zero eigenvalue is used as the spectral position code of each node PE i ; Step S1-7: Based on the maximum eigenvalue of the first Laplacian matrix λ max Defining scale parameters s 1 and s 2; Step S1-8: According to the scale parameter s 1 and s 2. Define the spectral wavelet kernel function, standardize the first Laplace matrix based on the spectral wavelet kernel function, and calculate the first-order scattering response under each scale parameter in combination with the unit pulse signal of each node; Step S1-9: Using two scale parameters s 1 and s The larger of the two is used to calculate the first-order scattering response under the other scale parameter by polynomial approximation, and the second-order scattering response is extracted; Step S1-10: averaging the secondary scattering response and all primary scattering responses to obtain the three-dimensional scattering characteristics of each node.

3. The method for power grid modeling and scheduling based on a graph computing platform according to claim 1, characterized in that: The step S2 comprises: Step S2-1: Based on the physical quantities of each node, combined with spectral position encoding and three-dimensional scattering characteristics, the input features of the cut point are obtained, and the spatial encoding is obtained through a multi-head attention mechanism and linear mapping; Step S2-2: The physical quantity, spectral position code, three-dimensional scattering characteristics and spatial code on the node are spliced ​​to obtain the composite vector of each node.

4. The method for power grid modeling and scheduling based on a graph computing platform according to claim 1, characterized in that: The step S3 comprises: Step S3-1: Calculate the cosine similarity of the composite vector of each node as the similarity between nodes, and construct a similarity matrix; Step S3-2: Initialize scale control parameter m=1; Step S3-3: constructing a normalized second Laplacian matrix for the similarity matrix, solving the eigenvectors corresponding to the first set number of minimum non-zero eigenvalues ​​of the second Laplacian matrix, and constructing a characteristic matrix; Step S3-3: Cluster all nodes into a first set number of clusters based on the feature matrix, and use each cluster as a super node. Obtain the feature vector of the super node by weighted averaging the composite vectors of all original nodes in the cluster, and obtain a coarse graph at the current scale. Step S3-4: Determine whether the scale control parameter m reaches M. If so, all coarse images are combined into a multi-scale image dataset. Otherwise, obtain the similarity matrix of the coarse images at the current scale, set the scale control parameter m=m+1, and return to step S3-3.

5. A power grid modeling and scheduling device for a graph computing platform, comprising a memory, a processor, and a program stored in the memory, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 4 is implemented.

6. A storage medium having a program stored thereon, characterized in that: When the program is executed, the method according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Graph neural network-based power grid dispatching decision-making method and large model

    CN119294872A

  • Cross-system automatic matching and constructing method for topological structure of power grid on the basis of graph calculation and machine learning

    CN107741999A

  • An image retrieval method based on heterogeneous multi-task learning deep supervised discrete hashing

    CN109885716A