Method for nondestructive rapid detection of food quality

文档序号:49794 发布日期:2021-09-28 浏览:25次 中文

阅读说明:本技术 一种无损快速检测食品质量的方法 (Method for nondestructive rapid detection of food quality ) 是由 吴彦衡 余保华 徐圣吉 吴艳平 张金国 丁斌 尤英婕 余凯强 陈荣波 钟振江 杨 于 2021-06-28 设计创作,主要内容包括:本发明公开了一种无损快速检测食品质量的方法,该方法包括:获取质地均匀的,无阻碍叠合的食品单元,分别使用红外光谱法、电阻法、微波检测法和商用wifi信号四种检测方法,对每一个食品单元进行检测,并获取待处理数据;对所述待处理的食品数据进行数据预处理,得到处理后的数据,通过非线性支持向量机决策树模型对所述食品单元特征进行识别;经训练后,得到一种可对食品质量进行分类的模型;将模型可预测新的食品单元的质量水平。本次涉及一种无损快速检测食品质量的方法可对待检测的食品单元是否霉化、干枯、注水等多种变质问题进行预测,并且在提高分类精度的同时可应用于海量数据。(The invention discloses a method for nondestructively and rapidly detecting food quality, which comprises the following steps: acquiring food units with uniform texture and no obstruction superposition, detecting each food unit by using an infrared spectroscopy method, a resistance method, a microwave detection method and a commercial wifi signal respectively, and acquiring data to be processed; performing data preprocessing on the food data to be processed to obtain processed data, and identifying the characteristics of the food units through a nonlinear support vector machine decision tree model; after training, obtaining a model capable of classifying the food quality; the model may predict the quality level of the new food unit. The method for nondestructively and rapidly detecting the food quality can predict whether a food unit to be detected is mildewed, withered, filled with water and other deterioration problems, and can be applied to mass data while improving classification accuracy.)

1. A method for nondestructively and rapidly detecting food quality is characterized by comprising the following steps:

s1: obtaining food units with uniform texture and no obstruction superposition, and obtaining data to be processed;

s2: performing data preprocessing on the data to be processed obtained in the step S1 to obtain processed data;

s3: and identifying the data after the characteristic processing of the food units through a nonlinear support vector machine decision tree model, training the nonlinear support vector machine decision tree model through a correction data set, updating and training the nonlinear support vector machine decision tree model through a prediction data set to obtain a model capable of classifying the food quality, and inputting the characteristic data of the detected new food units detected by a detection method into the model, thereby completing the quality detection of the food units.

2. The method of claim 1, wherein the nonlinear support vector machine decision tree model can be trained and updated through a distributed training method in S3.

3. The method of claim 1, wherein the new food unit testing method in S3 comprises infrared spectroscopy, resistance method, microwave detection method and commercial wifi signal acquisition, that is, the moisture content in the food unit is tested by infrared spectroscopy, the conductivity in the food unit is tested by resistance method, the microwave detection signal in the food unit is tested by microwave detection method, and CSI data in the food unit is acquired by commercial wifi signal acquisition.

4. The method for nondestructive rapid detection of food quality as claimed in claim 3, wherein said microwave detection method uses microwave of 9-10 GHz.

5. The method for nondestructive rapid detection of food quality as claimed in claim 1, wherein said data preprocessing in S2 is data cleaning, and said data cleaning includes noise smoothing, outlier elimination, missing value filling and outlier interpolation.

6. The method of claim 1, wherein the model for classifying the food quality at S3 is divided into cereal units with low moisture content and cereal units with normal moisture content according to the characteristics of the cereal test food units, the cereal units with low moisture content are named as one type, the cereal units with low moisture content have 12.8% -14% of moisture content of one type, the cereal units with normal moisture content are named as two types, and the moisture content of the two types is more than 14%.

7. The method of claim 1, wherein the model for classifying the food quality at S3 is classified into class A, class B and class C according to the characteristic of the water content food units, wherein class A is a food unit with normal water content, class B is a food unit with water content higher than the water content of the normal food unit, and class C is a food unit with water content lower than the water content of the normal food unit.

8. The method of claim 1, wherein the step of classifying the food quality at S3 includes constructing a plurality of nonlinear support vector machine models and a decision tree, and starting from a root node of the decision tree, from top to bottom, at each node of the decision tree, using one nonlinear support vector machine model as a classifier to classify the training data set layer by layer, and obtaining a final classification result, wherein the classification result is used to characterize the quality of the food units to be tested.

Technical Field

The invention relates to the technical field of Internet of things food detection, in particular to a method for nondestructively and rapidly detecting food quality.

Background

In the prior art, when the food quality is detected, a damage sampling method is mostly adopted, the method can only be used for sampling inspection, and the damage to articles is large. In the aspect of algorithm, when food quality is detected, a geometric model is established, a food quality judgment model is established based on the geometric model, so that the food quality is evaluated, multiple models need to be quantized, the calculation process is complex, a threshold value needs to be used for judgment in the evaluation process, however, the specific numerical value of the threshold value is mostly artificially established through subjective factors, and the judgment result is not accurate enough.

Disclosure of Invention

The invention aims to provide a method for nondestructively and rapidly detecting food quality, which can be applied to mass data while improving classification precision, can realize rapid detection of food quality under the condition of not damaging food, has a good effect particularly on identification of grains and vegetables, improves detection efficiency, ensures food safety and solves the problems in the background technology.

In order to achieve the purpose, the invention provides the following technical scheme:

a method for nondestructively and rapidly detecting food quality comprises the following steps:

s1: obtaining food units with uniform texture and no obstruction superposition, and obtaining data to be processed;

s2: performing data preprocessing on the data to be processed obtained in the step S1 to obtain processed data;

s3: and identifying the data after the characteristic processing of the food units through a nonlinear support vector machine decision tree model, training the nonlinear support vector machine decision tree model through a correction data set, updating and training the nonlinear support vector machine decision tree model through a prediction data set to obtain a model capable of classifying the food quality, and inputting the characteristic data of the detected new food units detected by a detection method into the model, thereby completing the quality detection of the food units.

As a still further scheme of the invention: in S3, the nonlinear support vector machine decision tree model can be trained and updated through a distributed training method.

As a still further scheme of the invention: the new detection method of the food units in the S3 comprises an infrared spectroscopy method, a resistance method, a microwave detection method and commercial wifi signal collection, namely, the water content in the food units is detected through the infrared spectroscopy method, the electric conductivity in the food units is detected through the resistance method, the microwave detection signals in the food units are detected through the microwave detection method, and the CSI data in the food units are collected through the commercial wifi signal collection.

As a still further scheme of the invention: the microwave used in the microwave detection method is 9-10 GHz.

As a still further scheme of the invention: the data preprocessing in S2 is data cleaning, which includes noise smoothing, outlier culling, missing value padding, and outlier interpolation.

As a still further scheme of the invention: the model for classifying food quality in S3 is divided into cereal food units with low water content and cereal food units with normal water content according to the characteristics of the cereal detection food units, the cereal food units with low water content are named as one type, the water content of one type is 12.8% -14%, the cereal food units with normal water content are named as two types, and the water content of the two types is more than 14%.

As a still further scheme of the invention: the food quality classification model in the S3 is divided into A type, B type and C type according to the characteristics of the water content food units, wherein the A type is the food unit with normal water content, the B type is the food unit with water content exceeding the water content of the normal food unit, and the C type is the food unit with water content less than the water content of the normal food unit.

As a still further scheme of the invention: the food quality classification model in the S3 includes constructing a plurality of nonlinear support vector machine models and a decision tree, starting from a root node of the decision tree, from top to bottom, respectively adopting one nonlinear support vector machine model as a classifier at each node of the decision tree, dividing the training data set into two classes layer by layer, and obtaining a final classification result, wherein the classification result is used for representing the quality of the food units to be tested.

Compared with the prior art, the invention has the beneficial effects that:

1. the nonlinear support vector machine decision tree model can realize classification of three categories of food unit quality (normal moisture content food units, moldy cereal food units or water-injected vegetable food or water-injected meat, food units with low moisture and dry food units, which are obtained by dividing the food units with more than normal moisture content into two categories through a first classifier, obtaining a category 1 and a category 2, obtaining a category 3 and a category 4 by dividing the food units with less moisture through a second classifier, and sequentially performing category division;

the method comprises the steps of obtaining food units with uniform texture and no obstruction superposition, detecting each food unit by using an infrared spectroscopy method, a resistance method, a microwave detection method and a commercial wifi signal respectively, and obtaining data to be processed; performing data preprocessing on the food data to be processed to obtain processed data, and identifying the characteristics of the food units through a nonlinear support vector machine decision tree model; after training, obtaining a model capable of classifying the food quality; the quality level of the new food units can be predicted by the model, a stronger final classifier is formed by integrating the model, the practicability is high, and the method can be applied to mass data while the classification precision is improved.

Drawings

In order to facilitate understanding for those skilled in the art, the present invention will be further described with reference to the accompanying drawings.

FIG. 1 is a flow diagram of the method of the present invention.

FIG. 2 is a flow chart of discriminating the quality of a food unit by a nonlinear support vector machine decision tree model according to the present invention.

Detailed Description

The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

Example 1

Referring to fig. 1-2, in an embodiment of the present invention, a method for nondestructive fast detection of food quality includes the following steps:

s1: obtaining food units with uniform texture and no obstruction superposition, and obtaining data to be processed;

s2: performing data preprocessing on the data to be processed obtained in the step S1 to obtain processed data;

s3: recognizing the data after the characteristic processing of the food units through a nonlinear support vector machine decision tree model, training the nonlinear support vector machine decision tree model through a correction data set, updating and training the nonlinear support vector machine decision tree model through a prediction data set to obtain a model capable of classifying the food quality, and inputting the characteristic data of the detected new food units detected by a detection method into the model so as to finish the quality detection of the food units;

the model for classifying the food quality is divided into a cereal food unit with low water content and a cereal food unit with normal water content according to the characteristics of the cereal food detection unit, the cereal food unit with low water content is named as a first type, the water content of the first type is 12.8% -14%, the cereal food unit with normal water content is named as a second type, the water content of the second type is more than 14%, and the first-type node classification is carried out.

In the step S3, the nonlinear support vector machine decision tree model can be trained and updated by a distributed training method, so as to store and update data in the nonlinear support vector machine decision tree model, thereby effectively ensuring timeliness of later-stage classification comparison, storage and quality detection.

The novel detection method of the food units in the S3 comprises an infrared spectroscopy method, a resistance method, a microwave detection method and commercial wifi signal collection, namely, the water content in the food units is detected through the infrared spectroscopy method, the electric conductivity in the food units is detected through the resistance method, microwave detection signals in the food units are detected through the microwave detection method, CSI data in the food units are collected through the commercial wifi signal collection, detection of each food unit is achieved, data to be processed are obtained, data preprocessing is conducted on the food data to be processed, processed data are obtained, the processed data are guided into a decision tree model of a nonlinear support vector machine to identify the characteristics of the food units, and quality detection of the food units is completed.

The microwave used in the microwave detection method is 9-10 GHz.

The data preprocessing in the S2 is data cleaning which comprises noise smoothing, abnormal value elimination, missing value filling and abnormal value interpolation, the obtained data precision is more accurate through normalization processing, the food unit characteristics are identified by a nonlinear support vector machine decision tree model, and the identification precision is improved.

The model for classifying food quality in S3 is divided into cereal food units with low water content and cereal food units with normal water content according to the characteristics of the cereal detection food units, the cereal food units with low water content are named as one type, the water content of one type is 12.8% -14%, the cereal food units with normal water content are named as two types, and the water content of the two types is more than 14%.

Example 2

Referring to fig. 1-2, in an embodiment of the present invention, a method for nondestructive fast detection of food quality includes the following steps:

s1: obtaining food units with uniform texture and no obstruction superposition, and obtaining data to be processed;

s2: performing data preprocessing on the data to be processed obtained in the step S1 to obtain processed data;

s3: recognizing the data after the characteristic processing of the food units through a nonlinear support vector machine decision tree model, training the nonlinear support vector machine decision tree model through a correction data set, updating and training the nonlinear support vector machine decision tree model through a prediction data set to obtain a model capable of classifying the food quality, and inputting the characteristic data of the detected new food units detected by a detection method into the model so as to finish the quality detection of the food units;

the model for classifying the food quality is divided into a cereal food unit with low water content and a cereal food unit with normal water content according to the characteristics of the cereal detection food unit, the cereal food unit with low water content is named as a first type, the water content of the first type is 12.8-14%, the cereal food unit with normal water content is named as a second type, and the water content of the second type is more than 14%;

the model that food quality carries out classification is divided into A type, B type and C type according to the characteristic of water content food unit, A type is the normal food unit of moisture, B type is the food unit that moisture surpassed normal food unit water content, C type is the food unit that moisture is less than normal food unit water content, carries out dual root node classification.

In the step S3, the nonlinear support vector machine decision tree model can be trained and updated by a distributed training method, so as to store and update data in the nonlinear support vector machine decision tree model, thereby effectively ensuring timeliness of later-stage classification comparison, storage and quality detection.

The novel detection method of the food units in the S3 comprises an infrared spectroscopy method, a resistance method, a microwave detection method and commercial wifi signal collection, namely, the water content in the food units is detected through the infrared spectroscopy method, the electric conductivity in the food units is detected through the resistance method, microwave detection signals in the food units are detected through the microwave detection method, CSI data in the food units are collected through the commercial wifi signal collection, detection of each food unit is achieved, data to be processed are obtained, data preprocessing is conducted on the food data to be processed, processed data are obtained, the processed data are guided into a decision tree model of a nonlinear support vector machine to identify the characteristics of the food units, and quality detection of the food units is completed.

The microwave used in the microwave detection method is 9-10 GHz.

The data preprocessing in the S2 is data cleaning which comprises noise smoothing, abnormal value elimination, missing value filling and abnormal value interpolation, the obtained data precision is more accurate through normalization processing, the food unit characteristics are identified by a nonlinear support vector machine decision tree model, and the identification precision is improved.

The food quality classification model in the S3 includes constructing a plurality of nonlinear support vector machine models and a decision tree, starting from a root node of the decision tree, from top to bottom, respectively adopting one nonlinear support vector machine model as a classifier at each node of the decision tree, dividing the training data set into two classes layer by layer, and obtaining a final classification result, wherein the classification result is used for representing the quality of the food units to be tested.

In summary, the combination of the support vector machine and the binary tree of the invention trains the classifiers after dividing the training data set into two classes layer by layer, and classifies unknown samples by a tree structure combination strategy, so that individual basic classifiers can be trained for different training sets, and then integrated to form a stronger final classifier.

Although the present invention has been described in detail with reference to the foregoing embodiments, it will be apparent to those skilled in the art that various changes in the embodiments and/or modifications of the invention can be made, and equivalents and modifications of some features of the invention can be made without departing from the spirit and scope of the invention.

While one embodiment of the present invention has been described in detail, the description is only a preferred embodiment of the present invention and should not be taken as limiting the scope of the invention. All equivalent changes and modifications made within the scope of the present invention shall fall within the scope of the present invention.

8页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:用电状态的确定方法及装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!