Ecological system health space-time driven attribution analysis method based on IGTWR-XGBoost
By combining the IGTWR-XGBoost method with geographic-temporal weighted regression and the XGBoost model, the challenges of handling spatiotemporal heterogeneity and nonlinear relationships in ecosystem health analysis in existing technologies were resolved, enabling accurate analysis and prediction of the driving factors of ecosystem health and enhancing the scientific basis for ecological and environmental protection.
Patent Information
- Application Number
- CN202510964420.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-14
- Publication Date
- 2025-10-28
AI Technical Summary
Existing methods for analyzing the driving factors of ecosystem health have difficulty in synergistically handling spatiotemporal heterogeneity, factor interaction effects, and nonlinear relationships when processing complex ecological data, resulting in limited model application scenarios and an inability to accurately analyze the spatiotemporal driving mechanisms of ecosystems.
A method based on IGTWR-XGBoost is adopted, combining the geographic-temporal weighted regression model with the XGBoost model. A multidimensional local regression coefficient matrix is obtained through an interactive geographic spatiotemporal weighted regression model, a spatiotemporal enhancement feature matrix is constructed, and the SHAP method is used to quantify the contribution of driving factors to achieve accurate prediction of the ecosystem health index.
It has significantly improved the accuracy and reliability of the analysis of the driving mechanisms of ecosystem health, provided a precise scientific basis for ecological and environmental protection, and can identify and analyze the multi-source driving factors that affect ecosystem health.
Smart Images

Figure CN120851250A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of environmental science and ecological monitoring technology, and in particular to a spatiotemporal driven attribution analysis method for ecosystem health based on IGTWR-XGBoost. Background Technology
[0002] Existing methods for analyzing ecosystem health drivers largely rely on traditional geostatistical models (such as geographically weighted regression (GWR)) and machine learning techniques (such as random forests). While these methods are effective in specific scenarios, they exhibit significant limitations when dealing with complex ecological data. For example, while classic GWR models can characterize spatial heterogeneity, they fail to capture dynamic evolutionary features over time; and while traditional machine learning methods can handle high-dimensional nonlinear relationships, they often overlook the spatial dependencies of geographic data, limiting the models' practical applications. Furthermore, existing methods often employ a single model framework, making it difficult to collaboratively address spatiotemporal heterogeneity, factor interaction effects, and nonlinear relationships. These limitations severely restrict the in-depth analysis and accurate prediction of ecosystem spatiotemporal driving mechanisms, necessitating the development of novel analytical methods that integrate spatiotemporal weighting mechanisms with the advantages of machine learning. Summary of the Invention
[0003] The purpose of this invention is to provide a spatiotemporal attribution analysis method for ecosystem health based on IGTWR-XGBoost, which can accurately identify and analyze the driving factors affecting ecosystem health, fully consider the spatiotemporal nonstationarity, spatial dependence and complex nonlinear relationships of the data, and quantitatively analyze the interaction between driving factors, thereby significantly improving the accuracy and reliability of ecosystem health driving mechanism analysis, and providing accurate scientific basis for ecological environment protection and policy formulation.
[0004] To achieve the above objectives, the present invention provides the following solution:
[0005] A spatiotemporal attribution analysis method for ecosystem health based on IGTWR-XGBoost, comprising:
[0006] Obtain ecosystem health indicators for the target area, calculate the ecosystem health index for the target area based on the ecosystem health indicators, and collect multi-source driving factors that affect ecosystem health;
[0007] An interactive geospatial-geospatial weighted regression model will be constructed based on the aforementioned multi-source driving factors, the aforementioned ecosystem health index, and the geo-temporal weighted regression model.
[0008] Based on the interactive geospatial-geographic weighted regression model, obtain the multidimensional local regression coefficient matrix;
[0009] Modify the multi-source driving factors according to the multi-dimensional local regression coefficient matrix, and construct a spatio-temporal enhanced feature matrix;
[0010] Input the spatio-temporal enhanced feature matrix into the XGBoost model to output the prediction results of the ecosystem health index and the global and local contribution degrees of each driving factor. Among them, the XGBoost model is obtained through training with a training set, and the training set includes historical driving factors and ecosystem health indices.
[0011] Optionally, calculating the ecosystem health index of the target area according to the ecosystem health indicators includes:
[0012]
[0013] Among them, EV is the ecosystem vitality, EO is the ecosystem organization ability, ER is the ecosystem resilience, ES is the ecosystem service, EEQ is the ecological environment quality, and EH is the ecosystem health index.
[0014] Optionally, constructing an interactive geospatial-temporal weighted regression model includes:
[0015] Use the GeoDetector method to screen the multi-source driving factors to obtain candidate factors;
[0016] Perform a multicollinearity test on the candidate factors, and use the stepwise regression method to introduce or eliminate variables one by one to obtain the driving factors and interaction terms;
[0017] Input the driving factors into the geospatial-temporal weighted regression model, use the ecosystem health index as the explained variable, and the driving factors and interaction terms as the explanatory variables to construct the interactive geospatial-temporal weighted regression model.
[0018] Optionally, the interactive geospatial-temporal weighted regression model is:
[0019]
[0020] Among them, y i is the observed value of the dependent variable of the i-th sample; (u i , v i , t i ) where u i , v i are the geographical coordinates of the i-th sample, and t i is the observation time point of the i-th sample; x ik is the observed value of the k-th single independent variable of the i-th sample; x il represents the factor x im and x inThe interaction term between them represents the values of the m-th and n-th independent variables of sample i; β0(u i ,v i ,t i ) is a spatiotemporal location (u i ,v i ,t i Local intercept at ); β k (u i ,v i ,t i ) is (u i ,v i ,t i The local coefficient of the k-th single independent variable at position ); β l (u i ,v i ,t i )x il It is a spacetime location (u i ,v i ,t i The interaction coefficient at position i; ε i It is a random error term.
[0021] Optionally, obtaining the multidimensional local regression coefficient matrix based on the interactive geospatial-geographic weighted regression model includes:
[0022] Calculate the spatial and temporal distances based on the sample's geographic coordinates and observation time points;
[0023] Calculate the spatiotemporal distance based on the spatial distance and temporal distance;
[0024] Calculate the spatiotemporal weights based on the spatiotemporal distance, and construct a spatiotemporal weight matrix based on the spatiotemporal weights;
[0025] Based on the interactive geospatial-temporal weighted regression model, the observed values of individual independent variables and their corresponding interaction terms are obtained in the sample to obtain the explanatory variable matrix;
[0026] Calculate the coefficient vector corresponding to the sample point based on the spatiotemporal weight matrix and the explanatory variable matrix;
[0027] Arrange the coefficient vectors corresponding to the sample points to obtain a multidimensional local regression coefficient matrix.
[0028] Optionally, modifying the multi-source driving factors based on the multidimensional local regression coefficient matrix includes: multiplying the multidimensional local regression coefficient matrix element-wise with the multi-source driving factors to obtain the spatiotemporal enhancement feature matrix.
[0029] Optionally, training the XGBoost model using the training set includes: using historical ecosystem health indices as target variables, training with a gradient boosting tree model, analyzing the nonlinear relationship between historical driving factors and ecosystem health indices, and ranking the importance of historical driving factors.
[0030] Optionally, obtaining the global and local contribution values for each driving factor includes:
[0031] The XGBoost model is interpreted using the SHAP method to quantify the contribution of the driving factors to the ecosystem health index and output the global and local contribution values of each driving factor.
[0032] The beneficial effects of this invention are as follows: The method of this invention adopts the IGTWR-XGBoost approach, combining linear regression models and nonlinear machine learning methods to analyze the driving factors of ecosystem establishment. IGTWR provides a locally linear interpretation, revealing the strength and direction of factors in specific spatiotemporal contexts; XGBoost, based on this, fits complex relationships, improving overall prediction accuracy; and SHAP quantifies the factor contributions in machine learning. The predictive performance of this method is superior to that of simple GWR or XGBoost models, providing a more accurate quantitative analysis of the driving factors of ecosystem health. Attached Figure Description
[0033] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0034] Figure 1 This is an overall flowchart of an ecosystem health spatiotemporal driven attribution analysis method based on IGTWR-XGBoost according to an embodiment of the present invention;
[0035] Figure 2 This is a heatmap and prediction function distribution diagram of SHAP according to an embodiment of the present invention;
[0036] Figure 3 This is a graph showing the distribution of SHAP values and the importance of variables in an embodiment of the present invention. Detailed Implementation
[0037] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0038] 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.
[0039] This embodiment provides a spatiotemporal driven attribution analysis method for ecosystem health based on IGTWR-XGBoost, including:
[0040] Obtain ecosystem health indicators for the target area, calculate the ecosystem health index for the target area based on the ecosystem health indicators, and collect multi-source driving factors that affect ecosystem health;
[0041] An interactive geospatial-geographic weighted regression model will be constructed based on multi-source driving factors, ecosystem health index, and geo-temporal weighted regression model.
[0042] Based on the interactive geospatial-temporal weighted regression model, obtain the multidimensional local regression coefficient matrix;
[0043] Based on the multidimensional local regression coefficient matrix, the multi-source driving factors are corrected, and a spatiotemporal enhanced feature matrix is constructed.
[0044] The spatiotemporal augmentation feature matrix is input into the XGBoost model, which outputs the prediction results of the ecosystem health index and the global and local contributions of each driving factor. The XGBoost model is trained using a training set, which includes historical driving factors and the ecosystem health index.
[0045] Specifically, the collection of multi-source driving factors affecting ecosystem health includes: natural environmental factors (such as annual average evapotranspiration, annual average temperature, annual average precipitation, elevation, slope, aspect, etc.) and human activity factors (such as land use type, population density, etc.) in the target area.
[0046] Furthermore, the calculation of the ecosystem health index of the target area based on ecosystem health indicators includes:
[0047]
[0048] Among them, EV represents ecosystem vitality, EO represents ecosystem organization, ER represents ecosystem resilience, ES represents ecosystem services, EEQ represents ecological environment quality, and EH represents ecosystem health index.
[0049] Furthermore, constructing an interactive geospatial and temporal weighted regression model includes:
[0050] Using the GeoDetector method to screen multi-source driving factors and obtain candidate factors;
[0051] Conducting a multicollinearity test on the candidate factors, and using the stepwise regression method to introduce or eliminate variables one by one to obtain the driving factors and interaction terms;
[0052] Inputting the driving factors into the geospatial-temporal weighted regression model, using the ecosystem health index as the explained variable, and the driving factors and interaction terms as the explanatory variables to construct an interactive geospatial and temporal weighted regression model.
[0053] Specifically, single factors and interaction factors that are significantly related to the spatial distribution of EH (such as "annual average temperature × land use type", "population density × slope", etc.) are screened out through GeoDetector; substituting them into the GTWR model to establish an interactive geospatial-temporal weighted regression (IGTWR) model, and outputting the local regression coefficients and interaction coefficients of each factor; the results reveal the differences in the effects of each driving factor at the spatial and temporal scales, and identify the heterogeneous distribution pattern of the driving mechanism among regions.
[0054] Furthermore, the interactive geospatial and temporal weighted regression model is:
[0055]
[0056] where y i is the observed value of the dependent variable of the i-th sample; in (u i , v i , t i ), u i , v i are the geographical coordinates of the i-th sample, and t i is the observation time point of the i-th sample; x ik is the observed value of the k-th single independent variable of the i-th sample; x il represents the interaction term between factor x im and x in , representing the values of the m-th and n-th independent variables of sample i; β0(u i , v i , t i ) is the local intercept at the spatio-temporal position (u i , v i , t i ); β k (u i , v i , t i ) is (u i,v i ,t i The local coefficient of the k-th single independent variable at position ); β l (u i ,v i ,t i )x il It is a spacetime location (u i ,v i ,t i The interaction coefficient at position i; ε i It is a random error term.
[0057] Furthermore, based on the interactive geospatial-geographic weighted regression model, the multidimensional local regression coefficient matrix is obtained, including:
[0058] Calculate the spatial and temporal distances based on the sample's geographic coordinates and observation time points;
[0059] Calculate the spatiotemporal distance based on spatial distance and temporal distance;
[0060] Calculate the spatiotemporal weights based on the spatiotemporal distance, and construct the spatiotemporal weight matrix based on the spatiotemporal weights;
[0061] Based on the interactive geospatial-temporal weighted regression model, the observed values of individual independent variables and their corresponding interaction terms are obtained from the sample to obtain the explanatory variable matrix;
[0062] Calculate the coefficient vector corresponding to the sample points based on the spatiotemporal weight matrix and the explanatory variable matrix;
[0063] Arrange the coefficient vectors corresponding to the sample points to obtain the multidimensional local regression coefficient matrix.
[0064] Furthermore, the modification of the multi-source driving factors based on the multi-dimensional local regression coefficient matrix includes: multiplying the multi-dimensional local regression coefficient matrix element by element with the multi-source driving factors to obtain the spatiotemporal enhancement feature matrix.
[0065] Specifically, the multidimensional local regression coefficient matrix output by IGTWR is multiplied by the original driving factors using Hadamard element-wise multiplication to obtain a feature input matrix that incorporates spatiotemporal local influences.
[0066] Furthermore, training the XGBoost model using the training set includes: using historical ecosystem health indices as the target variable, training with a gradient boosting tree model, analyzing the nonlinear relationship between historical driving factors and ecosystem health indices, and ranking the importance of historical driving factors.
[0067] Furthermore, obtaining the global and local contribution values for each driving factor includes:
[0068] The SHAP method is used to interpret the XGBoost model, quantify the contribution of driving factors to the ecosystem health index, and output the global and local contribution values of each driving factor.
[0069] Specifically, XGBoost is used for training, and the SHAP tool is introduced for interpretability analysis to quantify the contribution of each factor, quantify the impact of each factor on ecosystem health, and formulate corresponding ecosystem protection measures based on the contribution values.
[0070] The method of this embodiment will be further described below with reference to the accompanying drawings:
[0071] like Figure 1 As shown, a spatiotemporal attribution analysis method for ecosystem health based on IGTWR-XGBoost includes:
[0072] S1. Assess the ecosystem health of the target area based on the VORSE framework and collect data on driving factors. The VORSE framework (Ecosystem Health Assessment Framework) is a multi-dimensional assessment method used to systematically measure the health status of ecosystems, covering five aspects: ecosystem vitality (EV), ecosystem organization (EO), ecosystem resilience (ER), ecosystem services (ES), and ecological environment quality (EEQ).
[0073] S101. Ecosystem vitality (EV) is represented by the kernel normalized index; ecosystem organization (EO) is represented by landscape heterogeneity and landscape connectivity; ecosystem resilience (ER) is represented by the weighted sum of the area of various land use types and the ecological resilience coefficient within the region; ecosystem services (ES) are represented by a comprehensive ecosystem service index calculated by calculating food supply services, water production services, soil conservation services, carbon storage services, and habitat quality services; ecological environment quality (EEQ) is represented by a remote sensing ecological index constructed by calculating humidity, greenness, aridity, and heat indicators using the GEE platform; through... Calculate the ecosystem health index of the target area.
[0074] ① Construction of Ecosystem Vitality (EV) Indicators:
[0075] Ecosystem vitality (EV) refers to the metabolic capacity or primary productivity of an ecosystem and is one of the key indicators for assessing the integrity of an ecosystem system. Because vegetation indices are positively correlated with vegetation productivity and can effectively monitor ecological environment quality, they are widely used to characterize ecosystem vitality. NDVI is easily affected by soil background, atmospheric noise, and saturation, reducing its estimation accuracy. In 2021, Camps-Valls et al. proposed a kernel normalized vegetation index (kNDVI) based on machine learning and kernel method theory. This index outperforms NDVI and the near-infrared vegetation index (NIRv) in various application scenarios, biological communities, and climate zones, and is better resistant to saturation, bias, and complex phenological cycles, making it more suitable for handling noise, saturation, and complex phenology. Furthermore, kNDVI has a solid theoretical foundation, is easy to calculate and apply, and has high value for the study of natural and agricultural systems. Therefore, this embodiment uses the kernel normalized vegetation index (kNDVI) to characterize ecosystem vitality. The calculation formula is as follows:
[0076]
[0077] In the formula, NIR is the reflectance value in the near-infrared band, Red is the reflectance value in the red band, and σ is a length scale parameter specified for a specific application, representing the sensitivity of the index to sparse / dense vegetation areas. It is usually taken as the average of the near-infrared and red band reflectance values, i.e., σ = 0.5(NIR + Red). The formula simplifies to:
[0078] kNDVI = tanh(NDVI) 2 );
[0079] In the formula, tanh is the hyperbolic tangent function, and NDVI is the normalized vegetation index.
[0080] ② Construction of Ecosystem Organizing Capacity (EO) Indicators:
[0081] Ecosystem organization (EO) is a concept used to describe the structural stability and complexity of ecosystems, composed of two core elements: landscape heterogeneity (LH) and landscape connectivity (LC). EO is typically quantified based on the calculation results of landscape pattern indices. This embodiment quantifies landscape heterogeneity using the Shannon diversity index and fractal dimension, and characterizes landscape connectivity using the spread index and landscape segmentation index. The calculation formulas are as follows:
[0082] EO=0.25×SHDI+0.25×AWMPFD+0.25×CONTAG+0.25×DIVISION;
[0083] In the formula: EO represents ecosystem organization, SDHI represents the Shannon diversity index, CONTAG represents the spread index, and DIVISION represents the landscape segmentation index.
[0084] ③ Construction of Ecosystem Resilience (ER) Indicators:
[0085] Ecosystem resilience (ER) refers to the ability of a landscape patch to maintain its original function and structure under the disturbance of natural and human factors. It reflects the resistance and adaptation of landscape patches in an ecosystem to external disturbances, i.e., ecosystem elasticity or resilience. According to existing research, land use can reflect ecosystem resilience. A resilience coefficient is set according to the ease of restoration for different land use types. Ecosystem resilience is represented by a weighted sum of the area of various land use types and their ecological resilience coefficients within a region, as follows:
[0086]
[0087] In the formula: R represents the resilience of the regional ecosystem, A t A represents the total land use area of the study area. i RC represents the area of the i-th land use type. i Let represent the ecological resilience coefficient of the i-th land use type. Based on existing research, the ecological resilience coefficients for cultivated land, forest land, grassland, water area, construction land, and unused land are 0.3, 0.8, 0.7, 0.8, 0.2, and 1, respectively.
[0088] ④ Construction of Ecosystem Service (ES) Indicators:
[0089] Ecosystem service provision is generally defined as the capacity of an ecosystem to provide desired services and products to human society within a given geographical area and within the limits of sustainability. This embodiment, referencing relevant literature, studies ecosystem services in terms of water production, carbon storage, soil conservation, and habitat quality based on the InVEST model. Specific calculation methods are shown in Table 1.
[0090] Table 1
[0091]
[0092] An integrated ecosystem services index (ESCI) comprising water production services, soil conservation, habitat quality, and carbon sequestration services is constructed, and the specific calculation formula is as follows:
[0093]
[0094] Where: ES b The standardized results for each ecosystem service, ES is the initial value of the ecosystem service; ES max Maximum service to the ecosystem; ES minThe minimum value of ecosystem services; ESCI is the Integrated Ecosystem Services Index. bi Standardized results for serving the i-th type of ecosystem.
[0095] ⑤ Construction of Ecological Environment Quality (EEQ) Indicators:
[0096] Ecological Equalization (EEQ) can effectively reflect changes in the strength of the ecological environment under the combined influence of natural processes and socio-economic factors. This method uses Remote Sensing Ecological Index (RSEI) to assess the current status and changes in EEQ. Using the Google Earth Engine (GEE) platform, Landsat TM / OLI image data was integrated, and RSEI values were obtained through principal component analysis of four indicators: Greenness Variable Index (NDVI), Humidity Variable Index (WET), Heat Variable Index (LST), and Dryness Variable Index (NDSI).
[0097] S102. Collect multi-source driving factors, including natural environmental factors (such as annual average evapotranspiration, annual average temperature, annual average precipitation, elevation, slope, aspect, etc.) and human activity factors (such as land use type, population density, etc.), and perform necessary preprocessing.
[0098] S2. Construction of the Interactive Geospatial Weighted Regression Model (IGTWR):
[0099] S201. Use the GeoDetector method to screen potential factors affecting ecosystem health. Calculate the q-value for each factor and detect interactions. Focus on single factors with high q-values, and factor combinations that have nonlinearly enhanced explanatory power through interactions. The purpose of this step is to identify key factors affecting ecosystem health and their interactions within a specific region and time period. The GeoDetector is a novel statistical method used in recent years to detect spatial heterogeneity and reveal its driving mechanisms. It consists of four modules: risk detection, factor detection, ecological detection, and interaction detection. This method mainly uses the factor detection and interaction detection modules from the GeoDetector.
[0100] The core of factor detection is that if an independent variable x has an influence on a dependent variable y, then the spatial distributions of the independent and dependent variables should converge. The calculation formula is as follows:
[0101]
[0102] In the formula, q is the probing power of the probe factor on the dependent variable, q∈[0,1]. The larger the q value, the stronger the explanatory power of the independent variable x on the dependent variable y, and vice versa; N, σ 2 Represents the total sample size and variance of the study area; L represents the number of probe zones; N i , This represents the sample size and variance of different partitions.
[0103] Interaction detection mainly calculates the q - value of independent variables x1 and x2 for the dependent variable y and the q - value of y after the interaction of x1 and x2, and then compares the q - value of the single factor with the q - value after the two - factor interaction to determine the type and direction of the interaction. The interaction relationship can be divided into 5 categories, as shown in Table 2 for details.
[0104] Table 2
[0105]
[0106] S202. On the basis of the GeoDetector screening, further examine the multicollinearity between candidate factors to ensure the independence between the selected variables. Adopt the step - by - step regression method to introduce or eliminate variables one by one, and finally determine the driving factors and their interaction terms included in the model. This process aims to construct a factor set that not only has high explanatory power but also avoids redundancy and multicollinearity problems.
[0107] S203. Substitute the determined driving factors into the geographically - temporally weighted regression (GTWR) model, with the ecosystem health index as the explained variable and the driving factors and their interaction terms as the explanatory variables, to construct an interactive geospatial - temporal weighted regression model (IGTWR).
[0108] The specific expression of the IGTWR model is as follows:
[0109]
[0110] where y i is the observed value of the dependent variable for the i - th sample; in (u i , v i , t i ), u i , v i are the geographical coordinates of the i - th sample, and t i is the observation time point of the i - th sample; x ik is the observed value of the k - th single independent variable for the i - th sample; x il represents the interaction term between factors x im and x in , which represents the values of the m - th and n - th independent variables of sample i, l = p + 1, …, q, m, n = 1, 2, …, p. β0(u i , v i , t i ) is the local intercept at the spatio - temporal position (u i , v i , t i ); β k (u i , v i , ti ) is (u i ,v i ,t i The local regression coefficient of the k-th independent variable at position k (local coefficients, reflecting the spatial heterogeneity and temporal dynamics of the individual effects of each factor); β l (u i ,v i ,t i )x il It is a spacetime location (u i ,v i ,t i The local regression coefficient of the i-th interaction term at position ε (interaction coefficient, reflecting the strength of the interaction and spatial heterogeneity between the two factors); i It is a random error term.
[0111] S3. Obtaining the multidimensional local regression coefficient matrix through IGTWR includes:
[0112] The IGTWR (Interactive Geographic and Temporally Weighted Regression) model was used to model the health drivers of multi-source ecosystems, obtaining a set of local regression coefficients for each observed sample at its corresponding time and spatial location, forming a multidimensional local coefficient regression matrix. This matrix contains two types of spatiotemporal sensitivity parameters: local coefficient β. k (u i ,v i ,t i The interaction coefficient β reflects the local influence of a single factor at its spatiotemporal location. l (u i ,v i ,t i )x il This reflects the strength and spatial heterogeneity of the interaction between the two factors at that spatiotemporal location.
[0113] S301. In the IGTWR model estimation process, in order to achieve local spatial and temporal weighting, the following spatiotemporal weighting function needs to be defined:
[0114] The spatiotemporal weight matrix is constructed as follows:
[0115] ① Definition of spatiotemporal distance:
[0116] To obtain spatiotemporal weights, spatiotemporal distance needs to be defined. This combines spatial distance and temporal distance:
[0117] Definition of spatial distance:
[0118] Definition of time distance:
[0119] Definition of spatiotemporal distance:
[0120] Among them, h s h t These are bandwidth parameters for spatial and temporal scales, used to adjust the proportion of spatial and temporal influence.
[0121] ② Gaussian kernel weighting function:
[0122] The spatiotemporal weight matrix is calculated based on spatiotemporal distance, and a Gaussian function is usually chosen to quantize the spatiotemporal weights.
[0123]
[0124] in, This represents the spatiotemporal influence weight of sample point j on sample point i; the spatiotemporal weight decreases exponentially with increasing distance, and the closer the distance, the higher the weight.
[0125] ③ Construct the spatiotemporal weight matrix W i :
[0126] Based on spatiotemporal weights A spatiotemporal weight matrix can be constructed for each data point. Assuming there are N data points, the spatiotemporal weight matrix W for the i-th data point... i It is a diagonal matrix, and its diagonal elements are the spatiotemporal weights between each point.
[0127]
[0128] This matrix is a diagonal matrix based on spatiotemporal distance weighting, which can assign corresponding spatiotemporal influence to each observation point.
[0129] S302. Construct the explanatory variable matrix:
[0130] All single variables x in the sample ik and the corresponding interaction term x il Organize the samples according to their numbers to form an explanatory variable matrix X containing p+q variables. ext , where p is the number of individual variables and q is the number of interaction terms.
[0131] S303, Locally Weighted Regression Estimation:
[0132] For sample point i, the constructed spatiotemporal weight matrix W is used. i The weighted least squares method is used to estimate all regression coefficients at this sample point. The calculation formula is as follows:
[0133]
[0134] Where, θ (i) This represents the coefficient vector corresponding to the i-th sample point, containing β0(u i,v i ,t i ), β k (u i ,v i ,t i ) and β l (u i ,v i ,t i ); X ext For the explanatory variable matrix; W i is the spatiotemporal weight matrix; Y is the observation vector.
[0135] S304. Constructing a multidimensional local regression coefficient matrix:
[0136] Repeat the above estimation process for all sample points, arrange the coefficient vectors of each sample sequentially, and construct a multidimensional local regression coefficient matrix:
[0137]
[0138] This matrix is the set of local regression coefficients output by the model, which will be used to construct the spatiotemporal enhancement feature matrix.
[0139] S4. Spatiotemporal Enhancement Feature Construction and XGBoost+SHAP-Driven Attribution Analysis:
[0140] S401. Construct the spatiotemporal enhanced feature matrix:
[0141] After obtaining the multidimensional local regression coefficient matrix output by the IGTWR model, to further enhance the input features' ability to perceive spatiotemporal heterogeneity, this matrix is weighted element-wise with the original multi-source driving factors to construct a spatiotemporally enhanced feature matrix. The specific operation is as follows: For each observed sample point, the original factor value is multiplied by its corresponding local regression coefficient using Hadamard (element-wise) multiplication:
[0142] X weighted =W IGTWR ⊙X original ;
[0143] Where ⊙ represents Hadamard element-wise multiplication, W IGTWR Let X be a multidimensional local regression coefficient matrix. original This is the original driving factor matrix.
[0144] S402. Input the spatiotemporal augmented feature matrix into the XGBoost model, using the ecosystem health index and the global and local contributions of factors derived based on the SHAP method as target variables. Train the model using a gradient boosting tree model to explore the nonlinear relationship between driving factors and ecosystem health, and rank the importance of factors. Use the SHAP (Shapley Additive explanations) method to interpret the XGBoost model, quantify the contribution of driving factors to the ecosystem health index, output the global and local contribution values of each factor, and clarify the importance ranking of factors and the interaction patterns between factors.
[0145] Figure 2 The SHAP heatmap and prediction function distribution map show that annual average evapotranspiration and annual average temperature are the main positive driving factors in most samples; while population density and land use type mostly show negative effects; the driving intensity varies significantly among different spatial units, showing a good ability to identify spatial heterogeneity. Figure 3 This is a plot showing the distribution of SHAP values and the importance of variables. Annual average evapotranspiration contributes the most to kNDVI, indicating that climate factors are an important natural driver of ecological health. Annual average temperature and annual average rainfall also have significant positive effects on ecological health. High population density is significantly negatively correlated with ecological health, revealing the inhibitory effect of urban expansion on ecosystems. Factors such as elevation and slope mainly show their influence in specific regions, exhibiting regional characteristics. The violin plot shows the direction of the factors' effects (negative on the left, positive on the right) and their distribution, helping to reveal the complex nonlinear relationships of the factors' influence.
[0146] Based on the above results, the method in this embodiment can guide relevant departments to formulate more precise ecological restoration and management measures. For example: ecological water replenishment and conservation area planning: increasing water conservation forests and wetland restoration in areas that significantly contribute to annual average evapotranspiration; urban edge control zone design: establishing ecological buffer zones in areas with high population density and serious land use conflicts; topographic control measures: implementing policies of limiting construction and expansion and returning farmland to forest in high-slope and high-altitude areas; temporal regulation: conducting seasonal vegetation regulation and meteorological disaster early warning based on the time dynamic response output by XGBoost.
[0147] The embodiments described above are merely preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Various modifications and improvements made to the technical solutions of the present invention by those skilled in the art without departing from the spirit of the present invention should fall within the protection scope defined by the claims of the present invention.
Claims
1. A spatiotemporal attribution analysis method for ecosystem health based on IGTWR-XGBoost, characterized in that, include: Obtain ecosystem health indicators for the target area, calculate the ecosystem health index for the target area based on the ecosystem health indicators, and collect multi-source driving factors that affect ecosystem health; An interactive geospatial-geospatial weighted regression model will be constructed based on the aforementioned multi-source driving factors, the aforementioned ecosystem health index, and the geo-temporal weighted regression model. Based on the interactive geospatial-geographic weighted regression model, obtain the multidimensional local regression coefficient matrix; Based on the multidimensional local regression coefficient matrix, the multi-source driving factors are corrected to construct a spatiotemporal enhanced feature matrix; The spatiotemporal enhancement feature matrix is input into the XGBoost model, which outputs the prediction results of the ecosystem health index and the global and local contributions of each driving factor. The XGBoost model is obtained by training a training set, which includes historical driving factors and the ecosystem health index.
2. The spatiotemporal driven attribution analysis method for ecosystem health based on IGTWR-XGBoost according to claim 1, characterized in that, The calculation of the ecosystem health index of the target area based on the aforementioned ecosystem health indicators includes: Among them, EV represents ecosystem vitality, EO represents ecosystem organization, ER represents ecosystem resilience, ES represents ecosystem services, EEQ represents ecological environment quality, and EH represents ecosystem health index.
3. The spatiotemporal driven attribution analysis method for ecosystem health based on IGTWR-XGBoost according to claim 1, characterized in that, Constructing an interactive geospatial-temporal weighted regression model includes: The GeoDetector method is used to filter the multi-source driving factors and obtain candidate factors; The candidate factors were subjected to multicollinearity test, and stepwise regression was used to introduce or remove variables one by one to obtain the driving factors and interaction terms. The driving factors are input into the geographic-temporal weighted regression model, with the ecosystem health index as the dependent variable and the driving factors and interaction terms as explanatory variables, to construct the interactive geographic-temporal weighted regression model.
4. The spatiotemporal driven attribution analysis method for ecosystem health based on IGTWR-XGBoost according to claim 1, characterized in that, The interactive geospatial-temporal weighted regression model is as follows: Among them, y i is the observed value of the dependent variable of the i-th sample; (u i , v i , t i ) where u i , v i are the geographical coordinates of the i-th sample, and t i is the observation time point of the i-th sample; x ik is the observed value of the k-th single independent variable of the i-th sample; x il represents the interaction term between factor x im and x in , representing the values of the m-th and n-th independent variables of sample i; β0(u i , v i , t i ) is the local intercept at the spatio-temporal location (u i , v i , t i ); β k (u i , v i , t i ) is the local coefficient of the k-th single independent variable at (u i , v i , t i ); β l (u i , v i , t i )x il is the i-th interaction coefficient at the spatio-temporal location (u i , v i , t i ); ε i is the random error term.
5. The spatiotemporal driven attribution analysis method for ecosystem health based on IGTWR-XGBoost according to claim 1, characterized in that, Based on the interactive geospatial-temporal weighted regression model, the multidimensional local regression coefficient matrix is obtained as follows: Calculate the spatial and temporal distances based on the sample's geographic coordinates and observation time points; Calculate the spatiotemporal distance based on the spatial distance and temporal distance; Calculate the spatiotemporal weights based on the spatiotemporal distance, and construct a spatiotemporal weight matrix based on the spatiotemporal weights; Based on the interactive geospatial-temporal weighted regression model, the observed values of individual independent variables and their corresponding interaction terms are obtained from the sample to obtain the explanatory variable matrix; Calculate the coefficient vector corresponding to the sample points based on the spatiotemporal weight matrix and the explanatory variable matrix; Arrange the coefficient vectors corresponding to the sample points to obtain a multidimensional local regression coefficient matrix.
6. The spatiotemporal driven attribution analysis method for ecosystem health based on IGTWR-XGBoost according to claim 1, characterized in that, The correction of the multi-source driving factor based on the multidimensional local regression coefficient matrix includes: multiplying the multidimensional local regression coefficient matrix element by element with the multi-source driving factor to obtain the spatiotemporal enhancement feature matrix.
7. The spatiotemporal driven attribution analysis method for ecosystem health based on IGTWR-XGBoost according to claim 1, characterized in that, Training the XGBoost model using the training set includes: using historical ecosystem health indices as the target variable, training with a gradient boosting tree model, analyzing the nonlinear relationship between historical driving factors and ecosystem health indices, and ranking the importance of historical driving factors.
8. The spatiotemporal driven attribution analysis method for ecosystem health based on IGTWR-XGBoost according to claim 1, characterized in that, Obtaining the global and local contribution values for each driving factor includes: The XGBoost model is interpreted using the SHAP method to quantify the contribution of the driving factors to the ecosystem health index and output the global and local contribution values of each driving factor.
Citation Information
Patent Citations
Ecological system health analysis method and system and electronic equipment
CN117829423A
Urban blue-green space ecological benefit key influence factor identification method
CN119130243A
Cited By
Shoreline health evaluation method based on space-time coupling diagnosis
CN121998439A
A shoreline health assessment method based on spatiotemporal coupling diagnosis
CN121998439B
