Abstract:Milk contains many nutritional elements needed by the human body, such as fat, protein, calcium, etc. Therefore, analysing nutritional elements in milk is a key part of milk safety detection. Hyperspectral technology can effectively identify nutritional elements in milk by combining image and spectral data. In order to quickly and accurately predict protein content in milk, the Competitive Adaptive Reweighted Sampling (CARS) algorithm was used to select characteristic wavelengths. A method based on Sparrow Search Algorithm (SSA) to optimize Support Vector Machine (SVM) was proposed to predict milk protein content. The reflectance spectra of milk (400~1 000 nm) extracted by the hyperspectral spectrometer were used for the experiment. During Normalization (N), Standardization and Multiplicative Scatter Correction (MSC), the original milk data are used for spectral noise reduction to improve spectral utilization. The successive projections algorithm (SPA) and the competitive adaptive re-weighting algorithm were used to extract the feature wavelengths from the processed milk spectral data. The correlation coefficients between proteins and the spectrum were calculated and ranked by importance to obtain the important feature wavelengths. In the end, through SVM, the Genetic Algorithm (GA)-SVM, Particle Swarm Optimization (PSO)-SVM and Partial Least-Regression (PLS) algorithm was used to predict milk proteins and compare the prediction results. In order to improve the accuracy of protein prediction and model stability, SSA was proposed to optimize the kernel function G and penalty parameter C of SVM. Root Mean Squared Error (RMSE) was used as the fitness function, and the optimal regression parameters were selected through iteration to train the model. The results of milk data prediction showed that the optimal combination model was MSC-CARS-SSA-SVM. The determination coefficient R2 of the model test set was 0.999 6, the root means square error RMSE was 0.001 1, and the time was 4.112 1 seconds. The results show that the CARS algorithm can extract the characteristic bands and eliminate redundant information, thus improving the efficiency of the model and simplifying the algorithm’s complexity. The SSA algorithm optimizes SVM’s parameters and can quickly obtain the global optimal solution by iteratively updating the optimal position. Compared with SVM, GA-SVM, PSO-SVM and PLS, the prediction accuracy and model stability are significantly improved, which meets the accuracy requirements of milk detection, and is a feasible new method for fast detection of milk protein. It provides a theoretical reference for the optimization of spectral models and the improvement of prediction model accuracy.
Key words:Hyperspectral; Milk protein; Competitive adaptive reweighted sampling; Support vector machine; The sparrow search algorithm
刘美辰,薛河儒,刘江平,代荣荣,胡鹏伟,黄 清,姜新华. 牛奶蛋白质含量的SSA-SVM高光谱预测模型[J]. 光谱学与光谱分析, 2022, 42(05): 1601-1606.
LIU Mei-chen, XUE He-ru, LIU Jiang-ping, DAI Rong-rong, HU Peng-wei, HUANG Qing, JIANG Xin-hua. Hyperspectral Analysis of Milk Protein Content Using SVM Optimized by Sparrow Search Algorithm. SPECTROSCOPY AND SPECTRAL ANALYSIS, 2022, 42(05): 1601-1606.
[1] Laverroux S,Picard F, Andueza D, et al. Food Chemistry, 2021, 342: 128310.
[2] FAN Rui, SUN Xiao-kai, CHEN Jie, et al (范 睿, 孙晓凯, 陈 杰, 等). Modern Food Science and Technology(现代食品科技), 2017, 33(11): 264.
[3] HUANG Bao-ying, SHE Zhi-yun, WANG Wen-min, et al(黄宝莹, 佘之蕴, 王文敏, 等). China Brewing(中国酿造), 2020, 39(7): 16.
[4] Munir M T,Vilson D I, Yu W, et al. Journal of Food Engineering, 2018, 221: 1.
[5] ZHAO Zi-zhu, WEI Yong, ZHANG Nai-qian, et al(赵紫竹,卫 勇,张乃迁, 等). China Dairy Industry(中国乳品工业), 2018, 46(2): 45.
[6] LUO Hao-dong, LIU Cui-ling, SUN Xiao-rong, et al(罗浩东, 刘翠玲, 孙晓荣, 等). China Brewing(中国酿造), 2021, 40(4): 183.
[7] Xuan Wang,Wang Yanxue. Journal of Physics: Conference Series, 2021, 1820(1): 012078.
[8] ZHANG Xu-hui, ZHANG Kai-xin, ZHANG Chao, et al(张旭辉, 张楷鑫, 张 超, 等). Journal of Xi’an University of Science and Technology(西安科技大学学报), 2020, 40(5): 760.
[9] Yang J,Sun L J, Xing W,et al. Spectrochimica Acta Part A: Molecular and Biomolecular Spectroscopy, 2021, 253: 119585.
[10] SHEN Zhi-chao, ZHAO Zhi-heng, LU Lei, et al(申志超, 赵志衡, 卢 雷,等). Journal of the Chinese Cereals and Oils Association(中国粮油学报), 2021, 36(3): 140.
[11] TAO Zhi-yong, YU Zi-jia, LIN Sen(陶志勇, 于子佳, 林 森). Journal of Electronic Measurement and Instrumentation(电子测量与仪器学报), 2021, 35(1): 18.
[12] LI Ya-li, WANG Shu-qin, CHEN Qian-ru, et al(李雅丽, 王淑琴, 陈倩茹, 等). Computer Engineering and Applications(计算机工程与应用), 2020, 56(22): 1.
[13] LÜ Xin, MU Xiao-dong, ZHANG Jun(吕 鑫, 慕晓冬, 张 钧). Systems Engineering and Electronics(系统工程与电子技术), 2021, 43(2): 318.
[14] ZHOU Meng-ran, YU Dao-yang, HU Feng, et al(周孟然, 余道洋, 胡 锋, 等). Journal of Henan Normal University·Natural Science Edition(河南师范大学学报·自然科学版), 2021, 49(2): 46.
[15] YUAN Zi-ran, WEI Li-fei, ZHANG Yang-xi, et al(袁自然, 魏立飞, 张杨熙, 等). Spectroscopy and Spectral Analysis(光谱学与光谱分析), 2020, 40(2): 567.
[16] XIAO Hai-jun, LU Chang-jing, HE Fan(肖海军, 卢常景, 何 凡). Journal of South-Central University for Nationalities·Natural Science Edition(中南民族大学学报·自然科学版), 2017, 36(3): 90.