New energy power robust prediction method and device based on confrontation space-time network
Through the new energy power prediction method based on the adversarial space-time network, the adjacency matrix is constructed using the initial in-degree characteristics and the out-degree characteristics, the spatial-temporal characteristics are extracted, and the target anti-noise optimization model is introduced, which solves the problem that spatial correlations in the output power prediction of new energy are difficult to accurately reflect and overfit, and achieves more efficient and robust power prediction.
Patent Information
- Application Number
- CN202510423292.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-07
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2045-04-07
AI Technical Summary
In the prediction of new energy output power, it is difficult to accurately reflect the true spatial correlation between new energy output nodes, and traditional power prediction models are prone to overfitting power changes caused by temporary noise such as extreme weather and node equipment status, resulting in low prediction accuracy.
A new energy power robust prediction method based on an adversarial space-time network is proposed. By obtaining the initial inlet and initial outgoing characteristics of the power system, an adjacency matrix is constructed, the historical output characteristics of each new energy output node are obtained, the spatial and temporal characteristics are extracted, and the output power is predicted based on these characteristics. At the same time, the target anti-noise is introduced, and the preset model is optimized to improve robustness through loss calculation and model parameter adjustment.
It improves the accuracy and robustness of new energy output power prediction, can more accurately capture the dynamic spatial correlation between nodes, reduce overfitting of extreme weather and equipment state changes, and enhance the generalization ability of the model.
Smart Images

Figure CN119918760A_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 the output power of renewable energy sources in order to dispatch the power of power systems and improve the safety and stability of power system operation. Graph neural networks use the distance between renewable energy output nodes to obtain node spatial topological structure information, and assume that the node spatial topological structure information remains unchanged. However, affected by 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 topological structure information to accurately reflect the true spatial correlation between nodes. In addition, traditional power prediction models are prone to overfitting the power changes caused by temporary noise such as extreme weather and node device status, resulting in low accuracy in the prediction of renewable energy output power. 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-mentioned purpose, a first aspect of an embodiment of the present application proposes a new energy power robust prediction method based on an adversarial spatiotemporal network, the method comprising: Acquire initial in-degree characteristics and initial out-degree characteristics of a power system; the power system includes a plurality of new energy output nodes; An adjacency matrix is constructed according to 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 a reference output power of each new energy output node during the target period; 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 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 a target in-degree feature and a target out-degree feature, wherein the target in-degree feature is obtained by adjusting the initial in-degree feature based on the target loss, and the target out-degree feature is obtained by adjusting the initial out-degree feature based on the target loss.
[0005] In some embodiments, the loss calculation for noise resistance is performed 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, including: Get the target to counter the 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 counter 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; The target loss is obtained by performing loss calculation according to the predicted output power of each new energy output node, the target counteracting output power and the corresponding reference output power.
[0006] In some embodiments, acquiring the target to combat noise includes: Obtain initial adversarial noise; Using the initial adversarial noise as the target adversarial noise; or, Obtaining a noise weight matrix of 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 according to 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.
[0007] In some embodiments, 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; Acquire 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 of the initial anti-noise.
[0008] In some embodiments, the loss calculation is performed according to the initial hidden feature vector, the historical output feature of each new energy output node and the corresponding reference output power to obtain the candidate loss, 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 according to the initial countermeasure output power of each of the new energy output nodes and the corresponding reference output power.
[0009] In some embodiments, 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 loss calculation according to the predicted output power of each new energy output node and the corresponding reference output power to obtain a first loss; Perform loss calculation according to 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.
[0010] 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: Obtain the target node output characteristics of each new energy output node in the power system during the target historical period; Adjusting the initial in-degree feature according to the target loss to obtain a target in-degree feature; Adjusting the initial out-degree feature according to the target loss to obtain a target out-degree feature; Constructing a target adjacency matrix according to the target in-degree feature and the target out-degree feature; The target output power of each new energy output node in the 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.
[0011] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application proposes a new energy power robust prediction device based on an adversarial spatiotemporal network, the device comprising: A first acquisition module is used to acquire initial in-degree characteristics and initial out-degree characteristics of a power system; the power system includes a plurality of new energy output nodes; A construction module, used to construct an adjacency matrix according to 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 the historical output characteristics of each new energy output node in the power system in 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 through 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, 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 the target loss; An adjustment module, used for 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 a target in-degree feature and a target out-degree feature, wherein the target in-degree feature is obtained by adjusting the initial in-degree feature based on the target loss, and the target out-degree feature is obtained by adjusting the initial out-degree feature based on the target loss.
[0012] 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, the memory stores a computer program, and when the processor executes the computer program, it implements the robust prediction method of new energy power based on adversarial spatiotemporal network described in the first aspect above.
[0013] 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 robust prediction method of new energy power based on adversarial spatiotemporal network described in the first aspect above.
[0014] In the embodiment of the present application, the robust prediction method for new energy power based on an adversarial space-time network, the robust prediction device for new energy power based on an adversarial space-time network, the electronic device and the computer-readable storage medium, in the new energy output power prediction task, 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 topological structure of the power system by using the initial in-degree characteristics and the 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 node output characteristics of the new energy output nodes in the historical period have time correlation, and there is a spatial correlation between each new energy output node. In order to capture the complex spatiotemporal relationship in the power system and make accurate output power prediction, the preset model is used to extract the spatiotemporal characteristics based on the adjacency matrix and the historical output characteristics of each new energy output node, and the predicted output power of each new energy output node in the target period is predicted based on the spatiotemporal characteristics. In order to improve the accuracy of output power prediction, the preset model needs to be optimized. The reference output power of each new energy output node in the target period is obtained to evaluate the prediction accuracy of the predicted output power based on the reference output power. Power prediction is usually affected by abnormal factors such as extreme weather and equipment status. The traditional power prediction model is 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. In order to improve the robustness of the power prediction model to noise and the accuracy of power prediction, the target anti-noise is introduced. The loss is calculated according to the predicted output power of each new energy output node, the corresponding reference output power and the target anti-noise, and the target loss is obtained to guide the optimization process of the preset model according to the target loss. The model parameters of the preset model are adjusted according to the target loss to determine a power prediction model that is robust to noise and has better generalization ability, and an adversarial spatiotemporal network is obtained. The initial in-degree features and initial out-degree features are adjusted according to the target loss to obtain an adjacency matrix that can be adaptively learned, thereby more accurately capturing the dynamic spatial correlation between nodes and improving the accuracy of new energy output power prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 It is a flow chart of a new energy power robust prediction method based on adversarial spatiotemporal network provided in an embodiment of the present application; Figure 2 yes Figure 1 Flow chart of step S160 in FIG. Figure 3 yes Figure 2Flow chart of step S220 in FIG. Figure 4 yes Figure 3 Flow chart of step S320 in FIG. Figure 5 yes Figure 3 Flow chart of step S340 in FIG. Figure 6 yes Figure 2 Flow chart of step S240 in FIG. Figure 7 is another flow chart of a new energy power robust prediction method based on an adversarial spatiotemporal network provided in an embodiment of the present application; Figure 8 It is a structural schematic diagram of a new energy power robust prediction device based on an adversarial spatiotemporal network provided in an embodiment of the present application; Fig. 9 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0016] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0017] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0018] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0019] Renewable energy output power prediction plays an important role in low-carbon energy optimization. By accurately predicting the output power of renewable energy, the power generation strategy can be adjusted in advance, such as preparing power generation resources in advance when the power is too low. In related technologies, graph neural networks are used to predict the output power of renewable energy to carry out power dispatching of power systems and improve the safety and stability of power system operation. Graph neural networks use the distance between renewable energy output nodes to obtain node spatial topological structure information, and assume that the node spatial topological structure information remains unchanged. However, affected by various factors such as node equipment 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 topological structure information unable to accurately reflect the true spatial correlation between nodes, and the traditional power prediction model is prone to overfitting the power changes caused by temporary noise such as extreme weather and node equipment status, resulting in low accuracy in the prediction of renewable energy output power.
[0020] 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.
[0021] The embodiments of the present application provide a method for robustly predicting new energy power based on an adversarial space-time network, a device for robustly predicting new energy power based on an adversarial space-time network, an electronic device, and a computer-readable storage medium. The methods are specifically described through the following embodiments. First, the method for robustly predicting new energy power based on an adversarial space-time network in the embodiments of the present application is described.
[0022] The robust prediction method for new energy power based on adversarial space-time network provided in the embodiment of the present application relates to the field of artificial intelligence technology. The robust prediction method for new energy power based on adversarial space-time network provided in the embodiment of the present application can be applied to the terminal, can also be applied to the server side, and can also be software running in the terminal or the 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 a server cluster or distributed system composed of multiple physical servers, and can also be configured 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 robust prediction method for new energy power based on an adversarial space-time network, etc., but is not limited to the above forms.
[0023] 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, etc. 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, etc. 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 through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0024] Figure 1 It 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.
[0025] Step S110, obtaining initial in-degree characteristics and initial out-degree characteristics of the power system; the power system includes a plurality of new energy output nodes; Step S120, 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; Step S130, obtaining the historical output characteristics of each new energy output node in the power system in the historical period; Step S140, 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 the target period based on the spatiotemporal features; Step S150, obtaining the reference output power of each new energy output node in the target period; Step S160, calculating the loss of each new energy output node against noise according to the predicted output power, the corresponding reference output power and the preset target to obtain the target loss; Step S170, adjusting the model parameters of the preset model according to the target loss to obtain an adversarial spatiotemporal network; Among them, the adversarial space-time 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, wherein 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.
[0026] In step S110 of some embodiments, the initial in-degree feature and the initial out-degree feature of the power system are randomly initialized. The power system includes multiple new energy output nodes, and the new energy output node is a new energy power generation equipment in the power system, which can be a wind farm, a photovoltaic power station, etc. The initial in-degree feature includes the in-degree node representation of each new energy output node, and the in-degree node representation is the number of nodes 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 feature includes the out-degree node representation of each new energy output node, and the out-degree node representation is the number of nodes of other new energy output nodes that have a direct impact on the output of other new energy output nodes by the current new energy output node.
[0027] 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. At this time, 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 , the initial out-degree characteristic of the power system is defined as , where R represents the real number space, N is the number of nodes of renewable energy output nodes in the power system, and C is the characteristic dimension of in-degree node representation and out-degree node representation.
[0028] 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 the various features that affect the 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.
[0029] The traditional method of using graph convolutional neural network (GCN) mainly extracts spatial features through the following methods: , 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 input features of the tth time step of the network layer; Represents the activation function.
[0030] However, traditional GCN requires obtaining fixed topological information A in advance, which is not very applicable in new energy scenarios without obvious topological 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: , 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 transposition operation; Represents a dot product calculation.
[0031] 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 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 forecasting the output power of new energy 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.
[0032] 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 new energy power in future time periods. 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 space 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 at different spatial locations, such as the wind speed correlation between wind farms. The feature extraction process of the graph convolutional neural network is expressed as: , 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.
[0033] It should be noted that when calculating the output of the first network layer hour, is the historical output characteristics of all renewable 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 renewable 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.
[0034] 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 are also temporally correlated. 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 characteristics 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: , 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.
[0035] 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.
[0036] 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 the preset noise disturbance flag to obtain a target loss. If the preset noise disturbance flag is a noise-free 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.
[0037] The preset noise disturbance flag is used to indicate whether to add noise during the model training phase. If the preset noise disturbance flag is a 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 new energy output node in the target period is calculated according to the loss function, and the difference values of all new energy output nodes are summed to obtain the target loss. The loss function is defined as: , 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+ith time step.
[0038] If the preset noise disturbance flag is a noise addition flag, the loss calculation is performed on the basis of the predicted output power of each new energy output node, the corresponding reference output power and the preset target to combat the noise and obtain the target loss.
[0039] See also Figure 2 In some embodiments, step S160 may include but is not limited to steps S210 to S240: Step S210, obtaining target anti-noise; Step S220, extracting features from the initial in-degree feature, the initial out-degree feature and the target anti-noise to obtain a target hidden feature vector; Step S230, predicting the target counter 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; Step S240, 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 to obtain the target loss.
[0040] 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.
[0041] If the preset noise disturbance flag is a noise addition flag, indicating that noise needs to be added during the model training process, the target adversarial noise is obtained. Due to the presence of environmental noise, the correlation characteristics between the output nodes will change. In order to counteract the impact of this noise on power prediction, the embodiment of the present application adopts an adversarial learning method to introduce target adversarial noise to improve the robustness of spatial correlation to noise, 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.
[0042] 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: , in, is the initial in-degree feature; is the initial out-degree feature; is the in-degree noise; is the outgoing noise.
[0043] Let the intermediate in-degree feature be x, , let the intermediate out-degree feature be denoted as y, , the target hidden feature vector is expressed as: , in, is a hyperparameter used to balance the contribution of in-degree features and out-degree features to the learnable implicit expression; T represents the transposition operation; Represents a dot product calculation.
[0044] In step S230 of some embodiments, referring to step S140, the target spatial features are extracted based on the target hidden feature vector and the historical output features of all new energy output nodes in the historical period through the graph convolutional neural network, and the target spatiotemporal features are extracted based on the target spatial features through the Transformer model to adaptively capture the correlation between nodes, and predict the target adversarial output power of each new energy output node in the target period 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 the target adversarial noise in the model training stage.
[0045] 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 of each new energy output node in the target period, the target resistance output power and the reference output power 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.
[0046] 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.
[0047] See also Figure 3 In some embodiments, step S220 may include but is not limited to steps S310 to S350: Step S310, obtaining initial adversarial noise; Step S320, obtaining an initial noise weight matrix for combating noise; Step S330, extracting features from 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; Step S340, performing loss calculation according to 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; Step S350, adjusting the initial adversarial noise according to the candidate loss to obtain the target adversarial noise.
[0048] In step S310 of some embodiments, the noise is randomly initialized to obtain the initial adversarial noise, which can be used as the target adversarial noise.
[0049] In step S320 of some embodiments, in order to avoid excessive noise causing a decrease in prediction accuracy, 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, the noise weight matrix of the initial anti-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 elements in the i-th row and j-th column of the noise weight matrix are the noise weights between the new energy output node i and the new energy output node j.
[0050] In step S330 of some embodiments, each new energy output node constitutes a directed graph. In order to avoid adding differentiated noise to the output nodes one by one according to 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: , , in, is the initial hidden feature vector; E is the degree matrix, including the initial in-degree feature and initial out-degree characteristics ; is the initial anti-noise, including the initial in-degree noise and initial outgoing noise ; is the noise weight matrix; represents the dot product calculation; T represents the transpose operation; q is based on E, and The intermediate output is obtained.
[0051] 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.
[0052] In step S350 of some embodiments, in order to make the power prediction model adapt to different types of noise to the greatest extent, the initial adversarial noise is adjusted by maximizing the candidate loss, the optimal adversarial noise is determined, and the target adversarial noise is obtained. The target adversarial noise is expressed as: , Where n is the initial adversarial noise; To combat noise for the target; is the noise threshold; is the candidate loss.
[0053] Through the above steps S310 to S350, optimal adversarial noise can be obtained to add optimal adversarial noise to the in-degree features and out-degree features, thereby achieving more accurate and robust new energy power prediction.
[0054] See also Figure 4 In some embodiments, step S320 may include but is not limited to steps S410 to S450: Step S410, obtaining the distance between any two new energy output nodes to obtain a first distance; Step S420, selecting the largest first distance to obtain a second distance; Step S430, obtaining a correlation degree parameter, where the correlation degree parameter is used to indicate the correlation degree between the new energy output node and the adjacent nodes; Step S440, determining the noise weight between any two new energy output nodes according to the first distance, the second distance and the correlation degree parameter; Step S450, constructing a matrix according to the noise weight to obtain an initial noise weight matrix for combating noise.
[0055] In step S410 of some embodiments, the Euclidean distance between any two new energy output nodes in the power system is obtained to obtain a first distance. For output nodes that are closer, the correlation between the output nodes is stronger, and the added adversarial noise is smaller, thereby avoiding the damage of noise to the real information. That is, the size of the adversarial noise is proportional to the first distance between the new energy output nodes.
[0056] 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.
[0057] In step S430 of some embodiments, a correlation degree parameter is obtained, and the correlation degree parameter is used to indicate the correlation degree between the new energy output node and its neighboring nodes. The correlation degree parameter is a hyperparameter and can be determined based on actual experience. For short-term predictions, the neighboring nodes have a greater impact on the target node, so the correlation degree parameter takes a larger value. For medium- and long-term predictions, the distant nodes have a greater impact on the target node, and the neighboring nodes have a smaller impact on the target node, so the correlation degree parameter takes a smaller value.
[0058] 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: , in, is the noise weight between the new energy output node i and the new energy output node j; is the first distance between the new energy output node i and the new energy output node j; is the second distance, which is used to normalize the noise weight; is the correlation degree parameter.
[0059] 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.
[0060] Through the above steps S410 to S450, a noise weight matrix can be obtained, so as to add different countermeasure noises to different renewable energy output nodes based on the noise weight matrix, and improve the robustness and prediction accuracy of renewable energy output nodes to different noises by introducing personalized noise.
[0061] See also Figure 5 In some embodiments, step S340 may include but is not limited to steps S510 to S520: Step S510, predicting the initial counter 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; 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.
[0062] In step S510 of some embodiments, referring to step S140, the adjacency matrix is replaced with the initial hidden feature vector, and the 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 by using a graph convolutional neural network, and the spatiotemporal features are extracted based on the extracted spatial features by 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 in the model training stage.
[0063] In step S520 of some embodiments, an adversarial loss function is defined, and the difference between the initial adversarial output power of each new energy output node and the corresponding reference output power is calculated based on the adversarial loss function, and the difference values of all new energy output nodes are added together to obtain the candidate loss. The adversarial loss function is expressed as: , 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 confrontation output power, the historical period spans M time steps from t-M+1 to t; For the preset model; is the model parameter of the preset model; is the reference output power at time step t+i in the target period. The target period 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.
[0064] 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.
[0065] See also Figure 6In some embodiments, step S240 may include but is not limited to steps S610 to S630: Step S610, performing loss calculation according to the predicted output power of each new energy output node and the corresponding reference output power to obtain a first loss; 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; Step S630: Perform weighted calculation on the first loss and the second loss to obtain a target loss.
[0066] 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 to obtain the first loss.
[0067] 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: , 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 counter output power; For the preset model; is the model parameter 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.
[0068] 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: , in, Indicates the first loss; Indicates the second loss; Represents the weight factor.
[0069] Through the above steps S610 to S630, the target loss can be obtained, so as to train an adversarial learnable spatiotemporal robust prediction model based on the target loss, thereby improving the accuracy and robustness of the new energy power prediction.
[0070] 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 space-time 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 according to the target in-degree characteristics and the target out-degree characteristics, and realize adaptive adjustment of the adjacency matrix, so as to more flexibly reflect the real relationship between the power nodes, so that the adversarial space-time 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.
[0071] 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 realizing the adaptation of 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.
[0072] In order to improve the robustness of the model to noise, the embodiment of the present application provides a new adversarial robust spatiotemporal prediction. In 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 by 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 as to add different adversarial noises to different nodes according to the specific situation, thereby avoiding the loss of accuracy caused by adding too much adversarial noise to some nodes.
[0073] Figure 7 is another flow chart of a new energy power robust prediction method based on an adversarial spatiotemporal network provided in an embodiment of the present application. After step S170, the method may also include but is not limited to steps S710 to S750: Step S710, obtaining target node output characteristics of each new energy output node in the power system in a target historical period; Step S720, adjusting the initial in-degree feature according to the target loss to obtain the target in-degree feature; Step S730, adjusting the initial out-degree feature according to the target loss to obtain the target out-degree feature; Step S740, constructing a target adjacency matrix according to the target in-degree feature and the target out-degree feature; 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.
[0074] 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.
[0075] 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.
[0076] In step S740 of some embodiments, referring to step S120, feature learning is performed according to the target in-degree features and the target out-degree features to construct a learnable target adjacency matrix.
[0077] 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 by adversarial spatiotemporal network, spatiotemporal features are extracted based on the spatial features, and the output power of each new energy output node in the future period is predicted based on the spatiotemporal features to obtain the target output power. The future period is the period after the target historical period.
[0078] Through the above steps S710 to S750, the complex spatiotemporal relationship between the output nodes can be modeled by an adversarial spatiotemporal network and a learnable adjacency matrix to improve the accuracy of output power prediction.
[0079] See also Figure 8 The embodiment of the present application also 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: The first acquisition module 810 is used to acquire the initial in-degree characteristics and initial out-degree characteristics of the power system; the power system includes a plurality of new energy output nodes; A construction module 820 is used to construct 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; The second acquisition module 830 is used to obtain the historical output characteristics of each new energy output node in the power system in the historical period; A prediction module 840 is used to extract spatiotemporal features based on an adjacency matrix and historical output features of each new energy output node through a preset model, and predict the predicted output power of each new energy output node in a target period based on the spatiotemporal features; The third acquisition module 850 is used to obtain the reference output power of each new energy output node in the target period; A calculation module 860 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 the target loss; An adjustment module 870, used to adjust the model parameters of the preset model according to the target loss to obtain an adversarial spatiotemporal network; Among them, the adversarial space-time 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, wherein 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.
[0080] 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 implementation of the new energy power robust prediction method based on the adversarial space-time network mentioned above, and will not be repeated here.
[0081] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above-mentioned new energy power robust prediction method based on adversarial space-time network when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.
[0082] See also Fig. 9 , Fig. 9 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes: The processor 910 may be implemented by a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application; 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 solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 920, and the processor 910 calls and executes the robust prediction method of new energy power based on adversarial spatiotemporal network in the embodiment of this application; Input / output interface 930, used to implement information input and output; Communication interface 940, used to realize communication interaction between the device and other devices, which can be realized through wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.); 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 ); 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 .
[0083] 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 robust prediction method of new energy power based on adversarial spatiotemporal network.
[0084] 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 disposed 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.
[0085] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present 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 the present application are also applicable to similar technical problems.
[0086] Those skilled in the art will appreciate 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.
[0087] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0088] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0089] 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 sequence. 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 of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising 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.
[0090] It should be understood that in the present 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 objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single 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.
[0091] In the several embodiments provided in the present 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 only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, 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.
[0092] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0093] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0094] 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, and the computer software product is stored in a storage medium, including multiple instructions to enable 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: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.
[0095] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights 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: Acquire initial in-degree characteristics and initial out-degree characteristics of a power system; the power system includes a plurality of new energy output nodes; An adjacency matrix is constructed according to 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 a reference output power of each new energy output node during the target period; 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 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 a target in-degree feature and a target out-degree feature, wherein the target in-degree feature is obtained by adjusting the initial in-degree feature based on the target loss, and the target out-degree feature is obtained by adjusting the initial out-degree feature based on the target loss.
2. The method according to claim 1, characterized in that The loss calculation for noise resistance is performed 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, including: Get the target to counter the 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 counter 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; The target loss is obtained by performing loss calculation according to the predicted output power of each new energy output node, the target counteracting 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 of 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 according to 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; Acquire 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 of the initial anti-noise.
5. The method according to claim 3, characterized in that: The loss calculation is performed according to the initial hidden feature vector, the historical output feature of each new energy output node and the corresponding reference output power to obtain the candidate loss, 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 according to the initial countermeasure output power of each of the new energy output nodes 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 loss calculation according to the predicted output power of each new energy output node and the corresponding reference output power to obtain a first loss; Perform loss calculation according to 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. The method according to any one of claims 1 to 6, characterized in that: After the model parameters of the preset model are adjusted 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: Obtain the target node output characteristics of each new energy output node in the power system during the target historical period; Adjusting the initial in-degree feature according to the target loss to obtain a target in-degree feature; Adjusting the initial out-degree feature according to the target loss to obtain a target out-degree feature; Constructing a target adjacency matrix according to the target in-degree feature and the target out-degree feature; The target output power of each new energy output node in the 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.
8. A robust prediction device for new energy power based on adversarial spatiotemporal network, characterized in that: The device comprises: A first acquisition module is used to acquire initial in-degree characteristics and initial out-degree characteristics of a power system; the power system includes a plurality of new energy output nodes; A construction module, used to construct an adjacency matrix according to 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 the historical output characteristics of each new energy output node in the power system in 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 through 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, 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 the target loss; An adjustment module, used for 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 a target in-degree feature and a target out-degree feature, wherein the target in-degree feature is obtained by adjusting the initial in-degree feature based on the target loss, and the target out-degree feature is obtained by adjusting the initial out-degree feature based on the target loss.
9. An electronic device, characterized in that: The electronic device comprises 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 7 when executing the computer program.
10. 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 7 is implemented.
Citation Information
Patent Citations
Multi-wind power plant scene generation method based on adaptive space-time diagram generative adversarial network
CN116579239A
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
Generator set output determination method and apparatus, and electronic device
CN119051022A