Lightweight sea wave area prediction optimization method and system based on multi-task learning

By employing a multi-task learning and feature-sharing mechanism, the problems of missing external propagation information and large input data volume in wave forecasting are solved, achieving high-precision and lightweight wave forecasting.

CN120910568BActive Publication Date: 2025-12-12QINGDAO INNOVATION & DEV CENT OF HARBIN ENG UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511438539.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-10
Publication Date
2025-12-12
Estimated Expiration
2045-10-10

AI Technical Summary

Technical Problem

Existing wave forecasting methods suffer from several problems, including a lack of information propagated outside the target sea area, large amounts of input data that are difficult to obtain, and a trade-off between accuracy and lightweight design.

Method used

A multi-task learning approach is adopted, which introduces data from the target sea area and the background sea area during the training phase by sharing an encoder, sharing features, and relying only on the target sea area data during the forecasting phase to build a lightweight wave forecasting model.

Benefits of technology

It improves the accuracy and computational efficiency of wave forecasting, reduces the amount of input data and computational complexity, and achieves more accurate forecasts without increasing computational overhead.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120910568B_ABST
    Figure CN120910568B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of marine environment prediction, and discloses a lightweight sea wave regional prediction optimization method and system based on multi-task learning. The method acquires historical spatio-temporal sequence data of a target sea area and a background sea area, and respectively constructs data sets of the target sea area and the background sea area. The input data of the target sea area and the background sea area are jointly input into a shared encoder for feature extraction, and the shared features are respectively input into a main task decoder and an auxiliary task decoder to respectively output prediction results of the target sea area and the background sea area. The training losses of the target sea area and the background sea area prediction tasks are added together as model losses for back propagation. Only the data required for target sea area prediction is input into a shared module, and the shared features are only input into the trained main task decoder to obtain the final prediction result of the target sea area. The application can more quickly and accurately reflect the influence of external waves on the target sea area, and improve the prediction accuracy of significant wave height and physical rationality.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of marine environment prediction, and particularly relates to a lightweight sea wave regional prediction optimization method and system based on multi-task learning. BACKGROUND

[0002] Sea waves are an important part of the marine dynamic environment, and their spatio-temporal evolution has important influences on maritime navigation safety, near-shore disaster prevention and mitigation, and stability of marine engineering facilities. At present, sea wave prediction mainly relies on two types of technical routes:

[0003] One type is a numerical model method based on physical mechanisms, such as WAVEWATCH III, SWAN, etc. This type of method establishes control equations based on physical processes such as wind wave generation, nonlinear interaction, wave propagation and dissipation, and obtains the evolution results of the wave field by numerical solution. This method can well explain the physical mechanism, but has the disadvantages of large computational overhead, high dependence on the accuracy of external forcing field, and insufficient real-time performance.

[0004] The other type is a data-driven deep learning method. In recent years, convolutional neural networks, recurrent neural networks and hybrid structures have been applied to sea wave element prediction tasks, trying to train the wave evolution law through historical data. This type of method has the advantages of fast reasoning speed and low computational cost, and is suitable for fast prediction and regionalization scenarios, gradually becoming an important supplement to numerical models.

[0005] Existing lightweight sea wave regional prediction methods mainly focus on the following categories:

[0006] (1) Directly based on target sea area data for model training; this type of method mainly takes the target prediction area as the research object, uses the historical data of the area to construct training samples, and uses deep learning structures such as convolutional neural networks and recurrent neural networks to directly establish the mapping relationship between input meteorological elements and output wave elements without considering the propagation of external environmental information. For example, wind speed and wave elements are used as input features to predict the significant wave height field at the future time through neural network regression.

[0007] (2) Introducing external data of the target sea area for model prediction; this type of method tries to introduce background field information of a larger range into the input end in order to reflect the external environmental influence in the case of single-region training. Specifically, wind field and wave field data of adjacent sea areas or even larger scales outside the target prediction area are included as model inputs, in an attempt to explicitly introduce external propagation and energy input processes at the data-driven level. This method expands the data coverage range in the input stage, increases the amount of input data and model parameters, and reduces the model prediction efficiency.

[0008] (3) Model prediction based on shallow network structure: This method mainly focuses on the optimization of deep learning model in inference efficiency and resource consumption. In order to realize the lightweight target, the research designs the shallow network structure, reduces the parameter size and calculation complexity of the model, and sacrifices the model accuracy to ensure the fast inference speed and low calculation cost, realizes the fast prediction of significant wave height and other wave elements, and is convenient for deployment and application in actual business.

[0009] Through the above analysis, the problems and defects of the prior art are:

[0010] (1) Missing external propagation information: The deep learning method based on the target area only relies on the historical data of the target sea area for modeling, ignoring the influence of external wave propagation on the energy input of the target area through the propagation process, which leads to insufficient description of the target sea area outside the model, thereby affecting the accuracy of the prediction result.

[0011] (2) Large amount of input data and difficulty in obtaining: Although the prediction method based on expanding the initial background field attempts to introduce more external environmental information, it brings a significant increase in input data dimension, increases the model calculation cost, and weakens the lightweight advantage; at the same time, it is difficult to obtain high-precision background data in a large range in practical application, which increases the application cost and difficulty of the method.

[0012] (3) Precision and lightweight contradiction: The prediction method based on lightweight structure design often sacrifices the description ability of the physical propagation characteristics of the wave while pursuing the reduction of the parameter quantity and calculation quantity of the model; in complex sea conditions or extreme event conditions, the prediction accuracy of this method decreases significantly, and it is difficult to meet the dual requirements of precision and stability in practical application. SUMMARY

[0013] In order to overcome the problems in the related art, the embodiments of the present application provide a lightweight sea wave regional prediction optimization method and system based on multi-task learning, and the technical solution is as follows:

[0014] The present application is realized in this way, the lightweight sea wave regional prediction optimization method based on multi-task learning, comprising the following steps:

[0015] S1, training data set construction: obtaining the historical spatio-temporal sequence data of the target sea area and the background sea area, and performing splicing processing, and constructing the input and output data sets of the target sea area and the background sea area respectively;

[0016] S2, multi-task model training: input the target sea area and background sea area input data into the shared encoder for feature extraction to obtain shared features; input the shared features into the main task decoder and the auxiliary task decoder respectively to output the prediction results of the target sea area and the background sea area; calculate the first loss of the target sea area prediction result and the true value, the second loss of the background sea area prediction result and the true value, add the first loss and the second loss to obtain the total loss, and update the parameters of the shared encoder, the main task decoder and the auxiliary task decoder according to the total loss;

[0017] S3, model prediction: directly input the data required for predicting the target sea area into the fixed shared encoder after training to obtain shared features; input the shared features only into the trained main task decoder to obtain the final prediction result of the target sea area; wherein the auxiliary task decoder does not participate in the calculation in the prediction stage.

[0018] In step S1, the historical spatio-temporal sequence data of the target sea area and the background sea area are obtained and spliced, including:

[0019] obtaining the meridional wind speed data of the target sea area , the zonal wind speed data , the wave height data , and the wind speed data of the background sea area , the zonal wind speed data , the wave height data , wherein is the start time of the data, is the end time of the data, is the start and end time of the data;

[0020] The wind speed data and the wave height data of the target sea area and the background sea area are spliced respectively to obtain the spliced data of the target sea area and the spliced data of the background sea area ; wherein the wind speed and wave height data come from the ERA5 reanalysis dataset of ECMWF, and the time resolution is 1 hour; the splicing processing is performed in the channel dimension to form a three-channel spatio-temporal data matrix of meridional wind speed, zonal wind speed and wave height.

[0021] In step S1, the training data set is divided into target sea area input data, target sea area output data, and background sea area input data, and background sea area output data;

[0022] When the model inputs the current time data to predict the future time data, the target sea area input data set is , is the start and end time of the target sea area input data set; the target sea area output data set is , The start and end times of the target sea area output data set are , The start and end times of the background sea area input data set are , The start and end times of the background sea area output data set are The current time of the input data is The future time of the prediction result is

[0023] In step S2, the construction of the shared encoder includes:

[0024] The shared encoder is constructed, the target sea area input data is , the background sea area input data is , and the encoder parameters are shared between the target sea area prediction task and the background sea area prediction task through a convolutional layer ;

[0025] The shared encoder is composed of three two-dimensional convolutional layers and ReLU activation functions connected in sequence, and the parameters are optimized by the target sea area task and the background sea area task during the training process.

[0026] In step S2, in the decoder, the main task decoder maintains the original model structure, focuses on the extraction of local features, and does not share parameters with the background sea area; the auxiliary task decoder uses a 1×1 convolutional layer for linear transformation, adjusts the number of channels on the basis of shared features, and realizes the output that meets the prediction requirements; the expression is:

[0027] ;

[0028] ;

[0029] In the formula, is the target sea area prediction result output by the main task decoder, is the background sea area prediction result output by the auxiliary task decoder, is the model structure of the main task decoder, is the activation function, is the target sea area input data, is the shared encoder parameter, is the background sea area input data, is the independent parameter of the main task decoder, is the 1×1 convolution kernel parameter of the auxiliary task decoder, and the symbol is the convolution operation.

[0030] In step S2, the first loss and the second loss are added together to obtain the total loss, including:

[0031] The prediction losses for the target sea area and the background sea area are calculated separately and summed to obtain the final total loss function. Backpropagation is then performed using this loss to achieve multi-task iterative training. The expression is:

[0032] ;

[0033] ;

[0034] ;

[0035] In the formula, The total loss during model training. Losses due to training in the target sea area Losses due to training in the background sea area This represents the total number of samples in the training set. The actual value for the target sea area. The target sea area prediction result output by the main task decoder. The background sea area is the actual value. This is to provide the background ocean area prediction results output by the auxiliary task decoder.

[0036] In step S3, the data required for target sea area forecasting is directly input into the trained and fixed shared encoder to obtain shared features; including:

[0037] Acquire historical wind speed and wave height data required for forecasting the target sea area, perform data preprocessing through data merging operations, and input the data matrix required for forecasting into the model;

[0038] Input data for the target sea area during the forecast phase are: Input data The data is fed into a shared encoder, utilizing shared parameters fixed during the training phase. Features are extracted to obtain a high-level representation that includes background marine propagation information.

[0039] In step S3, the shared features are input only into the trained main task decoder to obtain the final forecast result for the target sea area, including:

[0040] Shared features are input into the main task decoder, preserving the target sea area forecasting task. During the forecasting phase, the decoder loads a model file containing only the target sea area branch parameters, ensuring that the forward propagation computation in the decoder only executes the path of the main task decoder, without allocating any computational resources to the 1×1 convolutional layer of the background sea area branch. The forecast results for the target sea area are output, achieving a simplified and lightweight forecasting process that does not require additional background sea area data and branch operations. The expression is:

[0041] ;

[0042] In the formula, is a prediction result of the target sea area model in the prediction stage, is a main task decoder parameter.

[0043] The method further comprises verifying the prediction accuracy of the sea wave prediction model;

[0044] The mean absolute percentage error (MAPE), root mean square error (RMSE) and correlation coefficient The three error evaluation indexes calculate the errors of the real values and the prediction values of the target sea area;

[0045] ;

[0046] ;

[0047] ;

[0048] In the formula, is the total number of training set samples, are the real value and the prediction value of the wave height of the i-th sample, is the average value of the real value of the wave height. Another object of the present application is to provide a lightweight sea wave area prediction optimization system based on multi-task learning, which is used for regulating and controlling the lightweight sea wave area prediction optimization method based on multi-task learning.

[0049] The training data set construction module is used for acquiring the historical spatio-temporal sequence data of the target sea area and the background sea area and performing splicing processing, and constructing the input and output data sets of the target sea area and the background sea area respectively;

[0050] The multi-task model training module is used for inputting the input data of the target sea area and the background sea area into a shared encoder for feature extraction to obtain shared features; and inputting the shared features into a main task decoder and an auxiliary task decoder respectively to output prediction results of the target sea area and the background sea area respectively;

[0051] The first loss of the prediction result of the target sea area and the real value and the second loss of the prediction result of the background sea area and the real value are calculated, the first loss and the second loss are added to obtain a total loss, and the parameters of the shared encoder, the main task decoder and the auxiliary task decoder are updated in reverse according to the total loss;

[0052]

[0053] ​The model prediction module is configured to input target sea area prediction required data into a trained fixed shared encoder to obtain shared features, and input the shared features into a trained main task decoder to obtain a final prediction result of the target sea area, wherein the auxiliary task decoder does not participate in calculation in the prediction stage.

[0054] In combination with all the above technical solutions, the present application has the following beneficial effects:

[0055] Firstly, the significant wave height area prediction optimization method provided by the present application is based on a multi-task learning framework, and under the premise of maintaining the independent inference ability of the original prediction task, environmental data outside the target prediction sea area is introduced, and the convolution operation characteristics are used to realize the convolution parameter sharing between different scale sea area tasks, thereby improving the modeling ability of the model for wave propagation characteristics. Through this method, the prediction accuracy of the significant wave height can be improved under the condition of the same data input and model parameter amount in the prediction stage.

[0056] For a sea area near the west coast of a certain country, the present application inputs the current 6-hour wind speed and wave height data into the model to predict the wave height in the next 12 hours. The baseline model uses a conventional convolutional neural network (CNN) for prediction, and the RMSE of the model's 12-hour prediction is 0.742 m, the MAPE is 9.68%, and the R 2 After using the optimization method of the present application, the RMSE of the model's 12-hour prediction is 0.671 m, the MAPE is 8.35%, and the R 2 The experimental results show that the present application uses the same input data, model structure and parameter amount as the baseline model in the prediction process, and achieves better prediction results.

[0057] Secondly, the significant wave height area prediction optimization method proposed by the present application uses a multi-task learning and convolution feature sharing mechanism to simultaneously learn the wave characteristics of the target sea area and the background sea area in the training stage, which significantly improves the model's ability to describe the wave propagation process. Compared with the existing single-region training method, the present application can more accurately reflect the influence of external waves on the target sea area, and improve the prediction accuracy and physical rationality of the significant wave height.

[0058] In the prediction stage, the present application only needs to input the data of the target sea area to complete the prediction, without using the background sea area data, thereby significantly reducing the input data amount and computational complexity, and realizing lightweight prediction. This design improves the computational efficiency and the feasibility of model deployment under the premise of ensuring high accuracy, and is convenient for rapid application in actual marine prediction business.

[0059] Third, the existing regional lightweight sea wave prediction method either ignores external propagation information or relies on large-scale input data and loses the lightweight advantage, and always lacks an effective solution that can consider background propagation information and still maintain lightweight reasoning. The present application provides a new technical path for regional lightweight sea wave prediction through multi-task learning and shared feature mechanism. In regional sea wave prediction, how to consider the modeling of propagation information and lightweight reasoning at the same time has always been a difficult problem to break through. The present application effectively solves this contradiction by jointly modeling the target and background sea areas during the training phase, and only relying on target area data during the prediction phase, thereby achieving a breakthrough balance between accuracy and efficiency. BRIEF DESCRIPTION OF DRAWINGS

[0060] The accompanying drawings, which are incorporated herein and form part of the specification, illustrate embodiments consistent with the present disclosure and, together with the description, further serve to explain the principles of the present disclosure;

[0061] Figure 1 is a lightweight sea wave regional prediction optimization method flowchart provided by the embodiment of the present application;

[0062] Figure 2 is a training phase model structure diagram provided by the embodiment of the present application;

[0063] Figure 3 is a prediction phase model structure diagram provided by the embodiment of the present application;

[0064] Figure 4 is a MAPE comparison diagram of the benchmark model and the optimized model prediction under different prediction lengths provided by the embodiment of the present application;

[0065] Figure 5 is a sea area benchmark model diagram of the 12th hour of the benchmark model and the optimized model prediction provided by the embodiment of the present application;

[0066] Figure 6 is a sea area optimization model diagram of the 12th hour of the benchmark model and the optimized model prediction provided by the embodiment of the present application. DETAILED DESCRIPTION

[0067] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the specific embodiments of the present application will be described in detail below. In the following description, a large number of specific details are set forth in order to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without departing from the scope of the present application, therefore the present application is not limited by the specific implementation disclosed below.

[0068] The innovation of the present application is that: the present application introduces external propagation information in the training stage through multi-task learning and shared feature mechanism, and only relies on the target area prediction branch and data to realize lightweight reasoning in the prediction stage, thereby significantly improving the regional sea wave prediction accuracy without increasing the calculation overhead. The present application introduces background sea area for model training, and realizes parameter sharing of target sea area and background sea area through shared encoder, so that the target sea area prediction task can learn the more extensive wave propagation characteristics contained in the background sea area, improve the modeling ability of wave propagation process, and at the same time, the main task decoder keeps the target sea area to learn its own local characteristics, so that the model takes into account the large-scale wave propagation law and the characteristics of the target sea area itself, and realizes the improvement of the prediction accuracy of the sea wave prediction model.

[0069] The present application only inputs the target sea area data required for prediction, so as to realize the wave prediction of the target sea area, without introducing the background sea area data and related operation, thereby effectively reducing the calculation complexity and data dependence in the prediction stage, and realizing the lightweight prediction of the sea wave prediction model.

[0070] Embodiment 1, as shown in the Figure 1 , the lightweight sea wave regional prediction optimization method based on multi-task learning provided by the embodiment of the present application comprises the following steps:

[0071] S1, training data set construction: obtaining the historical spatio-temporal sequence data of the target sea area and the background sea area, and performing splicing processing, to construct the input and output data sets of the target sea area and the background sea area respectively;

[0072] (1) data acquisition: obtaining the target sea area zonal wind speed data , the target sea area meridional wind speed data , the target sea area wave height data , the background sea area wind speed data , the background sea area zonal wind speed data , the background sea area wave height data , wherein, is the start time of the data, is the end time of the data, is the start and end time of the data;

[0073] (2) data splicing: in order to ensure that the model is trained by simultaneously inputting wind speed and wave height data, the wind speed data and wave height data of the target sea area and the background sea area are spliced respectively to obtain the spliced data of the target sea area and the spliced data of the background sea area . Wherein, the wind speed and wave height data are derived from the ERA5 reanalysis data set of ECMWF, and the time resolution is 1 hour; the splicing processing is performed in the channel dimension to form a three-channel spatio-temporal data matrix of meridional wind speed, zonal wind speed and wave height.

[0074] (3) Dataset making: The dataset is divided into four parts: target sea area input data, target sea area output data, background sea area input data, and background sea area output data. When the model inputs current time data to predict future time data, the target sea area input dataset is , , , is the start and end time of the target sea area input dataset; the target sea area output dataset is , is the start and end time of the target sea area output dataset; the background sea area input dataset is , is the start and end time of the background sea area input dataset; the background sea area output dataset is , is the start and end time of the background sea area output dataset; wherein is the number of current time input data, is the number of future time prediction results.

[0075] The present application makes training datasets for the target sea area and the external background sea area around it, which contain input features such as meteorological elements and historical wave elements, and output wave parameters such as corresponding significant waves; by constructing datasets for the target small sea area and the background large sea area, basic data support is provided for subsequent multi-task training.

[0076] S2, multi-task model training: input the target sea area and background sea area input data into the shared encoder for feature extraction to obtain shared features; input the shared features into the main task decoder and the auxiliary task decoder respectively to output the prediction results of the target sea area and the background sea area;

[0077] The advantage of the present application is that any model can be optimized to obtain higher precision prediction results. The present application can be CNN, Transformer, U-Net, etc.

[0078] Firstly, a shared encoder is constructed to realize module parameter sharing of the target sea area prediction task and the background sea area prediction task; then, a decoder is constructed, the different task parameters of the decoder are independent of each other, the main task decoder uses the original model for prediction, and the auxiliary task decoder uses a layer of 1x1 convolution to output the prediction result; finally, the training loss of the target sea area prediction task and the background sea area prediction task is added as the final model loss for back propagation, which specifically includes:

[0079] (1) constructing a shared encoder: the target sea area input data is , and the background sea area input data is , the shared encoder parameters are shared between the target sea area prediction task and the background sea area prediction task through convolutional layers , so that the target sea area can learn more extensive wave propagation characteristics in the background sea area, thereby enhancing the modeling ability of the model for the wave propagation process. The shared encoder is composed of three two-dimensional convolutional layers connected in turn and a ReLU activation function, and its parameters are optimized by the target sea area task and the background sea area task during the training process.

[0080] (2) Build the decoder: In the decoder, the main task decoder maintains the original model structure and focuses on the extraction of local features to avoid information loss caused by excessive sharing, and does not share parameters with the background sea area. The auxiliary task decoder uses a 1x1 convolutional layer for linear transformation to adjust the number of channels based on shared features, achieving an output that meets the prediction requirements.

[0081] ;

[0082] ;

[0083] wherein, is the target sea area prediction result output by the main task decoder, is the background sea area prediction result output by the auxiliary task decoder, is the model structure of the main task decoder, is the activation function, is the target sea area input data, is the shared encoder parameter, is the background sea area input data, is the independent parameter of the main task decoder, is the 1x1 convolution kernel parameter of the auxiliary task decoder, and the symbol is the convolution operation.

[0084] (3) Build the loss function: Calculate the first loss of the target sea area prediction result output by the main task decoder and the true value, and the second loss of the background sea area prediction result output by the auxiliary task decoder and the true value, and add them together as the final total loss function. Use this loss for backpropagation to achieve multi-task iterative training.

[0085] ;

[0086] ;

[0087] ;

[0088] wherein, is the total loss of model training, is the target sea area training loss, Lossbackground, Total number of training set samples, Ground truth of target sea area, Prediction of target sea area output by main task decoder, Ground truth of background sea area, Prediction of background sea area output by auxiliary task decoder.

[0089] As shown in Figure 2 , the model structure is divided into two parts of shared encoder and decoder. Among them, the shared encoder shares the encoder parameters between the size sea area tasks through the convolutional layer, so that the target sea area prediction task can learn the more extensive wave propagation characteristics contained in the background sea area, thereby enhancing the modeling ability of the wave propagation process. In the decoder, the main task decoder maintains the original model structure and no longer shares the network parameters with the auxiliary task decoder, so that it can focus on its own unique local features and avoid feature loss caused by excessive sharing; the auxiliary task decoder realizes simple linear transformation through 1x1 convolution to adjust the number of data channels while maintaining the integrity of the shared encoder features, ensuring that the output dimension is consistent with the demand of target sea area prediction. In the training process, mean square error (MSE) is used as the loss function to calculate the prediction loss of the target sea area and the background sea area respectively, and the sum of the two is taken as the total loss function to coordinate the joint optimization of the encoder and the decoder.

[0090] S3, model prediction: directly input the data required for target sea area prediction into the fixed shared encoder after training to obtain shared features; input the shared features only into the trained main task decoder to obtain the final prediction result of the target sea area; wherein the auxiliary task decoder does not participate in the calculation in the prediction stage.

[0091] First, input the data required for target sea area prediction; then, the input data uses the fixed shared parameters in the training stage to obtain high-level representations containing background sea area propagation information; then, input the shared features into the main task decoder to retain the target sea area prediction task to generate prediction output, complete the prediction of the target sea area, without the need to additionally introduce background sea area data and branch operation, realize the simplification and lightweight of the prediction process, which specifically includes:

[0092] (1) Input the data required for prediction: obtain the historical wind speed and wave height data required for target sea area prediction, and perform data preprocessing such as data merging to input the data matrix required for model prediction;

[0093] (2) Shared feature extraction: the input data of the target sea area in the prediction stage is , which is sent to the shared encoder using the fixed shared parameters ​extracting features to obtain high-level representations containing propagation information of the background sea area.

[0094] (3) Decoder prediction: input the shared features into the main task decoder, and reserve the target sea area prediction task; in the prediction stage, the decoder loads a model file containing only the target sea area branch parameters, ensuring that the forward propagation calculation in the decoder only executes the path of the main task decoder and does not allocate any computing resources to the 1×1 convolutional layer of the background sea area branch; the prediction result of the target sea area is output, realizing a simple and lightweight prediction process without additional introduction of background sea area data and branch operation; the expression is:

[0095] ;

[0096] In the formula, is the prediction result of the target sea area model in the prediction stage, is the main task decoder parameter.

[0097] As shown in Figure 3 , the model prediction stage reserves the prediction task of the target sea area. At this time, the input data only includes the wind speed field, historical wave, etc. required for prediction of the target sea area. The input data is first extracted by the shared encoder to obtain high-level representations containing propagation information of the background sea area, using the shared parameters learned and fixed in the training stage; then, the representation is processed by the main task decoder to obtain the prediction output corresponding to the target sea area. The prediction process does not need to additionally introduce background sea area data and branch operation, ensuring the simplicity and lightweight of the prediction stage.

[0098] S4, model prediction accuracy verification.

[0099] Based on the true value of the target sea area, the accuracy of the target sea area prediction result is verified, and error evaluation indexes such as mean absolute percentage error (MAPE), root mean square error (RMSE) and correlation coefficient (R) are used to verify the optimization effect of the wave prediction model.

[0100] The average absolute percentage error (MAPE), root mean square error (RMSE) and correlation coefficient (R) are used to calculate the error between the true value and the predicted value of the target sea area.

[0101] ;

[0102] ;

[0103] ;

[0104] In the formula, is the total number of training set samples,​​ the true value and the predicted value of the wave height of the i th sample, respectively, the average value of the true value of the wave height.

[0105] The present application evaluates the prediction results of the trained model in the target sea area, uses the mean absolute percentage error (MAPE), root mean square error (RMSE), and correlation coefficient (R) and other indicators to verify the effect of the present application method in improving the significant wave height prediction accuracy while keeping lightweight.

[0106] In embodiment 2, the lightweight sea wave area prediction optimization system based on multi-task learning provided by the present application comprises:

[0107] A training data set construction module is configured to obtain historical spatio-temporal sequence data of the target sea area and the background sea area and perform splicing processing, and construct input and output data sets of the target sea area and the background sea area, respectively.

[0108] A multi-task model training module is configured to input the input data of the target sea area and the background sea area into a shared encoder for feature extraction to obtain shared features; and input the shared features into a main task decoder and an auxiliary task decoder, respectively, to output prediction results of the target sea area and the background sea area.

[0109] A loss calculation module is configured to calculate a first loss of the prediction result of the target sea area and the true value, a second loss of the prediction result of the background sea area and the true value, add the first loss and the second loss to obtain a total loss, and update the parameters of the shared encoder, the main task decoder, and the auxiliary task decoder in a reverse direction according to the total loss.

[0110] A model prediction module is configured to input data required for target sea area prediction into the fixed shared encoder after training to obtain shared features; and input the shared features only into the trained main task decoder to obtain the final prediction result of the target sea area, wherein the auxiliary task decoder does not participate in calculation in the prediction stage.

[0111] To further prove the positive effect of the above embodiment, the present application based on the above technical solution carries out the following experiment.

[0112] The comparison results of the prediction error of the benchmark model and the prediction error of the model optimization method proposed by the present application are as follows:

[0113] For a sea area near the west coast of a country, the model inputs the current 6-hour wind speed and wave height data to predict the wave height in the next 12 hours. The benchmark model uses a conventional convolutional neural network (CNN) for prediction, and the RMSE of the model's 12-hour prediction is 0.742 m, the MAPE is 9.68%, and the R 2 ​​0.787; after using the optimization method of the present application, the RMSE of the model for 12-hour prediction is 0.671 m, the MAPE is 8.35%, and the R 2 0.835. The present application obtains better prediction results in the prediction process using the same input data, model structure and parameter quantity as the benchmark model. The specific optimization effects are shown in Table 1. Figure 4 、 Figure 5 、 Figure 6 and Table 1.

[0114] Table 1 shows the error results of the benchmark model and the optimized model under each prediction length

[0115]

[0116] The above describes only the preferred specific embodiments of the present application, but the protection scope of the present application is not limited thereto, and any modification, equivalent replacement and improvement made by those skilled in the art within the technical range disclosed by the present application and within the spirit and principles of the present application should be covered within the protection scope of the present application.

Claims

1. A lightweight sea wave area prediction optimization method based on multi-task learning, characterized in that, The method The method comprises the following steps: S1, training dataset construction: obtaining historical spatio-temporal sequence data of a target sea area and a background sea area, and performing splicing processing to construct input and output datasets of the target sea area and the background sea area respectively; the historical spatio-temporal sequence data comprises wind speed data and wave height data; S2, multi-task model training: inputting the input data of the target sea area and the background sea area into a shared encoder for feature extraction to obtain shared features; inputting the shared features into a main task decoder and an auxiliary task decoder respectively to output prediction results of the target sea area and the background sea area respectively; calculating a first loss of the prediction result of the target sea area and a true value, a second loss of the prediction result of the background sea area and the true value, adding the first loss and the second loss to obtain a total loss, and updating parameters of the shared encoder, the main task decoder and the auxiliary task decoder reversely according to the total loss; S3, model prediction: directly inputting data required for target sea area prediction into the fixed shared encoder after training to obtain shared features; inputting the shared features into the trained main task decoder only to obtain the final prediction result of the target sea area; wherein the auxiliary task decoder does not participate in calculation in the prediction stage; In step S2, the construction of the shared encoder comprises: A shared encoder is constructed, the target sea area input data is X T , the background sea area input data is X B , and the encoder parameters θ are shared between the target sea area prediction task and the background sea area prediction task through a convolutional layer share ; The shared encoder is composed of three two-dimensional convolution layers and ReLU activation functions connected in sequence, and the parameters thereof are optimized by the target sea area task and the background sea area task in the training process; In step S2, in the decoder, the main task decoder maintains the original model structure and focuses on the extraction of local features, and does not share parameters with the background sea area; the auxiliary task decoder adopts a 1x1 convolution layer for linear transformation, adjusts the number of channels on the basis of maintaining the shared features, and realizes the output meeting the prediction requirements; the expression is: wherein, is the target sea area prediction result output by the main task decoder, is the background sea area prediction result output by the auxiliary task decoder, f() is the model structure of the main task decoder, σ() is an activation function, X T is the target sea area input data, θ share is the shared encoder parameter, X B is the background sea area input data, θ T is the independent parameter of the main task decoder, θ B is the 1×1 convolution kernel parameter of the auxiliary task decoder, and the symbol * represents convolution operation.

2. The multi-task learning based lightweight sea wave area prediction optimization method according to claim 1, characterized in that, In step S1, the historical spatio-temporal sequence data of the target sea area and the background sea area is obtained and splicing processing is performed, comprising: acquiring target sea area zonal wind speed data WU T (t b …t e ), meridional wind speed data WV T (t b …t e ), wave height data H T (t b …t e ), and background sea area zonal wind speed data WU B (t b …t e ), meridional wind speed data WV B (t b …t e ), wave height data H B (t b …t e ), wherein t b is the starting time of the data, t e is the ending time of the data, (t b …t e ) is the starting and ending time of the data; The wind speed data and the wave height data of the target sea area and the background sea area are spliced respectively to obtain spliced data C T (t b …t e ) of the target sea area and spliced data C B (t b …t e ) of the background sea area; wherein the wind speed and wave height data are from the ERA5 reanalysis dataset of ECMWF, and the time resolution is 1 hour; the splicing processing is carried out in the channel dimension to form a three-channel spatiotemporal data matrix of the meridional wind speed, the zonal wind speed and the wave height.

3. The multi-task learning based lightweight sea wave area prediction optimization method according to claim 2, characterized in that, In step S1, the training dataset is divided into target sea area input data, target sea area output data, and background sea area input data and background sea area output data; When the model inputs the current m time data to predict the future n time data, the target sea area input data set is C T ([t b …t b+m-1 ]…[t e-m-n+1 …t e-n ]) and [t b …t b+m-1 ]…[t e-m-n+1 …t e-n ] is the start and end time of the target sea area input data set; The target sea area output data set is H T ([t b+ m…t b+m+n-1 ]…[t e-m+1 …t e ]),[t b+m …t b+m+n-1 ]…[t e-m+1 …t e ] is the start and end time of the target sea area output data set; the background sea area input data set is C B ([t b …t b+m-1 ]…[t e-m-n+1 …t e-n ]),([t b …t b+m-1 ]…[t e-m-n+1 …t e-n ]) is the start and end time of the background sea area input data set; the background sea area output data set is H B ([t b+m …t b+m+n-1 ]…[t e-m+1 …t e ]),[t b+ m…t b+m+n-1 ]…[t e-m+1 …t e ] is the start and end time of the background sea area output data set; wherein m is the current time number of the input data, and n is the future time number of the prediction result.

4. The multi-task learning based lightweight sea wave area prediction optimization method according to claim 1, characterized in that, In step S2, the first loss and the second loss are added to obtain the total loss, comprising: The prediction losses of the target sea area and the background sea area are calculated respectively and added as the final total loss function; the loss is used for back propagation to realize multi-task iterative training; the expression is: L = L T + L B In the formula, L is the total loss of model training, L T is the target sea area training loss, L B is the background sea area training loss, N is the total number of training set samples, is the target sea area true value, is the target sea area prediction result output by the main task decoder, is the background sea area true value, is the background sea area prediction result output by the auxiliary task decoder.

5. The multi-task learning based lightweight sea wave area prediction optimization method according to claim 1, characterized in that, In step S3, the data required for target sea area prediction is directly inputted into the fixed shared encoder after training to obtain shared features; comprising: The historical wind speed and wave height data required for target sea area prediction are obtained, and data preprocessing is performed through data merging operation to input the data matrix required for model prediction; The input data of the target sea area in the prediction stage is X TF The input data X TF is sent to the shared encoder, and the shared parameters θ fixed in the training stage are used share The features are extracted to obtain high-level representations containing propagation information of the background sea area.

6. The multi-task learning based lightweight sea wave area prediction optimization method according to claim 5, characterized in that, In step S3, the shared features are inputted into the trained main task decoder only to obtain the final prediction result of the target sea area, comprising: The shared feature is input into the main task decoder, and the target sea area prediction task is reserved; in the prediction stage, the decoder loads a model file containing only the target sea area branch parameters, ensuring that the forward propagation calculation in the decoder only performs the pass of the main task decoder and does not allocate any computing resources to the 1×1 convolutional layer of the background sea area branch; the prediction result of the target sea area is output, realizing a simple and lightweight prediction process without the need to additionally introduce background sea area data and branch operation; the expression is: In the formula, θ is the prediction result of the target sea area model in the prediction stage T is the main task decoder parameter.

7. The multi-task learning based lightweight sea wave area prediction optimization method according to claim 1, characterized in that, The method further comprises sea wave prediction model prediction accuracy verification; The mean absolute percentage error MAPE, the root mean square error RMSE and the correlation coefficient R are used 2 The three error evaluation indexes calculate the error of the real value and the predicted value of the target sea area. In the formula, N is the total number of training set samples, respectively, the true value and the predicted value of the wave height of the i-th sample, is the average value of the true value of the wave height.

8. A multi-task learning-based lightweight sea wave area prediction optimization system, characterized by, The system is used for regulating and controlling the lightweight sea wave area prediction optimization method based on multi-task learning according to any one of claims 1-7, and the system comprises: A training data set construction module is configured to obtain historical spatio-temporal sequence data of the target sea area and the background sea area and perform splicing processing, and construct input and output data sets of the target sea area and the background sea area respectively; A multi-task model training module is configured to input the input data of the target sea area and the background sea area into a shared encoder for feature extraction to obtain shared features; input the shared features into a main task decoder and an auxiliary task decoder respectively to output prediction results of the target sea area and the background sea area respectively; A first loss of the target sea area prediction result and the true value and a second loss of the background sea area prediction result and the true value are calculated, the first loss and the second loss are added to obtain a total loss, and the parameters of the shared encoder, the main task decoder and the auxiliary task decoder are updated in reverse according to the total loss; A model prediction module is configured to input data required for target sea area prediction into a fixed shared encoder after training to obtain shared features; input the shared features only into the trained main task decoder to obtain the final prediction result of the target sea area, wherein the auxiliary task decoder does not participate in the calculation in the prediction stage.

Citation Information

Patent Citations

  • A method for detecting wave height from a near-shore sea wave video based on a convolutional neural network

    CN109886217A

  • Sea wave height prediction and model training method, electronic equipment and storage medium

    CN115660041A