Abstract:Soil total nitrogen (TN) is one of the core indicators for evaluating soil fertility, and hyperspectral technology provides an important means for rapid estimation of soil TN. This study took farmland soils in the Yinchuan Plain as the research object, based on hyperspectral data of 147 soil samples collected by an ASD FieldSpec 4 spectroradiometer. Three preprocessing methods (original reflectance (R), first-order derivative reflectance (FDR), and continuum removal (CR)) were compared. The CARS (Competitive Adaptive Reweighted Sampling) algorithm was used for feature variable selection, and partial least squares regression (PLSR) and random forest (RF) were employed to construct soil TN estimation models. Model performance was evaluated using the coefficient of determination (R2), root mean square error (RMSE), and relative percent deviation (RPD). The results showed that in full-band PLSR modeling, R preprocessing achieved the best performance (validation R2=0.4839, RPD=1.41), followed by FDR (R2=0.4781, RPD=1.40), while CR performed the worst (R2=0.2408, RPD=1.16). CARS significantly improved the model accuracy of R preprocessing, compressing the number of variables from 2001 to 270, with validation R2 increasing to 0.6494 and RPD to 1.71, reaching an acceptable level. CARS performed poorly on FDR preprocessing, indicating that CARS is more suitable for original reflectance spectra. PLSR outperformed RF under all preprocessing conditions, suggesting that linear models have better generalization advantages under small sample conditions. R+CARS-PLSR was identified as the optimal model (validation R2=0.6494, RMSE=0.1037 g/kg, RPD=1.71), which can provide a methodological reference for rapid estimation of soil TN in farmland soils of the Yinchuan Plain.