A method, device, equipment and storage medium for predicting power grid load

By constructing the grid diagram and using the trained grid load prediction model, the graph calculation problem of grid load prediction in the grid diagram is solved, the prediction accuracy is improved, and efficient grid load prediction is achieved.

CN118100151BActive Publication Date: 2025-02-18STATE GRID JIANGSU ELECTRIC POWER CO LTD NANJING POWER SUPPLY COMPANY +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410209170.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-26
Publication Date
2025-02-18
Estimated Expiration
2044-02-26

AI Technical Summary

Technical Problem

The prior art is difficult to effectively solve the graph calculation problem of grid load prediction in power grid diagrams, resulting in low prediction accuracy.

Method used

By obtaining real-time data of the power grid, and inputting it into the trained target grid load prediction model, the node matrix embedded representation between the target neighboring nodes is obtained, thereby determining the grid load value.

Benefits of technology

The accuracy of grid load prediction is improved, and the relationship between node characteristics can be better reflected and the nodes can be achieved, so as to achieve grid load prediction with high accuracy and low complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118100151B_ABST
    Figure CN118100151B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device, equipment and storage medium for predicting power grid load. The method comprises: obtaining a target power grid diagram corresponding to real-time power grid data; inputting the target power grid diagram into a target power grid load prediction model to obtain a target node matrix embedding representation between target adjacent nodes corresponding to the target power grid diagram, wherein the target power grid load prediction model is obtained by iteratively training a to-be-trained model with a training set; determining the power grid load value between target adjacent nodes according to the target node matrix embedding representation between target adjacent nodes corresponding to the target power grid diagram, and through the technical solution of the present invention, the accuracy of predicting power grid load can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of power grid technology, and in particular to a power grid load prediction method, device, equipment and storage medium. Background Art

[0002] Graph computing is a technology dedicated to the complete characterization, calculation and analysis of everything and their relationships in the objective world. In the era of big data, graph data is needed in various application scenarios, such as relationship graphs of social and e-commerce platforms, road graphs, circuit graphs, knowledge structures, water and electricity networks, natural weather maps, industry and food chain maps, etc. The power infrastructure is composed of ultra-large-scale power grid equipment nodes. If the power grid equipment is regarded as nodes and the power grid connections are regarded as edges, a complex power grid graph can be naturally constructed. Due to the different node types, attributes and meanings of each edge in the power grid, the power grid graph has heterogeneous node attributes and heterogeneous node interactions, thus forming a complex mapping logic in a high-order heterogeneous space.

[0003] Graph representation learning is a technology that converts graph data into low-dimensional dense vector representations while ensuring that the properties of the graph data are matched in the vector space. The representation of graph data can be at the node level or the full graph level, where node representation learning has always been the main focus of graph representation learning. Its main goal is to preserve the topological information of the graph as much as possible and to fully consider the structure of the graph when mapping the nodes to vector representations. Graph representation learning is mainly divided into representation learning based on graph structure and representation learning based on graph features. Representation learning based on graph structure only relies on the topological structure of the graph, only provides a single representation of the graph structure, and lacks representation of node feature information.

[0004] Therefore, how to solve the graph calculation problem of power grid load forecasting in the power grid diagram and thus improve the accuracy of power grid load forecasting has become a research focus. Summary of the invention

[0005] The embodiments of the present invention provide a method, device, equipment and storage medium for predicting power grid load, which can improve the accuracy of predicting power grid load.

[0006] According to one aspect of the present invention, a method for predicting power grid load is provided, comprising:

[0007] Obtain the target power grid diagram corresponding to the real-time data of the power grid;

[0008] Inputting the target power grid graph into a target power grid load prediction model to obtain a target node matrix embedding representation between target adjacent nodes corresponding to the target power grid graph, wherein the target power grid load prediction model is obtained by iteratively training a model to be trained using a training set;

[0009] The grid load value between the target adjacent nodes is determined according to the target node matrix embedding representation between the target adjacent nodes corresponding to the target power grid diagram.

[0010] According to another aspect of the present invention, a power grid load prediction device is provided, the power grid load prediction device comprising:

[0011] An acquisition module is used to acquire a target power grid diagram corresponding to real-time power grid data;

[0012] An obtaining module is used to input the target power grid diagram into a target power grid load prediction model to obtain a target node matrix embedding representation between target adjacent nodes corresponding to the target power grid diagram, wherein the target power grid load prediction model is obtained by iteratively training a model to be trained using a training set;

[0013] The determination module is used to determine the power grid load value between the target adjacent nodes according to the target node matrix embedding representation between the target adjacent nodes corresponding to the target power grid diagram.

[0014] According to another aspect of the present invention, there is provided an electronic device, the electronic device comprising:

[0015] at least one processor; and

[0016] a memory communicatively connected to the at least one processor; wherein,

[0017] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the power grid load forecasting method described in any embodiment of the present invention.

[0018] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the power grid load forecasting method described in any embodiment of the present invention when executed.

[0019] The embodiment of the present invention obtains a target power grid diagram corresponding to real-time power grid data; inputs the target power grid diagram into a target power grid load prediction model to obtain a target node matrix embedding representation between target adjacent nodes corresponding to the target power grid diagram, wherein the target power grid load prediction model is obtained by iteratively training a to-be-trained model with a training set; determines the power grid load value between target adjacent nodes according to the target node matrix embedding representation between target adjacent nodes corresponding to the target power grid diagram, thereby solving the graph calculation problem of power grid load prediction in the power grid diagram and improving the accuracy of predicting power grid load.

[0020] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0022] Figure 1 is a flow chart of a power grid load prediction method in Embodiment 1 of the present invention;

[0023] Figure 2 is a flow chart of a method for obtaining a target power grid load prediction model in Embodiment 1 of the present invention;

[0024] Figure 3 is a schematic diagram of power grid load prediction accuracy in the first embodiment of the present invention;

[0025] Figure 4 It is a structural schematic diagram of a power grid load prediction device in Embodiment 2 of the present invention;

[0026] Figure 5 It is a structural schematic diagram of an electronic device in Embodiment 3 of the present invention. DETAILED DESCRIPTION

[0027] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0029] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0030] Embodiment 1

[0031] Figure 1 1 is a flow chart of a method for predicting power grid load in the first embodiment of the present invention. This embodiment is applicable to the case of predicting power grid load. The method can be executed by the power grid load prediction device in the embodiment of the present invention. The device can be implemented in software and / or hardware. Figure 1 As shown, the method specifically comprises the following steps:

[0032] S110, obtaining a target power grid diagram corresponding to the real-time power grid data.

[0033] The real-time grid data includes: grid topology, attribute information of each power generation equipment in the grid, real grid load between different power generation equipment, grid lines and other data. The attribute information of the power generation equipment includes: identification information, voltage, current and power of the power generation equipment. The target grid diagram is the grid diagram generated by the real-time grid data.

[0034] Specifically, after receiving the instruction for predicting the power grid load sent by the server, real-time power grid data can be collected in real time, and the corresponding target power grid diagram can be constructed based on the real-time data. Different devices in the power grid can be represented as nodes in the target power grid diagram, and the lines in the power grid can be represented as edges in the target power grid diagram. The actual power grid load values ​​between different devices can represent the weights between the nodes.

[0035] S120, inputting the target power grid diagram into the target power grid load prediction model, obtaining a target node matrix embedding representation between target adjacent nodes corresponding to the target power grid diagram, wherein the target power grid load prediction model is obtained by iteratively training the model to be trained through the training set.

[0036] Among them, the target power grid load prediction model is a prediction model obtained by iteratively training the model to be trained with the training set, wherein the training set can be obtained based on the historical power grid diagram, and the model to be trained can be a neighbor-aware graph neural network model. The target adjacent nodes are the adjacent nodes corresponding to the unknown power grid load in the target power grid diagram, that is, the power grid load between the target adjacent nodes is unknown. The target power grid diagram is input into the target power grid load prediction model, and the power grid load between the target adjacent nodes in the target power grid diagram can be predicted by the power grid load between the nodes in the known target power grid diagram. The target node matrix embedding representation is the output result of the target power grid load prediction model, and the target node matrix embedding representation output by the target power grid load prediction model is the node matrix embedding representation with the highest accuracy.

[0037] Specifically, the target power grid graph is input into the target power grid load forecasting model, and the output result is determined as a target node matrix embedding representation between target adjacent nodes corresponding to the target power grid graph.

[0038] S130, determining the power grid load value between the target adjacent nodes according to the target node matrix embedding representation between the target adjacent nodes corresponding to the target power grid diagram.

[0039] The power grid load value between target adjacent nodes is the predicted power grid load value between target adjacent nodes.

[0040] Specifically, the target node matrix embedding representation between the target adjacent nodes corresponding to the target power grid diagram and the inner product of the transposed matrix of the target node matrix embedding representation are calculated to obtain the power grid load value between the target adjacent nodes.

[0041] By acquiring a target power grid diagram corresponding to real-time power grid data; inputting the target power grid diagram into a target power grid load prediction model, obtaining a target node matrix embedding representation between target adjacent nodes corresponding to the target power grid diagram, wherein the target power grid load prediction model is obtained by iteratively training a to-be-trained model with a training set; determining the power grid load value between target adjacent nodes according to the target node matrix embedding representation between target adjacent nodes corresponding to the target power grid diagram, the feature representation learning capability of the power grid diagram can be improved, and power grid load prediction with high accuracy and low complexity can be achieved.

[0042] Optionally, the target power grid load prediction model is obtained by iteratively training a model to be trained with a training set, including:

[0043] Acquire a training set, wherein the training set includes: at least one training sample, the training sample including a subgraph of a historical power grid diagram and real power grid load values ​​between training adjacent nodes corresponding to the subgraph of the historical power grid diagram;

[0044] Inputting a subgraph of the historical power grid graph in the training set into the to-be-trained model, obtaining a training node matrix embedding representation between training adjacent nodes corresponding to the subgraph of the historical power grid graph, and obtaining a predicted power grid load value between training adjacent nodes according to the training node matrix embedding representation;

[0045] The parameters of the model to be trained are trained according to the objective function generated by the predicted power grid load value and the actual power grid load value to obtain a target power grid load prediction model.

[0046] The historical power grid diagram can be constructed based on the historical power grid data, and a training set can be obtained based on the historical power grid diagram, wherein the training samples in the training set include a subgraph of the historical power grid diagram and the actual power grid load values ​​between the training adjacent nodes corresponding to the subgraph of the historical power grid diagram. The subgraph includes the training adjacent nodes and the neighbor node set of the training adjacent nodes.

[0047] The model to be trained can be a neighbor-aware graph neural network model. The embedding representation of the training node matrix is ​​the output result of the model to be trained in each round of iterative training. The parameters of the model to be trained include an initialization parameter set and a parameter set to be optimized, wherein the parameter set to be optimized includes: node feature matrix and trainable weights; the initialization parameter set includes: node feature matrix, trainable weights, adjacency matrix, feature space dimension, iteration control variable, iteration upper limit threshold, learning rate, regularization factor and convergence termination threshold. The objective function is a target loss function, and the parameters of the model to be trained can be trained based on the target loss function.

[0048] Specifically, a historical power grid map is constructed according to historical power grid data, a training set is obtained according to the historical power grid map, the training samples in the training set are input into the model to be trained, information propagation and learning are performed through node features, and the training node matrix embedding representation obtained in each round of training is obtained, and then the predicted power grid load value between training adjacent nodes is obtained, and the parameters of the model to be trained are iteratively trained based on the objective function, the predicted power grid load value between training adjacent nodes, and the actual power grid load value between training adjacent nodes until the training is completed, and the target power grid load prediction model is obtained.

[0049] It should be noted that before training begins, the parameters of the model to be trained need to be initialized, for example, the node feature matrix X, the learnable weight W, the adjacency matrix A, the feature space dimension f, the iteration control variable K, and the iteration upper limit threshold K max, learning rate is α, regularization factor κ, and convergence termination threshold is τ, where: feature space dimension f is a variable of feature dimension, and its initial value is a positive integer, such as 128; the node feature matrix X is initialized to be a matrix of N rows and f columns based on the number of nodes N in the training set Λ and the feature space dimension f, where each element is initialized to a random number in the open interval (0, 0.05). In the power grid diagram, the node feature matrix can be set according to the attributes of the subgraph nodes in the training set, such as voltage, current, and power. The attribute information is used as the column of the node feature, and each row represents the attribute value of a node; the learnable weight W is initialized to extract meaningful information during the propagation process; the adjacency matrix A is initialized to be a two-dimensional matrix used to represent the connection relationship between nodes. In the power grid diagram, the connection relationship between nodes usually represents the power grid load value between power generation equipment; the iteration control variable K=0 is initialized, and K is a variable that controls the iteration process; the iteration upper limit threshold K max It is the upper limit of the number of iterations in the extraction process, K max is a positive integer, such as 400; the learning rate α is a constant for optimizing the training step size of each parameter to be optimized in the optimization parameter set during the control iteration process, and is initialized to a positive number less than 0.1, such as 0.05; the regularization factor κ is a regularization effect constant for controlling the interaction strength between adjacent nodes during the control iteration process, and is initialized to a positive number less than 0.1, such as 0.02; the convergence termination threshold τ is a threshold parameter for judging whether the training set has converged during the extraction iteration process, and it can be initialized to a very small positive number, such as 0.001.

[0050] It should be noted that a power grid diagram is described by G = (V, E), and the sub-graphs are similar, where V = {v i |i=1,2,...,N} represents a set of N nodes, E={e ij |v i ,v j ∈V} represents a set of m edges, each edge in E connects two nodes v i ,v j ∈V, the connection strength between two nodes, that is, the interaction prediction value between two nodes can be expressed by the adjacency matrix A N×N =[a ij ] indicates that, among them,

[0051]

[0052] If there is a connection relationship between two nodes, the connection strength between the two nodes represents the grid load value a between the power generation equipment. ij, if there is no connection relationship, the grid load value is 0. Each node is defined by its features and neighbor nodes. The purpose of the model to be trained (neighbor-aware graph neural network model) is to learn an embedded state h i ∈R f , the node vector embedding representation contains the information of neighboring nodes, which can be used to obtain the information of neighboring nodes for fusion calculation. When using the model to be trained for embedding representation learning, its main goal is to use weighted average to calculate the features of all neighboring nodes and its own nodes, and give higher weights to nodes with low degrees. The propagation of the node matrix embedding representation can be:

[0053]

[0054] Among them, H (l) represents the node matrix embedding representation of the lth layer, H (0) Represents the node feature matrix X when l = 0, that is, H (0) =X, which is also the initialization node feature matrix. corresponds to a symmetric normalized adjacency matrix, where represents the adjacency matrix A with self-connection, I is the identity matrix, D represents the degree matrix of (A+I), W (l) represents the trainable weight used to extract meaningful information during the propagation process, and σ() represents the activation function.

[0055] The parameters initialized by the model to be trained are used as the initial input variables for the propagation embedding representation learning of the model to be trained, and the node characteristics are used for information propagation and learning to obtain the embedding representation of the training node matrix obtained in each round of training, and then the predicted power grid load value between adjacent nodes in the training is obtained.

[0056] By obtaining a training set, a subgraph of the historical power grid graph in the training set is input into the model to be trained, and a training node matrix embedding representation between training adjacent nodes corresponding to the subgraph of the historical power grid graph is obtained, and the predicted power grid load value between training adjacent nodes is obtained according to the training node matrix embedding representation. The parameters of the model to be trained are trained according to the objective function generated by the predicted power grid load value and the real power grid load value to obtain a target power grid load prediction model. The graph neural network model can be combined with the power grid graph, and the training node matrix embedding representation can be obtained through propagation embedding learning in the graph neural network, which can better reflect the characteristics of the nodes and the relationship between the nodes, thereby improving the accuracy of model prediction.

[0057] Optionally, the predicted power grid load value between adjacent training nodes is obtained according to the training node matrix embedding representation, including:

[0058] Obtaining a transposed matrix corresponding to the training node matrix embedding representation according to the training node matrix embedding representation;

[0059] The predicted power grid load value between adjacent training nodes is determined according to the training node matrix embedding representation and the transposed matrix corresponding to the training node matrix embedding representation.

[0060] Specifically, according to the training node matrix embedding representation H, the transposed matrix H corresponding to the training node matrix embedding representation is obtained. T , then embed the representation H and the transposed matrix H according to the training node matrix T The inner product is used to calculate the predicted grid load value between adjacent training nodes.

[0061] By determining the predicted power grid load value between training adjacent nodes according to the training node matrix embedding representation and the transposed matrix corresponding to the training node matrix embedding representation, the accuracy of obtaining the predicted power grid load value between adjacent nodes can be improved.

[0062] Optionally, the objective function is:

[0063]

[0064] Among them, ε is the loss value of the objective function, node i and node j are training adjacent nodes, and a ij is the actual grid load value between node i and node j, is the predicted grid load value between node i and node j, κ is the regularization factor, Λ is the training set, N(i) is the set of neighboring nodes directly connected to node i, N(j) is the set of neighboring nodes directly connected to node j, h i is the node vector embedding representation of node i, h j is the node vector embedding representation of node j.

[0065] Among them, the objective function is the target loss function, which is used to train the parameters of the model to be trained. The objective function is based on the Euclidean distance and uses the neighbor-aware regularization operator to constrain the optimization process of training the parameters of the model to be trained. It should be noted that for a node, the node vector embedding representation can be:

[0066]

[0067] Among them, N(i) is the set of neighbor nodes directly connected to node i, and N(j) is the set of neighbor nodes directly connected to node j. represents symmetric normalization. H corresponding to node i (l) The vector of H corresponding to node j (l) , and ReLU() is the activation function.

[0068] In the process of propagation of graph neural network models in the prior art, node vector embedding representations from neighboring nodes are recursively aggregated to extract structural proximity information, so nodes that share similarity in the relationship network are often adjacent or directly connected. The objective function in this embodiment uses the Euclidean distance to estimate the error between the actual grid load value and the predicted grid load value, and can aggregate neighbor node information through the interaction strength of adjacent node pairs. The regularization factor in the objective function can perceive the neighbor information to reflect the inherent symmetry of the grid graph, thereby improving the accuracy and efficiency of training the parameters of the model to be trained.

[0069] Optionally, training the parameters of the model to be trained according to an objective function generated by the predicted grid load value and the actual grid load value includes:

[0070] Obtaining the gradient of each parameter in the set of parameters to be optimized in the model to be trained according to the back propagation of the objective function, wherein the set of parameters to be optimized includes: a node feature matrix and a trainable weight;

[0071] Each parameter in the set of parameters to be optimized is iteratively updated according to the gradient of each parameter, wherein the iterative updating method is:

[0072]

[0073]

[0074]

[0075] Among them, m t is the first-order moment estimate, β 1 is the exponential decay rate of the first-order moment estimate, g t is the gradient of any parameter in the parameter set to be optimized at the tth time step, For m t The corrected value, β 1 Correction factor, v t is the second-order moment estimate, β 2 is the exponential decay rate of the second-order moment estimate, is the square of the gradient at the tth time step, For v t The corrected value, β 2 The correction coefficient is θ, θ is any parameter in the parameter set to be optimized, θ = {X, W}, X is the node feature matrix, W is the trainable weight, α is the learning rate, and ξ is the preset value.

[0076] The set of parameters to be optimized includes: node feature matrix and trainable weights. ξ is a preset value, which is a very small value used to avoid the situation where the divisor is 0. t is the first-order distance estimate, that is, the average value of the historical gradient, v t is the second-order moment estimate, that is, the average of the squared historical gradients. 1 is the exponential decay rate of the first-order moment estimate, which is used to control the influence of the historical gradient on the current gradient. 2 is the exponential decay rate of the second-order moment estimate, which is used to control the influence of the historical squared gradient on the current squared gradient.

[0077] Specifically, according to the objective function, the gradients of the node feature matrix and the trainable weights with respect to the objective function are calculated through back propagation, and the node feature matrix and the trainable weights are updated using the Adam (Adaptive Moment Estimation) method according to the calculated gradients and learning rates, so as to help the model to be trained converge to the optimal solution faster and minimize the loss value of the objective function.

[0078] Optionally, training the parameters of the model to be trained according to the objective function generated by the predicted power grid load value and the actual power grid load value to obtain a target power grid load prediction model includes:

[0079] Training the parameters of the model to be trained based on the objective function to obtain a first model;

[0080] Acquire a test set according to a historical power grid diagram, wherein the test set is different from the training set;

[0081] Performing iterative testing on the first model based on the test set to obtain iterative control variables corresponding to the current round of testing;

[0082] If the iterative control variable corresponding to the current round of testing is greater than or equal to the iteration upper limit threshold, it is determined that the objective function converges on the training set, and the first model after convergence is determined as the target power grid load prediction model.

[0083] Among them, the first model is a model that is trained by the training set. The test set includes: at least one test sample, each test sample includes: a subgraph of the historical power grid diagram and the actual power grid load value between the test adjacent nodes corresponding to the subgraph of the historical power grid diagram, and the test set is different from the samples in the training set, that is, the samples do not intersect with the nodes in the samples in the training set. It should be noted that when testing, the iterative control variables in the first model do not need to be initialized. At the same time, when testing, each round of testing can be regarded as further training of the first model and further optimization of each parameter to be optimized in the model. Each time the iterative control variable is iterated, 1 can be accumulated on the iterative control variable.

[0084] Specifically, the parameters of the model to be trained are trained and optimized based on the objective function and the training set to obtain the first model, the test set is obtained according to the historical power grid diagram, and the first model is iteratively tested based on the test samples in the test set to obtain the iterative control variables corresponding to the current round, that is, the iterative control variables corresponding to the current round must be obtained in each iteration, and it is determined whether the iterative control variables corresponding to the current round test are greater than or equal to the iteration upper limit threshold. If the iterative control variables corresponding to the current round test are greater than or equal to the iteration upper limit threshold, it is determined that the objective function converges on the training set, and the converged first model is determined as the target power grid load forecasting model. At this time, each parameter to be optimized in the target power grid load forecasting model has been optimized through the test set. For example, if the iterative control variable K is greater than or equal to the iteration upper limit threshold K max , then it is determined that ε converges on Λ, and the target power grid load prediction model is obtained.

[0085] Optionally, also include:

[0086] If the iterative control variable corresponding to the current round of testing is less than the iterative upper limit threshold, the target evaluation index corresponding to the current round of testing is obtained;

[0087] If the absolute value of the difference between the target evaluation index corresponding to the current round of testing and the target evaluation index obtained in the previous round of testing is less than or equal to the convergence termination threshold, it is determined that the objective function converges on the training set, and the first model after convergence is determined as the target power grid load prediction model.

[0088] Among them, the target evaluation index can be the root mean square error (RMSE). The performance of the model is measured by the target evaluation index. RMSE can well reflect the prediction accuracy of the model. The smaller the value, the better the prediction accuracy, and vice versa.

[0089] Specifically, if the iterative control variable corresponding to the current round of testing is less than the iterative upper limit threshold, the target evaluation index corresponding to the current round of testing is calculated according to the predicted power grid load value and the actual power grid load value between adjacent nodes:

[0090]

[0091] Among them, RMSE is the target evaluation index value, that is, the root mean square error, a ij is the actual grid load value, is the predicted grid load value, and Ψ is the test set.

[0092] Specifically, if the absolute value of the difference between the RMSE value of the target evaluation index corresponding to the current round of testing and the RMSE value of the target evaluation index obtained in the previous round of testing is less than or equal to the convergence termination threshold τ, it is determined that ε converges on Λ, and the first model after convergence is determined as the target power grid load prediction model.

[0093] In a specific example, Figure 2 The invention is a flowchart of a method for obtaining a target power grid load prediction model in the first embodiment of the present invention, wherein a model to be trained and a training set are obtained, and parameters in the model to be trained are initialized; based on the training set and the initialized node feature matrix, the adjacency matrix and the trainable weights, propagation embedding learning is performed on the model to be trained to obtain a training node matrix embedding representation between training adjacent nodes, and a predicted power grid load value between training adjacent nodes is obtained according to the training node matrix embedding representation; at the same time, an objective function is constructed according to the training set, a regularization factor, a real power grid load value between training adjacent nodes and a predicted power grid load value between training adjacent nodes; based on the objective function, a gradient of each parameter to be optimized in a set of parameters to be optimized in the model to be trained is calculated; each parameter to be optimized is optimized using the Adam algorithm and the gradient of each parameter to be optimized, wherein the parameters to be optimized are the node feature matrix and the trainable weights; and a first model is obtained after the training of the training set is completed; a test set is obtained, and based on the test set, a test set is obtained. The test set performs iterative testing on the first model. If the iterative control variable of the current round of iterative testing is greater than or equal to the iterative upper limit threshold, it means that the model has converged, and the converged first model is determined as the target power grid load forecasting model; if the iterative control variable of the current round of iterative testing is less than the iterative upper limit threshold, the target evaluation index of the current round of testing is calculated, that is, the RMSE value of the current round of testing is calculated. If the absolute value of the difference between the RMSE value of the current round of testing and the RMSE value obtained in the previous round of testing is less than or equal to the convergence termination threshold, it means that the model has converged, and the converged first model is determined as the target power grid load forecasting model; if the absolute value of the difference between the RMSE value of the current round of testing and the RMSE value obtained in the previous round of testing is greater than the convergence termination threshold, it is determined whether all test samples in the test set have been tested. If all tests are completed, the training of the model to be trained is restarted. If the test is not complete, the next round of iterative testing is continued to obtain the iterative control variables for the next round of testing.

[0094] In another specific example, the target power grid load forecasting model (a graph neural network model with neighbor awareness) and the graph neural network model without neighbor awareness are used to forecast the power grid load. Figure 3 It is a schematic diagram of the accuracy of power grid load prediction in Example 1 of the present invention. The first case in the figure represents the result of power grid load prediction using a graph neural network model without adding neighbor perception, and the second case represents the result of power grid load prediction using a target power grid load prediction model. The accuracy of the second case is significantly higher than that of the first case.

[0095] The technical solution of this embodiment is to obtain a target power grid diagram corresponding to real-time power grid data; input the target power grid diagram into a target power grid load prediction model to obtain a target node matrix embedding representation between target adjacent nodes corresponding to the target power grid diagram, wherein the target power grid load prediction model is obtained by iteratively training a to-be-trained model with a training set; determine the power grid load value between target adjacent nodes according to the target node matrix embedding representation between target adjacent nodes corresponding to the target power grid diagram, thereby solving the graph calculation problem of power grid load prediction in the power grid diagram and improving the accuracy of predicting power grid load.

[0096] Embodiment 2

[0097] Figure 4 Schematic diagram of the structure of a power grid load prediction device in the second embodiment of the present invention. This embodiment can be applied to the case of predicting power grid load. The device can be implemented in software and / or hardware. The device can be integrated in any device that provides the function of power grid load prediction, such as Figure 4 As shown, the power grid load prediction device specifically includes: an acquisition module 210, a obtaining module 220 and a determination module 230.

[0098] Wherein, the acquisition module 210 is used to acquire the target power grid diagram corresponding to the real-time power grid data;

[0099] Obtaining module 220, for inputting the target power grid diagram into a target power grid load prediction model, and obtaining a target node matrix embedding representation between target adjacent nodes corresponding to the target power grid diagram, wherein the target power grid load prediction model is obtained by iteratively training a to-be-trained model with a training set;

[0100] The determination module 230 is used to determine the power grid load value between the target adjacent nodes according to the target node matrix embedding representation between the target adjacent nodes corresponding to the target power grid diagram.

[0101] Optionally, the obtaining module is specifically used for:

[0102] Acquire a training set, wherein the training set includes: at least two training samples, the training samples including a subgraph of a historical power grid diagram and real power grid load values ​​between training adjacent nodes corresponding to the subgraph of the historical power grid diagram;

[0103] Inputting a subgraph of the historical power grid graph in the training set into the to-be-trained model, obtaining a training node matrix embedding representation between training adjacent nodes corresponding to the subgraph of the historical power grid graph, and obtaining a predicted power grid load value between training adjacent nodes according to the training node matrix embedding representation;

[0104] The parameters of the model to be trained are trained according to the objective function generated by the predicted power grid load value and the actual power grid load value to obtain a target power grid load prediction model.

[0105] Optionally, the objective function is:

[0106]

[0107] Among them, ε is the loss value of the objective function, node i and node j are training adjacent nodes, and a ij is the actual grid load value between node i and node j, is the predicted grid load value between node i and node j, κ is the regularization factor, Λ is the training set, N(i) is the set of neighboring nodes directly connected to node i, N(j) is the set of neighboring nodes directly connected to node j, h i is the node vector embedding representation of node i, h j is the node vector embedding representation of node j.

[0108] Optionally, the obtaining module is specifically used for:

[0109] Obtaining the gradient of each parameter in the set of parameters to be optimized in the model to be trained according to the back propagation of the objective function, wherein the set of parameters to be optimized includes: a node feature matrix and a trainable weight;

[0110] Each parameter in the set of parameters to be optimized is iteratively updated according to the gradient of each parameter, wherein the iterative updating method is:

[0111]

[0112]

[0113]

[0114] Among them, m t is the first-order moment estimate, β 1 is the exponential decay rate of the first-order moment estimate, g t is the gradient of any parameter in the parameter set to be optimized at the tth time step, For m t The corrected value, β 1 Correction factor, v t is the second-order moment estimate, β 2 is the exponential decay rate of the second-order moment estimate, is the square of the gradient at the tth time step, For v t The corrected value, β 2 The correction coefficient is θ, θ is any parameter in the parameter set to be optimized, θ = {X, W}, X is the node feature matrix, W is the trainable weight, α is the learning rate, and ξ is the preset value.

[0115] Optionally, the obtaining module is specifically used for:

[0116] Training the parameters of the model to be trained based on the objective function to obtain a first model;

[0117] Acquire a test set according to a historical power grid diagram, wherein the test set is different from the training set;

[0118] Performing iterative testing on the first model based on the test set to obtain iterative control variables corresponding to the current round of testing;

[0119] If the iterative control variable corresponding to the current round of testing is greater than or equal to the iteration upper limit threshold, it is determined that the objective function converges on the training set, and the first model after convergence is determined as the target power grid load prediction model.

[0120] Optionally, the obtaining module is further used for:

[0121] If the iterative control variable corresponding to the current round of testing is less than the iterative upper limit threshold, the target evaluation index corresponding to the current round of testing is obtained;

[0122] If the absolute value of the difference between the target evaluation index corresponding to the current round of testing and the target evaluation index obtained in the previous round of testing is less than or equal to the convergence termination threshold, it is determined that the objective function converges on the training set, and the first model after convergence is determined as the target power grid load prediction model.

[0123] Optionally, the obtaining module is specifically used for:

[0124] Obtaining a transposed matrix corresponding to the training node matrix embedding representation according to the training node matrix embedding representation;

[0125] The predicted power grid load value between adjacent training nodes is determined according to the training node matrix embedding representation and the transposed matrix corresponding to the training node matrix embedding representation.

[0126] The above-mentioned product can execute the method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0127] Embodiment 3

[0128] Figure 5: is a structural diagram of an electronic device in Embodiment 3 of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0129] like Figure 5 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, ROM 12 and RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0130] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0131] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a power grid load forecasting method.

[0132] In some embodiments, the power grid load forecasting method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the power grid load forecasting method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the power grid load forecasting method in any other appropriate manner (e.g., by means of firmware).

[0133] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

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

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

[0136] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0137] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0138] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0139] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0140] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for predicting power grid load, characterized in that: include: Obtain the target power grid diagram corresponding to the real-time data of the power grid; Inputting the target power grid graph into a target power grid load prediction model to obtain a target node matrix embedding representation between target adjacent nodes corresponding to the target power grid graph, wherein the target power grid load prediction model is obtained by iteratively training a model to be trained using a training set; Determine the power grid load value between the target adjacent nodes according to the target node matrix embedding representation between the target adjacent nodes corresponding to the target power grid graph; The target power grid load prediction model is obtained by iteratively training the model to be trained by the training set, including: Acquire a training set, wherein the training set includes: at least one training sample, the training sample including a subgraph of a historical power grid diagram and real power grid load values ​​between training adjacent nodes corresponding to the subgraph of the historical power grid diagram; Inputting a subgraph of the historical power grid graph in the training set into the to-be-trained model, obtaining a training node matrix embedding representation between training adjacent nodes corresponding to the subgraph of the historical power grid graph, and obtaining a predicted power grid load value between training adjacent nodes according to the training node matrix embedding representation; Training the parameters of the model to be trained according to the objective function generated by the predicted power grid load value and the actual power grid load value to obtain a target power grid load prediction model; The objective function is: ; in, is the objective function loss value, node With Node To train adjacent nodes, For Node With Node The actual grid load value between For Node With Node The predicted grid load value between is the regularization factor, is the training set, For the node The set of directly connected neighbor nodes, For the node The set of directly connected neighbor nodes, For Node The node vector embedding representation of For Node Node vector embedding representation of ; The node vector embedding is expressed as: ; in, For the node The set of directly connected neighbor nodes, For the node The set of directly connected neighbor nodes, represents symmetric normalization, Corresponding to the node of The vector of Corresponding to the node of The vector of is the activation function.

2. The method according to claim 1, characterized in that Training the parameters of the model to be trained according to the objective function generated by the predicted power grid load value and the actual power grid load value includes: Obtaining the gradient of each parameter in the set of parameters to be optimized in the model to be trained according to the back propagation of the objective function, wherein the set of parameters to be optimized includes: a node feature matrix and a trainable weight; Each parameter in the set of parameters to be optimized is iteratively updated according to the gradient of each parameter, wherein the iterative updating method is: ; ; ; in, is the first-order distance estimate, is the exponential decay rate of the first-order moment estimate, For any parameter in the set of parameters to be optimized, The gradient of time steps, For The corrected value, for The correction factor of is the second-order moment estimate, is the exponential decay rate of the second-order moment estimate, For the The square of the gradient of time steps, For The corrected value, for The correction factor of is any parameter in the set of parameters to be optimized. , is the node feature matrix, are trainable weights, is the learning rate, is the preset value.

3. The method according to claim 1, characterized in that The objective function generated by the predicted power grid load value and the actual power grid load value is used to train the parameters of the model to be trained to obtain a target power grid load prediction model, including: Training the parameters of the model to be trained based on the objective function to obtain a first model; Acquire a test set according to a historical power grid diagram, wherein the test set is different from the training set; Performing iterative testing on the first model based on the test set to obtain iterative control variables corresponding to the current round of testing; If the iterative control variable corresponding to the current round of testing is greater than or equal to the iteration upper limit threshold, it is determined that the objective function converges on the training set, and the first model after convergence is determined as the target power grid load prediction model.

4. The method according to claim 3, characterized in that: Also includes: If the iterative control variable corresponding to the current round of testing is less than the iterative upper limit threshold, the target evaluation index corresponding to the current round of testing is obtained; If the absolute value of the difference between the target evaluation index corresponding to the current round of testing and the target evaluation index obtained in the previous round of testing is less than or equal to the convergence termination threshold, it is determined that the objective function converges on the training set, and the first model after convergence is determined as the target power grid load prediction model.

5. The method according to claim 1, characterized in that The predicted grid load values ​​between adjacent training nodes are obtained based on the training node matrix embedding representation, including: Obtaining a transposed matrix corresponding to the training node matrix embedding representation according to the training node matrix embedding representation; The predicted power grid load value between adjacent training nodes is determined according to the training node matrix embedding representation and the transposed matrix corresponding to the training node matrix embedding representation.

6. A power grid load prediction device, characterized in that: include: An acquisition module is used to acquire a target power grid diagram corresponding to real-time power grid data; An obtaining module is used to input the target power grid diagram into a target power grid load prediction model to obtain a target node matrix embedding representation between target adjacent nodes corresponding to the target power grid diagram, wherein the target power grid load prediction model is obtained by iteratively training a model to be trained using a training set; A determination module, used for determining a power grid load value between target adjacent nodes according to a target node matrix embedding representation between target adjacent nodes corresponding to a target power grid diagram; The obtaining module is specifically used for: Acquire a training set, wherein the training set includes: at least two training samples, the training samples including a subgraph of a historical power grid diagram and real power grid load values ​​between training adjacent nodes corresponding to the subgraph of the historical power grid diagram; Inputting a subgraph of the historical power grid graph in the training set into the to-be-trained model, obtaining a training node matrix embedding representation between training adjacent nodes corresponding to the subgraph of the historical power grid graph, and obtaining a predicted power grid load value between training adjacent nodes according to the training node matrix embedding representation; Training the parameters of the model to be trained according to the objective function generated by the predicted power grid load value and the actual power grid load value to obtain a target power grid load prediction model; The objective function is: ; in, is the objective function loss value, node With Node To train adjacent nodes, For Node With Node The actual grid load value between For Node With Node The predicted grid load value between is the regularization factor, is the training set, For the node The set of directly connected neighbor nodes, For the node The set of directly connected neighbor nodes, For Node The node vector embedding representation of For Node Node vector embedding representation of ; The node vector embedding is expressed as: ; in, For the node The set of directly connected neighbor nodes, For the node The set of directly connected neighbor nodes, represents symmetric normalization, Corresponding to the node of The vector of Corresponding to the node of The vector of is the activation function.

7. The device according to claim 6, characterized in that The obtaining module is specifically used for: Obtaining the gradient of each parameter in the set of parameters to be optimized in the model to be trained according to the back propagation of the objective function, wherein the set of parameters to be optimized includes: a node feature matrix and a trainable weight; Each parameter in the set of parameters to be optimized is iteratively updated according to the gradient of each parameter, wherein the iterative updating method is: ; ; ; in, is the first-order distance estimate, is the exponential decay rate of the first-order moment estimate, For any parameter in the set of parameters to be optimized, The gradient of time steps, For The corrected value, for The correction factor of is the second-order moment estimate, is the exponential decay rate of the second-order moment estimate, For the The square of the gradient of time steps, For The corrected value, for The correction factor of is any parameter in the set of parameters to be optimized. , is the node feature matrix, are trainable weights, is the learning rate, is the preset value.

8. The device according to claim 6, characterized in that The obtaining module is specifically used for: Training the parameters of the model to be trained based on the objective function to obtain a first model; Acquire a test set according to a historical power grid diagram, wherein the test set is different from the training set; Performing iterative testing on the first model based on the test set to obtain iterative control variables corresponding to the current round of testing; If the iterative control variable corresponding to the current round of testing is greater than or equal to the iteration upper limit threshold, it is determined that the objective function converges on the training set, and the first model after convergence is determined as the target power grid load prediction model.

9. The device according to claim 6, characterized in that The obtaining module is also used for: If the iterative control variable corresponding to the current round of testing is less than the iterative upper limit threshold, the target evaluation index corresponding to the current round of testing is obtained; If the absolute value of the difference between the target evaluation index corresponding to the current round of testing and the target evaluation index obtained in the previous round of testing is less than or equal to the convergence termination threshold, it is determined that the objective function converges on the training set, and the first model after convergence is determined as the target power grid load prediction model.

10. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the power grid load forecasting method according to any one of claims 1 to 5.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the power grid load forecasting method according to any one of claims 1 to 5 when executed.

Citation Information

Patent Citations

  • Load prediction method based on wavelet feature extraction and integrated learning model

    CN115879590A

  • Power short-term load prediction method based on deep reinforcement learning and transfer learning

    CN116306229A

  • Short-term power load prediction method, device and system and storage medium

    CN117096867A