Marine meteorological time sequence prediction method based on DC-LSTM-Attention combined model

The DC-LSTM-Attention model addresses the challenges of integrating temporal and spatial data in marine meteorology by using dilated convolution, LSTM, and attention mechanisms to improve prediction accuracy and stability in marine meteorological time series forecasting.

CN119167035APending Publication Date: 2024-12-20YANTAI LITU MARINE TECHNOLOGY CO LTD
View PDF 0 Cites 6 Cited by

Patent Information

Application Number
CN202411330009.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-24
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

Traditional marine meteorological time series forecasting methods struggle with integrating temporal and spatial characteristics of marine environmental data, handling high-dimensional and nonlinear data, and addressing issues like missing data, gradient vanishing or exploding problems in deep neural networks, and capturing multi-scale and long-term dependencies.

Method used

A DC-LSTM-Attention combined model is employed, utilizing dilated convolution to capture multi-scale features, LSTM for long-term dependency modeling, and an attention mechanism to dynamically adjust focus on important time steps, optimizing model weights and improving prediction accuracy and stability.

Benefits of technology

The model effectively captures multi-scale features, models long-term dependencies, and enhances prediction accuracy and stability in the face of complex marine meteorological data, including handling missing data and nonlinear conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119167035A_ABST
    Figure CN119167035A_ABST
Patent Text Reader

Abstract

The invention relates to a marine meteorological time sequence prediction method based on a DC-LSTM-Attention combination model, and belongs to the field of marine meteorological time sequence prediction, and the method comprises the following steps: (1) data screening and preprocessing: selecting a data set of a marine meteorological scene, and carrying out the cleaning and normalization processing of the data; (2) designing a marine meteorological prediction model based on DC-LSTM-Attention, wherein the model comprises a cavity convolution layer, an LSTM layer and an Attention layer; and (3) model training and verification: inputting the data into a trained model, obtaining a multi-dimensional feature vector through processing, comparing the multi-dimensional feature vector with historical features in a database, and predicting future marine meteorological changes. The method has the advantages that the receptive field is expanded through the cavity convolution, and the features of different scales are better captured. The LSTM can effectively model long-term dependence in a time sequence, and the prediction capability of periodic changes is improved. The Attention mechanism enhances the adaptability of the model, so that the model can dynamically adjust the attention to different time steps and features, and the prediction performance under complex data is optimized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a method for marine meteorological time series prediction based on a DC-LSTM-Attention combined model, and belongs to the field of marine meteorological time series prediction. Background Art

[0002] Marine meteorological forecasting plays an irreplaceable role in global climate change, marine resource management and marine activities. By predicting marine meteorological changes in advance, it is not only possible to improve the operating efficiency of industries such as marine transportation, fisheries and oil extraction, but also to effectively avoid and reduce the risks brought by meteorological disasters. In addition, marine meteorological forecasting has important strategic value for protecting marine ecosystems and responding to climate change. In traditional methods, marine meteorological time series forecasting mainly relies on statistical models and physical models. Statistical models such as the autoregressive integrated moving average model (ARIMA) and its variants predict future meteorological conditions through the time series characteristics of historical data. Although such methods are simple and easy to use, they have limited performance when dealing with nonlinear, non-stationary or high-dimensional data. Physical models are based on the physical laws of atmospheric and ocean dynamics and predict meteorological changes through numerical simulation. However, the physical model has high computational complexity and extremely high accuracy requirements for initial and boundary conditions, which limits its extensiveness and real-time performance in practical applications.

[0003] With the advent of the big data era and the improvement of computing power, deep learning technology has gradually emerged in the field of marine meteorological time series forecasting. Deep learning models, especially recurrent neural networks (RNNs) and their variants such as long short-term memory networks (LSTMs) and gated recurrent units (GRUs), have become important tools for marine meteorological forecasting because they can effectively capture long-term dependencies in time series data. In addition, the advantages of convolutional neural networks (CNNs) in feature extraction have also been introduced into meteorological forecasting. By combining LSTM, the model's ability to process complex meteorological data can be further improved.

[0004] In order to solve the problem of insufficient integration of temporal and spatial characteristics of traditional time series network models and insufficient batch processing of marine environmental elements big data, Zhang Xuewei et al. used the ConvGRU deep learning neural network model that combines the recurrent neural network (RNN) expansion algorithm and the convolutional neural network (CNN) to effectively reflect the spatiotemporal characteristics, and used the sample generator to process the data to effectively deal with the batch problem of time series remote sensing data. Kan Gaoyuan et al. constructed a hybrid prediction model based on LSTM neural network after wavelet transform denoising in view of the characteristics of meteorological data such as multi-volatility, nonlinearity and the existence of extreme data. The model first decomposes the original meteorological data into low-frequency and high-frequency components through wavelet transform and then recombines them for denoising, and then uses the LSTM network model to model and predict, and uses the meteorological indicators at future moments as the final prediction results. In dealing with the multi-volatility, nonlinearity and extreme value problems of marine meteorological data, although the existing methods have achieved certain results, it is still difficult to effectively capture multi-scale characteristics and long-term and short-term dependencies. Summary of the invention

[0005] In order to overcome the defects of the prior art, the present invention provides a method for marine meteorological time series prediction based on a DC-LSTM-Attention combined model. The technical solution of the present invention is:

[0006] A method for marine meteorological time series prediction based on a DC-LSTM-Attention combined model includes the following steps:

[0007] (1) Data screening and preprocessing: selecting data sets of marine meteorological scenes, cleaning and normalizing the data;

[0008] (2) Design a marine meteorological prediction model based on DC-LSTM-Attention, which includes a dilated convolutional layer, an LSTM layer, and an Attention layer;

[0009] (3) Model training and verification: The data is input into the trained model, and a multi-dimensional feature vector is obtained through processing. The vector is then compared with the historical features in the database to predict future marine meteorological changes.

[0010] The step (1) is specifically as follows:

[0011] In the preprocessing stage, the sliding window method is used to construct the time series input data to ensure that each time point has multiple historical observations, and the data is normalized and standardized to reduce the scale differences between different variables.

[0012] In the step (2):

[0013] The overall architecture of the DC-LSTM-Attention marine meteorological forecasting model combines the dilated convolution model, the LSTM layer and the Attention layer. In the dilated convolution model, the input marine meteorological data is first processed. By using different expansion rates, the dilated convolution can cover a wider input area while keeping the convolution kernel size unchanged, thereby enhancing the model's perception of features at different time scales.

[0014] Parameter setting: The atrous convolution layer is usually configured with several dilation rates;

[0015] The long short-term memory network LSTM layer follows the dilated convolution layer and receives its output as input. The LSTM is capable of processing and maintaining long-term dependencies in time series data, and its gating mechanism includes a forget gate, an input gate, and an output gate.

[0016] The attention layer is located after the LSTM and weights and selectively focuses on the output of the LSTM.

[0017] The LSTM layer of the long short-term memory network improves the hidden layer in the RNN, and adds three gate control units in the hidden layer to control the self-loop. The forget gate uses the Sigmoid activation function to convert the memory cells of the previous moment and the input of the current moment t into a value of 0 to 1. 0 means discarding all information, and 1 means retaining all information. This value determines how much information is retained. The forget gate f t The calculation formula is:

[0018] f t =σ(W f [h t-1 , x t ]+b f ), where: σ is the Sigmoid function; W f is the weight matrix of the forget gate; h t-1 is the output neuron; x t is the input neuron at the current moment; b f is the forget gate bias term;

[0019] The input gate has two parts: the first part is the sigmoid layer, which determines the state of the updated memory cell; the second part is the tanh layer, which creates a new candidate memory cell state. t The calculation formula is: t =σ(W I [h t-1 , x t ]+b I );C t =tanh(W c [h t-1 , xt ]+b c );

[0020]

[0021] Where: W I is the input gate weight matrix; b I , b c are the bias terms of the input gate and the cell state respectively; is the alternative update information; tanh is the activation function; W c is the memory cell weight matrix; C t is the state of memory cells;

[0022] The output gate determines the output value of the unit state. The Sigmoid layer is used to determine which part is output, and then it is processed by tanh and multiplied by the output of the Sigmoid function. t The calculation formula is: t =σ(W0[h t-1 , x t ]+b0);h t =O t tanh C t ;Where: W0 is the output gate weight matrix; b0 is the output gate bias term.

[0023] The formula of the dilated convolution is expressed as:

[0024] Where: x(i) represents the i-th data point in the input sequence; w(k) represents the k-th weight of the convolution kernel; d represents the dilation rate, that is, the jump step between convolution kernel elements; k represents the index of the convolution kernel; the receptive field refers to the area covered by the convolution layer in the input data. For the dilated convolution, the receptive field size is: (k-1)*d+1; k is the size of the convolution kernel, and d is the dilation rate; the dilation rate d determines the size of the receptive field; when d=1, the dilated convolution degenerates to the standard convolution; when d=2, each convolution kernel element will skip one input value; when d=4, each convolution kernel element will skip three input values.

[0025] The calculation method of the attention layer is:

[0026] First, the attention layer calculates the similarity S between the tth hidden state in the encoder and the hidden state of each encoder. ti ,The higher the score, the higher the attention and the greater the weight;

[0027] Then the similarity coefficient is normalized by softmax to obtain the normalized attention vector αti ; On this basis, calculate the hidden layer state and attention weight α ti The product F;

[0028] Finally, the network obtains the output h of the attention layer with different importance levels. t , the specific calculation method is as follows:

[0029] S ti =V tanh)Wh t +Uh t +b), i=1, 2, 3...t-1;

[0030]

[0031] ht = Attention(F,h t , x t ).

[0032] The step (3) is specifically as follows:

[0033] The root mean square error is used as the main loss function to optimize the model, and the proportion of errors in different percentage ranges is used on the validation set to evaluate the performance of the model; specifically:

[0034] 3.1 Training phase: During the training process, RMSE is used as a loss function to optimize the parameters of the model. RMSE is a commonly used indicator for evaluating the difference between the model's predicted value and the true value. Its formula is as follows: in:

[0035] is the value predicted by the model, y i is the actual value, n is the number of samples;

[0036] RMSE reflects the overall error of the model prediction. The smaller the value, the better the prediction performance of the model.

[0037] 3.2 Validation phase: In addition to observing the RMSE value on the validation set, the following indicators are introduced to evaluate the accuracy of the model prediction value to more intuitively demonstrate the actual performance of the model;

[0038] The proportion of samples with an error within 1% is the proportion of samples with a relative error between the predicted value and the true value within 1%. This indicator reflects the performance of the model under high precision.

[0039] The proportion of samples with an error within 3% is the proportion of samples with a relative error between the predicted value and the true value within 3%. This indicator measures the possible performance of the model in practical applications.

[0040] The proportion of samples with an error within 5% is the proportion of samples with a relative error between the predicted value and the true value within 5%. This range is generally considered to be a reasonable prediction accuracy requirement.

[0041] The proportion of errors within 10% is the proportion of samples whose relative errors between the predicted value and the true value are within 10%.

[0042] The proportion of errors within 15% is the proportion of samples whose relative errors between the predicted value and the true value are within 15%.

[0043] 3.3 Calculation method on the validation set: Assume that the predicted value and the actual value are and i , the calculation formula of relative error is:

[0044]

[0045] For each sample, calculate the relative error and count the proportion of samples with relative errors within 1%, 3%, 5%, 10%, and 15%;

[0046] 3.4 Experimental steps:

[0047] Model training: Optimize the model through RMSE on the training set and adjust the model parameters until the loss function reaches the optimal value.

[0048] Validation set test: Calculate the prediction results on the validation set, evaluate the RMSE and the proportions within different error ranges, and understand the performance of the model in practical applications.

[0049] The advantages of the present invention are as follows: the DC-LSTM-Attention model expands the receptive field through dilated convolution (DC) to better capture features of different scales. LSTM effectively models long-term dependencies in time series and improves the ability to predict periodic changes. The Attention mechanism further enhances the adaptability of the model, enabling it to dynamically adjust the attention to different time steps and features, and optimizes the prediction performance under complex data. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 It is a schematic diagram of the process of the present invention.

[0051] Figure 2 This is the overall structure diagram of the DC-LSTM-Attention of the present invention.

[0052] Figure 3 It is the LSTM structure diagram of the present invention.

[0053] Figure 4 This is a diagram of the hole convolution structure of the present invention.

[0054] Figure 5 It is the Attention structure diagram of the present invention. DETAILED DESCRIPTION

[0055] The present invention will be further described below in conjunction with specific embodiments, and the advantages and features of the present invention will become clearer as the description proceeds. However, these embodiments are exemplary only and do not constitute any limitation to the scope of the present invention. It should be understood by those skilled in the art that the details and forms of the technical solution of the present invention may be modified or replaced without departing from the spirit and scope of the present invention, but these modifications and replacements all fall within the scope of protection of the present invention.

[0056] See also Figures 1 to 5 The present invention relates to a method for marine meteorological time series prediction based on a DC-LSTM-Attention combined model, comprising the following steps:

[0057] (1) Data screening and preprocessing: select the data set of marine meteorological scenes, which contains meteorological observation values ​​in time series, such as SST, Hs, Hmax, etc., and clean and normalize the data;

[0058] (2) Design a marine meteorological prediction model based on DC-LSTM-Attention, which includes a dilated convolutional layer, an LSTM layer, and an Attention layer;

[0059] The marine meteorological time series prediction algorithm based on the marine meteorological prediction model has the following difficulties:

[0060] Missing dataset features: Marine meteorological data may lack key observations in certain time periods, especially in severe weather or equipment failures. Missing data can lead to incomplete model input features, which in turn reduces the accuracy of time series forecasting.

[0061] Model weight optimization: When there is missing or noisy input meteorological data, the model needs to optimize the weight parameters to increase the focus on important time steps. How to optimize the model's weight matrix so that the model can accurately capture useful spatiotemporal features under complex marine meteorological conditions has become a key issue in model training.

[0062] The gradient vanishing or exploding problem of deep neural network models: Since the model contains multiple layers of convolution and LSTM networks, the gradient changes of deep networks are prone to vanishing or exploding when processing long time series data, resulting in numerical instability (NaN phenomenon) or high training errors during training. Effectively controlling gradient changes is the key to model training stability.

[0063] In order to solve the problems of missing data features, model weight optimization, and vanishing or exploding gradients of deep neural networks in marine meteorological time series forecasting, a DC-LSTM-Attention model was designed.

[0064] (3) Model training and verification: The data is input into the trained model, and a multi-dimensional feature vector is obtained through processing. The vector is then compared with the historical features in the database to predict future marine meteorological changes.

[0065] The step (1) is specifically as follows:

[0066] In the preprocessing stage, the sliding window method is used to construct the time series input data to ensure that each time point has multiple historical observations, and the data is normalized and standardized to reduce the scale differences between different variables.

[0067] In the step (2):

[0068] The overall architecture of the DC-LSTM-Attention marine meteorological forecasting model combines the dilated convolution model, LSTM layer and Attention layer to solve the problems of multi-scale feature extraction, long-term dependency modeling and feature weight optimization in marine meteorological time series forecasting. This multi-level combination not only improves the prediction accuracy of the model when processing complex time series data, but also effectively enhances the stability of the model in the face of high-dimensional, nonlinear and missing data environments;

[0069] Dilated Convolution (DC) expands the receptive field by introducing a dilation rate, which can effectively extract multi-scale spatiotemporal features without increasing the amount of computation. This convolution method enables the model to capture the changing trends at different time and spatial scales when facing complex marine meteorological data, thereby enhancing the representation ability of local and global information, especially in nonlinear and non-stationary data.

[0070] In the dilated convolution model, the input marine meteorological data is first processed. By using different dilation rates, the dilated convolution can cover a wider input area while keeping the convolution kernel size unchanged, thereby enhancing the model's perception of features at different time scales; Parameter setting: The dilated convolution layer is usually configured with several dilation rates, such as 1, 2, 4, and 8. Such a setting allows the convolution kernel to cover a wider input area without increasing the number of parameters. For example, a 3x3 convolution kernel, when the dilation rate is 2, actually covers an input area of ​​5x5, but only uses 9 weight parameters instead of 25;

[0071] As the core module for time series data processing, the long short-term memory network (LSTM) is good at capturing long-term dependencies in data. Through mechanisms such as memory cells, forget gates, input gates, and output gates, it can effectively alleviate the gradient vanishing and gradient exploding problems encountered by traditional RNNs when processing long time series. This enables LSTM to better understand long-term periodic changes in meteorological data (such as seasonal climate change), thereby improving prediction accuracy.

[0072] The described long short-term memory network LSTM layer follows the dilated convolutional layer and receives its output as input. LSTM is able to process and maintain long-term dependencies in time series data. Its gating mechanism includes a forget gate, an input gate, and an output gate, allowing the network to learn which information in the time series is important and which can be ignored. This processing step is particularly critical for understanding complex patterns in marine meteorological data, such as seasonal changes and long-term trends.

[0073] In addition, the introduction of the Attention mechanism makes the model more flexible in the process of time series modeling. By calculating the attention weights of different time steps, the Attention mechanism can dynamically adjust the model's attention to the input data. For key time steps or important features, the Attention mechanism gives them greater weight, while for missing or noisy data, the Attention mechanism effectively reduces their impact, thereby improving the robustness of the model. The Attention mechanism not only enhances the model's ability to handle abnormal data, but also performs well in dealing with missing data and uncertainty.

[0074] The attention layer is located after the LSTM and weights and selectively focuses on the output of the LSTM.

[0075] The overall architecture of the DC-LSTM-Attention model solves the problems of multi-scale feature extraction, long-term dependency modeling, and feature weight optimization in marine meteorological time series forecasting by closely combining dilated convolution, LSTM, and Attention mechanisms. This multi-level combination not only improves the prediction accuracy of the model when processing complex time series data, but also effectively enhances the stability of the model in the face of high-dimensional, nonlinear, and missing data environments.

[0076] After the DC-LSTM-Attention model processes the data, the shape of the data changes at each stage.

[0077] 1. Input layer:

[0078] Shape: (N, T, F)

[0079] Note: The input data is time series data, where N is the batch size, T is the time step, and F is the feature dimension of each time step.

[0080] 2. Preprocessing:

[0081] shape: Note: This stage includes operations such as standardization and missing value processing. The data shape does not change and still maintains (N, T′, F dc ).

[0082] 3. Dilated Convolutional Layer (DC)

[0083] Shape change: (N, T′, F dc )

[0084] Note: Atrous convolution extracts multi-scale features through different dilation rates. Assuming the convolution kernel size is k and the dilation rate is r, the time dimension T will be reduced to The feature dimension F dc Will vary depending on the number of convolution kernels.

[0085] For example, if multi-channel convolution is applied, the feature dimension may increase.

[0086] If the convolution kernel size k = 3 and the dilation rate r = 2, T′ will decrease.

[0087] 4.LSTM layer:

[0088] Shape change: (N, T′, H)

[0089] Note: LSTM processes time series data and can capture long-term and short-term dependencies. Here, H represents the number of hidden layer units of LSTM, also known as the number of output features. After LSTM processing, the time step remains T′ and the feature dimension is updated to H. LSTM can be stacked in multiple layers. In this case, the output shape remains unchanged and is still (N, T′, H), but higher-order time series features are further extracted in each stacked layer.

[0090] 5. Attention layer:

[0091] Shape change: (N, T′, H)

[0092] Note: The attention mechanism weights the output of LSTM. The Attention layer assigns weights based on the importance of each time step and performs a weighted sum. Although Attention processes the time series, the output shape remains (N, T′, H). This step mainly enhances the model's attention to important time points without changing the shape of the data.

[0093] 6. Fully connected layer:

[0094] Shape change: (N, H fc )

[0095] Note: The output of the attention layer is weighted and summed over time steps before being passed to the fully connected layer for prediction. This process compresses the time dimension T′ to 1 (i.e., eliminates the time dimension), while the output feature dimension is proportional to the number of neurons in the fully connected layer H. fc For example, if the number of neurons in the fully connected layer is 64, the output shape is (N, 64).

[0096] 7. Output layer:

[0097] Shape change: (N, T output )

[0098] Note: Finally, the output layer processes the results of the fully connected layer and predicts the future T output The meteorological series data of time steps. Assuming we predict 3 time steps in the future, the shape of the final output is (N, 3).

[0099] The LSTM layer of the long short-term memory network improves the hidden layer in the RNN, and adds three gate control units in the hidden layer to control the self-loop. The forget gate uses the Sigmoid activation function to convert the memory cells of the previous moment and the input of the current moment t into a value of 0 to 1. 0 means discarding all information, and 1 means retaining all information. This value determines how much information is retained. The forget gate f t The calculation formula is:

[0100] f t =σ(W f [h t-1 , x t ]+b f ), where: σ is the Sigmoid function; W f is the weight matrix of the forget gate; h t-1 is the output neuron; x t is the input neuron at the current moment; b f is the forget gate bias term;

[0101] The input gate has two parts: the first part is the sigmoid layer, which determines the state of the updated memory cell; the second part is the tanh layer, which creates a new candidate memory cell state. t The calculation formula is: i =σ(W[h t-1 , x t ]+b I );C t=tanh(W c [h t-1 , x t ]+b c );

[0102]

[0103] Where: W I is the input gate weight matrix; b I , b c are the bias terms of the input gate and the cell state respectively; is the alternative update information; tanh is the activation function; W c is the memory cell weight matrix; C t is the state of memory cells;

[0104] The output gate determines the output value of the unit state. The Sigmoid layer is used to determine which part is output, and then it is processed by tanh and multiplied by the output of the Sigmoid function. t The calculation formula is: t =σ(W0[h t-1 , x t ]+b0);h t =O t tanhC t ;Where: W0 is the output gate weight matrix; b0 is the output gate bias term.

[0105] The formula of the dilated convolution is expressed as:

[0106] Where: x(i) represents the i-th data point in the input sequence; w(k) represents the k-th weight of the convolution kernel; d represents the dilation rate, that is, the jump step between convolution kernel elements; k represents the index of the convolution kernel; the receptive field refers to the area covered by the convolution layer in the input data. For the dilated convolution, the receptive field size is: (k-1)*d+1; k is the size of the convolution kernel, and d is the dilation rate; the dilation rate d determines the size of the receptive field; when d=1, the dilated convolution degenerates to the standard convolution; when d=2, each convolution kernel element will skip one input value; when d=4, each convolution kernel element will skip three input values.

[0107] In the DC-LSTM architecture, the dilated convolution extracts multi-scale features of the input time series data through multiple layers of operations with different expansion rates (such as d = 1, d = 2, d = 4), capturing local, short-term and long-term dependencies. These multi-scale features are passed to the LSTM layer, and the LSTM models the long-term dependencies in the time series through its memory units. Finally, the output of the LSTM is used to generate predictions for future time series data to improve the prediction effect.

[0108] Application of DC+LSTM in time series prediction:

[0109] Suppose we have a time series data x = {x1, x2, .....x T}, the goal is to predict the future value x T+1 , x T+2 ……. The prediction process is as follows:

[0110] Input data processing: Apply multiple layers of dilated convolution to the input data. Assume that the first layer uses a convolution kernel with a dilation rate of d = 1, the second layer uses a dilation rate of d = 2, and the third layer uses d = 4 to extract features on different time scales. Through this design, the model can focus on both short-term fluctuations and long-term trends.

[0111] Convolutional layer output: The convolutional output of each layer represents the feature representation under different expansion rates. Suppose we have:

[0112]

[0113] The outputs of different convolutional layers can be combined to form a feature vector Y = {y1, y2, y4}, which represents the features at different time scales.

[0114] Passing into LSTM: The feature vector Y is used as the input of LSTM, and LSTM captures the long-term and short-term dependencies in the time series through its memory cells.

[0115] Prediction Output: Finally, the output of the LSTM is used to generate predictions for future values.

[0116] The attention mechanism was first applied to the field of image processing. It changes the traditional encoder-decoder structure. The traditional decoder gives equal weight to each input of the model. However, in actual situations, different inputs are often of different importance. Selectively focusing on important information in the input will improve the performance and generalization ability of the model. By introducing the attention mechanism, the similarity between each element in the neural network sequence and other elements is calculated, and these similarities are normalized into attention weights. Then, each element is weighted and summed with the corresponding attention weight to obtain the output of the attention mechanism. Here, the attention mechanism is a weighted sum of all hidden layer vectors output by LSTM. The weight size can be understood as "the importance of features at different time points."

[0117] The calculation method of the attention layer is:

[0118] First, the attention layer calculates the similarity S between the tth hidden state in the encoder and the hidden state of each encoder. ti ,The higher the score, the higher the attention and the greater the weight;

[0119] Then the similarity coefficient is normalized by softmax to obtain the normalized attention vector α ti ; On this basis, calculate the hidden layer state and attention weight α ti The product F;

[0120] Finally, the network obtains the output h of the attention layer with different importance levels. t The specific calculation method is as follows: S ti =V tanh(Wh t +Uh i +b), i=1, 2, 3...t-1;

[0121]

[0122] h i =Attention(F, h t , x i ).

[0123] The step (3) is specifically as follows:

[0124] The root mean square error (RMSE) is used as the main loss function to optimize the model, and the performance of the model is evaluated on the validation set using the ratio of errors in different percentage ranges; specifically:

[0125] 3.1 Training phase: During the training process, RMSE is used as a loss function to optimize the parameters of the model. RMSE is a commonly used indicator for evaluating the difference between the model's predicted value and the true value. Its formula is as follows: in:

[0126] is the value predicted by the model, y i is the actual value, n is the number of samples;

[0127] RMSE reflects the overall error of the model prediction. The smaller the value, the better the prediction performance of the model.

[0128] 3.2 Validation phase: In addition to observing the RMSE value on the validation set, the following indicators are introduced to evaluate the accuracy of the model prediction value to more intuitively show the actual performance of the model. These indicators can help us understand the accuracy of the model within different error ranges;

[0129] The proportion of samples with an error within 1% is the proportion of samples with a relative error between the predicted value and the true value within 1%. This indicator reflects the performance of the model under high precision.

[0130] The proportion of samples with an error within 3% is the proportion of samples with a relative error between the predicted value and the true value within 3%. This indicator measures the possible performance of the model in practical applications.

[0131] The proportion of samples with an error within 5% is the proportion of samples with a relative error between the predicted value and the true value within 5%. This range is generally considered to be a reasonable prediction accuracy requirement.

[0132] The proportion of errors within 10% is the proportion of samples whose relative errors between the predicted value and the true value are within 10%.

[0133] The proportion of errors within 15% is the proportion of samples whose relative errors between the predicted value and the true value are within 15%.

[0134] 3.3 Calculation method on the validation set: Assume that the predicted value and the actual value are and i , the calculation formula of relative error is:

[0135]

[0136] For each sample, calculate the relative error and count the proportion of samples with relative errors within 1%, 3%, 5%, 10%, and 15%;

[0137] 3.4 Experimental steps:

[0138] Model training: Optimize the model through RMSE on the training set and adjust the model parameters until the loss function reaches the optimal value.

[0139] Validation set test: Calculate the prediction results on the validation set, evaluate the RMSE and the proportions within different error ranges, and understand the performance of the model in practical applications.

[0140] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. A method for marine meteorological time series prediction based on DC-LSTM-Attention combined model, It is characterized in that The following steps are involved: (1) Data screening and preprocessing: selecting data sets of marine meteorological scenes, cleaning and normalizing the data; (2) Design a marine meteorological prediction model based on DC-LSTM-Attention, which includes a dilated convolutional layer, an LSTM layer, and an Attention layer; (3) Model training and verification: The data is input into the trained model, and a multi-dimensional feature vector is obtained through processing. The vector is then compared with the historical features in the database to predict future marine meteorological changes.

2. The method for marine meteorological time series prediction based on the DC-LSTM-Attention combined model according to claim 1, It is characterized in that The step (1) is specifically as follows: In the preprocessing stage, the sliding window method is used to construct the time series input data to ensure that each time point has multiple historical observations, and the data is normalized and standardized to reduce the scale differences between different variables.

3. The method for marine meteorological time series prediction based on the DC-LSTM-Attention combined model according to claim 1 or 2, It is characterized in that In the step (2): The overall architecture of the DC-LSTM-Attention marine meteorological forecasting model combines the dilated convolution model, the LSTM layer and the Attention layer. In the dilated convolution model, the input marine meteorological data is first processed. By using different dilation rates, the dilated convolution covers a wider input area while keeping the convolution kernel size unchanged, thereby enhancing the model's perception of different time scale features; the dilated convolution layer is usually configured with several dilation rates; The long short-term memory network LSTM layer follows the dilated convolution layer and receives its output as input. The LSTM is capable of processing and maintaining long-term dependencies in time series data, and its gating mechanism includes a forget gate, an input gate, and an output gate. The attention layer is located after the LSTM and weights and selectively focuses on the output of the LSTM.

4. The method for marine meteorological time series prediction based on the DC-LSTM-Attention combined model according to claim 3, It is characterized in that The LSTM layer of the long short-term memory network improves the hidden layer in the RNN, and adds three gate control units in the hidden layer to control the self-loop. The forget gate uses the Sigmoid activation function to convert the memory cells of the previous moment and the input of the current moment t into a value of 0 to 1. 0 means discarding all information, and 1 means retaining all information. This value determines how much information is retained. The forget gate f t The calculation formula is: f t =σ(W f [h t-1 , x t ]+b f ), where: σ is the Sigmoid function; W f is the weight matrix of the forget gate; h t-1 is the output neuron; x t is the input neuron at the current moment; b f is the forget gate bias term; The input gate has two parts: the first part is the sigmoid layer, which determines the state of the updated memory cell; the second part is the tanh layer, which creates a new candidate memory cell state. t The calculation formula is: t =σ(W I [h t-1 , x t ]+b I );C t =tanh(W c [h t-1 , x t ]+b c ); Where: W I is the input gate weight matrix; b I , b c are the bias terms of the input gate and the cell state respectively; is the alternative update information; tanh is the activation function; W c is the memory cell weight matrix; C t is the state of memory cells; The output gate determines the output value of the unit state. The Sigmoid layer is used to determine which part is output, and then it is processed by tanh and multiplied by the output of the Sigmoid function. t The calculation formula is: Q t =σ(W o [h t-1 , x t ]+b 0 );h t =O t tanhC t ;W 0 is the output gate weight matrix; b 0 is the output gate bias term.

5. The method for marine meteorological time series prediction based on the DC-LSTM-Attention combined model according to claim 4, It is characterized in that The formula of the dilated convolution is expressed as: Where: x(i) represents the i-th data point in the input sequence; w(k) represents the k-th weight of the convolution kernel; d represents the dilation rate, that is, the jump step between convolution kernel elements; k represents the index of the convolution kernel; the receptive field refers to the area covered by the convolution layer in the input data. For the dilated convolution, the receptive field size is: (k-1)*d+1; k is the size of the convolution kernel, and d is the dilation rate; the dilation rate d determines the size of the receptive field; when d=1, the dilated convolution degenerates into a standard convolution; when d=2, each convolution kernel element will skip one input value; when d=4, each convolution kernel element will skip three input values.

6. The method for marine meteorological time series prediction based on the DC-LSTM-Attention combined model according to claim 4, It is characterized in that The calculation method of the attention layer is: First, the attention layer calculates the similarity S between the tth hidden state in the encoder and the hidden state of each encoder. ti ,The higher the score, the higher the attention and the greater the weight; Then the similarity coefficient is normalized by softmax to obtain the normalized attention vector α ti ; On this basis, calculate the hidden layer state and attention weight α ti The product F; Finally, the network obtains the output h of the attention layer with different importance levels. t , the specific calculation method is as follows: S ti =Vtanh(Wh t +Uh i +b),i=1,2,3.....t-1; h t =Attention(F,h t ,x t )。 7. The method for marine meteorological time series prediction based on the DC-LSTM-Attention combined model according to claim 1, It is characterized in that The step (3) is specifically as follows: The root mean square error is used as the main loss function to optimize the model, and the proportion of errors in different percentage ranges is used on the validation set to evaluate the performance of the model; specifically: 3.1 Training phase: During the training process, RMSE is used as a loss function to optimize the parameters of the model. RMSE is a commonly used indicator for evaluating the difference between the model's predicted value and the true value. Its formula is as follows: in: is the value predicted by the model, y i is the actual value, n is the number of samples; RMSE reflects the overall error of the model prediction. The smaller the value, the better the prediction performance of the model. 3.2 Validation phase: In addition to observing the RMSE value on the validation set, the following indicators are introduced to evaluate the accuracy of the model prediction value to more intuitively demonstrate the actual performance of the model; The proportion of samples with an error within 1% is the proportion of samples with a relative error between the predicted value and the true value within 1%. This indicator reflects the performance of the model under high precision. The proportion of samples with an error within 3% is the proportion of samples with a relative error between the predicted value and the true value within 3%. This indicator measures the possible performance of the model in practical applications. The proportion of samples with an error within 5% is the proportion of samples with a relative error between the predicted value and the true value within 5%. This range is generally considered to be a reasonable prediction accuracy requirement. The proportion of errors within 10% is the proportion of samples whose relative errors between the predicted value and the true value are within 10%. The proportion of errors within 15% is the proportion of samples whose relative errors between the predicted value and the true value are within 15%. 3.3 Calculation method on the validation set: Assume that the predicted value and the actual value are and i , the calculation formula of relative error is: For each sample, calculate the relative error and count the proportion of samples with relative errors within 1%, 3%, 5%, 10%, and 15%; 3.4 Experimental steps: Model training: Optimize the model through RMSE on the training set and adjust the model parameters until the loss function reaches the optimal value. Validation set test: Calculate the prediction results on the validation set, evaluate the RMSE and the proportions within different error ranges, and understand the performance of the model in practical applications.

Citation Information

Cited By

  • Improved atmospheric weighted average temperature modeling method

    CN119670580A

  • New energy power price management method and system based on artificial intelligence

    CN119941448A

  • Photovoltaic power station generating capacity prediction method based on artificial intelligence

    CN120598126A

  • Electric power engineering construction environment real-time monitoring method

    CN121072593A

  • Strip mine area temperature prediction method and system based on distributed optical fiber temperature sensing

    CN121275174A