Time sequence prediction model-based arid region SPEI index prediction method and system
By gridding the arid region and performing time series prediction independently for each grid point, and combining XGBoost and training with multiple models, the signal dilution problem caused by a uniform model across the entire region was solved, and higher accuracy SPEI index prediction was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HUNAN INST OF WATER RESOURCES & HYDROPOWER RES
- Filing Date
- 2025-12-30
- Publication Date
- 2026-04-17
AI Technical Summary
Existing global unified models are prone to problems when training different grid points, such as the spatial averaging of drought signals, dilution of local features, and limited overall prediction accuracy.
The target area is divided into grid cells. A time series prediction model is used to independently predict the SPEI index for each grid point. The trend residual is decomposed using the XGBoost regression model. Multiple time series prediction models (such as LSTM, GRU, and ARIMA) are combined for training and evaluation. The difference order is optimized to improve the prediction accuracy.
It significantly improves the accuracy and reliability of spatial distribution prediction of SPEI index in arid areas, and can capture local climate characteristics and drought evolution patterns more precisely, thereby enhancing the adaptability and stability of the model.
Smart Images

Figure CN121880792A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of SPEI index prediction technology in arid regions, and in particular to a method and system for predicting SPEI index in arid regions based on a time series prediction model. Background Technology
[0002] Drought is one of the most frequent and widespread progressive natural disasters. Its harm depends not only on precipitation deficit but also on rising temperatures, enhanced evapotranspiration, and human water consumption patterns. To quantify drought intensity and risk, dozens of evaluation indicators such as SPI, PDSI, and MCI have been proposed both domestically and internationally since the 20th century. Among them, the Standardized Precipitation Evapotranspiration Index (SPEI) is listed as the preferred indicator for regional drought trend detection because it considers both precipitation and potential evapotranspiration and has comparability across multiple time scales (such as 1-48 months). However, existing unified models train different grid points into the same set of parameters, resulting in spatial averaging of drought signals, dilution of local features, and limited overall prediction accuracy. Summary of the Invention
[0003] To address the shortcomings of existing technologies, this invention provides a method and system for predicting the SPEI index in arid regions based on a time series prediction model. This solves the technical problem that existing global unified models, which train different grid points into the same set of parameters, are prone to spatial averaging of drought signals, dilution of local features, and limited overall prediction accuracy.
[0004] To address the aforementioned technical problems, this invention provides the following technical solution: a method for predicting the SPEI index in arid regions based on a time series prediction model, comprising the following steps: Acquire time-series data samples of the target area that include SPEI data, precipitation data, and SPEI index data over a historical period. The time series data samples are input into the preset SPEI index prediction model. The time series data samples are gridded and preprocessed. The trend residual decomposition is performed on the preprocessed SPEI data of each grid point to obtain the trend component auxiliary sequence. Then, the SPEI data is used as an endogenous variable, and the precipitation data, trend component auxiliary sequence and corresponding time characteristics are used as exogenous variables. The SPEI index is predicted based on the preset independent time series prediction model of each grid point. The SPEI index prediction model is trained based on several evaluation indicators. Predict SPEI index data after a certain period of time based on a trained SPEI index prediction model and time series data samples.
[0005] Preferably, the specific steps of the preprocessing are as follows: The missing data rate is obtained by calculating the ratio of the number of missing SPEI data and precipitation data at each time point within each grid point to the total amount of data. Check sequentially whether the missing rate of each grid point is less than the missing rate threshold; If so, the missing data for that grid point will be filled in using interpolation. If not, then discard the grid point and the corresponding time series data sample.
[0006] Preferably, the specific steps for obtaining the trend component auxiliary sequence are as follows: Construct an independent XGBoost regression model for each grid point; The time characteristics corresponding to the SPEI data are used as input variables, and the numerical values of the SPEI data are used as target variables. The XGBoost regression model is trained by minimizing the squared error loss function between the predicted and actual values of SPEI data, while incorporating L1 or L2 regularization constraints. The trend component auxiliary sequence of SPEI data was extracted using the trained XGBoost regression model.
[0007] Preferably, the specific parameters for training the XGBoost regression model are as follows: the maximum depth of the decision tree is set to 3-5 layers, the learning rate is set to 0.05-0.1, and the regularization coefficient is explicitly configured.
[0008] Preferably, the time features include at least a time index, seasonal cycle coding, and climate cycle phase.
[0009] Preferably, the specific steps for training the SPEI index prediction model are as follows: Establish a rolling time window with a span of at least 12 months; By rolling the time window and extracting data sequences from the SPEI data, precipitation data and trend component auxiliary sequence at preset step sizes, several SPEI data sequence segments, precipitation data sequence segments and trend component auxiliary sequence segments are obtained respectively. Each segment of SPEI data sequence, precipitation data sequence, and trend component auxiliary sequence is labeled as a sample, and the samples obtained each time in the rolling time window with a preset step size are used to construct a sample set. The SPEI data sequence fragments corresponding to the SPEI data in the sample set are used as endogenous variables, while the precipitation data sequence fragments and trend component auxiliary sequence fragments corresponding to the precipitation data and trend component auxiliary sequence, as well as the corresponding time features, are used as exogenous variables. The sample set is divided into a training set and a test set, and the SPEI index is predicted based on an independent time series prediction model preset for each grid point in order to train the model. The output includes a time series forecasting model and a SPEI index forecasting model based on several evaluation indicators.
[0010] Preferably, the time series prediction model includes one or more, and each time series prediction model is trained using a sample set to output the time series prediction model that best meets several evaluation indicators.
[0011] Preferably, the time series prediction model includes an ARIMA model, and the optimal difference order d is determined point by point using the dual test methods of ADF and KPSS, with the autoregression order p=1 and the moving average order q=1 fixed.
[0012] The present invention also provides a SPEI index prediction system for arid regions, including a processor and a memory, wherein the memory is used to store a computer program, and the computer program, when executed by the processor, implements the SPEI index prediction method for arid regions.
[0013] By employing the above technical solution, the present invention provides a method and system for predicting the SPEI index in arid regions based on a time series prediction model, which has at least the following beneficial effects: 1. This invention overcomes the problem of spatial averaging of drought signals caused by parameter sharing in traditional unified models by gridding the target area and establishing an independent time series prediction model for each grid point. It can capture and reflect local climate characteristics and drought evolution patterns more precisely, thereby significantly improving the prediction accuracy and reliability of the SPEI index in the spatial distribution of arid areas and providing more targeted technical support for regional drought monitoring and risk assessment.
[0014] 2. This invention uses the XGBoost regression model to perform trend-residual decomposition on the SPEI data at each grid point, extracts the trend components as auxiliary sequences to input into the time series prediction model, effectively reduces the impact of non-stationarity of the time series, enhances the model's adaptability to long-term climate change, and at the same time suppresses overfitting through regularization and conservative parameter settings, thereby improving the model's stability and generalization performance in long-term time series forecasts.
[0015] 3. This invention constructs a sample set through a rolling time window and supports parallel training and evaluation of various time series prediction models (such as LSTM, GRU, ARIMA, etc.). It can automatically select the optimal model based on the characteristics of each grid point data, and optimize the difference order by combining ADF and KPSS tests, thereby achieving local adaptation of model configuration and further improving the accuracy of prediction results and the applicability of the method under different geographical and climatic conditions. Attached Figure Description
[0016] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments of this application and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 This is a flowchart of the SPEI index prediction method for arid regions based on a time series prediction model according to the present invention. Figure 2 This is a comparison chart of the actual and predicted values for a certain experimental area of the present invention in January 2019; Figure 3 This is a comparison chart of the actual and predicted values for a certain test area of this invention in February 2019; Figure 4 This is a comparison chart of the actual and predicted values for a certain experimental area of this invention in March 2019; Figure 5 This is a comparison chart of the actual and predicted values for a certain test area of this invention in April 2019; Figure 6 This is a comparison chart of the actual and predicted values for a certain experimental area of this invention in May 2019; Figure 7 This is a comparison chart of the actual and predicted values for a certain experimental area of the present invention in June 2019; Figure 8 This is a comparison chart of the actual and predicted values for a certain experimental area of the present invention in July 2019; Figure 9 This is a comparison chart of the actual and predicted values for a certain experimental area of the present invention in August 2019; Figure 10 This is a comparison chart of the actual and predicted values for a certain experimental area of this invention in September 2019; Figure 11 This is a comparison chart of the actual and predicted values for a certain experimental area of this invention in October 2019; Figure 12 This is a comparison chart of the actual and predicted values for a certain experimental area of this invention in November 2019; Figure 13 This is a comparison chart of the actual and predicted values for a certain experimental area in December 2019. Detailed Implementation
[0017] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. This will allow for a full understanding of how the present application uses technical means to solve technical problems and achieve technical effects, and to facilitate its implementation.
[0018] To address the technical problem that existing global unified models, which cram different grid points into the same set of parameters for training, easily lead to spatial averaging of drought signals, dilution of local features, and limited overall prediction accuracy, this invention provides a drought zone SPEI index prediction method based on a time series prediction model. This method divides the target region into grids of a certain size as the smallest computational unit, directly performs trend separation and model training on the grid point SPEI, and finally stitches them together to form a spatially seamless drought forecast field that preserves local details. Figure 1 As shown, the method includes the following steps: S1. Obtain time-series data samples containing SPEI data, precipitation data and SPEI index data for a target area over a historical period, such as collecting monthly SPEI (CHM_Drought), precipitation (CHM_PREV2) data and SPEI index data for the target area from 1990 to 2020.
[0019] S2. Input the time series data sample into the preset SPEI index prediction model, and grid the time series data sample. For example, use a 0.1° grid as the smallest calculation unit for the target area. Then, use tools such as Python to mask and clip the vector boundary of the target area and the NC grid data to generate a time series CSV file for each grid point in a unified coordinate system.
[0020] The gridded data is then preprocessed to ensure data quality. The specific steps are as follows: First, the ratio of the number of missing SPEI and precipitation data points at each time point within each grid cell to the total data volume is calculated to obtain the missing data rate. The calculation formula can be expressed as: ; in, This indicates the number of missing values (such as NaN, NULL, or no records) in the time series. This indicates the preset total time length (e.g., total number of months) for the time series.
[0021] Subsequently, based on a preset missing rate threshold, typically set to 5%, the missing rate of each grid point is sequentially checked to see if it is less than the threshold. If so, the missing data of the grid point is completed using interpolation methods, such as cubic spline interpolation, to obtain a complete SPEI data and precipitation data sequence with continuous timestamps. If not, it indicates that the grid point has severe data loss. To avoid introducing excessive bias into the interpolation, the grid point and its corresponding time series data sample are discarded. That is, the time series data sample of the grid point will not be used for any subsequent modeling training and prediction calculations.
[0022] After preprocessing, trend residual decomposition is required for the preprocessed SPEI data at each grid point to obtain the trend component auxiliary sequence. For the standardized precipitation evapotranspiration index (SPEI) data sequence at each grid point, this embodiment uses the XGBoost (Extreme Gradient Boosting) algorithm for trend-residual decomposition. XGBoost, as an efficient implementation of the gradient boosting machine framework, accurately extracts the long-term trend component from the SPEI data through the following steps: First, an independent XGBoost regression model is constructed for each grid point. Then, the time features corresponding to the SPEI data are used as input variables, where the time features include at least the time index, seasonal cycle encoding, and climate cycle phase. Simultaneously, the numerical value of the SPEI data is used as the target variable. Then, the XGBoost regression model is trained by minimizing the squared error loss function between the predicted and actual values of the SPEI data, combined with L1 or L2 regularization constraints. The trained XGBoost regression model extracts the trend component auxiliary sequence of the SPEI data, achieving nonlinear fitting of the long-term evolution law of the SPEI data. The expression for the trend component auxiliary sequence can be expressed as: ; In the above formula, where Let be the residual at time t, which is also the trend component auxiliary sequence. The values are from the original SPEI data. To extract the trend components, the residual sequence excludes long-term climate trends and mainly contains seasonal fluctuations and random noise, providing an auxiliary sequence of trend components for subsequent time series prediction models.
[0023] During the training of the XGBoost regression model, a conservative training strategy is adopted to control the model complexity and prevent overfitting. Therefore, the specific parameters during the training of the XGBoost regression model can be set as follows: the maximum depth of the decision tree is set to 3-5 layers, the learning rate is set to 0.05-0.1, and the regularization coefficient is explicitly configured.
[0024] Subsequently, SPEI data was used as an endogenous variable, while precipitation data, trend component auxiliary sequences, and corresponding temporal characteristics were used as exogenous variables. SPEI index prediction was then performed based on an independent time series prediction model pre-set for each grid point. The SPEI index prediction model was trained using several evaluation indicators. The specific steps for training the SPEI index prediction model are as follows: First, a sample set needs to be established. The specific method is as follows: Establish a rolling time window spanning at least 12 months. Using this rolling time window, extract data sequences from the SPEI data, precipitation data, and trend component auxiliary sequence at preset step sizes, respectively, for the same time period. This yields several SPEI data sequence segments, precipitation data sequence segments, and trend component auxiliary sequence segments. These can be expressed as: SPEI(t-11)…SPEI(t), PRE(t-11)…PRE(t), and the trend component auxiliary sequence P… (t-11)…P(t), SPEI(t-11)...SPEI(t) is a data sequence of SPEI data for the past 12 months, where t represents the current month and t-11 represents 11 months ago. That is, it represents the SPEI values for 12 consecutive months, 11 months prior to the current month. Similarly, PRE(t-11)…PRE(t) and P(t-11)…P(t) are the precipitation values and residual values for 12 consecutive months, 11 months prior to the current month, respectively. For example, if it is currently December 2020, then: SPEI(t-11) represents the SPEI value for January 2020. SPEI(t-10) represents the SPEI value for February 2020. ... SPEI(t-1) represents the SPEI value in November 2020. SPEI(t) represents the SPEI value for December 2020. PRE(t-11)...PRE(t) is the precipitation sequence of the past 12 months, which has the same time structure as SPEI, that is, the precipitation values for 12 consecutive months, starting from the current month and going back 11 months.
[0025] The trend component auxiliary sequence P(t-11)...P(t) is the trend component decomposed from the SPEI data, reflecting the long-term trend of SPEI and removing seasonality and random fluctuations.
[0026] Subsequently, each extracted SPEI data sequence fragment, precipitation data sequence fragment, and trend component auxiliary sequence fragment is labeled as a sample, and a sample set is constructed by acquiring samples with a preset step size each time in the rolling time window.
[0027] The SPEI data sequence fragments corresponding to the SPEI data in the sample set are used as endogenous variables, and the precipitation data sequence fragments and trend component auxiliary sequence fragments corresponding to the precipitation data and trend component auxiliary sequence, as well as the corresponding time features, are used as exogenous variables. The sample set can be divided into training set and test set according to 7:3, and SPEI index prediction is performed based on the independent time series prediction model preset at each grid point for model training. During model training, when it's unknown which model the implementation example applies to, multiple deep networks can be run independently for each grid point, such as: a) LSTM (hidden=120, 240, dropout=0.3), b) GRU (hidden=120, 240, dropout=0.3), c) BP (hidden=120, 240, dropout=0.3), d) RNN (hidden=120, 240, dropout=0.3), etc. Optimization algorithms are used to search for the learning rate, batch size, and regularization coefficient. Then, each time series prediction model is trained using a sample set to output the time series prediction model that best meets several evaluation metrics. During training, this embodiment further selects the ARIMA model as the time series prediction model and uses ADF (Augmented Rendering Function) to perform the training. The Dickey-Fuller and KPSS (Kwiatkowski-Phillips-Schmidt-Shin) dual-test method is used to determine the optimal difference order d value on a grid-by-grid basis to ensure the stationarity of the time series. The ARIMA model requires the time series to be in a relatively stationary state when making predictions. At the same time, combined with meteorological research experience and computational efficiency considerations, the autoregression order p=1 and the moving average order q=1 are fixed to form the basic configuration of ARIMA(1,d,1), and the maximum likelihood estimation method can be used to estimate the model parameters.
[0028] The output includes a time series forecasting model and a SPEI index forecasting model using several evaluation indicators. For example, with the forecast period from January 2014 to December 2020, independent forecasts are performed month by month, generating monthly SPEI forecast sequences after 2014 for each grid point. This constructs a spatiotemporal forecast dataset for the entire study area, which is then compared with the actual values. The RMSE (Real-Time Sequence), MAE (Mean Absolute Error), and other metrics are used for each grid cell. Indicators such as the coefficient of determination are used to evaluate the accuracy of the prediction results, thereby obtaining the time series prediction model and the SPEI index prediction model with the best fit.
[0029] S3. Based on the trained SPEI index prediction model and time series data samples, predict the SPEI index data after a period of time.
[0030] This invention trains a time series prediction model separately for each grid point and automatically selects the best one. The weights corresponding to each grid point are independent, completely eliminating spatial smoothing errors. XGBoost is used to extract the SPEI trend, and the model then learns the trend components and rainfall data to finally predict forecast values. This significantly reduces non-stationarity and improves the accuracy of long series. Using this method, simulation verification was completed in a test area, ultimately generating a drought prediction map, as shown below. Figures 2-13 As shown, this embodiment demonstrates the feasibility of the approach and its scalability.
[0031] The present invention also provides a SPEI index prediction system for arid regions, including a processor and a memory, wherein the memory is used to store a computer program, and the computer program is executed by the processor to implement a method for predicting the SPEI index in arid regions.
[0032] Those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing related hardware. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0033] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. Since the above embodiments are substantially similar to the method embodiments, their descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0034] The above embodiments provide a detailed description of the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for predicting the SPEI index in arid regions based on a time series forecasting model, characterized in that, The method includes the following steps: Acquire time-series data samples of the target area that include SPEI data, precipitation data, and SPEI index data over a historical period. The time series data samples are input into the preset SPEI index prediction model. The time series data samples are gridded and preprocessed. The trend residual decomposition is performed on the preprocessed SPEI data of each grid point to obtain the trend component auxiliary sequence. Then, the SPEI data is used as an endogenous variable, and the precipitation data, trend component auxiliary sequence and corresponding time characteristics are used as exogenous variables. The SPEI index is predicted based on the preset independent time series prediction model of each grid point. The SPEI index prediction model is trained based on several evaluation indicators. Predict SPEI index data after a certain period of time based on a trained SPEI index prediction model and time series data samples.
2. The method for predicting the SPEI index in arid regions according to claim 1, characterized in that, The specific steps of the preprocessing are as follows: The missing data rate is obtained by calculating the ratio of the number of missing SPEI data and precipitation data at each time point within each grid point to the total amount of data. Check sequentially whether the missing rate of each grid point is less than the missing rate threshold; If so, the missing data for that grid point will be filled in using interpolation. If not, then discard the grid point and the corresponding time series data sample.
3. The method for predicting the SPEI index in arid regions according to claim 1, characterized in that, The specific steps for obtaining the trend component auxiliary sequence are as follows: Construct an independent XGBoost regression model for each grid point; The time characteristics corresponding to the SPEI data are used as input variables, and the numerical values of the SPEI data are used as target variables. The XGBoost regression model is trained by minimizing the squared error loss function between the predicted and actual values of SPEI data, while incorporating L1 or L2 regularization constraints. The trend component auxiliary sequence of SPEI data was extracted using the trained XGBoost regression model.
4. The method for predicting the SPEI index in arid regions according to claim 3, characterized in that, The specific parameters for training the XGBoost regression model are as follows: the maximum depth of the decision tree is set to 3-5 layers, the learning rate is set to 0.05-0.1, and the regularization coefficient is explicitly configured.
5. The method for predicting the SPEI index in arid regions according to claim 1, characterized in that, The time features include at least a time index, seasonal cycle coding, and climate cycle phase.
6. The method for predicting the SPEI index in arid regions according to claim 1, characterized in that, The specific steps for training the SPEI index prediction model are as follows: Establish a rolling time window with a span of at least 12 months; By rolling the time window and extracting data sequences from the SPEI data, precipitation data and trend component auxiliary sequence at preset step sizes, several SPEI data sequence segments, precipitation data sequence segments and trend component auxiliary sequence segments are obtained respectively. Each segment of SPEI data sequence, precipitation data sequence, and trend component auxiliary sequence is labeled as a sample, and the samples obtained each time in the rolling time window with a preset step size are used to construct a sample set. The SPEI data sequence fragments corresponding to the SPEI data in the sample set are used as endogenous variables, while the precipitation data sequence fragments and trend component auxiliary sequence fragments corresponding to the precipitation data and trend component auxiliary sequence, as well as the corresponding time features, are used as exogenous variables. The sample set is divided into a training set and a test set, and the SPEI index is predicted based on an independent time series prediction model preset for each grid point in order to train the model. The output includes a time series forecasting model and a SPEI index forecasting model based on several evaluation indicators.
7. The method for predicting the SPEI index in arid regions according to claim 1, characterized in that, The time series prediction model includes one or more, and each time series prediction model is trained using a sample set to output the time series prediction model that best meets several evaluation indicators.
8. The method for predicting the SPEI index in arid regions according to claim 7, characterized in that, The time series prediction model includes an ARIMA model, and the optimal difference order d is determined point by point using the dual test methods of ADF and KPSS. The autoregression order p=1 and the moving average order q=1 are fixed.
9. A system for implementing the SPEI index prediction method for arid regions according to any one of claims 1-8, characterized in that, It includes a processor and a memory, the memory being used to store a computer program, which, when executed by the processor, implements the SPEI index prediction method for arid regions as described in any one of claims 1-8.
Citation Information
Patent Citations
Spatial gridding drought disaster risk assessment method and system based on multi-source data
CN111737651A
High-resolution drought index prediction method and device, electronic equipment and storage medium
CN118585750A
Global drought spatio-temporal variation AI prediction method, system and equipment
CN118916695A
Method of preparing negative electrode material for lithium secondary battery and negative electrode material for lithium secondary battery prepared thereby
KR1020240088577A
System for Multivariate Climate Change Forecasting With Uncertainty Quantification
US20170176640A1