A meteorological drought prediction method based on spatiotemporal analysis
By constructing a meteorological drought prediction model based on spatiotemporal analysis, combining multiple spatiotemporal characteristics and temporal convolution networks, the shortcomings in regional distribution and development trend assessment in meteorological drought prediction are solved, and accurate prediction of future meteorological drought levels is achieved, and the accuracy and efficiency of prediction are improved.
Patent Information
- Application Number
- CN202411081706.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-08
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2044-08-08
AI Technical Summary
The spatial and temporal correlation between multiple monitoring stations has not been effectively utilized in the prior art, resulting in insufficient regional distribution and development trend assessment of meteorological drought prediction, and it is difficult to accurately predict the meteorological drought levels in future time periods.
By constructing a meteorological drought prediction model based on spatiotemporal analysis, combining meteorological elements of multi-space-time characteristics, the probability of drought level consistency between sites is calculated, the 1×1 convolution kernel is used to integrate spatiotemporal information, and a multi-layer time convolution network is used for feature extraction and prediction, and the model performance is optimized in combination with the self-attention mechanism.
Accurate prediction of meteorological drought levels is achieved, the model's spatial and temporal information capture ability in processing meteorological data is improved, and the accuracy and efficiency of meteorological drought prediction are enhanced.
Smart Images

Figure CN119089300B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of meteorological forecasting, in particular to a meteorological drought forecasting method based on spatiotemporal analysis. Background Art
[0002] Meteorologically speaking, droughts develop slowly, last for a long time, have relatively vague beginnings and endings, and are highly destructive. The impacts of drought are not limited to agriculture but also impact food supply, the ecological environment, and social stability. Therefore, predicting the timing, scope, and intensity of future droughts, combined with future changes in meteorological factors, is crucial for developing drought management plans to preserve natural resources and is an effective way to mitigate the losses caused by drought.
[0003] Drought prediction models can be roughly divided into three categories: physical mechanism-based models, data-driven models, and hybrid models.
[0004] Deep learning, with its advantages in data-driven development, complex relationship modeling, personalized prediction, model improvement, data integration, decision support, and resource conservation, provides a more comprehensive, accurate, and efficient solution for drought prediction. Existing technologies use deep learning techniques to predict droughts, establishing nonlinear functions to explore the complex relationships between input and target variables, resulting in lower computational costs and better predictive performance. Temporal convolutional networks, in particular, offer superior time series modeling, parallel processing capabilities, and multi-scale information capture capabilities in meteorological drought prediction. They can capture both detailed and overall features in data at different levels, contributing to a more comprehensive understanding of the spatial and temporal information in meteorological data.
[0005] When exploring meteorological drought predictions, due to the spatiotemporal correlation between monitoring stations, the drought situation in one region is spatially linked to the drought situation in other regions. Therefore, considering conducting spatiotemporal correlation analysis on data from multiple monitoring stations, by identifying stations with similar climatic conditions and consistent drought levels, the regional distribution, development trends and potential impacts of drought can be more effectively assessed. However, there is currently no similar solution in existing technologies.
[0006] Therefore, it is necessary to design a meteorological drought prediction method based on spatiotemporal analysis. By constructing a spatiotemporal prediction model for meteorological drought, the meteorological drought level in a preset future time period can be accurately predicted based on meteorological elements with multivariate spatiotemporal characteristics. Summary of the Invention
[0007] The purpose of the present invention is to overcome the shortcomings of the existing technology and provide a meteorological drought prediction method based on spatiotemporal analysis. By constructing a meteorological drought spatiotemporal prediction model, it can accurately predict the meteorological drought level in a preset future time period based on meteorological elements with multivariate spatiotemporal characteristics.
[0008] In order to achieve the above object, the present invention provides a meteorological drought prediction method based on spatiotemporal analysis:
[0009] The following steps are involved:
[0010] S1, obtain meteorological element data and drought index, and perform data preprocessing:
[0011] S1-1, download the continuous meteorological data of various elements in recent years, including precipitation, temperature, sunshine duration, relative humidity, evaporation and air pressure, and preprocess the data. The outliers are replaced by the average value of the nearby data, and the missing values are filled by time interpolation.
[0012] S1-2, calculates meteorological drought assessment indicators based on some meteorological element data in the data, and uses the Standardized Precipitation Evaporation Index (SPEI) combined with the meteorological element data obtained in S1 to comprehensively assess the extent and impact of drought;
[0013] By calculating the standardized precipitation evapotranspiration index (SPEI), the drought index at the time scales of 1, 3, 6, and 12 months is obtained. The calculation formula is:
[0014]
[0015] Among them, C0=2.515517, C1=0.802853, C2=0.010328; d1=1.432788, d2=0.189269, d3=0.001308; Where F(X) is the cumulative function of the log-logistic probability distribution;
[0016] S1-3, after merging the meteorological element data and SPEI values, normalize them and divide the processed data into a training set (80%) and a test set (20%);
[0017] S1-4, feature selection should be performed before inputting data into the model. The Pearson correlation coefficient is used to measure the degree of linear relationship between the meteorological characteristics of the dataset and the drought index of different time spans. The Pearson correlation coefficient ranges from -1 to +1, and the closer to +1, the higher the correlation. The calculation formula of the Pearson correlation coefficient is:
[0018]
[0019] Where r is the Pearson correlation coefficient, x i and y i are the observed values of two variables; and are the means of the two variables respectively; since not all positively correlated meteorological features have a significant impact on drought index prediction, different correlation thresholds are used to test the prediction performance, and meteorological features with relatively large impact on the output are extracted as input features;
[0020] S2, site spatial correlation analysis:
[0021] Calculate the probability of consistency between the drought levels of the target site and other sites during the same period, and select and determine sites with spatial correlation;
[0022] The probability threshold is selected through experimental testing, and the results under different thresholds are compared to select the optimal threshold that can effectively identify related sites while avoiding too many false positives;
[0023] S2-1: The climate conditions are similar within the similar distance range. The upper limit of the distance between the relevant stations is set to 50-70 kilometers. The Haversine formula is used to calculate the distance between the two stations, that is, the calculation formula is:
[0024]
[0025]
[0026] d = R·c;
[0027] in, is the latitude of the two points in radians, ω is the longitude of the two points in radians, and R is the radius of the Earth;
[0028] S2-2: Screen out sites with similar climatic conditions and significant consistency in drought levels. These sites are spatially correlated and classified into five levels of meteorological drought: no drought, mild drought, moderate drought, severe drought, and extreme drought.
[0029] S2-3, integrate the spatiotemporal information of monitoring stations that meet spatial correlation, where the input feature is the four-dimensional vector X(B, T, N, C) of spatiotemporal data of different stations, where B represents the number of samples, T represents the time step, N represents the number of stations, and C represents the number of features; given the input feature X = [X1, X2, X3, ..., X n ] is a vector of N feature matrices containing spatiotemporal data from different sites. It integrates the input information of X in the dimensions of multiple sites and uses multiple 1×1 convolution kernels to expand the dimension of this multi-channel information.
[0030] S2-4 uses a 1×1 convolution kernel to reduce the dimension to 1 and aggregate the data features. By increasing the dimension, the feature extraction capability of multiple monitoring station information is improved, and the input data is aggregated into a two-dimensional feature vector.
[0031] 1×1 convolution is a dimension-increasing or -reducing module used to effectively increase model capacity, i.e., increase nonlinearity and eliminate computational bottlenecks.
[0032] S3, prediction model training:
[0033] A spatiotemporal drought prediction model based on a temporal convolutional network was constructed by aggregating multiple features. The model was trained using the integrated multi-site information results and used as a drought prediction model to predict drought.
[0034] S3-1 uses the data from the training set to input the prediction model. The vector containing the spatiotemporal feature information is input into the model. The model is trained using the forward propagation method. Through layer-by-layer processing, the abstract representation of the input features is effectively learned and extracted. The model parameters are then updated using backpropagation. After continuous iterative optimization, the optimal prediction model is generated.
[0035] S3-2, the prediction model consists of a convolutional layer, a linear encoding layer, a self-attention layer, a temporal convolutional network (TCN), and a decoding layer;
[0036] The convolutional layer input is processed by the convolutional layer and batch normalization layer to extract preliminary features. The convolutional features are then encoded using the linear layer encoding layer and dropout is applied. The self-attention layer mechanism is then applied to the encoded features to capture global dependencies. TCN is used to further extract temporal features. Finally, the decoder outputs the prediction results.
[0037] S3-2-1, the query vector Q, key vector K and value vector V corresponding to the self-attention layer mechanism are calculated by using the similarity between Q and K to calculate the attention weight, and then the attention score is used to adjust the weight of the weighted sum of V of different inputs, that is, the formula is:
[0038]
[0039] d k is the dimension of each attention head;
[0040] The forecast model simultaneously focuses on and integrates different aspects of the input data sequence to improve the model's ability to handle long-term dependencies and complex relationships in meteorological data;
[0041] S3-2-2, the temporal convolutional network consists of multiple residual unit stacks. The residual module includes two convolution units and a nonlinear mapping unit. Each convolution unit includes a one-dimensional dilated causal convolution, weight normalization, ReLU activation function and Dropout operation;
[0042] Causal convolution means that the current time t is only related to the input at time t and before time t;
[0043] The extended convolution operation for the index of the input data sequence is described as:
[0044]
[0045] Where s is the index of the sequence used to represent the current time step or position, d is the dilation coefficient, k is the filter size, i is a non-negative integer, and sd·i is the localization of some information in the history;
[0046] S3-2-3, the temporal convolutional network is a multi-layer fully convolutional network, which sequentially connects the input layer, the first hidden layer, the second hidden layer, the third hidden layer, and the output layer;
[0047] The convolution operation extracts useful features by moving the sliding window, i.e., the convolution kernel, on the feature matrix and calculating the weighted sum of the elements in the window and the convolution kernel.
[0048] Each of the first, second, and third hidden layers gradually abstracts and extracts key information from the input data sequence through causal convolution. As the number of layers increases, the network captures more complex and higher-level features, thereby achieving efficient learning and feature extraction at different levels of the network.
[0049] Adjust and set different network depths and filter sizes during the training and testing of the temporal convolutional network to improve model accuracy and flexibly adapt to the requirements of temporal feature extraction at different scales;
[0050] S3-2-4: When building a prediction model, it is necessary to predefine the hyperparameters, loss function, and optimization algorithm of the meteorological drought spatiotemporal prediction model. The hyperparameters include the number of network layers, convolution kernel size, number of convolution kernels, learning rate, dropout rate, batch size, sequence length, and output dimension. A grid search is performed when specifying the number of network layers and kernel size of the meteorological drought spatiotemporal prediction model.
[0051] The mean square error (MSE) was selected as the loss function in the training process, and the Adam optimizer was used to perform gradient descent optimization on the random objective function of the model. In the subsequent experiments, the performance and generalization ability of the prediction model were optimized by adjusting the parameters according to the experimental results.
[0052] S3-3, the criteria for determining the spatiotemporal prediction model for meteorological drought are:
[0053] Evaluation index determination coefficient R 2 and root mean square error RMSE;
[0054] Index determination coefficient R 2It indicates the degree of linear correlation between the predicted data and the observed data. It is an indicator of the model fit. The closer its value is to 1, the better the model fits the data. Its calculation formula is:
[0055]
[0056] Among them, y i is the observed value, is the predicted value, N is the number of data points;
[0057] in, is the average of the actual values;
[0058] The root mean square error (RMSE) is used to measure the average model prediction error and to indicate the closeness between the predicted value and the observed value. The lower the index value, the higher the prediction accuracy. The calculation formula is:
[0059]
[0060] S4, determining the drought degree of the area to be predicted based on the predicted drought index:
[0061] The output results of the meteorological drought prediction model are analyzed, and the predicted SPEI values are divided into drought levels according to the drought grade classification standards to determine the drought degree of the predicted area in the next preset time period.
[0062] Compared with the prior art, the present invention has the following beneficial effects:
[0063] Compared to methods that only consider a single site or simply merge data from multiple sites, this method calculates the probability of drought level consistency between the target site and other sites during the same time period. Combining an experimentally optimized probability threshold with a geographic distance limit (50 to 70 kilometers), this method can accurately identify sites with similar climatic conditions and significant consistency in drought levels as spatially associated sites. Furthermore, by efficiently integrating multidimensional spatiotemporal data, it achieves comprehensive aggregation of multi-source features, better mining the spatial and temporal information in the data and capturing both detailed and overall characteristics.
[0064] The present invention also combines multi-source feature aggregation, self-attention mechanism and optimized temporal convolutional network to form a new and efficient drought prediction solution. By improving technical details, optimizing algorithms, adjusting network structure and improving feature extraction methods, the performance of the model is significantly improved, thereby achieving more accurate drought prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] Figure 1 This is a data preprocessing flow chart of the present invention.
[0066] Figure 2This is a diagram of the meteorological drought spatiotemporal prediction model based on spatiotemporal analysis provided by the present invention.
[0067] Figure 3 This is a flow chart of a meteorological drought prediction method based on spatiotemporal analysis provided by the present invention. DETAILED DESCRIPTION
[0068] See also Figures 1 to 3 , the present invention will now be further described with reference to the accompanying drawings:
[0069] The following steps are involved:
[0070] S1, obtain meteorological element data and drought index, and perform data preprocessing:
[0071] S1-1, download the continuous meteorological data of various elements in recent years, including precipitation, temperature, sunshine duration, relative humidity, evaporation and air pressure, and preprocess the data. The outliers are replaced by the average value of the nearby data, and the missing values are filled by time interpolation.
[0072] S1-2, calculates meteorological drought assessment indicators based on some meteorological element data in the data, and uses the Standardized Precipitation Evaporation Index (SPEI) combined with the meteorological element data obtained in S1 to comprehensively assess the extent and impact of drought;
[0073] By calculating the standardized precipitation evapotranspiration index (SPEI), the drought index at the time scales of 1, 3, 6, and 12 months is obtained. The calculation formula is:
[0074]
[0075] Among them, C0=2.515517, C1=0.802853, C2=0.010328; d1=1.432788, d2=0.189269, d3=0.001308; Where F(X) is the cumulative function of the log-logistic probability distribution;
[0076] S1-3, after merging the meteorological element data and SPEI values, normalize them and divide the processed data into a training set (80%) and a test set (20%);
[0077] S1-4, feature selection should be performed before inputting data into the model. The Pearson correlation coefficient is used to measure the degree of linear relationship between the meteorological characteristics of the dataset and the drought index of different time spans. The Pearson correlation coefficient ranges from -1 to +1, and the closer to +1, the higher the correlation. The calculation formula of the Pearson correlation coefficient is:
[0078]
[0079] Where r is the Pearson correlation coefficient, x i and y i are the observed values of two variables; and are the means of the two variables respectively; since not all positively correlated meteorological features have a significant impact on drought index prediction, different correlation thresholds are used to test the prediction performance, and meteorological features with relatively large impact on the output are extracted as input features;
[0080] S2, site spatial correlation analysis:
[0081] Calculate the probability of consistency between the drought levels of the target site and other sites during the same period, and select and determine sites with spatial correlation;
[0082] The probability threshold is selected through experimental testing, and the results under different thresholds are compared to select the optimal threshold that can effectively identify related sites while avoiding too many false positives;
[0083] S2-1: The climate conditions are similar within the similar distance range. The upper limit of the distance between the relevant stations is set to 50-70 kilometers. The Haversine formula is used to calculate the distance between the two stations, that is, the calculation formula is:
[0084]
[0085] d = R·c;
[0086] in, is the latitude of the two points in radians, ω is the longitude of the two points in radians, and R is the radius of the Earth;
[0087] S2-2: Screen out sites with similar climatic conditions and significant consistency in drought levels. As sites with spatial correlation, the meteorological drought levels can be divided into five levels: no drought, mild drought, moderate drought, severe drought, and extreme drought according to the meteorological drought level standards, as shown in the following table:
[0088] grade type SPEI 1 No drought -0.5<SPEI 2 Mild drought -1.0<SPEI≤-0.5 3 moderate drought -1.5<SPEI≤-1.0 4 severe drought -2.0<SPEI≤-1.5 5 Extreme drought SPEI≤-2.0
[0089] S2-3, integrate the spatiotemporal information of monitoring stations that meet spatial correlation, where the input feature is the four-dimensional vector X(B, T, N, C) of spatiotemporal data of different stations, where B represents the number of samples, T represents the time step, N represents the number of stations, and C represents the number of features; given the input feature X = [X1, X2, X3, ..., X n ] is a vector of N feature matrices containing spatiotemporal data from different sites. It integrates the input information of X in the dimensions of multiple sites and uses multiple 1×1 convolution kernels to expand the dimension of this multi-channel information.
[0090] S2-4 uses a 1×1 convolution kernel to reduce the dimension to 1 and aggregate the data features. By increasing the dimension, the feature extraction capability of multiple monitoring station information is improved, and the input data is aggregated into a two-dimensional feature vector.
[0091] 1×1 convolution is a dimension-increasing or -reducing module used to effectively increase model capacity, i.e., increase nonlinearity and eliminate computational bottlenecks.
[0092] S3, prediction model training:
[0093] A spatiotemporal drought prediction model based on a temporal convolutional network was constructed by aggregating multiple features. The model was trained using the integrated multi-site information results and used as a drought prediction model to predict drought.
[0094] S3-1 uses the data from the training set to input the prediction model. The vector containing the spatiotemporal feature information is input into the model. The model is trained using the forward propagation method. Through layer-by-layer processing, the abstract representation of the input features is effectively learned and extracted. The model parameters are then updated using backpropagation. After continuous iterative optimization, the optimal prediction model is generated.
[0095] S3-2, the prediction model consists of a convolutional layer, a linear encoding layer, a self-attention layer, a temporal convolutional network (TCN), and a decoding layer;
[0096] The convolutional layer input is processed by the convolutional layer and batch normalization layer to extract preliminary features. The convolutional features are then encoded using the linear layer encoding layer and dropout is applied. The self-attention layer mechanism is then applied to the encoded features to capture global dependencies. TCN is used to further extract temporal features. Finally, the decoder outputs the prediction results.
[0097] S3-2-1, the query vector Q, key vector K and value vector V corresponding to the self-attention layer mechanism are calculated by using the similarity between Q and K to calculate the attention weight, and then the attention score is used to adjust the weight of the weighted sum of V of different inputs, that is, the formula is:
[0098]
[0099] d k is the dimension of each attention head;
[0100] The forecast model simultaneously focuses on and integrates different aspects of the input data sequence to improve the model's ability to handle long-term dependencies and complex relationships in meteorological data;
[0101] S3-2-2, the temporal convolutional network consists of multiple residual unit stacks. The residual module includes two convolution units and a nonlinear mapping unit. Each convolution unit includes a one-dimensional dilated causal convolution, weight normalization, ReLU activation function and Dropout operation;
[0102] Causal convolution means that the current time t is only related to the input at time t and before time t;
[0103] The extended convolution operation for the index of the input data sequence is described as:
[0104]
[0105] Where s is the index of the sequence used to represent the current time step or position, d is the dilation coefficient, k is the filter size, i is a non-negative integer, and sd·i is the localization of some information in the history;
[0106] S3-2-3, the temporal convolutional network is a multi-layer fully convolutional network, which sequentially connects the input layer, the first hidden layer, the second hidden layer, the third hidden layer, and the output layer;
[0107] The convolution operation extracts useful features by moving the sliding window, i.e., the convolution kernel, on the feature matrix and calculating the weighted sum of the elements in the window and the convolution kernel.
[0108] Each of the first, second, and third hidden layers gradually abstracts and extracts key information from the input data sequence through causal convolution. As the number of layers increases, the network captures more complex and higher-level features, thereby achieving efficient learning and feature extraction at different levels of the network.
[0109] Adjust and set different network depths and filter sizes during the training and testing of the temporal convolutional network to improve model accuracy and flexibly adapt to the requirements of temporal feature extraction at different scales;
[0110] S3-2-4: When building a prediction model, it is necessary to predefine the hyperparameters, loss function, and optimization algorithm of the meteorological drought spatiotemporal prediction model. The hyperparameters include the number of network layers, convolution kernel size, number of convolution kernels, learning rate, dropout rate, batch size, sequence length, and output dimension. A grid search is performed when specifying the number of network layers and kernel size of the meteorological drought spatiotemporal prediction model.
[0111] The mean square error (MSE) was selected as the loss function in the training process, and the Adam optimizer was used to perform gradient descent optimization on the random objective function of the model. In the subsequent experiments, the performance and generalization ability of the prediction model were optimized by adjusting the parameters according to the experimental results.
[0112] S3-3, the criteria for determining the spatiotemporal prediction model for meteorological drought are:
[0113] Evaluation index determination coefficient R 2 and root mean square error RMSE;
[0114] Index determination coefficient R 2 It indicates the degree of linear correlation between the predicted data and the observed data. It is an indicator of the model fit. The closer its value is to 1, the better the model fits the data. Its calculation formula is:
[0115]
[0116] Among them, y i is the observed value, is the predicted value, N is the number of data points;
[0117] in, is the average of the actual values;
[0118] The root mean square error (RMSE) is used to measure the average model prediction error and to indicate the closeness between the predicted value and the observed value. The lower the index value, the higher the prediction accuracy. The calculation formula is:
[0119]
[0120] Where SSE is the sum of squared errors; N is the number of samples used. The formula for calculating SSE is:
[0121]
[0122] S4, determining the drought severity of the area to be predicted based on the predicted drought index:
[0123] The output results of the meteorological drought prediction model are analyzed, and the predicted SPEI values are divided into drought levels according to the drought grade classification standards to determine the drought degree of the predicted area in the next preset time period.
[0124] The above are merely preferred embodiments of the present invention and are intended to help understand the method and core concept of this application. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions based on the concept of the present invention fall within the scope of protection of the present invention. It should be noted that for those skilled in the art, various improvements and modifications that do not depart from the principles of the present invention should also be considered within the scope of protection of the present invention.
[0125] The above embodiments can be implemented in whole or in part by software or hardware. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. A computer program product includes one or more computer instructions or computer programs. When a computer instruction or computer program is loaded or executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instruction can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another computer-readable storage medium.
[0126] The present invention solves the problem of insufficient research in the prior art on the regional distribution, development trend and potential impact of drought assessment, which is caused by the spatial connection between the drought situation in one area and the drought situation in other areas. By combining multi-source feature aggregation, self-attention mechanism and optimized temporal convolutional network, a meteorological drought spatiotemporal prediction model is constructed. It can accurately predict the meteorological drought level in a preset future time period based on meteorological elements with multi-dimensional spatiotemporal characteristics, providing stronger support for the formulation of drought management plans to maintain natural resources and reduce losses caused by drought.
Claims
1. A meteorological drought prediction method based on spatiotemporal analysis, characterized in that: The following steps are involved: S1, obtain meteorological element data and drought index, and perform data preprocessing: S1-1, downloading various meteorological data of recent years, including precipitation, temperature, sunshine duration, relative humidity, evaporation and air pressure, and preprocessing the data, wherein outliers are replaced by the average value of nearby data, and missing values are filled using time interpolation; S1-2, calculating a meteorological drought assessment index using some of the meteorological element data in the data, and combining the standardized precipitation evapotranspiration index (SPEI) with the meteorological element data obtained in S1 to comprehensively assess the extent and impact of the drought; By calculating the standardized precipitation evapotranspiration index (SPEI), the drought index at the time scales of 1, 3, 6, and 12 months is obtained. The calculation formula is: Among them, C0=2.515517, C1=0.802853, C2=0.010328; d1=1.432788, d2=0.189269, d3=0.001308; Where F(X) is the cumulative function of the log-logistic probability distribution; S1-3, after merging the meteorological element data and SPEI values, normalize them and divide the processed data into a training set (80%) and a test set (20%); S1-4, feature selection is performed before inputting the data into the model. The Pearson correlation coefficient is used to measure the degree of linear relationship between the meteorological characteristics of the data set and the drought index of different time spans. The Pearson correlation coefficient ranges from -1 to +1, and the closer to +1, the higher the correlation. The calculation formula of the Pearson correlation coefficient is: Where r is the Pearson correlation coefficient, x i and y i are the observed values of two variables; and are the means of the two variables respectively; since not all positively correlated meteorological features have a significant impact on drought index prediction, different correlation thresholds are used to test the prediction performance, and meteorological features with relatively large impact on the output are extracted as input features; S2, site spatial correlation analysis: Calculate the probability of consistency between the drought levels of the target site and other sites during the same period, and select and determine sites with spatial correlation; The probability threshold is selected through experimental testing, and the results under different thresholds are compared to select the optimal threshold that can effectively identify related sites while avoiding excessive false positives; S2-1: The climate conditions are similar within the similar distance range. The upper limit of the distance between the relevant stations is set to 50-70 kilometers. The Haversine formula is used to calculate the distance between the two stations, that is, the calculation formula is: d = R·c; in, is the latitude of the two points in radians, ω is the longitude of the two points in radians, and R is the radius of the Earth; S2-2: Screen out sites with similar climatic conditions and significant consistency in drought levels. These sites are spatially correlated and classified into five levels of meteorological drought: no drought, mild drought, moderate drought, severe drought, and extreme drought. S2-3, integrate the spatiotemporal information of monitoring stations that meet spatial correlation, where the input feature is the four-dimensional vector X(B, T, N, C) of spatiotemporal data of different stations, where B represents the number of samples, T represents the time step, N represents the number of stations, and C represents the number of features; given the input feature X = [X1, X2, X3, ..., X n ] is a vector of N feature matrices containing spatiotemporal data from different sites. It integrates the input information of X in the dimensions of multiple sites and uses multiple 1×1 convolution kernels to expand the dimension of this multi-channel information. S2-4 uses a 1×1 convolution kernel to reduce the dimensionality to 1, aggregates the data features, and improves the feature extraction capability of information from multiple monitoring stations by increasing the dimensionality, aggregating the input data into a two-dimensional feature vector. The 1×1 convolution is a dimensionality increase or decrease module used to effectively increase model capacity, that is, increase nonlinearity to eliminate computational bottlenecks. S3, prediction model training: A spatiotemporal drought prediction model based on a temporal convolutional network was constructed by aggregating multiple features. The model was trained using the integrated multi-site information results and used as a drought prediction model to predict drought. S3-1 uses the data from the training set to input the prediction model. The vector containing the spatiotemporal feature information is input into the model. The model is trained using the forward propagation method. Through layer-by-layer processing, the abstract representation of the input features is effectively learned and extracted. The model parameters are then updated using backpropagation. After continuous iterative optimization, the optimal prediction model is generated. S3-2, the prediction model consists of a convolutional layer, a linear encoding layer, a self-attention layer, a temporal convolutional network (TCN), and a decoding layer; The convolution layer input is processed by the convolution layer and batch normalization layer to extract preliminary features; the convolution features are then encoded using the linear layer encoding layer and dropout is applied; the self-attention layer mechanism is then applied to the encoded features to capture global dependencies; the TCN is used to further extract temporal features; and finally, the decoder outputs the prediction results; S3-2-1, the query vector Q, key vector K and value vector V corresponding to the self-attention layer mechanism are calculated by using the similarity between Q and K to calculate the attention weight, and then the attention score is used to adjust the weight of the weighted sum of V of different inputs, that is, the formula is: d k is the dimension of each attention head; The forecasting model simultaneously focuses on and integrates different aspects of the input data sequence to improve the model's ability to handle long-term dependencies and complex relationships in meteorological data; S3-2-2, the temporal convolutional network is composed of a plurality of residual unit stacks, the residual module includes two convolution units and a nonlinear mapping unit, each convolution unit includes a one-dimensional dilated causal convolution, weight normalization, ReLU activation function and Dropout operation; The causal convolution is expressed as the current time t is only related to the input at time t and before time t; The extended convolution operation for the index of the input data sequence is described as: Where s is the index of the sequence used to represent the current time step or position, d is the dilation coefficient, k is the filter size, i is a non-negative integer, and sd·i is the localization of some information in the history; S3-2-3, the temporal convolutional network is a multi-layer fully convolutional network, with an input layer, a first hidden layer, a second hidden layer, a third hidden layer and an output layer connected in sequence; The convolution operation extracts useful features by moving the sliding window, i.e., the convolution kernel, on the feature matrix and calculating the weighted sum of the elements in the window and the convolution kernel. Each of the first, second, and third hidden layers gradually abstracts and extracts key information from the input data sequence through causal convolution. As the number of layers increases, the network captures more complex and higher-level features, thereby achieving efficient learning and feature extraction at different levels of the network. Adjust and set different network depths and filter sizes during the training and testing of the temporal convolutional network to improve model accuracy and flexibly adapt to the requirements of temporal feature extraction at different scales; S3-2-4, when constructing a prediction model, it is necessary to predefine hyperparameters, loss functions, and optimization algorithms of the meteorological drought spatiotemporal prediction model; the hyperparameters include the number of network layers, convolution kernel size, number of convolution kernels, learning rate, dropout rate, batch size, sequence length, and output dimension; wherein, a grid search is performed when specifying the number of network layers and kernel size of the meteorological drought spatiotemporal prediction model; The mean square error (MSE) was selected as the loss function in the training process, and the Adam optimizer was used to perform gradient descent optimization on the random objective function of the model. In the subsequent experiments, the performance and generalization ability of the prediction model were optimized by adjusting the parameters according to the experimental results. S3-3, the criteria for determining the spatiotemporal prediction model for meteorological drought are: Evaluation index determination coefficient R 2 and root mean square error RMSE; The index determination coefficient R 2 It indicates the degree of linear correlation between the predicted data and the observed data. It is an indicator of the model fit. The closer its value is to 1, the better the model fits the data. Its calculation formula is: Among them, y i is the observed value, is the predicted value, N is the number of data points; in, is the average of the actual values; The root mean square error (RMSE) is used to measure the average model prediction error and is used to indicate the closeness between the predicted value and the observed value. The lower the index value, the higher the prediction accuracy. The calculation formula is: S4, determining the drought severity of the area to be predicted based on the predicted drought index: The output results of the meteorological drought prediction model are analyzed, and the predicted SPEI values are classified into drought levels according to the drought level classification standard to determine the drought level of the predicted area within the next preset time period.
Citation Information
Patent Citations
Day-by-day meteorological drought prediction method and device, storage medium and equipment
CN116245227A
Photovoltaic power prediction method based on multi-scale space-time diagram attention convolutional network
CN117154704A