## 3 Research Methods  
### Habitat Quality Assessment  
Using the Habitat Quality module of the InVEST model and land use data from the study area, this study conducted an assessment of the habitat quality in Pingshan County. The model considers four primary factors that influence habitat quality: the relative impact of each threat; the distance between the grid cell and the source of the threat; the degree of legal protection afforded to the grid cell; and the relative sensitivity of each habitat type to threats [21,22]. Given the comprehensive nature of our country's laws and regulations on ecological environment protection, the influence of legal protection on habitat quality was not considered in this analysis.  
Based on the actual land use conditions in the study area, along with the reference values recommended by the InVEST model guide and associated studies [23, 24, 25, 26, 27], construction land, unused land, and arable land have been identified as habitat threat factors. The maximum impact distances of these threat factors, their respective weights (Table 1), and the sensitivity of the habitat to each threat factor (Table 2) have been established.  
Considering that the model attributes habitat quality degradation to increased land use intensity in the vicinity, it is necessary to first compute the degree of habitat degradation. The formula used for this calculation is provided in references [28,29]:  
\[D_{xi}=\sum\limits_{r=1}^{R}\sum\limits_{y=1}^{Y_{r}}\left(\frac{w_{r}}{\sum \limits_{r=1}^{R}w_{r}}\right)r_{y}i_{rxy}\gamma_{x}S_{ir} \tag{1}\]  
\[i_{xy}=1-\left(\frac{d_{xy}}{d_{\max}}\right) \tag{2}\]  
\[i_{xy}=\exp\left(\frac{-2.99d_{xy}}{d_{\max}}\right) \tag{3}\]  
\[Q_{xi}=H_{i}\left[1-\left(\frac{D_{xi}^{z}}{D_{xi}^{z}+k^{2}}\right)\right] \tag{4}\]  
In the specified formula, \(D_{xi}\) represents the degree of habitat degradation for grid \(x\) within land use type \(i\); \(R\) is the total number of threat factors; \(w_{r}\) is the weight assigned to threat factor \(r\); \(Y_{r}\) represents the number of grids affected by threat factor \(r\); \(r_{y}\) denotes the intensity of the threat factor in grid \(y\); \(i_{xy}\) quantifies the extent of the threat from stressor \(r_{y}\) in grid \(y\) to grid \(x\); \(\gamma_{x}\) is the disturbance resistance level of grid \(x\); \(S_{ir}\) is the sensitivity of different land use types to threat factor \(r\); \(d_{xy}\) measures the distance between grid  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Threat Factor** & **Maximum Influence Distance/km** & **Weight** & **Spatial Decline Type** \\ \hline Cultivated Land & 1.50 & 0.60 & Linear \\ Construction Land & 6.00 & 1.00 & Exponent \\ Unutilized Land & 2.00 & 0.40 & Linear \\ \hline \hline \end{tabular}
\end{table}
Table 1: Threat factor parameters.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Land Use Type** & **Habit Suitability** & \multicolumn{3}{c}{**Threat Factor Sensitivity**} \\  & & **Cultivated Land** & **Construction Land** & **Unutilized Land** \\ \hline Cultivated Land & 0.40 & 0.25 & 0.50 & 0.30 \\ Forest Land & 1.00 & 0.80 & 1.00 & 0.70 \\ Grass Land & 0.80 & 0.70 & 0.80 & 0.80 \\ Water Area & 0.70 & 0.65 & 0.75 & 0.75 \\ Construction Land & 0.00 & 0.00 & 0.00 & 0.00 \\ Unutilized Land & 0.10 & 0.10 & 0.30 & 0.10 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Habitat quality suitability of different land use types and their relative sensitivity to threat factors.  
and grid \(y\); \(d_{max}\) is the maximum influence distance for threat factor \(r\); \(Q_{xi}\) indicates the habitat quality of grid \(x\) within land use type \(i\); \(H_{i}\) is the habitat suitability for land use type \(i\); \(k\) is the half-saturation constant, typically set as half of the maximum value of habitat degradation; \(z\) is a default parameter for the model, set at 2.5.