Short-term wind speed correction method and model based on regional weather forecast model
By employing a tower-based local hierarchical attention capture mechanism based on regional weather forecast models, information is embedded and encoded in meteorological variable data. This addresses the problem of neglecting the physical characteristics of wind speed forecasts in existing methods, achieving higher accuracy and reliability in wind speed forecasts and supporting stable wind power output.
Patent Information
- Application Number
- CN202510410800.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-02
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2045-04-02
AI Technical Summary
Existing short- and medium-term wind speed forecasting methods neglect the physical characteristics of wind speed, resulting in insufficient physical consistency and reliability of forecast results, weak model robustness, and affecting the stability of wind power output.
A tower-style local hierarchical attention capture mechanism based on regional weather forecast models is adopted to embed and encode meteorological variable data, generate predictive feature tensors, and improve the accuracy and reliability of wind speed forecasts through multi-dimensional information embedding and targeted loss function design.
It significantly improves the accuracy and reliability of short- and medium-term wind speed forecasts, enabling a more precise expression of the physical laws governing wind speed, and enhancing the accuracy of wind power prediction and the stability of the power system.
Smart Images

Figure CN120278026B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of wind power generation technology, and in particular to a method and model for correcting short- and medium-term wind speeds based on regional weather forecasting models. Background Technology
[0002] Wind energy harvesting depends on wind speed within the atmospheric boundary layer. Its volatility and intermittency lead to unstable wind power output, impacting grid operation. Therefore, developing high-precision short-to-medium-term wind speed forecasting technology (1-7 days) is crucial for grid dispatching and power system optimization.
[0003] Current methods for correcting short- and medium-term wind speed have evolved from traditional statistical methods to machine learning and deep learning. Early linear regression and autoregressive integrated moving average (ARIMA) models, while effective, were insufficient for long-term forecasts. Subsequently, machine learning methods such as gradient boosting decision trees (GBDT) and neural network models (such as recurrent neural networks (RNNs) and long short-term memory networks (LSTMs)) were introduced, significantly improving forecast performance. In recent years, attention mechanisms and Transformer models have also been applied to wind speed forecasting, further driving technological advancements. Furthermore, post-processing correction methods combining signal processing methods (such as Empirical Mode Decomposition (EMD), Ensemble Empirical Mode Decomposition (EEMD), and Variational Mode Decomposition (VMD)) with artificial intelligence have also achieved good results.
[0004] However, the direct use of artificial intelligence models or signal-processed artificial intelligence models for correction in related technologies ignores the physical characteristics of wind speed, resulting in insufficient physical consistency and reliability of forecast results, weak model robustness, and consequently affecting its reliability and credibility. Summary of the Invention
[0005] In view of this, this disclosure proposes a method and model for medium- and short-term wind speed correction based on regional weather forecasting models.
[0006] According to one aspect of this disclosure, a method for correcting short- to medium-term wind speeds based on a regional weather forecast model is provided, the method comprising:
[0007] Acquire meteorological variable data, which is generated by a preset regional weather forecast model. The meteorological variable data is used to indicate the temporal changes of multiple wind speed-related meteorological variables in the target area over a future period of time.
[0008] Information embedding is performed on the meteorological variable data to generate a target embedding tensor;
[0009] A pyramidal local hierarchical attention capture mechanism is used to encode the target embedding tensor to obtain a prediction feature tensor. The pyramidal local hierarchical attention capture mechanism is used to instruct the attention calculation of each time node in the target embedding tensor to be constrained to a finite number of time nodes associated with that time node.
[0010] The predicted feature tensor is transformed to obtain the corrected wind speed forecast data.
[0011] In one possible implementation, the step of embedding information from the meteorological variable data to generate a target embedding tensor includes:
[0012] Convert the location index of each time point in the meteorological variable data into a location encoding vector;
[0013] Convert the time marker of each time node in the meteorological variable data into a time feature vector;
[0014] Meteorological variable data at different time resolutions are extracted from the meteorological variable data at the original time resolution, and the meteorological variable data at different time resolutions are concatenated to obtain a meteorological variable tensor.
[0015] The location encoding vector, the time feature vector, and the meteorological variable tensor are concatenated to obtain the target embedding tensor.
[0016] In another possible implementation, the extraction of meteorological variable data at different time resolutions from the original time resolution meteorological variable data includes:
[0017] Based on a preset timestamp, meteorological variable data at different time resolutions are extracted from the original time resolution meteorological variable data; or,
[0018] A convolutional neural network (CNN) is used to perform convolution operations on the original time-resolution meteorological variable data to extract meteorological variable data at different time resolutions.
[0019] In another possible implementation, the method employing a pyramidal local hierarchical attention capture mechanism to encode the target embedding tensor to obtain a prediction feature tensor includes:
[0020] Determine the hierarchical relationship set for each time node of the target embedding tensor, the relationship set including a set of a finite number of time nodes associated with the time node in multiple levels, the levels being divided according to different time scales;
[0021] Multi-head attention calculation is performed on the hierarchical relationship set of each time node to obtain the attention result;
[0022] The attention result is processed according to a preset method to obtain the predicted feature tensor.
[0023] In another possible implementation, the hierarchical relationship set is the union of the child relationship set, the sibling relationship set, and the parent relationship set. The child relationship set indicates one or more time nodes that are closest to the time node in the first level, the sibling relationship set indicates one or more time nodes that are closest to the time node in the second level, and the parent relationship set indicates the time node that is closest to the time node in the third level. The time scales corresponding to the first level, the second level, and the third level are respectively increasing.
[0024] In another possible implementation, the feature transformation of the predicted feature tensor to obtain the corrected wind speed forecast data includes:
[0025] Target features are extracted from the predicted feature tensor through a gathering layer;
[0026] The extracted target features are linearly transformed by a linear layer to obtain the corrected wind speed forecast data.
[0027] In another possible implementation, the method is performed based on a pre-trained wind speed correction model, and the method further includes:
[0028] Acquire training data, which includes multiple wind speed forecast values and corresponding multiple wind speed observation values;
[0029] Based on the multiple wind speed forecast values and the corresponding multiple wind speed observation values, a loss function is calculated. The loss function includes an activity difference term, which is used to indicate the difference in the degree of fluctuation between the multiple wind speed forecast values and the corresponding multiple wind speed observation values.
[0030] Based on the loss function, the model parameters are iteratively updated using a preset algorithm to train the wind speed correction model.
[0031] According to another aspect of this disclosure, a wind speed correction model is provided, the model comprising:
[0032] The input module is used to acquire meteorological variable data, which is generated by a preset regional weather forecast model. The meteorological variable data is used to indicate the temporal changes of multiple wind speed-related meteorological variables in the target area over a future period of time.
[0033] An embedding module is used to embed information from the meteorological variable data and generate a target embedding tensor.
[0034] The encoder module is used to encode the target embedding tensor to obtain a prediction feature tensor using a tower-style local hierarchical attention capture mechanism. The tower-style local hierarchical attention capture mechanism is used to instruct the attention calculation of each time node in the target embedding tensor to be constrained to a finite number of time nodes associated with the time node.
[0035] The post-processing module is used to perform feature transformation on the predicted feature tensor to obtain corrected wind speed forecast data.
[0036] In one possible implementation, the embedding module is further configured to:
[0037] Convert the location index of each time point in the meteorological variable data into a location encoding vector;
[0038] Convert the time marker of each time node in the meteorological variable data into a time feature vector;
[0039] Meteorological variable data at different time resolutions are extracted from the meteorological variable data at the original time resolution, and the meteorological variable data at different time resolutions are concatenated to obtain a meteorological variable tensor.
[0040] The location encoding vector, the time feature vector, and the meteorological variable tensor are concatenated to obtain the target embedding tensor.
[0041] In another possible implementation, the embedding module is further configured to:
[0042] Based on a preset timestamp, meteorological variable data at different time resolutions are extracted from the original time resolution meteorological variable data; or,
[0043] A convolutional neural network is used to perform convolution operations on the meteorological variable data at the original time resolution to extract meteorological variable data at different time resolutions.
[0044] In another possible implementation, the encoder module is further configured to:
[0045] Determine the hierarchical relationship set for each time node of the target embedding tensor, the relationship set including a set of a finite number of time nodes associated with the time node in multiple levels, the levels being divided according to different time scales;
[0046] Multi-head attention calculation is performed on the hierarchical relationship set of each time node to obtain the attention result;
[0047] The attention result is processed according to a preset method to obtain the predicted feature tensor.
[0048] In another possible implementation, the hierarchical relationship set is the union of the child relationship set, the sibling relationship set, and the parent relationship set. The child relationship set indicates one or more time nodes that are closest to the time node in the first level, the sibling relationship set indicates one or more time nodes that are closest to the time node in the second level, and the parent relationship set indicates the time node that is closest to the time node in the third level. The time scales corresponding to the first level, the second level, and the third level are respectively increasing.
[0049] In another possible implementation, the post-processing module is further configured to:
[0050] Target features are extracted from the predicted feature tensor through an aggregation layer;
[0051] The extracted target features are linearly transformed by a linear layer to obtain the corrected wind speed forecast data.
[0052] In another possible implementation, the loss function of the model includes an activity difference term, which indicates the difference in the degree of fluctuation between the plurality of wind speed forecasts and the corresponding plurality of wind speed observations.
[0053] According to another aspect of this disclosure, a computing device is provided, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the above-described method.
[0054] According to another aspect of this disclosure, a non-volatile computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the steps of the above-described method.
[0055] According to another aspect of this disclosure, a computer program product is provided, including a computer program or a non-volatile computer-readable storage medium carrying the computer program, wherein the computer program, when executed by a processor, implements the steps of the above-described method.
[0056] This disclosure provides a method for correcting short-to-medium-term wind speed based on a regional weather forecast model. It acquires meteorological variable data generated by a preset regional weather forecast model, which reflects the temporal changes of multiple wind-speed-related meteorological variables in the target area over a future period. Subsequently, information is embedded into the meteorological variable data to generate a target embedding tensor. The core of this method lies in using a tower-like local hierarchical attention capture mechanism to encode the target embedding tensor, obtaining a prediction feature tensor. This prediction feature tensor is then transformed to obtain corrected wind speed forecast data. This tower-like local hierarchical attention capture mechanism constrains attention calculation to a finite number of time nodes associated with specific time points. This means the model can more accurately focus on local time-series information that significantly impacts wind speed changes, avoiding the overloading of crucial information caused by treating all time points equally in traditional methods. For example, during periods of drastic wind speed changes, the model can concentrate on the changes in meteorological variables related to that period and its preceding and following periods, thus more accurately capturing wind speed trends. This design not only makes the model output more physically consistent but also significantly improves the reliability and robustness of the forecast results. Compared to traditional methods, the method provided in this disclosure avoids the limitations of directly using artificial intelligence models or relying solely on signal processing, and can more accurately express the physical laws of wind speed, providing a more efficient and reliable solution for short- and medium-term wind speed forecasting.
[0057] Other features and aspects of this disclosure will become clear from the following detailed description of exemplary embodiments with reference to the accompanying drawings. Attached Figure Description
[0058] The accompanying drawings, which are included in and form part of this specification, illustrate exemplary embodiments, features, and aspects of this disclosure together with the specification and serve to explain the principles of this disclosure.
[0059] Figure 1 A schematic diagram of the structure of a wind speed correction model provided in an exemplary embodiment of this disclosure is shown.
[0060] Figure 2 A flowchart of a short-to-medium-term wind speed correction method based on a regional weather forecast model, provided in an exemplary embodiment of this disclosure, is shown.
[0061] Figure 3 A flowchart of an information embedding method provided by an exemplary embodiment of this disclosure is shown.
[0062] Figure 4 A flowchart illustrating an exemplary embodiment of the encoding method provided in this disclosure is shown.
[0063] Figure 5 A flowchart of a feature conversion method provided by an exemplary embodiment of this disclosure is shown.
[0064] Figure 6 A schematic diagram illustrating the principle of a short-to-medium-term wind speed correction method based on a regional weather forecast model provided in an exemplary embodiment of this disclosure is shown.
[0065] Figure 7 This is a block diagram illustrating an apparatus according to an exemplary embodiment. Detailed Implementation
[0066] Various exemplary embodiments, features, and aspects of this disclosure will now be described in detail with reference to the accompanying drawings. The same reference numerals in the drawings denote elements that have the same or similar functions. Although various aspects of the embodiments are shown in the drawings, they are not necessarily drawn to scale unless specifically indicated otherwise.
[0067] As used herein, the terms “comprising,” “including,” “having,” or variations thereof are open-ended and include one or more of the stated features, integrals, elements, steps, components, or functions, but do not exclude the presence or addition of one or more other features, integrals, elements, steps, components, functions, or groups thereof.
[0068] When an element is referred to as “connected,” “coupled,” “responding,” or a variation thereof relative to another element, it may be directly connected, coupled, or responding to another element, or there may be an intermediate element present.
[0069] Although the terms first, second, third, etc., may be used herein to describe various elements / operations, these elements / operations should not be limited by these terms. These terms are only used to distinguish one element / operation from another. Therefore, without departing from the teachings of the inventive concept, a first element / operation in some embodiments may be referred to as a second element / operation in other embodiments.
[0070] The term “exemplary” as used herein means “serving as an example, embodiment, or illustration.” Any embodiment illustrated herein as “exemplary” is not necessarily to be construed as superior to or better than other embodiments.
[0071] Furthermore, to better illustrate this disclosure, numerous specific details are set forth in the following detailed description. Those skilled in the art will understand that this disclosure can be practiced without certain specific details. In some instances, methods, means, components, and circuits well known to those skilled in the art have not been described in detail in order to highlight the main points of this disclosure.
[0072] Short- to medium-term wind speed forecasts typically involve predicting wind speeds for the next 1 to 7 days (or even 1 to 10 days), and the results can be used to calculate wind power forecasts. At this timescale, relying solely on data-driven artificial intelligence (AI) models is insufficient for effective wind speed forecasting because the volatility and intermittency of wind speeds are significantly influenced by meteorological conditions. Therefore, using raw forecast data from numerical weather prediction models, combined with statistical methods or AI techniques for error correction, is currently a key approach to improving the accuracy of wind speed forecasts.
[0073] However, current wind speed correction methods have significant shortcomings. On the one hand, many methods tend to directly use artificial intelligence models, or rely solely on artificial intelligence models for post-processing correction after signal processing. This approach ignores the physical characteristics of wind speed and lacks a deep understanding of its physical features, resulting in insufficient reliability and physical consistency of forecast results, and relatively weak model robustness.
[0074] On the other hand, the applicability of signal processing methods (such as empirical mode decomposition, ensemble empirical mode decomposition, and variational mode decomposition) is still unclear because their frequency decomposition heavily depends on sequence length. Therefore, a physically meaningful sequence decomposition model is needed to better capture and express the physical laws of wind speed, thereby enhancing the model's constraint on physical laws and improving the robustness and reliability of forecasts.
[0075] On the other hand, in AI model training, related technologies typically use general evaluation metrics such as Mean Squared Error (MSE) and Mean Absolute Error (MAE). While these metrics are widely used in model training, in specific applications, such as wind power forecasting, they can lead to overly smooth model outputs that fail to effectively capture wind speed fluctuations. Currently, no research or industry application has proposed effective improvements or solutions to this problem.
[0076] To address the aforementioned issues, this disclosure provides an innovative short-to-medium-term wind speed correction method. This method acquires various wind-related meteorological variable data generated by a pre-defined regional weather forecast model to comprehensively understand the changes in meteorological elements in the target area over a future period. This data covers multi-dimensional information such as wind speed, wind direction, temperature, humidity, and air pressure, providing rich foundational data for wind speed correction. The core innovation lies in employing a tower-style local hierarchical attention capture mechanism to encode the target embedding tensor. This mechanism determines the hierarchical relationship set for each time node, constraining attention calculations to a finite number of time nodes associated with that time node. This design better captures the physical characteristics of wind speed at different time scales, making the model output more physically consistent. Compared to traditional methods, this method can more accurately express the physical laws of wind speed, significantly improving the reliability and robustness of forecast results.
[0077] In the data preprocessing stage, embodiments of this disclosure use convolutional neural networks to perform convolution operations on the original meteorological variable data at different time resolutions to extract meteorological variable data at different time resolutions. Furthermore, location encoding, temporal features, and meteorological variable tensors are concatenated to generate a target embedding tensor. Convolutional neural networks can automatically extract the spatial features of the data, avoiding signal processing problems caused by sequence length in traditional methods. Simultaneously, the multi-dimensional information embedding enhances the model's understanding of the input data, further improving the accuracy of wind speed forecasts.
[0078] During the model training phase, this embodiment designs a loss function that includes an activity difference term. This function measures the difference in the degree of fluctuation between the forecast and the actual wind speed values. This loss function effectively avoids the problem of overly smooth output results caused by traditional loss functions (such as MSE and MAE), allowing the model to better capture the fluctuations in wind speed and thus improve the accuracy of wind power prediction.
[0079] In summary, the embodiments of this disclosure provide an efficient and reliable short-to-medium-term wind speed correction method through innovative attention mechanisms, multi-dimensional information embedding, and targeted loss function design. This significantly improves the accuracy and reliability of wind speed forecasting and provides strong technical support for wind power prediction and the stable operation of new power systems.
[0080] This disclosure provides a wind speed correction model that can be used to execute the short-to-medium-term wind speed correction method based on regional weather forecast models provided in this disclosure. This model employs an encoder-decoder architecture, with a focus on the encoder construction. The reason for defining the encoder as the main architecture of the model and omitting the decoder is that the wind speed correction task is essentially a typical regression mapping problem, rather than a generative prediction problem, thus eliminating the need for a decoder structure.
[0081] Please refer to Figure 1 The diagram illustrates the structure of a wind speed correction model provided in an exemplary embodiment of this disclosure. The wind speed correction model includes: an input module 11, an embedding module 12, an encoder module 13, and a post-processing module 14.
[0082] Input module 11 is used to acquire meteorological variable data, which is generated by a preset regional weather forecast model and is used to indicate the temporal changes of multiple wind speed-related meteorological variables in the target area over a period of time.
[0083] Embedding module 12 is used to perform information embedding operations on meteorological variable data, thereby generating a target embedding tensor.
[0084] Embedding module 12, also known as the data embedding module, is essentially an embedding layer. Through embedding operations, the model can map complex meteorological variable data into a low-dimensional embedding space, thereby providing more easily processed feature representations for subsequent encoding processes.
[0085] The encoder module 13, or encoder, is the core component of this model. It employs an innovative pyramid-style local hierarchical attention capture mechanism to encode the target embedding tensor, thereby obtaining the predicted feature tensor. The pyramid-style local hierarchical attention capture mechanism restricts the attention computation for each time node in the target embedding tensor to a finite number of time nodes associated with that time node. This mechanism effectively captures key information in the local time series while avoiding the computational complexity issues that may arise from global attention mechanisms.
[0086] The post-processing module 14 is used to perform feature transformation on the predicted feature tensor to obtain the corrected wind speed forecast data.
[0087] The following describes the short-to-medium-term wind speed correction method based on regional weather forecast models provided in this disclosure using several exemplary embodiments.
[0088] Please refer to Figure 2The diagram illustrates a flowchart of a short-to-medium-term wind speed correction method based on a regional weather forecast model, provided by an exemplary embodiment of this disclosure. The method includes the following steps.
[0089] Step 201: Obtain meteorological variable data. The meteorological variable data is generated by a preset regional weather forecast model. The meteorological variable data is used to indicate the temporal changes of multiple wind speed-related meteorological variables in the target area over a future period of time.
[0090] In some embodiments, the computing device can extract meteorological variable data related to wind speed from a preset regional weather forecast model. This is typically done by calling the application programming interface (API) of the regional weather forecast model to read the data.
[0091] Meteorological variable data originate from regional weather forecasting models, which are forecasting systems built upon extensive meteorological data, physical models, and statistical analysis. Their working principle involves collecting observational data on numerous meteorological elements, including temperature, air pressure, and humidity, and then simulating and predicting atmospheric conditions using complex meteorological physical equations (such as atmospheric motion equations and thermodynamic equations) and statistical relationships, thereby generating meteorological variable data. For example, a regional weather forecasting model is the Weather Research and Forecasting Model (WRF). This model simulates the weather conditions of a target region by inputting initial conditions (such as atmospheric pressure, temperature, humidity, wind speed, and direction) and boundary conditions (usually obtained from global models such as the Global Forecast System (GFS) or the European Centre for Medium-Range Weather Forecasts (ECMWF)).
[0092] Meteorological variable data includes a dataset describing the temporal changes of multiple wind-speed-related meteorological variables in a target area over a future period. In some embodiments, the meteorological variable data includes the following: 1. Meteorological variables: also known as regional weather forecast model variables, these variables are the outputs of regional weather forecast models and are used to describe the weather conditions of the target area. Wind-speed-related variables may include wind speed, wind direction, temperature, humidity, air pressure, etc. These variables usually exist in the form of time series, with corresponding variable values at each time point. They can be scalars (such as air temperature and air pressure) or vectors (such as wind speed and wind direction). 2. Time index: Each meteorological variable at any given time corresponds to a time index, used to identify the temporal order of the meteorological variables. The time index can be a specific date and time, or a relative time (such as the forecast time). For example, the time index is a timestamp, and the format can be "year-month-day hour:minute:second", such as "2025-03-09 14:00:00". These meteorological variables are usually collected or calculated simultaneously, so their time indices are the same. For example, at a specific point in time, meteorological variables such as wind speed, wind direction, temperature, humidity, and air pressure all have corresponding values.
[0093] Meteorological variable data can have the following characteristics: 1. Time series: Meteorological variable data is arranged in chronological order, reflecting the changing trend of meteorological variables over a future period. 2. Multivariability: In addition to wind speed, it can also include other meteorological variables, such as air pressure, temperature, and humidity, which may have interrelationships. 3. Spatiality: The data is generated for a specific target area and has a clearly defined spatial range.
[0094] In some embodiments, meteorological variable data can be presented in two main formats: spatial distribution maps and time series plots. These formats reveal the distribution and trends of meteorological variables in spatial and temporal dimensions, respectively. Spatial distribution maps can be in the form of raster or vector maps, used to visually represent the distribution of meteorological variables in geographic space. These maps are typically based on a geographic coordinate system, using longitude and latitude to ensure the accuracy of the data's geographical location. Through color coding or vector arrows, spatial distribution maps can clearly represent the intensity and direction of various meteorological variables, such as wind speed and direction. The shade of color or the density of arrows may correspond to the strength of wind speed, while the direction of the arrows visually indicates the direction of wind flow. Time series plots are a data format that shows the changes of meteorological variables over time. In this type of plot, the horizontal axis (X-axis) represents time, and its unit can be hours, days, months, etc., depending on the needs of the study and the resolution of the data. The vertical axis (Y-axis) represents the specific values of meteorological variables, such as key meteorological parameters like temperature, wind speed, and air pressure. Time series plots, in the form of curves or line graphs, depict the evolution of these meteorological variables over time, allowing observers to easily identify increases or decreases, periodic fluctuations, or other time-related characteristics of the variables. This disclosure does not limit the scope of the embodiments described.
[0095] Step 202: Embed information into the meteorological variable data to generate the target embedding tensor.
[0096] The target embedding tensor is a tensor generated by embedding information into meteorological variable data. Information embedding maps the original data into a low-dimensional vector space, allowing the embedded tensor to retain the important information and features of the original data, facilitating subsequent processing and analysis.
[0097] In some embodiments, the computing device can integrate time information, location information, and physical feature information from meteorological variable data into a high-dimensional tensor, namely the target embedding tensor, for subsequent model processing and feature extraction.
[0098] It should be noted that the information embedding method can be referred to the relevant description in the following embodiments, and will not be introduced here.
[0099] Step 203: The target embedding tensor is encoded using a pyramidal local hierarchical attention mechanism to obtain the prediction feature tensor. The pyramidal local hierarchical attention mechanism is used to instruct the attention calculation of each time node in the target embedding tensor to be constrained to a finite number of time nodes associated with the time node.
[0100] The tower-style local hierarchical attention mechanism is an improved attention mechanism for encoding target embedding tensors. This mechanism, through a hierarchical approach, constrains the attention computation of each time point to a finite number of time points associated with that time point, thereby better capturing the physical characteristics of wind speed at different time scales. This mechanism can more effectively capture local information and avoids the high computational complexity and overly dispersed attention distribution that may occur in global attention mechanisms.
[0101] A time node refers to a time step in the target embedding tensor, representing the characteristic representation of meteorological variables at a specific point in time. The target embedding tensor is a multidimensional array where each row (or column, depending on the shape of the tensor) typically corresponds to a time step and contains the characteristics of all relevant meteorological variables at that time step.
[0102] For each time point, the finite number of associated time points are at least one adjacent time point at different time scales. That is, the associated nodes for each time point include not only adjacent nodes at the same time scale, but also adjacent nodes at finer or coarser time scales. This multi-level definition of association allows the model to simultaneously capture short-term dynamics and long-term trends. Time scale refers to the granularity or resolution of time data. For example, a fine time scale might correspond to minute-level or hour-level data, used to capture short-term dynamic changes. The same time scale might correspond to daily-level data, used to capture medium-term trends. A coarse time scale might correspond to weekly or monthly-level data, used to capture long-term trends.
[0103] The predictive feature tensor is a feature representation obtained by encoding the target embedding tensor through a pyramidal local hierarchical attention mechanism. It is a multidimensional tensor containing feature information from the encoded meteorological variable data, used for subsequent wind speed forecasting.
[0104] It should be noted that the encoding method using a tower-style local hierarchical attention capture mechanism can be referred to in the relevant description in the following embodiments, and will not be introduced here.
[0105] Step 204: Perform feature transformation on the predicted feature tensor to obtain the corrected wind speed forecast data.
[0106] In some embodiments, the computing device may further process the predicted feature tensor by performing feature transformation to convert it into corrected wind speed forecast data. Feature transformation may include some linear or nonlinear transformation operations.
[0107] The corrected wind speed forecast data is the final wind speed forecast obtained by performing feature transformation on the predicted feature tensor. It indicates the wind speed changes in the target area over a future period. The corrected wind speed forecast data includes multiple wind speed values for the target area over a future period, adjusted by the model. In other words, the final output is the wind speed forecast data after model processing and correction. This data is more accurate than the wind speed data generated by the original weather forecast model because the model utilizes the complex relationships between meteorological variables and attention mechanisms to improve the forecast results.
[0108] After the above series of processing steps, the corrected wind speed forecast data can be further applied to meteorological services, aviation and maritime safety assurance, wind power generation, and other fields. Meteorological service departments can issue more accurate weather warnings based on the accurate wind speed forecasts, the aviation and maritime sectors can rationally plan routes and schedule flights based on wind speed forecasts, and wind power generation companies can optimize power generation plans and improve power generation efficiency based on wind speed forecasts.
[0109] The following is a further explanation of the three key steps in the above process: information embedding, encoding, and feature transformation.
[0110] I. Information Embedding.
[0111] In the information embedding stage, the goal is to transform meteorological variable data into a comprehensive target embedding tensor. In some embodiments, the information embedding method, i.e., step 202 above, can be replaced by the following steps, such as... Figure 3 As shown:
[0112] Step 301: Convert the location index of each time node in the meteorological variable data into a location encoding vector.
[0113] Meteorological variable data are time series data. Each time point has an index value, or location index, which indicates the position of the time point in the series. For example, in a series containing 96 time points, the location index of the first time point is 0, the location index of the second time point is 1, and so on, with the location index of the last time point being 95.
[0114] Location encoding is a method that converts location indices into high-dimensional vectors, aiming to help models better understand the positional information of each time point in a time series. A location-encoded vector is a vector used to represent location information, providing the model with the relative and absolute positional information of each time point, thereby enhancing the model's understanding of the time series structure.
[0115] Position encoding uses trigonometric functions (usually sine and cosine functions) to convert position indices into high-dimensional vectors. This encoding method can capture the periodicity and relativity of position information.
[0116] Therefore, when processing meteorological variable data, the location index of each time point (e.g., which time point in the series) can be converted into a location encoding vector using trigonometric functions (e.g., a sine function). This encoding method not only provides the model with the location information of each time point in the time series, but also helps the model capture the periodicity and relative location information of the time series, thereby significantly improving the model's ability to understand the structure of the time series.
[0117] Step 302: Convert the time stamp of each time node in the meteorological variable data into a time feature vector.
[0118] When processing meteorological variable data, each time point is accompanied by a timestamp, which is a specific point in time, such as "March 26, 2025, 14:30".
[0119] A time feature vector is a numerical vector containing multiple time features. It provides richer temporal information to the model by mapping different time attributes (such as hours, days of the week, dates, seasons, etc.) in time stamps to different dimensions. This vector transformation helps the model capture periodic patterns and relationships between time attributes in time series.
[0120] The process of generating time feature vectors is as follows:
[0121] 1. Extract time attributes: Extract different time attributes from the time stamp of each time node, such as the hour of the day, the day of the week, the day of the month, the day of the year, etc.
[0122] 2. Vector Transformation: Map these time attributes to different dimensions to form a high-dimensional vector. For example, the hour of each day can be mapped to the first dimension, the day of the week to the second dimension, the day of the month to the third dimension, and the day of the year to the fourth dimension.
[0123] This vector transformation yields a time feature vector containing four dimensions of time information: the hour of the day, the day of the week, the day of the month, and the day of the year. This embedding of time feature vectors significantly enhances the model's ability to understand the structure of time series data, helping it better capture periodic and trend patterns within the time series.
[0124] Therefore, the purpose of time feature extraction is to convert the time attributes (such as hours, dates, seasons, etc.) in time stamps into time feature vectors, providing the model with richer temporal information. This vector transformation helps the model better understand the periodic patterns and relationships between time attributes in the time series, thereby improving the model's predictive performance.
[0125] Step 303: Extract meteorological variable data at different time resolutions from the original meteorological variable data at different time resolutions, and concatenate the meteorological variable data at different time resolutions to obtain the meteorological variable tensor.
[0126] Temporal resolution refers to the time interval between two adjacent data points in time series data. It reflects the density of the data in the time dimension. The higher the temporal resolution, the shorter the interval between data points, and the more detailed the temporal changes that can be captured. For example, in meteorological data, a time resolution of 15 minutes means that data is recorded every 15 minutes. In meteorological data analysis, multi-time resolution data extraction refers to extracting data at different time resolutions from the original time resolution data. For example, extracting 1-hour and 4-hour resolution data from 15-minute resolution data. These data at different resolutions can provide feature information at different time scales, helping models to better capture long-term trends and short-term changes in time series data.
[0127] The data extraction methods may include, but are not limited to, the following two methods:
[0128] One approach is to extract data directly by timestamp: based on preset timestamps, data is extracted from the original time-resolution meteorological variable data at fixed time intervals, thus extracting data at different time resolutions. For example, when extracting 1-hour resolution data, data from every 4 time points is directly selected; when extracting 4-hour resolution data, data from every 16 time points is directly selected.
[0129] Another approach is to use a convolutional neural network:
[0130] 1. Define the convolution kernel: Design a convolution kernel for the corresponding time interval based on the target time resolution. The size of the convolution kernel determines the time range covered by each convolution operation in the original time series. For example, if the goal is to extract data at a 1-hour resolution, the size of the convolution kernel can be set to 4 (corresponding to 60 minutes / 15 minutes).
[0131] 2. Perform convolution operations: Use a one-dimensional convolutional neural network to perform convolution operations on the original time series data. The convolution operation slides the convolution kernel across the original time series, calculating feature values within each time window. These feature values can capture local patterns and trends within the time window.
[0132] 3. Extracting Representative Features: The result of convolution operations is representative features for each time point. These features not only contain information from the original data but also extract local features within the time window through convolution operations, thereby enhancing the data's expressive power. For example, suppose the original data is at a 15-minute resolution, with a time series length of 96 time points (24 hours). To extract data at a 1-hour resolution, a convolution operation using a kernel of size 4 is performed, ultimately yielding representative features for 24 time points.
[0133] Automatic segmentation and fusion techniques based on sparse matrices can be used in convolutional neural networks (CNNs) primarily to improve computational efficiency and optimize storage when processing sparse data, while simultaneously extracting meteorological variable data at different time resolutions. In CNNs, input data processed through convolutional layers may generate sparsity-enhanced feature maps. Utilizing the storage format of sparse matrices, only non-zero elements and their location information can be stored, significantly reducing memory usage. Furthermore, through automatic segmentation of the sparse matrix, the feature map can be divided into multiple sub-blocks, each containing only non-zero elements and their neighborhood information. Then, these sub-blocks are recombine through a fusion operation to form a new feature map. This method effectively reduces computational cost while preserving key features.
[0134] By leveraging the automatic segmentation and fusion technique of sparse matrices, convolutional neural networks can efficiently process meteorological variable data at different time resolutions. For example, small-sized convolutional kernels can be used to convolve the original time-resolution data to extract local features. Subsequently, through sparse matrix segmentation and fusion operations, these local features are combined into feature maps at different time resolutions. This process not only fully utilizes the storage advantages of sparse matrices but also achieves efficient feature recombination through segmentation and fusion operations, providing strong technical support for multi-timescale analysis of meteorological variables.
[0135] One-dimensional convolutional neural networks are used to perform convolution operations on the original time-resolution meteorological variable data. Representative features at each time point are extracted through the convolution kernel to extract meteorological variable data at different time resolutions. This method can more flexibly capture local features in time series data, rather than simply sampling.
[0136] To illustrate, assume the original meteorological variable data is recorded at a 15-minute resolution, meaning data is recorded every 15 minutes. For a 24-hour time series, this data would have 96 time points (24 hours × 4 time points / hour = 96 time points). From the original 15-minute resolution data, data is extracted every 4 time points to obtain 1-hour resolution data. This reduces the 24-hour time series length from 96 time points to 24 time points (24 hours × 1 time point / hour = 24 time points). Similarly, from the original 15-minute resolution data, data is extracted every 16 time points to obtain 4-hour resolution data. This reduces the 24-hour time series length from 96 time points to 6 time points (24 hours ÷ 4 hours / time point = 6 time points). Finally, these three resolutions of data are concatenated to form a new three-dimensional tensor. The shape of the spliced meteorological variable tensor is: [time series length, time resolution dimension, feature dimension], for example, [96, 3, feature dimension], where 96 represents the original time series length, 3 represents the three time resolutions, and the feature dimension represents the number of features at each time point.
[0137] Therefore, data at different time resolutions can be extracted from the original meteorological variable data at different time resolutions. This can be achieved by directly extracting instantaneous data based on timestamps or by using a one-dimensional convolutional neural network to extract representative features. Finally, the data at different time resolutions are concatenated along a new data dimension to form a multi-scale spatiotemporal information tensor, namely the meteorological variable tensor. The meteorological variable tensor is a multi-dimensional array used to represent meteorological-related data. This fusion of multi-scale information can provide the model with richer temporal features, enhancing the model's ability to understand the structure of time series data.
[0138] It should be noted that steps 301, 302, and 303 described above can be executed in parallel or sequentially in a certain order. This disclosure does not limit the specific execution order of these steps.
[0139] Step 304: Concatenate the location encoding vector, time feature vector, and meteorological variable tensor to obtain the target embedding tensor.
[0140] By combining location information (location encoding vector), time information (time feature vector), and physical feature information (meteorological variable tensor), a tensor containing multiple features (target embedding tensor) is formed. The target embedding tensor can comprehensively reflect the multi-dimensional features of each time point, providing extremely rich input data for subsequent encoding and feature transformation steps, thus laying a solid foundation for the model's efficient learning and accurate prediction.
[0141] II. Encoding.
[0142] The core of the encoding stage is to employ a pyramidal local hierarchical attention capture mechanism to encode the target embedding tensor, thereby obtaining the predicted feature tensor. The pyramidal local hierarchical attention capture mechanism aims to focus attention only on a limited number of nodes related to each node, thus avoiding the interference and computational burden that global attention might bring. In some embodiments, the encoding method, i.e., step 203 above, can be replaced by the following steps, such as... Figure 4 As shown:
[0143] Step 401: Determine the hierarchical relationship set for each time node of the target embedding tensor. The relationship set includes a set of a finite number of time nodes associated with time nodes in multiple levels, and the levels are divided according to different time scales.
[0144] For each time point of the target embedding tensor, a finite number of time points associated with it across multiple levels are determined. These levels are divided according to different time scales, and there are interaction relationships between time points and their associated time points within each level. Different levels correspond to different time scales; for example, the first level corresponds to "1 hour," the second level to "1 day," and the third level to "1 week." "Within a certain level" means within the target time period before and after the current point. The target time period is defined by the level, such as 1 hour, 1 day, or 1 week. Interaction relationships refer to the interactions, influences, or connections between different time points. In time series analysis, this relationship can manifest as dependency, correlation, or causal relationships between time points.
[0145] The finite number of time nodes associated with this node are selected based on the time scale and predefined hierarchical relationships. This limits attention computation to a local scope, reducing computational burden and avoiding global noise interference. Furthermore, for the current time node, the process of determining the set of hierarchical relationships corresponding to that time node is as follows: First, determine one or more time nodes associated with each level, thus determining the subset of relationships for each level. The subset of relationships for each level indicates one or more time nodes associated with the current time node within that level. Then, the subsets of relationships from multiple levels are merged to obtain the set of hierarchical relationships for the time node.
[0146] Optionally, the hierarchical relationship set of time nodes includes the union of multiple hierarchical relationship subsets, which can include the following types:
[0147] (1) Child relation set, used to indicate one or more (e.g., two) time nodes (if any) that are closest to the current time node in the first level. For example, if the current time node is at the day level, the child relation set may include the time nodes of the previous hour and the next hour.
[0148] (2) Sibling set, used to indicate one or more (e.g., two) time nodes that are closest to the current time node in the second level. For example, if the current time node is at the day level, the sibling set may include the time nodes of the previous day and the next day.
[0149] (3) Parent relationship set, used to indicate the time node that is closest to the current time node in the third level (if it exists). For example, if the current time node is at the daily level, the parent relationship set may include the time nodes of the previous week and the next week.
[0150] In this system, the distance between time nodes is called the time difference. Within the hierarchical relationship set of time nodes, different hierarchical subsets represent the nearest time nodes within different time ranges. The time scales corresponding to the first, second, and third levels are progressively larger. The first-level time scale is defined as a fine time scale, focusing on capturing subtle changes and dynamics in the short term within the time series. The second-level time scale is a uniform time scale, emphasizing the analysis of interactions and relationships within the same time period as the current time node. The third-level time scale is a coarse time scale, used to identify and understand long-term trends and background changes in the time series. This hierarchical division of time scales allows for more precise analysis and processing of data characteristics across different time ranges.
[0151] Schematic representation of local information at each time point (The l-th time node in the s-th level, where s = 1, ..., S represents the hierarchical progression from the finest to the coarsest level) is divided into three levels based on time granularity: a set of child relationships. Set of sibling relationships set of parent relationships The local information of a time node refers to the set of hierarchical relationships associated with that time node, and the set of child relationships. At the corresponding sub-level (i.e., a finer time scale), focus on the two time nodes that are closest to the current time node within that time scale; sibling relationship set. For the same time scale as the current time node, focus on the two time nodes that are closest to the current time node within that time scale; while the parent relationship set Corresponding to the parent level (i.e., a coarser time scale), the focus is on the time point closest to the current time point within that time scale, thereby capturing long-term trends or overall background changes. This includes a set of hierarchical relationships. It can be represented as:
[0152]
[0153] in, This represents the set of all time nodes associated with time node l in the s-th level. Let represent the set of adjacent time nodes in the s-th level that are at the same level as time node l. This represents the set of adjacent time nodes in the s-th level that are at a sub-level (i.e., a finer time scale) of time node l. This represents the set of adjacent time nodes at the parent level (i.e., a coarser time scale) of time node l in the s-th level. This represents the j-th time node in the s-th level. A represents the number of neighboring time nodes that each time node in the sibling relationship set can follow, typically taken as 3. L represents the length of the historical sequence, i.e., the total number of time nodes. M represents the branching factor of the multi-way tree, determining the number of fine-level nodes contained in a coarse-level node. S represents the total number of levels. s-1 This represents the product of branch factors from the finest level to the s-th level, used to calculate the time node index range of the s-th level. This represents an empty set; when the condition is not met, the corresponding relation set is empty.
[0154] Step 402: Perform multi-head attention calculation on the hierarchical relationship set at each time node to obtain the attention result.
[0155] Multi-head attention is performed on the hierarchical relationship set of each time node in the target embedding tensor to obtain the attention result for each time node. The multi-head attention mechanism divides the input query, key, and value into multiple heads, calculates the attention result for each head separately, and then concatenates and projects these results onto a common dimension. This multi-head attention mechanism can capture the interaction relationships between time nodes from multiple perspectives, enhancing the model's ability to understand complex temporal patterns.
[0156] In this embodiment, to reduce computational complexity and improve the model's ability to capture local features, an innovative local attention mechanism is introduced. Through this mechanism, the hierarchical relationship set at each time point, after parallel processing by the multi-head attention mechanism, can effectively extract and integrate the complex multidimensional temporal interaction features between different levels.
[0157] Specifically, this local attention mechanism calculates the similarity between the query vector and the key vector only within a predefined adjacency set, thus avoiding full computation of the entire sequence. This method not only reduces computational cost but also enhances the model's ability to extract local features. For each target location, the system selects multiple candidate locations from its adjacency set and calculates the corresponding attention weights. The target location is also called the target node, such as time node i. Candidate locations are also called candidate nodes, such as time node l. The diagram illustrates the hierarchical relationship set for each time node. The formula for calculating multi-head attention is as follows:
[0158]
[0159] in, This is the attention retrieval vector corresponding to the target node. This represents the feature index vector of the candidate node, used to calculate the attention matching degree with the query vector. The actual information corresponding to the key vector position is used as the weighted content of the attention output. Attention computation is performed only within a finite set of adjacencies. The process is performed on top of each other, meaning that the target node i is only related to the relevant nodes in the set. Similarity is calculated for each key, and weighted aggregation is performed based on its value. K `q` is a constant representing the dimension of the key vector, used to scale the dot product result and prevent excessively large values from causing gradient vanishing. `exp` is an exponential function used to calculate the attention weights. i It is the query vector for time node i. v is the transpose of the key vector at time node l. l This is the value vector for time node l.
[0160] This design allows the model to focus more on the local contextual information of the target location, thereby significantly improving the efficiency and representational power of information aggregation. In this way, the model can more accurately capture subtle features in time series data while maintaining computational efficiency, providing a more effective method for time series analysis.
[0161] Step 403: Perform pre-processing on the attention results to obtain the predicted feature tensor.
[0162] The attention results at each time point are pre-processed to obtain the final output for each time point. Combining the final outputs of all time points yields the complete predictive feature tensor. The predictive feature tensor is the output of the encoding stage; it integrates the feature information from each time point in the target embedding tensor and, through the constraints of the pyramidal local hierarchical attention mechanism, enables the model to more effectively capture local and global temporal features.
[0163] Pre-processing is a standardized and modular operational procedure whose core purpose is to perform deep feature extraction and stabilization on the attention results at all time points, thereby significantly enhancing the overall performance and stability of the model. The pre-processing procedure may include, but is not limited to, the following steps: 1. Residual connection and normalization through residual and normalization layers: The attention results calculated by multi-head attention are residually connected to the input. Here, "input" refers to the input to the multi-head attention module, i.e., the data before entering the multi-head attention module. The purpose of residual connection is to directly add the input to the output of the attention module to maintain the integrity of the input information and avoid information loss or gradient vanishing in deep networks. Layer normalization is then performed on the results after residual connection. Layer normalization is a normalization technique that normalizes all features of each sample, ensuring that each sample's features have a distribution with a mean of 0 and a standard deviation of 1. This helps stabilize the training process and accelerate convergence. 2. Nonlinear transformation through a feedforward neural network: The normalized results are passed to a feedforward neural network for nonlinear transformation. Feedforward neural networks typically consist of two linear layers and a non-linear activation function (such as ReLU). This non-linear transformation can further extract features and increase the model's expressive power. 3. Residual connection and normalization through residual and normalization layers: The output of the feedforward neural network is again residually connected to the normalized attention output, and then the final output is subjected to layer normalization. This step further ensures the integrity of the information and stabilizes the training process. After the above processing, the final output at each time point is a part of the predicted feature tensor. Combining the final outputs of all time points yields the complete predicted feature tensor. The predicted feature tensor integrates local and global information from the attention results of all time points and is the final output of the encoding stage, used for subsequent feature transformation.
[0164] III. Feature Transformation.
[0165] The goal of the feature transformation stage is to extract target features from the predicted feature tensor and transform them into corrected wind speed forecast data. In some embodiments, the feature transformation method, i.e., step 204 above, can be replaced by the following steps, such as... Figure 5 As shown:
[0166] Step 501: Extract target features from the predicted feature tensor through a clustering layer.
[0167] The aggregation layer can aggregate and filter features in the prediction feature tensor to extract features related to wind speed forecast.
[0168] Target features refer to one or more wind speed-related features extracted from the prediction feature tensor. After processing by the aggregation layer, these features can better reflect the patterns of wind speed changes, thus providing more valuable information for subsequent linear transformations and wind speed corrections.
[0169] Step 502: Perform a linear transformation on the extracted target features through a linear layer to obtain the corrected wind speed forecast data.
[0170] Linear transformation can map the extracted target features to the output space of wind speed forecast, thereby generating the final wind speed forecast result.
[0171] Linear transformations are typically used to perform a weighted summation of target features and add a bias term, thereby transforming and adjusting the target features. The output of a linear layer can be represented as y = Wx + b, where x is the target feature, and W and b are learnable parameters.
[0172] Through the three stages of information embedding, encoding, and feature transformation described above, this method can fully utilize the multi-dimensional information in meteorological variable data and combine the powerful modeling capabilities of the tower-style local hierarchical attention capture mechanism to generate high-precision corrected wind speed forecast data.
[0173] Please refer to Figure 6 This illustration shows a schematic diagram of a short-to-medium-term wind speed correction method based on a regional weather forecast model provided by an exemplary embodiment of the present disclosure. The method is executed based on a pre-trained wind speed correction model, which includes an input module 11, an embedding module 12, an encoder module 13, and a post-processing module 14.
[0174] 1. Input module 11 is used to acquire meteorological variable data output by the single-point WRF mode, which includes multiple meteorological variables and the time index of each moment. This information will be input into the embedding module 12.
[0175] 2. Embedding module 12 is used to embed information into meteorological variable data, involving the embedding of three types of information: (1) Location encoding: using trigonometric functions to convert the location index of each time node in the meteorological variable data into a location encoding vector. (2) Time feature annotation: converting the time mark of each time node in the meteorological variable data into a time feature vector. (3) Multi-time resolution data extraction: extracting meteorological variable data of different time resolutions from the original data (i.e., meteorological variable data of the original time resolution), and concatenating the meteorological variable data of different time resolutions to obtain a meteorological variable tensor.
[0176] 3. Encoder module 13 is the core of this model. It is used to encode the target embedding tensor using an innovative pyramidal local hierarchical attention capture mechanism to obtain the predicted feature tensor. The pyramidal local hierarchical attention capture mechanism aims to focus attention only on the information of a limited number of nodes around each node that are related to it, thereby avoiding the interference and computational burden that global attention may bring.
[0177] The encoder module 13 not only includes a tower-style local hierarchical capture and multi-head attention mechanism, but also integrates some structures of the classic Transformer model, such as residual and normalization layers, feedforward neural networks, and residual and normalization layers, further improving the performance and stability of the model.
[0178] 4. Post-processing module 14 is used to perform feature transformation on the predicted feature tensor to obtain the corrected wind speed forecast data. Post-processing module 14 includes aggregation layer and linear layer. Through the operations of these layers, the model can convert the predicted feature tensor generated by encoder module 13 into the final wind speed correction result. This process not only effectively transforms and adjusts the features, but also ensures the accuracy and reliability of the output results.
[0179] It should be noted that the various modules provided in this disclosure embodiment can be used to execute the methods described in the above method embodiments. Their specific implementation can be referred to the description of the above method embodiments. For the sake of brevity, they will not be repeated here.
[0180] In some embodiments, the computing device can acquire training data, which includes multiple wind speed forecast values and corresponding multiple wind speed observation values; calculate a loss function based on the multiple wind speed forecast values and corresponding multiple wind speed observation values; and iteratively update the model parameters using a preset algorithm based on the loss function to train a wind speed correction model.
[0181] Multiple wind speed forecast values are wind speed values predicted by an initial wind speed correction model. The corresponding multiple wind speed observation values are the actual observed wind speed values. They are usually measured using instruments (such as anemometers) at meteorological observation stations.
[0182] The loss function is a function used to measure the difference between the model's predicted values (wind speed forecasts) and the actual values (observed wind speeds). Its purpose is to quantify the accuracy of the model's predictions. The smaller the value of the loss function, the closer the model's predicted wind speed is to the actual observed wind speed, and the better the model's performance.
[0183] Preset algorithms typically refer to optimization algorithms, such as gradient descent. The purpose of optimization algorithms is to improve the model's prediction accuracy by adjusting the model's parameters to continuously reduce the value of the loss function. Taking gradient descent as an example, it calculates the gradient (partial derivative) of the loss function with respect to each model parameter and then updates the parameters in the opposite direction of the gradient. Through this process, the model parameters are continuously optimized, and the final trained model is the wind speed correction model. The purpose of this wind speed correction model is to predict wind speed more accurately. It can output corrected wind speed predictions based on inputs (such as time, weather conditions, etc.), and these predictions are closer to the actual observed wind speeds than the original wind speed forecasts.
[0184] However, traditional loss functions typically only use metrics such as MSE or Root Mean Square Error (RMSE) to measure the difference between the predicted value and the error value. The formula for calculating MSE is as follows:
[0185]
[0186] in, It is the i-th wind speed forecast value, y i is the i-th wind speed observation value, and n is the total number of samples, i.e., the number of wind speed observation values or wind speed forecast values. Both i and n are positive integers.
[0187] In practice, MSE imposes a heavy penalty on large deviations from observed values, thus inhibiting the model from making bold predictive adjustments. Therefore, although the output performs very well in terms of metrics such as RMSE and MSE, showing small error values, the details of the forecast sequence often show oversmoothing. To address the problem of overly smoothed forecast results in the artificial intelligence correction process of related technologies, the embodiments of this disclosure introduce an "activity" index and incorporate it into the loss function of the wind speed correction model, optimizing the shortcomings of the traditional loss function.
[0188] The novel loss function provided in this disclosure includes an activity difference term, which indicates the difference in the degree of fluctuation between multiple wind speed forecast values and their corresponding multiple wind speed observation values. The activity difference term can be determined based on the difference between observed activity and forecast activity, where observed activity indicates the degree of fluctuation of multiple wind speed observation values, and forecast activity indicates the degree of fluctuation of multiple wind speed forecast values. For example, observed activity can be the standard deviation of multiple wind speed observation values, forecast activity can be the standard deviation of multiple wind speed forecast values, and the activity difference term can be the square of the difference between observed activity and forecast activity. That is, forecast activity A... forcast The definition of is:
[0189]
[0190] Observational activity A obs The definition of is:
[0191]
[0192] in, It can be the average of n wind speed observations, or the average of historical observations. The average of historical observations refers to the average of multiple wind speed observations of the target area over a historical period (e.g., several years or decades). When the difference between observed activity and predicted activity is small, it indicates that the model is performing well.
[0193] Therefore, the novel loss function provided in this embodiment can be composed of MSE and an activity index, which can both reduce the difference between forecasts and actual values and make the activity level of the forecast results closer to that of the observations. That is, the loss function includes MSE and an activity difference term. MSE indicates the average of the squares of the differences between multiple wind speed forecast values and multiple wind speed observation values, and the activity difference term is the square of the difference between the observed activity and the forecast activity. Illustratively, the activity difference term is multiplied by a weighting factor and then added to MSE to obtain the final loss function.
[0194]
[0195] Where λ is a preset weighting factor used to balance the relative importance of MSE and activity difference in the final loss function, A obs1 It can be a preset value or historical observation activity. Historical observation activity refers to the result obtained by analyzing and calculating the fluctuation of wind speed observation values in the target area over a historical period (e.g., several years or decades).
[0196] In related technologies, the shortcomings of short- and medium-term wind speed correction methods and loss functions have been widely discussed. To overcome the defects of feature engineering relying on cumbersome signal processing (such as variational mode decomposition) in related technologies, this disclosure proposes a short- and medium-term wind speed forecast sequence correction model based on an encoder architecture. This model achieves efficient extraction of input data features through multi-timescale information embedding and attention-encoded mapping techniques with tower-like local hierarchical capture. Simultaneously, addressing the issue of overly smooth forecast results during artificial intelligence correction, this disclosure introduces an "activity" index and incorporates it into the loss function, optimizing the shortcomings of traditional loss functions. The short- and medium-term wind speed correction method based on a novel loss function proposed in this disclosure significantly improves the accuracy of short- and medium-term wind speed forecasts in the wind power generation field, establishes a more robust and reliable artificial intelligence model, and has broad application prospects.
[0197] Taking four operating wind farms in Gansu Province as examples, this disclosure proposes a wind speed correction method based on tower-type local hierarchical capture attention coding mapping technology, aiming to correct the wind speed forecast for the target wind farms for 1-3 days. The implementation steps of this method are as follows:
[0198] 1. Data preparation.
[0199] (1) Determine the correction scenario and forecast time: The wind speed correction scenario in this embodiment focuses on four operating wind farms in Yumen area of Gansu Province. The goal is to correct the wind speed of the 1-3 day regional numerical forecast model of these four wind farms.
[0200] (2) Data Acquisition: Acquire long-term observation data of the target area and corresponding mesoscale weather forecast data and their timestamp sequences. Long-term observation data includes three years of hub height and wind speed observation data for the target wind farms, as well as the total power generation data for each wind farm. Mesoscale weather forecast data includes regional forecast interpolation data for 0-72 hours per day corresponding to historical observation periods, obtained using the WRF model and the historical model back-calculation method, with a time granularity of 15 minutes. In this process, the back-calculated meteorological variables cover multiple relevant meteorological variables such as wind speed, wind direction, temperature, air pressure, geopotential height, absolute vorticity (avo), potential vorticity (pvo), and boundary layer meteorological variables at each layer, and retain the time record for each moment.
[0201] 2. Model building.
[0202] A wind speed correction model is constructed, comprising an input module, an embedding module, an encoder module, and a post-processing module. The specific modeling process is as follows:
[0203] (1) Model segmentation: For three different time intervals, 0-24 hours, 24-48 hours and 48-72 hours, corresponding models are established respectively.
[0204] (2) Input Module Processing: All meteorological variables are input into the embedding module. The time series length of the input data includes the first 96 time periods, including the target forecast time. Based on this, multi-time resolution extraction is performed. In this embodiment, instantaneous data is directly extracted using timestamps, and extraction is performed every 4 time periods to form three time resolution data: 15 minutes, 1 hour, and 4 hours. Subsequently, by extending a new data dimension, the two-dimensional data are stitched together to form a new three-dimensional tensor.
[0205] (3) Embedded module processing: The position of each group of variables is encoded using trigonometric functions to obtain a new vector. Simultaneously, for the timestamp, the hour of the day, day of the week, day of the month, and day of the year are calculated and retained, resulting in four columns of information vectors representing time characteristics. Finally, the three data streams are combined and input into the encoder module.
[0206] (4) Encoder module processing: First, the local relationships related to each time node are processed. For example, in the 1-hour resolution layer, the 3rd hour is represented as a time node. The hierarchical relationship set of this node includes the set of sibling relationships. Child relation set and the set of parent relationships constitute
[0207] The complete hierarchical relationship set of nodes. This process is repeated for each time node, calculating the hierarchical relationship set for all time nodes.
[0208] Tensors from all sets are input into an 8-head attention mechanism to solve for the attention problem. The resulting attention values are then input into a normalization layer and a feedforward neural network for further computation.
[0209] (5) Post-processing module processing: The output results of the encoder module are aggregated through the aggregation layer and then input into the linear layer for dimensionality reduction mapping, finally generating wind speed forecast data.
[0210] 3. Model training and model application.
[0211] (1) Data and model combination: Combine the data processed in step 1 with the wind speed correction model built in step 2.
[0212] (2) Loss Function Selection and Training: The new loss function proposed in this embodiment, which consists of MSE and activity index, is selected, and the model is trained according to the AI modeling process. The wind speed forecast data, wind speed observation data and power observation data at the target forecast time are input into the new loss function for solution. By updating the gradient and iteratively optimizing, the training of the wind speed correction model is completed.
[0213] (3) Model application: Based on the above method, the meteorological variable data generated by the regional weather forecast model is input into the trained wind speed correction model, and the corrected wind speed forecast data can be output.
[0214] In summary, this disclosure proposes an innovative short-to-medium-term wind speed correction method and a loss function optimization method to address the shortcomings of artificial intelligence (AI) forecasting. Based on regional numerical weather prediction models and wind speed observations from wind farm anemometers, this method constructs an AI correction model with a pyramid-shaped hierarchical attention mechanism that captures features across multiple time scales. Specific applications include short-to-medium-term wind speed correction for regional power grids or individual wind farms, and a novel loss function definition to address the smoothing problem of AI forecast data; both aim to significantly improve the accuracy of short-to-medium-term wind speed forecasts.
[0215] In the wind speed correction model provided in this disclosure, the embedding module performs multi-timescale information embedding and encoding mapping on the input meteorological variable data, simplifying the complex, cumbersome, and data-length-dependent frequency decomposition methods in traditional techniques, thereby efficiently extracting data features. The core technologies of the embedding module include fixed-time-interval extraction fusion and automatic segmentation fusion based on sparse matrices. These two information fusion methods can effectively integrate meteorological data at different time scales, laying the foundation for subsequent feature extraction. The encoder module introduces a tower-style local hierarchical attention capture mechanism based on a full attention mechanism improvement. Through hierarchical constraint attention calculation, it focuses on key features associated with the current time node, thereby more accurately capturing the physical laws of wind speed changes. Compared with directly using the wind speed output from regional numerical weather prediction models, the wind speed correction method provided in this disclosure significantly reduces the RMSE of the forecast wind speed; compared with current correction techniques, this disclosure further and continuously reduces the RMSE of the forecast wind speed, improves the accuracy of wind speed forecasts, and enhances the performance of wind speed forecast correction technology.
[0216] Regarding loss function optimization, this embodiment not only retains the traditional mean squared error method but also introduces a weighting index reflecting the activity level of the data. This activity index can quantify the intensity of wind speed fluctuations, preventing the model output from becoming too smooth, thereby significantly improving the accuracy and reliability of wind speed forecasts.
[0217] This disclosure also provides a computing device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the above-described method.
[0218] This disclosure also provides a non-volatile computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the above-described method.
[0219] This disclosure also provides a computer program product, including a computer program or a non-volatile computer-readable storage medium carrying the computer program, wherein the computer program, when executed by a processor, implements the steps of the above method.
[0220] Figure 7 This is a block diagram illustrating an apparatus 1900 according to an exemplary embodiment. For example, the apparatus 1900, used to perform the above-described method, can be provided as a server or terminal device. (Refer to...) Figure 7 The apparatus 1900 includes a processing component 1922, which further includes one or more processors, and memory resources represented by memory 1932 for storing instructions, such as application programs, that can be executed by the processing component 1922. The application programs stored in memory 1932 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component 1922 is configured to execute instructions to perform the methods described above.
[0221] Device 1900 may also include a power supply component 1926 configured to perform power management of device 1900, a wired or wireless network interface 1950 configured to connect device 1900 to a network, and an input / output interface 1958 (I / O interface). Device 1900 can operate on an operating system, such as Windows Server, stored in memory 1932. TM macOS X TM Unix TM Linux TM FreeBSD TM Or similar.
[0222] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 1932 including computer program instructions that can be executed by a processing component 1922 of the device 1900 to perform the above-described method.
[0223] Computer-readable storage media can be tangible devices capable of holding and storing programs / instructions used by instruction execution devices. Computer-readable storage media can be, for example—but not limited to—electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination of the foregoing. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.
[0224] The computer program (or computer-readable program instructions) described herein can be downloaded from a computer-readable storage medium to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage medium in the respective computing / processing device.
[0225] The computer program (or computer program instructions) used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuits, such as programmable logic circuits, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), are personalized by utilizing state information of computer-readable program instructions. These electronic circuits can execute computer-readable program instructions to implement various aspects of this disclosure.
[0226] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0227] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0228] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0229] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0230] The various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or technical improvements to the embodiments in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A method for correcting short- and medium-term wind speeds based on regional weather forecast models, characterized in that, The method includes: Acquire meteorological variable data, which is generated by a preset regional weather forecast model. The meteorological variable data is used to indicate the temporal changes of multiple wind speed-related meteorological variables in the target area over a future period of time. Information embedding is performed on the meteorological variable data to generate a target embedding tensor; A pyramidal local hierarchical attention capture mechanism is used to encode the target embedding tensor to obtain a prediction feature tensor. The pyramidal local hierarchical attention capture mechanism is used to instruct the attention calculation of each time node in the target embedding tensor to be constrained to a finite number of time nodes associated with that time node. The predicted feature tensor is transformed to obtain the corrected wind speed forecast data; The step of embedding information from the meteorological variable data to generate a target embedding tensor includes: Convert the location index of each time point in the meteorological variable data into a location encoding vector; Convert the time marker of each time node in the meteorological variable data into a time feature vector; Meteorological variable data at different time resolutions are extracted from the meteorological variable data at the original time resolution, and the meteorological variable data at different time resolutions are concatenated to obtain a meteorological variable tensor. The location encoding vector, the time feature vector, and the meteorological variable tensor are concatenated to obtain the target embedding tensor; The method employs a pyramid-style local hierarchical attention capture mechanism to encode the target embedding tensor to obtain a predicted feature tensor, including: Determine the hierarchical relationship set for each time node of the target embedding tensor, the relationship set including a set of a finite number of time nodes associated with the time node in multiple levels, the levels being divided according to different time scales; Multi-head attention calculation is performed on the hierarchical relationship set of each time node to obtain the attention result; The attention result is processed according to a preset method to obtain the predicted feature tensor.
2. The method according to claim 1, characterized in that, The extraction of meteorological variable data at different time resolutions from the original time resolution meteorological variable data includes: Based on a preset timestamp, meteorological variable data at different time resolutions are extracted from the original time resolution meteorological variable data; or, A convolutional neural network is used to perform convolution operations on the meteorological variable data at the original time resolution to extract meteorological variable data at different time resolutions.
3. The method according to claim 1, characterized in that, The hierarchical relationship set is the union of the child relationship set, the sibling relationship set, and the parent relationship set. The child relationship set indicates one or more time nodes that are closest to the time node in the first level. The sibling relationship set indicates one or more time nodes that are closest to the time node in the second level. The parent relationship set indicates the time node that is closest to the time node in the third level. The time scales corresponding to the first level, the second level, and the third level are respectively increasing.
4. The method according to claim 1, characterized in that, The step of performing feature transformation on the predicted feature tensor to obtain the corrected wind speed forecast data includes: Target features are extracted from the predicted feature tensor through an aggregation layer; The extracted target features are linearly transformed by a linear layer to obtain the corrected wind speed forecast data.
5. The method according to any one of claims 1 to 4, characterized in that, The method is based on a pre-trained wind speed correction model and further includes: Acquire training data, which includes multiple wind speed forecast values and corresponding multiple wind speed observation values; Based on the multiple wind speed forecast values and the corresponding multiple wind speed observation values, a loss function is calculated. The loss function includes an activity difference term, which is used to indicate the difference in the degree of fluctuation between the multiple wind speed forecast values and the corresponding multiple wind speed observation values. Based on the loss function, the model parameters are iteratively updated using a preset algorithm to train the wind speed correction model.
6. A wind speed correction model, characterized in that, The model includes: The input module is used to acquire meteorological variable data, which is generated by a preset regional weather forecast model. The meteorological variable data is used to indicate the temporal changes of multiple wind speed-related meteorological variables in the target area over a future period of time. An embedding module is used to embed information into the meteorological variable data and generate a target embedding tensor. Specifically, the embedding module is used to convert the position index of each time node in the meteorological variable data into a position encoding vector; convert the time marker of each time node in the meteorological variable data into a time feature vector; extract meteorological variable data at different time resolutions from the original time resolution meteorological variable data; concatenate the meteorological variable data at different time resolutions to obtain a meteorological variable tensor; and concatenate the position encoding vector, the time feature vector, and the meteorological variable tensor to obtain the target embedding tensor. The encoder module is used to encode the target embedding tensor to obtain a predicted feature tensor using a pyramidal local hierarchical attention capture mechanism. The pyramidal local hierarchical attention capture mechanism is used to instruct the attention calculation of each time node in the target embedding tensor to be constrained to a finite number of time nodes associated with that time node. Specifically, the encoder module is used to determine the hierarchical relationship set of each time node in the target embedding tensor. The relationship set includes a set of finite number of time nodes associated with the time node in multiple levels, and the levels are divided according to different time scales. Multi-head attention calculation is performed on the hierarchical relationship set of each time node to obtain an attention result. The attention result is then subjected to preset processing to obtain the predicted feature tensor. The post-processing module is used to perform feature transformation on the predicted feature tensor to obtain corrected wind speed forecast data.
7. A computing device, comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 5.
8. A non-volatile computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Mesoscale numerical weather forecast real-time correction method and device and storage medium
CN118536395A
Cloud air guide space-time error correction method and system based on deep learning
CN118839303A