A method and device for quickly predicting typhoon paths based on fusion model
By combining the Att-LSTM combination model, similar path prediction model and Xgboost model, the problem of low typhoon path prediction accuracy is solved, and fast and accurate typhoon path prediction is achieved, reducing computing resource consumption and prediction errors.
Patent Information
- Application Number
- CN202111430414.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-29
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2041-11-29
AI Technical Summary
The existing typhoon path prediction methods have problems such as low prediction accuracy and high computing resource consumption, especially the method based on ensemble forecasting and the prediction effect of a single model is poor, making it difficult to achieve fast and accurate typhoon path prediction.
The combination model of the long and short-term memory neural network (Att-LSTM) based on attention mechanism is used to fuse it with the similar path prediction model, and the secondary fusion is combined with the Xgboost model. Historical typhoon data is used for training and prediction. The local information is extracted through the Att-LSTM model and the similar path method are obtained, and local information is organically fused to improve prediction accuracy.
The rapid and accurate prediction of typhoon paths is achieved. The prediction time of a single typhoon takes only a few seconds, which significantly reduces the prediction error, improves the prediction accuracy and efficiency, and can provide reference before the release of the numerical forecast results of the meteorological department, reducing the prediction error.
Smart Images

Figure CN114266384B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of meteorological science disaster prevention and reduction and meteorological forecasting, and specifically relates to a method and device for quickly predicting typhoon paths based on a fusion model. Background Art
[0002] Rapid and accurate prediction of a typhoon's trajectory is crucial to minimizing harm to coastal residents and reducing economic losses. Typhoons occur over a wide range of locations, so timely forecasts of their paths are crucial.
[0003] The current mainstream forecasting approach relies on ensemble forecasting to predict typhoon paths. This requires collecting observational data from multiple stations and integrating forecasts from different dynamic models or institutions through assimilation and other models for operational forecasting. However, due to model operation, data transmission, and complex post-processing, data acquisition is subject to lags and requires significant computing resources and time. Another approach, similarity methods or neural network methods based on statistical data, only focus on certain characteristics of the data. A single model cannot achieve good prediction results, resulting in low accuracy. Effectively integrating the predictions of different models can significantly reduce prediction errors and improve accuracy. Summary of the Invention
[0004] To address the above-mentioned defects in the prior art, the present invention proposes a method for rapidly predicting typhoon paths based on a fusion model, the method comprising:
[0005] Input a section of the current typhoon's observed path data into a pre-trained typhoon prediction model to obtain the current typhoon's position at a certain moment in the future, which is recorded as the path prediction point;
[0006] The observation time period for future predictions is set as needed. Within the observation time period, the above process is repeated for multiple observation paths of the current typhoon obtained in chronological order with a preset time step as the unit to obtain multiple path prediction points. The multiple path prediction points are then connected together to form the predicted path of the typhoon within the observation time period for future predictions.
[0007] As one of the improvements to the above technical solution, the typhoon prediction model includes: an Att-LSTM combined model, a similar path prediction model and a two-level fusion model;
[0008] Input a section of the current typhoon's observed path data into the pre-trained Att-LSTM combined model to obtain the first prediction result of the current typhoon's future typhoon path;
[0009] Inputting a segment of the typhoon path data of the same current typhoon into the similar path prediction model to obtain a second prediction result of the future typhoon path of the current typhoon;
[0010] The first prediction result of the future typhoon path of the current typhoon and the second prediction result of the future typhoon path of the current typhoon are input into the pre-trained secondary fusion model for fusion to obtain the position of the current typhoon at a certain moment in the future, which is recorded as the path prediction point.
[0011] As one of the improvements to the above technical solution, the Att-LSTM combination model includes: a first Att-LSTM model and a second Att-LSTM model; the first Att-LSTM model and the second Att-LSTM model are both long short-term memory neural network models based on the attention mechanism;
[0012] The current typhoon observation path data includes: multiple observation points of the current typhoon connected in series; each observation point includes the longitude and latitude of the current typhoon;
[0013] The first Att-LSTM model includes: an input layer, three LSTM layers, an attention layer and an output layer;
[0014] The three LSTM layers are connected in series with each other and then connected in series with the attention layer;
[0015] The longitude of the current typhoon at each observation point is input into the input layer. The longitude of the current typhoon at each observation point is then passed to the corresponding LSTM layer. The resulting hidden layer output is then passed to the next LSTM layer. The resulting hidden layer output of the next layer is then passed to the last LSTM layer. The resulting hidden layer output of the last LSTM layer is then passed to the attention layer. Attention is assigned to obtain weights, which are then passed to the output layer. The output layer outputs the longitude of the current typhoon at a certain point in the future.
[0016] The second Att-LSTM model includes: an input layer, three LSTM layers, an attention layer and an output layer;
[0017] The three LSTM layers are connected in series with each other and then connected in series with the attention layer;
[0018] The latitude of the current typhoon at each observation point is input into the input layer. The latitude of the current typhoon at each observation point is then passed to the corresponding LSTM layer. The resulting hidden layer output is then passed to the next LSTM layer. The resulting hidden layer output of the next layer is then passed to the last LSTM layer. The resulting hidden layer output of the last LSTM layer is passed to the attention layer, where attention is assigned to obtain weights. This is then passed to the output layer, which outputs the latitude of the current typhoon at a certain point in the future.
[0019] Among them, the output layers of the two Att-LSTM models respectively output the longitude and latitude of the current typhoon at a certain time in the future, thereby forming the position of the current typhoon at a certain time in the future, and using it as the first prediction result of the future typhoon path of the current typhoon.
[0020] As one of the improvements to the above technical solution, the training steps of the first Att-LSTM model are:
[0021] Create training data;
[0022] The collected typhoon path data of at least 1,000 historical typhoons are divided, and the typhoon path data of at least 700 historical typhoons are used as training data; the training data includes multiple training samples, each training sample is a section of a typhoon path of a historical typhoon, and each training sample includes features and labels; the features include multiple training observation points, each training observation point includes the longitude of the historical typhoon; the label is the longitude of the location to be predicted;
[0023] The training process is as follows:
[0024] Build the Att-LSTM model, input the features of each training sample into the Att-LSTM model, obtain the predicted longitude, and calculate the MSE loss between the predicted longitude and the label. The expression of the MSE function is:
[0025]
[0026] Where J represents the calculated loss, m is the number of training samples; y (i) represents the label of the i-th training sample; p(x (i) ) represents the prediction result obtained by the i-th training sample;
[0027] The training ends by continuously iterating until it converges to a stable value. The initial number of iterations is set to epoch = 70, the initial learning rate is set to 0.1, and the optimization function is Adam.
[0028] As one of the improvements to the above technical solution, the typhoon path data of the same current typhoon is input into the similar path prediction model to obtain a second prediction result of the future typhoon path of the current typhoon; the specific process is:
[0029] Using the typhoon path data of the current typhoon, four key points on the typhoon path of the current typhoon are selected, denoted as A, B, C, and D, as corresponding observation points;
[0030] Taking the distance between any two observation points as the radius and each observation point as the center, multiple circular areas are obtained. Multiple circular areas intersect with each other to obtain the intersection area, which is used as the buffer zone.
[0031] Determine the path of each historical typhoon from the pre-established historical typhoon database;
[0032] If a historical typhoon path does not pass through the buffer zone, no processing will be performed;
[0033] If a historical typhoon path is within the buffer zone, the similarity between a section of the historical typhoon path within the buffer zone and a section of the current typhoon path is calculated:
[0034] Assume that multiple observation points on a section of the typhoon path of the i-th historical typhoon are A', B', C', D', and the observation points A', B', C', D' are within the buffer zone;
[0035]
[0036] Among them, SI i is the similarity between a section of the typhoon path of the i-th historical typhoon and a section of the path of the current typhoon; r is the buffer zone radius; d i is the average distance between the i-th historical typhoon and the current typhoon;
[0037] in,
[0038]
[0039] Among them, d AA' is the distance between observation point A and observation point A'; d BB' is the distance between observation point B and observation point B', d CC' is the distance between observation point C and observation point C', d DD' is the distance between observation point D and observation point D', d AB is the distance between observation point A and observation point B, d BC is the distance between observation point B and observation point C, d CD is the distance between observation point C and observation point D;
[0040] Repeat the above process to obtain multiple similarities, sort them from large to small, and select the historical typhoon with the greatest similarity as the typhoon path of the similar typhoon;
[0041] Assuming the current time is t, the current typhoon's position is Z1, and the position of the similar typhoon is Z1', then the corresponding position Z of the typhoon at t+h is obtained. Then, starting from Z, the moving direction is the direction of line segment A'A, and the moving distance is the distance of line segment A'A. From the current typhoon's position Z1, the distance of line segment A'A is moved to obtain the corresponding position P1, which is recorded as reference position 1; where h represents the time difference between the predicted time and the current time;
[0042] Assume that the current time is t, the current typhoon position is Z1, and the corresponding position at time t-6 is Q2. Based on the direction from Q2 to Z1 as the future direction of travel, after moving a distance L, the corresponding position Q is obtained, which is recorded as reference position 2:
[0043] in,
[0044]
[0045] Among them, d Q2Z1 Represents the distance between observation point Q2 and observation point Z1;
[0046] Average reference position 1 and reference position 2 to obtain the position of similar typhoons, and use it as the second prediction result of the future typhoon path of the current typhoon.
[0047] As one of the improvements to the above technical solution, the secondary fusion model is an Xgboost model; the training process of the Xgboost model is:
[0048] At least 200 of at least 1,000 historical typhoons are used as fusion training data for training, where the fusion training data includes a plurality of fusion training samples, each fusion training sample is a section of a typhoon path of a historical typhoon, and each fusion training sample includes a fusion feature and a fusion label; the fusion feature includes a first prediction result and a second prediction result; the fusion label is a location to be predicted; wherein the location to be predicted includes the longitude and latitude of the current typhoon;
[0049] Build an Xgboost model, input the fusion features of each fusion training sample into the Xgboost model, obtain the predicted position of the current typhoon, set the loss function to mse, and calculate the loss between the predicted position of the current typhoon and the fusion label: the loss function is:
[0050]
[0051] Where F represents the calculated loss; n is the number of fusion training samples; y (w) represents the label of the w-th fusion training sample; p(x (w) ) represents the prediction result obtained by the w-th fusion training sample;
[0052] The training ends through continuous iteration until it converges to a stable value.
[0053] The present invention also provides a device for quickly predicting a typhoon path based on a fusion model, the device comprising:
[0054] The prediction position module is used to input the observed path data of the current typhoon into the pre-trained typhoon prediction model to obtain the position of the current typhoon at a certain time in the future, which is recorded as the path prediction point;
[0055] The prediction path module is used to set the observation time period for future predictions as needed. Within this observation time period, the multiple observation paths of the current typhoon obtained in chronological order are measured in units of a preset time step. According to the prediction position module, multiple path prediction points are obtained, and then the multiple path prediction points are connected together to form the predicted path of the typhoon within the future prediction observation time period.
[0056] The present invention provides a computer device for predicting typhoon paths, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the method when executing the computer program.
[0057] The present invention provides a computer-readable storage medium, which includes a stored computer program; wherein, when the computer program is running, it controls the device where the computer-readable storage medium is located to execute the method described.
[0058] The present invention provides an information data processing terminal, which is used to implement the method described above.
[0059] The beneficial effects of the present invention compared with the prior art are:
[0060] 1. The method of the present invention uses the LSTM model, which is widely used in time series problems, and adds an attention mechanism to make the prediction effect of the Att-LSTM model better. Compared with the RNN model and the LSTM model, the Att-LSTM model has a smaller prediction error. The model does not require manual feature design and can learn deep nonlinear information in the data.
[0061] 2. The similar path method used in the method of the present invention does not require any professional analysis tools or the judgment of variable dependencies. It relies on the path information of similar typhoons to make predictions. The solution is simple and feasible, greatly improving the prediction accuracy and efficiency.
[0062] 3. The method of the present invention analyzes the characteristics of different models. The Att-LSTM model uses global information as input to give prediction results, and adopts the similar path method to give prediction results based on local information. Therefore, the two are organically integrated, and a prediction fusion method is adopted to fuse the Att-LSTM model and the Xgboost model. This method can automatically learn the distribution of different prediction results and adjust the parameters for prediction. Compared with the prediction effect of a single model, it effectively reduces the prediction error;
[0063] 4. The method of the present invention is based on statistical historical data to address the problem of typhoon path prediction. The prediction speed of a single typhoon only takes a few seconds. It can be used as a reference for relevant personnel before the numerical forecast results of the meteorological department are released. It can also be used as a forecast scheme and organically integrated with other forecast schemes to reduce prediction errors. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1 This is a flow chart of a method for quickly predicting a typhoon path based on a fusion model of the present invention;
[0065] Figure 2 This is a structural diagram of an Att-LSTM model of a method for rapidly predicting typhoon paths based on a fusion model of the present invention;
[0066] Figure 3 This is a statistical diagram of the error of the method for quickly predicting typhoon paths based on model fusion compared with a single RNN model and an LSTM model;
[0067] FIG4( a ) is a schematic diagram showing a method for rapidly predicting a typhoon path based on model fusion according to the present invention, wherein the method uses a similar path method to predict a typhoon and obtain a position m1;
[0068] FIG4( b ) is a schematic diagram showing a method for rapidly predicting a typhoon path based on model fusion according to the present invention, which uses a similar path method to predict a typhoon and obtain a position m2. DETAILED DESCRIPTION
[0069] The present invention will now be further described with reference to the accompanying drawings.
[0070] This paper provides a method for rapidly predicting typhoon paths based on a fusion model. This method effectively integrates the prediction results of two different models, the Att-LSTM model and the similarity path model, significantly reducing prediction error and improving prediction accuracy. This method can achieve short-term rapid prediction of typhoon paths within 0-24 hours, with a single typhoon prediction time of only a few seconds.
[0071] The method includes:
[0072] Input a section of the current typhoon's observed path data into a pre-trained typhoon prediction model to obtain the current typhoon's position at a certain moment in the future, which is recorded as the path prediction point;
[0073] The observation time period for future predictions is set as needed. Within the observation time period, the above process is repeated for multiple observation paths of the current typhoon obtained in chronological order with a preset time step as the unit to obtain multiple path prediction points. The multiple path prediction points are then connected together to form the predicted path of the typhoon within the observation time period for future predictions.
[0074] The typhoon prediction model includes: an Att-LSTM combination model, a similar path prediction model and a two-level fusion model;
[0075] Input a section of the current typhoon's observed path data into the pre-trained Att-LSTM combined model to obtain the first prediction result of the current typhoon's future typhoon path;
[0076] Inputting a segment of the typhoon path data of the same current typhoon into the similar path prediction model to obtain a second prediction result of the future typhoon path of the current typhoon;
[0077] Specifically, using the typhoon path data of the current typhoon, four key points on the typhoon path of the current typhoon are selected, denoted as A, B, C, and D, as corresponding observation points;
[0078] Taking the distance between any two observation points as the radius and each observation point as the center, multiple circular areas are obtained. Multiple circular areas intersect with each other to obtain the intersection area, which is used as the buffer zone.
[0079] Determine the path of each historical typhoon from the pre-established historical typhoon database;
[0080] If a historical typhoon path does not pass through the buffer zone, no processing will be performed;
[0081] If a historical typhoon path is within the buffer zone, the similarity between a section of the historical typhoon path within the buffer zone and a section of the current typhoon path is calculated:
[0082] Assume that multiple observation points on a section of the typhoon path of the i-th historical typhoon are A', B', C', D', and the observation points A', B', C', D' are within the buffer zone;
[0083]
[0084] Among them, SI i is the similarity between a section of the typhoon path of the i-th historical typhoon and a section of the path of the current typhoon; r is the buffer zone radius; d i is the average distance between the i-th historical typhoon and the current typhoon;
[0085] in,
[0086]
[0087] Among them, d AA' is the distance between observation point A and observation point A'; d BB' is the distance between observation point B and observation point B', d CC' is the distance between observation point C and observation point C', d DD' is the distance between observation point D and observation point D', d AB is the distance between observation point A and observation point B, d BC is the distance between observation point B and observation point C, d CD is the distance between observation point C and observation point D;
[0088] Repeat the above process to obtain multiple similarities, sort them from large to small, and select the historical typhoon with the greatest similarity as the typhoon path of the similar typhoon;
[0089] Assume that the current time is t, the current typhoon's position is Z1, and the position of the similar typhoon is Z1'. Since the similar typhoon is a historical typhoon, the corresponding position Z of the typhoon at time t+h can be obtained. Then, starting from Z, the moving direction is the direction of line segment A'A, and the moving distance is the distance of line segment A'A. Move the distance A'A from the current typhoon's position Z1 to obtain the reference position P1. Where h represents the time difference between the predicted time and the current time.
[0090] Assume that the current time is t, the current typhoon position is Z1, and the corresponding position at time t-6 is Q2. Based on the direction from Q2 to Z1 as the future direction of travel, after moving a distance of L, the corresponding position Q is obtained, and the reference position 2 is determined, where
[0091]
[0092] Among them, d Q2Z1 Represents the distance between observation point Q2 and observation point Z1;
[0093] The reference positions 1 and 2 are averaged to obtain the position of similar typhoons, which is used as the second prediction result of the future typhoon path of the current typhoon.
[0094] The first prediction result of the future typhoon path of the current typhoon and the second prediction result of the future typhoon path of the current typhoon are input into the pre-trained secondary fusion model for fusion to obtain the position of the current typhoon at a certain moment in the future, which is recorded as the path prediction point.
[0095] Specifically, the first prediction result of the future typhoon path of the current typhoon output by the Att-LSTM model and the second prediction result of the future typhoon path of the current typhoon obtained by the similar path model are used as input, and then the Xgboost model (Extreme GradientBoosting, gradient boosting model) is used as a secondary fusion model. The above two prediction results are input into the secondary fusion model for prediction, and the position of the current typhoon at a certain moment in the future is obtained, recorded as the path prediction point, and used as the final prediction result.
[0096] The specific training process is:
[0097] Establish fusion training data;
[0098] The secondary fusion model is trained using at least 200 historical typhoons out of at least 1,000 historical typhoons as fusion training data. The fusion training data includes multiple fusion training samples, each fusion training sample is a typhoon path section of a historical typhoon, and each fusion training sample includes fusion features and fusion labels. The fusion features include the first prediction result and the second prediction result; the fusion label is the location to be predicted; wherein the location to be predicted includes the longitude and latitude of the current typhoon.
[0099] The training process is:
[0100] Build an Xgboost model, input the fusion features of each training sample into the Xgboost model, and obtain the predicted position of the current typhoon. According to the loss function:
[0101]
[0102] Where F represents the calculated loss; n is the number of fusion training samples; y (w) represents the label of the w-th fusion training sample; p(x (w) ) represents the prediction result obtained by the w-th fusion training sample;
[0103] The loss between the predicted position of the current typhoon and the fusion label is calculated, and the training ends through continuous iteration until it converges to a stable value.
[0104] Specifically, the predictions from the combined Att-LSTM model and the similarity path model are used as input. The final output is passed through the XGBoost model, compared with the actual latitude and longitude labels, the loss is calculated, and backpropagation is performed to update the model parameters. Training ends when the loss of the integrated training data stops decreasing and converges to a stable value. Compared to a single model, the average distance error for 100 test typhoons decreased by 20 km, demonstrating the effectiveness of this method.
[0105] The Att-LSTM combination model includes: a first Att-LSTM model and a second Att-LSTM model; the first Att-LSTM model and the second Att-LSTM model are both long short-term memory neural networks (Attention Long Short-term Memory Networks, Att-LSTM) based on the attention mechanism;
[0106] The current typhoon observation path data includes: multiple observation points of the current typhoon connected in series; each observation point includes the longitude and latitude of the current typhoon;
[0107] The first Att-LSTM model consists of: an input layer, three LSTM layers, an attention layer, and an output layer;
[0108] The three LSTM layers are connected in series with each other and then connected in series with the attention layer;
[0109] The longitude of the current typhoon at each observation point is input into the input layer. The longitude of the current typhoon at each observation point is then passed to the corresponding LSTM layer. The resulting hidden layer output is then passed to the next LSTM layer. The resulting hidden layer output of the next layer is then passed to the last LSTM layer. The resulting hidden layer output of the last LSTM layer is then passed to the attention layer. Attention is assigned to obtain weights, which are then passed to the output layer. The output layer outputs the longitude of the current typhoon at a certain point in the future.
[0110] The second Att-LSTM model includes: an input layer, three LSTM layers, an attention layer and an output layer;
[0111] The three LSTM layers are connected in series with each other and then connected in series with the attention layer;
[0112] The latitude of the current typhoon at each observation point is input into the input layer. The latitude of the current typhoon at each observation point is then passed to the corresponding LSTM layer. The resulting hidden layer output is then passed to the next LSTM layer. The resulting hidden layer output of the next layer is then passed to the last LSTM layer. The resulting hidden layer output of the last LSTM layer is passed to the attention layer, where attention is assigned to obtain weights. This is then passed to the output layer, which outputs the latitude of the current typhoon at a certain point in the future.
[0113] Among them, the output layers of the two Att-LSTM models respectively output the longitude and latitude of the current typhoon at a certain time in the future, thereby forming the position of the current typhoon at a certain time in the future, and using it as the first prediction result of the future typhoon path of the current typhoon.
[0114] The training steps of the first Att-LSTM model are:
[0115] Create training data;
[0116] The collected typhoon path data of at least 1,000 historical typhoons are divided, and the typhoon path data of at least 700 historical typhoons are used as training data; the training data includes multiple training samples, each training sample is a section of a typhoon path of a historical typhoon, and each training sample includes features and labels; the features include multiple training observation points, each training observation point includes the longitude of the historical typhoon; the label is the longitude of the location to be predicted;
[0117] The training process is as follows:
[0118] Build an Att-LSTM model and input the features of each training sample into it to obtain the predicted longitude. Based on the loss function (MSE), calculate the MSE loss between the predicted longitude and the label. Iterate until convergence to a stable value, and then perform backpropagation to update the model parameters. Set the initial number of iterations to epoch = 70, the initial learning rate to 0.1, and the optimization function to Adam. The MSE formula is as follows:
[0119]
[0120] Where: J is the calculated loss, the number of training samples is m, y (i) represents the label of the i-th training sample, p(x (i) ) represents the prediction result obtained by the i-th training sample.
[0121] Model validation;
[0122] At least 200 of the collected 1,000 historical typhoon track data will be used as verification data;
[0123] The validation data includes multiple validation samples, each validation sample is a section of a historical typhoon path, and each validation sample includes validation features and validation labels; the validation features include multiple validation observation points, each validation observation point includes the longitude of the historical typhoon; the validation label is the longitude of the location to be predicted;
[0124] The validation data is prepared in the same way as the training data. During the model training process, the validation data is used to test the effectiveness of the model training. In each round of training, the MSE loss of the validation set is observed to decrease. When the loss stops decreasing after more than 5 iterations, it reaches a converged stable value, indicating that the model training is complete and the model training is stopped. At this time, the MSE loss of the validation prediction longitude and validation label is compared with the MSE loss of the training prediction longitude and training label.
[0125] If the effect of the validation data is basically the same as that of the training data, it means that there is no overfitting problem, and the validation ends;
[0126] If the validation data effect is significantly worse than the training effect, it indicates that there may be an overfitting problem, and the first Att-LSTM model is retrained.
[0127] The training steps of the second Att-LSTM model are:
[0128] The collected typhoon path data of at least 1,000 historical typhoons are divided, and the typhoon path data of at least 700 historical typhoons are used as training data; the training data includes multiple training samples, each training sample is a section of a typhoon path of a historical typhoon, and each training sample includes features and labels; the features include multiple training observation points, each training observation point includes the latitude of the historical typhoon; the label is the latitude of the location to be predicted;
[0129] The training process is as follows:
[0130] Build the Att-LSTM model, input the features of each training sample into the Att-LSTM model, get the predicted longitude, calculate the mse loss between the predicted latitude and the label according to the loss function mse, through continuous iteration,
[0131] Until it converges to a stable value, and back propagates to update the model parameters. Set the initial number of iterations to
[0132] epoch=70, the initial learning rate is set to 0.1, and the optimization function is Adam. The MSE formula is as follows:
[0133]
[0134] Where: J is the calculated loss, the number of training samples is m, y (i) represents the label of the i-th training sample, p(x (i) ) represents the prediction result obtained by the i-th training sample.
[0135] Model validation;
[0136] At least 200 of the collected 1,000 historical typhoon track data will be used as verification data;
[0137] The validation data includes multiple validation samples, each of which is a section of a historical typhoon path. Each validation sample includes validation features and validation labels. The validation features include multiple validation observation points, each of which includes the latitude of the historical typhoon. The validation label is the latitude of the location to be predicted.
[0138] The validation data is prepared in the same way as the training data. During the model training process, the validation data is used to test the effectiveness of the model training. In each round of training, the MSE loss of the validation set is observed to decrease. When the loss stops decreasing after more than 5 iterations, it reaches a converged stable value, indicating that the model training is complete and the model training is stopped. At this time, the MSE loss of the validation prediction dimension and the validation label is compared with the MSE loss of the training prediction dimension and the training label.
[0139] If the effect of the validation data is basically the same as that of the training data, it means that there is no overfitting problem, and the validation ends;
[0140] If the validation data effect is significantly worse than the training effect, it indicates that there may be an overfitting problem, and the first Att-LSTM model is retrained.
[0141] Example 1.
[0142] The present invention provides a method for quickly predicting typhoon paths based on model fusion. The flow chart of the method is as follows: Figure 1 As shown, it is mainly divided into three parts:
[0143] (1) Prediction based on the Att-LSTM combined model:
[0144] First, based on the historical typhoon database, two trained Att-LSTM models are obtained. A section of the current typhoon’s observed path is input to obtain the prediction results of the next typhoon path.
[0145] (2) Prediction based on similar path prediction model:
[0146] Using the same observation path of the current typhoon, a buffer zone is established, and the similarity is calculated to recall the most similar typhoon. Based on the action path of the most similar typhoon, the next path prediction result of the current typhoon is obtained.
[0147] (3) Fusion based on the secondary fusion model to obtain the prediction results:
[0148] The prediction results of the two models are integrated and the prediction fusion method is used to organically integrate the results to obtain the final prediction result.
[0149] In step (1), the model used is an LSTM model based on the attention mechanism. Two Att-LSTM models are trained to predict longitude and latitude respectively. The two models have the same structure, including an input layer, three LSTM layers, an attention layer, and an output layer. Model training is performed by dividing the collected historical typhoon data into training data, verification data, and test data. The training data is used for training, the verification data is used to adjust the model parameters, and 100 typhoons are selected as test data to test the model effect. The initial number of iterations is set to epoch = 70, the initial learning rate is set to 0.1, the optimization function is Adam, the loss function is set to mse, and the early stopping mechanism is used.
[0150] The buffer zone in step (2) is a series of intersecting circular areas formed by selecting key points on the path, and the buffer zone radius r is set to the average distance between key points. If a typhoon in the historical database also has a corresponding key point within the buffer zone of the current typhoon, it can be regarded as a similar typhoon. This process generally finds more than one similar typhoon.
[0151] The definition of similarity in step (2) is as follows
[0152] Where d represents the average distance between the key points corresponding to similar typhoons and the current typhoon, and r represents the buffer zone radius. After the similarity SI is calculated, it is sorted in descending order, and the typhoon with the largest SI is selected as the most similar typhoon.
[0153] In step (2), for the most similar typhoon found, the offset distance needs to be calculated, and the offset position is calculated based on the length and direction of the path formed by the known key point closest to the predicted position and the corresponding key point of the most similar typhoon.
[0154] In step (2), the typhoon's moving position needs to be directly predicted based on the length and direction of the current last observation path, and averaged and fused with the obtained offset position as the prediction result of the similar path model.
[0155] The prediction fusion method in step (3) takes the prediction results of the Att-LSTM model and the similar path model as input, and then uses the Xgboost model as the secondary model for prediction output to obtain the final prediction result. The secondary model is trained using 200 typhoons in the validation data to obtain appropriate model parameters. Compared with the single model, the average distance error of 100 test typhoons decreased by 20km, proving the effectiveness of the method.
[0156] As a typhoon path prediction method implemented by a fusion model, this method can achieve short-term rapid prediction of typhoon paths from 0 to 24 hours, and the prediction time for a single typhoon is only a few seconds.
[0157] like Figure 2 As shown in the figure, the Att-LSTM model structure diagram is given. The bottom is the input layer, t1, t2, t3, t n Represents the longitude or latitude information of a series of time intervals. The three LSTM layers above are used to extract features. The hidden layer outputs h1, h2, h3, and h n Enter the attention layer, assign attention weights and output to get the prediction results.
[0158] like Figure 3 As shown in the figure, a schematic diagram of the prediction error of Att-LSTM, RNN and LSTM when the number of layers is 1, 2, 3 and 4 respectively is given. It can be seen that as the number of model layers increases, the effect of Att-LSTM is better than that of RNN model and LSTM model. When the number of model layers is 3, the Att-LSTM model achieves the best effect, which proves the effectiveness of this method.
[0159] like Figure 4(a) and 4(b) As shown in the figure, the principle diagram of the similar path method for predicting typhoon paths is given. First, the key path to be selected is set. Since the typhoon sequence can be abstracted into a continuous broken line with multiple points, it is necessary to first determine a section of the path before the predicted point as the key path. As shown in Figure 4(a), the position of the predicted point of typhoon T is m, and the time interval between adjacent points is 6 hours. A section of the path 24 hours before m is selected (denoted as L, representing the broken line ABCD) for prediction, where points A, B, C, and D are the typhoon positions 24 hours, 30 hours, 36 hours, and 42 hours before, respectively. Then perform the following steps:
[0160] (1) Establish a buffer zone to recall similar typhoons. Traverse the typhoons in the historical typhoon database. If there is a typhoon T' sequence with a path formed by A', B', C', and D' (denoted as L', representing the broken line A'B'C'D') that happens to be within the buffer zone formed by L, then T' is a similar typhoon to T and can be recalled. The buffer zone is defined as a series of overlapping circular areas in L with A, B, C, and D as the center and r as the radius. For multiple typhoons that may be recalled, calculate the similarity index SI. The definitions of r and SI are as shown in the formula:
[0161] r=(d AB +d BC +d CD ) / 3
[0162] d=(d AA′ +d BB′ +d CC′ +d DD′ ) / 4
[0163]
[0164] (2) where d xy Represents the distance of line segment xy. The typhoon with the largest SI is selected as the most similar typhoon recall.
[0165] (3) Calculate the offset distance. Assuming L' is the most similar typhoon recalled, its position Z' after 24 hours can be obtained. Taking Z' as the starting point, the moving direction is the direction of line segment A'A, and the moving distance is the distance of line segment A'A. The point m1 after the shift is obtained as the predicted position.
[0166] (4) Combined with the current path information. The above prediction is based only on the recalled typhoon. The possible moving position of the current typhoon after 24 hours should also be considered. As shown in Figure 4(b), with point A as the starting point and the length and direction of AB as the reference, the moving position is 4r AB Distance, predict the path position m2 after 24 hours, then the latitude and longitude of the predicted position are obtained by averaging m1 and m2, and used as the second prediction result of the future typhoon path of the current typhoon.
[0167] As shown in Table 1, a comparison table of model errors after using the prediction fusion method is given. It can be seen that compared with a single model, the error obtained by the prediction fusion method has decreased in both mean and median statistics, proving the effectiveness of the method.
[0168] Table 1
[0169]
[0170] The present invention also provides a device for quickly predicting a typhoon path based on a fusion model, the device comprising:
[0171] The prediction position module is used to input the observed path data of the current typhoon into the pre-trained typhoon prediction model to obtain the position of the current typhoon at a certain time in the future, which is recorded as the path prediction point;
[0172] The prediction path module is used to set the observation time period for future predictions as needed. Within this observation time period, the multiple observation paths of the current typhoon obtained in chronological order are measured in units of a preset time step. According to the prediction position module, multiple path prediction points are obtained, and then the multiple path prediction points are connected together to form the predicted path of the typhoon within the future prediction observation time period.
[0173] The present invention provides a computer device for predicting typhoon paths, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the method when executing the computer program.
[0174] The present invention provides a computer-readable storage medium, which includes a stored computer program; wherein, when the computer program is running, it controls the device where the computer-readable storage medium is located to execute the method described.
[0175] The present invention provides an information data processing terminal, which is used to implement the method described above.
[0176] In one embodiment, a computer device is provided, which may be a terminal. The computer device includes a processor, memory, a network interface, a display screen, and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal via a network connection. When executed by the processor, the computer program implements a method for typhoon path prediction. The display screen of the computer device may be a liquid crystal display or an electronic ink display screen. The input device of the computer device may be a touch screen covering the display screen, or may be buttons, a trackball, or a touchpad provided on the computer device housing, or may be an external keyboard, touchpad, or mouse.
[0177] In one embodiment, a computer device for predicting typhoon paths is provided. The computer device may be a server and includes a processor, memory, a network interface, and a database connected via a system bus. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is configured to store data. The network interface of the computer device is configured to communicate with an external terminal via a network connection. When executed by the processor, the computer program implements a method for predicting typhoon paths.
[0178] In one embodiment, a computer device for predicting typhoon paths is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the typhoon path prediction method provided in the above-mentioned embodiments are implemented.
[0179] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the method for typhoon path prediction provided in the above embodiments are implemented.
[0180] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, which can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0181] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0182] Finally, it should be noted that the above embodiments are intended only to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions to the technical solutions of the present invention do not depart from the spirit and scope of the technical solutions of the present invention and are intended to be encompassed by the claims of the present invention.
Claims
1. A method for rapidly predicting a typhoon path based on a fusion model, the method comprising: Input a section of the current typhoon's observed path data into a pre-trained typhoon prediction model to obtain the current typhoon's position at a certain moment in the future, which is recorded as the path prediction point; The observation period for future prediction is set as needed. Within the observation period, the above process is repeated for multiple segments of the current typhoon's observed path obtained in chronological order, with a preset time step as the unit, to obtain multiple path prediction points. These multiple path prediction points are then connected together to form the predicted path of the typhoon within the future prediction observation period. The typhoon prediction model includes: an Att-LSTM combination model, a similar path prediction model and a secondary fusion model; the secondary fusion model is an Xgboost model; Input a section of the current typhoon's observed path data into the pre-trained Att-LSTM combined model to obtain the first prediction result of the current typhoon's future typhoon path; Inputting a segment of the typhoon path data of the same current typhoon into the similar path prediction model, a second prediction result of the future typhoon path of the current typhoon is obtained; wherein, in the similar path prediction model, for the most similar typhoon found, the offset position is calculated based on the length and direction of the path formed by the known key point closest to the predicted position and the corresponding key point of the most similar typhoon; the similar path prediction model also directly predicts the typhoon's moving position based on the length and direction of the last observed segment of the current typhoon's path, and averages and merges it with the obtained offset position as the second typhoon path prediction result of the similar path prediction model; The first prediction result of the future typhoon path of the current typhoon and the second prediction result of the future typhoon path of the current typhoon are input into the pre-trained secondary fusion model for fusion to obtain the position of the current typhoon at a certain moment in the future, which is recorded as the path prediction point.
2. The method for rapidly predicting typhoon paths based on a fusion model according to claim 1, characterized in that: The Att-LSTM combination model includes: a first Att-LSTM model and a second Att-LSTM model; the first Att-LSTM model and the second Att-LSTM model are both long short-term memory neural network models based on the attention mechanism; The current typhoon observation path data includes: multiple observation points of the current typhoon connected in series; each observation point includes the longitude and latitude of the current typhoon; The first Att-LSTM model includes: an input layer, three LSTM layers, an attention layer and an output layer; The three LSTM layers are connected in series with each other and then connected in series with the attention layer; The longitude of the current typhoon at each observation point is input into the input layer. The longitude of the current typhoon at each observation point is then passed to the corresponding LSTM layer. The resulting hidden layer output is then passed to the next LSTM layer. The resulting hidden layer output of the next layer is then passed to the last LSTM layer. The resulting hidden layer output of the last LSTM layer is then passed to the attention layer. Attention is assigned to obtain weights, which are then passed to the output layer. The output layer outputs the longitude of the current typhoon at a certain point in the future. The second Att-LSTM model includes: an input layer, three LSTM layers, an attention layer and an output layer; The three LSTM layers are connected in series with each other and then connected in series with the attention layer; The latitude of the current typhoon at each observation point is input into the input layer. The latitude of the current typhoon at each observation point is then passed to the corresponding LSTM layer. The resulting hidden layer output is then passed to the next LSTM layer. The resulting hidden layer output of the next layer is then passed to the last LSTM layer. The resulting hidden layer output of the last LSTM layer is passed to the attention layer, where attention is assigned to obtain weights. This is then passed to the output layer, which outputs the latitude of the current typhoon at a certain point in the future. Among them, the output layers of the two Att-LSTM models respectively output the longitude and latitude of the current typhoon at a certain time in the future, thereby forming the position of the current typhoon at a certain time in the future, and using it as the first prediction result of the future typhoon path of the current typhoon.
3. The method for rapidly predicting typhoon paths based on a fusion model according to claim 2, characterized in that: The training steps of the first Att-LSTM model are: Create training data; The collected typhoon path data of at least 1,000 historical typhoons are divided, and the typhoon path data of at least 700 historical typhoons are used as training data; the training data includes multiple training samples, each training sample is a section of a typhoon path of a historical typhoon, and each training sample includes features and labels; the features include multiple training observation points, each training observation point includes the longitude of the historical typhoon; the label is the longitude of the location to be predicted; The training process is as follows: Build the Att-LSTM model, input the features of each training sample into the Att-LSTM model, obtain the predicted longitude, and calculate the MSE loss between the predicted longitude and the label. The expression of the MSE function is: Where J represents the calculated loss, m is the number of training samples; y (i) represents the label of the i-th training sample; p(x (i) ) represents the prediction result obtained by the i-th training sample; The training ends by continuously iterating until it converges to a stable value. The initial number of iterations is set to epoch = 70, the initial learning rate is set to 0.1, and the optimization function is Adam.
4. The method for rapidly predicting typhoon paths based on a fusion model according to claim 1, characterized in that: The specific process of inputting a segment of typhoon path data of the same current typhoon into the similar path prediction model to obtain a second prediction result of the future typhoon path of the current typhoon is as follows: Using the typhoon path data of the current typhoon, four key points on the typhoon path of the current typhoon are selected, denoted as A, B, C, and D, as corresponding observation points; Taking the distance between any two observation points as the radius and each observation point as the center, multiple circular areas are obtained. Multiple circular areas intersect with each other to obtain the intersection area, which is used as the buffer zone. Determine the path of each historical typhoon from the pre-established historical typhoon database; If a historical typhoon path does not pass through the buffer zone, no processing will be performed; If a historical typhoon path is within the buffer zone, the similarity between a section of the historical typhoon path within the buffer zone and a section of the current typhoon path is calculated: Assume that multiple observation points on a section of the typhoon path of the i-th historical typhoon are A', B', C', D', and the observation points A', B', C', D' are within the buffer zone; Among them, SI i is the similarity between a section of the typhoon path of the i-th historical typhoon and a section of the path of the current typhoon; r is the buffer zone radius; d i is the average distance between the i-th historical typhoon and the current typhoon; in, Among them, d AA' is the distance between observation point A and observation point A'; d BB' is the distance between observation point B and observation point B', d CC' is the distance between observation point C and observation point C', d DD' is the distance between observation point D and observation point D', d AB is the distance between observation point A and observation point B, d BC is the distance between observation point B and observation point C, d CD is the distance between observation point C and observation point D; Repeat the above process to obtain multiple similarities, sort them from large to small, and select the historical typhoon with the greatest similarity as the typhoon path of the similar typhoon; Assuming the current time is t, the current typhoon's position is Z1, and the position of the similar typhoon is Z1', the corresponding position Z of the similar typhoon at t+h is obtained. Then, starting from Z, the moving direction is the direction of line segment A'A, and the moving distance is the distance of line segment A'A. From the current typhoon's position Z1, the moving distance of line segment A'A is obtained to obtain the corresponding position P1, which is recorded as reference position 1. Where h represents the time difference between the predicted time and the current time. Assume that the current time is t, the current typhoon position is Z1, and the corresponding position at time t-6 is Q2. Based on the direction from Q2 to Z1 as the future direction of travel, after moving a distance L, the corresponding position Q is obtained, which is recorded as reference position 2: in, Among them, d Q2Z1 Represents the distance between observation point Q2 and observation point Z1; Average reference position 1 and reference position 2 to obtain the position of similar typhoons, and use it as the second prediction result of the future typhoon path of the current typhoon.
5. The method for rapidly predicting typhoon paths based on a fusion model according to claim 1, characterized in that: The training process of the Xgboost model is: At least 200 historical typhoons out of at least 1000 historical typhoons are used as fusion training data for training, where the fusion training data includes a plurality of fusion training samples, each fusion training sample is a section of a typhoon path of a historical typhoon, and each fusion training sample includes a fusion feature and a fusion label; The fused features include the first prediction result and the second prediction result; the fused label is the location to be predicted; wherein the location to be predicted includes the longitude and latitude of the current typhoon; Build an Xgboost model, input the fusion features of each fusion training sample into the Xgboost model, obtain the predicted position of the current typhoon, set the loss function to mse, and calculate the loss between the predicted position of the current typhoon and the fusion label: the loss function is: Where F represents the calculated loss; n is the number of fusion training samples; y (w) represents the label of the w-th fusion training sample; p(x (w) ) represents the prediction result obtained by the w-th fusion training sample; The training ends through continuous iteration until it converges to a stable value.
6. A device for rapidly predicting typhoon paths based on a fusion model, characterized in that: The device includes: The prediction position module is used to input the observed path data of the current typhoon into the pre-trained typhoon prediction model to obtain the position of the current typhoon at a certain time in the future, which is recorded as the path prediction point; The prediction path module is used to set the observation time period for future prediction as needed. Within the observation time period, the multiple observation paths of the current typhoon obtained in chronological order are used in units of a preset time step. According to the prediction position module, multiple path prediction points are obtained, and then the multiple path prediction points are connected together to form the predicted path of the typhoon within the future prediction observation time period; The typhoon prediction model includes: an Att-LSTM combination model, a similar path prediction model and a secondary fusion model; the secondary fusion model is an Xgboost model; Input a section of the current typhoon's observed path data into the pre-trained Att-LSTM combined model to obtain the first prediction result of the current typhoon's future typhoon path; Inputting a segment of the typhoon path data of the same current typhoon into the similar path prediction model, a second prediction result of the future typhoon path of the current typhoon is obtained; wherein, in the similar path prediction model, for the most similar typhoon found, the offset position is calculated based on the length and direction of the path formed by the known key point closest to the predicted position and the corresponding key point of the most similar typhoon; the similar path prediction model also directly predicts the typhoon's moving position based on the length and direction of the last observed segment of the current typhoon's path, and averages and merges it with the obtained offset position as the second typhoon path prediction result of the similar path prediction model; The first prediction result of the future typhoon path of the current typhoon and the second prediction result of the future typhoon path of the current typhoon are input into the pre-trained secondary fusion model for fusion to obtain the position of the current typhoon at a certain moment in the future, which is recorded as the path prediction point.
7. A computer device for predicting typhoon paths, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the method according to any one of claims 1 to 5 when executing the computer program.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium includes a stored computer program; wherein, when the computer program is run, it controls the device where the computer-readable storage medium is located to execute the method according to any one of claims 1 to 5.
9. An information data processing terminal, characterized in that: The information data processing terminal is used to implement the method according to any one of claims 1 to 5.