CN113984946A - Crayfish freshness detection method based on gas phase electronic nose and machine learning - Google Patents

Crayfish freshness detection method based on gas phase electronic nose and machine learning Download PDF

Info

Publication number
CN113984946A
CN113984946A CN202111228666.9A CN202111228666A CN113984946A CN 113984946 A CN113984946 A CN 113984946A CN 202111228666 A CN202111228666 A CN 202111228666A CN 113984946 A CN113984946 A CN 113984946A
Authority
CN
China
Prior art keywords
chromatogram
crayfish
electronic nose
peak height
phase electronic
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111228666.9A
Other languages
Chinese (zh)
Other versions
CN113984946B (en
Inventor
许艳顺
汤楚涵
颜孙洁
夏文水
余达威
姜启兴
杨方
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangnan University
Original Assignee
Jiangnan University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jiangnan University filed Critical Jiangnan University
Priority to CN202111228666.9A priority Critical patent/CN113984946B/en
Publication of CN113984946A publication Critical patent/CN113984946A/en
Application granted granted Critical
Publication of CN113984946B publication Critical patent/CN113984946B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N30/00Investigating or analysing materials by separation into components using adsorption, absorption or similar phenomena or using ion-exchange, e.g. chromatography or field flow fractionation
    • G01N30/02Column chromatography
    • G01N30/86Signal analysis
    • G01N30/8675Evaluation, i.e. decoding of the signal into analytical information
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/16Matrix or vector computation, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2415Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on parametric or probabilistic models, e.g. based on likelihood ratio or false acceptance rate versus a false rejection rate
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/049Temporal neural networks, e.g. delay elements, oscillating neurons or pulsed inputs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent

Abstract

The invention discloses a crayfish freshness detection method based on a gas-phase electronic nose and machine learning, which comprises the steps of placing a crayfish sample in a beaker, sealing the sample by using a double-layer preservative film, and standing and headspace; preheating an ultra-fast gas phase electronic nose instrument, and inserting a sample injection needle into a beaker for sampling to obtain a chromatogram; normalizing the maximum value and the minimum value of the peak height of the chromatogram; preprocessing the baseline data of the peak height, and eliminating the label noise of the chromatogram by using belief learning; performing feature extraction on the chromatogram by using a sequence model to obtain the trend features of the chromatogram with different freshness and odor changes; extracting the content characteristics of the volatile compounds corresponding to each retention time through a multilayer perceptron according to the chromatogram trend characteristics, and splicing the chromatogram trend characteristics and the content characteristics of the volatile compounds; performing feature classification by using the spliced features of the feedforward neural network; the method can accurately obtain the odor information of the crayfishes with different freshness, and realizes the accurate classification of the freshness of the crayfishes.

Description

Crayfish freshness detection method based on gas phase electronic nose and machine learning
Technical Field
The invention relates to the technical field of crayfish freshness detection, in particular to a crayfish freshness detection method based on a gas phase electronic nose and machine learning.
Background
Crayfish, also known as procambarus clarkii, is one of the important freshwater economic aquatic products in China. The crayfish is popular with consumers because of its tender meat, delicious taste and rich nutrition. In recent years, the crayfish industry in China is rapidly developed, the breeding area and the breeding yield are rapidly increased, and the total breeding yield of the crayfish in China reaches 239.37 ten thousand tons in 2020. However, the crayfish breeding environment is complex, and more microorganisms are carried on the surface and the body of the crayfish, so that the freshness of the crayfish is reduced to different degrees in the processes of fresh storage, transportation and processing, and even the crayfish is rotten and deteriorated due to death, and the potential safety risk of the processed crayfish is caused.
The electronic nose is a device comprehensively simulating a biological olfactory system, and classifies and identifies samples by identifying volatile compounds in the samples. The electronic nose does not need any sample pretreatment or solvent, has wide application range, short detection time and high sensitivity, and can give a relatively comprehensive and objective result. The types of the electronic nose may be classified into a sensor type electronic nose, a mass spectrum electronic nose, and an ultra-fast gas phase electronic nose. The most common sensor type electronic nose is used in the fields of food, medicine, traditional Chinese medicine and the like, but the sensor type electronic nose also has the limitations of time consumption, complicated sensors, large external influence and the like. The Heracles II ultra-fast gas phase electronic nose is a novel odor analysis instrument, is provided with two chromatographic columns with different polarities, replaces sensor signals in a traditional sensor type electronic nose with chromatographic peaks obtained by gas phase, obtains more compound signals, can accurately separate volatile compounds with different polarities, has the advantages of high sensitivity, short detection time, wide application range and the like, and plays an important role in the classification and identification of milk, white spirit, mutton and fruits. However, the odor difference of the live crayfish stored at different time and with different freshness is small, and the freshness of the crayfish is difficult to accurately judge in the data processing stage through a simple data dimension reduction mode, such as principal component analysis and the like.
Disclosure of Invention
This section is for the purpose of summarizing some aspects of embodiments of the invention and to briefly introduce some preferred embodiments. In this section, as well as in the abstract and the title of the invention of this application, simplifications or omissions may be made to avoid obscuring the purpose of the section, the abstract and the title, and such simplifications or omissions are not intended to limit the scope of the invention.
The present invention has been made in view of the above-mentioned conventional problems.
Therefore, the invention provides the crayfish freshness detection method based on the gas-phase electronic nose and machine learning, which can accurately obtain the odor information of crayfish with different freshness and accurately judge the freshness of the crayfish.
In order to solve the technical problems, the invention provides the following technical scheme: comprises placing a crayfish sample in a beaker, sealing the sample with a double-layer preservative film, and standing for headspace; preheating an ultra-fast gas phase electronic nose instrument, and inserting a sample injection needle into a beaker for sampling to obtain a chromatogram; carrying out normalization pretreatment on the maximum value and the minimum value of the peak height of the chromatogram; preprocessing the baseline data of the peak height, and eliminating the label noise of the crayfish sample by using a belief learning strategy; performing feature extraction on the chromatogram by using a sequence model to obtain the trend features of the chromatogram with different freshness and odor changes; extracting the content characteristics of the volatile compounds corresponding to each retention time through a multilayer perceptron according to the chromatogram trend characteristics, and splicing the chromatogram trend characteristics and the content characteristics of the volatile compounds; and performing feature classification by using the features spliced by the feedforward neural network.
As a preferable scheme of the crawfish freshness detection method based on the gas-phase electronic nose and machine learning, the method comprises the following steps: the normalization pre-processing includes the steps of,
Figure BDA0003315159880000021
wherein h isscaleIs the peak height of the chromatogram after normalization, h is the peak height of the chromatogram, hminMinimum value of the peak height of the chromatogram, hmaxThe maximum value of the peak height of the chromatogram.
As a preferable scheme of the crawfish freshness detection method based on the gas-phase electronic nose and machine learning, the method comprises the following steps: preprocessing the baseline data for the peak height includes calculating an empirical distribution of peak heights
Figure BDA0003315159880000029
For the range of values R for the peak height h { h |0 < h ≦ infinity }, there is a division S ═ S for any given normal number S1,S2,...,SrAnd (4) satisfying:
Si={h|(i-1)×s≤h≤i×s,sup(R)≤r×s},i=1,2,...r;
defining event A with peak height h falling in different data segment intervalsi={h|h∈SiThe probability of occurrence of the event
Figure BDA0003315159880000022
Calculating an estimated baseline value
Figure BDA0003315159880000023
Figure BDA0003315159880000024
Figure BDA0003315159880000025
Wherein, SrIs the r-th divided data segment; m is the event A with the maximum occurrence probabilityiNumber of corresponding section, SmN is the total peak height number of the corresponding division of the event with the maximum occurrence probability,
Figure BDA0003315159880000026
for the empirical distribution of the ith partition,
Figure BDA0003315159880000027
is the empirical distribution of the i-1 th partition.
As a preferable scheme of the crawfish freshness detection method based on the gas-phase electronic nose and machine learning, the method comprises the following steps: empirical distribution of peak heights
Figure BDA0003315159880000028
Comprises the steps of measuring the peak height h of the chromatogram1,h2,...,hnThe real random variables which are regarded as independent and same distribution are subjected to the cumulative distribution function of F (k) to obtain the empirical distribution of the peak heights
Figure BDA0003315159880000031
Figure BDA0003315159880000032
Wherein the content of the first and second substances,
Figure BDA0003315159880000033
is { hi|hiK ≦ k).
As a preferable scheme of the crawfish freshness detection method based on the gas-phase electronic nose and machine learning, the method comprises the following steps: label noise for chromatogram culling includes defining an initial labeling, possibly false day label as
Figure BDA0003315159880000034
The real tag is defined as y*The total number of samples is N, and the number of categories is M; equally dividing N samples into a parts, taking one part as a test set, taking the rest a-1 parts as a training set, and calculating the estimated probability p of the test set samples, namely { p }jRepeating the operation a times to obtain the outward prediction of all samples; calculating the average probability t under each calibration category jjAnd as a confidence threshold:
Figure BDA0003315159880000035
calculating a count matrix
Figure BDA0003315159880000036
Figure BDA0003315159880000037
Figure BDA0003315159880000038
Calibrating a counting matrix:
Figure BDA0003315159880000039
estimating initial tags
Figure BDA00033151598800000310
And a genuine label y*Joint distribution of
Figure BDA00033151598800000311
Figure BDA00033151598800000312
For a counting matrix
Figure BDA00033151598800000313
Non-diagonal cells, selecting
Figure BDA00033151598800000314
Filtering the samples at a maximum interval
Figure BDA00033151598800000315
Sorting, filtering of each category
Figure BDA00033151598800000316
A maximum-spaced sample;
wherein the probability that a sample x belongs to the jth class
Figure BDA00033151598800000317
Figure BDA00033151598800000318
Is an initial mark
Figure BDA00033151598800000319
About the number; l represents satisfy
Figure BDA00033151598800000320
Labeling;
Figure BDA00033151598800000321
is a counting matrix
Figure BDA00033151598800000322
To the calibration value of (c).
As a preferable scheme of the crawfish freshness detection method based on the gas-phase electronic nose and machine learning, the method comprises the following steps: the method is characterized in that: the chromatogram trend characteristics comprise that the sequence model preliminarily obtains rough trend characteristics X through multiple convolution, and then trend characteristics SLSTM (X) of the X are extracted based on an LSTM network, namely the chromatogram trend characteristics:
Figure BDA0003315159880000043
wherein, LSTM1、LSTM2Is an LSTM network.
As a preferable scheme of the crawfish freshness detection method based on the gas-phase electronic nose and machine learning, the method comprises the following steps: further included is that the trend feature X is a sequence with the length of 65, and each position t contains 64 numerical features X of corresponding time periodt
As a preferable scheme of the crawfish freshness detection method based on the gas-phase electronic nose and machine learning, the method comprises the following steps: the volatile compound content characteristics include,
layeri(X)=ReLU(XWi)
Figure BDA0003315159880000041
Figure BDA0003315159880000042
wherein, layeriIs the i-layer network; wiIs a parameter of the ith layer; x is a design matrix of the position characteristics; layeroIs a layer o network.
The invention has the beneficial effects that: according to the method, the ultra-fast gas-phase electronic nose is used for acquiring the smell changes of the live crayfishes with different freshness and the crayfishes with different dead times, so that the smell information of the crayfishes with different freshness can be acquired more visually and accurately; label noise is eliminated by using belief learning, and the prediction accuracy is improved; meanwhile, trend characteristics and relative content characteristics of volatile compounds of ultra-fast gas electronic nose chromatographic data are respectively extracted by using the LSTM and the MLP, and the extracted characteristics are spliced and then classified by using a feedforward neural network, so that the crayfish freshness classification method has good stability and accuracy.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise. Wherein:
FIG. 1 is a chromatogram of a crawfish freshness detection method based on gas phase electronic nose and machine learning according to a first embodiment of the present invention;
FIG. 2 is a schematic diagram of peak height data PCA of a crawfish freshness detection method based on gas phase electronic nose and machine learning according to a second embodiment of the present invention;
fig. 3 is a confusion matrix of crawfish freshness detection method based on gas phase electronic nose and machine learning according to a second embodiment of the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, specific embodiments accompanied with figures are described in detail below, and it is apparent that the described embodiments are a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making creative efforts based on the embodiments of the present invention, shall fall within the protection scope of the present invention.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention, but the present invention may be practiced in other ways than those specifically described and will be readily apparent to those of ordinary skill in the art without departing from the spirit of the present invention, and therefore the present invention is not limited to the specific embodiments disclosed below.
Furthermore, reference herein to "one embodiment" or "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one implementation of the invention. The appearances of the phrase "in one embodiment" in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments.
The present invention will be described in detail with reference to the drawings, wherein the cross-sectional views illustrating the structure of the device are not enlarged partially in general scale for convenience of illustration, and the drawings are only exemplary and should not be construed as limiting the scope of the present invention. In addition, the three-dimensional dimensions of length, width and depth should be included in the actual fabrication.
Meanwhile, in the description of the present invention, it should be noted that the terms "upper, lower, inner and outer" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only for convenience of describing the present invention and simplifying the description, but do not indicate or imply that the referred device or element must have a specific orientation, be constructed in a specific orientation and operate, and thus, cannot be construed as limiting the present invention. Furthermore, the terms first, second, or third are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
The terms "mounted, connected and connected" in the present invention are to be understood broadly, unless otherwise explicitly specified or limited, for example: can be fixedly connected, detachably connected or integrally connected; they may be mechanically, electrically, or directly connected, or indirectly connected through intervening media, or may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
Example 1
Referring to fig. 1, a first embodiment of the present invention provides a crawfish freshness detection method based on gas phase electronic nose and machine learning, comprising:
s1: the crayfish sample is placed in a beaker, sealed with a double-layer preservative film, and kept still for headspace.
S2: preheating the ultra-fast gas phase electronic nose instrument, and putting a sample injection needle into a beaker for sampling to obtain a chromatogram.
S3: and carrying out normalization pretreatment on the maximum value and the minimum value of the chromatogram peak height.
Normalization pretreatment:
Figure BDA0003315159880000061
wherein h isscaleIs the peak height of the chromatogram after normalization, h is the peak height of the chromatogram, hminMinimum value of the peak height of the chromatogram, hmaxThe maximum value of the peak height of the chromatogram.
S4: and preprocessing the baseline data of the peak height, and eliminating the label noise of the crayfish sample by using a belief learning strategy.
(1) Preprocessing baseline data for peak height
Calculating the empirical distribution of peak heights
Figure BDA00033151598800000611
The peak height h of the chromatogram map1,h2,...,hnThe real random variables which are regarded as independent and same distribution are subjected to the cumulative distribution function of F (k) to obtain the empirical distribution of the peak heights
Figure BDA0003315159880000062
Figure BDA0003315159880000063
Wherein the content of the first and second substances,
Figure BDA0003315159880000064
is { hi|hiK ≦ k).
② for the value range R of peak height h ═ { h |0 < h < + ∞ }, for any given normal number S there is a division S ═ S1,S2,...,SrAnd (4) satisfying:
Si={h|(i-1)×s≤h≤i×s,sup(R)≤r×s},i=1,2,...r;
wherein S isrTo scratchThe nth data segment.
Defining event A with peak height h in different data segment intervali={h|h∈SiThe probability of occurrence of the event
Figure BDA0003315159880000065
Calculating an estimated baseline value
Figure BDA0003315159880000066
Figure BDA0003315159880000067
Figure BDA0003315159880000068
Wherein m is the event A with the maximum occurrence probabilityiNumber of corresponding section, SmN is the total peak height number of the corresponding division of the event with the maximum occurrence probability,
Figure BDA0003315159880000069
for the empirical distribution of the ith partition,
Figure BDA00033151598800000610
is the empirical distribution of the i-1 th partition.
(2) The labeling noise of the rejected crayfish samples includes,
defining the initial label and the number of days with possible error as
Figure BDA0003315159880000071
The real tag is defined as y*The total number of samples is N and the number of categories is M.
Averagely dividing N samples into a parts, taking one part as a test set, taking the rest a-1 parts as a training set, and calculating the estimated probability p of the test set samples as { p ═ pjRepeating the operation a times to obtain the outward prediction of all samples;
wherein the probability that a sample x belongs to the jth class
Figure BDA0003315159880000072
Calculating average probability t under each calibration category jjAnd as a confidence threshold:
Figure BDA0003315159880000073
wherein the content of the first and second substances,
Figure BDA0003315159880000074
is an initial mark
Figure BDA0003315159880000075
The number of (2).
Fourthly, calculating a counting matrix
Figure BDA0003315159880000076
Figure BDA0003315159880000077
Figure BDA0003315159880000078
Wherein l represents a group satisfying
Figure BDA0003315159880000079
The label of (1).
Calibrating a counting matrix:
Figure BDA00033151598800000710
wherein the content of the first and second substances,
Figure BDA00033151598800000711
is a counting matrix
Figure BDA00033151598800000712
To the calibration value of (c).
Estimating initial label
Figure BDA00033151598800000713
And a genuine label y*Joint distribution of
Figure BDA00033151598800000714
Figure BDA00033151598800000715
To the count matrix
Figure BDA00033151598800000716
Non-diagonal cells, selecting
Figure BDA00033151598800000717
Filtering the samples at a maximum interval
Figure BDA00033151598800000718
Sorting, filtering of each category
Figure BDA00033151598800000719
A maximum-spaced sample;
preferably, the crayfish freshness label is misjudged due to differences of producing areas, transportation time and individuals, the artificial label can only be used as priori estimation of freshness, and the embodiment eliminates the wrong artificial label by using a belief learning strategy, namely, a sample with an obviously wrong result, so that the prediction accuracy is improved.
S5: and (4) performing feature extraction on the chromatogram by using a sequence model to obtain the chromatogram trend features of different freshness and odor changes.
The sequence model obtains rough trend characteristic X through multiple convolution preliminarily (the trend characteristic X is one longDegree 65 sequence, each position t containing 64 numerical features x of the corresponding time segmentt) And then extracting a trend feature SLSTM (X) of the X based on the LSTM network, namely a chromatogram trend feature:
Figure BDA0003315159880000081
wherein, LSTM1、LSTM2Is an LSTM network.
It should be noted that LSTM is a recurrent neural network, and can learn long-term dependency and extract the depth trend feature of the odor information.
The LSTM network processes the sequence in time order, for each location's feature xtFeeding in the input gate and the forgetting gate respectively to obtain a control vector itAnd ftThe calculation formula is as follows:
it=σ(Wiixt+bii+Whiht-1+bhi)
ft=σ(Wifxt+bif+Whfht-1+bhf)
each LSTM network contains a memory vector c, which is passed between different locations; control vector f obtained by forgetting gate for LSTM networktDetermining information that needs to be forgotten:
ft=σ(Wifxt+bif+Whfht-1+bhf)
Figure BDA0003315159880000082
get new memory after discarding useless information
Figure BDA0003315159880000083
Figure BDA0003315159880000084
The LSTM network comprises a hidden layer characteristic h for introducing sequence information; in the input gate, the LSTM network uses the hidden layer feature h of the previous timet-1Re-correcting the input Gate extracted deep characterization gtThereby capturing the interaction of different location features;
gt=hanh(Wigxt+big+Whght-1+bng)
wherein, gtThe smell quantity information at the time t and the overall information (including trend and quantity) before the time t are included;
input Gate pass vector itDetermining information that an LSTM network needs to remember
Figure BDA0003315159880000085
Figure BDA0003315159880000086
In summary, at time t, the updated memory vector c of the LSTM networkt
Figure BDA0003315159880000087
After updating the memory vector, the LSTM network further obtains h fused with the time information through an output gatet(ii) a Similar to the input gate, the LSTM network uses the hidden layer feature at the previous time to assist in computing the output gate control vector σt
ot=σ(Wioxt+bio+Whoht-1+bho)
Finally, using the output gate control vector to determine the information needed to remain in the hidden layer vector, updating ht
ht=ot⊙tanh(ct)
S6: and extracting the content characteristics of the volatile compounds corresponding to each retention time through a multilayer perceptron according to the chromatogram trend characteristics, and splicing the chromatogram trend characteristics and the content characteristics of the volatile compounds.
This example uses a multilayer perceptron (MLP) to extract the volatile compound content features for each retention time:
layeri(X)=ReLU(XWi)
Figure BDA0003315159880000091
Figure BDA0003315159880000092
wherein, layeriIs the i-layer network; wiIs a parameter of the ith layer; x is a design matrix of the position characteristics; layeroIs a layer o network.
S7: and performing feature classification by using the features spliced by the feedforward neural network.
Example 2
In order to verify and explain the technical effects adopted in the method, the embodiment selects principal component analysis, LDA, RF and SVM algorithms and adopts the method to perform comparison test, and compares test results by means of scientific demonstration to verify the real effect of the method.
Collecting fresh crayfish sample, collecting sample as 0 day after catching, placing in 4 deg.C refrigerator, and storing for 1, 2, 3, 4, 5 days. The dead shrimp samples are stored for 6h and 12h at 4 ℃ and 3h and 24h at normal temperature (25 ℃), wherein the group with 24h at 25 ℃ is a putrefactive group.
Wherein, the dead shrimp sample is treated as follows:
(1) selecting crayfishes with similar sizes, and removing dead shrimps and residual shrimps; 5 crayfish per bag were suffocated to death under a vacuum of 0.1 MPa.
(2) Sampling 20 crayfishes from a refrigerator at 4 ℃ at regular time every day, and putting the crayfishes at room temperature for 1h to restore the room temperature; putting each crayfish into a 500mL beaker, sealing the beaker by using a double-layer preservative film, and standing the beaker for 30 min.
(3) The instrument is preheated for 30min, a sample injection needle penetrates into a beaker for 5cm, samples are taken for 5000 mu L, crayfish with different storage days are detected by using an ultra-fast gas-phase electronic nose Heracles II, and the set instrument parameters are shown in Table 1.
Table 1: and analyzing the parameters.
Serial number Parameter(s) Condition
1 Sample introduction volume 5000μL
2 Temperature at sample inlet 200
3 Duration of sample introduction 45s
4 Initial trap temperature 40
5 Trap shunt rate 10mL/min
6 Trapping duration 50s
7 Trap final temperature 240
8 Initial temperature of column temperature 50
9 Programmed temperature raising mode of column temperature Maintaining at 1 deg.C/s-80 deg.C for 60s at 2 deg.C/s-250 deg.C
10 Time of acquisition 177s
11 Temperature of detector 260℃
Performing data dimensionality reduction on the chromatographic peak data by using principal component analysis to obtain a principal component analysis graph (figure 2), wherein 1-5 live crayfishes are respectively stored at 4 ℃ for 1-5 days, 6 and 7 dead crayfishes are respectively stored at 25 ℃ for 3h and 24h, and 8 and 9 dead crayfishes are respectively stored at 4 ℃ for 6h and 12 h; the results of PCA visual analysis can be known as follows: the contribution rate of PC1 was 21.8%, the contribution rate of PC2 was 12.6%, and the total contribution rate was 34.4%. The cross overlapping exists among all the classification sample points, so that different freshness degrees of the crayfishes cannot be distinguished; therefore, processing the sample odor information using principal component analysis cannot distinguish crayfish freshness.
Based on example 1, the specific parameters of the method are set as follows:
(1) and preprocessing the obtained ultra-fast gas phase electronic nose Heracles II chromatographic data.
(2) And calculating the empirical distribution of the peak heights by using the samples, solving the maximum probability interval of the peak heights recorded in the previous 666 records, and estimating a baseline value by using the interval mean value.
35407 pieces of peak height data are obtained in 177s of ultra-fast gas-phase electronic nose analysis time, and the front 666 pieces of data are taken; dividing the data into 67 data segments by taking step length 10 as a unit according to the maximum value and the minimum value of the first 666 data, counting the number of the 666 data falling into different data segments, finding the data segment falling into the most data, and taking the average value of the segment of data as a baseline value.
(3) Defining the initial annotation, the number of days of possible error label as
Figure BDA0003315159880000101
The real label is defined as y, the total number of samples is 380, and 9 types are divided into live shrimps (stored at 4 ℃ for 1 day, 2 days, 3 days, 4 days and 5 days) and dead shrimps (stored at 4 ℃ for 6h, 12h and 25 ℃ for 3h and 24h), wherein the live shrimp samples are 60 per type, and the dead shrimp samples are 20 per type.
Further, each type of 380 samples is averagely divided into 5 parts, one part is taken as a test set, the other 4 parts are taken as a training set, and the estimated probability p of the test set samples is calculated as { p ═ p {jJ-0, 1, 9, repeat 5 times to obtain an outlier prediction for all samples, where j is 0, 1
Figure BDA0003315159880000111
I.e. the probability that sample x belongs to the jth class.
Selecting
Figure BDA0003315159880000112
Filtering the samples at a maximum interval
Figure BDA0003315159880000113
Sorting, filtering 22 maximum-spaced samples of each category; in the obtained 22 filtered samples, the misjudgment is eliminated according to the real labelThe number of live and dead shrimp samples is 10, and the original label is modified into a real label by the other 12 samples.
(4) 128 features obtained by inputting the multi-layer perceptron are spliced with 64 features obtained by the sequence model, and 9 classifications are obtained by using the feedforward neural network classification.
Respectively modeling 300 live shrimps (stored at 4 ℃ for 1 day, 2 days, 3 days, 4 days and 5 days) and 80 dead shrimps (stored at 4 ℃ for 6h, 12h and 25 ℃ for 3h and 24h) by using the method and LDA, RF and SVM algorithms; in each group, 80% of crayfish samples are randomly selected as a training set, and 20% of samples are selected as a verification set; calculating the accuracy of model prediction according to the confusion matrix (figure 3);
table 2: and (5) predicting a model result of crayfish freshness.
Figure BDA0003315159880000114
As can be seen from Table 2, the accuracy of 5 times of prediction by using the method is respectively 92.00%, 93.33%, 95.95%, 97.30% and 97.30%, and the total prediction result can reach 95.16%; the prediction accuracy of the method is far higher than the accuracy (79.16%, 75.99% and 71.50%) of modeling by utilizing LDA, RF and SVM, and the method has good stability and accuracy.
It should be noted that the above-mentioned embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, which should be covered by the claims of the present invention.

Claims (8)

1. A crayfish freshness detection method based on a gas phase electronic nose and machine learning is characterized by comprising the following steps: comprises the steps of (a) preparing a mixture of a plurality of raw materials,
placing a crayfish sample in a beaker, sealing the beaker by using a double-layer preservative film, and standing for headspace;
preheating an ultra-fast gas phase electronic nose instrument, and inserting a sample injection needle into a beaker for sampling to obtain a chromatogram;
carrying out normalization pretreatment on the maximum value and the minimum value of the peak height of the chromatogram;
preprocessing the baseline data of the peak height, and eliminating the label noise of the crayfish sample by using a belief learning strategy;
performing feature extraction on the chromatogram by using a sequence model to obtain the trend features of the chromatogram with different freshness and odor changes;
extracting the content characteristics of the volatile compounds corresponding to each retention time through a multilayer perceptron according to the chromatogram trend characteristics, and splicing the chromatogram trend characteristics and the content characteristics of the volatile compounds;
and performing feature classification by using the features spliced by the feedforward neural network.
2. The crayfish freshness detection method based on the gas-phase electronic nose and the machine learning as claimed in claim 1, characterized in that: the normalization pre-processing includes the steps of,
Figure FDA0003315159870000011
wherein h isscaleIs the peak height of the chromatogram after normalization, h is the peak height of the chromatogram, hminMinimum value of the peak height of the chromatogram, hmaxThe maximum value of the peak height of the chromatogram.
3. The crayfish freshness detection method based on the gas-phase electronic nose and the machine learning as claimed in claim 2, characterized in that: pre-processing the baseline data for the peak heights includes,
calculating a peak height empirical distribution
Figure FDA0003315159870000012
For the range of values R for the peak height h { h |0 < h ≦ infinity }, there is a division S ═ S for any given normal number S1,S2,...,SrAnd (4) satisfying:
Si={h|(i-1)×s≤h≤i×s,sup(R)≤r×s},i=1,2,...r;
defining event A with peak height h falling in different data segment intervalsi={h|h∈SiThe probability of occurrence of the event
Figure FDA0003315159870000013
Calculating an estimated baseline value
Figure FDA0003315159870000014
Figure FDA0003315159870000015
Figure FDA0003315159870000016
Wherein, SrIs the r-th divided data segment; m is the event A with the maximum occurrence probabilityiNumber of corresponding section, SmN is the total peak height number of the corresponding division of the event with the maximum occurrence probability,
Figure FDA0003315159870000021
for the empirical distribution of the ith partition,
Figure FDA0003315159870000022
is the empirical distribution of the i-1 th partition.
4. The crayfish freshness detection method based on the gas-phase electronic nose and the machine learning as claimed in claim 3, characterized in that: empirical distribution of peak heights
Figure FDA0003315159870000023
Comprises the steps of (a) preparing a mixture of a plurality of raw materials,
the peak height h of the chromatogram map1,h2,...,hnThe real random variables which are regarded as independent and same distribution are subjected to the cumulative distribution function of F (k) to obtain the empirical distribution of the peak heights
Figure FDA0003315159870000024
Figure FDA0003315159870000025
Wherein the content of the first and second substances,
Figure FDA0003315159870000026
is { hi|hiK ≦ k).
5. The crayfish freshness detection method based on gas phase electronic nose and machine learning of claim 4, wherein: the label noise of the eliminated chromatogram includes,
defining the initial annotation, the number of days of possible error label as
Figure FDA0003315159870000027
The real tag is defined as y*The total number of samples is N, and the number of categories is M;
equally dividing N samples into a parts, taking one part as a test set, taking the rest a-1 parts as a training set, and calculating the estimated probability p of the test set samples, namely { p }jRepeating the operation a times to obtain the outward prediction of all samples;
calculating the average probability t under each calibration category jjAnd as a confidence threshold:
Figure FDA0003315159870000028
calculating a count matrix
Figure FDA0003315159870000029
Figure FDA00033151598700000210
Figure FDA00033151598700000211
Calibrating a counting matrix:
Figure FDA00033151598700000212
estimating initial tags
Figure FDA00033151598700000213
And a genuine label y*Joint distribution of
Figure FDA00033151598700000214
Figure FDA00033151598700000215
For a counting matrix
Figure FDA00033151598700000216
Off diagonal cell of (1), selecting
Figure FDA00033151598700000217
Filtering the samples at a maximum interval
Figure FDA0003315159870000031
Sorting, filtering of each category
Figure FDA0003315159870000032
A maximum-spaced sample;
wherein the probability that a sample x belongs to the jth class
Figure FDA0003315159870000033
Figure FDA0003315159870000034
Is an initial mark
Figure FDA0003315159870000035
The number of (2); l represents satisfy
Figure FDA0003315159870000036
The label of (1);
Figure FDA0003315159870000037
is a counting matrix
Figure FDA0003315159870000038
To the calibration value of (c).
6. The crawfish freshness detection method based on gas phase electronic nose and machine learning as claimed in any one of claims 3, 4 and 5, wherein: the chromatogram trend characteristics include that,
the sequence model preliminarily obtains rough trend characteristics X through multiple convolution, and then extracts trend characteristics SLSTM (X) of the X based on the LSTM network, namely the chromatogram trend characteristics:
Figure FDA00033151598700000311
wherein, LSTM1、LSTM2Is an LSTM network.
7. The crayfish freshness detection method based on the gas-phase electronic nose and the machine learning as claimed in claim 6, characterized in that: also comprises the following steps of (1) preparing,
the trend feature X is a sequence of length 65, each position t containing 64 numerical features X for a corresponding time segmentt
8. The crayfish freshness detection method based on gas phase electronic nose and machine learning of claim 7, wherein: the volatile compound content characteristics include,
layeri(X)=ReLU(XWi)
Figure FDA0003315159870000039
Figure FDA00033151598700000310
wherein, layeriIs the i-layer network; wiIs a parameter of the ith layer; x is a design matrix of the position characteristics; layeroIs a layer o network.
CN202111228666.9A 2021-10-21 2021-10-21 Crayfish freshness detection method based on gas phase electronic nose and machine learning Active CN113984946B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111228666.9A CN113984946B (en) 2021-10-21 2021-10-21 Crayfish freshness detection method based on gas phase electronic nose and machine learning

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111228666.9A CN113984946B (en) 2021-10-21 2021-10-21 Crayfish freshness detection method based on gas phase electronic nose and machine learning

Publications (2)

Publication Number Publication Date
CN113984946A true CN113984946A (en) 2022-01-28
CN113984946B CN113984946B (en) 2022-12-27

Family

ID=79740055

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111228666.9A Active CN113984946B (en) 2021-10-21 2021-10-21 Crayfish freshness detection method based on gas phase electronic nose and machine learning

Country Status (1)

Country Link
CN (1) CN113984946B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102297930A (en) * 2011-07-20 2011-12-28 浙江大学 Method for identifying and predicting freshness of meat
CN103389324A (en) * 2013-07-18 2013-11-13 浙江工商大学 Prawn freshness detection method based on smell analysis technology
CN106568907A (en) * 2016-11-07 2017-04-19 常熟理工学院 Chinese mitten crab freshness damage-free detection method based on semi-supervised identification projection
CN110308240A (en) * 2019-05-24 2019-10-08 深圳大学 A kind of electronic nose method for quickly identifying
WO2020027494A1 (en) * 2018-08-01 2020-02-06 (주)한그린테크 Device and method for measuring freshness on basis of machine learning
CN111624317A (en) * 2020-06-22 2020-09-04 南京农业大学 Nondestructive testing method for judging freshness of baby cabbage
CN111665819A (en) * 2020-06-08 2020-09-15 杭州电子科技大学 Deep learning multi-model fusion-based complex chemical process fault diagnosis method
CN111783568A (en) * 2020-06-16 2020-10-16 厦门市美亚柏科信息股份有限公司 Pedestrian re-identification method and device based on belief learning and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102297930A (en) * 2011-07-20 2011-12-28 浙江大学 Method for identifying and predicting freshness of meat
CN103389324A (en) * 2013-07-18 2013-11-13 浙江工商大学 Prawn freshness detection method based on smell analysis technology
CN106568907A (en) * 2016-11-07 2017-04-19 常熟理工学院 Chinese mitten crab freshness damage-free detection method based on semi-supervised identification projection
WO2020027494A1 (en) * 2018-08-01 2020-02-06 (주)한그린테크 Device and method for measuring freshness on basis of machine learning
CN110308240A (en) * 2019-05-24 2019-10-08 深圳大学 A kind of electronic nose method for quickly identifying
CN111665819A (en) * 2020-06-08 2020-09-15 杭州电子科技大学 Deep learning multi-model fusion-based complex chemical process fault diagnosis method
CN111783568A (en) * 2020-06-16 2020-10-16 厦门市美亚柏科信息股份有限公司 Pedestrian re-identification method and device based on belief learning and storage medium
CN111624317A (en) * 2020-06-22 2020-09-04 南京农业大学 Nondestructive testing method for judging freshness of baby cabbage

Non-Patent Citations (6)

* Cited by examiner, † Cited by third party
Title
GORSKA-HORCZYCZAK, E 等: "Chromatographic fingerprints supported by artificial neural network for differentiation of fresh and frozen pork", 《FOOD CONTROL》 *
HUBERT CECOTTI 等: "Grape detection with convolutional neural networks", 《EXPERT SYSTEMS WITH APPLICATIONS》 *
LOGUE C 等: "Neural-network-integrated electronic nose system for identification of spoiled beef", 《LEBENSMITTEL-WISSENSCHAFT UND TECHNOLOGIE》 *
RAYMOND K 等: "An artificial neural network model for predicting flavour intensity in blackcurrant concentrates", 《FOOD QUALITY AND PREFERENCE》 *
巴里·L.尼尔森: "《随机仿真原理与方法》", 31 December 2019, 国防工业出版社 *
朱晓琳: "基于高光谱成像的水果品质及木材含水量评估方法", 《中国优秀硕士学位论文全文数据库 (工程科技Ⅰ辑)》 *

Also Published As

Publication number Publication date
CN113984946B (en) 2022-12-27

Similar Documents

Publication Publication Date Title
Mazen et al. Ripeness classification of bananas using an artificial neural network
CN106568907B (en) A kind of steamed crab freshness lossless detection method based on semi-supervised identification projection
CN105044298B (en) A kind of Eriocheir sinensis class grade of freshness detection method based on machine olfaction
CN109934269B (en) Open set identification method and device for electromagnetic signals
CN102353701B (en) Diagnostic method for insect attacks on crops by utilizing volatile matter
CN104849321B (en) A kind of method based on smell finger-print quick detection Quality Parameters in Orange
CN104298977B (en) A kind of low-rank representation Human bodys&#39; response method constrained based on irrelevance
CN109919241A (en) Hyperspectral unknown class target detection method based on probability model and deep learning
CN105954412B (en) For the sensor array optimization method of hickory nut freshness detection
CN105738581B (en) A kind of method for quick identification of the different freshness hickory nuts based on electronic nose
CN105699437A (en) Rapid nondestructive distinguishing method of Chinese walnuts with different fresh degrees based on electronic nose
Devi et al. IoT-deep learning based prediction of amount of pesticides and diseases in fruits
Mavi et al. Mango ripeness classification system using hybrid technique
CN113984946B (en) Crayfish freshness detection method based on gas phase electronic nose and machine learning
Guo et al. Hyperspectral image analysis for the evaluation of chilling injury in avocado fruit during cold storage
CN110726813B (en) Electronic nose prediction method based on double-layer integrated neural network
CN110738259B (en) Fault detection method based on Deep DPCA-SVM
Abalos et al. Fresh fish classification using hog feature extraction and svm
Najib et al. Fish quality study using odor-profile case-based reasoning (CBR) classification technique
Wang et al. A Research of Neural Network Optimization Technology for Apple Freshness Recognition Based on Gas Sensor Array
Wang et al. An E-nose and convolution neural network based recognition method for processed products of Crataegi Fructus
Shah et al. Automatically localising ROIs in hyperspectral images using background subtraction techniques
CN114169903A (en) Traditional Chinese medicine digital quality control tracing method capable of fusing nondestructive testing technology
Pusadan et al. k-Nearest Neighbor and Feature Extraction on Detection of Pest and Diseases of Cocoa
Sadhana et al. Fruit Quality Identification Using Deep LearningTechniques

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant