Extreme sea wave forecasting method based on extreme sample augmentation and dynamic weighted loss
Patent Information
- Application Number
- CN202610772587.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-01
- Publication Date
- 2026-10-23
AI Technical Summary
但由于海浪有效波高受风力、温度、海底地形等多因素影响,此类方法存在计算过程复杂、运行时间长、需要大量物理数据、计算成本高等缺点,无法实现快速精准预报;并且由于采用网格化的离散处理,用差分代替微分,不可避免引入了数值误差,面临着数值计算不收敛甚至不稳定的问题,这限制了高分辨率模式的精细化应用
1.本发明计算效率高、成本低。无需建立复杂的物理方程,避免了海浪数值模式中网格化离散处理带来的数值误差、计算不收敛或不稳定问题,也无需大量物理参数和特征工程。通过构建包含输入层、基础残差块、下采样模块、瓶颈层、上采样模块、图像尺寸调整层及输出层的残差U型网络深度学习模型,仅需气象驱动数据即可快速完成二维海浪波高预报,大幅降低了计算资源和时间成本,实现了低成本、高效率的快速预测。
Smart Images

Figure CN122964849A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of marine environmental forecasting and artificial intelligence technology, specifically to an extreme wave forecasting method based on extreme sample enhancement and dynamic weighted loss. Background Technology
[0002] Ocean waves are one of the most common dynamic processes in the ocean and the most energy-concentrated form of movement in the global ocean. Waves can travel thousands of kilometers, with wave heights varying from a few centimeters to tens of meters. Extreme wave heights, as the most destructive and risky manifestation of the wave system, are typically defined as wave heights exceeding the 95th percentile threshold of the overall data. Accurate simulation and forecasting of extreme wave heights are crucial for ensuring maritime navigation safety, managing coastal engineering and activities, and understanding the changing processes of the ocean-climate system.
[0003] Currently, wave prediction methods mainly fall into two categories: empirical statistical methods and physical process-based numerical wave models. The latter is widely used, with representative models being third-generation numerical wave prediction models (WAM, WAVEWATCHIII, and SWAN, etc.), which are computational models based on energy balance equations that consider various physical processes. The significant wave height is influenced by climate conditions, seasonal characteristics, and topographic factors, exhibiting strong nonlinearity and asymmetry. Based on their underlying principles, wave prediction models can be categorized into numerical computation models, machine learning models, and deep learning models.
[0004] Numerical computation models, represented by WAVEWATCHIII, analyze physical data obtained from various sensors based on real physical laws to obtain prediction results. Machine learning models, on the other hand, select appropriate mathematical models, determine hyperparameters, input feature-engineered sample data, and fine-tune the model parameters using suitable learning algorithms according to certain strategies. This results in a prediction model that highly fits the sample data and has a certain generalization ability. Machine learning methods can fit complex nonlinear processes and solve nonlinear problems with complex physical mechanisms without prior knowledge of the system. Therefore, this type of method is widely used in significant wave height prediction, such as single-structure prediction models like Artificial Neural Networks (ANN) and Support Vector Machines (SVM), as well as composite network prediction models like Wavelet Transform Neural Networks (WLNN), EMD-SVR, ICEEMDAN-ELM, and MLR-CWLS. These models perform well in short-term predictions, and composite network prediction results have higher accuracy. Deep learning models differ from ordinary machine learning models. They utilize neural networks with numerous hidden layers, employing extensive vector computation to learn more abstract features within the data, enabling higher-dimensional feature segmentation and decision-making. Deep learning methods can automatically learn the inherent patterns and hierarchical representations of sample data, providing strong support for ocean forecasting. Existing deep learning methods for predicting significant wave height include LSTM and CNN-LSTM, but these models often have simple structures and cannot fully exploit the correlations between data points. Applying multi-layered neural networks can effectively extract data features. With the development of high-performance computing and deep learning models, deep learning, with its strong learning capabilities, excellent nonlinear fitting ability, and portability, has been widely applied in the field of forecasting.
[0005] However, the aforementioned existing technologies still have significant drawbacks. Empirical statistical methods offer the advantage of high computational speed, but since ocean waves consist of local wind waves and swells propagating from other sea areas, early empirical formulas derived from long-term observations are more applicable to wind wave growth and cannot accurately characterize swell phenomena, leading to significant deviations in wave simulation and forecasting. Ocean wave numerical models are models built upon the fundamental physical laws and processes of ocean waves. The latest third-generation ocean wave numerical models are based on the wave spectrum energy balance equation, offering relatively accurate simulation and prediction. However, because the significant wave height is influenced by multiple factors such as wind force, temperature, and seabed topography, these methods suffer from complex computational processes, long running times, the need for large amounts of physical data, and high computational costs, hindering rapid and accurate forecasting. Furthermore, the use of gridded discrete processing, replacing differentiation with difference, inevitably introduces numerical errors, leading to problems such as non-convergence and instability in numerical calculations, limiting the refined application of high-resolution models. Machine learning methods rely on feature extraction techniques, and their generalization ability needs improvement. Current deep learning methods primarily focus on single-point wave height prediction, which is influenced by surrounding wind speeds. Considering only a few spatial points of wind and wave data makes it difficult to uncover relatively long-term wave change trends, and prediction accuracy faces significant bottlenecks. Furthermore, due to imbalanced data distribution, many current deep learning models exhibit relatively large prediction errors for extreme data. Some models attempt to be trained on data from hurricane periods, demonstrating high prediction accuracy under extreme weather conditions, but their performance may degrade under normal weather conditions due to overfitting to specific patterns. Summary of the Invention
[0006] To overcome the shortcomings of existing technologies, the present invention aims to provide an extreme wave forecasting method based on extreme sample enhancement and dynamic weighted loss. By using extreme sample enhancement and dynamic weighted loss function, it significantly improves the forecasting ability of extreme wave height while ensuring the prediction accuracy of ordinary wave height, and achieves low-cost and high-efficiency rapid two-dimensional wave height forecasting.
[0007] To achieve the objective of this invention, the following solution is adopted: An extreme wave forecasting method based on extreme sample enhancement and dynamic weighted loss includes the following steps: Step S1: Obtain meteorological driving data and ocean wave height data, and preprocess the meteorological driving data and ocean wave height data, including spatial clipping, missing value imputation and normalization, to obtain the preprocessed training dataset; Step S2: Construct an extreme sample augmentation module, sample extreme samples and normal samples in the preprocessed training dataset according to a preset training frequency ratio, and add Gaussian noise to the extreme samples to obtain the augmented training dataset; Step S3: Construct a network structure based on a residual U-shaped network, the network structure including an input layer, a basic residual block, a downsampling module, a bottleneck layer, an upsampling module, an image size adjustment layer, and an output layer; Step S4: Using a dynamic weighted loss function, the network structure is trained with the enhanced training dataset to obtain a trained wave height prediction model, wherein the dynamic weighted loss function assigns different weights to samples in different wave height intervals based on wave height quantiles. Step S5: Input the meteorological driving data for the time to be predicted into the trained wave height prediction model for prediction, and perform inverse normalization on the model output to obtain the predicted value of the wave height.
[0008] Further, step S1 specifically includes: Acquire meteorological driving data and ocean wave height data; The meteorological driving data and ocean wave height data are spatially cropped and aligned to the target sea area; Outliers in the wave height data were removed, and the land areas and missing values in the wave height data and meteorological driving data were filled with average values respectively. The meteorological driving data is normalized using the maximum and minimum values of the cropped and missing value-filled meteorological driving data to obtain a preprocessed training dataset.
[0009] Further, in step S2, the preset training frequency ratio is that extreme samples and normal samples are sampled at a ratio of 0.3:0.7, the extreme samples are samples in the preprocessed training dataset whose wave height value is greater than the 95th percentile, and the standard deviation of the Gaussian noise is 0.001.
[0010] Further, in step S3, the input layer is used to receive meteorological driving data with a size of 52×52×7, where 52×52 represents the spatial resolution and 7 represents the number of features of the input meteorological variable; The basic residual block consists of two convolutional layers, layer normalization, ReLU activation function, and short-circuit connections; The downsampling module uses a large convolutional kernel to perform downsampling with a stride of 2 to halve the spatial resolution of the feature map, and then performs residual block operations. The upsampling module performs upsampling through bilinear interpolation and then concatenates it with the skip connection feature map from the downsampling module.
[0011] Furthermore, the large convolutional kernel size used in the downsampling module is 15×15.
[0012] Furthermore, in step S4, the dynamic weighted loss function is constructed based on Huber loss and a weight matrix based on wave height quantile is introduced; For samples whose true wave height is less than the 75th percentile, the weight is set to 1; For samples whose true wave height is greater than the 75th percentile and less than the 95th percentile, the weight is set to 2; For samples whose true wave height is greater than the 95th percentile, the weight is set to 4.
[0013] Furthermore, the threshold parameter δ for the Huber loss is set to 1, and its expression is: Among them, y ture Represents the true value, y pred This represents the predicted value.
[0014] Furthermore, the dynamic weighted loss function also includes an effective sample mask, used to mask land areas or invalid grids; the expression for the effective sample mask is: Here, ignore_value is the average value of the land area fill after normalization.
[0015] Furthermore, in step S5, the meteorological driving data for the time to be predicted includes the U10 component of wind, the V10 component of wind, solar radiation, latent heat flux, sea level pressure, precipitation, and temperature data every three hours of the day; the output wave height prediction value is the two-dimensional wave height every three hours of the day.
[0016] Furthermore, in step S3, the output layer uses a 1×1 convolutional layer to generate the final prediction result, and uses dtype=tf.float32 to force the output to be a 32-bit floating-point number; the image size adjustment layer adjusts the image size output by the decoder to 64×64 through bilinear interpolation.
[0017] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. This invention boasts high computational efficiency and low cost. It eliminates the need for complex physical equations, avoiding numerical errors, computational non-convergence, or instability issues arising from gridded discretization in numerical wave models. It also eliminates the need for extensive physical parameter and feature engineering. By constructing a residual U-shaped network deep learning model comprising an input layer, basic residual blocks, a downsampling module, a bottleneck layer, an upsampling module, an image resizing layer, and an output layer, it can rapidly complete two-dimensional wave height forecasts using only meteorological driving data, significantly reducing computational resources and time costs, and achieving low-cost, high-efficiency rapid prediction.
[0018] 2. This invention significantly improves the prediction accuracy of extreme wave heights. Addressing the problem of large prediction errors in existing deep learning methods due to imbalanced data distribution, this invention constructs an extreme sample enhancement module. This module samples extreme samples and ordinary samples from the preprocessed training dataset at a preset training frequency ratio, and adds Gaussian noise to the extreme samples to obtain an enhanced training dataset, effectively increasing the learning frequency and diversity of extreme samples. Simultaneously, a dynamic weighted loss function based on wave height quantiles, assigning different weights to different wave height intervals, is used to train the model using the enhanced training dataset, making the model more focused on fitting extreme wave heights. The synergistic effect of these two methods significantly improves the prediction capability for extreme wave heights while maintaining the accuracy of ordinary wave height prediction.
[0019] 3. The model structure of this invention is reasonably designed and has strong generalization ability. The constructed residual U-shaped network, through the structural combination of basic residual blocks, downsampling modules, bottleneck layers, and upsampling modules, can effectively extract multi-level features; combined with extreme sample enhancement and dynamic weighted loss strategies, the model has good adaptability to different wave conditions in complex marine environments, reduces the risk of overfitting, and improves generalization and robustness.
[0020] 4. This invention offers convenient data acquisition and strong practicality. By acquiring meteorological driving data and ocean wave height data and performing preprocessing (including spatial cropping, missing value imputation, and normalization), all data used can be obtained from public reanalysis datasets. Data acquisition is easy and low-cost, requiring no additional sensor or observation equipment deployment. The method has a clear workflow and is easy to promote and apply to fields such as maritime navigation safety, coastal engineering management, and ocean-climate system research. Attached Figure Description
[0021] Figure 1 This is a flowchart of the extreme wave forecasting method based on extreme sample enhancement and dynamic weighted loss in an embodiment of the present invention; Figure 2 This is a comparison chart of the R² box curves between the extreme wave forecasting method based on extreme sample enhancement and dynamic weighted loss in this embodiment of the invention and the prior art. Figure 3 This is a box plot comparing the extreme wave forecasting method based on extreme sample enhancement and dynamic weighted loss in this embodiment of the invention with the RMSE box plot of the prior art. Detailed Implementation
[0022] The present invention will now be further described in conjunction with the accompanying drawings and specific embodiments. It should be noted that, without conflict, the various embodiments or technical features described below can be arbitrarily combined to form new embodiments.
[0023] like Figure 1-3As shown, this embodiment of the invention provides an extreme wave forecasting method based on extreme sample enhancement and dynamic weighted loss, including the following steps: Step S1: Obtain meteorological driving data and ocean wave height data, and preprocess the meteorological driving data and ocean wave height data, including spatial clipping, missing value imputation and normalization, to obtain the preprocessed training dataset.
[0024] Step S2: Construct an extreme sample augmentation module, sample extreme samples and normal samples in the preprocessed training dataset according to a preset training frequency ratio, and add Gaussian noise to the extreme samples to obtain the augmented training dataset.
[0025] Step S3: Construct a network structure based on a residual U-shaped network, the network structure including an input layer, a basic residual block, a downsampling module, a bottleneck layer, an upsampling module, an image size adjustment layer, and an output layer; Step S4: Using a dynamic weighted loss function, the network structure is trained with the enhanced training dataset to obtain a trained wave height prediction model, wherein the dynamic weighted loss function assigns different weights to samples in different wave height intervals based on wave height quantiles. Step S5: Input the meteorological driving data for the time to be predicted into the trained wave height prediction model for prediction, and perform inverse normalization on the model output to obtain the predicted value of the wave height.
[0026] The extreme wave forecasting method based on extreme sample enhancement and dynamic weighted loss according to the embodiments of the present invention will be further described in detail below.
[0027] The extreme wave forecasting method based on extreme sample enhancement and dynamic weighted loss in this invention applies deep learning methods and ideas to wave simulation and forecasting. It overcomes the problem of inaccurate wave characterization by traditional empirical statistical methods, and avoids the complicated process of physical equations, model approximation and parameterization in numerical modeling, as well as the high computer resource requirements. Meteorological elements (wind, air pressure, temperature, solar radiation, precipitation and latent heat flux) related to ocean wave elements are selected as drivers. A residual U-Net (Res-U-Net) deep learning model suitable for the simulation and forecasting of wave height is designed. It can quickly complete the simulation and forecasting of ocean wave height every three hours of the day by using meteorological driving data every three hours of the day, while ensuring the forecast accuracy is comparable to that of the numerical wave model. Thus, it realizes intelligent and rapid forecasting of ocean wave height elements.
[0028] In this embodiment, the specific content of the downloaded data is as follows: meteorological element data (including the U10 component and V10 component of wind, solar radiation SSRD, latent heat flux SLHF, sea level pressure MSL, precipitation TP, and temperature T2M) are from the ERA5 reanalysis dataset of ECMWF (www.ecmwf.int), with a spatial resolution of 0.25°×0.25°, a frequency of 3 hours per interval, covering January 2000 to December 2014, and covering a geographical range from 90°N to 90°S and from 180°E to 180°W. The wave element data (wave height VHM0) comes from the wave dataset output by the MFWAM model of the Copernicus Marine Environment Monitoring Service (CMEMS) (https: / / marine.copernicus.eu), with a spatial resolution of 0.2°×0.2°, a frequency of 3 hours per interval, covering January 2000 to December 2014, and covering a geographical range from 81.2°N to 78°S and from 180°E to 180°W.
[0029] In this embodiment, the specific content of data preprocessing is as follows: First, the meteorological data and wave data are spatially clipped and aligned to the northern South China Sea region (from 12.8°N–25.4°N, 105.8°E–118.4°E). Then, outliers in the wave data are removed (outlier wave values include negative values and abnormally high values), and the land area is filled with the average value. Missing values in the meteorological data are filled with the average value. In this embodiment, the specific content of model construction is as follows: A wave data prediction model is constructed, and the training dataset is input into the wave data prediction model Res-U-Net for deep learning training. The model consists of the following parts: Extreme sample augmentation module: The extremeness of the samples is measured by the percentage of samples greater than P95 and the TOP(100) value in the training set. The maximum 5% are selected as the extreme sample dataset, and the remaining samples are used as the normal sample training set. Then the training frequency of extreme samples and normal samples is adjusted to 0.3:0.7, and Gaussian noise with a standard deviation of 0.001 is added to the extreme samples to achieve data augmentation of extreme samples. Model Input Layer: The model's input layer receives meteorological driving data of size (52, 52, 7), where 52 represents the height and width of the meteorological driving data, and 7 is the number of features of the input meteorological variables.
[0030] Basic Residual Block: The model is built using a basic residual block (res_block), which helps avoid the vanishing gradient problem during deep network training. Each residual block consists of two convolutional layers, layer normalization, ReLU activation function, and shorted connections. This module directly passes input information to the output through residual connections, thus helping the model maintain information flow in deep networks.
[0031] Downsampling Module: The model gradually reduces the spatial dimensionality through downsampling modules (down_blocks) to extract higher-level features. Within each downsampling block, a large convolutional kernel (15x15) is first used for downsampling with a stride of 2, halving the spatial resolution of the feature map. Residual block operations are then performed to further enhance the network's feature extraction capabilities. The convolutional layers and activation functions in each downsampling module enable the network to capture features at different levels as the resolution is progressively reduced.
[0032] Bottleneck Layer: Located at the deepest part of the U-Net structure, the bottleneck layer connects the encoder and decoder. This layer extracts high-level semantic information from the image through a series of convolutions and residual operations, preparing it for the decoder's upsampling process.
[0033] Upsampling Module: The upsampling module (up_block) is responsible for restoring the spatial resolution of the image. It upsamples the input feature map using bilinear interpolation and then concatenates it with the feature maps from skip connections, allowing the network to retain finer spatial information. Each upsampling module undergoes residual operations to further enhance the representation of the features.
[0034] Image resizing layer: The model features a specially designed resize layer that performs bilinear interpolation on the decoder output image, resizing it to (64, 64) to ensure a uniform size for the output image. This operation helps maintain the stability of image processing, ensuring that the output and input data are compared on the same spatial scale.
[0035] Output Layer: In the final stage of the decoder, convolutional layers are used to process the upsampled feature maps and generate the final output. To prevent numerical issues during Automatic Mixed Precision (AMP) calculations, the output layer uses `dtype=tf.float32` to force the output to be a 32-bit floating-point number. This layer generates the final prediction result through a 1x1 convolutional layer, and the number of output channels is adjusted to `output_channels` according to the needs of the task.
[0036] Dynamic weighted loss module: The spatial distribution characteristics of P75 and P95 quantiles are calculated on a grid-by-grid basis in the wave height training data to characterize the spatial threshold structure of different wave height levels. The loss function adopts the Huber form to balance stability and anomaly resistance, and a quantile-based weight matrix is introduced to assign different loss weights to different wave height intervals (P75, P95), thereby enhancing the learning signal for extreme wave heights.
[0037] This loss function is based on Huber loss and incorporates a weighting matrix when calculating the error to ensure that extreme wave height samples have a greater impact on model training. The formula is as follows: Among them, y ture Represents the true value y pred This represents the predicted value, where δ is Huber's threshold parameter set to 1. Wherein, the weight W(y) ture Dynamic settings are made based on different wave height ranges: When it is less than P75, W(y) ture )=1; When W(y) is greater than P75 and less than P98, ture )=2; When it is greater than P95, W(y) ture =4.
[0038] Valid sample mask: Where ignore_value is the average value of the land area fill after normalization. Therefore, the final formula is: Mask is the effective area mask (masking land or invalid grid). In this embodiment, the specific output of the model is as follows: the wave height is predicted by the optimal prediction model, and the prediction result is inversely normalized to obtain the predicted value of the wave height.
[0039] This invention's extreme wave forecasting method based on extreme sample augmentation and dynamic weighted loss utilizes a Residual U-Net (Res-U-Net) in a deep learning model to predict wave heights every three hours of the day using meteorological driving data. The meteorological driving data includes the U10 component of wind, the V10 component of wind, solar radiation, latent heat flux, sea level pressure, precipitation, and temperature data. Specifically, the method first downloads the aforementioned seven meteorological driving data sets (3-hour temporal resolution, 0.25°×0.25° spatial resolution) from the ERA5 reanalysis dataset, and then downloads wave height data (3-hour temporal resolution, 0.2°×0.2° spatial resolution) from the CMEMS MFWAM model output wave dataset. The data is then preprocessed: the meteorological and wave data are spatially clipped and aligned to the same target region; missing values are filled with the average value; and the meteorological data is normalized using the maximum and minimum values from the training set. Next, the processed data is input into the model, and the model output is inversely normalized using the maximum and minimum values of the wave data in the training set to obtain the predicted wave height at the corresponding time.
[0040] The extreme wave forecasting method based on extreme sample augmentation and dynamic weighted loss in this invention offers readily available and low-cost data input. By employing public and free data sources (such as the ERA5 reanalysis dataset and the CMEMS wave dataset) to acquire meteorological driving data and wave height data, the threshold and cost of data acquisition are effectively reduced. No additional observation equipment or commercial data purchase is required, thus improving the model's accessibility and practicality. The forecasting method itself is simple, efficient, and accurate. By designing an efficient and simple Residual U-Net (Res-U-Net) deep learning model, computational resources and time costs are reduced, enabling accurate and rapid two-dimensional wave height forecasting. This avoids the complex physical equations and feature engineering dependencies of traditional numerical models, making the forecasting method simpler and easier to implement. Furthermore, the extreme wave forecasting method employs extreme sample weighting and dynamic weighted loss functions, allowing the model to automatically adjust learning weights for samples under different wave conditions, thereby more accurately capturing the changing patterns of extreme wave heights. This approach not only significantly improves the accuracy of extreme wave height prediction, but also effectively reduces the model's sensitivity to data bias and noise, significantly enhancing the model's generalization ability and robustness.
[0041] The extreme wave forecasting method based on extreme sample enhancement and dynamic weighted loss in this invention has the following advantages: This invention addresses the shortcomings of existing prediction techniques, such as high computational load, high cost, inability to predict quickly, and strong dependence on feature engineering. By requiring only meteorological driving data (U10 and V10 components of wind, solar radiation, latent heat flux, sea-level pressure, precipitation, and temperature) as input, data acquisition is easy and low-cost, eliminating the need for additional sensor or observation equipment deployment. Furthermore, the constructed Res-U-Net model has a simple structure and is easy to operate, avoiding numerical errors and computational instability caused by complex physical equations and gridded discretization processing in numerical wave models. This achieves low-cost, rapid, and accurate predictions, making wave forecasting more widely applicable. This invention also solves the problem of large errors in extreme wave height prediction in existing technologies, especially in complex environments and extreme weather conditions. By using an extreme sample augmentation module (which samples extreme samples with wave height values greater than the 95th percentile from the preprocessed training dataset at a ratio of 0.3:0.7 to ordinary samples and adds Gaussian noise with a standard deviation of 0.001), combined with a dynamic weighted loss function (which assigns weights to different wave height intervals based on wave height quantiles: 1 for less than P75, 2 for P75 to P95, and 4 for greater than P95), the prediction effect of ordinary wave height is guaranteed, while the accuracy of extreme wave height prediction is effectively improved, significantly enhancing the robustness and generalization ability of the model in extreme marine environments.
[0042] The above is a detailed description of the preferred embodiments of the present invention. However, the present invention is not limited to the embodiments described. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention. All such equivalent modifications or substitutions are included within the scope defined by the claims of this application.
Claims
1. An extreme wave forecasting method based on extreme sample augmentation and dynamic weighted loss, characterized in that, Includes the following steps: Step S1: Obtain meteorological driving data and ocean wave height data, and preprocess the meteorological driving data and ocean wave height data, including spatial clipping, missing value imputation and normalization, to obtain the preprocessed training dataset; Step S2: Construct an extreme sample augmentation module, sample extreme samples and normal samples in the preprocessed training dataset according to a preset training frequency ratio, and add Gaussian noise to the extreme samples to obtain the augmented training dataset; Step S3: Construct a network structure based on a residual U-shaped network, the network structure including an input layer, a basic residual block, a downsampling module, a bottleneck layer, an upsampling module, an image size adjustment layer, and an output layer; Step S4: Using a dynamic weighted loss function, the network structure is trained with the enhanced training dataset to obtain a trained wave height prediction model, wherein the dynamic weighted loss function assigns different weights to samples in different wave height intervals based on wave height quantiles. Step S5: Input the meteorological driving data for the time to be predicted into the trained wave height prediction model for prediction, and perform inverse normalization on the model output to obtain the predicted value of the wave height.
2. The extreme wave forecasting method based on extreme sample enhancement and dynamic weighted loss according to claim 1, characterized in that, Step S1 specifically includes: Acquire meteorological driving data and ocean wave height data; The meteorological driving data and ocean wave height data are spatially cropped and aligned to the target sea area; Outliers in the wave height data were removed, and the land areas and missing values in the wave height data and meteorological driving data were filled with average values respectively. The meteorological driving data is normalized using the maximum and minimum values of the cropped and missing value-filled meteorological driving data to obtain a preprocessed training dataset.
3. The extreme wave forecasting method based on extreme sample enhancement and dynamic weighted loss according to claim 1, characterized in that, In step S2, the preset training frequency ratio is that extreme samples and normal samples are sampled at a ratio of 0.3:0.
7. The extreme samples are those with a wave height value greater than the 95th percentile in the preprocessed training dataset, and the standard deviation of the Gaussian noise is 0.
001.
4. The extreme wave forecasting method based on extreme sample enhancement and dynamic weighted loss according to claim 1, characterized in that, In step S3, the input layer is used to receive meteorological driving data with a size of 52×52×7, where 52×52 represents the spatial resolution and 7 represents the number of features of the input meteorological variables. The basic residual block consists of two convolutional layers, layer normalization, ReLU activation function, and short-circuit connections; The downsampling module uses a large convolutional kernel to perform downsampling with a stride of 2 to halve the spatial resolution of the feature map, and then performs residual block operations. The upsampling module performs upsampling through bilinear interpolation and then concatenates it with the skip connection feature map from the downsampling module.
5. The extreme wave forecasting method based on extreme sample enhancement and dynamic weighted loss according to claim 4, characterized in that, The large convolutional kernel size used in the downsampling module is 15×15.
6. The extreme wave forecasting method based on extreme sample enhancement and dynamic weighted loss according to claim 1, characterized in that, In step S4, the dynamic weighted loss function is constructed based on Huber loss and a weight matrix based on wave height quantile is introduced. For samples whose true wave height is less than the 75th percentile, the weight is set to 1; For samples whose true wave height is greater than the 75th percentile and less than the 95th percentile, the weight is set to 2; For samples whose true wave height is greater than the 95th percentile, the weight is set to 4.
7. The extreme wave forecasting method based on extreme sample enhancement and dynamic weighted loss according to claim 6, characterized in that, The threshold parameter δ for the Huber loss is set to 1, and its expression is as follows: Among them, y ture Represents the true value, y pred This represents the predicted value.
8. The extreme wave forecasting method based on extreme sample enhancement and dynamic weighted loss according to claim 6, characterized in that, The dynamic weighted loss function also includes an effective sample mask, used to mask land areas or invalid grids; the expression for the effective sample mask is: Here, ignore_value is the average value of the land area fill after normalization.
9. The extreme wave forecasting method based on extreme sample enhancement and dynamic weighted loss according to claim 1, characterized in that, In step S5, the meteorological driving data for the time to be predicted includes the U10 component of wind, the V10 component of wind, solar radiation, latent heat flux, sea level pressure, precipitation and temperature data every three hours of the day; the output wave height prediction value is the two-dimensional wave height every three hours of the day.
10. The extreme wave forecasting method based on extreme sample enhancement and dynamic weighted loss according to claim 1, characterized in that, In step S3, the output layer uses a 1×1 convolutional layer to generate the final prediction result and forces the output to be a 32-bit floating-point number using dtype=tf.float32; the image size adjustment layer adjusts the image size output by the decoder to 64×64 through bilinear interpolation.