State determination method and device of power system, electronic equipment and storage medium

By converting power data into graph structures and using graph neural network models to extract and weight adjustments to edge features and node features, the problem of ignoring the topological information and edge attributes of the power system in the prior art is solved, and a more accurate power system state estimation is achieved.

CN119726645APending Publication Date: 2025-03-28STATE GRID INFORMATION & TELECOMM GRP CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411635314.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-15
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

The prior art is difficult to fully utilize the topological information of the power system, and the state estimation method based on graph neural networks usually ignores the properties of edges, resulting in insufficient information sources of the state estimation model and it is difficult to accurately describe the state changes of the power system.

Method used

By obtaining a variety of power data within the preset time period, it is converted into multiple graph structures. Each graph structure includes multiple nodes and multiple edges. Each graph structure is input to the pre-trained state determination model in sequence. The edges are extracted through the model, and the weight coefficients corresponding to edge features are determined. The node characteristics are determined based on these information, and the state of the power system is finally output.

Benefits of technology

By fully utilizing the topological information and edge properties of the power system, the accuracy and robustness of state estimation are significantly improved, and the state changes of the power system can be described more accurately, which is suitable for the complex and changeable state estimation requirements in modern power grids.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119726645A_ABST
    Figure CN119726645A_ABST
Patent Text Reader

Abstract

The invention provides a state determination method and device of a power system, electronic equipment and a storage medium. The method comprises the following steps: acquiring various power data within a preset duration; the power data are converted into a plurality of graph structures, and each graph structure comprises a plurality of nodes and a plurality of edges; sequentially inputting each graph structure into a pre-trained state determination model, performing feature extraction on the edge through the state determination model to obtain an edge feature, determining a weight coefficient corresponding to the edge feature based on a node corresponding to the edge and the edge feature, and determining a weight coefficient corresponding to the edge feature based on the node corresponding to the edge, the edge feature and the weight coefficient. Determining node features corresponding to the nodes; and based on the node features corresponding to the plurality of graph structures, outputting the states of the power system within the preset duration corresponding to the plurality of graph structures through the state determination model, thereby solving the technical problem that the state of the power system is determined inaccurately in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a method, device, electronic device and storage medium for determining the state of an electric power system. Background Art

[0002] In modern power systems, accurate state estimation is crucial for the stable operation of power grids. With the development of deep learning technology, methods based on fully connected neural networks and convolutional neural networks have been introduced into power system state estimation. However, these methods often fail to fully utilize the topological information of the power system, because the topological structure of the power system is highly non-Euclidean, and the fully connected and convolutional methods are mainly suitable for data modeling in Euclidean space. In addition, existing state estimation methods based on graph neural networks usually only input the attributes of nodes and ignore the attributes of edges. However, in power systems, the attributes of edges (such as resistance, reactance, and admittance of transmission lines) have an important impact on the operating state and performance of the system. Ignoring this information will make the information source of the state estimation model insufficient and it is difficult to accurately describe the state changes of the power system. Summary of the invention

[0003] In view of this, the purpose of the present application is to propose a method, device, electronic device and storage medium for determining the state of an electric power system to overcome all or part of the deficiencies in the prior art.

[0004] Based on the above-mentioned purpose, the present application provides a method for determining the state of an electric power system, comprising: obtaining multiple electric power data within a preset time length; converting the multiple electric power data into multiple graph structures, wherein each graph structure includes multiple nodes and multiple edges; inputting each graph structure into a pre-trained state determination model in turn, performing feature extraction on the edge through the state determination model to obtain edge features, determining a weight coefficient corresponding to the edge feature based on the node corresponding to the edge and the edge feature, and determining a node feature corresponding to the node based on the node corresponding to the edge, the edge feature and the weight coefficient; based on the node features corresponding to the multiple graph structures, outputting the state of the electric power system within the preset time length corresponding to the multiple graph structures through the state determination model.

[0005] Optionally, determining the weight coefficient corresponding to the edge feature based on the node corresponding to the edge and the edge feature includes: determining the weight coefficient by the following formula: Among them, α i,j is the weight coefficient, is the node feature of the i-th node in the k-th layer, is the node feature of the jth node in the kth layer, e ijis the edge feature of the edge connecting node i and node j, d is the size of the embedding layer feature in the state determination model, W1 is the trainable first parameter matrix, W2 is the trainable second parameter matrix, W3 is the trainable third parameter matrix, softmax represents the conversion of the input value into a probability value whose sum is 1, and T represents the transpose of the matrix.

[0006] Optionally, determining the node feature corresponding to the node based on the node corresponding to the edge, the edge feature and the weight coefficient includes: determining the node feature by using the following formula: in, is the node feature, α i,j is the weight coefficient, is the node feature of the i-th node in the k-th layer, is the node feature of the jth node in the kth layer, e ij is the edge feature of the edge connecting node i and node j, W4 is the trainable fourth parameter matrix, W5 is the trainable fifth parameter matrix, W3 is the trainable third parameter matrix, Indicates that the jth node is the neighbor node of the ith node, Represents all neighbor nodes of the i-th node.

[0007] Optionally, the loss function used to train the state determination model is determined by the following formula:

[0008] in, is the loss function, is the state estimation result of the state determination model at the i-th node, y i is the actual result of the state determination model at the i-th node, and N is the total number of nodes.

[0009] Optionally, before inputting the graph structure into a pre-trained state determination model, the method includes: pre-processing the graph structure.

[0010] Optionally, the preprocessing includes normalization processing, and the preprocessing of the graph structure includes: classifying the nodes and edges in the graph structure according to predetermined types; for each type of node, determining the first maximum value and the first minimum value in the numerical values ​​corresponding to the nodes of the type, and calculating the first difference between the first maximum value and the first minimum value; respectively calculating the second difference between each node of the type and the first minimum value; calculating the first quotient of the second difference and the first difference, and determining the node after the normalization processing based on the first quotient; for each type of edge, determining the second maximum value and the second minimum value in the numerical values ​​corresponding to the edge of the type, and calculating the third difference between the second maximum value and the second minimum value; respectively calculating the fourth difference between each edge of the type and the second minimum value; calculating the second quotient of the fourth difference and the third difference, and determining the edge after the normalization processing based on the second quotient.

[0011] Optionally, the pre-training method of the state determination model includes: acquiring a variety of historical power data, and converting the multiple historical power data into a plurality of historical graph structures; performing a preprocessing operation on the multiple historical graph structures; dividing the multiple historical graph structures after the preprocessing operation into a training set and a test set according to a preset ratio; initializing the parameters of the state determination model, and iteratively training the state determination model using the training set; testing the iteratively trained state determination model based on the test set to obtain a test accuracy, and when the test accuracy is greater than a preset accuracy, a trained state determination model is obtained.

[0012] Based on the same inventive concept, the present application also provides a state determination device for an electric power system, comprising: an acquisition module, configured to acquire multiple electric power data within a preset time length; a conversion module, configured to convert the multiple electric power data into multiple graph structures, wherein each graph structure includes multiple nodes and multiple edges; a first determination module, configured to input each graph structure into a pre-trained state determination model in turn, perform feature extraction on the edge through the state determination model to obtain edge features, determine the weight coefficient corresponding to the edge feature based on the node corresponding to the edge and the edge feature, and determine the node feature corresponding to the node based on the node corresponding to the edge, the edge feature and the weight coefficient; an output module, configured to output the state of the electric power system within the preset time length corresponding to the multiple graph structures through the state determination model based on the node features corresponding to the multiple graph structures.

[0013] Based on the same inventive concept, the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable by the processor, wherein the processor implements the method as described above when executing the computer program.

[0014] Based on the same inventive concept, the present application also provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to execute the method as described above.

[0015] As can be seen from the above, the state determination method, device, electronic device and storage medium of the power system provided by the present application include obtaining multiple power data within a preset time length. The multiple power data are converted into multiple graph structures, wherein each graph structure includes multiple nodes and multiple edges. The information in the power data can be more comprehensively expressed through the graph structure, and the dynamic characteristics inside the power system can be reflected. Each graph structure is input into a pre-trained state determination model in turn, and the edge is extracted by the state determination model to obtain edge features. Based on the node corresponding to the edge and the edge feature, the weight coefficient corresponding to the edge feature is determined, and based on the node corresponding to the edge, the edge feature and the weight coefficient, the node feature corresponding to the node is determined, so that the determined node feature is more accurate. Based on the node features corresponding to the multiple graph structures, the state of the power system corresponding to the multiple graph structures within the preset time length is output through the state determination model, so that the state of the power system within the preset time length is determined more accurately. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the present application or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0017] Figure 1 A schematic diagram of a flow chart of a method for determining a state of a power system according to an embodiment of the present application;

[0018] Figure 2 A schematic diagram of the structure of a device for determining a state of a power system according to an embodiment of the present application;

[0019] Figure 3 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0020] In order to make the objectives, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.

[0021] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should be the usual meanings understood by people with ordinary skills in the field to which the present application belongs. The "first", "second" and similar words used in the embodiments of the present application do not represent any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements or objects appearing in front of the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0022] As described in the background technology section, in modern power systems, accurate state estimation is crucial for the stable operation of the power grid. The main purpose of power system state estimation is to calculate the state of each node in the system (such as voltage amplitude and phase angle) by using the measurement data in the system (such as voltage, phase angle, current and power, etc.), so as to monitor and control the operation status of the power system. Early power system state estimation mainly relied on traditional linear and nonlinear optimization methods, among which the most representative are least squares method and weighted least squares method. The core idea of ​​the traditional method is to use certain mathematical models and optimization methods to approximate the real system state. The basic process of such methods is introduced below using the least squares method as an example. In the least squares state estimation, the variables that can be actually observed in the system are defined as quantity measurements, and the variables to be calculated in the system are defined as state quantities. Then, the relationship between state quantities and quantity measurements is established by constructing measurement equations, and then the objective function is defined as minimizing the sum of squares of the errors between the quantity measurements estimated by the measurement equation and the actual observed measurement values. Since the measurement equation is a nonlinear function of the state quantity, it is solved in an iterative manner, and linear assumptions are usually made for the measurement equation. The advantage of traditional methods is that their calculation process is simple and easy to implement. However, traditional state estimation methods such as the least squares method often require multiple iterative calculations when processing nonlinear measurement data of power systems, resulting in large amounts of calculations and high time complexity, making it difficult to meet real-time requirements. In addition, the least squares method is sensitive to the noise of measurement data, and the estimation results are unstable when the data is abnormal or missing. These methods have low estimation accuracy when dealing with nonlinear relationships and harsh measurement conditions, and are highly dependent on system models, making it difficult to adapt to the complex operating conditions of modern power grids.

[0023] With the rapid development of machine learning and deep learning technologies, intelligent state estimation has become a research hotspot. Intelligent state estimation uses data-driven models and artificial intelligence algorithms to effectively deal with nonlinear characteristics and uncertainties in power systems. The advantage of intelligent state estimation is that it does not rely on a clear physical model of the power system, can learn system behavior through historical data, has good adaptability and high accuracy, and is suitable for complex and changeable state estimation needs in modern power grids. The characteristics of state estimation based on machine learning and deep learning are that it uses machine learning (such as support vector machines, decision trees) and deep learning (such as fully connected neural networks, convolutional neural networks, etc.) methods to learn the complex relationship between the power system state and the measured value from a large amount of historical operation data, and realizes accurate estimation of the power system state in a data-driven manner. They first collect historical operation data from various sensors and measuring devices (such as SCADA systems) in the power system. Then, they select appropriate models, loss functions, optimization algorithms, etc. to train and optimize the model, and optimize the model's hyperparameters through hyperparameter adjustment methods such as cross-validation to prevent overfitting or underfitting.

[0024] It is worth mentioning that some recent work has begun to introduce graph convolutional neural networks into the field of power system state estimation. They abstract the power system into a graph, where nodes represent devices in the power grid (such as generators, loads, and substations), and edges represent connections between devices (such as transmission lines). Graph neural networks iteratively aggregate the feature information of nodes and learn complex relationships in the graph structure to perform state estimation. However, these methods often fail to fully utilize the topological information of the power system, because the topological structure of the power system is highly non-Euclidean, and the full connection and convolution methods are mainly suitable for data modeling in Euclidean space. Existing state estimation methods based on graph neural networks usually only input the attributes of nodes and ignore the attributes of edges. However, in the power system, the attributes of edges (such as the resistance, reactance, and admittance of transmission lines) have an important impact on the operating state and performance of the system. Ignoring this information will make the information source of the state estimation model insufficient and it is difficult to accurately describe the state changes of the power system.

[0025] In view of this, the present application embodiment proposes a method for determining the state of a power system, referring to Figure 1 , including the following steps:

[0026] Step 101, obtaining various power data within a preset time period.

[0027] In this step, the specific value of the preset time length can be determined according to user needs. For example, if the user wants to determine the change state of the power system within five minutes before the current moment, the preset time length can be within five minutes before the current moment; if the user wants to determine the change state of the power system within one month before the current moment, the preset time length can be within one month before the current moment. Collect various power data within the preset time length from the terminal equipment of the power system. For example, the power data can be current data, voltage data, active power data or reactive power data, etc.

[0028] Step 102: convert the multiple power data into multiple graph structures, wherein each graph structure includes multiple nodes and multiple edges.

[0029] In this step, the problem of determining the state of the power system using power data is converted into the problem of determining the state of the power system using a graph structure. A variety of power data are converted into multiple graph structures, each of which includes multiple nodes and multiple edges. The specific rules for converting the multiple power data into multiple graph structures can be set as needed. For example, the multiple power data corresponding to the same time are converted into a graph structure. Each graph structure includes multiple nodes and multiple edges. The adjacency matrix in the graph structure is a two-dimensional matrix, 1 indicates that there is a connection relationship between two nodes, and 0 indicates that there is no connection relationship. Each node is represented by an N-dimensional vector, that is, it is represented by a number, indicating the physical quantity that the power system can actually measure at this node, and each edge is represented by an M-dimensional vector, that is, it is represented by a number, indicating the physical attribute of this edge or the physical quantity that can be actually measured. The busbar, power station, substation, etc. in the power system are regarded as nodes of the graph structure, each node represents an electric power equipment or device, and the attributes carried by the node include injected active power, injected reactive power, voltage and other measurement values. The transmission lines in the power system (such as cables, transformer connecting lines, etc.) are regarded as the edges of the graph structure. The attributes carried by the edges include the physical properties of the transmission lines such as resistance, conductance, impedance, etc., as well as the measured values ​​of active power and reactive power on both sides of the branch. The graph structure can more comprehensively express the information in the power data and reflect the dynamic characteristics of the power system.

[0030] Step 103, input each graph structure into a pre-trained state determination model in turn, extract features of the edge through the state determination model to obtain edge features, determine the weight coefficient corresponding to the edge feature based on the node corresponding to the edge and the edge feature, and determine the node feature corresponding to the node based on the node corresponding to the edge, the edge feature and the weight coefficient.

[0031] In this step, by utilizing the characteristics of the graph neural network, the state estimation can be performed quickly, which significantly improves the computational efficiency, especially when dealing with large-scale power systems. Therefore, the present application uses a state determination model to determine the state of the power system. Each graph structure is input into the pre-trained state determination model in turn. Exemplarily, the state determination model has a graph neural network with five layers of graph convolution, in which the first layer is a linear embedding layer responsible for mapping the features of the input data to a high-dimensional space, followed by five layers of graph convolution layers responsible for feature extraction. For each graph structure, there will be multiple edges, and the edges represent the relationship between different physical quantities. The attributes carried by the edges in the graph structure (such as the resistance, conductance, impedance, etc. of the transmission line) are introduced into the state determination model. The state determination model is used to extract features from these edges to obtain corresponding edge features. Specifically, existing feature extraction algorithms, such as GAT (GAT, Graph Attention Network, graph attention mechanism), can be used to extract features from edges to obtain edge features. Weights are a mathematical expression of the features of the input data during the model learning process. They determine how the data is transferred between the layers of the model and how it is converted. In the state determination model, the weight coefficient can capture and store a large number of highly abstract data features, so that the model can handle more complex or subtle tasks. The present application combines the characteristics of the edge to adjust the weight coefficient of information transmission between nodes. Therefore, based on the node and edge features corresponding to the edge, the weight coefficient corresponding to the edge feature is determined. Through the weight coefficient, the state determination model's modeling ability for the physical characteristics in the power system is enhanced, and the overall performance and robustness of the power system state estimation are improved. In addition, determining the node features requires not only the use of weight coefficients, but also the use of the node and edge features corresponding to the edge, and using the edge features to determine the node features. This improvement enables the state determination model to not only learn node features, but also comprehensively consider edge features. It should be noted that a node has a connection relationship with multiple edges, and each edge is connected to the node's neighbor nodes. When determining the node features, the features corresponding to multiple edges and the neighbor nodes corresponding to each edge are required, and the edge features and node features are composed of numbers. Determining the node features fully takes into account the attributes carried by the edges, so that the determined node features are more accurate.

[0032] It should be noted that in order to make full use of the topological structure information in the power system, this application designs an improved graph neural network model, which can effectively combine node features and edge features in the state estimation process, and maximize the mining of useful information. By combining the topological structure information of the power system and the attribute information of the edge, it can more accurately model the power grid state and improve the accuracy of subsequent state estimation of the power system. The initial update formula of node features and edge features is given below. The initial update formula corresponding to the node can be transformed to obtain the aforementioned node feature determination formula.

[0033]

[0034] in is the node feature of the i-th node in the k-th layer, e ij is the edge feature of the edge connecting node i and node j, represents all neighbor nodes of node i, f h and f e is an aggregation function used to combine node and edge information. It should be noted that f h It can have different forms of expression according to the selected graph convolution method. The basic principle is to add an edge feature in the traditional node feature aggregation process. This application solves the problem that the existing state estimation method based on graph neural network ignores the attribute information of the edge. By improving the graph neural network model, not only the node characteristics are considered in the message transmission process, but also the attribute information of the edge is combined to adjust the weight and content of the information transmission between nodes, which enhances the model's ability to model the physical characteristics of the power system and improves the overall performance and robustness of the subsequent power system state estimation.

[0035] Step 104: Based on the node features corresponding to the multiple graph structures, output the states of the power system within a preset time period corresponding to the multiple graph structures through the state determination model.

[0036] In this step, the state determination model classifies the node features corresponding to multiple graph structures to obtain the state of the power system within a preset time period corresponding to the multiple graph structures. Exemplarily, the extracted node features are input into an output layer comprising two layers of fully connected neural network layers to obtain node-level prediction results. The present application converts power data into a graph structure to better capture the dynamic characteristics within the power system, and takes edge features into account when determining node features, so that the state of the power system within the preset time period is determined more accurately when classifying node features. It should be noted that the preset time period in the present application can be a time period that is relatively close to the current moment, which is equivalent to being able to determine the state of the power system in real time.

[0037] It should be noted that the present application solves the problem that traditional machine learning and neural network methods cannot effectively model the topological structure of the power system. By adopting a method based on graph neural network, the power system is represented as a graph structure, where nodes represent power equipment and edges represent connections between devices. Through the feature learning ability of nodes and edges of graph neural networks, the topological structure information of the power grid can be effectively captured, and the accuracy and robustness of state estimation can be improved. It also solves the shortcomings of traditional state estimation methods in computational complexity and efficiency. By introducing a state estimation method based on graph neural network, the full graph reasoning ability and efficient message passing mechanism of graph neural network are fully utilized, the computational complexity of state estimation is significantly reduced, the computational efficiency is improved, and real-time state estimation of large-scale power systems is achieved.

[0038] Through the above scheme, a variety of power data within a preset time length is obtained. The various power data are converted into multiple graph structures, wherein each graph structure includes multiple nodes and multiple edges. The graph structure can more comprehensively express the information in the power data and reflect the dynamic characteristics of the power system. Each graph structure is input into a pre-trained state determination model in turn, and the state determination model is used to extract the features of the edge to obtain the edge features. Based on the nodes corresponding to the edge and the edge features, the weight coefficients corresponding to the edge features are determined. Based on the nodes corresponding to the edge, the edge features and the weight coefficients, the node features corresponding to the nodes are determined, so that the determined node features are more accurate. Based on the node features corresponding to the multiple graph structures, the state of the power system within the preset time length corresponding to the multiple graph structures is output through the state determination model, so that the determined state of the power system within the preset time length is more accurate.

[0039] In some embodiments, determining the weight coefficient corresponding to the edge feature based on the node corresponding to the edge and the edge feature includes: determining the weight coefficient by the following formula: Among them, αi ,j is the weight coefficient, is the node feature of the i-th node in the k-th layer, is the node feature of the j-th node in the k-th layer, eij is the edge feature of the edge connecting node i and node j, d is the size of the embedding layer feature in the state determination model, W1 is the trainable first parameter matrix, W2 is the trainable second parameter matrix, W3 is the trainable third parameter matrix, softmax represents the conversion of the input value into a probability value whose sum is 1, and T represents the transpose of the matrix.

[0040] In this embodiment, there is a trainable parameter matrix in the state determination model. The parameter matrix is ​​the key part of the state determination model learning, which contains the weights and bias items of the neural network. These parameter matrices are the targets of state determination model training and optimization. By adjusting these parameters, the neural network can learn the mapping relationship between input data and output data. The design and adjustment of the parameter matrix are crucial to the performance of the state determination model, and directly affect the prediction accuracy and generalization ability of the state determination model. The softmax function is also used to determine the weight coefficient. The softmax function is also called the normalized exponential function. Its function is to map a set of values ​​to a probability distribution, that is, to output a vector in which the value of each element is between 0 and 1, and the sum of all elements is equal to 1. This feature makes the Softmax function very suitable for multi-class classification problems because it can convert the output of the model into probability values ​​of each category, thereby facilitating classification decisions. The node features and edge features are multiplied by their corresponding parameter matrices respectively, and the weight coefficients of information transmission between nodes are adjusted in combination with the edge features. The weight coefficients can capture and store a large number of highly abstract edge features and node features, so that the determined weight coefficients are more accurate.

[0041] In some embodiments, determining the node feature corresponding to the node based on the node corresponding to the edge, the edge feature and the weight coefficient includes: determining the node feature by the following formula: in, is the node feature, α i,k is the weight coefficient, is the node feature of the i-th node in the k-th layer, is the node feature of the jth node in the kth layer, e ij is the edge feature of the edge connecting node i and node j, W4 is the trainable fourth parameter matrix, W5 is the trainable fifth parameter matrix, W3 is the trainable third parameter matrix, Indicates that the jth node is the neighbor node of the ith node, Represents all neighbor nodes of the i-th node.

[0042] In this embodiment, a trainable parameter matrix is ​​also used in the formula for determining node features. The parameter matrix includes weights and bias terms of the neural network. Using the trained parameter matrix, accurate node features can be obtained. Edge features are also used to determine node features, and the relationship between nodes is considered more comprehensively. Weight coefficients are also used to determine node features, and the weight coefficients can accurately capture the characteristics of the nodes. The node feature determination formula contains relatively comprehensive parameters, which digitize the node features, making the determined node features more accurate. It should be noted that to determine the node features of the i-th node, all neighbor nodes corresponding to the i-th node and the connecting edges between the i-th node and each neighbor node are used.

[0043] In some embodiments, the loss function used to train the state determination model is determined by the following formula: in, is the loss function, is the state estimation result of the state determination model at the i-th node, y i is the actual result of the state determination model at the i-th node, and N is the total number of nodes.

[0044] In this embodiment, since state determination is a regression task, the mean square error is used as the loss function to measure the difference between the estimated node state (such as voltage amplitude and phase angle) and the true value, so that the prediction accuracy of the state determination model is relatively high. Here, the Adam optimization algorithm is used for parameter optimization, and the learning rate decay strategy is used to continuously adjust the model parameters through the gradient descent method to minimize the loss function, and finally obtain a trained model.

[0045] In some embodiments, before inputting the graph structure into a pre-trained state determination model, the method includes: pre-processing the graph structure.

[0046] In this embodiment, preprocessing is a crucial step in data science and machine learning, and its purpose is to improve the quality and availability of data and ensure the accuracy and reliability of subsequent analysis and model building. Preprocessing the graph structure can effectively remove noise, repair missing values, and process outliers, thereby improving the learning effect and computing efficiency of subsequent models.

[0047] In some embodiments, the preprocessing includes normalization processing, and the preprocessing of the graph structure includes: classifying the nodes and edges in the graph structure according to predetermined types; for each type of node, determining the first maximum and the first minimum in the numerical values ​​corresponding to the nodes of the type, and calculating the first difference between the first maximum and the first minimum; respectively calculating the second difference between each node of the type and the first minimum; calculating the first quotient of the second difference and the first difference, and determining the node after the normalization processing based on the first quotient; for each type of edge, determining the second maximum and the second minimum in the numerical values ​​corresponding to the edge of the type, and calculating the third difference between the second maximum and the second minimum; respectively calculating the fourth difference between each edge of the type and the second minimum; calculating the second quotient of the fourth difference and the third difference, and determining the edge after the normalization processing based on the second quotient.

[0048] In this embodiment, the collected power data is usually a named value with a unit, and its data range is usually large, and the difference between different physical quantities is also large. Directly inputting the graph structure into the network is not conducive to the learning of the state determination model. Therefore, the input graph structure is normalized to unify the dimension of the input data. There are many types of nodes. For example, the node can be a bus or a power station. For the nodes of the same type, the calculation is performed to determine the first maximum value and the first minimum value in the numerical value corresponding to the node of the type, and the first difference between the first maximum value and the first minimum value is calculated; the second difference between each node of the node of the type and the first minimum value is calculated respectively; the first quotient of the second difference and the first difference is calculated, and the node after normalization is determined based on the first quotient. There are also many types of edges, for example, cables of transmission lines or transformer connecting lines. Calculate the same type of edge, determine the second maximum and second minimum values ​​corresponding to the edge of the same type, calculate the third difference between the second maximum and the second minimum; calculate the fourth difference between each edge of the same type and the second minimum; calculate the second quotient of the fourth difference and the third difference, and determine the normalized edge based on the second quotient. By normalizing the graph structure, the dimensional difference of the data can be reduced, ensuring that the contribution of each feature to the model is relatively balanced, and the convergence speed of the model can be improved, which helps to accelerate the search for the global optimal solution. In addition, the stability and accuracy of the model can be enhanced, and the state determination model can be prevented from overfitting by reducing the correlation between features. In some embodiments, the pre-training method of the state determination model includes: obtaining a variety of historical power data, and converting the multiple historical power data into multiple historical graph structures; performing preprocessing operations on the multiple historical graph structures; dividing the multiple historical graph structures after the preprocessing operations into training sets and test sets according to a preset ratio; initializing the parameters of the state determination model, and using the training set to iteratively train the state determination model; testing the iteratively trained state determination model based on the test set to obtain a test accuracy, and when the test accuracy is greater than the preset accuracy, a trained state determination model is obtained.

[0049] In this embodiment, a large amount of historical power data is obtained, and since the graph structure can more comprehensively reflect the relationship between power data, the historical data is converted into a historical graph structure. The historical graph structure is preprocessed to make it conform to the specification of input to the state determination model. All historical graph structures can be divided into 80% training set and 20% test set, the training set is used to train the state determination model, and the test set verifies the state determination model trained by the training set. Initialize the parameters of the state determination model, the parameters are set according to the empirical value, which is conducive to improving the convergence speed of the state determination model. The state determination model is iteratively trained by the training set and the state determination model after iterative training is tested by the test set to obtain the test evaluation parameter. When the test evaluation parameter is greater than the preset evaluation threshold, the trained state determination model is finally obtained. It should be noted that real-time power data is obtained, the above-mentioned real-time power data is converted into a graph structure, and the graph structure is input into the trained state determination model, and the real-time state of the power system corresponding to the real-time power data can be output through the state determination model.

[0050] It should be noted that the method of the embodiment of the present application can be performed by a single device, such as a computer or server. The method of this embodiment can also be applied to a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present application, and the multiple devices will interact with each other to complete the described method.

[0051] It should be noted that the above describes some embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0052] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a device for determining the state of a power system.

[0053] refer to Figure 2 , the state determination device of the power system comprises:

[0054] The acquisition module 10 is configured to acquire a variety of power data within a preset time period.

[0055] The conversion module 20 is configured to convert the multiple power data into multiple graph structures, wherein each graph structure includes multiple nodes and multiple edges.

[0056] The first determination module 30 is configured to input each graph structure into a pre-trained state determination model in turn, extract features of the edge through the state determination model to obtain edge features, determine the weight coefficient corresponding to the edge feature based on the node corresponding to the edge and the edge feature, and determine the node feature corresponding to the node based on the node corresponding to the edge, the edge feature and the weight coefficient.

[0057] The output module 40 is configured to output the states of the power system within a preset time period corresponding to the multiple graph structures through the state determination model based on the node features corresponding to the multiple graph structures.

[0058] Through the above device, a variety of power data within a preset time length is obtained. The various power data are converted into multiple graph structures, wherein each graph structure includes multiple nodes and multiple edges. The graph structure can more comprehensively express the information in the power data and reflect the dynamic characteristics of the power system. Each graph structure is input into a pre-trained state determination model in turn, and the state determination model is used to extract the features of the edge to obtain the edge features. Based on the nodes corresponding to the edge and the edge features, the weight coefficients corresponding to the edge features are determined. Based on the nodes corresponding to the edge, the edge features and the weight coefficients, the node features corresponding to the nodes are determined, so that the determined node features are more accurate. Based on the node features corresponding to the multiple graph structures, the state of the power system within the preset time length corresponding to the multiple graph structures is output through the state determination model, so that the determined state of the power system within the preset time length is more accurate.

[0059] In some embodiments, the first determination module 30 is further configured to determine the weight coefficient by the following formula: Among them, α i,j is the weight coefficient, is the node feature of the i-th node in the k-th layer, is the node feature of the jth node in the kth layer, e ij is the edge feature of the edge connecting node i and node j, d is the size of the embedding layer feature in the state determination model, W1 is the trainable first parameter matrix, W2 is the trainable second parameter matrix, W3 is the trainable third parameter matrix, softmax represents the conversion of the input value into a probability value whose sum is 1, and T represents the transpose of the matrix.

[0060] In some embodiments, the first determination module 30 is further configured to determine the node feature by the following formula: in, is the node feature, α i,j is the weight coefficient, is the node feature of the i-th node in the k-th layer, is the node feature of the jth node in the kth layer, e ij is the edge feature of the edge connecting node i and node j, W4 is the trainable fourth parameter matrix, W5 is the trainable fifth parameter matrix, W3 is the trainable third parameter matrix, Indicates that the jth node is the neighbor node of the ith node, Represents all neighbor nodes of the i-th node.

[0061] In some embodiments, a second determination module is further included, wherein the second determination module is configured to determine the loss function for training the state determination model by the following formula: in, is the loss function, is the state estimation result of the state determination model at the i-th node, y i is the actual result of the state determination model at the i-th node, and N is the total number of nodes.

[0062] In some embodiments, a preprocessing module is further included, wherein the preprocessing module is configured to preprocess the graph structure before inputting the graph structure into a pre-trained state determination model.

[0063] In some embodiments, the preprocessing module is also configured so that the preprocessing includes normalization processing, and the nodes and edges in the graph structure are classified according to predetermined types; for each type of node, the first maximum value and the first minimum value in the numerical value corresponding to the node of the type are determined, and the first difference between the first maximum value and the first minimum value is calculated; the second difference between each node of the type and the first minimum value is calculated; the first quotient of the second difference and the first difference is calculated, and based on the first quotient, the node after the normalization processing is determined; for each type of edge, the second maximum value and the second minimum value in the numerical value corresponding to the edge of the type are determined, and the third difference between the second maximum value and the second minimum value is calculated; the fourth difference between each edge of the type and the second minimum value is calculated; the second quotient of the fourth difference and the third difference is calculated, and based on the second quotient, the edge after the normalization processing is determined.

[0064] In some embodiments, a training module is also included, which is configured to obtain a variety of historical power data and convert the multiple historical power data into a plurality of historical graph structures; perform preprocessing operations on the multiple historical graph structures; divide the multiple historical graph structures after the preprocessing operations into a training set and a test set according to a preset ratio; initialize the parameters of the state determination model, and use the training set to iteratively train the state determination model; test the iteratively trained state determination model based on the test set to obtain a test accuracy, and when the test accuracy is greater than the preset accuracy, a trained state determination model is obtained.

[0065] For the convenience of description, the above device is described in terms of functions divided into various modules. Of course, when implementing the present application, the functions of each module can be implemented in the same or multiple software and / or hardware.

[0066] The device of the above embodiment is used to implement the corresponding power system state determination method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.

[0067] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for determining the state of the power system as described in any of the above embodiments is implemented.

[0068] Figure 3 A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown, and the device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other through the bus 1050 in the device.

[0069] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0070] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.

[0071] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.

[0072] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).

[0073] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).

[0074] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.

[0075] The electronic device of the above embodiment is used to implement the corresponding method for determining the state of the power system in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.

[0076] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the method for determining the state of the power system as described in any of the above embodiments.

[0077] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.

[0078] The computer instructions stored in the storage medium of the above embodiments are used to enable the computer to execute the method for determining the state of the power system as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0079] Based on the same concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a computer program product, including computer program instructions. When the computer program instructions are run on a computer, the computer executes the method for determining the state of the power system as described in any of the above embodiments, which has the beneficial effects of the corresponding method embodiments and will not be repeated here.

[0080] It should be noted that the embodiments of the present application can be further described in the following manner:

[0081] It is understandable that before using the technical solutions of each embodiment of the present disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved will be informed to the user in an appropriate manner, and the user's authorization will be obtained.

[0082] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly remind the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can independently choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0083] As an optional but non-limiting implementation, in response to receiving the user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0084] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0085] A person skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present application is limited to these examples. In line with the concept of the present application, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.

[0086] In addition, to simplify the description and discussion, and in order not to make the embodiments of the present application difficult to understand, the known power supply / ground connection with the integrated circuit (IC) chip and other components may or may not be shown in the provided drawings. In addition, the device can be shown in the form of a block diagram to avoid making the embodiments of the present application difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform to be implemented in the embodiments of the present application (that is, these details should be fully within the scope of understanding of those skilled in the art). In the case of elaborating specific details (e.g., circuits) to describe exemplary embodiments of the present application, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details or when these specific details are changed. Therefore, these descriptions should be considered to be illustrative rather than restrictive.

[0087] Although the present application has been described in conjunction with specific embodiments of the present application, many replacements, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.

[0088] The embodiments of the present application are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the present application. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the protection scope of the present application.

Claims

1. A method for determining the state of a power system, characterized in that: include: Obtain various power data within a preset time period; Converting the plurality of power data into a plurality of graph structures, wherein each graph structure includes a plurality of nodes and a plurality of edges; Inputting each graph structure into a pre-trained state determination model in turn, extracting features of the edge through the state determination model to obtain edge features, determining a weight coefficient corresponding to the edge feature based on the node corresponding to the edge and the edge feature, and determining a node feature corresponding to the node based on the node corresponding to the edge, the edge feature and the weight coefficient; Based on the node features corresponding to the multiple graph structures, the state of the power system within a preset time period corresponding to the multiple graph structures is output through the state determination model.

2. The method according to claim 1, characterized in that: The determining, based on the node corresponding to the edge and the edge feature, a weight coefficient corresponding to the edge feature comprises: The weight coefficient is determined by the following formula: Among them, α i,j is the weight coefficient, is the node feature of the i-th node in the k-th layer, is the node feature of the jth node in the kth layer, e ij is the edge feature of the edge connecting node i and node j, d is the size of the embedding layer feature in the state determination model, W1 is the trainable first parameter matrix, W2 is the trainable second parameter matrix, W3 is the trainable third parameter matrix, softmax represents the conversion of the input value into a probability value whose sum is 1, and T represents the transpose of the matrix.

3. The method according to claim 1, characterized in that The determining, based on the node corresponding to the edge, the edge feature and the weight coefficient, the node feature corresponding to the node comprises: The node characteristics are determined by the following formula: in, is the node feature, α i,j is the weight coefficient, is the node feature of the i-th node in the k-th layer, is the node feature of the jth node in the kth layer, e ij is the edge feature of the edge connecting node i and node j, W4 is the trainable fourth parameter matrix, W5 is the trainable fifth parameter matrix, W3 is the trainable third parameter matrix, Indicates that the jth node is the neighbor node of the ith node, Represents all neighbor nodes of the i-th node.

4. The method according to claim 1, characterized in that The loss function used to train the state determination model is determined by the following formula: in, is the loss function, is the state estimation result of the state determination model at the i-th node, y i is the actual result of the state determination model at the i-th node, and N is the total number of nodes.

5. The method according to claim 1, characterized in that Before inputting the graph structure into a pre-trained state determination model, the method includes: The graph structure is preprocessed.

6. The method according to claim 5, characterized in that The preprocessing includes normalization processing, and the preprocessing of the graph structure includes: Classifying the nodes and edges in the graph structure according to predetermined types; For each type of node, determine a first maximum value and a first minimum value in the numerical values ​​corresponding to the node of the type, and calculate a first difference between the first maximum value and the first minimum value; respectively calculate a second difference between each node of the type and the first minimum value; calculate a first quotient of the second difference and the first difference, and determine the node after the normalization processing based on the first quotient; For each type of edge, determine the second maximum value and the second minimum value in the numerical values ​​corresponding to the edge of that type, and calculate the third difference between the second maximum value and the second minimum value; respectively calculate the fourth difference between each edge of that type and the second minimum value; calculate the second quotient of the fourth difference and the third difference, and determine the edge after the normalization processing based on the second quotient value.

7. The method according to claim 1, characterized in that The pre-training method of the state determination model includes: Acquire a plurality of historical power data, and convert the plurality of historical power data into a plurality of historical graph structures; Performing a preprocessing operation on the multiple history graph structures; Dividing the plurality of history graph structures after the preprocessing operation into a training set and a test set according to a preset ratio; Initializing parameters of the state determination model, and iteratively training the state determination model using the training set; The state determination model that has been iteratively trained is tested based on the test set to obtain a test accuracy. When the test accuracy is greater than a preset accuracy, a trained state determination model is obtained.

8. A device for determining the state of an electric power system, characterized in that: include: An acquisition module is configured to acquire a variety of power data within a preset time period; A conversion module, configured to convert the plurality of power data into a plurality of graph structures, wherein each graph structure includes a plurality of nodes and a plurality of edges; A first determination module is configured to input each graph structure into a pre-trained state determination model in turn, extract features of the edge through the state determination model to obtain edge features, determine a weight coefficient corresponding to the edge feature based on the node corresponding to the edge and the edge feature, and determine a node feature corresponding to the node based on the node corresponding to the edge, the edge feature and the weight coefficient; The output module is configured to output the state of the power system within a preset time period corresponding to the multiple graph structures through the state determination model based on the node features corresponding to the multiple graph structures.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 7 is implemented.

10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 7.

Citation Information

Cited By

  • Power failure area prediction method and power failure sensitive user identification method and system

    CN120745949A