Disclosure of Invention
Aiming at the defects of the existing detection mode, the invention aims to provide a portable on-site rapid detection system based on a cloud platform, a smart phone and a miniature near infrared spectrometer, and provides a novel method for realizing on-site synchronous rapid analysis of corn meal quality and fumonisins pollution.
In order to achieve the above purpose, the technical scheme of the invention is as follows:
A cloud platform-based corn quality and fumonisin pollution site synchronous rapid analysis system, the system comprising: the intelligent mobile phone comprises a portable detection terminal, an intelligent mobile phone control module and a data processing cloud platform; wherein, portable detection terminal includes: the device comprises a spectrum acquisition module, a Bluetooth module, a power supply and a control module; the portable detection terminal is linked with the intelligent mobile phone control module through Bluetooth to perform data transmission and communication, so that the intelligent mobile phone can control the portable detection terminal, and sample spectrum data is uploaded to the intelligent mobile phone; the data processing cloud platform has the functions of data operation and storage, and the smart phone realizes data transmission with the data processing cloud platform through a network.
Wherein, the spectrum acquisition module is a portable near infrared spectrometer.
The control of the smart phone to the portable detection terminal comprises the following steps: setting spectrum scanning parameters, updating a reference spectrum, acquiring a sample spectrum, selecting an analysis model and the like. The smart phone can control the portable detection terminal through the APP.
The portable near infrared spectrometer is provided with a lithium battery power supply module, and can be used by supplying power through a USB or independently by supplying power through a lithium battery.
The intelligent mobile phone control module is communicated with the portable detection terminal through Bluetooth searching and Bluetooth pairing functions in the Bluetooth module, and is connected with the data processing cloud platform through a network to realize data transmission, uploads sample spectrum data collected by the portable detection terminal to the data processing cloud platform and sends a data analysis request.
In addition, the intelligent mobile phone control module also has the functions of setting user permission, selecting an analysis model and receiving and displaying data analysis results.
Wherein, the network link mode is Internet network or GPRS communication; the data analysis request is a Web request sent to a cloud server through a network, and after the server performs load balancing through an Nginx reverse proxy, the mobile phone control module request is differentiated according to a specified analysis model and then distributed to a corresponding prediction algorithm service.
The data processing cloud platform has the functions of data operation and storage, carries a plurality of spectrum analysis models, performs predictive analysis according to a specified model after receiving the sample spectrum data uploaded by the mobile phone control module, and feeds an analysis result back to the mobile phone end for display. The administrator has the right to add, upgrade, sort, delete, etc. the model.
The data processing cloud platform carries a quantitative analysis model constructed based on a Matlab platform and a PLS Toolbox, and the number of the models is determined according to the number of required measurement indexes. The index may include: crude protein content, starch content, and fumonisin content of the corn sample.
The administrator has the right to add, upgrade, sort, delete, etc. the model. Different user accessible models are limited by user rights preset by an administrator, and the administrator can modify the user rights according to requirements.
By utilizing the analysis system, the invention also provides a cloud platform-based corn quality and fumonisin pollution field synchronous rapid detection method.
The fumonisins in the invention are the total content of fumonisins B1 and fumonisins B2.
The invention provides a cloud platform-based corn quality and fumonisin pollution site synchronous rapid detection method, which comprises the following steps:
Step 1: crushing a corn sample to be analyzed, and standing at room temperature for standby;
Step 2: constructing a quantitative analysis model based on Matlab and PLS Toolbox, storing the quantitative analysis model as a mat file, and then classifying and uploading the mat file to a catalog appointed by a cloud server;
Step 3: opening a portable near infrared spectrometer switch, linking a spectrometer with a smart phone through Bluetooth, starting a mobile phone APP, inputting a user name and a password, and obtaining the use authority of a cloud database;
Step 4: setting a spectrometer reference scanning parameter after logging in, placing a reference plate in a spectrometer detection window, adjusting a reset reference button to be ON, clicking a scanning button to reset the reference, and finally selecting the type of an analysis model to be used by a prediction type pull-down selection frame;
Step 5: placing a sample to be tested in a scanning window, naming the sample in a sample number window, clicking a scanning prediction button to obtain spectrum information of the sample, and waiting for uploading a spectrum to a cloud server for spectrum prediction analysis;
step 6: after receiving the spectrum, the cloud server analyzes according to the model type specified by the user, feeds back the spectrum analysis result to the mobile phone end, clicks a report checking button, and obtains a sample prediction result.
In the step 1 of the method, the corn sample is crushed and sieved by a 40-mesh sieve after removing impurities.
In the step 2 of the method, the quantitative analysis model is a Partial Least Squares (PLS) quantitative analysis model constructed based on a Matlab platform and a PLS Toolbox, and a single model or a plurality of models can be stored under the same file directory.
The construction method of the Partial Least Squares (PLS) quantitative analysis model comprises the following steps of:
(a) Scanning by using a portable near infrared spectrometer to obtain a near infrared spectrum of the crushed corn sample;
(b) Determining crude protein, starch and fumonisins content of the corn sample by referring to a national standard method;
(c) Dividing the near infrared spectrum of the corn sample into a correction set and a verification set (which can be distributed according to the proportion of 3:1) by using a K-stone, a concentration gradient method or a random diversity method, wherein the correction set data are used for constructing a quantitative analysis model, and the verification set is used for evaluating the quantitative analysis model;
(d) Performing spectrum pretreatment on a near infrared spectrum of a corn sample, eliminating background interference, reducing spectrum noise and improving spectrum quality and signal difference;
(e) Removing abnormal samples, respectively measuring the near infrared spectrum of the corrected concentrated corn sample treated in the step (d) and the content of crude protein, starch and fumonisins measured by the corn sample, constructing a quantitative analysis model by using a PLS algorithm, and selecting the optimal latent variable number in a mode of leave-one interaction verification;
(f) And (3) predicting the verification set by using the quantitative analysis model constructed in the step (e), comparing the predicted value with the true value, calculating a prediction root mean square error, and evaluating the model.
Wherein, the scanning parameters using the portable near infrared spectrometer in the step (a) may be: the spectrum scanning range is 900-1700nm, the spectrum average times are 50 times, the exposure time is 0.635ms, and each sample can be repeatedly scanned for 3 times.
The method of spectral preprocessing in step (d) comprises standard normal variable transformation, smoothing, derivative and the like.
In the above method step 3, the portable near infrared spectrometer is equipped with a lithium battery power supply module, which can be used by USB power supply or independently by lithium battery power supply.
In the above method step 4, the spectrometer scan parameter settings include exposure time and spectrum repetition number.
The invention discloses a cloud platform-based corn quality and fumonisin pollution site synchronous rapid analysis system, which comprises a portable detection terminal, a smart phone control module and a data processing cloud platform, and has the advantage of portability and capability of rapidly analyzing on site. The analysis system improves the data operation and storage capacity through the cloud server, builds a model management and data processing cloud platform, realizes the data interaction between a multi-user terminal and a cloud terminal through network communication, reduces the model construction and maintenance cost, improves the detection efficiency, can realize the synchronous and rapid analysis of the corn quality and the fumonisin pollution site, has important significance for guaranteeing the grain safety, and is suitable for popularization and application.
Detailed Description
The invention will be further illustrated with reference to the following specific examples, but the invention is not limited to the following examples. The methods are conventional methods unless otherwise specified. The starting materials are available from published commercial sources unless otherwise specified.
Example 1
As shown in FIG. 1, the cloud platform-based corn quality and fumonisin pollution site synchronous rapid analysis system comprises a portable detection terminal, a smart phone control module and a data processing cloud platform. The portable detection terminal includes: the device comprises a spectrum acquisition module, a Bluetooth module, a power supply and a control module; the portable detection terminal is linked with the intelligent mobile phone control module through Bluetooth, so that data transmission and communication are achieved, the intelligent mobile phone controls the portable detection terminal, and sample spectrum data are uploaded to the intelligent mobile phone. And after receiving the spectral information uploaded by the mobile phone terminal, the cloud platform analyzes according to the appointed model type, and feeds back an analysis result to the mobile phone terminal for display, so that the on-site rapid analysis of the corn sample is realized.
Specifically, a quantitative analysis model needs to be built first, and the model is uploaded to a cloud server for spectrum analysis. In this embodiment, taking 350 corn samples as an example (before use, the samples are crushed and sieved by a 40-mesh sieve after removing impurities), a portable spectrometer is used to obtain spectrum information of the samples, and specific scanning parameters are as follows: the spectrum scanning range is 900-1700nm, the spectrum average times are 50 times, the exposure time is 0.635ms, each sample is repeatedly scanned 3 times, and the spectrum chart of the corn sample is shown in figure 2.
Then, the content of crude protein (GB/T6432-2018), starch (GB 5009.9-2016) and fumonisins (GB 5009.240-2016) of the corn sample was measured by a national standard method, and the measured values were used as reference values.
The measured near infrared spectra of the 350 corn samples were separated into a calibration set and a validation set (distributed according to a 3:1 ratio) using a concentration gradient method, wherein the calibration set data was used to construct a quantitative analysis model and the validation set was used to evaluate the quantitative analysis model.
And (3) carrying out standard normal variable transformation, smoothing and first derivative pretreatment on the near infrared spectrum of the corn sample, respectively measuring the near infrared spectrum of the corn sample in the corrected set after the spectrum pretreatment and the content of crude protein, starch and fumonisins of the corn sample, respectively constructing quantitative analysis models of all indexes based on a PLS algorithm, and selecting the optimal latent variable number in a mode of remaining interactive verification.
The above data processing is done in Matlab 2014a (MathWorks, USA) and PLS-toolbox 8.0.0 (Eigenvector Research, USA). The results are shown in FIG. 3, wherein the correction set determining coefficients of crude protein, starch and fumonisins and the root mean square error of the correction set are respectively 0.88 and 0.37%, 0.70 and 0.98%, 0.80 and 18642.00 mug/kg, the stability of the model is proved through interactive verification and external verification, the obtained quantitative analysis model of each index is exported and stored as a matrix file, and then classified and uploaded to a catalog appointed by a cloud server.
And then, opening a switch of the portable near infrared spectrometer, linking the spectrometer with the mobile phone through Bluetooth, starting the mobile phone APP, inputting a user name and a password, and obtaining the use authority of the cloud database.
After logging in, firstly setting a spectrometer reference scanning parameter, placing a reference plate in a spectrometer detection window, adjusting a reset reference button to be ON, then clicking a scanning button to reset the reference, and finally selecting the type of the analysis model to be used through a prediction type pull-down selection frame.
And placing the sample to be tested in a scanning window, naming the sample in a sample number window, clicking a scanning prediction button to acquire sample spectrum information, and waiting for uploading the spectrum to a cloud server for spectrum prediction analysis.
After receiving the spectrum, the cloud server analyzes according to the model type specified by the user, and feeds back the spectrum analysis result to the mobile phone end for display, so that the user can view the analysis result at the mobile phone end.
The above embodiments are only for illustrating the technical scheme and characteristics of the invention, and the above schemes can realize the on-site rapid analysis of corn quality and fumonisin pollution, and have important significance for guaranteeing grain safety.