Abstract:Traditional destructive detection methods have been unable to meet the requirements of rapid detection of quality content of beans. The existing non-destructive testing equipment has the problems of low stability and accuracy. In order to improve the performance of the device for detecting the quality content of beans, a non-destructive testing device for the quality content of beans was developed based on near infrared spectroscopy technology, which was small, portable and suitable for on-site detection. Based on the developed device, totally 30 samples of soybean, mungbean, red bean and black bean were taken respectively, and the same sample was measured 20 times by means of rotating static multi-spectral averaging and one spectral acquisition. It was concluded that with the increase of acquisition times, the average coefficient of variation of spectral reflectance was gradually decreased until it was flat. The selected bean acquisition times were 16, 8, 14 and 16, and the corresponding average coefficient of variation of spectrum were 2.9%, 2.435%, 2.763% and 3.019%, respectively. Taking soybean as an example, totally 80 samples were selected. Using different pretreatment methods, partial least squares prediction models for protein, crude fat and starch content of soybean were established respectively. The results showed that protein, crude fat and starch models were better than other pretreatments after SG-MSC, SNV and SNV pretreatment, respectively. The Rp were 0.9746, 0.9505 and 0.9607, and the RMSEP were 0.249%, 0.572% and 0.623%, respectively. Totally 40 soybean samples were taken to validate the device model. The Ri of protein, crude fat and starch were 0.9411, 0.9439 and 0.9334, respectively. The RMSEI were 0.465%, 0.604% and 0.673%, respectively. The AD of 20 repeated measurements were 0.409%, 0.623% and 0.637%, respectively. The results showed that the device had good prediction accuracy. Visual Studio 2015 was used as the software development platform to develop the real-time detection software for the quality of beans, which can realize the one-button operation detection of the quality of multiple beans. Elastic compute service and MySQL database were selected. Based on TCP/IP network communication protocol, the detection data were uploaded to the database automatically. Based on the development framework, a front-end network monitoring system was designed to facilitate the monitoring of bean quality and display the database information in real time.