An AI-based method for predicting meteorological disasters
By combining Bi-LSTM and MLP deep learning models, the problems of large errors and poor robustness in marine meteorological disaster prediction are solved, achieving high-precision and flexible meteorological data prediction, which is applicable to marine meteorological services in multiple fields.
Patent Information
- Application Number
- CN202411330011.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2026-11-10
- Estimated Expiration
- 2044-09-24
AI Technical Summary
Existing methods for predicting marine meteorological disasters suffer from large errors, poor robustness, and insufficient flexibility when dealing with complex nonlinear problems. In particular, they struggle to accurately capture the temporal and spatial dependencies in the prediction of marine meteorological data.
A deep learning model combining a bidirectional long short-term memory network (Bi-LSTM) and a multilayer perceptron (MLP) is employed. Bi-LSTM captures the dynamic features of time series, while MLP models the nonlinear relationships between features. By weighted fusion of the outputs of the two models, high-precision prediction is achieved.
It improves the prediction accuracy and robustness of marine meteorological data, enhances the flexibility and adaptability of the model, and can achieve better prediction performance under different data environments. It is applicable to fields such as marine meteorology, environmental monitoring, and meteorological disaster early warning.
Smart Images

Figure CN119167036B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to an AI-based method for predicting meteorological disasters, belonging to the field of marine meteorological data analysis and prediction. Background Technology
[0002] With the intensification of global climate change, the importance of marine meteorological disaster prediction is becoming increasingly prominent. Marine meteorological data is not only crucial for the protection of marine ecosystems, research on climate change, and marine transportation and fisheries management, but also directly impacts human daily life and economic activities. Therefore, developing accurate and efficient methods for marine meteorological disaster prediction has a profound impact on ensuring the safety and sustainable development of human activities. Zhang Feifei studied the regression and prediction of marine meteorological elements, including wind speed, temperature, air pressure, relative humidity, rainfall, and visibility data, and proposed a marine meteorological prediction model based on a spatiotemporal data model. Wang Shengzheng et al. proposed an alternating sparse autoencoder (ASAE) network model based on the sparse autoencoder (SAE) network model, constructing a prediction framework for the impact of marine meteorology on ship speed. Li Tianbao et al. have made significant progress in predicting extreme marine weather phenomena using deep learning algorithms. They introduced artificial intelligence-based prediction algorithms using El Niño, typhoons, and short-term rainfall as examples, and analyzed the advantages and disadvantages of these algorithms. Existing marine meteorological prediction methods are shown below.
[0003] Current weather forecasting techniques are mainly divided into empirical statistical methods, dynamic analysis, and model output statistical methods, which are based on traditional meteorology and statistics.
[0004] (1) The empirical statistical method involves a comprehensive and systematic statistical analysis of the historical changes of meteorological elements, combined with the influence of relevant factors, to summarize certain patterns of change and determine the prediction equations for local meteorological elements. It is an empirical statistical method based on mathematical statistics. Its characteristics include a long calculation process, detailed statistical analysis, and simple operation. However, this method has obvious limitations: it lacks specific analysis of the internal evolution of the meteorological system, only makes rough estimates, and cannot provide detailed changes and results. Therefore, it contains a large element of subjective judgment and is prone to significant errors.
[0005] (2) Dynamic analysis uses physical and mathematical tools to study the dynamic and thermodynamic changes involved in atmospheric motion and the evolution of meteorological systems. This analysis typically includes two main directions: low-temperature thermodynamics and the lunar dynamic extension method. Low-temperature thermodynamics introduces water and heat balance equations to construct mathematical models to describe the state changes of meteorological systems and the basic physical laws they follow. Research in this field is relatively mature and has achieved extensive results in engineering applications. The lunar dynamic extension method combines dynamic and statistical methods to establish statistical models by analyzing the correlation between circulation characteristics and meteorological elements. This method was proposed for my country's specific geographical environment. Although relatively new, many numerical experiments have been conducted in the field of meteorological forecasting. However, dynamic analysis also has certain limitations, such as being constrained by the accuracy of model forecasts and the size of samples. It still needs further improvement and refinement in practical applications.
[0006] (3) Model Output Statistical Method: This method uses probabilistic statistical methods to study historical observation data of a large number of meteorological elements, analyze the statistical laws of climate change, establish reasonable prediction models, and predict future weather conditions through statistical mathematical models. Originating in my country, this method has become one of the most widely used techniques in domestic meteorological research. Its core is based on time series analysis, constructing prediction models through historical meteorological observation data. In the modeling process, in addition to mastering the basic characteristics and attributes of the data, it is also necessary to select prediction factors with physical significance that are relevant to the prediction from numerous meteorological elements. Since meteorological data is a nonlinear time series, the randomness caused by changes within the data also needs to be considered, so the analysis method is different from that of traditional data. The characteristic of nonlinear time series is that the correlation of observation data changes with the time dimension and the order of data delay. Meteorological prediction technology based on time series models utilizes these characteristics to predict future weather conditions through the analysis of historical data.
[0007] In recent years, the rapid development of deep learning technology has provided new insights into marine meteorological disaster prediction. Traditional meteorological disaster prediction methods typically rely on physical models and statistical methods, which require massive amounts of observational data and computational resources. However, deep learning methods, by learning from vast amounts of historical data, can make predictions efficiently without relying on complex physical models. Therefore, deep learning technology has demonstrated great potential in solving complex nonlinear problems in marine meteorological disaster prediction.
[0008] (1) Application of time series prediction models: Recurrent Neural Networks (RNN), Long Short-Term Memory Networks (LSTM), and their improved versions, such as Bi-LSTM and models with attention mechanisms, in deep learning have shown good performance in processing marine meteorological data. They can capture long-term dependencies, especially in the prediction of time series features such as wave height, sea surface temperature, and wind speed, where they have high accuracy.
[0009] (2) Multimodal data fusion: Marine meteorological disaster prediction typically requires the integration of multiple data sources, such as marine observation data, satellite remote sensing data, and weather forecast data. Deep learning models, especially convolutional neural networks (CNNs) and multilayer perceptrons (MLPs), are used to integrate these multi-source data, thereby improving the accuracy of predictions. These models, through feature extraction and data fusion, are able to better capture complex marine meteorological patterns.
[0010] (3) Exploration of space-time modeling: In recent years, space-time models based on deep learning, such as spatiotemporal convolutional networks (ST-CNN) and spatiotemporal graph convolutional networks (ST-GCN), have been widely used in the field of marine meteorological forecasting. These models can simultaneously consider the spatial and temporal dependencies of marine meteorological data, thereby improving the timeliness and accuracy of forecasts. Summary of the Invention
[0011] To overcome the shortcomings of existing technologies, this invention provides an AI-based method for predicting meteorological disasters. The technical solution of this invention is as follows:
[0012] An AI-based method for predicting meteorological disasters includes the following steps:
[0013] (1) Data acquisition and preprocessing: acquire historical marine meteorological data, clean and normalize the data, and correct the timestamps;
[0014] (2) Time series dataset construction: Set a fixed time step and use the multidimensional feature data of the previous n days to predict the target value of the (n+1)th day;
[0015] (3) Model design and construction: Design and construct a deep learning model that combines a bidirectional long short-term memory network (Bi-LSTM) and a multilayer perceptron (MLP). Use Bi-LSTM to extract dynamic features of time series and MLP to perform nonlinear modeling of the relationship between features. By weighted fusion of the results of the two models, the final predicted value is obtained.
[0016] (4) Model training: use backpropagation of error to update model parameters and adjust hyperparameters to optimize model performance;
[0017] (5) Model validation: Use the validation set to evaluate the model and adjust the model hyperparameters and weighting coefficients to optimize prediction performance;
[0018] (6) Model application: Apply the trained model to actual marine meteorological disaster prediction tasks.
[0019] The specific steps (1) are as follows:
[0020] 1.1 Handling missing values, outliers, and noisy data; for missing values, imputation is performed using interpolation, mean imputation, or time series-based prediction methods; for outliers, data points deviating from the normal range are identified and removed through statistical analysis and threshold setting;
[0021] 1.2 Normalize or standardize the data for each feature;
[0022] 1.3 Timestamps are corrected and standardized to ensure consistency of various feature data in the time dimension;
[0023] 1.4 Smooth the data or extract periodic components.
[0024] Step (2) specifically refers to:
[0025] The time series dataset construction steps include:
[0026] 2.1 Traverse the entire dataset to generate several input and output pairs, ensuring that the time correspondence between the input and output sequences is accurate to avoid prediction errors caused by data misalignment;
[0027] 2.2 Divide the dataset into training and testing sets. The division can be done in chronological order to avoid future data leakage into model training.
[0028] 2.3 Convert the data to tensor format.
[0029] The specific steps (3) are as follows:
[0030] 3.1 Utilizing the bidirectional nature of the Bi-LSTM network model, the correlation information between time series data is obtained. The Bi-LSTM network model simultaneously captures the forward and backward features of time series data, using past and future information to mine deep-seated patterns in the data. Specifically, the input data is a multi-dimensional feature sequence divided by time steps. The Bi-LSTM network model encodes the sequence data through two LSTM layers (forward and backward) to generate hidden states for each time step. These hidden states contain the dynamic information of the time series at different time points. 3.2 Employing an MLP model for lateral feature prediction to deeply mine the nonlinear relationships between features. The MLP model takes the multi-dimensional features of the current time step as input and learns the complex nonlinear relationships between features through multiple nonlinear transformations. The model includes an input layer, several hidden layers, and an output layer. The hidden layers use activation functions to enhance the model's expressive power.
[0031] Step (4) specifically involves the training of the model, which includes two parts: a Bi-LSTM model and an MLP model. The Bi-LSTM model is used to process time series data, while the MLP model is used to process the nonlinear relationship of the features at the current time step. The training steps are as follows:
[0032] 4.1 In Bi-LSTM, time series data is input into forward and backward LSTM layers to capture bidirectional dependencies in the time series; the output of Bi-LSTM passes through a fully connected layer to generate longitudinal prediction results.
[0033] (2) MLP processes the features of the current time step. Through a multi-layer fully connected network, MLP extracts nonlinear features layer by layer and finally generates the lateral correction result.
[0034] (3) Backpropagate the error and update each weight;
[0035] (4) Adjust the hyperparameters of the model and repeat the above steps. Compare the validation values and error values, select the optimal model, and complete the model training.
[0036] In step 3.1, the LSTM network has three gates: the forget gate, the input gate, and the output gate. The LSTM has two activation functions: σ and Tanh. σ is the Sigmoid activation function, used in the forget gate, input gate, and output gate, and is used to output [0, 1]. When generating candidate memories, the Tanh activation function is used to output [-1, 1]. The forget gate... t : Used to determine the cell state C from the previous time step t-1 The amount of information to be discarded and the amount to be retained up to the current time C t Information, f t =σ(W f [h t-1x t ]+b f ); Where: W f h is the weight matrix of the forget gate; t-1 This is the output of the hidden layer at the previous time step; x t Input data at time t; b f Here is the bias vector for the forget gate; input gate i t : Used to determine the input information x t Save to cell state C t The degree of; i t =σ(W i [h t-1 x t ]+b i ); Where: W i b is the weight matrix of the input gate; i The bias vector of the input gate; candidate states created by the tanh layer. for: In the formula: w c is the weight matrix of the current state; b is the bias vector of the current state;
[0037] Cell information update: used to calculate the cell state c at the current moment. t ,
[0038] Output gate: O t Used to control unit state C t How much information is input to the current hidden layer output value h; t =σ(W o [h t-1 x t ]+b o );h t =o t ·tanh(c i );
[0039] In the formula: b o For the bias term of the output gate; W o Let be the weight matrix of the output gate; tanh is the hyperbolic tangent activation function; tanh and σ are defined as follows:
[0040]
[0041] The Bi-LSTM network comprises two LSTM units; one LSTM unit processes the input data in the forward order of the time series; the other LSTM unit processes the input data in the reverse order of the time series; the forward LSTM and backward LSTM of the Bi-LSTM calculate the hidden state of the time series respectively, as shown in the following formula:
[0042]
[0043] In the formula, h t fw and h t bw Let x represent the hidden states for the forward and backward views, respectively. t These are input features. and It represents the hidden state of the previous and next time steps; the final hidden state is obtained by concatenating the forward and backward hidden states:
[0044] In step 3.3, the MLP input layer receives the multidimensional feature vector x at the current time step. t Its dimension is d input That is, the number of features; input feature vector x t = [x1, x2, ..., x dinput The output is passed from the first fully connected layer to the hidden layer; each hidden layer processes the output of the previous layer through a linear transformation and an activation function; assuming there are N hidden layers, the output of the i-th hidden layer is represented as:
[0045] h (i) =σW (i) h (i-1) +b (i) ), where W (i) b is the weight matrix of the i-th layer. (i) σ is the bias vector, and σ is the activation function, typically ReLU; the hidden layer consists of two neurons; through this bidirectional data processing method, the Bi-LSTM network utilizes both historical and future information, thereby enhancing its ability to learn long sequence data. Its mathematical expression is:
[0046] σ(x) = max(0, x), where in each hidden layer, the activation function maps the result of a linear combination to a nonlinear space;
[0047] The final fully connected layer outputs the final predicted value y. MLP Based on all input features x at the current time step t The overall output, with the output layer being a linear layer, is expressed by the following formula:
[0048] y MLP =W (n) h (n-1) +b (n) Among them, W (n) It is the weight matrix of the output layer, h (n-1) It is the output of the last hidden layer, b (n) It is the bias term of the output layer; the output yMLP It can be a single predicted value or a multi-dimensional prediction.
[0049] The Bi-LSTM network model is used for the longitudinal variation of the time series, and the MLP model is used for the lateral relationship of features at the current time step. By fusing the outputs of these two models, the final prediction result is obtained by adjusting the longitudinal correction value y. LSTM and lateral correction value y MLP The weighted summation formula is as follows:
[0050] y fianl =λy LSTM +(1-λ)y LMP Where λ is the fusion weight, representing the relative importance of longitudinal and lateral corrections in the final prediction; initially, λ is set to 0.5, meaning that longitudinal and lateral predictions each account for 50% of the weight.
[0051] In step (5), the optimal fusion weights are found by continuously adjusting λ on the validation set. The specific steps are as follows: Initially, λ is set to 0.5, meaning that the prediction contributions from the vertical and horizontal directions are equal; the prediction error of the model is calculated on the validation set, using the mean squared error as the evaluation index, and the formula is:
[0052] Among them, y i It is the actual value. This is the weighted fusion prediction value; based on the MSE performance on the validation set, the value of λ is adjusted, selecting the λ that minimizes the MSE; λ is optimized using grid search or cross-validation; after λ optimization, the model's predictions on the test set will use the final weighted fusion value y. final By integrating the dynamic information of time series and the nonlinear relationships between features, the overall accuracy and robustness of predictions are improved.
[0053] The advantages of this invention are:
[0054] (1) Improved Prediction Accuracy: By combining Bi-LSTM and MLP models, this invention effectively improves the prediction accuracy of marine meteorological data. Bi-LSTM can fully utilize the forward and backward information of time series and capture the dynamic dependencies in the time series, thereby enhancing the model's understanding of historical and future information. The MLP model focuses on modeling the nonlinear relationships between features and mines the complex interactions between features through multi-layer nonlinear transformations. Through a weighted fusion mechanism, this invention combines the advantages of these two models, utilizing both the dynamic changes of the time series and focusing on the feature interactions at the current time step, thereby greatly improving the accuracy of the prediction results. Experimental results show that, compared with traditional single models, the hybrid model of this invention performs excellently in complex marine meteorological disaster prediction tasks.
[0055] (2) Enhancing Model Robustness and Stability: The synergistic effect of Bi-LSTM and MLP enhances the model's robustness under different data environments. Bi-LSTM can handle potential anomalous fluctuations in time series, particularly excelling in dealing with instability and noise in marine meteorological data. MLP, on the other hand, focuses on lateral correction between features, enabling detailed nonlinear feature optimization and allowing the model to find a balance between complex relationships between features at the current time step. Because these two models process data in different dimensions, the final fusion result exhibits higher stability and noise resistance, ensuring the model's reliability in practical applications.
[0056] (3) Enhanced Model Flexibility and Wide Applicability: The model exhibits high flexibility, enabling adaptive adjustments based on specific marine meteorological disaster prediction tasks. The Bi-LSTM structure can be adjusted according to different data time spans, such as increasing or decreasing the number of LSTM layers or neurons to accommodate time series data of varying lengths. The MLP model can also adjust the depth of hidden layers and the number of neurons based on feature complexity, ensuring the full capture of relationships between nonlinear features. Furthermore, by adjusting the weighting coefficients of the weighted fusion, the model can find the optimal balance between longitudinal and lateral corrections, enabling it to achieve superior prediction performance on various datasets. This flexible structure allows the model to be widely applied in multiple fields such as marine meteorology, environmental monitoring, and meteorological disaster early warning, demonstrating excellent adaptability. Attached Figure Description
[0057] Figure 1 This is a flowchart illustrating the present invention.
[0058] Figure 2 This is a schematic diagram of the LSTM network of the present invention.
[0059] Figure 3 This is a diagram of the Bi-LSTM structure of the present invention.
[0060] Figure 4 This is the MLP network structure diagram of the present invention.
[0061] Figure 5 This is a schematic diagram of the overall structure of the Bi-LSTM and MLP horizontal and vertical correction of the present invention. Detailed Implementation
[0062] The present invention will be further described below with reference to specific embodiments, and the advantages and features of the present invention will become clearer as a result. However, these embodiments are merely exemplary and do not constitute any limitation on the scope of the present invention. Those skilled in the art should understand that modifications or substitutions can be made to the details and form of the technical solutions of the present invention without departing from the spirit and scope of the present invention, but all such modifications and substitutions fall within the protection scope of the present invention.
[0063] See Figures 1 to 4 This invention relates to an AI-based method for predicting meteorological disasters, comprising the following steps:
[0064] (1) Data Acquisition and Preprocessing: Historical marine meteorological data is acquired to provide sufficient foundational data for model training and prediction. This data includes, but is not limited to, multi-dimensional marine meteorological characteristics such as wave height, wave direction, temperature, humidity, and wind speed, ensuring the comprehensiveness and representativeness of the data. To guarantee data quality and reliability, necessary preprocessing is performed on the collected raw data, including data cleaning, normalization, and timestamp correction.
[0065] (2) Time series dataset construction: Set a fixed time step and use the multidimensional feature data of the previous n days to predict the target value of the (n+1)th day;
[0066] (3) Model design and construction: Design and construct a deep learning model that combines a bidirectional long short-term memory network (Bi-LSTM) and a multilayer perceptron (MLP). Use Bi-LSTM to extract dynamic features of time series and MLP to perform nonlinear modeling of the relationship between features. By weighted fusion of the results of the two models, the final predicted value is obtained.
[0067] (4) Model training: use backpropagation of error to update model parameters and adjust hyperparameters to optimize model performance;
[0068] (5) Model validation: Use the validation set to evaluate the model and adjust the model hyperparameters and weighting coefficients to optimize prediction performance;
[0069] (6) Model application: Apply the trained model to actual marine meteorological disaster prediction tasks.
[0070] The specific steps (1) are as follows:
[0071] 1.1 Handling missing values, outliers, and noisy data; for missing values, imputation is performed using interpolation, mean imputation, or time series-based prediction methods; for outliers, data points deviating from the normal range are identified and removed through statistical analysis and threshold setting;
[0072] 1.2 In order to eliminate the difference in the units of measurement between different features and avoid numerical instability during model training, the feature data is normalized or standardized. Commonly used methods include min-max normalization, which scales the data to the [0,1] interval, and Z-score standardization, which gives the data zero mean and unit variance.
[0073] 1.3 Meanwhile, in order to maintain the temporal continuity and accuracy of the data, the timestamps are corrected and unified to ensure the consistency of each feature data in the time dimension; for any possible duplicate or missing timestamps, they are checked and supplemented to avoid data disorder caused by time misalignment.
[0074] 1.4 In addition, considering the periodicity and seasonality of marine meteorological data, the data can be smoothed or periodic components can be extracted to provide more representative input for the model.
[0075] Following the data acquisition and preprocessing steps outlined above, a reliable and structurally complete marine meteorological dataset was obtained. This provides a solid foundation for subsequent model training and prediction, ensuring that the model can fully learn the inherent patterns and characteristics within the data, thereby improving the accuracy and stability of predictions.
[0076] Step (2) specifically refers to:
[0077] The time series dataset construction steps include:
[0078] 2.1 Traverse the entire dataset to generate several input-output pairs. The dimension of the input data is (three-dimensional tensor): number of samples × time step × number of features. The output data is the corresponding target variable sequence. This method can not only capture the short-term trend of data, but also learn the long-term time dependency. It ensures that the time correspondence between the input sequence and the output sequence is accurate and avoids prediction errors caused by data misalignment.
[0079] 2.2 To enhance the model's generalization ability, the dataset is divided into training and test sets. This division can be done chronologically to prevent future data leakage into the model training; for example, the first 80% of the data can be used as the training set, and the last 20% as the test set. To prevent overfitting, a portion of the training set can be further divided as a validation set for hyperparameter tuning and early stopping strategy development.
[0080] 2.3 Convert the data to tensor format.
[0081] The specific steps (3) are as follows:
[0082] 3.1 In the longitudinal prediction of the model, a Bi-LSTM model is constructed using preprocessed time series data. The bidirectional nature of the Bi-LSTM network model is utilized to obtain the correlation information between the preceding and following time series data. The Bi-LSTM network model simultaneously captures the forward and backward features of the time series data, using past and future information to mine deep-seated patterns in the data. Specifically, the input data is a multi-dimensional feature sequence divided by time steps. The Bi-LSTM network model encodes the sequence data through two LSTM layers (forward and backward) to generate hidden states for each time step. These hidden states contain the dynamic information of the time series at different time points.
[0083] 3.2 In terms of lateral prediction, in order to capture the lateral relationships between different features, a multilayer perceptron (MLP) model was constructed. The MLP model is used to make lateral predictions of features and to deeply explore the nonlinear relationships between features. The MLP model takes the multidimensional features of the current time step as input and learns the complex nonlinear relationships between features through multi-layer nonlinear transformation. The model includes an input layer, several hidden layers and an output layer. The hidden layers use activation functions (such as ReLU or tanh) to enhance the expressive power of the model. The output of the MLP is the lateral prediction result, which supplements the feature relationships that the Bi-LSTM model may ignore.
[0084] MLP (Multi-Layer Propagation) neural networks are a type of feedforward neural network, consisting of an input layer, at least one intermediate hidden layer, and an output layer. It minimizes the model's prediction error by adjusting neuron weights, thereby achieving both model training and result prediction. In practical applications, the model maps a set of input vectors to a set of output vectors, and different layers are fully connected; that is, any neuron in one layer is connected to all neurons in the next layer. Compared to traditional BP (BackPropagation) neural networks, which typically use the sigmoid function as the activation function, MLPs can flexibly use different activation functions, thus better handling multi-parameter nonlinear relationships. This paper uses an MLP neural network with two hidden layers.
[0085] MLP is employed for lateral feature correction, deeply exploring the nonlinear relationships between features to enhance the model's generalization ability. Through longitudinal temporal feature extraction and lateral feature optimization, high-precision prediction of marine meteorological data is achieved, meeting the needs of marine environmental monitoring, shipping safety, fisheries management, and other fields for accurate weather forecasting, thereby improving the quality and efficiency of marine meteorological services.
[0086] Step (4) specifically involves the training of the model, which includes two parts: a Bi-LSTM model and an MLP model. The Bi-LSTM model is used to process time series data, while the MLP model is used to process the nonlinear relationship of the features at the current time step. The training steps are as follows:
[0087] 4.1 In Bi-LSTM, time series data is input into forward and backward LSTM layers to capture bidirectional dependencies in the time series; the output of Bi-LSTM passes through a fully connected layer to generate longitudinal prediction results.
[0088] (2) MLP processes the features of the current time step. Through a multi-layer fully connected network, MLP extracts nonlinear features layer by layer and finally generates the lateral correction result.
[0089] (3) Backpropagate the error and update each weight;
[0090] (4) Adjust the hyperparameters of the model and repeat the above steps. Compare the validation values and error values, select the optimal model, and complete the model training.
[0091] In step 3.1, the LSTM network has three gates: the forget gate, the input gate, and the output gate. The LSTM has two activation functions: σ and Tanh. σ is the Sigmoid activation function, used in the forget gate, input gate, and output gate, and is used to output [0, 1]. When generating candidate memories, the Tanh activation function is used to output [-1, 1]. The forget gate... t : Used to determine the cell state C from the previous time step t-1 The amount of information to be discarded and the amount to be retained up to the current time C t Information, f t =σ(W f [h t-1 x t ]+b f ); Where: W f h is the weight matrix of the forget gate; t-1 This is the output of the hidden layer at the previous time step; x t Input data at time t; b f Here is the bias vector for the forget gate; input gate i t : Used to determine the input information x t Save to cell state C t The degree of; i t =σ(W i [h t-1 x t ]+b i ); Where: W i b is the weight matrix of the input gate; iThe bias vector of the input gate; candidate states created by the tanh layer. for: In the formula: w c is the weight matrix of the current state; b is the bias vector of the current state;
[0092] Cell information update: used to calculate the cell state c at the current moment. t ,
[0093]
[0094] Output gate: O t Used to control unit state C t How much information is input to the current hidden layer output value h; t =σ(W o [h t-1 x t ]+b o );h t =o t ·tanh(c t );
[0095] In the formula: b o For the bias term of the output gate; W o Let be the weight matrix of the output gate; tanh is the hyperbolic tangent activation function; tanh and σ are defined as follows:
[0096]
[0097] The described Bi-LSTM network comprises two LSTM units: Bi-LSTM can utilize both forward and backward time information simultaneously, enabling better modeling of temporal dependencies. One LSTM unit processes the input data in the forward order of the time series; the other LSTM unit processes the input data in the reverse order of the time series. The BiLSTM network structure is as follows: Figure 2 As shown. The forward LSTM and backward LSTM of Bi-LSTM calculate the hidden state of the time series, respectively, using the following formulas:
[0098]
[0099] In the formula, h t fw and h t bw Let x represent the hidden states for the forward and backward views, respectively. t These are input features. and It represents the hidden state of the previous and next time steps; the final hidden state is obtained by concatenating the forward and backward hidden states:
[0100] In step 3.3, the MLP input layer receives the multidimensional feature vector x at the current time step. t Its dimension is d input In other words, the number of features. For example, for marine meteorological data, input features might include wave height (Hs), maximum wave height (Hmax), period (Tz), sea surface temperature (SST), etc. The input feature vector x t = [x1, x2, ..., x dinput The output is passed from the first fully connected layer to the hidden layer; each hidden layer processes the output of the previous layer through a linear transformation and an activation function; assuming there are N hidden layers, the output of the i-th hidden layer is represented as:
[0101] h (i) =σ(W (i) h (i-1) +b (i) ), where W (i) b is the weight matrix of the i-th layer. (i) σ is the bias vector, and σ is the activation function, typically ReLU; the hidden layer consists of two neurons; through this bidirectional data processing method, the Bi-LSTM network utilizes both historical and future information, thereby enhancing its ability to learn long sequence data. Its mathematical expression is:
[0102] σ(x) = max(0, x), and in each hidden layer, the activation function allows the model to learn more complex feature relationships by mapping the linear combination results to a non-linear space.
[0103] The final fully connected layer outputs the final predicted value y. MLP Based on all input features x at the current time step t The overall output, typically a linear layer, is defined by the following formula:
[0104] y MLP =W (n) h (n-1) +b (n) Among them, W (m) It is the weight matrix of the output layer, h (n-1) It is the output of the last hidden layer, b (n) It is the bias term of the output layer; the output y MLP It can be a single predicted value or a multi-dimensional prediction result, depending on the target task.
[0105] MLP acts as a lateral correction tool, focusing on the nonlinear relationships between features at the current time step. Compared to the longitudinal time dependency modeling of Bi-LSTM, MLP focuses more on the interactions between features, supplementing the lateral relationships that Bi-LSTM might miss. By combining Bi-LSTM and MLP, the model can simultaneously capture dynamic features in the time dimension and the complex relationships between features, thereby improving the overall accuracy of predictions.
[0106] The Bi-LSTM network model is used for the longitudinal variation of the time series, while the MLP model is used for the lateral relationship of features at the current time step. By fusing the outputs of these two models, the advantages of both can be utilized. The final prediction result is obtained by adjusting the longitudinal correction value y. LSTM and lateral correction value y MLP The weighted summation formula is as follows:
[0107] y final =λy LSTM +(1-λ)y MLP Where λ is the fusion weight, representing the relative importance of longitudinal and lateral corrections in the final prediction; initially, λ is set to 0.5, meaning that longitudinal and lateral predictions each account for 50% of the weight.
[0108] In step (5), the optimal fusion weights are found by continuously adjusting λ on the validation set. The specific steps are as follows: Initially, λ is set to 0.5, meaning that the prediction contributions from the vertical and horizontal directions are equal; the prediction error of the model is calculated on the validation set, using the mean squared error (MSE) as the evaluation metric, with the following formula:
[0109] Among them, y i It is the actual value. This is the weighted fusion prediction value; based on the MSE performance on the validation set, the value of λ is adjusted, selecting the λ that minimizes the MSE; λ is optimized using grid search or cross-validation; after λ optimization, the model's predictions on the test set will use the final weighted fusion value y. final This fusion strategy can effectively integrate the dynamic information of time series and the nonlinear relationship between features, thereby improving the overall accuracy and robustness of prediction.
[0110] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. An AI-based method for predicting meteorological disasters, characterized in that, Includes the following steps: Step (1) Data acquisition and preprocessing: Acquire historical marine meteorological data, clean and normalize the data, and correct the timestamps; Step (2) Time series dataset construction: Set a fixed time step and use the multidimensional feature data of the previous n days to predict the target value on the (n+1)th day; Step (3) Model design and construction: Design and construct a deep learning model that combines a bidirectional long short-term memory network (Bi-LSTM) and a multilayer perceptron (MLP). Use Bi-LSTM to extract dynamic features of time series and MLP to perform nonlinear modeling of the relationship between features. By weighted fusion of the results of the two models, the final predicted value is obtained. Step (4) Model training: Update model parameters using backpropagation of error and adjust hyperparameters to optimize model performance; Step (5) Model validation: Use the validation set to evaluate the model and adjust the model hyperparameters and weighting coefficients to optimize prediction performance; Step (6) Model application: Apply the trained model to the actual task of marine meteorological disaster prediction; The Bi-LSTM network comprises two LSTM units; one LSTM unit processes the input data in the forward order of the time series; the other LSTM unit processes the input data in the reverse order of the time series; the forward LSTM and backward LSTM of the Bi-LSTM calculate the hidden state of the time series respectively, as shown in the following formula: ; In the formula, and These represent the hidden states for the forward and backward views, respectively. These are input features. and It represents the hidden state of the previous and next time steps; the final hidden state is obtained by concatenating the forward and backward hidden states: ; In step (3), the MLP input layer receives the multidimensional feature vector of the current time step. Its dimensions are That is, the number of features; Input feature vector The output is passed from the first fully connected layer to the hidden layer; each hidden layer processes the output of the previous layer through a linear transformation and an activation function; assuming there are N hidden layers, the output of the i-th hidden layer is represented as: ,in, It is the first The weight matrix of the layer, It is a bias vector. The activation function is typically ReLU; the hidden layer consists of two layers; through this bidirectional data processing method, the Bi-LSTM network utilizes both historical and future information, thereby enhancing its ability to learn from long sequences of data. Its mathematical expression is: In each hidden layer, the activation function maps the result of a linear combination to a nonlinear space; the final fully connected layer outputs the final predicted value. Based on all input features at the current time step The overall output, with the output layer being a linear layer, is expressed by the following formula: ,in, It is the weight matrix of the output layer. It is the output of the last hidden layer. It is the bias term of the output layer; output It can be a single predicted value or a multi-dimensional prediction; the Bi-LSTM network model is used for the longitudinal changes of the time series, and the MLP model is used for the lateral relationships of features at the current time step. By fusing the outputs of these two models, the final prediction result is the weighted fusion value y. final By adjusting the longitudinal correction value and lateral correction value The weighted summation formula is as follows: ;in, These are the fusion weights, representing the relative importance of longitudinal and lateral corrections in the final prediction; initially, The value is set to 0.5, meaning that the vertical and horizontal predictions each account for 50% of the weight.
2. The AI-based meteorological disaster prediction method according to claim 1, characterized in that, The specific steps (1) are as follows: 1.1 Handling missing values, outliers, and noisy data; for missing values, imputation is performed using interpolation, mean imputation, or time series-based prediction methods; for outliers, data points deviating from the normal range are identified and removed through statistical analysis and threshold setting; 1.2 Normalize or standardize the data for each feature; 1.3 Timestamps are corrected and standardized to ensure consistency of various feature data in the time dimension; 1.4 Smooth the data or extract periodic components.
3. The AI-based meteorological disaster prediction method according to claim 1 or 2, characterized in that, The specific steps (2) are as follows: The time series dataset construction steps include: 2.1 Traverse the entire dataset to generate several input and output pairs, ensuring that the time correspondence between the input and output sequences is accurate to avoid prediction errors caused by data misalignment; 2.2 Divide the dataset into training and testing sets. The division can be done in chronological order to avoid future data leakage into model training. 2.3 Convert the data to tensor format.
4. The AI-based meteorological disaster prediction method according to claim 1 or 2, characterized in that, The specific steps (3) are as follows: 3.1 Utilizing the bidirectional characteristics of the Bi-LSTM network model to obtain the correlation information between the past and future in time series data; The Bi-LSTM network model simultaneously captures the forward and backward features of time series data, using information from the past and future to mine deep-seated patterns in the data. Specifically, the input data is a multi-dimensional feature sequence divided by time steps. The Bi-LSTM network model encodes the sequence data through two LSTM layers, forward and backward, to generate the hidden state at each time step. These hidden states contain the dynamic information of the time series at different time points. 3.2 The MLP model is used to make lateral predictions of features and to deeply explore the nonlinear relationships between features. The MLP model takes the multidimensional features of the current time step as input and learns the complex nonlinear relationships between features through multi-layer nonlinear transformation. The model includes an input layer, several hidden layers and an output layer. The hidden layers use activation functions to enhance the expressive power of the model.
5. The AI-based meteorological disaster prediction method according to claim 4, characterized in that, The specific steps (4) are as follows: the training of the model includes two parts: Bi-LSTM model and MLP model; Bi-LSTM is used to process time series data, while MLP is used to process the nonlinear relationship of the features at the current time step; The training steps are as follows: 4.1 In Bi-LSTM, time series data is fed into forward and backward LSTM layers to capture bidirectional dependencies in the time series; The output of Bi-LSTM is passed through a fully connected layer to generate vertical prediction results; (2) MLP processes the features of the current time step. Through a multi-layer fully connected network, MLP extracts nonlinear features layer by layer and finally generates the lateral correction result. (3) Backpropagate the error and update each weight; (4) Adjust the hyperparameters of the model and repeat the above steps. Compare the validation value and error value, select the optimal model, and complete the model training.
6. The AI-based meteorological disaster prediction method according to claim 4, characterized in that, In step 3.1, the LSTM network has three gates: a forget gate, an input gate, and an output gate. The LSTM also has two activation functions: Tanh; among them, The sigmoid activation function is used in the forget gate, input gate, and output gate. The output is [0, 1]; while when generating candidate memories, the Tanh activation function is used to output [-1, 1]; the forget gate Used to determine the cell state from the previous time step. The amount of information that should be discarded and retained up to the current time. Information, In the formula: Here is the weight matrix for the forget gate; This is the output of the hidden layer at the previous time step; for Input data continuously; The bias vector for the forget gate; the input gate. Used to determine input information Save to cell state The degree of; In the formula: This is the weight matrix of the input gate; The bias vector for the input gate; Candidate states created by the layer for: In the formula: This is the weight matrix for the current state; This is the bias vector for the current state; Cell information update: used to calculate the cell state at the current moment. , ; Output gate: Used to control unit status How much information is input to the current hidden layer output value? ; ; In the formula: This is the bias term for the output gate; This is the weight matrix of the output gate; It is the hyperbolic tangent activation function; and The definition of is: ; 。 7. The AI-based meteorological disaster prediction method according to claim 1, characterized in that, In step (5), by continuously adjusting on the validation set To find the optimal fusion weights, the specific steps are as follows: Initially, set... That is, the prediction contributions from the longitudinal and lateral directions are equal; the prediction error of the model is calculated on the validation set, using the mean squared error as the evaluation metric, as shown in the formula: ;in, It is the actual value. These are the weighted fusion predictions; adjusted based on MSE performance on the validation set. Choose the value that minimizes MSE. Optimize using grid search or cross-validation methods. ;when After optimization, the model's predictions on the test set will use the final weighted fusion value. By integrating the dynamic information of time series and the nonlinear relationships between features, the overall accuracy and robustness of predictions are improved.
