Abstract:Soil salinization has always been an important factor restricting the sustainable development of agriculture in Northwest China. In order to explore the rapid inversion model of soil salinity at different depths in different growth stages of alfalfa land, soil salinity at the depths of 0~15cm,15~30cm and 30~50cm in the branching stage, budding stage and early flowering stage of alfalfa land was collected. Based on the multispectral image data of UAV, the spectral reflectance of sampling points was extracted. On this basis, the red band was introduced instead of the red band and the near-infrared band to calculate the spectral index. Pearson correlation corfficient (PCCs) and gray relational analysis (GRA) were used for index screening. A total of 54 machine learning models based on extreme gradient boosting (XGBoost) algorithm, back propagation neural network (BPNN) and random forest (RF) were constructed to determine the optimal inversion model of soil layers at different depths in different growth stages of alfalfa land. The results showed that the inversion effect of XGBoost model was better than that of BPNN model and RF model, and the inversion results could truly reflect the soil salt content of alfalfa field at different growth stages. According to the inversion of different growth stages, the inversion effect of XGBoost model in branching stage and early flowering stage was better than that of other models. The determination coefficient of validation set (R2p) was 0.835 and 0.709, respectively, the root mean square error (RMSE) was 0.042% and 0.047%, respectively, and the mean absolute error (MAE) was 0.046% and 0.037%, respectively. The inversion effect of RF model was better than that of other models, with R2p of 0.717, RMSE of 0.034% and MAE of 0.042%. From the perspective of different depths inversion, the inversion effect of XGBoost model in 0~15cm soil layer was better than that of other models. The R2p was 0.835, the RMSE was 0.053%, and MAE was 0.043%. The XGBoost and RF models were superior to the BPNN model in 15~30cm and 30~50cm soil layers, with R2p of 0.717 and 0.739, RMSE of 0.034% and 0.038%, and MAE of 0.042% and 0.031%, respectively.The branching period was the best inversion growth period, and the depth of 0~15cm was the best salinity inversion depth, and the coupling model of PCCs variable screening method and XGBoost machine learning algorithm had the best accuracy. The R2 of the modeling set and the verification set were 0.856 and 0.835, respectively, and R2p/R2c was 0.975, which had good robustness. The research results can provide a theoretical basis for rapid and accurate inversion of soil salinity.