A complex terrain area maximum wind speed prediction method based on Uformer and composite adaptive weighted loss function

CN123010141APending Publication Date: 2026-10-30广西壮族自治区气象台(广西壮族自治区海洋气象台) +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611217577.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-12
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0003]然而,现有技术仍至少存在以下不足:一方面,传统的CNN模型(如U-Net)虽具备良好的局部特征提取能力,但其感受野相对有限,难以有效捕捉复杂地形下风速场中由大尺度环流与局地地形动力强迫共同作用形成的长程空间依赖关系;而纯Transformer架构虽可建立全局依赖,但在处理高分辨率空间格点数据时计算复杂度高,难以直接高效应用于业务化格点预报场景

Benefits of technology

本发明通过获取气象站点历史实况风速数据与数值模式预报产品及地形信息,构建包含极大风速观测实况、模式风速预报产品、模式温度预报产品及地形因子的高分辨率格点样本数据集,将实况观测数据、多要素数值模式预报产品及静态地理信息数据在时空维度上对齐并统一表征为格点化样本,为深度学习模型提供了物理含义清晰、信息量丰富的输入特征,使模型能够学习风速场与多尺度大气动力过程及下垫面地形条件之间的复杂非线性映射关系。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123010141A_ABST
    Figure CN123010141A_ABST
Patent Text Reader

Abstract

The application discloses a complex terrain area maximum wind speed prediction method based on Uformer and a composite adaptive weighted loss function, and belongs to the weather prediction field, and comprises the following steps: acquiring historical real-time wind speed data, numerical mode prediction products and terrain information, and constructing a high-resolution grid sample data set; constructing a Uformer maximum wind speed prediction model integrating an encoder-decoder architecture and a self-attention mechanism; designing a composite adaptive weighted mean absolute error loss function which dynamically adjusts weights according to the wind speed statistical distribution of training samples and the business wind force level; training the Uformer maximum wind speed prediction model based on the sample data set and the loss function; inputting the numerical mode prediction products before the prediction starting time into the trained model, and outputting the maximum wind speed grid point prediction field in a future preset period. The application can significantly improve the prediction capability of extreme gale events in complex terrain areas.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of weather forecasting technology, and in particular relates to a method for forecasting maximum wind speed in complex terrain areas based on Uformer and a composite adaptive weighted loss function. Background Technology

[0002] Currently, numerical weather prediction (NWP) models, especially global models such as the High-Resolution Forecasts (HRES) system of the European Centre for Medium-Range Weather Forecasts (ECMWF), have demonstrated outstanding performance in wind field forecasting at both macroscopic and regional scales, providing crucial numerical guidance for meteorological forecasting operations. With the increasing demand for more refined meteorological services, data-driven methods based on deep learning are gradually becoming a new paradigm for improving forecast accuracy. Convolutional neural networks (CNNs) and their variants (such as U-Net) have been applied to wind speed forecasting and model post-processing correction tasks, effectively improving the systematic biases of model forecasts by extracting multi-scale spatial features. Furthermore, the Transformer architecture, with its powerful global relational modeling capabilities, has also shown great potential in the field of meteorological element forecasting, providing a new technical path for capturing long-range spatial dependencies in large-scale circulation background fields.

[0003] However, existing technologies still have at least the following shortcomings: On the one hand, while traditional CNN models (such as U-Net) possess good local feature extraction capabilities, their receptive fields are relatively limited, making it difficult to effectively capture the long-range spatial dependencies in wind speed fields under complex terrain, formed by the combined effects of large-scale circulation and local topographic dynamic forcing. While the pure Transformer architecture can establish global dependencies, its computational complexity is high when processing high-resolution spatial grid data, making it difficult to directly and efficiently apply to operational grid forecasting scenarios. On the other hand, most existing deep learning methods employ general loss functions such as mean squared error or mean absolute error, assigning equal weights to each wind speed sample. This ignores the severe imbalance between the large number of weak wind speed samples in the training samples and the extremely rare extreme wind events. This leads to the model tending to optimize the conventional wind speed cases where the sample quantity is dominant during gradient updates, resulting in insufficient forecasting capability for rare extreme wind events. Furthermore, there is no precedent for combining the U-former architecture with a composite adaptive weighted loss function to simultaneously address the multi-scale feature extraction of wind speed fields in complex terrain areas and the imbalance of extreme wind samples. Therefore, there is an urgent need to develop an intelligent wind speed forecasting method that can effectively integrate multi-scale spatial features, capture global dependencies, and significantly improve the ability to forecast extreme wind events. Summary of the Invention

[0004] To address the aforementioned technical problems, this invention proposes a method for predicting maximum wind speed in complex terrain areas based on Uformer and a composite adaptive weighted loss function, thereby resolving the issues present in the existing technologies.

[0005] To achieve the above objectives, this invention provides a method for predicting maximum wind speed in complex terrain areas based on Uformer and a composite adaptive weighted loss function, comprising: Historical meteorological station wind speed data, numerical model forecast products, and topographic information are acquired to construct a high-resolution gridded sample dataset. The high-resolution gridded sample data includes the actual maximum wind speed observation data of meteorological stations, model wind speed forecast products, model temperature forecast products, and topographic factors. A Uformer maximum wind speed forecast model is constructed. The Uformer maximum wind speed forecast model adopts an encoder-decoder network architecture. Both the encoder and the decoder are embedded with a self-attention mechanism module to extract multi-scale spatial features of the meteorological field and establish global dependencies. A composite adaptive weighted loss function is constructed, wherein the loss weight of each sample is adjusted differently according to the wind speed statistical distribution characteristics of the training samples and the preset wind force level classification standard. The Uformer maximum wind speed prediction model is trained using the high-resolution grid sample dataset and the composite adaptive weighted loss function. The numerical model forecast products before the forecast start time, the maximum wind speed observations from meteorological stations, and the topographic factors are input into the trained Uformer maximum wind speed forecast model to generate a gridded forecast field of maximum wind speed for a future preset time period.

[0006] Preferably, the numerical model forecast product is a high-resolution numerical forecast product from the European Centre for Medium-Range Weather Forecasts; the construction method of the high-resolution gridded sample dataset includes: aligning the historical meteorological station wind speed data with the numerical model forecast product by time, extracting wind speed forecast fields, temperature forecast fields and topographic factor fields at multiple height levels as forecast factors, and performing standardized preprocessing on each forecast factor.

[0007] Preferably, the forecast factors include the maximum wind speed observed at meteorological stations, the 10 m gust forecast value from the early stage of the model, the wind speed forecast value at the 500 hPa height, the wind speed forecast value at the 850 hPa height, the wind speed forecast value at the 925 hPa height, the 2-meter temperature forecast value, and the topographic elevation, slope, aspect, and topographic location index; the standardized preprocessing is a standardized transformation based on the climate mean and standard deviation of each factor during the training set period.

[0008] Preferably, the self-attention mechanism module is a LeWin Transformer module, and the LeWin Transformer module is embedded in each downsampling stage of the encoder and each upsampling stage of the decoder. The encoder and the decoder fuse multi-scale feature information through skip connections.

[0009] Preferably, the LeWin Transformer module includes a window-based multi-head self-attention submodule and a local enhancement feedforward network submodule. The window-based multi-head self-attention submodule independently calculates self-attention within each non-overlapping local window, and the local enhancement feedforward network submodule enhances the extraction of local spatial features through depthwise separable convolution.

[0010] Preferably, the composite adaptive weighted loss function is an adaptive weighted average absolute error loss function, whose weights are composed of a first component based on wind speed probability density and a second component based on wind force level classification. The first component is inversely correlated with the wind speed probability density, and the second component assigns increasing weights to wind speed samples that exceed a preset wind force level.

[0011] Preferably, the weights of the adaptive weighted average absolute error loss function are normalized by multiplying the first component and the second component and then dividing by the expected value of the two.

[0012] Preferably, when training the Uformer maximum wind speed forecast model, the samples are divided into a training set, a validation set, and a test set in chronological order. The training set, the validation set, and the test set are arranged sequentially on the time axis and do not overlap with each other. The model parameters are updated using the training set, and the optimal model parameters are determined based on the performance on the validation set.

[0013] Preferably, generating the maximum wind speed grid forecast field within a preset future time period includes: sequentially performing regional cropping, spatial resolution downscaling, standardization, and spatial dimension scaling on the input data before inputting it into the trained Uformer maximum wind speed forecast model; and then restoring and destandardizing the prediction results output by the model to obtain the maximum wind speed grid forecast field at the forecast time.

[0014] Preferably, the spatial resolution downscaling uses cubic polynomial interpolation to interpolate the numerical model forecast product from the original resolution to the target resolution; the spatial dimension scaling uses interpolation to adjust the grid data to a size that matches the input layer of the Uformer maximum wind speed forecast model.

[0015] Compared with the prior art, the present invention has the following advantages and technical effects: This invention acquires historical wind speed data from meteorological stations, numerical model forecast products, and topographic information to construct a high-resolution gridded sample dataset containing maximum wind speed observations, model wind speed forecast products, model temperature forecast products, and topographic factors. It aligns and uniformly represents the observed data, multi-factor numerical model forecast products, and static geographic information data in the spatiotemporal dimensions as gridded samples, providing deep learning models with input features that have clear physical meaning and rich information content. This enables the models to learn the complex nonlinear mapping relationship between wind speed fields and multi-scale atmospheric dynamic processes and underlying surface topographic conditions.

[0016] This invention constructs a Uformer maximum wind speed forecasting model using an encoder-decoder network architecture, with both the encoder and decoder embedding self-attention mechanisms. This model can extract multi-scale spatial features of the meteorological field while establishing global dependencies, effectively characterizing the combined effects of large-scale circulation background and local topographic dynamic forcing on the wind speed field in complex terrain areas. Simultaneously, this invention constructs a composite adaptive weighted loss function that differentiates the loss weights of each sample based on the statistical distribution characteristics of wind speed in the training samples and a preset wind force level classification standard. This allows the model to assign higher optimization priority to extreme wind samples that occur infrequently but are highly hazardous during training, overcoming the defect of sacrificing the accuracy of extreme samples to minimize overall loss under conventional loss functions. The above model architecture and loss function work synergistically from both feature representation and optimization guidance levels, significantly improving the forecast accuracy of extreme wind events.

[0017] The Uformer maximum wind speed forecasting model used in this invention has its self-attention mechanism module embedded within the encoder-decoder architecture. Through a windowed self-attention computation mechanism, it establishes global dependencies while keeping computational complexity within an acceptable range, enabling it to efficiently process high-resolution gridded data. This specific architectural design allows the model to meet the computational efficiency requirements of operational 3-hour interval, multi-time-period gridded forecasts while possessing global modeling capabilities, providing a feasible technical path for the practical deployment of deep learning methods in meteorological forecasting operations.

[0018] The composite adaptive weighted loss function employed in this invention differentiates its weights based on the statistical distribution characteristics of wind speed and the wind force classification standards. This adjustment mechanism assigns higher weights to high-wind-speed samples while maintaining the physical rationality of the loss function, preventing the model from becoming overly sensitive to high-wind-speed areas due to improper weight settings. The combination of this loss function and the Uformer model structure enables the model to enhance its learning ability for extreme wind samples while maintaining its normal discrimination ability for non-strong wind samples, thereby effectively suppressing the increase in false alarm rate while improving the hit rate for extreme winds.

[0019] This invention directly generates a gridded forecast field of maximum wind speed within a preset future time period by inputting the numerical model forecast product before the forecast start time into the trained Uformer maximum wind speed forecast model. This achieves end-to-end generation from the original model forecast input to the final refined gridded forecast product, without relying on traditional multi-step post-processing procedures. It can provide a maximum wind speed forecast product with strong timeliness, high spatial resolution, and good accuracy for disaster prevention and mitigation decision-making. Attached Figure Description

[0020] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings: Figure 1 This is a flowchart of a method for predicting maximum wind speed in complex terrain areas based on Uformer and a composite adaptive weighted loss function, according to an embodiment of the present invention. Figure 2 This is a schematic diagram of the Uformer maximum wind speed forecasting model network structure according to an embodiment of the present invention; Detailed Implementation It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.

[0021] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.

[0022] Example 1 like Figure 1 As shown, this embodiment provides a method for predicting maximum wind speed in complex terrain areas based on Uformer and a composite adaptive weighted loss function, including: S1: Obtain historical real-time wind speed data from meteorological stations, numerical model forecast products, and topographic information to construct a high-resolution grid sample dataset. The high-resolution grid sample data includes real-time maximum wind speed observations from meteorological stations, model wind speed forecast products, model temperature forecast products, and topographic factors. Furthermore, the numerical model forecast product is a high-resolution numerical forecast product from the European Centre for Medium-Range Weather Forecasts; the construction method of the high-resolution gridded sample dataset includes: aligning the historical wind speed data of the meteorological station with the numerical model forecast product by time, extracting wind speed forecast fields, temperature forecast fields and topographic factor fields at multiple height levels as forecast factors, and performing standardized preprocessing on each forecast factor.

[0023] Furthermore, the forecast factors include the maximum wind speed observed at meteorological stations, the 10 m gust forecast value from the early stage of the model, the wind speed forecast value at the 500 hPa height, the wind speed forecast value at the 850 hPa height, the wind speed forecast value at the 925 hPa height, the 2-meter temperature forecast value, as well as the topographic elevation, slope, aspect, and topographic location index; the standardized preprocessing is a standardized transformation based on the climate mean and standard deviation of each factor during the training set period.

[0024] Specifically, the 3-hourly maximum wind speed data at 10 meters per second from surface meteorological stations were obtained from the provincial meteorological operational database, covering approximately 1200 stations in Guangxi, spanning from January 1, 2019 to December 31, 2025. ECMWF high-resolution numerical weather prediction products were obtained from the national data platform, with a horizontal resolution of 0.125°×0.125° and start times of 00:00 and 12:00 UTC (corresponding to 08:00 and 20:00 Beijing Time). To match the actual operational forecast production cycle, for forecasts starting at 20:00 Beijing Time, the model field at 00:00 UTC (08:00 Beijing Time) of the current day was used; for forecasts starting at 08:00 Beijing Time, the model field at 12:00 UTC (20:00 Beijing Time) of the previous day was used, meaning the operational start time differs from the model start field by 12 hours. The actual data portion uses the actual products available at the start time (approximately 4 hours later), i.e., T-4 h.

[0025] The ECMWF model product used covers the period from January 2019 to December 2025. Thirty-two forecasting factors were extracted from this period, mainly including: Early-stage forecast (reported 12 hours in advance): 10 m gust forecast, 2 m temperature forecast, 500 / 850 / 925 hPa wind speed forecast, and actual maximum wind speed observations from meteorological stations in the early stage of the ECMWF model, with 3 time periods for each category (the forecast lead time is taken as: 3, 6, 9 hours), totaling 18 channels; Forecast field at future time T (forecast field at the start of product reporting for the next T hours): ECMWF model 10 m gust forecast, 2 m temperature forecast, 500 / 850 / 925 hPa wind speed forecast, and actual observation of maximum wind speed at meteorological stations, 2 time intervals for each category (T-3 h, T), totaling 10 channels. Static field: terrain elevation, slope, aspect, and terrain location index, totaling 4 channels.

[0026] All data were cropped to the Guangxi region (104.4°E–112.5°E, 20.0°N–27.0°N). Using cubic polynomial interpolation, the horizontal resolution of each factor field of the model was uniformly downscaled from 0.125° to 0.05°, resulting in a grid field with a spatial size of 141×171.

[0027] For each forecast factor, calculate its climate mean during the training set period (January 2019 – December 2023). ) and standard deviation ( ), and standardize all the data: (1) The standardized multi-factor forecast field is used as the input feature, and the actual maximum wind speed at the corresponding time (observed from meteorological stations and interpolated to the same 0.05° grid point using a cubic polynomial) is used as the prediction target to construct spatiotemporally aligned sample pairs. Finally, the dataset is divided chronologically: training set (samples from January 2019 to December 2023), validation set (samples from January 2024 to December 2024), and independent test set (samples from January 2025 to December 2025) to ensure that each set is temporally independent and avoid information leakage.

[0028] S2: Construct a Uformer maximum wind speed forecast model. The Uformer maximum wind speed forecast model adopts an encoder-decoder network architecture. Both the encoder and the decoder are embedded with a self-attention mechanism module to extract multi-scale spatial features of the meteorological field and establish global dependencies. Furthermore, the self-attention mechanism module is a LeWin Transformer module, and the LeWin Transformer module is embedded in each downsampling stage of the encoder and each upsampling stage of the decoder. The encoder and the decoder fuse multi-scale feature information through skip connections.

[0029] Furthermore, the LeWin Transformer module includes a window-based multi-head self-attention submodule and a local enhancement feedforward network submodule. The window-based multi-head self-attention submodule independently calculates self-attention within each non-overlapping local window, and the local enhancement feedforward network submodule enhances the extraction of local spatial features through depthwise separable convolution.

[0030] Specifically, the main structure of the model is generally an encoder-decoder architecture, and it embeds the LeWinTransformer module, such as... Figure 2 As shown. The specific operation process of the model is as follows: The input is a tensor of shape [batch_size, 32, 256, 256] (the 141×171 input is scaled to 256×256 using cubic polynomial interpolation to fit the network structure). The encoder consists of four downsampling stages, each performing the following sequentially: 3×3 convolution, layer normalization (LayerNorm), a LeWin Transformer block containing a window-based multi-head self-attention mechanism (W-MSA) and a locally enhanced feedforward network (LeFF), and a pixel unshuffle operation (halving the spatial size and increasing the number of channels by four times). The decoder symmetrically consists of four upsampling stages, each performing the following sequentially: a pixel shuffle operation (restoring the spatial size), concatenation of feature maps from the corresponding encoder stage output via skip connections, 3×3 convolution, layer normalization, and a LeWin Transformer block. The final layer uses a 1×1 convolution to compress the number of channels to 1, outputting the predicted maximum wind speed grid field.

[0031] In the LeWin Transformer block, the feature map size of the input LeWin Transformer block is H×W×C, where H and W represent the height and width of the feature map, respectively, and C represents the number of feature channels. The feature map contains a total of HW spatial locations. Global self-attention requires calculating the relationships between all spatial locations, and its self-attention computational complexity is O((HW)²C), i.e., O(H²W²C). The window-based multi-head self-attention mechanism divides the feature map into multiple M×M non-overlapping local windows, and calculates self-attention within each local window, where M is the side length of the local window, and each local window contains M² spatial locations, thereby reducing the self-attention computational complexity to O(M²HWC). When the local window size M is fixed, the computational complexity increases approximately linearly with the number of spatial locations HW in the feature map, thus reducing the computational load of high-resolution grid data.

[0032] S3: Construct a composite adaptive weighted loss function, wherein the composite adaptive weighted loss function adjusts the loss weight of each sample differently according to the wind speed statistical distribution characteristics of the training samples and the preset wind force level classification standard. Furthermore, the composite adaptive weighted loss function is an adaptive weighted average absolute error loss function, whose weights are composed of a first component based on wind speed probability density and a second component based on wind force level classification. The first component is inversely correlated with the wind speed probability density, and the second component assigns increasing weights to wind speed samples that exceed a preset wind force level.

[0033] Furthermore, the weights of the adaptive weighted average absolute error loss function are normalized by multiplying the first component and the second component and then dividing by the expected value of the two.

[0034] Specifically, in order to better train the model and improve the forecasting ability of strong winds, this embodiment has specially designed the loss function.

[0035] An adaptive weighted average absolute error loss function (AW-MAE) was designed for the main body of the model (generator). Its expression is: (2) in, This is the loss value. The total number of samples, For the first The true maximum wind speed value of each sample For the model to the first The predicted maximum wind speed for each sample. This is an adaptive weighting function. It is composed of two parts: (1) Adaptive components based on probability distribution: ,in To train the probability density function of wind speed, To adjust hyperparameters, ; (2) Incorporating the tiered weighting of business focus: (3) in, As a piecewise step function, it is set according to the Chinese meteorological industry standard "Wind Force Scale" (GB / T28591-2012), and winds of level 6 and above are given progressively increasing weights.

[0036] The final composite weights are then normalized. (4) in, This is the expected value in mathematics.

[0037] This design results in samples with actual wind speeds that are half the maximum value of the training set (e.g., 15 m / s) having a significantly higher loss weight than samples with weak winds, effectively amplifying the contribution of prediction error to the total loss.

[0038] S4: Train the Uformer maximum wind speed prediction model using the high-resolution grid sample dataset and the composite adaptive weighted loss function; Furthermore, when training the Uformer maximum wind speed forecast model, the samples are divided into a training set, a validation set, and a test set according to time order. The training set, the validation set, and the test set are arranged sequentially on the time axis and do not overlap with each other. The model parameters are updated using the training set, and the optimal model parameters are determined based on the performance on the validation set.

[0039] Specifically, the Uformer model was trained using the training set data, with AW-MAE as the loss function and the Adam optimizer. The initial learning rate was set to 0.001, and an early stopping mechanism was applied (training stopped if the validation set MAE did not decrease for 10 consecutive epochs). The batch size was set to 8, and the training epochs were 100. Training was performed on four RTX 4090 GPUs and took approximately 36 hours. After each training epoch, the model performance was evaluated on the validation set. Using an early stopping strategy, training was terminated when the validation set loss no longer decreased for 10 consecutive epochs, and the optimal model parameters from the validation set were saved.

[0040] S5: Input the numerical model forecast products before the forecast start time, the actual observation of maximum wind speed at meteorological stations, and the topographic factors into the trained Uformer maximum wind speed forecast model to generate a gridded forecast field of maximum wind speed for the future preset time period.

[0041] Furthermore, the generation of the maximum wind speed grid forecast field within the future preset time period includes: sequentially performing regional cropping, spatial resolution downscaling, standardization processing, and spatial dimension scaling on the input data before inputting it into the trained Uformer maximum wind speed forecast model; and then restoring and destandardizing the prediction results output by the model to obtain the maximum wind speed grid forecast field at the forecast time.

[0042] Furthermore, the spatial resolution downscaling uses cubic polynomial interpolation to interpolate the numerical model forecast products from the original resolution to the target resolution; the spatial dimension scaling uses interpolation to adjust the grid data to a size that matches the input layer of the Uformer maximum wind speed forecast model.

[0043] Specifically, when future forecasts need to be produced (e.g., forecasts starting at 08:00 Beijing time on April 20, 2025), model products from the previous day's 12:00 UTC (20:00 Beijing time) are obtained from the ECMWF data platform, consistent with the data usage strategy during the training phase. The obtained model products are processed according to the same procedure as in step S2: the region is cropped to Guangxi (104.4°E–112.5°E, 20.0°N–27.0°N), and the resolution is downscaled to 0.05° using cubic polynomial interpolation to obtain a 141×171 grid field; then, the mean and standard deviation calculated from the training set are used for standardization; finally, the 141×171 grid data is scaled down to 256×256 to obtain an input tensor with a shape of (32, 256, 256).

[0044] The processed input tensor is fed into the optimal Uformer maximum wind speed forecast model, which is then trained and saved. The model performs forward propagation calculations and directly outputs a grid field of predicted maximum wind speeds at (1, 256, 256). Scaling this output back to (1, 141, 171) yields the maximum wind speed forecast for the next hour (T=3, 6, …, 60) with a resolution of 0.05°, covering the Guangxi region. By either outputting the model all at once or running iteratively over time, a series of grid field forecasts at 3-hour intervals can be obtained for the next 60 hours.

[0045] The output grid prediction field is denormalized: (5) in, and The mean and standard deviation of the target variable in the training set are used to obtain physically meaningful wind speed values. The destandardized forecast field is saved in GeoTIFF or NetCDF format as the final high-resolution gridded forecast product. Simultaneously, a cubic polynomial interpolation method is used to interpolate the forecast field to the latitude and longitude positions of approximately 1200 surface meteorological observation stations in Guangxi, generating a 3-hourly maximum wind speed forecast sequence for each station over the next 60 hours, for operational early warning issuance.

[0046] The beneficial effects of this embodiment: This invention innovatively embeds the Transformer's self-attention mechanism into a U-shaped encoder-decoder architecture to construct a Uformer maximum wind speed forecasting model. Compared to the traditional U-Net, this design not only effectively extracts local spatial features through convolutional operations but also directly establishes long-range dependencies between global grid points through a window-based multi-head self-attention mechanism. This allows for a more accurate characterization of the combined effects of large-scale circulation background and complex topographic dynamic forcing on local wind speeds. This architecture is particularly suitable for wind field modeling in mountainous and coastal areas with complex underlying surfaces, effectively compensating for the limited receptive field of pure convolutional networks.

[0047] This invention addresses the problem of weak model forecasting capabilities for extreme events caused by the uneven distribution of extreme wind speed samples (more weak winds than strong winds). It creatively designs a composite adaptive weighted average absolute error loss function that integrates adaptive components of the probability distribution and operational tiered weights. This function assigns weights inversely proportional to the probability density of sample occurrences and further strengthens the weights based on wind levels 6 and above, which are of operational concern. The stronger the wind and the lower its frequency of occurrence, the higher the weight assigned. Through this weighting rule, the model can significantly enhance its focus on rare but crucial extreme wind samples during training, effectively solving the problems of "smoothing" prediction results and weak strong wind forecasts under conventional loss functions. Simultaneously, it effectively suppresses the increase in false alarm rates while improving the hit rate.

[0048] Example 2 Based on the technical solution of Embodiment 1, this embodiment uses the forecast of the maximum wind speed for the 15th hour starting from 08:00 on September 24, 2025 as an example for illustration: (1) Data collection. The data collection period was from January 2019 to December 2025. Samples from January 2019 to December 2023 were used to train the forecast model; samples from January 2024 to December 2024 were used to validate the forecast model; and samples from January 2025 to December 2025 were used to test the forecast model. The hourly times of 08:00 and 20:00 Beijing time within this period were used as the starting time for the maximum wind speed forecast for the next 60 hours. The collected data consisted of actual observation data of maximum wind speed at 10 meters above ground from approximately 1200 automatic weather stations in Guangxi every 3 hours, and ECMWF high-resolution numerical weather prediction products (0.125°×0.125° resolution). The actual observation data of maximum wind speed at ground surface were the maximum wind speed values ​​within a consecutive 3-hour period.

[0049] (2) Construct a high-resolution grid sample dataset. The original grid data size of the ECMWF high-resolution numerical weather prediction product is 141×171 (the grid field of Guangxi region after downscaling by cubic polynomial interpolation). Match the real data available before the reporting time with the model forecast products at the corresponding time. Thirty-two forecast factors were extracted, comprising three parts: First, the model's early forecasts and corresponding actual wind speed data: ECMWF model's early gust forecasts, 2-m temperature forecasts, 500 / 850 / 925 hPa wind speed forecasts, and actual maximum wind speed observations from meteorological stations, with three time intervals for each category (forecast lead times of 3, 6, and 9 hours), totaling 18 channels; Second, the model's forecasts for future forecast time T: ECMWF model's future 10-m gust forecasts, 2-m temperature and 500 / 850 / 925 hPa wind speed forecasts, and actual maximum wind speed observations from meteorological stations, with two time intervals for each category (T-3 h, T), totaling 10 channels; Third, topographic factors: static field topographic elevation data, slope, aspect, and topographic location index, totaling 4 channels. A total of 32 channels were extracted.

[0050] The forecast factor field is preprocessed based on climatology: the climatological mean of each factor at each grid point during the training set period (January 2019 - December 2023) is calculated. ) and standard deviation ( Then perform a test on each sample. The transformation is performed. The standardized multi-factor forecast field is used as input features. The actual wind speed at the corresponding meteorological station observations is interpolated using a cubic polynomial to the same 0.05° grid point as the prediction target, constructing spatiotemporally aligned sample pairs. The final dataset is divided into: 1) Training sample set: samples from January 2019 to December 2023; 2) Validation sample set: samples from January 2024 to December 2024; 3) Test sample set: samples from January 2025 to December 2025.

[0051] (3) Constructing the input for the Uformer wind speed forecast model. The input matrix of the model is constructed using 32 forecast factor fields corresponding to the start time of the forecast within the time period. First, the 141×171 grid data is scaled down to 256×256 using cubic polynomial interpolation to adapt to the efficient computation of the Uformer network structure. At this time, the dimensions of the input tensor are (batchsize, 32, 256, 256), where batchsize is the batch size of the training input, 32 is the 32 channels of data (18 early field channels + 10 future forecast secondary field channels + 4 static field channels), and 256 is the width and height of the data.

[0052] (4) Construct the Uformer maximum wind speed forecast model. The 32-channel input matrix is ​​used as the input to the Uformer model, which is then trained and the optimal model is saved. The adaptive weighted average absolute error loss function (AW-MAE) is used for model training. (a) Loss Function Design: The loss function used is a composite adaptive weighted average absolute error loss function. That is, weights are assigned according to the magnitude and probability of wind speed occurrence: firstly, based on the probability density function of wind speed in the training set... Calculate the adaptive components of the probability distribution Where α = 0.5; then, according to the Chinese meteorological industry standard "Wind Force Grade" (GB / T 28591-2012), the step weights are set as follows: 0-10.7 m / s = 1, 10.8-13.9 m / s (Force 6 wind) = 8, 14.0-17.1 m / s (Force 7 wind) = 15, 17.2-20.7 m / s (Force 8 wind) = 20, and ≥20.8 m / s (Force 9 and above wind) = 30. The final composite weights are normalized. The final loss function is: in, This is the total loss value. The total number of samples, For the first The true maximum wind speed of each sample For the model to the first The predicted wind speed value for each sample. This is an adaptive weighting function.

[0053] (b) Model training strategy: The Adam optimizer was used, with an initial learning rate of 0.001, a batch size of 8, 100 training epochs, and an early stopping mechanism (the training stopped if the MAE on the validation set did not decrease for 10 consecutive epochs). Training was performed on 4 RTX4090 GPUs and took approximately 36 hours.

[0054] (5) Calculate the latest forecast sample. For the maximum wind speed forecast of the next 15 hours starting from 08:00 on September 24, 2025, take 08:00 on September 24, 2025 as the start time and obtain the numerical forecast product required for that time from the ECMWF data platform (i.e., the model field that started at 20:00 on September 23, 2025 the previous day, which is 12 hours different from the operational start time and is the latest start time of the numerical model). The model input is constructed based on the model's forecast data. First, it includes the model's earlier forecasts and corresponding actual wind speed data: the model provides gust forecasts, 2-meter temperature forecasts, and 500 / 850 / 925 hPa wind speed forecasts for the next 3 hours, 6 hours, and 9 hours (corresponding to 23:00, 02:00, and 05:00 on September 23, 2025, respectively), along with the actual maximum wind speed data from the corresponding stations, totaling 18 channels. Second, relative to the future time-T forecast field (T=3, 6, ..., 60h) starting from 08:00 on September 24, 2025, the model's forecasts for future forecast times T and T-3 are obtained. These include 10-meter gusts, 2-meter temperature, and 500 / 850 / 925 hPa wind speed forecasts, with two time periods for each category (T-3 h, ...). The first part consists of 10 channels (T); the second part is the terrain factor section: static field terrain elevation, slope, aspect, and terrain location index, totaling 4 channels. For a total of 32 channels, the grid data for the Guangxi region is 141×171 (0.05° resolution). Therefore, the model input X matrix has the shape (32, 141, 171), where 32 represents the 32 forecast factor channels, and 141 and 171 represent the height and width of the Guangxi region grid field.

[0055] (6) Prediction using the trained model. First, the model input X in (5) is processed according to the same preprocessing procedure as in the training stage: the region is cropped to Guangxi (104.4°E–112.5°E, 20.0°N–27.0°N), downscaled to 0.05° resolution using cubic polynomial interpolation, standardized using the mean and standard deviation calculated from the training set, and the 141×171 grid data is scaled down to 256×256. The processed input tensor is input into the trained Uformer-AW model, and the model performs forward propagation calculation, directly outputting a (1, 256, 256) predicted wind speed grid field. The output is further scaled back to (1, 141, 171), which corresponds to the maximum wind speed forecast for the 15th hour in the future (23:00 on September 24, 2025) with a resolution of 0.05° covering the Guangxi region. Repeat this process (or output multiple timeframes at once through model design) to obtain a series of gridded forecast fields for the next 60 hours at 3-hour intervals (a total of 20 timeframes: 3, 6, 9, ..., 60 h), with the 15th hour being the result described above.

[0056] (7) Grid-site matching and operational applications. A cubic polynomial interpolation method was used to interpolate the processed 0.05° resolution grid maximum wind speed forecast field to the latitude and longitude positions of approximately 1200 ground meteorological observation stations in Guangxi, generating a maximum wind speed forecast sequence for each station for the next 60 hours, broken down into 3-hour increments. Forecasters can use this high-resolution grid forecast product, combined with operational needs, to issue gale warnings, providing technical support for disaster prevention and mitigation decision-making.

[0057] Through the synergistic optimization of the aforementioned model architecture and loss function, experiments conducted in complex terrain areas (such as Guangxi) demonstrate that the generated maximum wind speed forecast product exhibits significantly lower mean absolute error (MAE) and root mean square error (RMSE) than the traditional U-Net model, the unweighted Uformer model, and the original ECMWF forecast across all forecast lead times from 3 to 60 hours. Particularly under extreme wind conditions exceeding 17.2 m / s, the Critical Success Index (CSI) improves by over 30%, the Point of Detection (POD) improves by over 23%, and the false alarm rate (FAR) decreases by over 11%. This proves that the method in this embodiment effectively improves the ability to capture and forecast the critical extreme wind events essential for disaster prevention and mitigation, possessing extremely high operational application value and providing more accurate forecast services for extreme wind warnings in complex terrain areas.

[0058] The above are merely preferred embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for predicting maximum wind speed in complex terrain areas based on Uformer and a composite adaptive weighted loss function, characterized in that, Includes the following steps: Historical real-time wind speed data, numerical model forecast products, and topographic information are acquired to construct a high-resolution gridded sample dataset. The high-resolution gridded sample data includes real-time maximum wind speed observations at meteorological stations, model wind speed forecast products, model temperature forecast products, and topographic factors. A Uformer maximum wind speed forecast model is constructed. The Uformer maximum wind speed forecast model adopts an encoder-decoder network architecture. Both the encoder and the decoder are embedded with a self-attention mechanism module to extract multi-scale spatial features of the meteorological field and establish global dependencies. A composite adaptive weighted loss function is constructed, wherein the loss weight of each sample is adjusted differently according to the wind speed statistical distribution characteristics of the training samples and the preset wind force level classification standard. The Uformer maximum wind speed prediction model is trained using the high-resolution grid sample dataset and the composite adaptive weighted loss function. The numerical model forecast products before the forecast start time, the actual maximum wind speed observations at meteorological stations, and topographic factors are input into the trained Uformer maximum wind speed forecast model to generate a gridded forecast field of maximum wind speed for a future preset time period.

2. The method according to claim 1, characterized in that, The numerical model forecast products are high-resolution numerical forecast products from the European Centre for Medium-Range Weather Forecasts. The construction method of the high-resolution grid sample dataset includes: aligning the historical real-time wind speed data with the numerical model forecast product by time, extracting wind speed forecast fields, temperature forecast fields and topographic factor fields at multiple height levels as forecast factors, and performing standardized preprocessing on each forecast factor.

3. The method according to claim 2, characterized in that, The forecast factors include maximum wind speed observations from meteorological stations, 10 m gust forecasts from the early stages of the model, wind speed forecasts at 500 hPa, 850 hPa, and 925 hPa altitudes, 2-meter temperature forecasts, as well as topographic elevation, slope, aspect, and topographic location indices. The standardized preprocessing is a standardized transformation based on the climate mean and standard deviation of each factor within the training set period.

4. The method according to claim 1, characterized in that, The self-attention mechanism module is the LeWinTransformer module. Each downsampling stage of the encoder and each upsampling stage of the decoder are embedded in the LeWinTransformer module. The encoder and the decoder fuse multi-scale feature information through skip connections.

5. The method according to claim 4, characterized in that, The LeWin Transformer module includes a window-based multi-head self-attention submodule and a local enhancement feedforward network submodule. The window-based multi-head self-attention submodule independently calculates self-attention within each non-overlapping local window, and the local enhancement feedforward network submodule enhances the extraction of local spatial features through depthwise separable convolution.

6. The method according to claim 1, characterized in that, The composite adaptive weighted loss function is an adaptive weighted average absolute error loss function. Its weights are composed of a first component based on wind speed probability density and a second component based on wind force level. The first component is inversely correlated with the wind speed probability density, and the second component assigns increasing weights to wind speed samples that exceed a preset wind force level.

7. The method according to claim 6, characterized in that, The weights of the adaptive weighted average absolute error loss function are normalized by multiplying the first component and the second component and then dividing by the expected value of the two components.

8. The method according to claim 1, characterized in that, When training the Uformer maximum wind speed forecast model, the samples are divided into a training set, a validation set, and a test set according to time order. The training set, the validation set, and the test set are arranged sequentially on the time axis and do not overlap with each other. The model parameters are updated using the training set, and the optimal model parameters are determined based on the performance on the validation set.

9. The method according to claim 1, characterized in that, The process of generating a gridded forecast field of maximum wind speed within a preset time period includes: sequentially performing regional cropping, spatial resolution downscaling, standardization, and spatial dimension scaling on the input data before inputting it into the trained Uformer maximum wind speed forecast model; and then restoring and destandardizing the spatial dimension of the model's output prediction results to obtain the gridded forecast field of maximum wind speed at the forecast time.

10. The method according to claim 9, characterized in that, The spatial resolution downscaling uses cubic polynomial interpolation to interpolate the numerical model forecast products from the original resolution to the target resolution; the spatial dimension scaling uses interpolation to adjust the grid data to a size that matches the input layer of the Uformer maximum wind speed forecast model.