Tarim River Basin (TRB), located at the Eurasia center, is a typical arid inland basin. It is critical to maintain the ecological security of TRB for the sustainable development of oases. With the inputs of four period land use data, the landscape ecological risk assessment model, the minimum cumulative resistance model, and network analysis were applied to analyze the landscape ecological security pattern and to optimize the landscape pattern. The results show that, during the period 1990–2020, (1) landscape ecological risks of TRB increased by 1.76%; (2) landscape ecological risks tend to agglomerate in space in each period. The clusters of high-high risk are mainly distributed in the central and eastern desert areas, while low-low risk clusters are mainly distributed in watersheds Oasis and mountains. (3) Ecological security pattern network of the basin becomes more complex and better. The optimized pattern, called Oasis Corridor Functional Area with one ring, two screens, two belts, ten corridors, and multicenter, is expected to provide reference for the ecological environment management and restoration.
Under multiple stresses such as an arid climate, water scarcity, and desertification, inland river basins in arid regions represent a typically fragile ecosystem worldwide, and their ecological security faces increasingly complex and severe challenges. To address the limitations of traditional assessment methods characterized by single-perspective approaches, difficulties in quantifying indicators, and lack of a systematic framework for arid basins, this study constructed an innovative Health–Service–Risk–Sensitivity (HSRS) framework. Taking the Tarim River Basin (TRB) as a case study, the validity and necessity of this framework were validated through the Remote Sensing Ecological Index (RSEI) and correlation analysis. Furthermore, the XGBoost–SHAP model was further integrated to identify key threshold responses of multidimensional driving factors within the basin. The findings indicate that the ecological security of the TRB progressively improved, with approximately 11.64% of the area showing significant enhancement. The four most influential driving factors were land use, NDVI, human activity intensity, and soil moisture. Notably, the study identified critical environmental thresholds: when DEM ranged from 1500 to 3000 m and slope from 2° to 30°, constraining effects on the Comprehensive Ecological Security Index (CESI) increased. When annual precipitation exceeded 150 mm, NDVI was greater than 0.35, and soil moisture content exceeded 0.14 m3/m3, the constraint effect was further strengthened. Overall, the integration of the HSRS framework and the XGBoost-SHAP model offers a novel and effective approach for ecological security assessment in arid inland basins. Moreover, this approach has substantial practical implications for achieving precise coordination between regional ecological protection and sustainable development.