Wind speed prediction method and device, storage medium and computer program product
By combining temporal and spatial characteristics, using deep learning methods to generate the characterization vector of wind farms, the problem of insufficient accuracy of traditional wind speed prediction methods is solved and more accurate wind speed prediction is achieved.
Patent Information
- Application Number
- CN202411972199.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2044-12-30
AI Technical Summary
The traditional wind speed prediction method only considers the time characteristics, resulting in inaccurate wind speed prediction results.
By combining temporal and spatial characteristics, deep learning methods such as long and short-term memory networks (LSTMs) and graph attention networks (GATs) are used to generate representation vectors of wind farms, and wind speed prediction is performed using multi-layer perceptrons (MLPs).
It improves the accuracy of wind speed prediction and can more effectively capture the spatial and temporal characteristics of the wind farm, thereby providing more accurate wind speed prediction results.
Smart Images

Figure CN119783901A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of wind power engineering, and more specifically, to a method and device for predicting wind speed, a storage medium, and a computer program product. Background Art
[0002] Wind speed prediction is a key link in the field of wind power, and is of great significance to the operation and scheduling of wind farms, power system planning, and the rational use of wind energy resources. Traditional wind speed prediction methods mainly rely on time series analysis to predict future wind speeds by capturing the historical trend of wind speed changes. However, wind speed prediction based solely on time characteristics often faces the problem of insufficient accuracy in practical applications.
[0003] Currently, no effective solution has been proposed to address the problem that in related technologies, only the influence of time characteristics on wind speed is considered, 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 method for predicting wind speed is provided, comprising: 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 in historical operation, wherein i is a positive integer; determining a characterization vector of the i-th wind farm according to 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 integrating the time characteristic and the spatial characteristic of the i-th wind farm, wherein 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 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.
[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 LSTM 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 LSTM network, C t is the memory unit of the LSTM network, σ s is the activation function of the LSTM 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 feature 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 according to 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 according to 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 according to the spatial correlation coefficient.
[0010] In an exemplary embodiment, the adjacency matrix is determined according to the spatial correlation coefficient, including: 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 a 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 ith wind farm based on the first wind speed and the first wind direction of the ith wind farm in 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 values; determining the average value of the data type corresponding to the missing values; and replacing the missing values 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 according to the first wind speed and the 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 according to the time characteristics and the 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 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 according to 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, wherein 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, including 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, 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.
[0017] Through this application, the time characteristics of the i-th wind farm are determined according to the first wind speed and the first wind direction of the i-th wind farm in historical time; the characterization vector of the i-th wind farm is determined according to the time characteristics and the adjacency matrix used to characterize the spatial correlation between adjacent wind farms in N wind farms; the target wind speed of the i-th wind farm at the target time is determined according to the first wind speed, the first wind direction, and the characterization vector. This solves the problem in the related art that only the influence of the time characteristics on the wind speed is considered, resulting in inaccurate actual 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 drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0020] Figure 1 It is a hardware structure block diagram of a computer terminal of 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 It 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 solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present 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 sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0027] The method embodiments provided in the embodiments of the present application can be executed in a computer terminal or a similar computing device. Taking running on a computer terminal as an example, Figure 1FIG. 1 is a hardware structure block diagram of a computer terminal of 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 in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as 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 can 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. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are 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, to implement the above 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 arranged relative to the processor 102, and these remote memories can 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] A wireless network provided by a communication provider of a computer terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (Radio Frequency, referred to as 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 the time characteristic of the ith wind farm according to the first wind speed and the first wind direction of the ith wind farm in historical operation, wherein i is a positive integer;
[0032] Step S204, determining a characterization vector of the i-th wind farm according to the time feature 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 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;
[0033] Step S206: determining a target wind speed of the ith 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 according to the first wind speed and the first wind direction of the i-th wind farm in historical time, wherein i is a positive integer; the characterization vector of the i-th wind farm is determined according to the time characteristics and the adjacency matrix, wherein 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 multi-dimensional 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; the target wind speed of the i-th wind farm at the target time is determined according to 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. This solves the problem in the related art that only the influence of the time characteristics on the 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 ); Among them, F t is the activation vector of the forget gate in the LSTM 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 LSTM network, C t is the memory unit of the LSTM network, σ s is the activation function of the LSTM 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.
[0036] The activation vector F of the forget gate t Determine the memory cell C from the previous moment t-1 How much information is forgotten in the forget gate? The calculation of the forget gate involves the input vector X t (In this embodiment, it is the observed value of wind speed and wind direction data at time t), the hidden state H at the previous moment t-1 , and the corresponding weight matrix W F and U F And the bias vector B F The activation function σ s Usually a sigmoid function, which maps the result of the linear combination to between 0 and 1 to determine the proportion of forgetting. Update the activation vector I of the gate t Determines how much new information is written into the memory cell at the current time t. The calculation method is similar to the forget gate, but different weight matrices and bias vectors are used. Cell state information refers to the new information that will be written into the memory cell at time t. Here the activation function σ g Usually a hyperbolic tangent function tanh, which converts the input to a value in the range -1 to 1, which helps keep the state of the memory cell within a reasonable range. Memory Cell C t The update is done by combining the output of the forget gate and the update gate with the memory cell state C at the previous moment t-1 and the new cell state This means that the memory unit 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 It is the output gate O t The output and current memory cell state C t The Hadamard product of 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 feature 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 feature vectors of node i and node j The combination of 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 the pth layer. k The k in represents the number of attention heads, which means that GAT uses multiple attention mechanisms at the same time. The outputs of multi-head attention are combined in the formula through parallel calculation and concatenation (indicated by “||”). Before calculating the attention coefficient and aggregating adjacent information, the feature vector of the node First, through the weight matrix 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 through 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 according to 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 according to 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 according to the spatial correlation coefficient.
[0040] In an exemplary embodiment, the adjacency matrix is determined according to the spatial correlation coefficient, including: 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 a 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) has the ability to process 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 transformation 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 farm is captured, so as to predict the wind speed at the target time T. wind direction and the characterization vector h i Combined together, the MLP model can 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. 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 ith wind farm based on the first wind speed and the first wind direction of the ith wind farm in 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 values; determining the average value of the data type corresponding to the missing values; and replacing the missing values 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, it can be determined that there are missing values in the wind speed and wind direction data at time points t3 and t4, respectively. Calculate the average wind speed value = (10+12+11+13) / 4 = 46 / 4 = 11.5m / s, and the average wind direction value = (200+210+220+230) / 4 = 860 / 4 = 215°. Therefore, at time t4, 11.5m / s is used to replace the missing value of wind speed. At time t3, 215° is used to replace the missing value of wind direction. 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 it is not used to limit the technical solution of the embodiment of the present application.
[0050] Figure 3 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 the wind speed and direction data of each wind farm in historical operation, including wind speed, wind direction angle, timestamp and other information. Use the historical wind speed and direction data of the i-th wind farm as the input of the Long Short-Term Memory (LSTM) network. LSTM can capture long-term dependencies through internal memory units and gating mechanisms, and extract the time characteristics of 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 to measure the linear correlation degree of wind speed or wind direction data of two wind farms. Its value ranges from -1 to 1, -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 common over-smoothing phenomenon 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 time 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 other wind farms on the wind speed prediction of the i-th wind farm. Through multi-layer propagation and attention mechanism update, the fused feature vector of the i-th wind farm, that is, 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 prediction value of the i-th wind farm at the target time.
[0054] Obviously, the above-described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. In order to better understand the above-mentioned wind speed prediction method, the above-mentioned 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, in combination Figure 4 The wind speed prediction method of the present application is further described. Figure 4 As shown, including the following:
[0056] In the GAT network, the attention coefficient is determined through a self-attention mechanism, which 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 prediction problem of wind farms, 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 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 j. Finally, node i will perform a weighted summation of all its neighboring feature vectors according to the normalized attention weights to obtain a new feature vector that incorporates 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 a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an 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 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] In this embodiment, a wind speed prediction device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[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 determination module 50 is used to determine the 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 in historical operation, wherein i is a positive integer;
[0062] A second determination module 52 is used to determine a characterization vector of the i-th wind farm according to the time feature and an 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 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 determination module 54 is used to determine 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, wherein the target time refers to a target time point after a current time.
[0064] Through the above device, the time characteristics of the i-th wind farm are determined according to the first wind speed and the first wind direction of the i-th wind farm in historical time, wherein i is a positive integer; the characterization vector of the i-th wind farm is determined according to the time characteristics and the adjacency matrix, wherein 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 multi-dimensional 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; the target wind speed of the i-th wind farm at the target time is determined according to 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. This solves the problem in the related art that only the influence of the time characteristics on the 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 LSTM 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 LSTM network, C t is the memory unit of the LSTM network, σ s is the activation function of the LSTM 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 used to determine that the target value is the adjacency matrix when the spatial correlation coefficient is greater than the target value; and to determine that the absolute value of the target value is the adjacency matrix when the spatial correlation coefficient is less than the target value.
[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 also used to determine the data type corresponding to the missing value when there are missing values in the first wind speed and the first wind direction; 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, wherein 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 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 operation, wherein i is a positive integer;
[0074] S2, determining a characterization vector of the i-th wind farm according to the time feature 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 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;
[0075] S3. Determine a target wind speed of the ith 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 herein.
[0078] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, 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 perform the following steps through a computer program:
[0080] S1, 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 operation, wherein i is a positive integer;
[0081] S2, determining a characterization vector of the i-th wind farm according to the time feature 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 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;
[0082] S3. Determine a target wind speed of the ith 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 above computer program may be configured to implement the following steps when executed by a processor:
[0086] S1, 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 operation, wherein i is a positive integer;
[0087] S2, determining a characterization vector of the i-th wind farm according to the time feature 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 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;
[0088] S3. Determine a target wind speed of the ith 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 herein.
[0090] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that 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 executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made 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 implementation 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: Determine 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, wherein i is a positive integer; A characterization vector of the i-th wind farm is determined according to the time feature and the adjacency matrix, wherein the adjacency matrix is a matrix characterizing the spatial correlation between adjacent wind farms in the N wind farms, and the characterization vector is a multi-dimensional vector integrating the time feature and the spatial feature of the i-th wind farm, N is a positive integer and i is less than or equal to N; A target wind speed of the i-th wind farm at a target time is determined 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.
2. The method for predicting wind speed according to claim 1, characterized in that: 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: The time characteristic H is determined 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 ); The t =s 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 LSTM 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 LSTM network, C t is the memory unit of the LSTM network, σ s is the activation function of the LSTM 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, It is Hadamard.
3. The method for predicting wind speed according to claim 1, characterized in that: 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 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.
4. The method for predicting wind speed 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 adjacency matrix, the method further includes: Acquire a second wind speed and a second wind direction of each wind farm in the N wind farms; Determining a spatial correlation coefficient between each wind farm in 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 wind farm in the N wind farms; The adjacency matrix is determined according to the spatial correlation coefficient.
5. The method for predicting wind speed according to claim 4, characterized in that: 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; In a case where the spatial correlation coefficient is less than a target value, an absolute value of the target value is determined as the adjacency matrix.
6. The method for predicting wind speed according to claim 1, characterized in that: 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 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, h i is the characterization vector of the i-th wind farm, T is the target time, and T is a positive number.
7. The method for predicting wind speed according to claim 1, characterized in that: Before 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, the method further includes: In the case where there are missing values in the first wind speed and the first wind direction, determining the 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.
8. A wind speed prediction device, characterized in that: include: A first determination module is used to determine the 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 in historical operation, wherein i is a positive integer; A second determination module is used to determine a characterization vector of the i-th wind farm according to the time feature and an 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 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; The third determination module is used to determine 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, wherein the target time refers to a target time point after a current time.
9. 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 7 when executed.
10. 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 7 are implemented.
Citation Information
Patent Citations
Self-supervised wind power prediction method, device, equipment and medium
CN115481820A
Multi-fan wind speed and wind direction prediction method based on dynamic graph convolution and transformer
CN116341720A
Wind speed prediction method, device and system and storage medium
CN116384576A
Time series data prediction method associated with time-space relationship
CN117668743A
Multi-wind-power-plant multi-feature wind speed prediction method based on graph embedding and GIN-GRU
CN118483770A