Robust prediction method and device for new energy power based on adversarial spatiotemporal network
By optimizing the output power prediction of new energy by combating the spatiotemporal network, the problem that graph neural network cannot accurately reflect node spatial correlation and model overfitting noise is solved, and a more accurate and robust new energy power prediction is achieved.
Patent Information
- Application Number
- CN202510423292.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-07
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2045-04-07
AI Technical Summary
In the prior art, graph neural networks cannot accurately reflect the real spatial correlation between new energy output nodes, and traditional power prediction models are prone to overfitting noise changes caused by extreme weather and equipment status, resulting in low accuracy of new energy output power prediction.
Adversarial space-time network is adopted to build an adjacency matrix by obtaining the in-degree and out-degree characteristics of the power system, and loss calculation is performed based on historical output characteristics and target noise, model parameters are optimized, and dynamic spatial correlation between adaptive learning nodes.
It improves the accuracy and robustness of new energy output power prediction, enhances the model's adaptability to extreme weather and equipment state changes, and improves the accuracy and generalization ability of prediction.
Smart Images

Figure CN119918760B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a method and device for robustly predicting new energy power based on an adversarial spatiotemporal network. Background Art
[0002] In related technologies, graph neural networks are used to predict renewable energy output power for power dispatching of power systems and to improve the safety and stability of power system operation. Graph neural networks use the distance between renewable energy output nodes to obtain node spatial topology information and assume that the node spatial topology information remains unchanged. However, due to the influence of various factors such as node device status and extreme weather, the close distance between renewable energy output nodes does not necessarily mean that their spatial correlation is stronger, making it impossible for the node spatial topology information to accurately reflect the true spatial correlation between nodes. In addition, traditional power prediction models are prone to overfitting power changes caused by temporary noise such as extreme weather and node device status, resulting in low accuracy in renewable energy output power prediction. Summary of the Invention
[0003] The main purpose of the embodiments of the present application is to propose a robust prediction method and device for new energy power based on an adversarial spatiotemporal network, aiming to improve the accuracy of new energy output power prediction.
[0004] To achieve the above objectives, a first aspect of an embodiment of the present application proposes a robust prediction method for new energy power based on an adversarial spatiotemporal network, the method comprising:
[0005] Acquiring initial in-degree characteristics and initial out-degree characteristics of a power system; the power system includes a plurality of new energy output nodes;
[0006] Constructing an adjacency matrix based on the initial in-degree feature and the initial out-degree feature; the adjacency matrix is a matrix representing the feature correlation between any two new energy output nodes;
[0007] Obtaining historical output characteristics of each new energy output node in the power system during a historical period;
[0008] Extracting spatiotemporal features based on the adjacency matrix and the historical output features of each new energy output node through a preset model, and predicting the predicted output power of each new energy output node in a target period based on the spatiotemporal features;
[0009] Obtaining the reference output power of each new energy output node during the target period;
[0010] Calculate the loss of noise resistance based on the predicted output power of each new energy output node, the corresponding reference output power, and the preset target to obtain the target loss;
[0011] Adjusting the model parameters of the preset model according to the target loss to obtain an adversarial spatiotemporal network;
[0012] The adversarial spatiotemporal network is used to predict the target output power of each renewable energy output node in a future period based on the target node output characteristics of each renewable energy output node in the power system in a target historical period and a target adjacency matrix, wherein the target adjacency matrix is constructed by target in-degree characteristics and target out-degree characteristics, the target in-degree characteristics are obtained by adjusting the initial in-degree characteristics based on the target loss, and the target out-degree characteristics are obtained by adjusting the initial out-degree characteristics based on the target loss.
[0013] In some embodiments, the calculation of the loss against noise according to the predicted output power of each new energy output node, the corresponding reference output power, and a preset target to obtain the target loss includes:
[0014] Acquire target anti-noise;
[0015] Performing feature extraction on the initial in-degree feature, the initial out-degree feature, and the target anti-noise to obtain a target hidden feature vector;
[0016] Predicting the target countermeasure output power of each new energy output node in the target period based on the target hidden feature vector and the historical output characteristics of each new energy output node through the preset model;
[0017] The target loss is obtained by performing loss calculation according to the predicted output power of each new energy output node, the target resistance output power and the corresponding reference output power.
[0018] In some embodiments, acquiring the target anti-noise includes:
[0019] Obtain initial adversarial noise;
[0020] Using the initial adversarial noise as the target adversarial noise;
[0021] or,
[0022] Obtaining a noise weight matrix for the initial anti-noise;
[0023] Performing feature extraction on the initial in-degree feature, the initial out-degree feature, the initial adversarial noise, and the noise weight matrix to obtain an initial hidden feature vector;
[0024] Performing loss calculation based on the initial hidden feature vector, the historical output characteristics of each new energy output node, and the corresponding reference output power to obtain candidate losses;
[0025] The initial adversarial noise is adjusted according to the candidate loss to obtain the target adversarial noise.
[0026] In some embodiments, obtaining the noise weight matrix of the initial anti-noise comprises:
[0027] Obtain the distance between any two new energy output nodes to obtain a first distance;
[0028] Select the largest of the first distances to obtain a second distance;
[0029] Obtaining a correlation degree parameter, where the correlation degree parameter is used to indicate a correlation degree between a new energy output node and an adjacent node;
[0030] determining a noise weight between any two new energy output nodes according to the first distance, the second distance, and the correlation degree parameter;
[0031] A matrix is constructed according to the noise weights to obtain the noise weight matrix for the initial anti-noise.
[0032] In some embodiments, the loss calculation is performed based on the initial hidden feature vector, the historical output characteristics of each new energy output node, and the corresponding reference output power to obtain the candidate loss, including:
[0033] Predicting the initial countermeasure output power of each of the new energy output nodes in the target period based on the initial hidden feature vector and the historical output characteristics of each new energy output node through the preset model;
[0034] The candidate loss is obtained by performing loss calculation based on the initial resistance output power of each new energy output node and the corresponding reference output power.
[0035] In some embodiments, performing loss calculation based on the predicted output power of each new energy output node, the target resistance output power, and the corresponding reference output power to obtain the target loss includes:
[0036] Performing a loss calculation based on the predicted output power of each new energy output node and the corresponding reference output power to obtain a first loss;
[0037] Performing loss calculation based on the target resistance output power of each new energy output node and the corresponding reference output power to obtain a second loss;
[0038] The first loss and the second loss are weightedly calculated to obtain the target loss.
[0039] In some embodiments, after adjusting the model parameters of the preset model according to the target loss to obtain the adversarial spatiotemporal network, the new energy power robust prediction method based on the adversarial spatiotemporal network further includes:
[0040] Obtain the target node output characteristics of each renewable energy output node in the power system during the target historical period;
[0041] Adjusting the initial in-degree feature according to the target loss to obtain a target in-degree feature;
[0042] Adjusting the initial out-degree feature according to the target loss to obtain a target out-degree feature;
[0043] Constructing a target adjacency matrix according to the target in-degree feature and the target out-degree feature;
[0044] The target output power of each new energy output node in a future period is predicted by the adversarial spatiotemporal network based on the target adjacency matrix and the target node output characteristics of each new energy output node.
[0045] To achieve the above-mentioned objectives, a second aspect of an embodiment of the present application proposes a robust prediction device for new energy power based on an adversarial spatiotemporal network, the device comprising:
[0046] A first acquisition module is configured to acquire initial in-degree characteristics and initial out-degree characteristics of a power system, wherein the power system includes a plurality of new energy output nodes;
[0047] A construction module for constructing an adjacency matrix based on the initial in-degree feature and the initial out-degree feature; the adjacency matrix is a matrix representing the feature correlation between any two new energy output nodes;
[0048] A second acquisition module is used to obtain historical output characteristics of each new energy output node in the power system during a historical period;
[0049] A prediction module, configured to extract spatiotemporal features based on the adjacency matrix and the historical output features of each new energy output node using a preset model, and predict the predicted output power of each new energy output node in a target period based on the spatiotemporal features;
[0050] A third acquisition module is used to obtain the reference output power of each new energy output node in the target period;
[0051] A calculation module is used to calculate the loss of each new energy output node according to the predicted output power, the corresponding reference output power and the preset target anti-noise, to obtain a target loss;
[0052] An adjustment module, configured to adjust model parameters of the preset model according to the target loss to obtain an adversarial spatiotemporal network;
[0053] The adversarial spatiotemporal network is used to predict the target output power of each renewable energy output node in a future period based on the target node output characteristics of each renewable energy output node in the power system in a target historical period and a target adjacency matrix, wherein the target adjacency matrix is constructed by target in-degree characteristics and target out-degree characteristics, the target in-degree characteristics are obtained by adjusting the initial in-degree characteristics based on the target loss, and the target out-degree characteristics are obtained by adjusting the initial out-degree characteristics based on the target loss.
[0054] To achieve the above-mentioned purpose, the third aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, and the memory stores a computer program. When the processor executes the computer program, it implements the new energy power robust prediction method based on the adversarial spatiotemporal network described in the first aspect above.
[0055] To achieve the above-mentioned purpose, the fourth aspect of an embodiment of the present application proposes a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the new energy power robust prediction method based on the adversarial spatiotemporal network described in the first aspect above.
[0056] The embodiments of the present application provide a robust prediction method for new energy power based on an adversarial space-time network, a robust prediction device for new energy power based on an adversarial space-time network, an electronic device, and a computer-readable storage medium. In the task of predicting new energy output power, there is no clear topological information between the new energy output nodes in the power system, so that the topological information determined by distance is not accurate. In order to obtain accurate topological information, the initial in-degree characteristics and initial out-degree characteristics of the power system are obtained, so as to identify the network topology structure of the power system using the initial in-degree characteristics and initial out-degree characteristics. An adjacency matrix is constructed based on the initial in-degree characteristics and the initial out-degree characteristics to capture the spatial correlation between the new energy output nodes. The historical output characteristics of each new energy output node in the power system are obtained in the historical period, so as to predict the output power of the future period through the node output characteristics of the historical period. The output characteristics of renewable energy nodes over historical periods exhibit temporal correlation, and spatial correlation exists between each node. To capture the complex spatiotemporal relationships in the power system and accurately predict output power, a pre-defined model extracts spatiotemporal features based on the adjacency matrix and the historical output characteristics of each renewable energy node. Based on these spatiotemporal features, the predicted output power of each renewable energy node during the target period is predicted. To improve the accuracy of output power prediction, the pre-defined model needs to be optimized. Reference output power for each renewable energy node during the target period is obtained, and the accuracy of the predicted output power is evaluated based on the reference output power. Power forecasting is often affected by abnormal factors such as extreme weather and equipment status. Traditional power forecasting models are prone to overfitting power variations caused by these temporary noises, resulting in reduced prediction accuracy under normal conditions. To improve the robustness of the power forecasting model to noise and enhance its accuracy, a target noise countermeasure is introduced. A loss is calculated based on the predicted output power of each renewable energy node, the corresponding reference output power, and the target noise countermeasure. This target loss is used to guide the optimization process of the pre-defined model. The model parameters of the preset model are adjusted based on the target loss to determine a power prediction model that is robust to noise and has better generalization capabilities, resulting in an adversarial spatiotemporal network. The initial in-degree and initial out-degree features are adjusted based on the target loss to obtain an adaptively learned adjacency matrix, which more accurately captures the dynamic spatial relationships between nodes and improves the accuracy of renewable energy output power prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 This is a flow chart of a robust prediction method for new energy power based on an adversarial spatiotemporal network provided in an embodiment of the present application;
[0058] Figure 2 yes Figure 1 Flowchart of step S160 in FIG.
[0059] Figure 3 yes Figure 2 Flowchart of step S220 in FIG.
[0060] Figure 4 yes Figure 3 Flowchart of step S320 in FIG.
[0061] Figure 5 yes Figure 3 Flowchart of step S340 in FIG.
[0062] Figure 6 yes Figure 2 Flowchart of step S240 in FIG.
[0063] Figure 7 is another flow chart of a robust prediction method for new energy power based on an adversarial spatiotemporal network provided in an embodiment of the present application;
[0064] Figure 8 Schematic diagram of the structure of a new energy power robust prediction device based on an adversarial spatiotemporal network provided in an embodiment of the present application;
[0065] Figure 9 This is a schematic diagram of the hardware structure of the electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0066] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0067] It should be noted that although the device schematics illustrate functional module divisions and the flowcharts illustrate logical sequences, in certain circumstances, the steps shown or described may be performed in a sequence that differs from the module divisions in the device or the sequence in the flowcharts. The terms "first," "second," and so on, in the specification, claims, and drawings, are used to distinguish similar items and are not necessarily used to describe a specific sequence or precedence.
[0068] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.
[0069] Renewable energy output power prediction plays an important role in low-carbon energy optimization. By accurately predicting the output power of renewable energy, power generation strategies can be adjusted in advance, such as preparing power generation resources in advance when power is too low. In related technologies, graph neural networks are used to predict the output power of renewable energy to carry out power scheduling of power systems and improve the safety and stability of power system operations. Graph neural networks use the distance between renewable energy output nodes to obtain node spatial topology information and assume that the node spatial topology information remains unchanged. However, due to the influence of various factors such as node device status and extreme weather, the close distance between renewable energy output nodes does not necessarily mean that their spatial correlation is stronger, making the node spatial topology information unable to accurately reflect the true spatial correlation between nodes. In addition, traditional power prediction models are prone to overfitting power changes caused by temporary noise such as extreme weather and node device status, resulting in low accuracy in renewable energy output power prediction.
[0070] Based on this, the embodiments of the present application provide a new energy power robust prediction method based on an adversarial space-time network, a new energy power robust prediction device based on an adversarial space-time network, an electronic device and a computer-readable storage medium, aiming to improve the accuracy of new energy output power prediction.
[0071] The embodiments of the present application provide a robust prediction method for new energy power based on an adversarial space-time network, a robust prediction device for new energy power based on an adversarial space-time network, an electronic device, and a computer-readable storage medium. These are specifically illustrated through the following embodiments. First, the robust prediction method for new energy power based on an adversarial space-time network in the embodiments of the present application is described.
[0072] The embodiment of the present application provides a method for robustly predicting new energy power based on an adversarial space-time network, which relates to the field of artificial intelligence technology. The method for robustly predicting new energy power based on an adversarial space-time network provided in the embodiment of the present application can be applied to a terminal, can be applied to a server side, or can be software running in a terminal or a server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or as a server cluster or distributed system composed of multiple physical servers, or as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements a method for robustly predicting new energy power based on an adversarial space-time network, etc., but is not limited to the above forms.
[0073] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and the like. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments in which tasks are performed by remote processing devices connected via a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media, including storage devices.
[0074] Figure 1 This is an optional flowchart of the new energy power robust prediction method based on the adversarial space-time network provided in an embodiment of the present application. The new energy power robust prediction method based on the adversarial space-time network may include but is not limited to steps S110 to S170.
[0075] Step S110, obtaining initial in-degree characteristics and initial out-degree characteristics of the power system; the power system includes multiple new energy output nodes;
[0076] Step S120: construct an adjacency matrix based on the initial in-degree features and the initial out-degree features; the adjacency matrix is a matrix representing the feature correlation between any two new energy output nodes;
[0077] Step S130, obtaining historical output characteristics of each new energy output node in the power system during a historical period;
[0078] Step S140: extracting spatiotemporal features based on the adjacency matrix and the historical output features of each renewable energy output node using a preset model, and predicting the output power of each renewable energy output node in the target period based on the spatiotemporal features;
[0079] Step S150, obtaining the reference output power of each new energy output node in the target period;
[0080] Step S160, calculating the loss against noise according to the predicted output power of each new energy output node, the corresponding reference output power, and the preset target to obtain the target loss;
[0081] Step S170, adjusting the model parameters of the preset model according to the target loss to obtain an adversarial spatiotemporal network;
[0082] Among them, the adversarial spatiotemporal network is used to predict the target output power of each renewable energy output node in the future period based on the target node output characteristics of each renewable energy output node in the power system in the target historical period and the target adjacency matrix. Among them, the target adjacency matrix is constructed by the target in-degree characteristics and the target out-degree characteristics. The target in-degree characteristics are obtained by adjusting the initial in-degree characteristics based on the target loss, and the target out-degree characteristics are obtained by adjusting the initial out-degree characteristics based on the target loss.
[0083] In step S110 of some embodiments, the initial in-degree characteristics and initial out-degree characteristics of the power system are randomly initialized. The power system includes multiple new energy output nodes, and the new energy output nodes are new energy power generation equipment in the power system, which can be wind farms, photovoltaic power stations, etc. The initial in-degree characteristics include the in-degree node representation of each new energy output node, and the in-degree node representation is the number of other new energy output nodes that have a direct impact on the output of the current new energy output node. The initial out-degree characteristics include the out-degree node representation of each new energy output node, and the out-degree node representation is the number of other new energy output nodes that have a direct impact on the output of the current new energy output node.
[0084] The association between renewable energy output nodes is not necessarily bidirectional. For example, if node B is located in a windy area, it will affect the wind resources around it, thereby affecting the wind power generation efficiency of node A. In this case, the association between node A and node B is a unidirectional influence. Therefore, the in-degree node representation and out-degree node representation are defined for each renewable energy output node, and the initial in-degree characteristics of the power system are defined as , define the initial out-degree characteristics of the power system as , where R represents the real number space, N is the number of new energy output nodes in the power system, and C is the characteristic dimension of in-degree node representation and out-degree node representation.
[0085] In step S120 of some embodiments, the traditional model uses the distance between nodes to generate an adjacency matrix, and uses the adjacency matrix to represent the spatial correlation between nodes. However, in actual situations, as various features that affect output power, such as equipment status, extreme weather, etc., change, this spatial correlation changes in an unobservable way. Nodes with similar distances do not necessarily mean stronger spatial correlation. For example, due to differences in equipment status, the energy conversion efficiency of certain wind power generation devices may vary significantly, making it impossible for the adjacency matrix constructed based on distance to accurately represent the spatial correlation between nodes. The embodiment of the present application performs feature learning on the initial in-degree features and the initial out-degree features to construct a learnable adjacency matrix to accurately represent the spatial correlation characteristics between nodes. The adjacency matrix is a matrix that represents the feature correlation between any two new energy output nodes.
[0086] The traditional method of using Graph Convolutional Network (GCN) mainly extracts spatial features through the following methods:
[0087] ,
[0088] in, Represents the graph convolutional neural network network layers; t represents the tth time step; A represents the adjacency matrix; D represents the degree matrix of the adjacency matrix, which is used to normalize the output; represents the inverse square root of the degree matrix; W is the weight parameter of the graph convolutional neural network; Indicates the The input features of the t-th time step of the network layer; Represents the activation function.
[0089] However, traditional GCN requires obtaining fixed topology information A in advance, which is not very applicable in new energy scenarios without obvious topology information. The embodiment of the present application directly learns the initial in-degree features and the initial out-degree features to determine the learnable adjacency matrix. The spatial association is generated through the learnable adjacency matrix to capture the dynamic relationship between different new energy output nodes. The calculation method of the adjacency matrix is expressed as:
[0090] ,
[0091] in, is the adjacency matrix; is the initial in-degree feature; is the initial out-degree feature; is a hyperparameter used to balance the contribution of in-degree features and out-degree features to the learnable adjacency matrix; softmax is the softmax function used for normalization; ReLU represents the ReLU activation function; T represents the transpose operation; Represents a dot product calculation.
[0092] In step S130 of some embodiments, the historical output characteristics of each new energy output node in the power system in the historical period are collected by intelligent equipment. The historical period includes multiple time steps in the past. The historical output characteristics are multiple characteristics that affect the node output power, such as equipment status, meteorological conditions, wind speed, temperature, power, etc. The new energy output power forecast can be divided into three types of forecasts: short-term forecast, medium-term forecast and long-term forecast. The time step can be defined according to the forecast type. The time step of the short-term forecast can be defined as minute level, hour level or day level. The time step of the medium-term forecast and the long-term forecast is usually one week or more than one month. The historical output characteristics of the historical period are a time series, including the historical output characteristics of M time steps before the current time step t, expressed as , is the output characteristic of time step t. The task of new energy output power prediction is to predict the future output characteristics of multiple time steps in the past. Output power per time step , is the output power at time step t, is an integer greater than or equal to 1.
[0093] In step S140 of some embodiments, the preset model is a spatiotemporal extraction function, and the dynamic spatiotemporal relationship between the output nodes is modeled by the preset model to achieve multi-step prediction of the new energy power in the future period. The preset model includes a graph convolutional neural network and a Transformer model, and the spatiotemporal features are jointly modeled by the graph convolutional neural network and the Transformer model. The spatiotemporal features are time features and spatial features extracted based on historical data. The graph convolutional neural network includes L network layers, where L is an integer greater than or equal to 1. The graph convolutional neural network is used to perform layer-by-layer extraction based on the adjacency matrix and the historical output features of all new energy output nodes, and the output of the last network layer is used as the spatial feature. Spatial features are used to describe the feature correlation between new energy nodes in different spatial positions, such as the wind speed correlation between wind farms. The feature extraction process of the graph convolutional neural network is expressed as:
[0094] ,
[0095] in, For the The output of the network layer is based on the adjacency matrix and the historical output characteristics of all new energy output nodes at the tth time step; represents the activation function; is the N-order unit matrix, where N is the number of renewable energy output nodes in the power system; is the adjacency matrix; is the initial in-degree feature; is the initial out-degree feature; W is the weight parameter of the graph convolutional neural network.
[0096] It should be noted that when calculating the output of the first network layer hour, is the historical output characteristics of all new energy output nodes at the tth time step. If the input of the graph neural network is the adjacency matrix and the historical output characteristics of all new energy output nodes at the tth time step , then the output of the last network layer is If the input of the graph neural network is the adjacency matrix and the historical output characteristics of all new energy output nodes at all time steps in the historical period , then the output of the last network layer is the spatial feature.
[0097] The historical output characteristics of the same new energy output node and different new energy output nodes at different time steps are all temporally correlated. The spatial characteristics are time series. The elements at different time steps in the time series also have temporal correlation. The output power of the future period is also temporally correlated with the output characteristics of the historical period. In order to capture the temporal correlation between the output characteristics and the deep-level spatiotemporal relationship, and thus achieve accurate output power prediction, the embodiment of the present application uses the Transformer model to extract the temporal characteristics of the spatial characteristics to obtain spatiotemporal characteristics. The spatiotemporal features are repeatedly extracted through the graph convolutional neural network and the Transformer model to obtain the predicted output power of each new energy output node in the target period. The target period is the period after the historical period, including at least one time step after the historical period. The predicted output power is the output power predicted by the preset model based on the spatiotemporal characteristics. The predicted output power is expressed as:
[0098] ,
[0099] in, For the preset model; are the model parameters of the graph convolutional neural network and Transformer model; is the adjacency matrix; is the initial in-degree feature; is the initial out-degree feature; are the historical output characteristics of all new energy output nodes in the historical period, and the historical period includes M time steps from t-M+1 to t.
[0100] In step S150 of some embodiments, a reference output power of each new energy output node in a target period is obtained, where the reference output power is the actual output power collected by the intelligent device.
[0101] In step S160 of some embodiments, a loss calculation is performed based on the predicted output power of each new energy output node, the corresponding reference output power, and a preset noise disturbance flag to obtain a target loss. If the preset noise disturbance flag is a no-noise flag, a loss calculation is performed based on the predicted output power of each new energy output node and the corresponding reference output power to obtain a target loss.
[0102] The preset noise perturbation flag is used to indicate whether to add noise during the model training phase. If the preset noise perturbation flag is the no-noise flag, it means that no noise needs to be added during the model training process. Then, the difference between the predicted output power and the reference output power of each renewable energy output node in the target period is calculated according to the loss function. The difference values of all renewable energy output nodes are summed to obtain the target loss. The loss function is defined as:
[0103] ,
[0104] Where L is the loss function; is the number of time steps contained in the target period; 2 represents the 2-norm; Represents the reference output power at the t+i-th time step.
[0105] If the preset noise disturbance flag is a noise addition flag, the loss calculation for noise resistance is performed based on the predicted output power of each new energy output node, the corresponding reference output power and the preset target to obtain the target loss.
[0106] See also Figure 2 In some embodiments, step S160 may include but is not limited to steps S210 to S240:
[0107] Step S210, obtaining target anti-noise;
[0108] Step S220, extracting features from the initial in-degree features, the initial out-degree features, and the target anti-noise to obtain a target hidden feature vector;
[0109] Step S230: predicting the target countermeasure output power of each new energy output node in the target period based on the target hidden feature vector and the historical output characteristics of each new energy output node through a preset model;
[0110] Step S240 , performing loss calculation based on the predicted output power, the target resistance output power and the corresponding reference output power of each new energy output node to obtain a target loss.
[0111] In step S210 of some embodiments, power prediction is usually affected by various abnormal factors such as extreme weather and changes in equipment status. Traditional power prediction models are prone to overfitting the power changes caused by these temporary noises, resulting in a decrease in the prediction accuracy of the model under normal conditions. Therefore, it is necessary to design a power prediction model that is robust to noise and has better generalization capabilities to improve the accuracy and robustness of new energy power prediction.
[0112] If the preset noise disturbance flag is a noise addition flag, indicating that noise needs to be added during the model training process, target adversarial noise is obtained. Due to the presence of environmental noise, the correlation characteristics between output nodes will vary. To counteract the impact of this noise on power prediction, the embodiment of the present application uses an adversarial learning method to introduce target adversarial noise to improve the robustness of spatial correlation to noise and enhance the adaptability of the power prediction model to abnormal situations such as extreme weather and equipment status changes, thereby improving the robustness of the model and effectively improving the accuracy and generalization ability of new energy power prediction.
[0113] In step S220 of some embodiments, the target adversarial noise includes in-degree noise and out-degree noise. The in-degree noise has the same feature dimension as the initial in-degree feature, and the out-degree noise has the same feature dimension as the initial out-degree feature. The in-degree noise is added to the initial in-degree feature to obtain an intermediate in-degree feature, and the out-degree noise is added to the initial out-degree feature to obtain an intermediate out-degree feature. Feature extraction is performed on the intermediate in-degree feature and the intermediate out-degree feature to determine a learnable implicit expression and obtain a target hidden feature vector. The target hidden feature vector is expressed as:
[0114] ,
[0115] in, is the initial in-degree feature; is the initial out-degree feature; is the in-degree noise; is the outgoing noise.
[0116] Let the middle in-degree feature be represented as x, , let the middle out-degree feature be denoted as y, , the target hidden feature vector is expressed as:
[0117] ,
[0118] in, is a hyperparameter used to balance the contribution of in-degree features and out-degree features to the learnable latent expression; T represents the transposition operation; Represents a dot product calculation.
[0119] In step S230 of some embodiments, referring to step S140, a graph convolutional neural network is used to extract target spatial features based on the target hidden feature vector and the historical output features of all new energy output nodes in the historical period. A Transformer model is used to extract target spatiotemporal features based on the target spatial features to adaptively capture the correlation between nodes. The target adversarial output power of each new energy output node in the target period is predicted based on the target spatiotemporal features. The target adversarial output power is the output power predicted by the preset model based on the target spatiotemporal features after adding target adversarial noise during the model training phase.
[0120] In step S240 of some embodiments, in order to train a power prediction model that is robust to noise, loss calculation is performed based on the predicted output power, target resistance output power and reference output power of each new energy output node in the target period to obtain the target loss, so as to guide the training process of the model based on the target loss, thereby enhancing the learning ability and robustness of the model and achieving more accurate and robust new energy power prediction.
[0121] Through the above steps S210 to S240, the target loss can be obtained, so as to optimize the power prediction model based on the target loss, thereby improving the prediction ability of the power prediction model and improving the accuracy of the new energy output power prediction.
[0122] See also Figure 3 In some embodiments, step S220 may include but is not limited to steps S310 to S350:
[0123] Step S310, obtaining initial adversarial noise;
[0124] Step S320, obtaining an initial noise weight matrix for combating noise;
[0125] Step S330, performing feature extraction on the initial in-degree features, the initial out-degree features, the initial adversarial noise, and the noise weight matrix to obtain an initial hidden feature vector;
[0126] Step S340 , performing loss calculation based on the initial hidden feature vector, the historical output characteristics of each new energy output node, and the corresponding reference output power to obtain candidate losses;
[0127] Step S350: Adjust the initial adversarial noise according to the candidate loss to obtain the target adversarial noise.
[0128] In step S310 of some embodiments, noise is randomly initialized to obtain initial adversarial noise, which can be used as target adversarial noise.
[0129] In step S320 of some embodiments, in order to avoid a decrease in prediction accuracy caused by excessive noise, the embodiments of the present application use personalized noise, introduce different noise scales to different output nodes, and differentiate the noise between different nodes, thereby achieving a two-way improvement in the robustness and accuracy of the new energy power prediction task, so as to be applicable to different types of new energy scenarios. Specifically, an initial noise weight matrix for combating noise is obtained. The noise weight matrix is a personalized weight matrix with a matrix size of N×N, which is used to add personalized noise to the in-degree node representation and out-degree node representation of different output nodes. The element in the i-th row and j-th column of the noise weight matrix is the noise weight between the new energy output node i and the new energy output node j.
[0130] In step S330 of some embodiments, each new energy output node forms a directed graph. To avoid adding differentiated noise to each output node along the edges of the directed graph and improve the efficiency of adversarial learning, feature extraction is performed on the initial in-degree features, initial out-degree features, initial adversarial noise, and noise weight matrix to obtain an initial hidden feature vector. The feature extraction process is expressed as:
[0131] ,
[0132] ,
[0133] in, is the initial hidden feature vector; E is the degree matrix, including the initial in-degree feature and initial outdegree characteristics ; is the initial adversarial noise, including the initial in-degree noise and initial outdegree noise ; is the noise weight matrix; Indicates dot product calculation; T indicates transpose operation; q is based on E, and The intermediate output is obtained.
[0134] In step S340 of some embodiments, loss calculation is performed based on the initial hidden feature vector, the historical output characteristics of each new energy output node in the historical period, and the reference output power of each new energy output node in the target period to obtain candidate losses to optimize the anti-noise based on the candidate losses.
[0135] In step S350 of some embodiments, in order to make the power prediction model adaptable to different types of noise to the greatest extent possible, the initial adversarial noise is adjusted by maximizing the candidate loss, and the optimal adversarial noise is determined to obtain the target adversarial noise. The target adversarial noise is expressed as:
[0136] ,
[0137] Where n is the initial adversarial noise; To combat noise for the target; is the noise threshold; is the candidate loss.
[0138] Through the above steps S310 to S350, optimal anti-noise can be obtained to add optimal anti-noise to the in-degree feature and the out-degree feature, thereby achieving more accurate and robust new energy power prediction.
[0139] See also Figure 4 In some embodiments, step S320 may include but is not limited to steps S410 to S450:
[0140] Step S410, obtaining the distance between any two new energy output nodes to obtain a first distance;
[0141] Step S420, selecting the largest first distance to obtain a second distance;
[0142] Step S430: Obtain a correlation parameter, where the correlation parameter indicates the correlation between the new energy output node and adjacent nodes.
[0143] Step S440: determining a noise weight between any two new energy output nodes based on the first distance, the second distance, and the correlation parameter;
[0144] Step S450 , constructing a matrix based on the noise weight to obtain an initial noise weight matrix for combating noise.
[0145] In step S410 of some embodiments, the Euclidean distance between any two renewable energy output nodes in the power system is obtained to obtain a first distance. For output nodes that are closer together, the correlation between them is stronger, and the added adversarial noise is smaller, thereby preventing noise from damaging genuine information. In other words, the magnitude of the adversarial noise is proportional to the first distance between the renewable energy output nodes.
[0146] In step S420 of some embodiments, a first distance between every two renewable energy output nodes of the power system is obtained, and the largest first distance is selected to obtain a second distance.
[0147] In step S430 of some embodiments, a correlation parameter is obtained. The correlation parameter is used to indicate the degree of correlation between the new energy output node and its neighboring nodes. The correlation parameter is a hyperparameter and can be determined based on practical experience. For short-term predictions, neighboring nodes have a greater influence on the target node, so the correlation parameter takes a larger value. For medium- to long-term predictions, distant nodes have a greater influence on the target node, while neighboring nodes have a smaller influence on the target node, so the correlation parameter takes a smaller value.
[0148] In step S440 of some embodiments, the ratio of the first distance to the second distance is calculated, and the correlation degree parameter is used as an index to calculate the exponent of the ratio to obtain the noise weight between any two new energy output nodes. The noise weight is expressed as:
[0149] ,
[0150] in, is the noise weight between the new energy output node i and the new energy output node j; is the first distance between new energy output node i and new energy output node j; is the second distance, which is used to normalize the noise weight; is the correlation degree parameter.
[0151] In step S450 of some embodiments, the noise weights between any two new energy output nodes are used as matrix elements to construct a matrix to obtain an initial noise weight matrix for combating noise.
[0152] Through the above steps S410 to S450, a noise weight matrix can be obtained, so as to add different anti-noises to different new energy output nodes based on the noise weight matrix. By introducing personalized noise, the robustness and prediction accuracy of the new energy output nodes to different noises are improved.
[0153] See also Figure 5 In some embodiments, step S340 may include but is not limited to steps S510 to S520:
[0154] Step S510: predicting the initial countermeasure output power of each new energy output node in the target period based on the initial hidden feature vector and the historical output characteristics of each new energy output node through a preset model;
[0155] Step S520 , performing loss calculation based on the initial resistance output power of each new energy output node and the corresponding reference output power to obtain candidate losses.
[0156] In step S510 of some embodiments, referring to step S140, the adjacency matrix is replaced with the initial hidden feature vector, spatial features are extracted based on the initial hidden feature vector and the historical output features of all new energy output nodes in the historical period using a graph convolutional neural network, spatiotemporal features are extracted based on the extracted spatial features using a Transformer model, and the initial adversarial output power of each new energy output node in the target period is predicted based on the spatiotemporal features. The initial adversarial output power is the output power predicted by the preset model based on the spatiotemporal features after the initial adversarial noise is added during the model training phase.
[0157] In step S520 of some embodiments, an adversarial loss function is defined. Based on the adversarial loss function, the difference between the initial adversarial output power of each new energy output node and the corresponding reference output power is calculated. The difference values of all new energy output nodes are added together to obtain a candidate loss. The adversarial loss function is expressed as:
[0158] ,
[0159] in, represents the adversarial loss function; Represents the preset model based on the degree matrix E, the initial adversarial noise n, and the historical output characteristics of all new energy output nodes in the historical period The predicted initial combat output power, the historical period spans M time steps from t-M+1 to t; For the preset model; are the model parameters of the preset model; is the reference output power at time step t+i in the target period, which spans from t+1 to of time steps, i represents the i-th time step in the target period; represents the initial hidden feature vector; It is the initial resistance output power output by the preset model.
[0160] Through the above steps S510 to S520, candidate losses can be obtained to determine the optimal anti-noise based on the candidate losses, thereby improving the prediction accuracy and prediction robustness of the power prediction model.
[0161] See also Figure 6 In some embodiments, step S240 may include but is not limited to steps S610 to S630:
[0162] Step S610: performing loss calculation based on the predicted output power of each new energy output node and the corresponding reference output power to obtain a first loss;
[0163] Step S620, performing loss calculation based on the target resistance output power of each new energy output node and the corresponding reference output power to obtain a second loss;
[0164] Step S630: Perform weighted calculation on the first loss and the second loss to obtain a target loss.
[0165] In step S610 of some embodiments, based on the loss function of step S210, the difference between the predicted output power of each new energy output node in the target period and the corresponding reference output power is calculated, and the difference values of all new energy output nodes are added together to obtain the first loss.
[0166] In step S620 of some embodiments, based on the adversarial loss function, the difference between the target adversarial output power of each new energy output node in the target period and the corresponding reference output power is calculated, and the difference values of all new energy output nodes are added together to obtain the second loss. The adversarial loss function is defined as:
[0167] ,
[0168] in, represents the adversarial loss function; Indicates that the preset model is based on the degree matrix E and the target is against noise And the historical output characteristics of all new energy output nodes in the historical period Predicted target resistance output power; For the preset model; are the model parameters of the preset model; is the reference output power at time step t+i in the target period; represents the target hidden feature vector; The target resistance output power output by the preset model.
[0169] In step S630 of some embodiments, a weight factor of the second loss is obtained, the weight factor is multiplied by the second loss, and the result of the multiplication operation is added to the first loss to obtain a target loss. The target loss is expressed as:
[0170] ,
[0171] in, Indicates the first loss; Indicates the second loss; Represents the weight factor.
[0172] Through the above steps S610 to S630, the target loss can be obtained, and an adversarial learnable spatiotemporal robust prediction model can be trained based on the target loss, thereby improving the accuracy and robustness of the new energy power prediction.
[0173] In step S170 of some embodiments, the target loss is minimized while adjusting the model parameters of the preset model, the initial in-degree characteristics and the initial out-degree characteristics of the power system. Specifically, the model parameters of the preset model, i.e., the graph neural network and the transformer model, are adjusted according to the target loss to determine the adversarial graph neural network and the adversarial transformer model, and obtain an adversarial spatiotemporal network. At the same time, the initial in-degree characteristics of the power system are adjusted according to the target loss to obtain the target in-degree characteristics, and the initial out-degree characteristics of the power system are adjusted to obtain the target out-degree characteristics, so as to construct a learnable target adjacency matrix based on the target in-degree characteristics and the target out-degree characteristics, and realize adaptive adjustment of the adjacency matrix, thereby more flexibly reflecting the true relationship between the power nodes, so that the adversarial spatiotemporal network predicts the target output power of each new energy output node in the future period based on the target node output characteristics of each new energy output node in the power system in the target historical period and the target adjacency matrix.
[0174] Existing methods assume that graph networks have fixed topological information, which is usually determined by the distance between output nodes. In new energy power prediction, there is no clear topological information between output nodes, which makes the existing graph network often unable to accurately reflect the real relationship between output nodes in practical applications. For example, although some output nodes are geographically close, the correlation of power output may not be significant due to differences in equipment status or external environmental factors (such as extreme weather). The embodiment of the present application is based on learnable spatiotemporal prediction, which allows the relationship between nodes to be learned through implicit representation, thereby achieving adaptive topological information and adaptive graph structure modeling. At the same time, GCN is used to learn spatial associations, and the Transformer model is used to learn temporal associations, which can better learn the complex spatiotemporal associations between output nodes.
[0175] In order to improve the robustness of the model to noise, the embodiment of the present application provides a new adversarial robust spatiotemporal prediction. During the learning process, adversarial noise is added to the learnable implicit variables. By adjusting the noise influence between nodes, the robustness and predictive ability of the model in the face of abnormal situations (such as equipment failures, environmental changes) are improved, and it can effectively deal with abnormal influences such as extreme weather and equipment status changes. In addition, traditional new energy spatiotemporal prediction methods have never considered the stability of the prediction process. When abnormal data appears in the prediction process, such as a sudden increase in wind speed, the robustness of traditional methods to the data will be very poor. The embodiment of the present application enhances the robustness of the model through differentiated adversarial noise. By making full use of the distance information between the output nodes, the influence weights of different output nodes on the target node are adjusted in a personalized manner, so that different adversarial noises are added to different nodes according to the specific situation, thereby avoiding the loss of accuracy caused by adding too much adversarial noise to some nodes.
[0176] Figure 7This is another flow chart of a new energy power robust prediction method based on an adversarial spatiotemporal network provided by an embodiment of the present application. After step S170, the method may further include but is not limited to steps S710 to S750:
[0177] Step S710, obtaining target node output characteristics of each new energy output node in the power system during a target historical period;
[0178] Step S720, adjusting the initial in-degree feature according to the target loss to obtain the target in-degree feature;
[0179] Step S730: Adjust the initial out-degree feature according to the target loss to obtain the target out-degree feature;
[0180] Step S740, constructing a target adjacency matrix according to the target in-degree feature and the target out-degree feature;
[0181] Step S750 , predicting the target output power of each new energy output node in the future period based on the target adjacency matrix and the target node output characteristics of each new energy output node through the adversarial spatiotemporal network.
[0182] In step S710 of some embodiments, the target node output characteristics of each new energy output node in the power system in the target historical period can be collected through intelligent equipment. The target historical period is the period before the current period for power prediction through the adversarial space-time network. The target historical period includes at least one time step. The target node output characteristics are multiple characteristics that affect the node output power, such as equipment status, meteorological conditions, wind speed, temperature, power, etc.
[0183] In steps S720 to S730 of some embodiments, in order to obtain an adaptively adjustable adjacency matrix, the initial in-degree features and the initial out-degree features are adjusted by minimizing the target loss to obtain the target in-degree features and the target out-degree features.
[0184] In step S740 of some embodiments, referring to step S120 , feature learning is performed based on the target in-degree features and the target out-degree features to construct a learnable target adjacency matrix.
[0185] In step S750 of some embodiments, referring to step S140, spatial features are extracted based on the target adjacency matrix and the target node output features of each new energy output node in the target historical period through the adversarial spatiotemporal network. Spatiotemporal features are extracted based on the spatial features, and the output power of each new energy output node in a future period is predicted based on the spatiotemporal features to obtain the target output power. The future period is a period after the target historical period.
[0186] Through the above steps S710 to S750, the complex spatiotemporal relationship between the output nodes can be modeled by the adversarial spatiotemporal network and the learnable adjacency matrix to improve the accuracy of the output power prediction.
[0187] See also Figure 8 The embodiment of the present application further provides a new energy power robust prediction device based on an adversarial space-time network, which can implement the above-mentioned new energy power robust prediction method based on an adversarial space-time network. The new energy power robust prediction device based on an adversarial space-time network includes:
[0188] The first acquisition module 810 is used to obtain the initial in-degree characteristics and initial out-degree characteristics of the power system; the power system includes multiple new energy output nodes;
[0189] Construction module 820, for constructing an adjacency matrix based on the initial in-degree features and the initial out-degree features; the adjacency matrix is a matrix representing the feature correlation between any two new energy output nodes;
[0190] The second acquisition module 830 is used to obtain the historical output characteristics of each new energy output node in the power system during the historical period;
[0191] Prediction module 840 is used to extract spatiotemporal features based on the adjacency matrix and the historical output characteristics of each renewable energy output node using a preset model, and predict the predicted output power of each renewable energy output node in the target period based on the spatiotemporal features;
[0192] The third acquisition module 850 is used to obtain the reference output power of each new energy output node in the target period;
[0193] A calculation module 860 is configured to calculate the loss of each new energy output node based on the predicted output power, the corresponding reference output power, and the preset target noise resistance to obtain a target loss;
[0194] An adjustment module 870 is configured to adjust model parameters of a preset model according to a target loss to obtain an adversarial spatiotemporal network;
[0195] Among them, the adversarial spatiotemporal network is used to predict the target output power of each renewable energy output node in the future period based on the target node output characteristics of each renewable energy output node in the power system in the target historical period and the target adjacency matrix. Among them, the target adjacency matrix is constructed by the target in-degree characteristics and the target out-degree characteristics. The target in-degree characteristics are obtained by adjusting the initial in-degree characteristics based on the target loss, and the target out-degree characteristics are obtained by adjusting the initial out-degree characteristics based on the target loss.
[0196] The specific implementation of the new energy power robust prediction device based on the adversarial space-time network is basically the same as the specific embodiment of the new energy power robust prediction method based on the adversarial space-time network mentioned above, and will not be repeated here.
[0197] The present application also provides an electronic device comprising a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the robust prediction method for new energy power based on an adversarial spatiotemporal network. The electronic device can be any smart terminal, including a tablet computer and an in-vehicle computer.
[0198] See also Figure 9 , Figure 9 The hardware structure of an electronic device according to another embodiment is shown. The electronic device includes:
[0199] The processor 910 may be implemented as a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is configured to execute relevant programs to implement the technical solutions provided in the embodiments of the present application.
[0200] The memory 920 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 920 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 920 and is called by the processor 910 to execute the robust prediction method for new energy power based on the adversarial spatiotemporal network of the embodiments of this application.
[0201] Input / output interface 930, used to implement information input and output;
[0202] Communication interface 940, used to implement communication interaction between this device and other devices, which can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WiFi, Bluetooth, etc.);
[0203] bus 950 , which transmits information between various components of the device (e.g., processor 910 , memory 920 , input / output interface 930 , and communication interface 940 );
[0204] The processor 910 , the memory 920 , the input / output interface 930 , and the communication interface 940 are connected to each other in communication within the device via a bus 950 .
[0205] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the above-mentioned new energy power robust prediction method based on the adversarial spatiotemporal network.
[0206] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0207] The embodiments described in the embodiments of this application are intended to more clearly illustrate the technical solutions of the embodiments of this application and do not constitute a limitation on the technical solutions provided by the embodiments of this application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.
[0208] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0209] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, i.e., they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of this embodiment.
[0210] Those skilled in the art will appreciate that all or some of the steps in the methods, systems, and functional modules / units in the devices disclosed above may be implemented as software, firmware, hardware, or appropriate combinations thereof.
[0211] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application 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 clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0212] It should be understood that in this application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0213] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the above-mentioned units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0214] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0215] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0216] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes multiple instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: various media that can store programs, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0217] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but are not intended to limit the scope of the present invention. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and essence of the present invention should be within the scope of the present invention.
Claims
1. A robust prediction method for new energy power based on adversarial spatiotemporal network, characterized in that: The method comprises: Acquiring initial in-degree characteristics and initial out-degree characteristics of a power system; the power system includes a plurality of new energy output nodes; Constructing an adjacency matrix based on the initial in-degree feature and the initial out-degree feature; the adjacency matrix is a matrix representing the feature correlation between any two new energy output nodes; Obtaining historical output characteristics of each new energy output node in the power system during a historical period; Extracting spatiotemporal features based on the adjacency matrix and the historical output features of each new energy output node through a preset model, and predicting the predicted output power of each new energy output node in a target period based on the spatiotemporal features; Obtaining the reference output power of each new energy output node during the target period; Calculate the loss of noise resistance based on the predicted output power of each new energy output node, the corresponding reference output power, and the preset target to obtain the target loss; Adjusting the model parameters of the preset model according to the target loss to obtain an adversarial spatiotemporal network; The adversarial spatiotemporal network is used to predict the target output power of each renewable energy output node in a future period based on the target node output characteristics of each renewable energy output node in the power system in a target historical period and a target adjacency matrix, wherein the target adjacency matrix is constructed by target in-degree characteristics and target out-degree characteristics, the target in-degree characteristics are obtained by adjusting the initial in-degree characteristics based on the target loss, and the target out-degree characteristics are obtained by adjusting the initial out-degree characteristics based on the target loss.
2. The method according to claim 1, characterized in that The loss calculation for noise immunity is performed based on the predicted output power of each new energy output node, the corresponding reference output power, and a preset target to obtain a target loss, including: Acquire target anti-noise; Performing feature extraction on the initial in-degree feature, the initial out-degree feature, and the target anti-noise to obtain a target hidden feature vector; Predicting the target countermeasure output power of each new energy output node in the target period based on the target hidden feature vector and the historical output characteristics of each new energy output node by the preset model; The target loss is obtained by performing loss calculation according to the predicted output power of each new energy output node, the target resistance output power and the corresponding reference output power.
3. The method according to claim 2, characterized in that The acquiring target anti-noise comprises: Obtain initial adversarial noise; Using the initial adversarial noise as the target adversarial noise; or, Obtaining a noise weight matrix for the initial anti-noise; Performing feature extraction on the initial in-degree feature, the initial out-degree feature, the initial adversarial noise, and the noise weight matrix to obtain an initial hidden feature vector; Performing loss calculation based on the initial hidden feature vector, the historical output characteristics of each new energy output node, and the corresponding reference output power to obtain candidate losses; The initial adversarial noise is adjusted according to the candidate loss to obtain the target adversarial noise.
4. The method according to claim 3, characterized in that The obtaining of the noise weight matrix of the initial anti-noise comprises: Obtain the distance between any two new energy output nodes to obtain a first distance; Select the largest of the first distances to obtain a second distance; Obtaining a correlation degree parameter, where the correlation degree parameter is used to indicate a correlation degree between a new energy output node and an adjacent node; determining a noise weight between any two new energy output nodes according to the first distance, the second distance, and the correlation degree parameter; A matrix is constructed according to the noise weights to obtain the noise weight matrix for the initial anti-noise.
5. The method according to claim 3, characterized in that The loss calculation is performed based on the initial hidden feature vector, the historical output characteristics of each new energy output node, and the corresponding reference output power to obtain candidate losses, including: Predicting the initial countermeasure output power of each of the new energy output nodes in the target period based on the initial hidden feature vector and the historical output characteristics of each new energy output node through the preset model; The candidate loss is obtained by performing loss calculation based on the initial resistance output power of each new energy output node and the corresponding reference output power.
6. The method according to claim 2, characterized in that The loss calculation is performed according to the predicted output power of each new energy output node, the target resistance output power and the corresponding reference output power to obtain the target loss, including: Performing a loss calculation based on the predicted output power of each new energy output node and the corresponding reference output power to obtain a first loss; Performing loss calculation based on the target resistance output power of each new energy output node and the corresponding reference output power to obtain a second loss; The first loss and the second loss are weightedly calculated to obtain the target loss.
7. A new energy power robust prediction device based on adversarial spatiotemporal network, characterized in that: The device comprises: A first acquisition module is configured to acquire initial in-degree characteristics and initial out-degree characteristics of a power system, wherein the power system includes a plurality of new energy output nodes; A construction module for constructing an adjacency matrix based on the initial in-degree feature and the initial out-degree feature; the adjacency matrix is a matrix representing the feature correlation between any two new energy output nodes; A second acquisition module is used to obtain historical output characteristics of each new energy output node in the power system during a historical period; A prediction module, configured to extract spatiotemporal features based on the adjacency matrix and the historical output features of each new energy output node using a preset model, and predict the predicted output power of each new energy output node in a target period based on the spatiotemporal features; A third acquisition module is used to obtain the reference output power of each new energy output node in the target period; A calculation module is used to calculate the loss of each new energy output node according to the predicted output power, the corresponding reference output power and the preset target anti-noise, to obtain a target loss; An adjustment module, configured to adjust model parameters of the preset model according to the target loss to obtain an adversarial spatiotemporal network; The adversarial spatiotemporal network is used to predict the target output power of each renewable energy output node in a future period based on the target node output characteristics of each renewable energy output node in the power system in a target historical period and a target adjacency matrix, wherein the target adjacency matrix is constructed by target in-degree characteristics and target out-degree characteristics, the target in-degree characteristics are obtained by adjusting the initial in-degree characteristics based on the target loss, and the target out-degree characteristics are obtained by adjusting the initial out-degree characteristics based on the target loss.
8. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Offshore wind power prediction method and device based on multi-scale space-time diagram transformation network
CN117114192A
Wind power prediction method based on data restoration and residual correction
CN118484662A