Abstract:The lack of online detection methods for spatial moisture content distribution during the curing process in bulk curing barns leads to delayed process control responses and frequent issues such as greenish and spotted tobacco leaves. A novel online detection method was proposed based on a sparse weighing network and machine learning. This method established a nonlinear mapping from local moisture content measurements to spatial distribution, using dynamic features including tobacco weight, instantaneous dehydration rate, and ambient temperature and humidity from the front section of the barn, combined with the spatial coordinates of target points. On this basis, Bayesian optimization (BO) was employed to globally optimize the hyperparameters of the constructed XGBoost model, resulting in a predictive model adapted to the stage-varying temperature and humidity characteristics. An online detection system integrated with the weighing sensor network was developed and validated. Results demonstrated that the proposed prediction model delivered excellent prediction performance on the independent test set, with a coefficient of determination (R2) of 0. 996, a mean absolute error (MAE) of 0. 76% and a root mean square error (RMSE) of 1. 14% for the original wet basis moisture content of tobacco leaves, significantly outperforming the conventional SVR and MLP models. Online validation tests showed that the average R2 between the predicted and measured original moisture content was 0. 978, with mean absolute error of 2. 77% and average RMSE of 3. 66% , demonstrating the system??s high reliability. The coefficients of variation for spatial moisture content distribution during the yellowing (38℃), color-fixing (48℃), and stem-drying (65℃) stages were 1. 73% , 8. 27% , and 20. 02% , respectively, clearly indicating a gradual decline in moisture uniformity as curing progressed and confirming the system??s capability to effectively quantify the spatial distribution uniformity. The findings can provide technical support for the precise control of tobacco curing process parameters.