CN116400028A - Essence quality detection method, system and medium based on smell sensor - Google Patents
Essence quality detection method, system and medium based on smell sensor Download PDFInfo
- Publication number
- CN116400028A CN116400028A CN202310608841.XA CN202310608841A CN116400028A CN 116400028 A CN116400028 A CN 116400028A CN 202310608841 A CN202310608841 A CN 202310608841A CN 116400028 A CN116400028 A CN 116400028A
- Authority
- CN
- China
- Prior art keywords
- sensor
- sensing
- particle
- features
- data
- 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
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 29
- 238000000034 method Methods 0.000 claims abstract description 31
- 239000013598 vector Substances 0.000 claims abstract description 30
- 230000009467 reduction Effects 0.000 claims abstract description 26
- 238000012545 processing Methods 0.000 claims abstract description 16
- 238000010845 search algorithm Methods 0.000 claims abstract description 13
- 238000013527 convolutional neural network Methods 0.000 claims abstract description 11
- 238000004364 calculation method Methods 0.000 claims abstract description 10
- 238000007781 pre-processing Methods 0.000 claims abstract description 10
- 230000004927 fusion Effects 0.000 claims abstract description 7
- 230000005484 gravity Effects 0.000 claims abstract description 5
- 239000002245 particle Substances 0.000 claims description 57
- 230000035772 mutation Effects 0.000 claims description 29
- MWUXSHHQAYIFBG-UHFFFAOYSA-N nitrogen oxide Inorganic materials O=[N] MWUXSHHQAYIFBG-UHFFFAOYSA-N 0.000 claims description 18
- 230000006870 function Effects 0.000 claims description 17
- 238000004422 calculation algorithm Methods 0.000 claims description 13
- QGZKDVFQNNGYKY-UHFFFAOYSA-N Ammonia Chemical compound N QGZKDVFQNNGYKY-UHFFFAOYSA-N 0.000 claims description 12
- LFQSCWFLJHTTHZ-UHFFFAOYSA-N Ethanol Chemical compound CCO LFQSCWFLJHTTHZ-UHFFFAOYSA-N 0.000 claims description 12
- 150000001491 aromatic compounds Chemical class 0.000 claims description 12
- 238000009826 distribution Methods 0.000 claims description 12
- 238000012549 training Methods 0.000 claims description 12
- 239000003205 fragrance Substances 0.000 claims description 11
- 239000011159 matrix material Substances 0.000 claims description 11
- 239000000796 flavoring agent Substances 0.000 claims description 9
- 235000019634 flavors Nutrition 0.000 claims description 9
- 238000007500 overflow downdraw method Methods 0.000 claims description 7
- 230000008569 process Effects 0.000 claims description 7
- 230000001133 acceleration Effects 0.000 claims description 6
- 150000001335 aliphatic alkanes Chemical class 0.000 claims description 6
- 229910021529 ammonia Inorganic materials 0.000 claims description 6
- 239000001257 hydrogen Substances 0.000 claims description 6
- 229910052739 hydrogen Inorganic materials 0.000 claims description 6
- 125000004435 hydrogen atom Chemical class [H]* 0.000 claims description 6
- 150000003568 thioethers Chemical class 0.000 claims description 6
- 238000010606 normalization Methods 0.000 claims description 5
- 238000011176 pooling Methods 0.000 claims description 5
- 238000007637 random forest analysis Methods 0.000 claims description 4
- 230000008859 change Effects 0.000 claims description 3
- 238000003860 storage Methods 0.000 claims description 3
- 238000012360 testing method Methods 0.000 claims description 3
- 238000012372 quality testing Methods 0.000 claims 1
- 235000013599 spices Nutrition 0.000 description 9
- 235000013305 food Nutrition 0.000 description 7
- 238000004519 manufacturing process Methods 0.000 description 5
- 238000000862 absorption spectrum Methods 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 2
- 230000007423 decrease Effects 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 239000002304 perfume Substances 0.000 description 2
- 230000004913 activation Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 238000002790 cross-validation Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000004817 gas chromatography Methods 0.000 description 1
- 230000036541 health Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 239000012535 impurity Substances 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 238000002360 preparation method Methods 0.000 description 1
- 239000002994 raw material Substances 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 230000035945 sensitivity Effects 0.000 description 1
- 239000000126 substance Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N33/00—Investigating or analysing materials by specific methods not covered by groups G01N1/00 - G01N31/00
- G01N33/0004—Gaseous mixtures, e.g. polluted air
- G01N33/0009—General constructional details of gas analysers, e.g. portable test equipment
- G01N33/0027—General constructional details of gas analysers, e.g. portable test equipment concerning the detector
- G01N33/0031—General constructional details of gas analysers, e.g. portable test equipment concerning the detector comprising two or more sensors, e.g. a sensor array
- G01N33/0034—General constructional details of gas analysers, e.g. portable test equipment concerning the detector comprising two or more sensors, e.g. a sensor array comprising neural networks or related mathematical techniques
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N33/00—Investigating or analysing materials by specific methods not covered by groups G01N1/00 - G01N31/00
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/213—Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
- G06F18/2415—Classification 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/25—Fusion techniques
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02A—TECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
- Y02A50/00—TECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE in human health protection, e.g. against extreme weather
- Y02A50/20—Air quality improvement or preservation, e.g. vehicle emission control or emission reduction by using catalytic converters
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Chemical & Material Sciences (AREA)
- General Physics & Mathematics (AREA)
- Artificial Intelligence (AREA)
- Evolutionary Computation (AREA)
- Health & Medical Sciences (AREA)
- Computer Vision & Pattern Recognition (AREA)
- General Engineering & Computer Science (AREA)
- Bioinformatics & Computational Biology (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Evolutionary Biology (AREA)
- Biochemistry (AREA)
- Pathology (AREA)
- Immunology (AREA)
- General Health & Medical Sciences (AREA)
- Analytical Chemistry (AREA)
- Medicinal Chemistry (AREA)
- Food Science & Technology (AREA)
- Probability & Statistics with Applications (AREA)
- Combustion & Propulsion (AREA)
- Mathematical Physics (AREA)
- Investigating Or Analyzing Materials By The Use Of Electric Means (AREA)
Abstract
The invention discloses an essence quality detection method system based on an odor sensor and a medium, wherein the method comprises the steps of setting an odor sensor array, preprocessing data based on a one-dimensional convolutional neural network, splicing and fusing a class probability vector and a feature vector after dimension reduction processing, and identifying according to fused data features based on an attraction search algorithm to obtain a matched essence quality grade. According to the invention, the dimension reduction and fusion of the features are carried out by combining the correlation degree and the redundancy degree of the data features, so that important feature information including global information is reserved, the redundancy features are removed, and the calculation difficulty is reduced; and the gravity search algorithm is based on the recognition of the fused data characteristics, so that the automatic recognition and matching of the essence quality are realized, and the essence quality can be detected rapidly and accurately.
Description
Technical Field
The invention relates to the field of essence quality detection, in particular to an essence quality detection method system based on an odor sensor and a medium.
Background
The essence and spice in the food is an important production raw material for food production, the formula of the spice and spice naturally becomes the core technology of a production enterprise, and the quality of the essence and spice is closely related to the brand. With the continuous progress of the production process, people have higher and higher requirements on the quality and flavor of products, and essence and spice are widely applied to the food production industry as an article which can influence the mouthfeel and flavor of foods. In recent years, the health awareness of people is gradually enhanced, so that manufacturers need to exert force to improve the safety of foods, the use of essence and spice is more and more careful, once the content of the essence and spice in the product is reduced, the food is inevitably caused, the mouthfeel of the food is influenced, the original style of the product is lost, and the product is difficult to be accepted by wide consumers. Therefore, the flavor and fragrance content of the product is reduced, and the formula of the flavor and fragrance is optimized to ensure the taste and fragrance of the product.
The existing detection methods for the essence and the spice are gas chromatography, infrared absorption spectrum analysis method, ultraviolet absorption spectrum analysis method and the like, the preparation and experimental processes of the method are complex, the required time is long, a large number of samples cannot be detected, and the quick and accurate detection of the essence and the spice samples cannot be realized.
Disclosure of Invention
In order to solve the technical problems, the invention provides an essence quality detection method system based on an odor sensor and a medium. The method is based on the smell sensors, and realizes automatic identification and matching of essence quality by data acquisition and fusion of a plurality of smell sensors, so that quick and accurate essence quality detection is realized.
The invention is realized by the following technical scheme:
an essence quality detection method based on an odor sensor comprises the following steps:
s1: providing an odor sensor array, wherein the odor sensor array comprises a W1C sensor for sensing aromatic compounds, a W5S sensor for sensing nitrogen oxides, a W3C sensor for sensing ammonia and aromatic compounds, a W6S sensor for sensing hydrogen, a W1W sensor for sensing sulfides, a W2S sensor for sensing ethanol and a W3S sensor for sensing alkanes;
s2: acquiring odor sensor array data;
s3: carrying out data preprocessing on the data based on a one-dimensional convolutional neural network;
s4: fusing the data of the multiple sensors, wherein the data features of the multiple sensors extracted in the step S3 are fused;
the fusion method comprises the steps of splicing and fusing the category probability vector and the feature vector subjected to the dimension reduction treatment to obtain fused features;
the class probability vector is obtained by utilizing original input features to respectively perform feature training based on different classifiers;
s5: and identifying according to the fused data characteristics based on an gravitation search algorithm to obtain the matched essence quality grade.
Further, the one-dimensional convolutional neural network in the step S3 includes 4 convolutional layers, 3 pooling layers and one flattening layer, and the convolutional kernel size of the convolutional layers is 3.
Further, the category probability vector in the step S4 is obtained by the following method:
and performing feature training by utilizing original input features based on different classifiers respectively, wherein the classifiers comprise random forests, XGBoost and GBDT, and obtaining a class probability vector through training.
Further, the dimension reduction processing in step S4 includes calculating a correlation coefficient and redundancy, and performing dimension reduction processing according to the correlation coefficient and redundancy, where the dimension reduction processing includes deleting a feature with a correlation lower than a set threshold and randomly selecting one of features with a redundancy higher than the set threshold, so as to obtain a feature after the dimension reduction processing.
Further, the correlation coefficient is calculated as follows:
of the formula (I) and />The average value of the quality of the feature vector and the essence is +.>The number of samples is represented here as the sample size.
Further, the redundancy calculation method is as follows:
for a matrix D formed by one feature A and another feature B extracted by a sensor, firstly, distributing data points in the D in a two-dimensional plane by using a maximum information coefficient method, and carrying out grid division on the plane by using aXb straight lines, and calculating to obtain probability distribution of the data points falling into a demarcation grid, namely mutual information equivalent to the information between A and B under the division condition, wherein the probability distribution is shown as the following formula:
The maximum information coefficient between the features is further calculated, and the process is as follows:
where R is a function of the sample size,, />for the number of test samples, +.>To adjust the parameters.
Further, the identifying based on the gravitation search algorithm according to the fused data features comprises:
s51: algorithm parameter initialization including setting population size to N, solution range [ up, down ]]Dimension dim of solution, maximum iteration number T, initial gravitational constant G 0 The method comprises the steps of carrying out a first treatment on the surface of the At [ up, down ]]Randomly generating an initial population in a range;
s52: calculating an fitness value according to the fitness function;
s53: find the optimal fitness value F best And corresponding location information L thereof best ;
S54: updating the individual quality matrix M according to the following formula, and obtaining a population quality matrix M through normalization;
wherein ,for the fitness of particle i +.>Is the optimal value at the t-th iteration, < >>Is the worst value at the t-th iteration; />The particle quality after normalization;
s55: updating the gravitational constant G according to the following formula;
wherein ,is the initial gravitational constant, +.>Is constant, T is the maximum number of iterations;
s56: calculating Euclidean distance between particles i and j, and calculating attraction force F between particles i and j on the kth dimension at the t-th iteration according to the following ij ;
s57: updating the resultant force F and the particle acceleration a suffered by the particle i according to the following formula;
the total force to which the particle i is subjected in the k-th dimension is equal to the random weighted sum of the forces of the other particles:
wherein p is a random parameter representing a random weight.
The acceleration of the particles is calculated according to the following formula:
s58: updating particle velocity and position according to
wherein ,is the k-dimensional component of the position of particle i, < >>Is the k-dimensional component of the velocity of particle i, < >>、/>、/>Is [0,1]Random parameters in->、/>For learning factors->For the current optimal position of the kth dimension individual, < >>The k-th dimension global optimal position;
by adjusting、/>The value of (2) can adjust the degree of influence of individuals and groups in the particle movement process;
s59: calculating a mutation trigger function value, and judging whether the mutation trigger function value meets a mutation condition or not;
as the number of iterations increases, the amplitude of the movement of the particles decreases significantly. Therefore, the algorithm is improved based on the self-adaptive mutation method, meanwhile, the mutation triggering rate is reduced along with the increase of the iteration times, the diversity of the population is improved by using a higher mutation rate at the initial stage of the algorithm, the global optimizing capability of the algorithm is enhanced, the mutation rate is reduced at the later stage, the damage to good individuals is prevented, and a foundation is provided for obtaining higher precision. The mutation trigger function value calculation method comprises the following steps:
wherein ,for the abrupt trigger value of the ith particle in the t-th iteration, when +.>When the threshold value is larger than the set threshold value, triggering abrupt change; p is a random parameter, dim is the dimension of the solution,>is a smaller constant;
s510: performing position uniform mutation
The uniform mutation update particle location formula is as follows:
wherein p is a random parameter ranging between [0,1 ];
s511: and (5) carrying out loop iteration, and outputting a global optimal solution, namely the quality grade of the matched essence.
wherein G is an gravitation constant, T is the current iteration number, and T is the maximum iteration number.
The invention also provides an essence quality detection system based on the odor sensor, which comprises:
an odor sensor array comprising a W1C sensor for sensing aromatic compounds, a W5S sensor for sensing nitrogen oxides, a W3C sensor for sensing ammonia and aromatic compounds, a W6S sensor for sensing hydrogen, a W1W sensor for sensing sulfides, a W2S sensor for sensing ethanol, a W3S sensor for sensing alkanes;
the data preprocessing module is used for preprocessing sensor data based on the one-dimensional convolutional neural network;
the multi-sensor data fusion module is used for fusing the data characteristics of the plurality of sensors, and the fusion method is to splice and fuse the category probability vector and the feature vector subjected to the dimension reduction treatment to obtain the fused features;
the class probability vector is obtained by utilizing original input features to respectively perform feature training based on different classifiers;
and the feature recognition module is used for recognizing the fused data features based on an gravitation search algorithm.
In addition, to achieve the above object, the present invention also provides a computer-readable storage medium having stored thereon program instructions of an aroma-sensor-based aroma quality detection method, the program instructions of the aroma-sensor-based aroma quality detection being executable by one or more processors to implement the steps of the aroma-sensor-based aroma quality detection method as described above.
Compared with the prior art, the invention has the beneficial effects that: the feature dimension reduction and fusion are carried out by combining the relativity and redundancy of the data features, so that important feature information including global information is reserved, the redundancy features are removed, and the calculation difficulty is reduced; and the gravity search algorithm is based on the recognition of the fused data characteristics, so that the automatic recognition and matching of the essence quality are realized, and the essence quality can be detected rapidly and accurately.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute an undue limitation to the application. In the drawings:
fig. 1 is a schematic flow chart of a perfume quality detection method based on a perfume smell sensor according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a multi-sensor data fusion method according to an embodiment of the present application;
fig. 3 is a schematic flow diagram of a feature recognition algorithm based on an gravity search algorithm according to an embodiment of the present application.
Detailed Description
Embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
Other advantages and effects of the present disclosure will become readily apparent to those skilled in the art from the following disclosure, which describes embodiments of the present disclosure by way of specific examples. It will be apparent that the described embodiments are merely some, but not all embodiments of the present disclosure. The disclosure may be embodied or practiced in other different specific embodiments, and details within the subject specification may be modified or changed from various points of view and applications without departing from the spirit of the disclosure. It should be noted that the following embodiments and features in the embodiments may be combined with each other without conflict. All other embodiments, which can be made by one of ordinary skill in the art without inventive effort, based on the embodiments in this disclosure are intended to be within the scope of this disclosure.
It should also be noted that the illustrations provided in the following embodiments merely illustrate the basic concepts of the disclosure by way of illustration, and only the components related to the disclosure are shown in the drawings and are not drawn according to the number, shape and size of the components in actual implementation, and the form, number and proportion of the components in actual implementation may be arbitrarily changed, and the layout of the components may be more complicated.
Referring to fig. 1, a fragrance quality detection method based on a fragrance sensor includes the following steps:
s1: providing an array of odour sensors
The type of odor sensor is selected according to the components of the essence and the components of impurities in the common essence, and comprises a W1C sensor for sensing aromatic compounds, a W5S sensor for sensing nitrogen oxides, a W3C sensor for sensing ammonia and aromatic compounds, a W6S sensor for sensing hydrogen, a W1W sensor for sensing sulfides, a W2S sensor for sensing ethanol and a W3S sensor for sensing alkanes.
S2: acquisition of smell sensor array data
Sensor data is acquired from the sensor array in step S1.
S3: data preprocessing
Because the sensitive substances of the sensors have certain overlapping, the n sensors have stronger cross sensitivity, and the data needs to be processed in order to improve the usability of the data. The invention processes data based on a one-dimensional convolutional neural network, and the specific method is as follows:
the data comprises response values of n sensors, and if the data volume of each sensor is m, the sensor data isThe matrix of (2) converts the data into n channels of one-dimensional convolutional neural network, and the network outputs k eigenvectors.
Optionally, the one-dimensional convolutional neural network comprises 4 convolutional layers, 3 pooling layers and a flattening layer, the convolutional kernel size of the convolutional layers is 3, and ReLU is selected as an activation function; the step length of the first two pooling layers is 2, the size of the filter is 2, the step length of the last pooling layer is 1, and the size of the filter is 3; and finally, converting the two-dimensional feature matrix into k feature vectors through a flattening layer. Optionally, k is 128.
S4: and (3) fusing the data characteristics of the plurality of sensors extracted in the step (S3), wherein the data fusion method is shown in fig. 2:
s41: the method comprises the steps of performing feature training by utilizing original input features based on different classifiers respectively, wherein the classifiers comprise random forest, XGBoost and GBDT, and obtaining a class probability vector P through training 1 ,P 2 ,…P j ;
S42, performing dimension reduction processing on the original input features to obtain feature vectors T after the dimension reduction processing;
the dimension reduction processing comprises the steps of calculating a correlation coefficient and redundancy, and performing dimension reduction processing according to the correlation coefficient and redundancy, and comprises the following steps:
s421: the correlation coefficient between each characteristic and the essence quality is calculated, and the calculation method is as follows:
of the formula (I) and />The average value of the quality of the feature vector and the essence is +.>The number of samples is represented here as the sample size.
S422: calculating redundancy between features
The lower the correlation between the two variables, the less overlapping their information, i.e., the lower the redundancy. The invention calculates redundancy between every two features based on a maximum information coefficient method, and comprises the following steps:
for a matrix D formed by one feature A and another feature B extracted by a sensor, firstly, distributing data points in the D in a two-dimensional plane by using a maximum information coefficient method, and carrying out grid division on the plane by using aXb straight lines, and calculating to obtain probability distribution of the data points falling into a demarcation grid, namely mutual information equivalent to the information between A and B under the division condition, wherein the probability distribution is shown as the following formula:
Further calculating a maximum information coefficient between features, the process of which is shown in the following formula, wherein R is a sample capacity function, calculating the maximum information coefficient between features,, />for the number of test samples, +.>The value of (2) affects the universality of the maximum information coefficient method, and optionally, the value is 0.6.
S423: dimension reduction treatment
Deleting the features with the correlation lower than the set threshold value and randomly selecting one of the features with the redundancy higher than the set threshold value, thereby obtaining the features after the dimension reduction processing.
S43: and splicing and fusing the category probability vector and the feature vector subjected to the dimension reduction treatment to obtain fused features.
Based on the method, important characteristic information including global information is reserved, redundant characteristics are removed, and calculation difficulty is reduced.
S5: based on the gravitation search algorithm, the recognition is carried out according to the fused data characteristics, and the quality grade of the matched essence is obtained, as shown in figure 3, and the method comprises the following steps:
s51: algorithm parameter initialization including setting population size to N, solution range [ up, down ]]Dimension dim of solution, maximum iteration number T, initial gravitational constant G 0 The method comprises the steps of carrying out a first treatment on the surface of the At [ up, down ]]Randomly generating an initial population in a range;
s52: calculating an fitness value according to the fitness function;
optionally, the fitness function is a 5-fold cross-validation accuracy.
S53: find the optimal fitness value F best And corresponding location information L thereof best ;
S54: updating the individual quality matrix M according to the following formula, and obtaining a population quality matrix M through normalization;
wherein ,for the fitness of particle i +.>Is the optimal value at the t-th iteration, < >>Is the worst value at the t-th iteration; />Is the normalized particle mass.
S55: updating the gravitational constant G according to the following formula;
wherein ,is the initial gravitational constant, +.>Is constant, T is the maximum number of iterations.
S56: calculating Euclidean distance between particles i and j, and calculating attraction force F between particles i and j on the kth dimension at the t-th iteration according to the following ij ;
S57: updating the resultant force F and the particle acceleration a suffered by the particle i according to the following formula;
the total force experienced by particle i in the k-th dimension is equal to the random weighted sum of the forces of the other particles.
Wherein p is a random parameter representing a random weight.
The acceleration of the particles is calculated according to the following formula:
s58: updating particle velocity and position according to
wherein ,is the k-dimensional component of the position of particle i, < >>Is the k-dimensional component of the velocity of particle i, < >>、/>、/>Is [0,1]Random parameters in->、/>For learning factors->For the current optimal position of the kth dimension individual, < >>Is the k-th dimension global optimum position.
By adjusting、/>The value of (2) can be used to adjust the degree of influence of the individual and population during the movement of the particles, optionally,/->、/>Calculated according to the following formula:
wherein G is an gravitation constant, T is the current iteration number, and T is the maximum iteration number.
S59: calculating a mutation trigger function value, and judging whether the mutation trigger function value meets a mutation condition or not;
as the number of iterations increases, the amplitude of the movement of the particles decreases significantly. Therefore, the algorithm is improved based on the self-adaptive mutation method, meanwhile, the mutation triggering rate is reduced along with the increase of the iteration times, the diversity of the population is improved by using a higher mutation rate at the initial stage of the algorithm, the global optimizing capability of the algorithm is enhanced, the mutation rate is reduced at the later stage, the damage to good individuals is prevented, and a foundation is provided for obtaining higher precision. The mutation trigger function value calculation method comprises the following steps:
wherein ,for the abrupt trigger value of the ith particle in the t-th iteration, when +.>When the threshold value is larger than the set threshold value, triggering abrupt change; p is a random parameter, dim is the dimension of the solution,>is a smaller constant, optionally +.>。
S510: performing position uniform mutation
For an individual meeting the mutation condition, an algorithm is improved by adopting a uniform mutation method, particles meeting the condition can continue to move with a larger amplitude based on a certain amplitude, so that the particles are close to an optimal solution area, and particles not meeting the condition can keep the original amplitude movement. The moving mode can enable particles to move to the vicinity of the optimal solution area rapidly, so that the convergence speed of an algorithm is improved. The uniform mutation update particle location formula is as follows:
wherein p is a random parameter ranging between [0,1 ].
S511: and (5) carrying out loop iteration, and outputting a global optimal solution, namely the quality grade of the matched essence.
In the embodiment, the dimension reduction and fusion of the features are performed by combining the correlation degree and the redundancy degree of the data features, so that important feature information including global information is reserved, the redundancy features are removed, and the calculation difficulty is reduced; and the gravity search algorithm is based on the recognition of the fused data characteristics, so that the automatic recognition and matching of the essence quality are realized, and the essence quality can be detected rapidly and accurately.
The embodiment of the invention also provides an essence quality detection system based on the odor sensor, which comprises the following steps:
an odor sensor array comprising a W1C sensor for sensing aromatic compounds, a W5S sensor for sensing nitrogen oxides, a W3C sensor for sensing ammonia and aromatic compounds, a W6S sensor for sensing hydrogen, a W1W sensor for sensing sulfides, a W2S sensor for sensing ethanol, a W3S sensor for sensing alkanes;
the data preprocessing module is used for preprocessing sensor data based on the one-dimensional convolutional neural network;
the multi-sensor data fusion module is used for fusing the data characteristics of a plurality of sensors, and the data fusion method comprises the following steps:
the method comprises the steps of performing feature training by utilizing original input features based on different classifiers respectively, wherein the classifiers comprise random forest, XGBoost and GBDT, and obtaining a class probability vector P through training 1 ,P 2 ,…P j ;
Performing dimension reduction processing on the original input features to obtain feature vectors T after the dimension reduction processing;
and splicing and fusing the category probability vector and the feature vector subjected to the dimension reduction treatment to obtain fused features.
And the feature recognition module is used for recognizing the fused data features based on an gravitation search algorithm.
In addition, an embodiment of the present invention further proposes a computer readable storage medium, on which program instructions of an aroma-sensor-based aroma quality detection method are stored, where the program instructions of the aroma-sensor-based aroma quality detection program can be executed by one or more processors to implement the steps of the aroma-sensor-based aroma quality detection method as described above.
The above examples are only illustrative of the preferred embodiments of the present invention and are not intended to limit the scope of the present invention, and various modifications and improvements made by those skilled in the art to the technical solution of the present invention should fall within the scope of protection defined by the claims of the present invention without departing from the spirit of the present invention.
Claims (10)
1. The essence quality detection method based on the smell sensor is characterized by comprising the following steps of:
s1: providing an odor sensor array, wherein the odor sensor array comprises a W1C sensor for sensing aromatic compounds, a W5S sensor for sensing nitrogen oxides, a W3C sensor for sensing ammonia and aromatic compounds, a W6S sensor for sensing hydrogen, a W1W sensor for sensing sulfides, a W2S sensor for sensing ethanol and a W3S sensor for sensing alkanes;
s2: acquiring odor sensor array data;
s3: carrying out data preprocessing on the data based on a one-dimensional convolutional neural network;
s4: fusing the data of the multiple sensors, wherein the data features of the multiple sensors extracted in the step S3 are fused;
the fusion method comprises the steps of splicing and fusing the category probability vector and the feature vector subjected to the dimension reduction treatment to obtain fused features;
the class probability vector is obtained by utilizing original input features to respectively perform feature training based on different classifiers;
s5: and identifying according to the fused data characteristics based on an gravitation search algorithm to obtain the matched essence quality grade.
2. The fragrance quality testing method based on the fragrance sensor according to claim 1, wherein the one-dimensional convolutional neural network in the step S3 comprises 4 convolutional layers, 3 pooling layers and one flattening layer, and the convolutional layer has a convolutional kernel size of 3.
3. The flavor quality detection method based on the odor sensor according to claim 2, wherein the category probability vector in the step S4 is obtained by the following method:
and performing feature training by utilizing original input features based on different classifiers respectively, wherein the classifiers comprise random forests, XGBoost and GBDT, and obtaining a class probability vector through training.
4. The method for detecting the quality of essence based on an odor sensor according to claim 3, wherein the dimension reduction processing in the step S4 includes calculating a correlation coefficient and redundancy, and performing dimension reduction processing according to the correlation coefficient and redundancy, wherein the dimension reduction processing includes deleting a feature having a correlation lower than a set threshold and randomly selecting one of features having a redundancy higher than the set threshold, thereby obtaining a feature after the dimension reduction processing.
5. The flavor quality detection method based on the odor sensor according to claim 4, wherein the correlation coefficient is calculated as follows:
6. The flavor quality detection method based on the odor sensor according to claim 5, wherein the redundancy calculation method is as follows:
for a matrix D formed by one feature A and another feature B extracted by a sensor, firstly, distributing data points in the D in a two-dimensional plane by using a maximum information coefficient method, and carrying out grid division on the plane by using aXb straight lines, and calculating to obtain probability distribution of the data points falling into a demarcation grid, namely mutual information equivalent to the information between A and B under the division condition, wherein the probability distribution is shown as the following formula:
the maximum information coefficient between the features is calculated, and the process is as follows:
7. The scent sensor-based essence quality detection method of claim 1, wherein the gravity-based search algorithm identifies based on the fused data features comprises:
s51: algorithm parameter initialization including setting population size to N, solution range [ up, down ]]Dimension dim of solution, maximum iteration number T, initial gravitational constant G 0 The method comprises the steps of carrying out a first treatment on the surface of the At [ up, down ]]Randomly generating an initial population in a range;
s52: calculating an fitness value according to the fitness function;
s53: find the optimal fitness value F best And corresponding location information L thereof best ;
S54: updating the individual quality matrix M according to the following formula, and obtaining a population quality matrix M through normalization;
wherein ,for the fitness of particle i +.>Is the optimal value at the t-th iteration, < >>Is the worst value at the t-th iteration; />The particle quality after normalization;
s55: updating the gravitational constant G according to the following formula;
wherein ,is the initial gravitational constant, +.>Is constant, T is the maximum number of iterations;
s56: calculating Euclidean distance between particles i and j, and calculating attraction force F between particles i and j on the kth dimension at the t-th iteration according to the following ij ;
s57: updating the resultant force F and the particle acceleration a suffered by the particle i according to the following formula;
the total force to which the particle i is subjected in the k-th dimension is equal to the random weighted sum of the forces of the other particles:
wherein p is a random parameter, representing a random weight;
the acceleration of the particles is calculated according to the following formula:
s58: updating particle velocity and position according to
wherein ,is the k-dimensional component of the position of particle i, < >>Is the k-dimensional component of the velocity of particle i, < >>、/>、/>Is [0,1]Random parameters in->、/>For learning factors->For the current optimal position of the kth dimension individual, < >>The k-th dimension global optimal position;
by adjusting、/>The value of (2) can adjust the degree of influence of individuals and groups in the particle movement process;
s59: calculating a mutation trigger function value, and judging whether the mutation trigger function value meets a mutation condition or not;
the algorithm is improved based on the self-adaptive mutation method, and the mutation trigger function value calculation method comprises the following steps:
wherein ,for the abrupt trigger value of the ith particle in the t-th iteration, when +.>When the threshold value is larger than the set threshold value, triggering abrupt change; p is a random parameter, dim is the dimension of the solution,>is a smaller constant;
s510: performing position uniform mutation
The uniform mutation update particle location formula is as follows:
wherein p is a random parameter ranging between [0,1 ];
s511: and (5) carrying out loop iteration, and outputting a global optimal solution, namely the quality grade of the matched essence.
9. A system based on the scent sensor-based fragrance quality detection method of any of claims 1-8, comprising:
an odor sensor array comprising a W1C sensor for sensing aromatic compounds, a W5S sensor for sensing nitrogen oxides, a W3C sensor for sensing ammonia and aromatic compounds, a W6S sensor for sensing hydrogen, a W1W sensor for sensing sulfides, a W2S sensor for sensing ethanol, a W3S sensor for sensing alkanes;
the data preprocessing module is used for preprocessing sensor data based on the one-dimensional convolutional neural network;
the multi-sensor data fusion module is used for fusing the data characteristics of the plurality of sensors, and the fusion method is to splice and fuse the category probability vector and the feature vector subjected to the dimension reduction treatment to obtain the fused features;
the class probability vector is obtained by utilizing original input features to respectively perform feature training based on different classifiers;
and the feature recognition module is used for recognizing the fused data features based on an gravitation search algorithm.
10. A computer readable storage medium having stored thereon program instructions of a scent sensor based fragrance quality detection method, the program instructions of the scent sensor based fragrance quality detection being executable by one or more processors to implement the steps of the scent sensor based fragrance quality detection method of one of claims 1-8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310608841.XA CN116400028B (en) | 2023-05-29 | 2023-05-29 | Essence quality detection method, system and medium based on smell sensor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310608841.XA CN116400028B (en) | 2023-05-29 | 2023-05-29 | Essence quality detection method, system and medium based on smell sensor |
Publications (2)
Publication Number | Publication Date |
---|---|
CN116400028A true CN116400028A (en) | 2023-07-07 |
CN116400028B CN116400028B (en) | 2023-08-22 |
Family
ID=87014417
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310608841.XA Active CN116400028B (en) | 2023-05-29 | 2023-05-29 | Essence quality detection method, system and medium based on smell sensor |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116400028B (en) |
Citations (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104408671A (en) * | 2014-12-09 | 2015-03-11 | 中国石油大学(华东) | Method for monitoring state of equipment of power plant based on IGSA (improved gravitational search algorithm)-based SVM (support vector machine) |
CN106374465A (en) * | 2016-11-10 | 2017-02-01 | 南京信息工程大学 | GSA-LSSVM model-based short period wind electricity generation power prediction method |
CN108520195A (en) * | 2018-01-31 | 2018-09-11 | 湖北工业大学 | A kind of MUSIC spectrum peak search methods based on gravitation search algorithm |
US20190079975A1 (en) * | 2017-09-11 | 2019-03-14 | Hefei University Of Technology | Scheduling method and system based on hybrid variable neighborhood search and gravitational search algorithm |
CN111368891A (en) * | 2020-02-27 | 2020-07-03 | 大连大学 | K-Means text classification method based on immune clone wolf optimization algorithm |
CN113379536A (en) * | 2021-06-29 | 2021-09-10 | 百维金科(上海)信息科技有限公司 | Default probability prediction method for optimizing recurrent neural network based on gravity search algorithm |
CN113516650A (en) * | 2021-07-30 | 2021-10-19 | 深圳康微视觉技术有限公司 | Circuit board hole plugging defect detection method and device based on deep learning |
CN113887410A (en) * | 2021-09-30 | 2022-01-04 | 杭州电子科技大学 | Deep learning-based multi-category food material identification system and method |
CN114423063A (en) * | 2022-01-19 | 2022-04-29 | 东北电力大学 | Heterogeneous wireless network service access control method and device based on improved gravity search algorithm |
CN114928478A (en) * | 2022-05-10 | 2022-08-19 | 罗嗣扬 | Network security detection system based on core algorithm, machine learning and cloud computing |
CN115035081A (en) * | 2022-06-23 | 2022-09-09 | 西安交通大学 | Metal internal defect danger source positioning method and system based on industrial CT |
CN115879039A (en) * | 2022-11-04 | 2023-03-31 | 电子科技大学长三角研究院(湖州) | Quantitative analysis method for element content by combining support vector regression with gravity search |
CN116026787A (en) * | 2023-03-29 | 2023-04-28 | 湖南汇湘轩生物科技股份有限公司 | Essence grade detection method and system |
CN116049615A (en) * | 2023-01-17 | 2023-05-02 | 云南电网有限责任公司保山供电局 | Multi-source heterogeneous sensor optimization layout method for live working safety protection equipment |
US20230141978A1 (en) * | 2020-01-23 | 2023-05-11 | East China University Of Science And Technology | Method for multi-information fusion of gas sensitivity and chromatography and on-site detection and analysis of flavor substances based on electronic nose instrument |
-
2023
- 2023-05-29 CN CN202310608841.XA patent/CN116400028B/en active Active
Patent Citations (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104408671A (en) * | 2014-12-09 | 2015-03-11 | 中国石油大学(华东) | Method for monitoring state of equipment of power plant based on IGSA (improved gravitational search algorithm)-based SVM (support vector machine) |
CN106374465A (en) * | 2016-11-10 | 2017-02-01 | 南京信息工程大学 | GSA-LSSVM model-based short period wind electricity generation power prediction method |
US20190079975A1 (en) * | 2017-09-11 | 2019-03-14 | Hefei University Of Technology | Scheduling method and system based on hybrid variable neighborhood search and gravitational search algorithm |
CN108520195A (en) * | 2018-01-31 | 2018-09-11 | 湖北工业大学 | A kind of MUSIC spectrum peak search methods based on gravitation search algorithm |
US20230141978A1 (en) * | 2020-01-23 | 2023-05-11 | East China University Of Science And Technology | Method for multi-information fusion of gas sensitivity and chromatography and on-site detection and analysis of flavor substances based on electronic nose instrument |
CN111368891A (en) * | 2020-02-27 | 2020-07-03 | 大连大学 | K-Means text classification method based on immune clone wolf optimization algorithm |
CN113379536A (en) * | 2021-06-29 | 2021-09-10 | 百维金科(上海)信息科技有限公司 | Default probability prediction method for optimizing recurrent neural network based on gravity search algorithm |
CN113516650A (en) * | 2021-07-30 | 2021-10-19 | 深圳康微视觉技术有限公司 | Circuit board hole plugging defect detection method and device based on deep learning |
CN113887410A (en) * | 2021-09-30 | 2022-01-04 | 杭州电子科技大学 | Deep learning-based multi-category food material identification system and method |
CN114423063A (en) * | 2022-01-19 | 2022-04-29 | 东北电力大学 | Heterogeneous wireless network service access control method and device based on improved gravity search algorithm |
CN114928478A (en) * | 2022-05-10 | 2022-08-19 | 罗嗣扬 | Network security detection system based on core algorithm, machine learning and cloud computing |
CN115035081A (en) * | 2022-06-23 | 2022-09-09 | 西安交通大学 | Metal internal defect danger source positioning method and system based on industrial CT |
CN115879039A (en) * | 2022-11-04 | 2023-03-31 | 电子科技大学长三角研究院(湖州) | Quantitative analysis method for element content by combining support vector regression with gravity search |
CN116049615A (en) * | 2023-01-17 | 2023-05-02 | 云南电网有限责任公司保山供电局 | Multi-source heterogeneous sensor optimization layout method for live working safety protection equipment |
CN116026787A (en) * | 2023-03-29 | 2023-04-28 | 湖南汇湘轩生物科技股份有限公司 | Essence grade detection method and system |
Non-Patent Citations (5)
Title |
---|
GENYUN SUN DENG: "A Novel hybrid algorithm of gravitational search algorithm with genetic algorithm for multi-level thresholding", 《APPLIED SOFT COMPUTING》, no. 46, pages 703 - 730 * |
刘新磊;李海峰;马琳;: "基于脑电信号的博弈决策预测方法研究", 智能计算机与应用, no. 05, pages 36 - 40 * |
宋泽宇: "山西省汾河上游水生态承载力评价 ——以宁武县为例", 《中国优秀硕士学位论文全文数据库工程科技Ⅰ辑》, no. 2, pages 027 - 45 * |
张付杰 等: "高光谱成像的三七粉质量等级无损鉴别", 《光谱学与光谱分析》, vol. 42, no. 7, pages 2255 - 2261 * |
蒋鹏程;汤占军;刘萍兰;: "基于引力搜索算法的局部遮阴下光伏系统最大功率点跟踪算法研究", 化工自动化及仪表, no. 03, pages 81 - 84 * |
Also Published As
Publication number | Publication date |
---|---|
CN116400028B (en) | 2023-08-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Li et al. | Neural network and Bayesian network fusion models to fuse electronic nose and surface acoustic wave sensor data for apple defect detection | |
Tudu et al. | Electronic nose for black tea quality evaluation by an incremental RBF network | |
Bhattacharya et al. | Preemptive identification of optimum fermentation time for black tea using electronic nose | |
CN105631480B (en) | The Hyperspectral data classification method folded based on multilayer convolutional network and data recombination | |
CN106897738B (en) | A kind of pedestrian detection method based on semi-supervised learning | |
Mohammadi et al. | Artificial intelligence in the production process | |
CN106295802B (en) | A kind of tealeaves storage time classification method based on particle swarm algorithm Optimized BP Neural Network | |
EP0811198B1 (en) | Neural network | |
US20100086176A1 (en) | Learning Apparatus and Method, Recognition Apparatus and Method, Program, and Recording Medium | |
CN110097123B (en) | Express mail logistics process state detection multi-classification system | |
CN109583456B (en) | Infrared surface target detection method based on feature fusion and dense connection | |
CN113887675B (en) | Gesture recognition method based on feature fusion of heterogeneous sensors | |
Orii et al. | Tactile texture recognition using convolutional neural networks for time-series data of pressure and 6-axis acceleration sensor | |
KR20190004429A (en) | Method and apparatus for determining training of unknown data related to neural networks | |
Rahman et al. | Classification and pattern recognition algorithms applied to E-Nose | |
Fayyaz et al. | A novel approach for finger vein verification based on self-taught learning | |
CN116400028B (en) | Essence quality detection method, system and medium based on smell sensor | |
Grodniyomchai et al. | A deep learning model for odor classification using deep neural network | |
CN117407707A (en) | Odor identification model training method and device | |
Setiawan et al. | Deep convolutional neural network alexnet and squeezenet for maize leaf diseases image classification | |
CN110110785A (en) | A kind of express mail logistics progress state-detection classification method | |
Kusumoputro et al. | Fuzzy-neuro LVQ and its comparison with fuzzy algorithm LVQ in artificial odor discrimination system | |
CN107137090B (en) | Fall identification method and device and user equipment | |
CN110389200A (en) | A kind of tea aroma of the same race differentiation detection method of different brands grade | |
CN116959078B (en) | Method for constructing fatigue detection model, fatigue detection method and device thereof |
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 |