Wind power plant wind speed prediction method based on space-time diagram neural network, medium and equipment

By introducing the frequency enhancement mechanism, dynamic diagram convolution, and Fourier diagram neural network in the neural network of time and space, the long -term characteristics of wind power field wind speed prediction in the existing technology are not well handled in the wind field wind speed prediction , Improving the predictive accuracy and fitting ability of the model.

CN119357605AInactive Publication Date: 2025-01-24NANJING UNIV OF INFORMATION SCI & TECH

Patent Information

Application Number
CN202411935307.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-01-24
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing space-time graph neural networks have problems such as poor long-term time feature processing, insufficient consideration of multi-scale time modes, static graph structures ignore dynamic spatial correlation, and single composition information is not enough to reflect complete spatial correlation, which limits the The predictive power of the model.

Method used

The frequency enhancement mechanism is used to process the original wind speed sequence, the temporal convolution module is used to extract temporal features, and the graph learning module is combined to construct a dynamic spatial graph structure, and dynamic graph convolution is performed to obtain spatiotemporal features. At the same time, Fourier graph neural network is used to simultaneously learn temporal features and spatial features in a unified spatiotemporal graph, and fuse them to improve prediction accuracy.

Benefits of technology

By enhancing the modeling of non-stationarity and frequency information, the model's ability to fit real-world data is improved, and the learning and prediction accuracy of spatio-temporal dependencies are enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119357605A_ABST
    Figure CN119357605A_ABST
Patent Text Reader

Abstract

The invention discloses a wind power plant wind speed prediction method, medium and equipment based on a space-time diagram neural network in the technical field of wind power generation, and the method comprises the steps: carrying out the frequency enhancement of an original wind speed sequence, and obtaining a frequency-enhanced wind speed sequence; inputting the frequency-enhanced wind speed sequence into a time convolution module to obtain time sequence characteristics; constructing a wind speed sequence containing unsteady state information according to the original wind speed sequence, and inputting the wind speed sequence containing the unsteady state information into a graph learning module to construct a space graph structure; performing dynamic graph convolution on the time sequence feature and the space graph structure to obtain a first spatial-temporal feature; constructing a time-space unified graph containing time sequence features and space features, and simultaneously learning the time sequence features and the space features in the time-space unified graph through a Fourier graph neural network to obtain second time-space features; and fusing the first spatio-temporal feature and the second spatio-temporal feature, and obtaining a wind speed prediction value in combination with the prediction time step. According to the method, the generalization ability of the model is improved, and hidden ground frequency information in the data can be better learned.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a wind farm wind speed prediction method, medium and equipment based on a spatiotemporal graph neural network, belonging to the technical field of wind power generation. Background Art

[0002] As a renewable and clean energy, wind energy has the advantages of flexible installation, reliable generator sets, low cost, and simple operation and maintenance.

[0003] However, the premise of stable operation of the power system is that power generation and power consumption must be balanced. The volatility and randomness of wind will cause the power grid to lose stability, so the problem of wind power abandonment is more prominent. For the safety of the power grid, accurate wind speed forecasting is a necessary condition for wind power to access the power grid. With the development of artificial intelligence, due to the significant advantages of graph neural networks in modeling data spatial correlation, a large number of researchers have begun to combine them with traditional neural networks to construct spatiotemporal graph neural networks for time series prediction. However, there are some problems with these existing methods. First, some spatiotemporal graph neural networks using traditional neural networks often cannot effectively process long-term temporal features and fail to fully consider multi-scale temporal patterns. Secondly, these methods usually use predefined graph structures or learned static graph structures to simulate the spatial associations between multiple wind turbines, causing them to ignore that the spatial associations between nodes should be dynamic. And they often use a single composition information or construct a single graph structure, which is often insufficient to reflect the complete spatial association. Finally, how to design an effective spatiotemporal graph neural network structure is also one of the issues that need to be considered. These factors will limit the predictive ability of the model.

[0004] To address the problem of modeling global dynamic spatial correlation in time series data, the prior art proposes a global spatiotemporal graph attention network model to predict time series data. Specifically, the model effectively fuses the static adjacency matrix adaptively learned by the graph learning module and the dynamic attention coefficient learned by the graph attention network through the global graph attention network module to capture the global dynamic spatial correlation between time series nodes. Compared with the method that only uses static graphs, this model can break through the assumption of fixed spatial correlation and explore dynamic spatial dependencies. A gated temporal convolution module composed of dilated causal convolutions is used to capture nonlinear temporal correlations. Then, these two modules are connected in series and stacked in multiple layers to predict wind speed data.

[0005] In order to solve the problem of modeling multi-scale temporal features in time series data and long-term and short-term correlations in the spatial domain, the prior art proposes a dynamic adaptive spatiotemporal graph neural network model, which uses dynamic graph convolution to simulate wind speed flow. Considering the long-term stability and short-term dynamic dependencies in the spatial domain, a dynamic adaptive graph generation module is proposed to model these two relationships separately, and the two are fused from different perspectives of importance to generate the final dynamic graph structure, which is finally input into the dynamic graph convolution module to extract the dynamic spatial features between nodes. Due to the volatility and randomness in wind speed data, convolutions with multiple convolution kernels of different sizes and dilated causal convolutions are used to model temporal features of different scales. The above components are integrated into a unified spatiotemporal graph neural network architecture for prediction.

[0006] The architecture design of spatiotemporal graph neural networks and the problem of a single information source for constructing dynamic graph structures. The prior art proposes a dynamic spatiotemporal interactive graph neural network model, which is a new spatiotemporal graph neural network for time series data prediction. The proposed dynamic graph reasoning module simulates the time-varying spatial associations between ocean nodes by fusing two types of heterogeneous information, intrinsic structural information and dynamic input information, and is combined with a dynamic graph convolution module to propagate information in the spatial dimension. At the same time, downsampling operations and sample convolution modules are jointly used to capture multi-resolution temporal correlations. Subsequently, these modules are integrated into a spatiotemporal interactive learning framework, thereby achieving the synchronous capture of spatiotemporal features.

[0007] Disadvantages of existing technologies: (1) In time series prediction tasks, existing technologies usually smoothen the data to obtain better prediction accuracy of the model. However, the lack of non-stationary information in real-world data may weaken the generalization ability of the model and thus fail to give accurate predictions in actual work. Therefore, both stationary and non-stationary information are important for fitting real-world data sets and improving the generalization ability of the model. (2) Secondly, in time series analysis scenarios, people always focus on exploring information in the time domain. In fact, the frequency domain information in the time series is of great significance and intuitiveness to time series analysis. Ignoring frequency information may cause the time series model to be unable to learn the intrinsic characteristics of the sequence information well. Data sets in the real world usually contain rich frequency information. Introducing frequency domain information into the model is also conducive to better learning the implicit features in the data and improving the prediction accuracy of the model. (3) In addition, the method of combining the time convolution module and the graph convolution module adopted by the existing technology is to first extract the time dependency and then extract the spatial dependency. Although it also has good results, it also has its own inherent defects. Since the temporal and spatial dependencies in wind speed data in the real world are mixed, unified, and interdependent, some elements will inevitably be ignored if a separate approach is used to extract the temporal and spatial dependencies separately. Summary of the invention

[0008] The technical problem to be solved by the present invention is to overcome the defects of the prior art and provide a wind speed prediction method, medium and equipment for a wind farm based on a spatiotemporal graph neural network.

[0009] In order to solve the above technical problems, the present invention is implemented by adopting the following technical solutions.

[0010] In a first aspect, the present invention provides a method for predicting wind speed in a wind farm based on a spatiotemporal graph neural network, comprising: Obtain the original wind speed sequence including the historical wind speed data of the target wind farm, input it into the pre-trained spatiotemporal graph neural network model, and output the wind speed prediction value; The data processing process of the pre-trained spatiotemporal graph neural network model includes: Perform frequency enhancement on the original wind speed sequence to obtain a frequency enhanced wind speed sequence; Inputting the frequency-enhanced wind speed sequence into a time convolution module to obtain time series features; Construct a wind speed sequence containing non-steady-state information according to the original wind speed sequence, and input the wind speed sequence containing non-steady-state information into a graph learning module to construct a spatial graph structure; Perform dynamic graph convolution on the temporal features and spatial graph structure to obtain the first spatiotemporal features; A unified spatiotemporal graph containing temporal features and spatial features is constructed according to the frequency-enhanced wind speed sequence. The temporal features and spatial features in the unified spatiotemporal graph are simultaneously learned through a Fourier graph neural network to obtain a second spatiotemporal feature. The first spatiotemporal feature and the second spatiotemporal feature are fused and combined with the prediction time step to obtain a wind speed prediction value.

[0011] Furthermore, the original wind speed sequence is expressed as X , ,in, represents the set of real numbers, T 0 is the total number of time steps, N is the number of wind turbine nodes.

[0012] Furthermore, the frequency enhancement of the original wind speed sequence to obtain the frequency enhanced wind speed sequence includes: The original input wind speed data is divided into N subgroups, ,in Indicates i The wind speed value component of the typhoon generator, T represents the matrix transpose; Each subgroup is processed from low frequency to high frequency using the corresponding DCT module, and each single channel will be processed by the same frequency component, which is represented by: = = ; In the formula, Frequency i represents the discrete cosine transformed T 0-dimensional vector, i ∈[1,2,…, N ], j ∈[1,2,…, T 0], j is corresponding to The one-dimensional index of the frequency components of ; ; In the formula, Indicates the intermediate quantity, l Indicates the network layer sequence number; Through the stacking operation, the entire frequency channel vector is obtained Frequency , expressed as: ; In the formula, represents the frequency-enhanced wind speed sequence, X represents the original wind speed sequence, stack (·) indicates stacking operation, IDCT (·) represents inverse discrete cosine transform.

[0013] Furthermore, the calculation formula of the time series feature is: X T =tanh( DIC ( X K ))⊙ sigmoid ( DIC ( X K )); In the formula, X T Represents the time series characteristics, DIC ( X K ) represents the dilated starting convolution, ⊙ represents the Hadamard product, sigmoid (·)express sigmoid Activation function, X K Represents the dilated convolution result; X K = concat ( x*f 1×2 , x*f 1×3 , x*f 1×6 , x*f1×7 ); In the formula, concat (·) indicates a connection operation, f 1×r Indicates the size r One-dimensional filter, r =2,3,6 or 7, x Represents the frequency-enhanced wind speed sequence of the input.

[0014] Furthermore, the calculation formula of the wind speed sequence containing non-steady-state information is: ; In the formula, represents the wind speed sequence containing non-steady-state information, X represents the original wind speed sequence, Attention ( Q ´, K ´, V ´, t,D ) represents the attention weight score matrix calculated by the destabilized attention mechanism, Q ´、 K ´、 V ´ represents the three weight matrices defined by the destabilized attention mechanism, t represents the scaling factor, ∆ represents the translation vector; ; In the formula, Softmax ( ) represents the normalized exponential function, T represents the matrix transpose, d k Represents dimension value; ; ; ; In the formula, Q , K , V It indicates that the three weight matrices used in the attention mechanism calculation are calculated based on the original wind speed sequence. m Q express Q The mean value in the time dimension is m K express K The mean value in the time dimension is m V express V The mean value in the time dimension is s X Indicates wind speed data X The standard deviation of ; ; In the formula, Represents the set of real numbers.

[0015] Furthermore, the spatial graph structure is expressed as: ; In the formula, Represents the spatial graph structure, Softmax (·) represents the normalized exponential function, Re Lu (·) represents a nonlinear activation function, LN (·) represents the layer normalization function, Represents the fusion matrix containing static structure information A S and a matrix containing dynamic dependencies The relationship between wind turbines in the constructed real-world scenario; ; In the formula, f s,6 , f s,5 They represent nonlinear mapping functions, Represents the intermediate calculation results of the dynamic graph.

[0016] Furthermore, the expression of the dynamic graph convolution is: ; In the formula, Represents the first l The output of the layer graph convolution, m represents the power series in the graph convolution process, m ∈[0, k ]; represents the temporal convolution module l The output of the multi-scale temporal convolution module, W i Represents a feature selector filter node i Noise information between ; Where ⊙ represents the Hadamard product, Softmax (·) represents the normalized exponential function, represents the spatial relationship between all nodes, Indicates l Layer personalized guidance matrix.

[0017] Furthermore, during the training of the spatiotemporal graph neural network model, the loss function used is: ; In the formula, represents the hybrid loss function of the spatiotemporal graph neural network model, represents the output loss function of the spatiotemporal graph neural network model, represents the graph loss function of the graph learning module, α represents the balanced hyperparameter, Represents all parameters of the model, represents the model trainable parameters, Indicates that all trainable parameters are loss The training is done in the direction of minimum value, and the final value is the value that minimizes the loss, completing the training; ; In the formula, represents the Frobenius norm of the matrix, represents the square of the L2 norm, and Represents a wind turbine node v i and wind turbine nodes v j The input signal, c represents the hyperparameter, Represents a wind turbine node v i and wind turbine nodes v j The spatial graph structure between Represents the spatial relationship between all nodes; ; In the formula, v Represents the wind speed vector for each wind turbine. v i Indicates i The wind speed vector of the typhoon generator, represents the mean absolute error, Indicates i The wind speed forecast value of the typhoon generator, Indicates i The actual value of the typhoon generator wind speed.

[0018] In a second aspect, the present invention provides a computer-readable storage medium storing one or more programs, wherein the one or more programs include instructions, which, when executed by a computing device, cause the computing device to perform the method of the first aspect.

[0019] In a third aspect, the present invention provides a computer device, comprising: One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include instructions for executing the method in the first aspect.

[0020] The beneficial effects achieved by the present invention are: In order to fit the stationary and non-stationary information of real-world datasets and improve the generalization ability of the model, the present invention adopts a destabilizing attention mechanism to enhance the learning of non-stationary features.

[0021] In order to enable the model to better learn the frequency information implicit in the data, the present invention adopts a frequency enhancement mechanism to explore the frequency domain information in the data and improve the performance of the model in the wind speed prediction scenario of a real wind farm.

[0022] In order to overcome the existing technology's separation of time dependency and space dependency extraction method, on this basis, the present invention adopts the Fourier graph neural network with a dynamic unified perspective of time and space, and through the construction of a unified time and space graph data structure, parallel calculation with the existing technology, collaborative learning data, training models, and improving the prediction accuracy of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 It is a schematic diagram of the principle of the present invention. DETAILED DESCRIPTION

[0024] The present invention will be further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the protection scope of the present invention.

[0025] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and the like are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, features defined as "first", "second", and the like may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "multiple" means two or more.

[0026] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood by specific circumstances.

[0027] Embodiment 1: This embodiment introduces a wind speed prediction method for a wind farm based on a spatiotemporal graph neural network, comprising: Obtain the original wind speed sequence including the historical wind speed data of the target wind farm, input it into the pre-trained spatiotemporal graph neural network model, and output the wind speed prediction value; The data processing process of the pre-trained spatiotemporal graph neural network model includes: Perform frequency enhancement on the original wind speed sequence to obtain a frequency enhanced wind speed sequence; Inputting the frequency-enhanced wind speed sequence into a time convolution module to obtain time series features; Construct a wind speed sequence containing non-steady-state information according to the original wind speed sequence, and input the wind speed sequence containing non-steady-state information into a graph learning module to construct a spatial graph structure; Perform dynamic graph convolution on the temporal features and spatial graph structure to obtain the first spatiotemporal features; A unified spatiotemporal graph containing temporal features and spatial features is constructed according to the frequency-enhanced wind speed sequence. The temporal features and spatial features in the unified spatiotemporal graph are simultaneously learned through a Fourier graph neural network to obtain a second spatiotemporal feature. The first spatiotemporal feature and the second spatiotemporal feature are fused and combined with the prediction time step to obtain a wind speed prediction value.

[0028] The original wind speed series is expressed as X , ,in, represents the set of real numbers, T 0 is the total number of time steps, N is the number of wind turbine nodes.

[0029] The frequency enhancement of the original wind speed sequence to obtain the frequency enhanced wind speed sequence includes: The original input wind speed data is divided into N subgroups, ,in Indicates i The wind speed value component of the typhoon generator, T represents the matrix transpose; Each subgroup is processed from low frequency to high frequency using the corresponding DCT module, and each single channel will be processed by the same frequency component, which is represented by: = = ; In the formula, Frequency i represents the discrete cosine transformed T 0-dimensional vector, i ∈[1,2,…, N ], j ∈[1,2,…, T 0], j is corresponding to The one-dimensional index of the frequency components of ; ; In the formula, Indicates the intermediate quantity, l Indicates the network layer sequence number; Through the stacking operation, the entire frequency channel vector is obtained Frequency , expressed as: ; In the formula, represents the frequency-enhanced wind speed sequence, X represents the original wind speed sequence, stack (·) indicates stacking operation, IDCT (·) represents inverse discrete cosine transform.

[0030] The calculation formula of the timing characteristics is: X T =tanh( DIC ( X K ))⊙ sigmoid ( DIC ( X K )); In the formula, X T Represents the time series characteristics, DIC ( X K ) represents the dilated starting convolution, ⊙ represents the Hadamard product, sigmoid (·)express sigmoid Activation function, X K Represents the dilated convolution result; X K = concat ( x*f 1×2 , x*f 1×3 , x*f 1×6 , x*f 1×7 ); In the formula, concat (·) indicates a connection operation, f 1×r Indicates the size r One-dimensional filter, r =2,3,6 or 7, x Represents the frequency-enhanced wind speed sequence of the input.

[0031] The calculation formula of the wind speed sequence containing non-steady-state information is: ; In the formula, represents the wind speed sequence containing non-steady-state information, X represents the original wind speed sequence, Attention ( Q ´, K ´, V ´, t,D ) represents the attention weight score matrix calculated by the destabilized attention mechanism, Q ´、 K ´、 V ´ represents the three weight matrices defined by the destabilized attention mechanism, t represents the scaling factor, ∆ represents the translation vector; ; In the formula, Softmax ( ) represents the normalized exponential function, T represents the matrix transpose, d k Represents dimension value; ; ; ; In the formula, Q , K , V It indicates that the three weight matrices used in the attention mechanism calculation are calculated based on the original wind speed sequence. m Q express Q The mean value in the time dimension is m K express K The mean value in the time dimension is m V express V The mean value in the time dimension is s X Indicates wind speed data X The standard deviation of ; ; In the formula, Represents the set of real numbers.

[0032] The expression form of the spatial graph structure is: ; In the formula, Represents the spatial graph structure, Softmax (·) represents the normalized exponential function, Re Lu (·) represents a nonlinear activation function, LN (·) represents the layer normalization function, Represents the fusion matrix containing static structure information A S and a matrix containing dynamic dependencies The relationship between wind turbines in the constructed real-world scenario; ; In the formula, f s,6 , f s,5 They represent nonlinear mapping functions, Represents the intermediate calculation results of the dynamic graph.

[0033] The expression of the dynamic graph convolution is: ; In the formula, Represents the first l The output of the layer graph convolution, m represents the power series in the graph convolution process, m ∈[0, k ]; represents the temporal convolution module l The output of the multi-scale temporal convolution module, W i Represents a feature selector filter node i Noise information between ; Where ⊙ represents the Hadamard product, Softmax (·) represents the normalized exponential function, represents the spatial relationship between all nodes, Indicates l Layer personalized guidance matrix.

[0034] In the process of training the spatiotemporal graph neural network model, the loss function used is: ; In the formula, represents the hybrid loss function of the spatiotemporal graph neural network model, represents the output loss function of the spatiotemporal graph neural network model, represents the graph loss function of the graph learning module, α represents the balanced hyperparameter, Represents all parameters of the model, represents the model trainable parameters, Indicates that all trainable parameters are loss The training is done in the direction of minimum value, and the final value is the value that minimizes the loss, completing the training; ; In the formula, represents the Frobenius norm of the matrix, represents the square of the L2 norm, and Represents a wind turbine node v i and wind turbine nodes v j The input signal, c represents the hyperparameter, Represents a wind turbine node v i and wind turbine nodes v j The spatial graph structure between Represents the spatial relationship between all nodes; ; In the formula, v Represents the wind speed vector for each wind turbine. v i Indicates i The wind speed vector of the typhoon generator, represents the mean absolute error, Indicates i The wind speed forecast value of the typhoon generator, Indicates i The actual value of the typhoon generator wind speed.

[0035] Example 2: This example introduces a wind speed prediction method for a wind farm based on a spatiotemporal graph neural network. Figure 1 As shown, it can specifically support simultaneous prediction of multiple wind turbines in a wind farm.

[0036] Step 1: First, read the historical wind speed data of multiple wind turbines as the original wind speed sequence represented as X , ,in, represents the set of real numbers, T 0 is the total number of time steps, and N is the number of wind turbine nodes; initialize the model parameters such as the number of nodes in the graph, the proportion of randomly discarded neurons, the number of channels, the batch size, the receptive field size, the number of iterations, the number of training rounds, the input time step, and the prediction time step.

[0037] Step 2: Extraction of non-stationary information, including: In time series prediction tasks, people usually stabilize the data to obtain better prediction accuracy of the model. However, the lack of non-stationary information in real-world data may weaken the generalization ability of the model and thus fail to give accurate predictions in actual work. Therefore, both stationary and non-stationary information are important for fitting real-world data sets and improving the generalization ability of the model. To achieve this, the present invention adopts a de-stationary attention mechanism to enhance the modeling of non-stationary information. For the original input sequence X =[ x 1 , x 2 ,…, x T0 ], the three matrices used in attention calculation can be calculated (Q(Query), K(Key), V(Value), Q, K, V are three matrices in the attention mechanism calculation process, which are used to calculate the attention weights between sequences. Query can be understood as "question" or "query". In the attention mechanism, it represents the element or position currently being processed, and needs to obtain information from other elements. Q = W Q X , K = W K X , V = W V X , W Q , W K , W V They are used to calculate Q , K , V The initial values ​​of the three matrices are randomly initialized.

[0038] In sequence tasks, Query is usually the hidden state of the current position, which needs to obtain relevant information from other positions in the sequence. Key can be understood as a "key", which is used together with Query to calculate the attention score to determine which positions' information is more important to the current position. In sequences, Key is usually the hidden state of other positions, which are used together with Query to calculate the attention score. Value can be understood as "value" or "data", once it is determined which positions' information is important through Query and Key, Value contains the specific information of these positions. In sequences, Value is also the hidden state of other positions, but they are the values ​​selected to update the current position information). d k is the dimension value. After normalization, we get a stationary sequence ,in is an all-1 matrix ( m , s Mathematically, they refer to the mean and standard deviation of the data, respectively). ,in, m Q express Q The mean value in the time dimension. Similarly, we can get K ´, V ´( Q ´, K ´, V ´ is the same as Q, K, V in nature, and is an attention weight matrix, except that it is a special weight matrix defined by the above formula, i.e., a de-stationary attention mechanism). The present invention also takes non-stationary information into account in the process of calculating attention, and defines non-stationary factors: scaling factor Used to adjust time-dependent weights and translation vectors The present invention uses a simple and efficient multi-layer perceptron to extract the original sequence from the original sequence that has not been normalized. X Statistics m X , s X The non-stationary factor is learned in . The non-stationary attention is calculated as follows: , , ; in t , D Contains the non-stationary characteristics of the sequence, Q ´、 K ´、 V' is generated from the steady-state sequence. Therefore, the model can simultaneously model the steady-state information and non-steady-state information in the original sequence, improving the generalization ability of the model and improving the performance in actual scenarios. At the same time, the present invention adopts a skip connection, and obtains .

[0039] Step 3: Spatial graph learning module, including: Static structural information. In the long run, the spatial position relationship between wind turbine nodes is fixed, which also includes their inherent correlation. However, the use of a predefined adjacency matrix can only reflect the relationship determined by a single rule, while ignoring the spatial relationship inherent in the data. For this reason, the present invention designs a static structural information generation module to model the long-term stable spatial dependency in the data. The present invention uses node encoding to infer static structural information, randomly initializes a node embedding dictionary for all wind turbine nodes, and generates a static structural information model. , N and d Represent the number of nodes and the dimension of node embedding respectively. Then the static graph is defined as follows: ; in, , ; Different from the commonly used method of constructing adjacency matrix, A S It is regarded as fixed static spatial information, so Re is not used. Lu and Softmax The functions construct the adjacency matrix by eliminating weak connections and normalizing them respectively.

[0040] Dynamic dependency information. In the short term, the dynamic dependency between wind turbine nodes is mainly caused by short-term meteorological changes. For example, the wind speed at the location of a wind turbine changes, and over time, its influence will spread to the surrounding wind turbine nodes. Therefore, short-term dynamic dependency is also very important for accurately predicting wind speed. To this end, the present invention designs a dynamic dependency inference module to model short-term dynamic time series information features. The dynamic time series features are extracted using a convolutional model, that is, ,in, d The convolution kernel size is 1× T , , (in represents the output of the destabilized attention mechanism, that is The output of the convolution is T is the time step, d is the dimension size). In order to further extract hidden dynamic dependencies and enable better convergence of graph learning, a gating mechanism is also used to fuse long-term and short-term information, namely: , , , ; where · represents the dot product, ⊙ is the Hadamard product, W represents the trainable parameter matrix, represents the fusion result at time T. (Only the last of the four formulas above has h T Represents the output of the fusion result. The symbols on the left side of the above three formulas are the variables in the intermediate calculation process and have no actual physical meaning. M S It is also an intermediate calculation result. E is the node embedding dictionary mentioned above. obtained in ).

[0041] On this basis, the present invention further uses cosine similarity to infer the dynamic dependencies between nodes and learn the weights of edges in the subspace. This method is similar to the graph attention network, but has better computing performance and learning ability. The calculation process is defined as follows: ; in, LN is layer normalization used to stabilize the training process, represents the two nonlinear mapping functions in the k-th head. represents the inner product operation, D is the dimension of each head, represents the fusion result of the i-th and j-th nodes, Indicated in k Nodes in the subspace and The weight of the edge between . Dropout is used to prevent the model from overfitting. Then use the nonlinear mapping function And residual connections to speed up the training process, namely: ; In order to prevent the derived graph matrix from converging to a rank 1 matrix, the present invention adds the relationships learned in each subspace and adds skip connections, namely: ; The skip connection and nonlinear function here The role of is to improve the nonlinear ability of dependency reasoning. Finally, a feedforward neural network is used to obtain the first i and j The final dynamic dependency relationship of the nodes is: ; After the above modules, the matrices containing static structure information are obtained respectively. A s and a matrix containing dynamic dependencies A On this basis, these two information features can be integrated to construct a graph structure that can model the relationship between wind turbines in real scenes from different angles, that is, .in, Dropout This is to prevent the model from overfitting. Finally, by using Re Lu function to eliminate relatively weak connections between nodes, and Softmax After normalization, we can get the final graph structure representation of the relationship between wind turbine groups, namely: .

[0042] Step 4: Frequency enhancement mechanism, including: In the time series analysis scenario, people always focus on exploring information in the time domain. In fact, the frequency domain information in the time series is of great significance and intuitiveness to time series analysis. Ignoring frequency information may cause the time series model to be unable to learn the intrinsic characteristics of the sequence information well. Data sets in the real world usually contain rich frequency information. Introducing frequency domain information into the model is also conducive to better learning the implicit features in the data and improving the prediction accuracy of the model. To this end, the present invention adopts a frequency enhancement mechanism to mine time domain and frequency information from the original sequence data. First, the present invention divides the original input wind speed data into N subgroups, ,in Indicates i The wind speed value component of the typhoon generator, T represents the matrix transpose; Each subgroup is processed from low frequency to high frequency using the corresponding DCT (discrete cosine transform) module, and each single channel will be processed by the same frequency component, which is represented by: = = ; In the formula, Frequency i represents the discrete cosine transformed T 0-dimensional vector, i ∈[1,2,…, N ], j ∈[1,2,…, T 0], j is corresponding to The one-dimensional index of the frequency components of ; ; In the formula, Indicates the intermediate quantity, l Indicates the network layer sequence number.

[0043] Through the stacking operation, the entire frequency channel vector can be obtained: ; Original sequence X After the above calculation, the frequency-enhanced sequence is obtained. .

[0044] Step 5: Temporal convolution module, including: Extracting the temporal dependency in wind speed data is the key to accurately predicting wind speed. Among them, modeling the long-term and short-term pattern dependencies of wind speed is of paramount importance. In order to make the model perform well in processing long-term wind speed sequences, the present invention adopts a multi-scale time convolution module composed of an expanded start convolution and a gating mechanism to extract the dependency characteristics of wind speed time series. The expanded start convolution is different from ordinary convolution that increases the network depth or the number of convolution kernels to expand the size of the receptive field. This method adds a dilation factor, which enables it to increase the receptive field in a non-recursive parallel computing manner, showing unique advantages in modeling long-term temporal dependencies, while also reducing the complexity of the model. When the receptive field is larger than the length of the input sequence, the expanded start convolution maintains the temporal order by filling the input with zeros, ensuring that the model is only visible to historical data and shielding future information. Formally, given a size of r One-dimensional filter f 1×r and a sequence input , the dilated starting convolution is defined as: ; in, is the dilation factor. In order to capture wind speed features of different scales, the present invention uses dilated starting convolutions consisting of four filter sizes in parallel, namely 1×2, 1×3, 1×6, and 1×7. The calculation process of the dilated convolution layer is as follows: ; The outputs of four filters are truncated to a uniform length according to the largest filter and connected in series in the channel dimension to obtain the complete output. By stacking dilated convolutional layers with gradually increasing dilation factors, the receptive field of the model also grows in a prime number, which ensures that the computational overhead is not increased too much while enhancing the model's ability to model long-term temporal dependencies. The gating mechanism can control the flow of information well. It uses the tanh hyperbolic activation function and the sigmoid activation function as a filter and a gating device respectively to control the wind speed information features passed to the subsequent network. The formal definition is as follows: .

[0045] Step 6: Dynamic graph convolution, including: The graph convolution operation generates new node features by fusing the features of a node and its neighboring nodes. The dynamic graph convolution module fuses the wind speed time dependency output by the time convolution module and the node spatial dependency generated by the graph learning module to analyze and learn the spatiotemporal features of the wind speed data. In addition, the present invention also adds a learnable guidance matrix to automatically adjust the propagation weights between domains to achieve dynamic adaptive learning propagation. l The output of the multi-scale temporal convolution module is , the learnable matrix is , No. l The layer graph convolution formula is defined as follows: ; in, Indicates l The output of the layer graph convolution, , Represents the spatial relationship between all nodes, that is, the graph matrix shared by each layer, which represents the modeling result of the spatial dependency between wind speed sequences by the graph learning module. It is l The personalized guidance matrix of the layer is used to dynamically adjust the weights between adjacent nodes to achieve better learning results. This graph convolution module is based on an existing graph convolution method that smoothes node spatial information by aggregating and transforming adjacent information of nodes, and also draws on the idea of ​​the diffusion model. The final dynamic graph convolution is defined as follows: ; in, , As a feature selector, it filters the noise information between nodes, maintains the effective relationship between nodes, and improves the model prediction ability.

[0046] Step 7: Fourier graph neural network, including: The method of combining the time convolution module and the graph convolution module used above is to extract the time dependency first and then the space dependency. Although it also has good results, it also has its own inherent defects. Since the time and space dependencies in the wind speed data in the real world are mixed, unified, and interdependent, if a separate method is used to extract the time and space dependencies separately, some elements will inevitably be ignored. In order to make up for this defect, the present invention proposes to use Fourier graph neural network to learn time series from a unified perspective of time and space dynamics, and to calculate in parallel with the method of combining the time convolution module and the graph convolution module, and finally fuse the results to collaboratively learn and model the time and space dependencies in the data, realizing the organic combination of time and space relationship separation and unified learning methods, and further improving the model's ability to fit real data.

[0047] Construction of a unified space-time graph. In order to model the internal dependencies of space-time in reality from a unified perspective, it is necessary to define a data structure that contains both time information and space information - a unified space-time graph. , the present invention constructs a unified space-time graph ,in, Represents node characteristics, is the adjacency matrix that makes the space-time unified graph a fully connected graph. NT Each node represents the value of each variable at each time step. Through this data result, we can learn the internal dependencies of the data from a unified perspective of time and space.

[0048] After constructing a unified spatiotemporal graph from the original multivariate wind speed series, After node embedding, ,in, is the embedding matrix, and we get . Then in The discrete Fourier transform (DFT) is performed on the space-time dimension of the Fourier space, and the transformation result is further combined with the Fourier operator in the Fourier space. Multiply, the calculation process is defined as follows: ; Then After the inverse Fourier transform is converted to the time domain, the final output containing the spatiotemporal dependencies is obtained through the feedforward network, which is defined as follows: .

[0049] Step 8: Optimize objectives, including: Graph loss: The quality of the learned graph directly reflects the effectiveness of modeling the spatial dependency of the wind turbine group. Therefore, improving the quality of the graph is crucial to improving the model's prediction ability. Unlike the previous method of using a predefined graph structure, the graph obtained by this approach is simplistic and lacks flexibility. The model of the present invention defines a graph loss, which can dynamically model the spatial dependency between nodes according to the changes in the time series, and can be adaptively adjusted according to the graph loss to ensure that the optimal graph structure is learned. On the one hand, it is necessary to make the graph conform to Laplace smoothing. On the other hand, the connectivity and sparsity of the graph are key indicators for measuring graph quality. Taking the above factors into consideration, the present invention defines the graph loss formula as follows: ; In the formula, represents the Frobenius norm of the matrix, represents the square of the L2 norm, and Represents a wind turbine node v i and wind turbine nodes v j The input signal, c represents the hyperparameter, Represents a wind turbine node v i and wind turbine nodes v j The spatial graph structure between represents the spatial relationship between all nodes; the first term in the formula ensures the connectivity of the graph, and the second term ensures the sparsity of the graph.

[0050] The whole framework consists of non-stationary feature extraction, spatial graph learning, frequency enhancement mechanism, spatiotemporal separation graph neural network, Fourier graph neural network and an output module. In each spatiotemporal layer, the present invention sets a jump connection directly connected to the output module to accelerate the convergence speed and prevent the gradient from disappearing. The final prediction result and output loss function are defined as follows: ; ; in, It is l The output of the spatiotemporal layer, Represents the mean absolute error, and the convolution kernel is 1× when the jump connection is used. h i Standard convolution, h i It is i The output module of the model consists of two standard convolutional layers, which convert the number of input channels to the output dimension.

[0051] In the model, the graph structure is obtained by adding a spatial graph learning module with graph loss to ensure the quality of the graph, and is further used in the dynamic graph convolution operation. Therefore, the spatial graph learning module and the dynamic graph convolution module promote each other and are trained collaboratively. These optimization goals are integrated together, where α is a balancing hyperparameter.

[0052] ; In the formula, represents the hybrid loss function of the spatiotemporal graph neural network model, represents the output loss function of the spatiotemporal graph neural network model, represents the graph loss function of the graph learning module, α represents the balanced hyperparameter, Represents all parameters of the model, represents the model trainable parameters, Indicates that all trainable parameters are loss The training is done in the direction of the smallest value, and the final value is the value that minimizes the loss, completing the training.

[0053] The model of the present invention improves the fitting ability of real data in complex scenes by extracting non-stationary features and enhancing frequency information, and constructs a high-quality graph structure based on learnable node embedding and dynamic input signals and through extraction. In the spatiotemporal layer network, the present invention first uses a time convolution module to extract the temporal features of each node, and then further extracts the spatial features in combination with the graph structure obtained by the graph learning module. At the same time, the present invention uses the Fourier graph neural network in parallel to extract the spatiotemporal features of the node data from a unified perspective of time and space, and finally jointly optimizes the model parameters based on the hybrid loss.

[0054] Embodiment 3, this embodiment provides a computer-readable storage medium storing one or more programs, wherein the one or more programs include instructions, and when the instructions are executed by a computing device, the computing device executes the method of embodiment 1.

[0055] Embodiment 4, the present invention provides a computer device, comprising: One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include instructions for executing the method of Example 2.

[0056] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0057] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure one A process or multiple processes and / or boxes Figure oneA device that provides the functions specified in a block or multiple blocks.

[0058] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure one A process or multiple processes and / or boxes Figure one A function specified in one or more boxes.

[0059] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure one A process or multiple processes and / or boxes Figure one The steps for the functions specified in one or more boxes.

[0060] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A wind farm wind speed prediction method based on spatiotemporal graph neural network, characterized in that: include: Obtain the original wind speed sequence including the historical wind speed data of the target wind farm, input it into the pre-trained spatiotemporal graph neural network model, and output the wind speed prediction value; The data processing process of the pre-trained spatiotemporal graph neural network model includes: Perform frequency enhancement on the original wind speed sequence to obtain a frequency enhanced wind speed sequence; Inputting the frequency-enhanced wind speed sequence into a time convolution module to obtain time series features; Construct a wind speed sequence containing non-steady-state information according to the original wind speed sequence, and input the wind speed sequence containing non-steady-state information into a graph learning module to construct a spatial graph structure; Perform dynamic graph convolution on the temporal features and spatial graph structure to obtain the first spatiotemporal features; A unified spatiotemporal graph containing temporal features and spatial features is constructed according to the frequency-enhanced wind speed sequence. The temporal features and spatial features in the unified spatiotemporal graph are simultaneously learned through a Fourier graph neural network to obtain a second spatiotemporal feature. The first spatiotemporal feature and the second spatiotemporal feature are fused and combined with the prediction time step to obtain a wind speed prediction value.

2. The wind speed prediction method for wind farms based on spatiotemporal graph neural network according to claim 1 is characterized in that: The original wind speed series is expressed as X , ,in, represents the set of real numbers, T 0 is the total number of time steps, N is the number of wind turbine nodes.

3. The wind speed prediction method for wind farms based on spatiotemporal graph neural network according to claim 2 is characterized in that: The frequency enhancement of the original wind speed sequence to obtain the frequency enhanced wind speed sequence includes: The original input wind speed data is divided into N subgroups, ,in Indicates i The wind speed value component of the typhoon generator, T represents the matrix transpose; Each subgroup is processed from low frequency to high frequency using the corresponding DCT module, and each single channel will be processed by the same frequency component, which is represented by: = = ; In the formula, Freq i represents the discrete cosine transformed T 0-dimensional vector, i ∈[1,2,…, N ], j ∈[1,2,…, T 0], j is corresponding to The one-dimensional index of the frequency component, the DCT module is a discrete cosine transform module; ; In the formula, Indicates the intermediate quantity, l Indicates the network layer sequence number, π represents Pi, Represents cosine operation; Through the stacking operation, the entire frequency channel vector is obtained Freq , expressed as: ; In the formula, represents the frequency-enhanced wind speed sequence, X represents the original wind speed sequence, stack (·) indicates a stacking operation, IDCT (·) represents inverse discrete cosine transform.

4. The wind speed prediction method for wind farms based on spatiotemporal graph neural network according to claim 1 is characterized in that: The calculation formula of the timing characteristics is: X T =tanh( DIC ( X K ))⊙ sigmoid ( DIC ( X K )); In the formula, X T Represents the time series characteristics, DIC ( X K ) represents the dilated starting convolution, ⊙ represents the Hadamard product, sigmoid (·)express sigmoid Activation function, X K Represents the dilated convolution result; X K = concat ( x*f 1×2 , x*f 1×3 , x*f 1×6 , x*f 1×7 ); In the formula, concat (·) indicates a connection operation, f 1×r Indicates the size r One-dimensional filter, r =2,3,6 or 7, x Represents the frequency-enhanced wind speed sequence of the input.

5. The wind speed prediction method for wind farms based on spatiotemporal graph neural network according to claim 1 is characterized in that: The calculation formula of the wind speed sequence containing non-steady-state information is: ; In the formula, represents the wind speed sequence containing non-steady-state information, X represents the original wind speed sequence, Attn ( Q ´, K ´, V ´, τ,∆ ) represents the attention weight score matrix calculated by the destabilized attention mechanism, Q ´、 K ´、 V ´ represents the three weight matrices defined by the destabilized attention mechanism, τ represents the scaling factor, ∆ represents the translation vector; ; In the formula, Softmax ( ) represents the normalized exponential function, T represents the matrix transpose, d k Indicates dimension value; ; ; ; In the formula, Q , K , V represents the three weight matrices calculated from the original wind speed sequence and used in the attention mechanism calculation, μ Q express Q The mean value in the time dimension is μ K express K The mean value in the time dimension is μ V express V The mean value in the time dimension is σ X Represents the original wind speed series X The standard deviation of ; ; In the formula, Represents the set of real numbers.

6. The wind speed prediction method for wind farms based on spatiotemporal graph neural network according to claim 1, characterized in that: The expression form of the spatial graph structure is: ; In the formula, Represents the spatial graph structure, Softmax (·) represents the normalized exponential function, represents a nonlinear activation function, LN (·) represents the layer normalization function, Represents the fusion matrix containing static structure information A S and a matrix containing dynamic dependencies The relationship between wind turbines in the constructed real-world scenario; ; In the formula, f s,6 , f s,5 They represent nonlinear mapping functions, Represents the intermediate calculation results of the dynamic graph.

7. The method for wind farm wind speed prediction based on spatiotemporal graph neural network according to claim 1, characterized in that: The expression of the dynamic graph convolution is: ; In the formula, Represents the first l The output of the layer graph convolution, m represents the power series in the graph convolution process, m ∈[0, k ]; represents the temporal convolution module l The output of the multi-scale temporal convolution module, W i Represents a feature selector filter node i Noise information between ; Where ⊙ represents the Hadamard product, Softmax (·) represents the normalized exponential function, represents the spatial relationship between all nodes, Indicates l Layer personalized guidance matrix.

8. The method for wind farm wind speed prediction based on spatiotemporal graph neural network according to claim 1, characterized in that: In the process of training the spatiotemporal graph neural network model, the loss function used is: ; In the formula, represents the hybrid loss function of the spatiotemporal graph neural network model, represents the output loss function of the spatiotemporal graph neural network model, represents the graph loss function of the graph learning module, α represents the balanced hyperparameter, Represents all parameters of the model, represents the model trainable parameters, Indicates that all trainable parameters are loss The training is done in the direction of minimum value, and the final value is the value that minimizes the loss, completing the training; ; In the formula, represents the Frobenius norm of the matrix, represents the square of the L2 norm, and Represents a wind turbine node v i and wind turbine nodes v j The input signal, γ represents the hyperparameter, Represents a wind turbine node v i and wind turbine nodes v j The spatial graph structure between Represents the spatial relationship between all nodes; ; In the formula, v Represents the wind speed vector for each wind turbine. v i Indicates i The wind speed vector of the typhoon generator, represents the mean absolute error, Indicates i The wind speed forecast value of the typhoon generator, Indicates i The actual value of the typhoon generator wind speed.

9. A computer-readable storage medium storing one or more programs, characterized in that: The one or more programs include instructions which, when executed by a computing device, cause the computing device to perform the method of any one of claims 1 to 8.

10. A computer device, characterized in that: include, One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include instructions for executing any of the methods described in claims 1 to 8.

Citation Information

Patent Citations

  • Multi-step meteorological prediction method based on multivariate time series diagram neural network

    CN116559975A

  • Multivariate time series prediction method and system based on adaptive graph learning network

    CN118626829A

  • Wind speed prediction method and device and storage medium

    CN118673464A

Cited By

  • Wind speed data prediction method and device, electronic equipment and storage medium

    CN120687759A

  • Wind speed data prediction methods, devices, electronic equipment and storage media

    CN120687759B

  • Wind speed prediction method and device and storage medium

    CN120805076A

  • A wind speed prediction method, device and storage medium

    CN120805076B

  • Low-altitude wind field prediction method and system based on space-time diagram convolutional network

    CN121389044A