Short-term wind speed prediction method

By training a short-term wind speed prediction model, combining historical wind speed and geographical location information, and optimizing model parameters using an improved sparrow search algorithm, the problems of insufficient accuracy and adaptability in wind speed prediction were solved, achieving more efficient wind speed prediction.

CN121561402APending Publication Date: 2026-02-24NANJING UNIV OF INFORMATION SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511752535.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-26
Publication Date
2026-02-24

AI Technical Summary

Technical Problem

Existing wind speed prediction methods are insufficient in terms of accuracy and adaptability, and are unable to effectively capture the multi-scale spatiotemporal characteristics in wind speed data, resulting in low prediction accuracy and difficulty in adapting to real-time requirements.

Method used

Using historical wind speed-geographic location information data as a training set, combined with an improved sparrow search algorithm, a short-term wind speed prediction model is trained through a hierarchical embedding layer, attention layer, and output layer, utilizing a physical constraint multi-head attention mechanism and a causal temporal attention mechanism. The model parameters are then optimized to improve prediction accuracy.

Benefits of technology

It improves the accuracy of wind speed prediction, reduces the difficulty of model parameter optimization, and enhances the adaptability and accuracy of the prediction model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121561402A_ABST
    Figure CN121561402A_ABST
Patent Text Reader

Abstract

The invention discloses a short-term wind speed prediction method, which belongs to the technical field of wind speed prediction, adopts a historical period wind speed-geographic position information data training set to train a short-term wind speed prediction model, considers the correlation of wind speed, time and geography, avoids the situation that multi-scale spatial-temporal characteristics in wind speed data cannot be captured, and improves the prediction accuracy. The accuracy of wind speed prediction is improved; and meanwhile, an improved sparrow search algorithm is adopted to select an optimal model parameter which enables the error between the predicted wind speed output by the short-term wind speed prediction model and the actual wind speed to be minimum in the training process, so that the difficulty of model parameter optimization is reduced, and the problems of low prediction accuracy and poor adaptability of the current prediction model are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a short-term wind speed prediction method, belonging to the field of wind speed prediction technology. Background Technology

[0002] The strong intermittency and randomness of wind energy lead to significant fluctuations in its grid connection, posing a severe challenge to grid dispatch and safe operation. Accurate short-term wind speed forecasts are crucial for the efficient grid connection of wind power generation and grid stability.

[0003] Traditional wind speed forecasting methods mainly fall into two categories: physical methods and statistical methods. Physical methods, such as numerical weather prediction (NWP), are based on atmospheric dynamic equations. While they have clear physical meaning, they are computationally complex and difficult to adapt to real-time forecasting requirements. Statistical methods, such as autoregressive models (AR) and autoregressive moving average models (ARIMA), predict wind speed by analyzing the statistical characteristics of historical data. Although computationally efficient, they have limited ability to model nonlinear and non-stationary wind speed sequences. Furthermore, with the development of machine learning technology, traditional machine learning methods such as support vector machines (SVM) and random forests (RF) have been introduced into the field of wind speed forecasting. These methods have improved the fitting ability of nonlinear relationships to some extent, but still suffer from problems such as complex feature engineering and insufficient generalization performance. Summary of the Invention

[0004] The purpose of this invention is to overcome the shortcomings of the prior art and provide a short-term wind speed prediction method that considers the correlation between wind speed and time and geography, improves the accuracy of wind speed prediction and reduces the difficulty of model parameter optimization, avoids the inability to capture multi-scale spatiotemporal features in wind speed data and the need to traverse a large number of parameter combinations, and solves the problems of low prediction accuracy and poor adaptability of current prediction models.

[0005] To solve the above-mentioned technical problems, the present invention is implemented using the following technical solution: This invention provides a short-term wind speed prediction method, comprising: Obtain wind speed data and geographical location information of wind farms in the target area; The real-time wind speed data and geographic location information are input into a pre-trained short-term wind speed prediction model to obtain the predicted wind speed of the target area in the future. The training of the short-term wind speed prediction model includes: Establish a training set of historical wind speed-geographic location information data; A short-term wind speed prediction model was trained using a training set of historical wind speed-geographic location information data. An improved sparrow search algorithm is used to select the optimal model parameters that minimize the error between the predicted wind speed and the actual wind speed output by the short-term wind speed prediction model during the training process. The original model parameters are replaced with the optimal model parameters to obtain a well-trained short-term wind speed prediction model.

[0006] Furthermore, the training data set includes: Historical wind speed records, including wind speed data corresponding to each time point in the historical period; Geographic location information, including latitude, longitude, and altitude data of the regions corresponding to historical wind speed records.

[0007] Furthermore, the short-term wind speed prediction model includes: A hierarchical embedding layer is used to obtain enhanced fusion features based on time and geographic location features after fusion processing, according to wind speed data and geographic location information. The attention layer is used to compute the attention output related to the physical constraints of the fusion feature representation and the attention output in the temporal dimension, based on the physical constraint multi-head attention mechanism and the causal temporal attention mechanism. Multiple residual connections and normalization processes are performed on the physics-related attention output and the time-dimensional attention output to obtain physics-time fusion features; The output layer is used to predict wind speed based on physical-temporal fusion features.

[0008] Furthermore, the training of the short-term wind speed prediction model using a historical time period wind speed-geographic location information data training set includes: Based on historical wind speed-geographic location information data, obtain the first feature for time encoding and the second feature for geographic location information encoding; The first feature and the second feature are fused once to obtain the initial fused feature; A secondary fusion process is performed on the first feature, the second feature, and the initial fusion feature to obtain the enhanced fusion feature; Based on the physical constraint multi-head attention mechanism and the causal temporal attention mechanism, we calculate the attention output of the enhanced fusion feature representation related to physics and the attention output of the representation in the temporal dimension, respectively. Multiple residual connections and normalization processes are performed on the physics-related attention output and the time-dimensional attention output to obtain physics-time fusion features; Based on the physical-temporal fusion feature, wind speed is predicted; if the error between the predicted wind speed and the actual wind speed does not meet the preset threshold, the model parameters are adjusted until the error between the predicted wind speed and the actual wind speed meets the preset threshold.

[0009] Furthermore, the process of performing multiple residual connections and normalization on the physics-related attention output and the time-dimensional attention output yields physics-time fusion features, including: The following formula represents the first residual join and normalization process: ; ; ; ; Indicates to The output after layer normalization Representation layer normalization, This represents the result of the first physics-related residual connection. The input features represent the physical constraints of the multi-head attention mechanism. This represents a regularization operation. This represents attention output related to physics; Indicates to The output after normalization This represents the result of the first residual connection in the time dimension. Input features representing causal temporal attention mechanisms This represents the attention output over the time dimension; The second residual join and normalization process is represented by the following formula: ; ; ; ; Indicates to The output after layer normalization This represents the result of the second physics-related residual connection. This indicates physical position-by-position feedforward processing; Indicates to The output after layer normalization This represents the result of the second residual connection in the time dimension. This indicates time-by-position feedforward processing; The physical-temporal fusion characteristics are calculated using the following formula: ; Indicates physical-temporal fusion characteristics. This indicates adaptive weights.

[0010] Furthermore, the prediction of wind speed based on physical-temporal fusion features includes: Wind speed is predicted using the following formula: ; ; Indicates predicted wind speed, Indicates physical-temporal fusion characteristics. This represents the minimum reasonable wind speed value. This represents the maximum reasonable wind speed value. Indicates the corrected strength coefficient. Indicates a time point; Indicates physical constraint truncation. Indicates linear projection. This represents the Hamiltonian energy function.

[0011] Furthermore, an improved sparrow search algorithm is used to select the optimal model parameters during the training process that minimize the error between the predicted and actual wind speeds output by the short-term wind speed prediction model. These parameters include: An improved sine mapping and Tent mapping were used to generate the initial population for the model parameters of the short-term wind speed prediction model. The initial population was divided into three groups: discoverers, joiners, and vigilants. The foraging behavior of sparrow populations was simulated. Cauchy perturbation and matrix pseudo-inverse optimization were introduced, and the positions of each group were updated according to the preset update rounds. If the number of times each group updates its position meets the preset value, then the final optimal position in the sparrow group that avoids being prey will be output. The final optimal position is used as the optimal model parameter.

[0012] Furthermore, the model parameters of the short-term wind speed prediction model are generated by mixing an improved sine map and a Tent map to form an initial population, including: Suppose there are a total of model parameters to be optimized. If there are 1, then the position vector of each sparrow in the sparrow population is 1. If the dimension is given, then the position of the sparrow in the initial population is represented as: ; This represents the initial set of sparrows. Indicates the first in the initial population m A sparrow in The position of the dimension, that is, the first The values ​​of each model parameter; The positions of each sparrow in the initial population are shuffled using the following formula: ; Indicates the first in the initial population individual, Indicates the first in the initial population individual, This indicates taking the sine value. Represents a random number. This represents a random number that follows a standard normal distribution. Indicates the Tent mapping parameters. This indicates that a random number between 0 and 1 is generated.

[0013] Furthermore, the initial population is divided into three groups: discoverers, joiners, and watchers. Simulating the foraging behavior of sparrow populations, Cauchy perturbation and matrix pseudo-inverse optimization are introduced. The positions of each group are updated according to a preset update cycle, including: Calculate the initial fitness value of each sparrow in the initial population; Based on the initial fitness values ​​of each sparrow in the initial population, sort the initial fitness values ​​and record the current best position of the sparrow; The warning level of the population is calculated using the following formula: ; This indicates that the sparrow population is in the [number]th [year]. Update the round and the warning level value. Indicates the preset update round. Represented by real numbers An exponential function with base 0; Based on the alert level value, the location of the discoverer is updated using the following formula: ; Indicates the first In the update round The first sparrow Dimensional position, Indicates the first In the update round The first sparrow Dimensional position, Represents a random number. Indicates the warning threshold. This represents a Cauchy distribution with a location parameter of 0 and a scale parameter of 1. Update the joiner's position using the following formula: ; ; ; This represents a random number that follows a standard normal distribution. Indicates the first The worst position in the update round. Indicates the first Update the optimal position in the round. Indicates the population size. Represents a matrix of all 1s; Describes a pseudo-inverse matrix. Represents a random matrix. express The transpose of the matrix, Indicates taking Random numbers between, Indicates the number of model parameters; Calculate the rate of change of fitness values, sort the sparrows according to their degree of stagnation, and classify the sparrows at the beginning of the sequence as vigilant sparrows; Update the location of the watchful sparrows; Calculate the fitness of each sparrow and the average fitness; The fitness values ​​of each sparrow and the average fitness are sorted based on the fitness values ​​of the sparrows in the current update round, and the current optimal position of the sparrows is updated.

[0014] Furthermore, the step of sorting the fitness values ​​of the sparrows in the current update round based on the fitness of each sparrow and the average fitness, and then updating the sparrows' current optimal positions, includes: Update the sparrow's position using the following formula: ; Indicates the first The adaptability of a sparrow Indicates average fitness. This represents a normal distribution with a mean of 0 and a variance of 1. This represents a random number that follows a standard normal distribution. Represents a random number.

[0015] Compared with the prior art, the beneficial effects achieved by the present invention are as follows: This invention trains a short-term wind speed prediction model using a historical wind speed-geographic location information data training set. It considers the correlation between wind speed and time and geography, avoiding the inability to capture multi-scale spatiotemporal features in wind speed data and improving the accuracy of wind speed prediction. At the same time, it uses an improved sparrow search algorithm to select the optimal model parameters that minimize the error between the predicted wind speed and the actual wind speed during the training process, reducing the difficulty of model parameter optimization and solving the problems of low prediction accuracy and poor adaptability of current prediction models. Attached Figure Description

[0016] Figure 1 This is a flowchart of the training process for the short-term wind speed prediction model provided in this embodiment of the invention. Figure 2This is a schematic diagram of the structure of the short-term wind speed prediction model provided in an embodiment of the present invention; Figure 3 This is a flowchart of the parameter optimization process for the short-term wind speed prediction model provided in this embodiment of the invention. Figure 4 This is a schematic diagram of the prediction results of the existing prediction model CNN provided in the embodiments of the present invention; Figure 5 This is a schematic diagram of the prediction results of the existing prediction model TCN provided in this embodiment of the invention. Figure 6 This is a schematic diagram of the prediction results of the existing prediction model LSTM provided in the embodiments of the present invention; Figure 7 This is a schematic diagram of the prediction results of a short-term wind speed prediction method provided in an embodiment of the present invention; Figure 8 This is wind speed data from a wind farm in southern China, provided in an embodiment of the present invention. Detailed Implementation

[0017] The present invention will be further described below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and should not be used to limit the scope of protection of the present invention. Example

[0018] A short-term wind speed forecasting method includes: Obtain wind speed data and geographical location information of wind farms in the target area; Real-time wind speed data and geographic location information are input into a pre-trained short-term wind speed prediction model to obtain the predicted wind speed for the target area in the future. Short-term wind speed forecasting models include: A hierarchical embedding layer is used to obtain enhanced fusion features based on time and geographic location features, specifically: The following formula is used to perform spatiotemporal decomposition encoding of wind speed data and geographic location information: ; This represents the first feature vector after time encoding. This represents the sinusoidal position coding function. Represents a linear transformation. Indicates a time point. Indicates a time interval; This represents the second feature vector after encoding the geographic location information. Represents the geographic coordinate encoding function. This indicates a splicing operation. This represents a multilayer perceptron. Indicates latitude, Indicates longitude. Indicates altitude; The attention layer is used to compute the attention output related to physics and the attention output in the temporal dimension of the enhanced fusion feature representation, based on the physical constraint multi-head attention mechanism and the causal temporal attention mechanism. Specifically: The physical constraint multi-head attention mechanism is represented as follows: ; Indicates the first Physically relevant query vectors for each attention head. Indicates the relationship with the first A weight matrix, physically related to the attention head, is used to calculate the query vector. Indicates the relationship with the first The bias vector corresponding to each attention head. This represents element-wise matrix multiplication. Represents a physics-related vector or matrix; ; Represents the hyperbolic tangent function; Indicates the first The physical key vector of each attention head, Indicates the relationship with the first A weight matrix, physically related to the attention head, is used to calculate the key vector. This represents a physics-related matrix or vector used to incorporate physical information. This indicates a modified linear unit activation function; Indicates the first A vector of physically relevant values ​​for each attention head. Indicates the relationship with the first A weight matrix, physically relevant to the attention head, is used to compute the value vector. Represents the activation function of the Gaussian error linear unit; Indicates enhanced fusion features; The causal temporal attention mechanism is represented as: ; Indicates the first Each attention head has a time-related query vector. Indicates the relationship with the first A weight matrix, time-dependent on the attention head, is used to calculate the query vector; Indicates the first The time-related key vector of each attention head Indicates the relationship with the first A weight matrix, time-dependent on the attention head, is used to compute the key vector; Indicates the first A vector of time-related values ​​for each attention head. Indicates the relationship with the first A weight matrix, time-dependent on the attention head, is used to compute the value vector; Multiple residual connections and normalization processes are performed on the physics-related attention output and the time-dimensional attention output to obtain physics-time fusion features; The output layer is used to predict wind speed based on physical-temporal fusion features.

[0019] Training a short-term wind speed prediction model includes: Establish a training set of historical wind speed-geographic location information data; The training data set includes historical wind speed records and geographic location information. It should be noted that the historical wind speed records include wind speed data corresponding to each time point in the historical period, and the geographic location information includes latitude, longitude, and altitude data of the region corresponding to the historical wind speed records.

[0020] like Figure 1 and Figure 2 As shown, a short-term wind speed prediction model is trained using a historical wind speed-geographic location information data training set. Specifically, based on the historical wind speed-geographic location information data, the first feature encoded by time and the second feature encoded by geographic location information are obtained. Perform a fusion process on the first feature and the second feature to obtain the initial fused feature, which is represented as: ; This represents the initial fused feature vector. Indicates the number of input features. Indicates the first The weight coefficients corresponding to each input feature vector. Indicates the first One input feature vector, This indicates a fully connected layer transformation operation; A secondary fusion process is performed on the first feature, the second feature, and the initial fusion feature to obtain the enhanced fusion feature, which is represented as follows: ; Presentation layer normalization operation, This represents the vector concatenation operation. Represents the weight matrix; Based on the physical constraint multi-head attention mechanism and the causal temporal attention mechanism, the attention output related to physics and the attention output in the temporal dimension of the enhanced fusion feature representation are calculated, including: the physical constraint attention output is calculated using the following formula: ; This represents attention output related to physics. This indicates a splicing operation. Indicates enhanced fusion features, Indicates the first The physical-related attention output of each attention head. Indicates the first The physical-related attention output of each attention head. Represents the weight matrix; ; Represents the normalized exponential function, Represents the vector dimension. Indicates hyperparameters, Indicates the number of physical quantities. Indicates the first The weighting coefficients corresponding to each physical quantity Density represents a physical quantity. Indicates the first A physical quantity Represents the velocity field. Represents the gradient operator; express ; The attention output over time is calculated using the following formula: ; This represents the attention output over the time dimension; Indicates the first The attention output of each attention head in the time dimension Indicates the first The attention output of each attention head in the time dimension; ; This represents the Sigmoid function. Indicates dynamic gating. express transpose, Represents the causal mask matrix. Indicate attention head hyperparameters, Indicate attention head Time decay mask; Multiple residual connections and normalization processes are performed on the physics-related attention output and the time-dimensional attention output to obtain physics-time fusion features, including: The first residual connection and normalization process is represented by the following formula: ; ; ; ; Indicates to The output after layer normalization This represents the result of the first physics-related residual connection. The input features represent the physical constraints of the multi-head attention mechanism. Indicates a regularization operation; Indicates to The output after normalization This represents the result of the first residual connection in the time dimension. Input features representing causal temporal attention mechanisms; The second residual join and normalization process is represented by the following formula: ; ; ; ; Indicates to The output after layer normalization This represents the result of the second physics-related residual connection. This indicates physical position-by-position feedforward processing; Indicates to The output after layer normalization This represents the result of the second residual connection in the time dimension. This indicates time-by-position feedforward processing; The physical-temporal fusion characteristics are calculated using the following formula: ; Indicates physical-temporal fusion characteristics. Indicates adaptive weights; Based on the physical-temporal fusion characteristics, the following formula is used to predict wind speed: ; ; Indicates predicted wind speed, Indicates physical-temporal fusion characteristics. This represents the minimum reasonable wind speed value. , This represents the maximum reasonable wind speed value. , Indicates the corrected strength coefficient; Indicates physical constraint truncation. Represents the Hamiltonian energy function; If the error between the predicted wind speed and the actual wind speed does not meet the preset threshold, the model parameters are adjusted until the error between the predicted wind speed and the actual wind speed meets the preset threshold.

[0021] like Figure 3 As shown, an improved sparrow search algorithm is used to select the optimal model parameters during the training process that minimize the error between the predicted and actual wind speeds output by the short-term wind speed prediction model. Specifically: The model parameters of the short-term wind speed prediction model are generated by combining an improved sine map and a Tent map, including: Suppose there are a total of model parameters to be optimized. If there are 1, then the position vector of each sparrow in the sparrow population is 1. If the dimension is given, then the position of the sparrow in the initial population is represented as: ; This represents the initial set of sparrows. Indicates the first in the initial population m A sparrow in The position of the dimension, that is, the first The values ​​of each model parameter; The positions of each sparrow in the initial population are shuffled using the following formula: ; Indicates the first in the initial population individual, Indicates the first in the initial population individual, This indicates taking the sine value. Represents a random number. This represents a random number that follows a standard normal distribution. Indicates the Tent mapping parameters. This indicates generating a random number between 0 and 1; The initial population was divided into three groups: discoverers, joiners, and watchers. The foraging behavior of sparrows was simulated. Cauchy perturbation and matrix pseudo-inverse optimization were introduced. The positions of each group were updated according to the preset update rounds, including: calculating the initial fitness value of each sparrow in the initial population. Based on the initial fitness values ​​of each sparrow in the initial population, sort the initial fitness values ​​and record the current best position of the sparrow; The warning level of the population is calculated using the following formula: ; This indicates that the sparrow population is in the [number]th [year]. Update the round and the warning level value. Indicates the preset update round. Represented by real numbers An exponential function with base 0; Based on the alert level value, the location of the discoverer is updated using the following formula: ; Indicates the first In the update round The first sparrow Dimensional position, Indicates the first In the update round The first sparrow Dimensional position, Indicates the warning threshold. This represents a Cauchy distribution with a location parameter of 0 and a scale parameter of 1. Update the joiner's position using the following formula: ; ; ; This represents a random number that follows a standard normal distribution. Indicates the first The worst position in the update round. Indicates the first Update the optimal position in the round. Indicates the population size. Represents a matrix of all 1s; Describes a pseudo-inverse matrix. Represents a random matrix. express The transpose of the matrix, Indicates taking Random numbers between; Calculate the rate of change of fitness values, sort the sparrows according to their degree of stagnation, and classify the sparrows at the beginning of the sequence as vigilant sparrows; Update the location of the watchful sparrows; Calculate the fitness of each sparrow and the average fitness; The fitness values ​​of each sparrow in the current update round are sorted based on its fitness and average fitness, and the current optimal position of each sparrow is updated, including updating the sparrow's position using the following formula: ; Indicates the first The adaptability of a sparrow Indicates average fitness. This represents a normal distribution with a mean of 0 and a variance of 1. Represents a random number between 0 and 1; If the number of times each group updates its position meets the preset value, then the final optimal position in the sparrow group that avoids being prey will be output. The final optimal position is used as the optimal model parameter.

[0022] The original model parameters are replaced with the optimal model parameters to obtain a well-trained short-term wind speed prediction model.

[0023] To verify the superiority of the method proposed in this embodiment, the following comparative experiments were conducted: The following existing wind speed prediction models are compared: Convolutional Neural Network (CNN). Long Short-Term Memory (LSTM) network; Temporal Convolutional Networks (TCNs) The experimental data used in this study was wind speed data from a wind farm in southern China, with a sampling interval of 1 hour, totaling 8785 data points. The data source is as follows: Figure 8 As shown; in the experiment, the ratio of training set to test set was 8:2, the time step of recurrent neural network was set to 64, the batch size was 32, the number of training rounds was 100, and the hidden layer dimension list was [32, 16]. The evaluation indicators for experimental results are as follows: Mean Absolute Error (MAE): ; Mean Square Error (MSE): ; Mean Absolute Percentage Error (MAPE) ; Root mean square error (RMSE) ; express t The actual wind speed at any given moment express t Real-time predicted wind speed, Indicates a time period.

[0024] Table 1. Comparison of Evaluation Indicators for Each Model

[0025] Depend on Figure 4 , Figure 5 , Figure 6 , Figure 7 As shown in Table 1, the method proposed in this embodiment reduces the prediction error MSE by 11.7%, RMSE by 6.0%, MAE by 6.6%, and MAPE by 7.1% compared to the TCN model; it reduces the prediction error MSE by 16.2%, RMSE by 8.5%, MAE by 12.8%, and MAPE by 22.0% compared to the LSTM model; and it reduces the prediction error MSE by 72.2%, RMSE by 47.3%, MAE by 55.4%, and MAPE by 53.2% compared to the CNN model. In summary, the method proposed in this embodiment yields the best prediction results.

[0026] Those skilled in the art will understand that embodiments of this application can be provided as methods, apparatus, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage CD-ROMs, optical storage, etc.) containing computer-usable program code.

[0027] This application is described with reference to flowchart illustrations of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each step in the flowchart can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing device, generate instructions for implementing the process. Figure 1 One or more processes or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0028] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 The function specified in one or more processes.

[0029] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 Steps of a specified function in one or more processes.

[0030] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims. All of these forms are within the protection scope of the present invention.

Claims

1. A short-term wind speed prediction method, characterized in that, include: Obtain wind speed data and geographical location information of wind farms in the target area; The real-time wind speed data and geographic location information are input into a pre-trained short-term wind speed prediction model to obtain the predicted wind speed of the target area in the future. The training of the short-term wind speed prediction model includes: Establish a training set of historical wind speed-geographic location information data; A short-term wind speed prediction model was trained using a training set of historical wind speed-geographic location information data. An improved sparrow search algorithm is used to select the optimal model parameters that minimize the error between the predicted wind speed and the actual wind speed output by the short-term wind speed prediction model during the training process. The original model parameters are replaced with the optimal model parameters to obtain a well-trained short-term wind speed prediction model.

2. The short-term wind speed prediction method according to claim 1, characterized in that, The training set includes: Historical wind speed records, including wind speed data corresponding to each time point in the historical period; Geographic location information, including latitude, longitude, and altitude data of the regions corresponding to historical wind speed records.

3. The short-term wind speed prediction method according to claim 1, characterized in that, The short-term wind speed prediction model includes: A hierarchical embedding layer is used to obtain enhanced fusion features based on time and geographic location features after fusion processing, according to wind speed data and geographic location information. The attention layer is used to compute the attention output related to the physical constraints of the fusion feature representation and the attention output in the temporal dimension, based on the physical constraint multi-head attention mechanism and the causal temporal attention mechanism. Multiple residual connections and normalization processes are performed on the physics-related attention output and the time-dimensional attention output to obtain physics-time fusion features; The output layer is used to predict wind speed based on physical-temporal fusion features.

4. The short-term wind speed prediction method according to claim 1, characterized in that, The method of training a short-term wind speed prediction model using a historical time period wind speed-geographic location information data training set includes: Based on historical wind speed-geographic location information data, obtain the first feature for time encoding and the second feature for geographic location information encoding; The first feature and the second feature are fused once to obtain the initial fused feature; A secondary fusion process is performed on the first feature, the second feature, and the initial fusion feature to obtain the enhanced fusion feature; Based on the physical constraint multi-head attention mechanism and the causal temporal attention mechanism, we calculate the attention output of the enhanced fusion feature representation related to physics and the attention output of the representation in the temporal dimension, respectively. Multiple residual connections and normalization processes are performed on the physics-related attention output and the time-dimensional attention output to obtain physics-time fusion features; Based on the physical-temporal fusion feature, wind speed is predicted; if the error between the predicted wind speed and the actual wind speed does not meet the preset threshold, the model parameters are adjusted until the error between the predicted wind speed and the actual wind speed meets the preset threshold.

5. The short-term wind speed prediction method according to claim 4, characterized in that, The process involves multiple residual connections and normalizations of the physics-related attention output and the temporal attention output to obtain physics-temporal fusion features, including: The following formula represents the first residual join and normalization process: ; ; ; ; Indicates to The output after layer normalization Representation layer normalization, This represents the result of the first physics-related residual connection. The input features represent the physical constraints of the multi-head attention mechanism. This represents a regularization operation. This represents attention output related to physics; Indicates to The output after normalization This represents the result of the first residual connection in the time dimension. Input features representing causal temporal attention mechanisms This represents the attention output over the time dimension; The second residual join and normalization process is represented by the following formula: ; ; ; ; Indicates to The output after layer normalization This represents the result of the second physics-related residual connection. This indicates physical position-by-position feedforward processing; Indicates to The output after layer normalization This represents the result of the second residual connection in the time dimension. This indicates time-by-position feedforward processing; The physical-temporal fusion characteristics are calculated using the following formula: ; Indicates physical-temporal fusion characteristics. This indicates adaptive weights.

6. The short-term wind speed prediction method according to claim 4, characterized in that, The wind speed prediction based on physical-temporal fusion features includes: Wind speed is predicted using the following formula: ; ; Indicates predicted wind speed, Indicates physical-temporal fusion characteristics. This represents the minimum reasonable wind speed value. This represents the maximum reasonable wind speed value. Indicates the corrected strength coefficient. Indicates a time point; Indicates physical constraint truncation. Indicates linear projection. This represents the Hamiltonian energy function.

7. The short-term wind speed prediction method according to claim 1, characterized in that, An improved sparrow search algorithm is used to select the optimal model parameters during the training process that minimize the error between the predicted and actual wind speeds output by the short-term wind speed prediction model. These parameters include: An improved sine mapping and Tent mapping were used to generate the initial population for the model parameters of the short-term wind speed prediction model. The initial population was divided into three groups: discoverers, joiners, and vigilants. The foraging behavior of sparrow populations was simulated. Cauchy perturbation and matrix pseudo-inverse optimization were introduced, and the positions of each group were updated according to the preset update rounds. If the number of times each group updates its position meets the preset value, then the final optimal position in the sparrow group that avoids being prey will be output. The final optimal position is used as the optimal model parameter.

8. The short-term wind speed prediction method according to claim 7, characterized in that, The model parameters of the short-term wind speed prediction model are generated by a mixture of improved sine mapping and Tent mapping, including: Suppose there are a total of model parameters to be optimized. If there are 1, then the position vector of each sparrow in the sparrow population is 1. If the dimension is given, then the position of the sparrow in the initial population is represented as: ; This represents the initial set of sparrows. Indicates the first in the initial population m A sparrow in The position of the dimension, that is, the first The values ​​of each model parameter; The positions of each sparrow in the initial population are shuffled using the following formula: ; Indicates the first in the initial population individual, Indicates the first in the initial population individual, This indicates taking the sine value. Represents a random number. This represents a random number that follows a standard normal distribution. Indicates the Tent mapping parameters. This indicates that a random number between 0 and 1 is generated.

9. The short-term wind speed prediction method according to claim 7, characterized in that, The initial population was divided into three groups: discoverers, joiners, and watchers. The foraging behavior of sparrow populations was simulated, and Cauchy perturbation and matrix pseudo-inverse optimization were introduced. The positions of each group were updated according to a preset update cycle, including: Calculate the initial fitness value of each sparrow in the initial population; Based on the initial fitness values ​​of each sparrow in the initial population, sort the initial fitness values ​​and record the current best position of the sparrow; The warning level of the population is calculated using the following formula: ; This indicates that the sparrow population is in the [number]th [year]. Update the round and the warning level value. Indicates the preset update round. Represented by real numbers An exponential function with base 0; Based on the alert level value, the location of the discoverer is updated using the following formula: ; Indicates the first In the update round The first sparrow Dimensional position, Indicates the first In the update round The first sparrow Dimensional position, Represents a random number. Indicates the warning threshold. This represents a Cauchy distribution with a location parameter of 0 and a scale parameter of 1. Update the joiner's position using the following formula: ; ; ; This represents a random number that follows a standard normal distribution. Indicates the first The worst position in the update round. Indicates the first Update the optimal position in the round. Indicates the population size. Represents a matrix of all 1s; Describes a pseudo-inverse matrix. Represents a random matrix. express The transpose of the matrix, Indicates taking Random numbers between, Indicates the number of model parameters; Calculate the rate of change of fitness values, sort the sparrows according to their degree of stagnation, and classify the sparrows at the beginning of the sequence as vigilant sparrows; Update the location of the watchful sparrows; Calculate the fitness of each sparrow and the average fitness; The fitness values ​​of each sparrow and the average fitness are sorted based on the fitness values ​​of the sparrows in the current update round, and the current optimal position of the sparrows is updated.

10. The short-term wind speed prediction method according to claim 9, characterized in that, The process of sorting the fitness values ​​of the sparrows in the current update round based on the fitness of each sparrow and the average fitness, and then updating the sparrows' current optimal positions, includes: Update the sparrow's position using the following formula: ; Indicates the first The adaptability of a sparrow, Indicates average fitness. This represents a normal distribution with a mean of 0 and a variance of 1. This represents a random number that follows a standard normal distribution. Represents a random number.