Short-term wind speed prediction method based on multi-scale information fusion and related device

By combining a segmented embedding network with a multi-layer dual-dimensional self-attention network, the problems of high computational complexity and insufficient prediction accuracy in existing short-term wind speed forecasting methods are solved, and efficient and accurate wind speed forecasting is achieved.

CN120706648APending Publication Date: 2025-09-26XI AN JIAOTONG UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510834826.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2025-04-24
Filing Date
2025-06-20
Publication Date
2025-09-26

AI Technical Summary

Technical Problem

Existing short-term wind speed forecasting methods have shortcomings in prediction accuracy and computational efficiency, especially the reliance on data decomposition and external feature engineering, which leads to reduced model generalization ability and high computational complexity. In addition, the Transformer's multivariate modeling and time series pattern capture capabilities are not fully utilized.

Method used

A lightweight and efficient wind speed prediction model is adopted. Data is processed through a segmented embedding network and a multi-layer two-dimensional self-attention network to directly and accurately predict the wind speed. The segmented embedding network is used to reduce redundant features, and the two-dimensional self-attention network captures the dependency between time and feature dimensions. The inter-block fusion network is combined for dynamic weighted processing.

Benefits of technology

It improves the accuracy and efficiency of short-term wind speed forecasts, reduces computational complexity, fully exploits the multivariate modeling capabilities of Transformer, and improves forecast performance and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120706648A_ABST
    Figure CN120706648A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of short-term wind speed prediction, and discloses a short-term wind speed prediction method based on multi-scale information fusion and a related device. The short-term wind speed prediction method based on multi-scale information fusion comprises the steps of obtaining historical data in a first preset time period; taking the acquired historical data as input, performing wind speed prediction by using the trained wind speed prediction model, and acquiring a wind speed prediction result in a second preset time period in the future; the wind speed prediction model comprises a segmented embedded network, a plurality of layers of serially connected two-dimensional self-attention networks and a block fusion network, and an inter-block fusion network is arranged between every two adjacent layers of two-dimensional self-attention networks. According to the technical scheme disclosed by the invention, the lightweight and efficient wind speed prediction model is adopted for prediction, and the wind speed can be directly and accurately predicted only by simply preprocessing the data, so that the prediction efficiency and accuracy are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of short-term wind speed prediction, and in particular relates to a short-term wind speed prediction method based on multi-scale information fusion and related devices. Background Art

[0002] Short-term wind power forecasting plays a crucial role in supporting wind power system regulation and market transactions. In recent years, Transformer and its variants have made significant progress in wind power forecasting. Researchers have proposed a variety of methods that combine data decomposition, signal processing, and deep learning enhancement strategies.

[0003] At present, existing prediction methods have achieved certain results in prediction accuracy, but the following problems still exist:

[0004] (1) Existing methods typically use data preprocessing techniques such as ensemble empirical mode decomposition and wavelet transform to reduce the non-stationarity and noise of wind speed data. However, this method, which relies on data decomposition, introduces additional computational complexity and requires manual selection of appropriate decomposition parameters, resulting in a decrease in the generalization ability of the model. Furthermore, some existing methods use complex external feature engineering (such as physical modeling or manually constructed meteorological features) for data preprocessing, which has the problem of low computational efficiency.

[0005] (2) Transformer itself has powerful feature learning capabilities, but existing methods often focus on using external preprocessing methods when designing models, and fail to fully tap the advantages of Transformer itself in multivariate modeling, temporal pattern capture and adaptive feature extraction. Most of them use a single-dimensional attention mechanism for modeling, which ignores features in other dimensions, resulting in poor prediction performance. Summary of the Invention

[0006] The present invention aims to provide a short-term wind speed forecasting method and related apparatus based on multi-scale information fusion to address one or more of the aforementioned technical problems. The disclosed technical solution utilizes a lightweight and efficient wind speed forecasting model that requires only simple data preprocessing to accurately predict wind speed, thereby improving both efficiency and accuracy.

[0007] In order to achieve the above object, the present invention adopts the following technical solutions:

[0008] In a first aspect, the present invention provides a short-term wind speed prediction method based on multi-scale information fusion, comprising the following steps:

[0009] Acquiring historical data within a first preset time period; wherein the historical data is multi-dimensional weather data including wind speed and wind turbine data;

[0010] The acquired historical data is used as input, and the trained wind speed prediction model is used to perform wind speed prediction, thereby obtaining a wind speed prediction result for a second preset time period in the future;

[0011] Wherein, the wind speed prediction model includes:

[0012] The segmented embedding network is used to input historical data, divide the time series of each feature in the historical data into data segments of the same length, embed the data segments and output them;

[0013] A multi-layer serially connected two-dimensional self-attention network, wherein an inter-block fusion network is provided between two adjacent layers of the two-dimensional self-attention network; wherein the first layer of the two-dimensional self-attention network is used to input the embedding representation output by the segment embedding network, and successively performs self-attention operations from the time dimension and the feature dimension to capture the dependency relationship between the time and feature dimensions, and outputs an abstract representation of the fused two-dimensional information; each subsequent layer of the two-dimensional self-attention network is used to input the output of the previous layer of the two-dimensional self-attention network processed by the inter-block fusion network, and successively performs self-attention operations from the time dimension and the feature dimension to capture the dependency relationship between the time and feature dimensions, and outputs an abstract representation of the fused two-dimensional information; the processing step of the inter-block fusion network is to splice adjacent segments into one segment;

[0014] The block fusion network is used to input the output of each layer of the two-dimensional self-attention network and perform dynamic weighted processing to obtain the final wind speed prediction result.

[0015] In a further preferred embodiment of the short-term wind speed forecasting method of the present invention, the segmented embedding network of the wind speed forecasting model is used to input historical data, divide the time series of each feature in the historical data into data segments of the same length, embed the data segments and output them,

[0016] The formula for embedding the data segment is:

[0017]

[0018] Where p i,d represents the embedding representation of the d-th dimension of the i-th segment; E represents the learnable projection matrix; is the i-th segment of the d-th dimension variable, and the length of each segment is L seg PE i,d represents a fixed position embedding at position (i, d), represents the learnable positional embedding at position (i, d); i represents the segment number and d represents the feature number.

[0019] In a further preferred embodiment of the short-term wind speed forecasting method of the present invention, in a multi-layer serially connected two-dimensional self-attention network, each layer of the two-dimensional self-attention network includes a time self-attention layer and a feature self-attention layer; wherein the time self-attention layer is used to perform a time self-attention operation on the time periods before and after the same feature, capture the dependency relationship before and after the time, and obtain an abstract representation of the fused time feature; the feature self-attention layer is used to input the abstract representation of the fused time feature, perform a feature self-attention operation on different features of the same time period, capture the dependency relationship between different features, and obtain an abstract representation of the fused two-dimensional information.

[0020] In a further preferred embodiment of the short-term wind speed forecasting method of the present invention, the calculation process formula for the temporal self-attention operation in the temporal self-attention layer is:

[0021]

[0022] Where, P seg is the output matrix; LayerNorm represents layer normalization; MLP represents a multi-layer feedforward neural network; P :,d represents all block embedding representations of the d-th feature, where d is the feature number; MSA represents multi-head self-attention for inter-segment interaction; For the intermediate result.

[0023] In the feature self-attention layer, the calculation process formula for the feature self-attention operation is:

[0024]

[0025] Where Z is the final output; is the intermediate result; MSA1 and MSA2 represent two attention operations; B is the output of the first attention; R is a small matrix that can be learned; Z feature is the output of the second attention; is the output of the temporal attention layer, where the subscript (i,:) represents all features of the i-th block.

[0026] In a further preferred embodiment of the short-term wind speed prediction method of the present invention, the formula for the inter-block fusion network calculation process is expressed as:

[0027]

[0028] Where, l represents the layer number; N is the number of layers; Represents the merged result, which is used as the input of the lth layer; are adjacent blocks of the same variable in the l-1th layer, i is the block number, d is the feature number; M is a learnable fusion matrix, [·] represents a serial operation; TMSA represents a two-layer self-attention operation, Z l Represents the output of layer l.

[0029] In a further preferred embodiment of the short-term wind speed prediction method of the present invention, the MSE loss function is used for iterative training during the training of the wind speed prediction model; wherein the MSE loss function is calculated as follows:

[0030]

[0031] Where B is the batch size; T is the sequence length; C is the number of features; y is the true value; is the predicted value.

[0032] In a further preferred embodiment of the short-term wind speed prediction method of the present invention, the historical data specifically includes wind speed, wind direction, temperature, and air pressure.

[0033] A second aspect of the present invention provides a short-term wind speed prediction system based on multi-scale information fusion, comprising:

[0034] A data acquisition module, configured to acquire historical data within a first preset time period; wherein the historical data is multi-dimensional weather data including wind speed and wind turbine data;

[0035] A prediction module is used to use the acquired historical data as input, perform wind speed prediction using the trained wind speed prediction model, and obtain a wind speed prediction result within a second preset time period in the future;

[0036] Wherein, the wind speed prediction model includes:

[0037] The segmented embedding network is used to input historical data, divide the time series of each feature in the historical data into data segments of the same length, embed the data segments and output them;

[0038] A multi-layer serially connected two-dimensional self-attention network, wherein an inter-block fusion network is provided between two adjacent layers of the two-dimensional self-attention network; wherein the first layer of the two-dimensional self-attention network is used to input the embedding representation output by the segment embedding network, and successively performs self-attention operations from the time dimension and the feature dimension to capture the dependency relationship between the time and feature dimensions, and outputs an abstract representation of the fused two-dimensional information; each subsequent layer of the two-dimensional self-attention network is used to input the output of the previous layer of the two-dimensional self-attention network processed by the inter-block fusion network, and successively performs self-attention operations from the time dimension and the feature dimension to capture the dependency relationship between the time and feature dimensions, and outputs an abstract representation of the fused two-dimensional information; the processing step of the inter-block fusion network is to splice adjacent segments into one segment;

[0039] The block fusion network is used to input the output of each layer of the two-dimensional self-attention network and perform dynamic weighted processing to obtain the final wind speed prediction result.

[0040] In a third aspect of the present invention, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, a short-term wind speed prediction method based on multi-scale information fusion as described in any one of the first aspects of the present invention is implemented.

[0041] In a fourth aspect, the present invention provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the short-term wind speed prediction method based on multi-scale information fusion as described in any one of the first aspects of the present invention is implemented.

[0042] Compared with the prior art, the present invention has the following beneficial effects:

[0043] The present invention discloses a short-term wind speed forecasting method based on multi-scale information fusion, achieving efficient and accurate short-term wind speed forecasting without requiring excessive manual processing of raw data. Specifically, the wind speed forecasting model employed in the present invention employs a segmented embedding network, employing block embedding techniques to divide the raw input into equal time periods and then construct a vector representation. This processing approach reduces redundant features and compresses local information, improving the model's ability to learn local features while also reducing computational complexity. Unlike traditional Transformers, the wind speed forecasting model employed in the present invention employs a dual-dimensional self-attention network, with two layers of attention assigned to different functions. The first layer is responsible for the interaction between previous and subsequent segments of the same feature, while the second layer is responsible for the interaction between different features within the same time segment. This dual-layer attention fully exploits the dependencies between different periods and features, fully exploiting information from both time and feature dimensions for modeling. This overcomes the limitations of single-dimensional modeling in existing solutions and improves the model's predictive performance. Furthermore, the model gradually compresses information at different scales through inter-block merging, interactively learning from multiple dimensions—time, features, and scale—to adapt to diverse data distributions, thereby improving prediction accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below; obviously, the drawings described below are some embodiments of the present invention, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0045] Figure 1 1 is a flow chart of a short-term wind speed prediction method based on multi-scale information fusion in an embodiment of the present invention;

[0046] Figure 2 1 is a schematic diagram of the overall architecture of a short-term wind speed forecasting method based on multi-scale information fusion of Transformer variants in a specific embodiment of the present invention;

[0047] Figure 3 is a schematic diagram of the structure of temporal self-attention in a specific embodiment of the present invention;

[0048] Figure 4 2 is a schematic diagram of the structure of feature self-attention in a specific embodiment of the present invention;

[0049] Figure 5 This is a schematic diagram comparing the predicted losses of the technical solution of the present invention and other existing models on a real wind turbine data set in a specific embodiment of the present invention; wherein the input step length is 144;

[0050] Figure 6 3 is a schematic diagram of a short-term wind speed prediction system based on multi-scale information fusion in an embodiment of the present invention. DETAILED DESCRIPTION

[0051] In order to make the purpose, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention; it is obvious that the described embodiments and technical solutions are only part of the embodiments of the present invention, not all of the embodiments.

[0052] All other embodiments obtained by persons of ordinary skill in the art based on the technical solutions disclosed in the embodiments of the present invention without creative effort shall fall within the scope of protection of the present invention. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to these processes, methods, products, or apparatuses.

[0053] See also Figure 1 The embodiment of the present invention provides a short-term wind speed forecasting method based on multi-scale information fusion, specifically a short-term wind speed forecasting method based on multi-scale information fusion of a Transformer variant, comprising the following steps:

[0054] Step 1: Acquire historical data within a first preset time period; wherein the historical data is multi-dimensional weather data including wind speed and wind turbine data; in a further exemplary technical solution, the historical data includes wind speed, wind direction, temperature, and air pressure; and for further explanation, short-term refers to a period of less than 12 hours;

[0055] Step 2: Using the historical data obtained in step 1 as input, the trained wind speed prediction model is used to perform wind speed prediction to obtain a wind speed prediction result for a second preset time period in the future;

[0056] Wherein, the wind speed prediction model includes:

[0057] The segmented embedding network is used to input historical data, divide the time series of each feature in the historical data into data segments of the same length, embed the data segments and output them;

[0058] Multiple layers of serially connected two-dimensional self-attention networks and inter-block fusion networks, wherein the inter-block fusion network is provided between two adjacent layers of two-dimensional self-attention networks; wherein the first layer of the two-dimensional self-attention network is used to input the embedding representation output by the segment embedding network, and performs self-attention operations from the time dimension and the feature dimension in succession, captures the dependency relationship between the time and feature dimensions, and outputs an abstract representation of the fused two-dimensional information; each subsequent layer of the two-dimensional self-attention network is used to input the output of the previous layer of the two-dimensional self-attention network processed by the inter-block fusion network, and performs self-attention operations from the time dimension and the feature dimension in succession, captures the dependency relationship between the time and feature dimensions, and outputs an abstract representation of the fused two-dimensional information; the processing step of the inter-block fusion network is to splice adjacent segments into one segment;

[0059] The block fusion network is used to input the output of each layer of the two-dimensional self-attention network and perform dynamic weighting to obtain the final wind speed prediction result.

[0060] In the technical solution provided by the embodiment of the present invention, the original multi-dimensional historical data (for example, wind speed, wind direction, temperature, air pressure) is used as input, which avoids the decomposition of wind speed data (such as ensemble empirical mode decomposition, wavelet transform) and complex manual feature engineering (such as physical modeling) in existing traditional methods; eliminates the need for manual selection of decomposition parameters, significantly reduces the computational complexity of the preprocessing stage (such as avoiding recursive decomposition and parameter tuning), and at the same time retains the multivariate coupling information in the original data, thereby improving the generalization ability of the model. The present invention divides the time series of historical data into data segments of the same length, and learns local patterns through embedding representation, replacing the global decomposition operation (such as wavelet transform) in traditional methods, and adaptively captures time series dependencies through local segments, reducing the noise and computational overhead introduced by global decomposition. The present invention adopts a two-dimensional self-attention mechanism. In each layer of the network, self-attention calculations are performed from the time dimension and the feature dimension in turn, and the cross-dependency between multiple variables is explicitly modeled, breaking through the limitations of the existing traditional single-dimensional attention (such as only capturing time dependence or feature dependence). It can further capture the dynamic correlation between wind speed and other meteorological characteristics (such as temperature, air pressure), and improve the feature expression ability. An inter-block fusion network is inserted between adjacent two-dimensional self-attention layers, and the segmented output of the previous layer is spliced ​​and processed, and multi-scale information is gradually integrated. Through hierarchical abstraction and cross-layer information fusion, the model's modeling ability for complex time series patterns (such as short-term mutations and long-term trends) is enhanced, and the overfitting of local patterns by single-layer attention is avoided. Finally, the present invention performs dynamic weighted aggregation on multi-layer outputs, adaptively integrates feature representations at different levels, realizes hierarchical fusion of multi-scale information, balances local details and global trends, and improves the robustness of the prediction results.

[0061] In a specific embodiment of the present invention, each layer of the two-dimensional self-attention network includes a temporal self-attention layer and a feature self-attention layer; wherein the temporal self-attention layer is used to perform self-attention operations on the time periods before and after the same feature, capture the dependency relationship before and after time, and obtain an abstract representation of the fused temporal features; the feature self-attention layer is used to input the abstract representation of the fused temporal features, perform self-attention operations on different features of the same time period, capture the dependency relationship between different features, and obtain an abstract representation of the fused two-dimensional information.

[0062] In a specific embodiment of the present invention, a short-term wind speed forecasting method based on multi-scale information fusion of a Transformer variant is provided, comprising the following steps:

[0063] Step 1: Collect historical data, including weather data such as wind speed, wind direction, temperature, and air pressure over a historical period, and pre-process them;

[0064] Step 2: Build a wind speed prediction model;

[0065] Step 3: Use historical data to train the prediction model;

[0066] Step 4: Input historical data into the model, output predicted wind speed data, and evaluate the model effect.

[0067] In one embodiment of the present invention, the steps performed in step 1 specifically include:

[0068] Step 11: Fill the empty values ​​of the data and align the weather data with the wind speed data using linear interpolation;

[0069] In the preferred technical solution, historical wind turbine data and weather data are collected for preprocessing; wherein, the preprocessing includes outlier processing, null value processing and normalization processing; normalization is performed using normalization;

[0070] Step 12: Divide the data into training set, validation set and test set in the ratio of 7:1:2.

[0071] In one embodiment of the present invention, in the wind speed prediction model constructed in step 2, the segmented embedding network includes data segmentation, value embedding and learnable position embedding; in the two-dimensional self-attention network, time self-attention is used to capture periodic dependencies, and feature self-attention is used to capture dependencies between features; and the block fusion network is used to obtain information at different scales.

[0072] In a specific exemplary technical solution, the specific calculation formula of the segmented embedding network is:

[0073]

[0074] Where E represents the learnable projection matrix, PE i,d represents a fixed position embedding at position (i, d), represents the learnable positional embedding at position (i, d). i represents the segment number and d represents the feature number. is the i-th segment of the d-th dimension variable, and the length of each segment is L seg .

[0075] In a specific exemplary technical solution, the temporal self-attention calculation process formula is:

[0076]

[0077] Where, P :,drepresents the embedding representation of all blocks of the d-th feature, where d is the feature number; MSA stands for multi-head self-attention for inter-segment interaction; MLP stands for multi-layer feedforward neural network; LayerNorm stands for layer normalization, which is a standard processing method like residual to increase model stability; is the intermediate result; P seg Output matrix.

[0078] In a specific exemplary technical solution, the feature self-attention calculation process formula is:

[0079]

[0080] Where, is the output of the temporal attention layer, where the subscript (i,:) represents all features of the i-th block; MSA1 and MSA2 represent two attention operations; R is a small matrix that can be learned; B is the output of the first attention, and Z feature is the output of the second attention; is the intermediate result; Z is the final output.

[0081] In a specific exemplary technical solution, the inter-block fusion network calculation process formula is:

[0082]

[0083] Where l is the layer number, N is the number of layers, and P seg represents the matrix after embedding; M is a learnable fusion matrix; are adjacent blocks of the same variable in the l-1th layer, where i is the block number and d is the feature number; [·] represents a serial operation. Represents the merged result as the input of the lth layer; TMSA represents the two-layer self-attention operation, Z l Represents the output of layer l.

[0084] In the specific exemplary technical solution, in step three, the MSE loss function is used to perform iterative training of the model.

[0085] The loss function calculation formula is:

[0086]

[0087] Where B is the batch size; T is the sequence length; C is the number of features; y is the true value; is the predicted value.

[0088] In a specific exemplary technical solution, the mean absolute error and root mean square error of the wind speed prediction result are calculated in step 4 to evaluate whether the result of the wind speed calculation model is accurate.

[0089] See also Figures 2 to 5 In a specific embodiment of the present invention, a short-term wind speed prediction method based on multi-scale information fusion of Transformer variants is provided, comprising the following steps:

[0090] Step 1: Acquire and preprocess historical data, remove outliers and null values, and normalize the data using normalization. Specifically, the wind turbine data comes from 80,000 data points at the Balasu wind farm, with a wind speed resolution of 10 minutes. The weather data has a resolution of 1 hour. To align the data, linear interpolation is used to expand the weather data to a 10-minute resolution.

[0091] Step 2: Build a wind speed prediction model;

[0092] like Figure 2 As shown in the figure, the wind speed prediction model includes a segmented embedding layer, which compresses data and enhances local information extraction; a temporal self-attention layer, which can capture periodic information; a feature attention layer, which can capture the dependency between features; an inter-block fusion layer, which further fuses multi-scale information; and dynamic weighting of different layers to obtain the final wind speed prediction.

[0093] Among them, the calculation process of the segmented embedding layer is:

[0094] First, the data is segmented, and a single point in each dimension is divided into length L seg Size of time period:

[0095]

[0096] in, is the i-th segment of the d-th dimension variable, and the length of each segment is L seg .

[0097] Each segment is then embedded:

[0098]

[0099] in, represents the learnable projection matrix, represents a fixed position embedding at position (i, d), represents the learnable positional embedding at position (i, d). i represents the segment number and d represents the feature number. i,drepresents the embedding representation for the i-th segment and the d-th dimension. Explanatorily, this embedding method combines the advantages of fixed and learnable encodings, allowing the model to have global temporal awareness while automatically adapting to data patterns at different time scales, and automatically learning the optimal positional embedding during training.

[0100] After embedding the embedding layer, the embedding matrix can be obtained:

[0101]

[0102] Among them, each p i,d Represents a sequence segment of a single variable. Explanation-wise, this segmented embedding method can maintain independence between variables while making full use of local information and reducing the amount of subsequent computation.

[0103]

[0104] Among them, E represents the learnable projection matrix, PE i,d represents a fixed position embedding at position (i, d), represents the learnable positional embedding at position (i, d). i represents the segment number and d represents the feature number. is the i-th segment of the d-th dimension variable, and the length of each segment is L seg .

[0105] like Figure 3 As shown in Figure 2, the calculation process of the temporal self-attention layer is:

[0106]

[0107] Among them, P :,d represents the embedding representation of all blocks of the d-th feature, where d is the feature number, 1≤d≤D; MSA stands for multi-head self-attention for inter-segment interaction; MLP stands for multi-layer feedforward neural network; LayerNorm stands for layer normalization, which is a standard processing method like residual to increase model stability; is the intermediate result; is the output matrix of this layer, where L is the number of segments, D is the number of features, and d model is the embedding dimension. Through the self-attention mechanism of this layer, the temporal dependency between segments of the same variable is captured. The time complexity of this layer is O(DL 2 ), where L is the number of segments, and segment processing reduces the computational complexity.

[0108] like Figure 4 As shown, the feature self-attention layer calculation process is:

[0109] To prevent the computational complexity from being too high due to excessive variables, a learnable small matrix is added to the second attention layer in the present invention c << D is a constant. Such processing can reduce the complexity to O(DL) and improve the efficiency:

[0110]

[0111] Among them, is the output of the temporal attention layer, where the subscript (i, :) represents all features of the i-th block; MSA1 and MSA2 represent two attention operations; is the output of the first attention, is the output of the second attention; is the intermediate result; is the final output. The parameters in R are randomly initialized and first used as the query of the first attention, P seg as K, V, used to collect information from P seg and then use the obtained output as K, V, and P seg as the query for the second attention operation for information sending. Such an operation can complete the interaction between variables while reducing the computational amount.

[0112] As Figure 2 shown, the multi-layer concatenated two-dimensional self-attention network is a multi-level Encoder structure with a total of N layers; after obtaining the output Z through two layers of attention, the predicted output is obtained through the mapping layer:

[0113] P l = projection l (Z);

[0114] Among them, P l ∈R τ×D represents the output of the l-th layer, where τ is the length of the predicted sequence and D is the number of features; projection l ∈τ×(L * d model ) represents the learnable linear mapping layer of the l-th layer, and l is the layer number.

[0115] In addition, there is also a very important inter-block fusion network, and its processing process is expressed as:

[0116]

[0117] [[ID=​​​​​​is a learnable fusion matrix; are adjacent blocks of the same variable in the l-1th layer, where i is the block number and d is the feature number; [·] represents a serial operation. Represents the merged result as the input of the lth layer; TMSA represents the two-layer self-attention operation, Z l Represents the output of layer l. Through this operation, the model can capture information at different scales.

[0119] In the embodiment of the present invention, the calculation process of the dynamic weighting of the block fusion network is as follows: for a multi-layer structure, each layer output contains information of different scales, and the multi-layer information is fused to obtain the final prediction:

[0120] P out =[P 1 ,P 2 …P N ]

[0121]

[0122] Among them, p i Represents the output of each layer, w i is a learnable weight parameter; The final prediction result is obtained. Information at different scales is integrated through weighted summation. Learnable weights automatically learn the proportion of information at different scales to obtain the best prediction.

[0123] like Figure 5 As shown, Figure 5 The comparison results of the prediction model at the Balasu wind farm are shown. The input step size is set to 144, and the prediction steps are [3, 6, 12, 24, 48, 96] respectively. Figure 5 It can be seen from the figure that the technical solution of the embodiment of the present invention can achieve the optimal prediction effect at each step size.

[0124] The following are device embodiments of the present invention, which can be used to perform the method embodiments of the present invention. For details not disclosed in the device embodiments, please refer to the method embodiments of the present invention.

[0125] See also Figure 6 In an embodiment of the present invention, a short-term wind speed prediction system based on multi-scale information fusion is provided, comprising:

[0126] A data acquisition module, configured to acquire historical data within a first preset time period; wherein the historical data is multi-dimensional weather data including wind speed and wind turbine data;

[0127] A prediction module is used to use the acquired historical data as input, perform wind speed prediction using the trained wind speed prediction model, and obtain a wind speed prediction result within a second preset time period in the future;

[0128] Wherein, the wind speed prediction model includes:

[0129] The segmented embedding network is used to input historical data, divide the time series of each feature in the historical data into data segments of the same length, embed the data segments and output them;

[0130] A multi-layer serially connected two-dimensional self-attention network, wherein an inter-block fusion network is provided between two adjacent layers of the two-dimensional self-attention network; wherein the first layer of the two-dimensional self-attention network is used to input the embedding representation output by the segment embedding network, and successively performs self-attention operations from the time dimension and the feature dimension to capture the dependency relationship between the time and feature dimensions, and outputs an abstract representation of the fused two-dimensional information; each subsequent layer of the two-dimensional self-attention network is used to input the output of the previous layer of the two-dimensional self-attention network processed by the inter-block fusion network, and successively performs self-attention operations from the time dimension and the feature dimension to capture the dependency relationship between the time and feature dimensions, and outputs an abstract representation of the fused two-dimensional information; the processing step of the inter-block fusion network is to splice adjacent segments into one segment;

[0131] The block fusion network is used to input the output of each layer of the two-dimensional self-attention network and perform dynamic weighted processing to obtain the final wind speed prediction result.

[0132] In one embodiment of the present invention, a computer device is provided, which includes a processor and a memory, wherein the memory is used to store a computer program, the computer program includes program instructions, and the processor is used to execute the program instructions stored in the computer storage medium. The processor may be a central processing unit (CPU), or may be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing core and control core of the terminal, which is suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions in the computer storage medium to implement the corresponding method flow or corresponding function; the processor described in the embodiment of the present invention can be used to perform the operation of the short-term wind speed prediction method based on multi-scale information fusion.

[0133] In one embodiment of the present invention, a storage medium is provided, specifically a computer-readable storage medium (Memory). The computer-readable storage medium is a memory device in a computer device for storing programs and data. It is understandable that the computer-readable storage medium here can include both built-in storage media in the computer device and, of course, extended storage media supported by the computer device. The computer-readable storage medium provides a storage space that stores the operating system of the terminal. In addition, one or more instructions suitable for being loaded and executed by a processor are also stored in the storage space. These instructions can be one or more computer programs (including program codes). It should be noted that the computer-readable storage medium here can be a high-speed RAM (Random Access Memory) memory or a non-volatile memory, such as at least one disk memory. The processor can load and execute one or more instructions stored in the computer-readable storage medium to implement the corresponding steps of the short-term wind speed prediction method based on multi-scale information fusion in the above embodiment.

[0134] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, optical storage, etc.) that contain computer-usable program code.

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

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

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

[0138] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered by the scope of protection of the claims of the present invention.

Claims

1. A short-term wind speed forecasting method based on multi-scale information fusion, characterized in that: The following steps are involved: Acquiring historical data within a first preset time period; wherein the historical data is multi-dimensional weather data including wind speed and wind turbine data; The acquired historical data is used as input, and the trained wind speed prediction model is used to perform wind speed prediction, thereby obtaining a wind speed prediction result for a second preset time period in the future; Wherein, the wind speed prediction model includes: The segmented embedding network is used to input historical data, divide the time series of each feature in the historical data into data segments of the same length, embed the data segments and output them; A multi-layer serially connected two-dimensional self-attention network, wherein an inter-block fusion network is provided between two adjacent layers of the two-dimensional self-attention network; wherein the first layer of the two-dimensional self-attention network is used to input the embedding representation output by the segment embedding network, and successively performs self-attention operations from the time dimension and the feature dimension to capture the dependency relationship between the time and feature dimensions, and outputs an abstract representation of the fused two-dimensional information; each subsequent layer of the two-dimensional self-attention network is used to input the output of the previous layer of the two-dimensional self-attention network processed by the inter-block fusion network, and successively performs self-attention operations from the time dimension and the feature dimension to capture the dependency relationship between the time and feature dimensions, and outputs an abstract representation of the fused two-dimensional information; the processing step of the inter-block fusion network is to splice adjacent segments into one segment; The block fusion network is used to input the output of each layer of the two-dimensional self-attention network and perform dynamic weighted processing to obtain the final wind speed prediction result.

2. The short-term wind speed prediction method based on multi-scale information fusion according to claim 1 is characterized in that: The wind speed prediction model is segmented and embedded in the network, which is used to input historical data, divide the time series of each feature in the historical data into data segments of the same length, embed the data segments and output them. The formula for embedding the data segment is: Where p i,d represents the embedding representation of the i-th segment and the d-th dimension; E represents the learnable projection matrix; is the i-th segment of the d-th dimension variable, and the length of each segment is L seg PE i,d represents a fixed position embedding at position (i, d), represents the learnable positional embedding at position (i, d); i represents the segment number and d represents the feature number.

3. The short-term wind speed prediction method based on multi-scale information fusion according to claim 1 is characterized in that: In a multi-layer serially connected two-dimensional self-attention network, each layer of the two-dimensional self-attention network includes a temporal self-attention layer and a feature self-attention layer; wherein the temporal self-attention layer is used to perform a temporal self-attention operation on the time periods before and after the same feature, capture the dependency relationship before and after time, and obtain an abstract representation of the fused temporal features; the feature self-attention layer is used to input the abstract representation of the fused temporal features, perform a feature self-attention operation on different features of the same time period, capture the dependency relationship between different features, and obtain an abstract representation of the fused two-dimensional information.

4. The short-term wind speed prediction method based on multi-scale information fusion according to claim 3 is characterized in that: In the temporal self-attention layer, the calculation process formula for the temporal self-attention operation is: Where, P seg is the output matrix; LayerNorm represents layer normalization; MLP represents a multi-layer feedforward neural network; P :,d represents all block embedding representations of the d-th feature, where d is the feature number; MSA represents multi-head self-attention for inter-segment interaction; is the intermediate result; In the feature self-attention layer, the calculation process formula for the feature self-attention operation is: Where Z is the final output, is the intermediate result; MSA1 and MSA2 represent two attention operations; B is the output of the first attention; R is a small matrix that can be learned; Z feature is the output of the second attention; is the output of the temporal attention layer, and the subscript (i,:) represents all features of the i-th block.

5. The short-term wind speed prediction method based on multi-scale information fusion according to claim 4 is characterized in that: The formula for the inter-block fusion network calculation process is expressed as: Where l represents the layer number and N is the number of layers; Represents the merged result, which is used as the input of the lth layer; are adjacent blocks of the same variable in the l-1th layer, i is the segment number, d is the feature number; M is a learnable fusion matrix, [·] represents a serial operation; TMSA represents a two-layer self-attention operation, Z l Represents the output of layer l.

6. The short-term wind speed prediction method based on multi-scale information fusion according to claim 1, characterized in that: During the training process of the wind speed prediction model, the MSE loss function is used for iterative training; wherein, the calculation formula of the MSE loss function is: Where B is the batch size; T is the sequence length; C is the number of features; y is the true value, is the predicted value.

7. The short-term wind speed prediction method based on multi-scale information fusion according to claim 1 is characterized in that: The historical data specifically includes wind speed, wind direction, temperature, and air pressure.

8. A short-term wind speed prediction system based on multi-scale information fusion, characterized in that: include: A data acquisition module, configured to acquire historical data within a first preset time period; wherein the historical data is multi-dimensional weather data including wind speed and wind turbine data; A prediction module is used to use the acquired historical data as input, perform wind speed prediction using the trained wind speed prediction model, and obtain a wind speed prediction result within a second preset time period in the future; Wherein, the wind speed prediction model includes: The segmented embedding network is used to input historical data, divide the time series of each feature in the historical data into data segments of the same length, embed the data segments and output them; A multi-layer serially connected two-dimensional self-attention network, wherein an inter-block fusion network is provided between two adjacent layers of the two-dimensional self-attention network; wherein the first layer of the two-dimensional self-attention network is used to input the embedding representation output by the segment embedding network, and successively performs self-attention operations from the time dimension and the feature dimension to capture the dependency relationship between the time and feature dimensions, and outputs an abstract representation of the fused two-dimensional information; each subsequent layer of the two-dimensional self-attention network is used to input the output of the previous layer of the two-dimensional self-attention network processed by the inter-block fusion network, and successively performs self-attention operations from the time dimension and the feature dimension to capture the dependency relationship between the time and feature dimensions, and outputs an abstract representation of the fused two-dimensional information; the processing step of the inter-block fusion network is to splice adjacent segments into one segment; The block fusion network is used to input the output of each layer of the two-dimensional self-attention network and perform dynamic weighted processing to obtain the final wind speed prediction result.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the short-term wind speed prediction method based on multi-scale information fusion according to any one of claims 1 to 7 is implemented.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the short-term wind speed prediction method based on multi-scale information fusion according to any one of claims 1 to 7 is implemented.