Pengtao Zhang, Hao Lan, Ao Mei, Jianping Huang, J Y Zhang, Juan Xi, Dayang Liu
ABSTRACT This study leverages near‐infrared (NIR) spectroscopy to develop a green analytical approach for the rapid screening of birch sap adulteration. NIR spectral data of samples were acquired using an NIR spectrometer, followed by sequential preprocessing via standard normal variate (SNV) transformation, multiplicative scatter correction (MSC), first derivative (1st Der), and Savitzky‐Golay (SG) smoothing filtering. The impact of distinct preprocessing strategies on model performance was systematically evaluated. Qualitative analysis results demonstrated that the dung beetle optimization algorithm‐enhanced support vector machine (DBO‐SVM) effectively discriminated between pure birch sap and samples with varying adulteration levels, achieving a discrimination accuracy of 98% after SNV preprocessing. In terms of quantitative analysis, the proposed hybrid model (CNN‐transformer‐ECA) integrating convolutional neural network (CNN), transformer, and efficient channel attention (ECA) mechanism outperforms traditional machine learning models and other deep learning architectures in predicting the concentration of adulteration. For water dilution adulteration, the R 2 p and RMSE p of the model's prediction set were 0.9482 and 2.6382, respectively. For sucrose solution adulteration, the corresponding R 2 p and RMSE P values were 0.9505 and 0.9086, respectively. A high RPD further confirmed the model's excellent fitting capability and generalization performance. Under the constraint of maintaining high quantitative accuracy, network slimming (NS) was employed to significantly enhance model efficiency and reduce model size, and the pruned lightweight model was deployed on an embedded development platform. This study marks the first application of NIR spectroscopy in birch sap quality inspection, providing a theoretical foundation and technical framework for the rapid, non‐destructive quality monitoring of related liquid beverages. Practical Applications This research enables food companies to quickly test birch water purity using a simple light scan, ensuring product quality before it reaches stores. Consumers would benefit from more reliable natural beverages, as this technology helps prevent adulterated products from being sold. The method provides a faster, cheaper alternative to traditional lab testing for quality control.