Wind speed prediction method and device, storage medium and computer program product

By combining long short-term memory networks and graph attention networks to analyze the temporal and spatial characteristics of wind farms, the problem of insufficient accuracy in traditional wind speed prediction methods is solved, and more accurate wind speed prediction is achieved.

CN119783901BActive Publication Date: 2025-10-10HUANENG CLEAN ENERGY RES INST +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411972199.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-10-10
Estimated Expiration
2044-12-30

AI Technical Summary

Technical Problem

Traditional wind speed prediction methods only consider time characteristics, resulting in inaccurate wind speed prediction results.

Method used

Combining long short-term memory networks and graph attention networks, the wind speed is predicted using adjacency matrix and multi-dimensional representation vectors by analyzing the temporal characteristics and spatial correlation of wind farms.

Benefits of technology

The accuracy of wind speed prediction is improved, the temporal and spatial characteristics of wind farms are comprehensively considered, and the prediction precision is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119783901B_ABST
    Figure CN119783901B_ABST
Patent Text Reader

Abstract

The application discloses a wind speed prediction method and device, a storage medium and a computer program product, relates to the field of wind power engineering, and comprises the following steps: determining the time characteristics of the i th wind farm according to the first wind speed and the first wind direction of the i th wind farm at a historical time, wherein i is a positive integer; determining the representation vector of the i th wind farm according to the time characteristics and an adjacency matrix, wherein the adjacency matrix is a matrix representing the spatial correlation between adjacent wind farms in N wind farms, the representation vector is a multi-dimensional vector fusing the time characteristics and the spatial characteristics of the i th wind farm, N is a positive integer, and i is less than or equal to N; and determining the target wind speed of the i th wind farm at a target moment according to the first wind speed, the first wind direction and the representation vector, wherein the target moment refers to a target time point after the current moment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of wind power engineering, and more specifically, to a wind speed prediction method and device, a storage medium, and a computer program product. Background Art

[0002] Wind speed forecasting is a critical component of wind power generation, crucial for wind farm operation and scheduling, power system planning, and the rational utilization of wind energy resources. Traditional wind speed forecasting methods rely primarily on time series analysis, capturing historical wind speed trends to predict future wind speeds. However, wind speed forecasts based solely on temporal characteristics often suffer from insufficient accuracy in practical applications.

[0003] Currently, no effective solution has been proposed to the problem that related technologies only consider the impact of time characteristics on wind speed, resulting in inaccurate actual wind speed prediction results.

[0004] Therefore, it is necessary to improve the related technology to overcome the above-mentioned defects in the related technology. Summary of the Invention

[0005] The embodiments of the present application provide a wind speed prediction method and device, a storage medium, and a computer program product to at least solve the problem in the related art that only the influence of time characteristics on wind speed is considered, resulting in inaccurate actual wind speed prediction results.

[0006] According to one aspect of an embodiment of the present application, a wind speed prediction method is provided, including: determining a time characteristic of the i-th wind farm based on a first wind speed and a first wind direction of the i-th wind farm in historical operation, wherein i is a positive integer; determining a characterization vector of the i-th wind farm based on the time characteristic and an adjacency matrix, wherein the adjacency matrix is ​​a matrix characterizing the spatial correlation between adjacent wind farms among N wind farms, and the characterization vector is a multidimensional vector that integrates the time characteristic and the spatial characteristic of the i-th wind farm, N is a positive integer and i is less than or equal to N; determining a target wind speed of the i-th wind farm at a target moment based on the first wind speed, the first wind direction, and the characterization vector, wherein the target moment refers to a target time point after the current moment.

[0007] In an exemplary embodiment, determining the time characteristic of the i-th wind farm according to the first wind speed and the first wind direction of the i-th wind farm in historical time includes: determining the time characteristic H according to the following formula t :F t =σ s (W F X t +U F H t-1 +BF );I t =σ s (W I X t +U I H t-1 +B I );O t =σ s (W O X t +U O H t-1 +B O ); Among them, F t is the activation vector of the forget gate in the long short-term memory network, I t is the activation vector of the update gate in the LSTM network, O t is the activation vector of the output gate in the LSTM network, is the cell state information in the long short-term memory network, C t is the memory unit of the long short-term memory network, σ s is the activation function of the long short-term memory network, σ g is a hyperbolic tangent function, W is a first weight matrix of the forget gate, the update gate, the output gate, and the cell state information, U is a second weight matrix of the forget gate, the update gate, the output gate, and the cell state information, B is a bias vector of the forget gate, the update gate, the output gate, and the cell state information, and ° is a Hadamard product.

[0008] In an exemplary embodiment, determining the characterization vector of the i-th wind farm according to the time characteristics and the adjacency matrix includes: determining the characterization vector according to the following formula Where K represents the number of attention heads in the graph attention network, σ(·) is the activation function of the graph attention network, W is the third weight matrix of the graph attention network, and α k is the attention coefficient of the graph attention network, and p, i, and j are all positive integers.

[0009] In an exemplary embodiment, before determining the characterization vector of the i-th wind farm based on the time characteristics and the adjacency matrix, the method further includes: obtaining a second wind speed and a second wind direction for each of the N wind farms; determining a spatial correlation coefficient between each of the N wind farms based on the second wind speed and the second wind direction, wherein the spatial correlation coefficient is used to characterize the linear correlation between each of the N wind farms; and determining the adjacency matrix based on the spatial correlation coefficient.

[0010] In an exemplary embodiment, determining the adjacency matrix based on the spatial correlation coefficient includes: when the spatial correlation coefficient is greater than a target value, determining the target value as the adjacency matrix; when the spatial correlation coefficient is less than the target value, determining the absolute value of the target value as the adjacency matrix.

[0011] In an exemplary embodiment, determining the target wind speed of the i-th wind farm at the target time according to the first wind speed, the first wind direction, and the characterization vector includes: determining the target wind speed according to the following formula in, is the wind speed of the i-th wind farm at time t in the historical time, is the wind direction of the i-th wind farm at time t in the historical time, h i is the characterization vector of the i-th wind farm, T is the target time, and T is a positive number.

[0012] In an exemplary embodiment, before determining the time characteristics of the i-th wind farm based on the first wind speed and the first wind direction of the i-th wind farm during historical operation, the method further includes: when there are missing values ​​in the first wind speed and the first wind direction, determining the data type corresponding to the missing value; determining the average value of the data type corresponding to the missing value; and replacing the missing value with the average value.

[0013] According to another aspect of an embodiment of the present application, a wind speed prediction device is also provided, including: a first determination module, used to determine the time characteristics of the i-th wind farm based on the first wind speed and first wind direction of the i-th wind farm in historical time, wherein i is a positive integer; a second determination module, used to determine the characterization vector of the i-th wind farm based on the time characteristics and the adjacency matrix, wherein the adjacency matrix is ​​a matrix characterizing the spatial correlation between adjacent wind farms in N wind farms, and the characterization vector is a multidimensional vector that integrates the time characteristics and the spatial characteristics of the i-th wind farm, N is a positive integer and i is less than or equal to N; a third determination module, used to determine the target wind speed of the i-th wind farm at a target time based on the first wind speed, the first wind direction, and the characterization vector, wherein the target time refers to the target time point after the current time.

[0014] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is configured to execute the above-mentioned wind speed prediction method when running.

[0015] According to another aspect of an embodiment of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the wind speed prediction method through the computer program.

[0016] According to another aspect of the embodiments of the present application, a computer program product is provided, including a computer program, which implements the steps of the method described in each embodiment of the present application when executed by a processor.

[0017] This application determines the time characteristics of the i-th wind farm based on its first wind speed and first wind direction during historical operation; determines a characterization vector for the i-th wind farm based on the time characteristics and an adjacency matrix representing the spatial correlations between adjacent wind farms in N wind farms; and determines a target wind speed for the i-th wind farm at a target time based on the first wind speed, the first wind direction, and the characterization vector. This solves the problem in related technologies where only the impact of time characteristics on wind speed is considered, resulting in inaccurate wind speed prediction results. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0019] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0020] Figure 1 This is a hardware structure block diagram of a computer terminal for a wind speed prediction method according to an embodiment of the present application;

[0021] Figure 2 is a flow chart of a method for predicting wind speed according to an embodiment of the present application;

[0022] Figure 3 is a flow chart of a method for predicting wind speed according to an embodiment of the present application;

[0023] Figure 4 is a schematic diagram of a wind speed prediction method according to an embodiment of the present application;

[0024] Figure 5 This is a structural block diagram of a wind speed prediction device according to an embodiment of the present application. DETAILED DESCRIPTION

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

[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in a sequence 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.

[0027] The method embodiments provided in the embodiments of the present application can be executed in a computer terminal or similar computing device. Taking running on a computer terminal as an example, Figure 1This is a hardware structure block diagram of a computer terminal for a wind speed prediction method according to an embodiment of the present application. Figure 1 As shown, the computer terminal may include one or more ( Figure 1 Only one is shown) a processor 102 (the processor 102 may include but is not limited to a microprocessor (Central Processing Unit, MCU) or a programmable logic device (Field Programmable Gate Array, FPGA) and a memory 104 for storing data, wherein the above-mentioned computer terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It will be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above-mentioned computer terminal. For example, the computer terminal may also include Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.

[0028] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the wind speed prediction method in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implementing the above-mentioned method. The memory 104 may include a high-speed random access memory and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely located relative to the processor 102, and these remote memories may be connected to the computer terminal 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.

[0029] The computer terminal's communication provider provides a wireless network. In one embodiment, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to communicate with the Internet. In one embodiment, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0030] In this embodiment, a wind speed prediction method is provided, which is applied to the above-mentioned computer terminal. Figure 2 is a flow chart of a method for predicting wind speed according to an embodiment of the present application, such as Figure 2 As shown, the process includes the following steps:

[0031] Step S202, determining a time characteristic of the i-th wind farm according to a first wind speed and a first wind direction of the i-th wind farm during historical operation, wherein i is a positive integer;

[0032] Step S204: determining a characterization vector for the i-th wind farm based on the time feature and an adjacency matrix, wherein the adjacency matrix is ​​a matrix characterizing spatial correlations between adjacent wind farms in N wind farms, and the characterization vector is a multidimensional vector that integrates the time feature and the spatial feature of the i-th wind farm, where N is a positive integer and i is less than or equal to N.

[0033] Step S206 : determining a target wind speed of the i-th wind farm at a target time according to the first wind speed, the first wind direction, and the characterization vector, wherein the target time refers to a target time point after the current time.

[0034] Through the above steps, the time characteristics of the i-th wind farm are determined based on the first wind speed and first wind direction of the i-th wind farm in historical operation, where i is a positive integer; the characterization vector of the i-th wind farm is determined based on the time characteristics and the adjacency matrix, where the adjacency matrix is ​​a matrix that characterizes the spatial correlation between adjacent wind farms in N wind farms, and the characterization vector is a multidimensional vector that integrates the time characteristics and the spatial characteristics of the i-th wind farm, where N is a positive integer and i is less than or equal to N; the target wind speed of the i-th wind farm at the target moment is determined based on the first wind speed, the first wind direction, and the characterization vector, where the target moment refers to the target time point after the current moment. This solves the problem in the related art that only the influence of time characteristics on wind speed is considered, resulting in inaccurate actual wind speed prediction results.

[0035] In an exemplary embodiment, determining the time characteristic of the i-th wind farm according to the first wind speed and the first wind direction of the i-th wind farm in historical time includes: determining the time characteristic H according to the following formula t :F t =σ s (W F X t +U F H t-1 +B F );I t =σ s (W I X t +U I H t-1 +B I );O t =σ s (W O X t +U OH t-1 +B O ); where F t is the activation vector of the forget gate in the long short-term memory network, I t is the activation vector of the update gate in the long short-term memory network, O t is the activation vector of the output gate in the long short-term memory network, is the cell state information in the long short-term memory network, C t is the memory cell of the long short-term memory network, σ s is the activation function of the long short-term memory network, σ g is the hyperbolic tangent function, W is the first weight matrix of the forget gate, the update gate, the output gate and the cell state information, U is the second weight matrix of the forget gate, the update gate, the output gate and the cell state information, B is the bias vector of the forget gate, the update gate, the output gate and the cell state information, and ° is the Hadamard product.

[0036] The activation vector F t of the forget gate determines how much information is forgotten from the memory cell C t-1 at the previous time step. The calculation of the forget gate involves the input vector X t (the observation of wind speed and direction data at time t in this embodiment), the hidden state H t-1 at the previous time step, and the corresponding weight matrices W F and U F and the bias vector B F . The activation function σ s is usually a sigmoid function that maps the result of linear combination to between 0 and 1 to determine the proportion of forgetting. The activation vector I t of the update gate determines how much new information is written to the memory cell at the current time t. The calculation method is similar to that of the forget gate, but different weight matrices and bias vectors are used. The cell state information refers to the new information to be written to the memory cell at time t. The activation function σ g here is usually a hyperbolic tangent function tanh, which converts the input to a value ranging from -1 to 1, which helps to keep the state of the memory cell within a reasonable range. The update of the memory cell C t is realized by the Hadamard product (i.e. element-wise multiplication) of the outputs of the forget gate and the update gate with the memory cell state C t-1 at the previous time step and the new cell state . This means that the memory cell will be based on F t and It The decision to save or update the state. The activation vector O of the output gate t Determine memory unit C t How much information is output to the hidden state H at the current moment? t The calculation method is the same as the forget gate and update gate, but different weight matrices and bias vectors are used. The final hidden state H t is the output gate O t The output and current memory cell state C t The Hadamard product of the hyperbolic tangent function σ g C t This ensures that the information in the memory cell is appropriately scaled when determining the output state.

[0037] In an exemplary embodiment, determining the characterization vector of the i-th wind farm according to the time characteristics and the adjacency matrix includes: determining the characterization vector according to the following formula Where K represents the number of attention heads in the graph attention network, σ(·) is the activation function of the graph attention network, W is the third weight matrix of the graph attention network, and α k is the attention coefficient of the graph attention network, and p, i, and j are all positive integers.

[0038] Attention coefficient α in Graph Attention Network (GAT) k It is used to measure the relative importance of node i and its neighboring node j. By calculating the eigenvectors of node i and node j The attention coefficient α is obtained by combining k ,in, are the representation vectors of nodes i and j in the p-1th layer respectively. Attention coefficient α k A weight is assigned to each neighboring node, reflecting their contribution to the computation of the representation vector of node i in layer p. k The k in represents the number of attention heads, which means that GAT uses multiple attention mechanisms simultaneously. The outputs of multi-head attention are combined in the formula by parallel calculation and splicing (indicated by “||”). Before calculating the attention coefficient and aggregating adjacent information, the feature vector of the node First, the weight matrix Perform linear transformation. Each attention head k has an independent weight matrix to adapt to different feature combinations. For the neighboring set of node i, node i aggregates the transformed feature vectors of its neighboring node j by weighted summation. The weight of the above feature vector is the attention coefficient This means that the influence of each neighboring node on node i is different, and this difference is learned dynamically by the attention mechanism. The aggregated feature vector is transformed nonlinearly by the activation function σ(·). The use of activation functions (such as ReLU or Sigmoid) increases the nonlinear expression ability of the model and helps the model learn more complex feature patterns. Finally, the representation vector of node i in layer p is It is obtained by combining the results of all attention heads.

[0039] In an exemplary embodiment, before determining the characterization vector of the i-th wind farm based on the time characteristics and the adjacency matrix, the method further includes: obtaining a second wind speed and a second wind direction for each of the N wind farms; determining a spatial correlation coefficient between each of the N wind farms based on the second wind speed and the second wind direction, wherein the spatial correlation coefficient is used to characterize the linear correlation between each of the N wind farms; and determining the adjacency matrix based on the spatial correlation coefficient.

[0040] In an exemplary embodiment, determining the adjacency matrix based on the spatial correlation coefficient includes: when the spatial correlation coefficient is greater than a target value, determining the target value as the adjacency matrix; when the spatial correlation coefficient is less than the target value, determining the absolute value of the target value as the adjacency matrix.

[0041] The second wind speed in this embodiment is The second wind direction is The spatial correlation coefficient r is determined according to the second wind speed and the second wind direction, where the value range of the spatial correlation coefficient r is [-1, 1]. When the spatial correlation coefficient r is greater than 0, the adjacency matrix A = r. When the spatial correlation coefficient r is less than 0, the adjacency matrix A = |r|, so the value range of the adjacency matrix is ​​[0, 1].

[0042] In an exemplary embodiment, determining the target wind speed of the i-th wind farm at the target time according to the first wind speed, the first wind direction, and the characterization vector includes: determining the target wind speed according to the following formula in, is the wind speed of the i-th wind farm at time t in the historical time, is the wind direction of the i-th wind farm at time t in the historical time, h i is the characterization vector of the i-th wind farm, T is the target time, and T is a positive number.

[0043] As a deep learning model, Multi-layer Perceptron (MLP) is capable of processing high-dimensional data. It consists of an input layer, one or more hidden layers, and an output layer. In this embodiment, MLP plays the role of integrating all input information and performing nonlinear transformations to generate the predicted wind speed. The MLP receives the wind speed of the i-th wind farm at historical time t wind direction And the representation vector h calculated by GAT i And through the learning process of internal weights and bias parameters, the complex relationship between the time series characteristics of wind speed and wind direction and the spatial layout of the wind field is captured, so as to predict the wind speed at the target time T. wind direction and the characterization vector h i Combined, the MLP model is able to fully understand and simulate the spatiotemporal dynamics of wind power. It not only tracks the patterns of wind speed and direction over time, but also provides insights into the interactions between wind farms based on their geographical locations, greatly enhancing the prediction accuracy. Finally, the MLP outputs the predicted wind speed The wind speed forecast value for the i-th wind farm at a specified future time T.

[0044] In an exemplary embodiment, before determining the time characteristics of the i-th wind farm based on the first wind speed and the first wind direction of the i-th wind farm during historical operation, the method further includes: when there are missing values ​​in the first wind speed and the first wind direction, determining the data type corresponding to the missing value; determining the average value of the data type corresponding to the missing value; and replacing the missing value with the average value.

[0045] Alternatively, assume that there is wind speed and direction data recorded from a wind farm during a specific time period. Here are some of the data points:

[0046]

[0047]

[0048] From the above data, we can determine that there are missing values ​​for wind speed and wind direction data at time points t3 and t4, respectively. The average wind speed is calculated as (10+12+11+13) / 4=46 / 4=11.5 m / s, and the average wind direction is calculated as (200+210+220+230) / 4=860 / 4=215°. Therefore, at time t4, the missing value of wind speed is replaced by 11.5 m / s. At time t3, the missing value of wind direction is replaced by 215°. By simply filling the missing data with the average value, the impact of missing data on model training and prediction performance can be avoided.

[0049] In order to better understand the process of the above-mentioned wind speed prediction method, the above-mentioned wind speed prediction method is described below in combination with an optional embodiment, but is not used to limit the technical solution of the embodiment of the present application.

[0050] Figure 3 FIG. 1 is a flow chart of a method for predicting wind speed according to an embodiment of the present application, such as Figure 3 As shown, specifically including the following:

[0051] Collect historical wind speed and direction data for each wind farm. This data includes information such as wind speed, wind direction angle, and timestamp. The historical wind speed and direction data for the i-th wind farm is used as input to a long short-term memory (LSTM) network. Through its internal memory cells and gating mechanism, the LSTM captures long-term dependencies and extracts temporal features for each wind farm from time series data.

[0052] At the same time, in order to quantify the spatial correlation between wind farms, the Pearson correlation coefficient between N wind farms is calculated. The Pearson correlation coefficient r is an indicator that measures the degree of linear correlation between the wind speed or wind direction data of two wind farms. Its value ranges from -1 to 1, where -1 indicates a complete negative correlation and 1 indicates a complete positive correlation. By calculating the correlation coefficient between each pair of wind farms, an N×N first adjacency matrix A is constructed, where Aij represents the correlation between the i-th wind farm and the j-th wind farm. When r>0, Aij=r; when r<0, Aij=0, ensuring that the adjacency matrix only contains positive correlations, which can more accurately reflect the spatial support relationship. After obtaining the first adjacency matrix A, in order to prevent the over-smoothing phenomenon commonly seen in deep graph model training, the first adjacency matrix is ​​further discarded (i.e., DropEdge) and a certain proportion of edges (i.e., correlation values) are randomly deleted to obtain the second adjacency matrix. This operation can increase the robustness of the model, prevent different node features from becoming similar as the network depth increases, and ensure that the feature vector of each wind farm can still represent its uniqueness.

[0053] Based on the optimized second adjacency matrix and the temporal features extracted by LSTM, GAT is used to fuse the spatiotemporal features of the wind farm. GAT uses the attention mechanism to dynamically adjust the information weights of other wind farms associated with the i-th wind farm (connected by edges in the graph model). These weights reveal the actual influence of the above-mentioned other wind farms on the wind speed forecast of the i-th wind farm. Through multi-layer propagation and attention mechanism updates, the fused feature vector of the i-th wind farm, i.e., the representation vector, is finally obtained. The wind speed and wind direction data of the i-th wind farm in historical operation and the representation vector obtained by GAT are input into the fully connected neural network (Multilayer Perceptron, abbreviated as MLP). MLP is a common feedforward neural network that can process these feature vectors and perform nonlinear mapping, and finally output the wind speed forecast value of the i-th wind farm at the target time.

[0054] Obviously, the embodiments described above are only part of the embodiments of the present application, not all of the embodiments. In order to better understand the above wind speed prediction method, the above process is described below in conjunction with the embodiments, but it is not intended to limit the technical solutions of the embodiments of the present application. Specifically:

[0055] In an optional embodiment, combined with Figure 4 The wind speed prediction method of this application is further explained. Figure 4 As shown, including the following:

[0056] In the GAT network, the attention coefficient is determined through a self-attention mechanism. The attention mechanism allows the GAT network to assign weights to the edges between each node in the graph and its adjacent nodes, so that it can selectively focus on the information of certain nodes when aggregating the information of adjacent nodes. The calculation process of the attention coefficient is as follows:

[0057] In the wind farm prediction problem, each node is represented by a feature vector, which contains the time feature vector obtained from the LSTM network and features obtained by other means (such as physical models, other sensor data, etc.). For node i and its neighboring node j, the GAT network calculates an attention coefficient (or attention weight) through a shared attention mechanism. This attention mechanism is usually implemented by a single-layer feedforward neural network, which applies a learnable weight vector (usually represented as W) to the feature vectors of nodes i and node j, and uses an activation function such as LeakyReLU to increase nonlinearity. In order to convert the attention coefficient into a weight, the softmax function is usually used to normalize the values ​​of nodes i and node j. Finally, node i will perform a weighted summation of all its neighboring feature vectors according to the normalized attention weight to obtain a new feature vector that integrates the information of neighboring nodes.

[0058] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.

[0059] This embodiment also provides a wind speed prediction device for implementing the above-mentioned embodiments and preferred embodiments. Details already described will not be repeated. As used below, the term "module" may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.

[0060] Figure 5 : is a structural block diagram of a wind speed prediction device according to an embodiment of the present application, the device comprising:

[0061] A first determining module 50 is configured to determine a time characteristic of the i-th wind farm according to a first wind speed and a first wind direction of the i-th wind farm during historical operation, wherein i is a positive integer;

[0062] a second determining module 52, configured to determine a characterization vector of the i-th wind farm based on the time feature and an adjacency matrix, wherein the adjacency matrix is ​​a matrix characterizing spatial correlations between adjacent wind farms among N wind farms, and the characterization vector is a multidimensional vector integrating the time feature and the spatial feature of the i-th wind farm, where N is a positive integer and i is less than or equal to N;

[0063] The third determining module 54 is configured to determine a target wind speed of the i-th wind farm at a target time according to the first wind speed, the first wind direction, and the characterization vector, wherein the target time is a target time point after a current time.

[0064] Through the above-mentioned device, the time characteristics of the i-th wind farm are determined based on the first wind speed and first wind direction of the i-th wind farm in historical operation, where i is a positive integer; the characterization vector of the i-th wind farm is determined based on the time characteristics and the adjacency matrix, where the adjacency matrix is ​​a matrix that characterizes the spatial correlation between adjacent wind farms in N wind farms, and the characterization vector is a multidimensional vector that integrates the time characteristics and the spatial characteristics of the i-th wind farm, where N is a positive integer and i is less than or equal to N; the target wind speed of the i-th wind farm at the target moment is determined based on the first wind speed, the first wind direction, and the characterization vector, where the target moment refers to the target time point after the current moment. This solves the problem in the related art that only the influence of time characteristics on wind speed is considered, resulting in inaccurate actual wind speed prediction results.

[0065] In an exemplary embodiment, the first determining module 50 is further configured to determine the time feature H according to the following formula: t :F t =σ s (W F X t +U F H t-1 +B F );I t =σ s (W I X t +U I H t-1 +B I );O t =σ s (W O X t +U O H t-1 +B O ); Among them, F t is the activation vector of the forget gate in the long short-term memory network, I t is the activation vector of the update gate in the LSTM network, O t is the activation vector of the output gate in the LSTM network, is the cell state information in the long short-term memory network, C t is the memory unit of the long short-term memory network, σ s is the activation function of the long short-term memory network, σ gis a hyperbolic tangent function, W is a first weight matrix of the forget gate, the update gate, the output gate, and the cell state information, U is a second weight matrix of the forget gate, the update gate, the output gate, and the cell state information, B is a bias vector of the forget gate, the update gate, the output gate, and the cell state information, and ° is a Hadamard product.

[0066] In an exemplary embodiment, the second determining module 52 is further configured to determine the characterization vector according to the following formula: Where K represents the number of attention heads in the graph attention network, σ(·) is the activation function of the graph attention network, W is the third weight matrix of the graph attention network, and α k is the attention coefficient of the graph attention network, and p, i, and j are all positive integers.

[0067] In an exemplary embodiment, the second determination module 52 is further used to obtain a second wind speed and a second wind direction for each of the N wind farms; determine a spatial correlation coefficient between each of the N wind farms based on the second wind speed and the second wind direction, wherein the spatial correlation coefficient is used to characterize the linear correlation between each of the N wind farms; and determine the adjacency matrix based on the spatial correlation coefficient.

[0068] In an exemplary embodiment, the second determination module 52 is further configured to determine, when the spatial correlation coefficient is greater than the target value, that the target value is the adjacency matrix; and, when the spatial correlation coefficient is less than the target value, determine that the absolute value of the target value is the adjacency matrix.

[0069] In an exemplary embodiment, the third determination module 54 is further configured to determine the target wind speed according to the following formula: in, is the wind speed of the i-th wind farm at time t in the historical time, is the wind direction of the i-th wind farm at time t in the historical time, h i is the characterization vector of the i-th wind farm, T is the target time, and T is a positive number.

[0070] In an exemplary embodiment, the first determination module 50 is further used to, when there are missing values ​​in the first wind speed and the first wind direction, determine the data type corresponding to the missing value; determine the average value of the data type corresponding to the missing value; and replace the missing value with the average value.

[0071] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps of any of the above method embodiments when run.

[0072] Optionally, in this embodiment, the storage medium may be configured to store a computer program for performing the following steps:

[0073] S1, determining a time characteristic of the i-th wind farm according to a first wind speed and a first wind direction of the i-th wind farm during historical operation, where i is a positive integer;

[0074] S2, determining a characterization vector of the i-th wind farm based on the time feature and an adjacency matrix, wherein the adjacency matrix is ​​a matrix characterizing spatial correlations between adjacent wind farms in N wind farms, and the characterization vector is a multidimensional vector that integrates the time feature and the spatial feature of the i-th wind farm, where N is a positive integer and i is less than or equal to N;

[0075] S3. Determine a target wind speed of the i-th wind farm at a target time according to the first wind speed, the first wind direction, and the characterization vector, wherein the target time refers to a target time point after a current time.

[0076] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.

[0077] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail here.

[0078] An embodiment of the present application further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0079] Optionally, in this embodiment, the processor may be configured to execute the following steps through a computer program:

[0080] S1, determining a time characteristic of the i-th wind farm according to a first wind speed and a first wind direction of the i-th wind farm during historical operation, where i is a positive integer;

[0081] S2, determining a characterization vector of the i-th wind farm based on the time feature and an adjacency matrix, wherein the adjacency matrix is ​​a matrix characterizing spatial correlations between adjacent wind farms in N wind farms, and the characterization vector is a multidimensional vector that integrates the time feature and the spatial feature of the i-th wind farm, where N is a positive integer and i is less than or equal to N;

[0082] S3. Determine a target wind speed of the i-th wind farm at a target time according to the first wind speed, the first wind direction, and the characterization vector, wherein the target time refers to a target time point after a current time.

[0083] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0084] An embodiment of the present application further provides a computer program product, comprising a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program product, and when the computer program is executed by a processor, the steps of the method described in each embodiment of the present application are implemented.

[0085] Optionally, in this embodiment, the computer program may be configured to implement the following steps when executed by a processor:

[0086] S1, determining a time characteristic of the i-th wind farm according to a first wind speed and a first wind direction of the i-th wind farm during historical operation, where i is a positive integer;

[0087] S2, determining a characterization vector of the i-th wind farm based on the time feature and an adjacency matrix, wherein the adjacency matrix is ​​a matrix characterizing spatial correlations between adjacent wind farms in N wind farms, and the characterization vector is a multidimensional vector that integrates the time feature and the spatial feature of the i-th wind farm, where N is a positive integer and i is less than or equal to N;

[0088] S3. Determine a target wind speed of the i-th wind farm at a target time according to the first wind speed, the first wind direction, and the characterization vector, wherein the target time refers to a target time point after a current time.

[0089] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail here.

[0090] Obviously, those skilled in the art should understand that the modules or steps of the present application described above can be implemented using a general-purpose computing device, they can be concentrated on a single computing device, or distributed across a network composed of multiple computing devices, they can be implemented using program code executable by the computing device, and thus, they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be performed in a different order than herein, or they can be fabricated into separate integrated circuit modules, or multiple modules or steps can be fabricated into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.

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

Claims

1. A method for predicting wind speed, characterized in that: include: Collect the first wind speed and first wind direction of each wind farm during historical operation, use the first wind speed and first wind direction of the i-th wind farm during the historical operation as inputs to the long short-term memory network, and determine the time characteristics of the i-th wind farm, where the first wind speed includes the magnitude of the first wind speed, the first wind direction includes the angle of the first wind direction and timestamp information, and i is a positive integer; By calculating the correlation coefficient between each pair of wind farms, an N×N first adjacency matrix is ​​constructed. After obtaining the first adjacency matrix, the first adjacency matrix is ​​discarded to obtain a second adjacency matrix, wherein the adjacency matrix Aij represents the correlation between the i-th wind farm and the j-th wind farm. When r > 0, the adjacency matrix Aij = r; when r < 0, the adjacency matrix Aij = 0. The first adjacency matrix only contains positive correlations, and N is a positive integer. Determining a characterization vector of the i-th wind farm based on the time feature and the second adjacency matrix, wherein the adjacency matrix is ​​a matrix characterizing spatial correlations between adjacent wind farms in N wind farms, and the characterization vector is a multidimensional vector that integrates the time feature and the spatial feature of the i-th wind farm, where i is less than or equal to N; The step of determining the characterization vector of the i-th wind farm according to the time feature and the adjacency matrix includes: The characterization vector is determined according to the following formula : , Among them, K represents the number of attention heads in the graph attention network, is the activation function of the graph attention network, W is the third weight matrix of the graph attention network, is the attention coefficient of the graph attention network, p, i, j are all positive integers; determining a target wind speed of the i-th wind farm at a target time according to the first wind speed, the first wind direction, and the characterization vector, wherein the target time refers to a target time point after a current time; Determining the target wind speed of the i-th wind farm at a target time according to the first wind speed, the first wind direction, and the characterization vector includes: The target wind speed is determined according to the following formula : ,in, is the wind speed of the i-th wind farm at time t in the historical time, is the wind direction of the i-th wind farm at time t in the historical time, is the characterization vector of the i-th wind farm, T is the target time, and T is a positive number.

2. The wind speed prediction method according to claim 1, characterized in that: Determining the time characteristics of the i-th wind farm includes: The time characteristic is determined according to the following formula : ; ; ; ; ; ; in, is the activation vector of the forget gate in the long short-term memory network, is the activation vector of the update gate in the LSTM network, is the activation vector of the output gate in the LSTM network, is the cell state information in the long short-term memory network, is the memory unit of the long short-term memory network, is the activation function of the long short-term memory network, is a hyperbolic tangent function, W is a first weight matrix of the forget gate, the update gate, the output gate, and the cell state information, U is a second weight matrix of the forget gate, the update gate, the output gate, and the cell state information, B is a bias vector of the forget gate, the update gate, the output gate, and the cell state information, It is Hadamard.

3. The wind speed prediction method according to claim 1, characterized in that: Before determining the characterization vector of the i-th wind farm according to the time feature and the second adjacency matrix, the method further includes: Obtaining a second wind speed and a second wind direction for each of the N wind farms; determining a spatial correlation coefficient between each of the N wind farms according to the second wind speed and the second wind direction, wherein the spatial correlation coefficient is used to characterize a linear correlation between each of the N wind farms; The adjacency matrix is ​​determined according to the spatial correlation coefficient.

4. The method for predicting wind speed according to claim 3, wherein: Determining the adjacency matrix according to the spatial correlation coefficient includes: When the spatial correlation coefficient is greater than a target value, determining the target value to be the adjacency matrix; When the spatial correlation coefficient is less than a target value, an absolute value of the target value is determined as the adjacency matrix.

5. The wind speed prediction method according to claim 1, characterized in that: Before determining the time characteristics of the i-th wind farm, the method further includes: In the case where there are missing values ​​in the first wind speed and the first wind direction, determining a data type corresponding to the missing value; Determine the average value of the data type corresponding to the missing value; The missing values ​​were replaced with the mean values.

6. A wind speed prediction device, characterized in that: include: a first determination module, configured to collect the first wind speed and first wind direction of each wind farm during historical operation, use the first wind speed and first wind direction of the i-th wind farm during the historical operation as inputs to a long short-term memory network, and determine a time characteristic of the i-th wind farm, wherein the first wind speed includes the magnitude of the first wind speed, the first wind direction includes the angle of the first wind direction and timestamp information, and i is a positive integer; A construction module is configured to construct an N×N first adjacency matrix by calculating the correlation coefficient between each pair of wind farms. After obtaining the first adjacency matrix, a discard operation is performed on the first adjacency matrix to obtain a second adjacency matrix, wherein the adjacency matrix Aij represents the correlation between the i-th wind farm and the j-th wind farm. When r>0, the adjacency matrix Aij=r; when r<0, the adjacency matrix Aij=0. The first adjacency matrix only contains positive correlations, and N is a positive integer. a second determining module, configured to determine a characterization vector of the i-th wind farm based on the time feature and the second adjacency matrix, wherein the adjacency matrix is ​​a matrix characterizing spatial correlations between adjacent wind farms among N wind farms, and the characterization vector is a multidimensional vector that integrates the time feature and the spatial feature of the i-th wind farm, where i is less than or equal to N; The second determining module is further configured to determine the characterization vector according to the following formula: : , where K represents the number of attention heads in the graph attention network, is the activation function of the graph attention network, W is the third weight matrix of the graph attention network, is the attention coefficient of the graph attention network, p, i, j are all positive integers; a third determining module, configured to determine a target wind speed of the i-th wind farm at a target time according to the first wind speed, the first wind direction, and the characterization vector, wherein the target time refers to a target time point after a current time; The third determination module is further configured to determine the target wind speed according to the following formula: : ,in, is the wind speed of the i-th wind farm at time t in the historical time, is the wind direction of the i-th wind farm at time t in the historical time, is the characterization vector of the i-th wind farm, T is the target time, and T is a positive number.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the method according to any one of claims 1 to 5 when executed.

8. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Self-supervised wind power prediction method, device, equipment and medium

    CN115481820A

  • Wind speed prediction method, device and system and storage medium

    CN116384576A