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 PDF

Info

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
Application number
CN202310608841.XA
Other languages
Chinese (zh)
Other versions
CN116400028B (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.)
HUNAN HUIXIANGXUAN BIOTECHNOLOGY CO Ltd
Original Assignee
HUNAN HUIXIANGXUAN BIOTECHNOLOGY CO Ltd
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 HUNAN HUIXIANGXUAN BIOTECHNOLOGY CO Ltd filed Critical HUNAN HUIXIANGXUAN BIOTECHNOLOGY CO Ltd
Priority to CN202310608841.XA priority Critical patent/CN116400028B/en
Publication of CN116400028A publication Critical patent/CN116400028A/en
Application granted granted Critical
Publication of CN116400028B publication Critical patent/CN116400028B/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
    • G01N33/00Investigating or analysing materials by specific methods not covered by groups G01N1/00 - G01N31/00
    • G01N33/0004Gaseous mixtures, e.g. polluted air
    • G01N33/0009General constructional details of gas analysers, e.g. portable test equipment
    • G01N33/0027General constructional details of gas analysers, e.g. portable test equipment concerning the detector
    • G01N33/0031General constructional details of gas analysers, e.g. portable test equipment concerning the detector comprising two or more sensors, e.g. a sensor array
    • G01N33/0034General 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
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N33/00Investigating or analysing materials by specific methods not covered by groups G01N1/00 - G01N31/00
    • 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/213Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods
    • 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
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/25Fusion techniques
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A50/00TECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE in human health protection, e.g. against extreme weather
    • Y02A50/20Air 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

Essence quality detection method, system and medium based on smell sensor
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:
Figure SMS_1
of the formula (I)
Figure SMS_2
and />
Figure SMS_3
The average value of the quality of the feature vector and the essence is +.>
Figure SMS_4
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:
Figure SMS_5
wherein ,
Figure SMS_6
、/>
Figure SMS_7
、/>
Figure SMS_8
the joint distribution and the edge distribution of the two features respectively.
The maximum information coefficient between the features is further calculated, and the process is as follows:
Figure SMS_9
where R is a function of the sample size,
Figure SMS_10
, />
Figure SMS_11
for the number of test samples, +.>
Figure SMS_12
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;
Figure SMS_13
wherein ,
Figure SMS_14
for the fitness of particle i +.>
Figure SMS_15
Is the optimal value at the t-th iteration, < >>
Figure SMS_16
Is the worst value at the t-th iteration; />
Figure SMS_17
The particle quality after normalization;
s55: updating the gravitational constant G according to the following formula;
Figure SMS_18
wherein ,
Figure SMS_19
is the initial gravitational constant, +.>
Figure SMS_20
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
Figure SMS_21
wherein ,
Figure SMS_22
is gravitational constant, ++>
Figure SMS_23
Is the Euclidean distance between particle i and particle j;
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:
Figure SMS_24
wherein p is a random parameter representing a random weight.
The acceleration of the particles is calculated according to the following formula:
Figure SMS_25
s58: updating particle velocity and position according to
Figure SMS_26
wherein ,
Figure SMS_28
is the k-dimensional component of the position of particle i, < >>
Figure SMS_31
Is the k-dimensional component of the velocity of particle i, < >>
Figure SMS_33
、/>
Figure SMS_29
、/>
Figure SMS_32
Is [0,1]Random parameters in->
Figure SMS_34
、/>
Figure SMS_35
For learning factors->
Figure SMS_27
For the current optimal position of the kth dimension individual, < >>
Figure SMS_30
The k-th dimension global optimal position;
by adjusting
Figure SMS_36
、/>
Figure SMS_37
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:
Figure SMS_38
wherein ,
Figure SMS_39
for the abrupt trigger value of the ith particle in the t-th iteration, when +.>
Figure SMS_40
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,>
Figure SMS_41
is a smaller constant;
s510: performing position uniform mutation
The uniform mutation update particle location formula is as follows:
Figure SMS_42
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.
Further, in the step S58
Figure SMS_43
、/>
Figure SMS_44
Calculated according to the following formula:
Figure SMS_45
Figure SMS_46
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 is
Figure SMS_47
The 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:
Figure SMS_48
of the formula (I)
Figure SMS_49
and />
Figure SMS_50
The average value of the quality of the feature vector and the essence is +.>
Figure SMS_51
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:
Figure SMS_52
wherein ,
Figure SMS_53
、/>
Figure SMS_54
、/>
Figure SMS_55
the joint distribution and the edge distribution of the two features respectively.
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,
Figure SMS_56
, />
Figure SMS_57
for the number of test samples, +.>
Figure SMS_58
The value of (2) affects the universality of the maximum information coefficient method, and optionally, the value is 0.6.
Figure SMS_59
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;
Figure SMS_60
wherein ,
Figure SMS_61
for the fitness of particle i +.>
Figure SMS_62
Is the optimal value at the t-th iteration, < >>
Figure SMS_63
Is the worst value at the t-th iteration; />
Figure SMS_64
Is the normalized particle mass.
S55: updating the gravitational constant G according to the following formula;
Figure SMS_65
wherein ,
Figure SMS_66
is the initial gravitational constant, +.>
Figure SMS_67
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
Figure SMS_68
wherein ,
Figure SMS_69
is gravitational constant, ++>
Figure SMS_70
Is the euclidean distance between particle i and particle j.
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.
Figure SMS_71
Wherein p is a random parameter representing a random weight.
The acceleration of the particles is calculated according to the following formula:
Figure SMS_72
s58: updating particle velocity and position according to
Figure SMS_73
wherein ,
Figure SMS_75
is the k-dimensional component of the position of particle i, < >>
Figure SMS_79
Is the k-dimensional component of the velocity of particle i, < >>
Figure SMS_81
、/>
Figure SMS_76
、/>
Figure SMS_78
Is [0,1]Random parameters in->
Figure SMS_80
、/>
Figure SMS_82
For learning factors->
Figure SMS_74
For the current optimal position of the kth dimension individual, < >>
Figure SMS_77
Is the k-th dimension global optimum position.
By adjusting
Figure SMS_83
、/>
Figure SMS_84
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,/->
Figure SMS_85
、/>
Figure SMS_86
Calculated according to the following formula:
Figure SMS_87
Figure SMS_88
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:
Figure SMS_89
wherein ,
Figure SMS_90
for the abrupt trigger value of the ith particle in the t-th iteration, when +.>
Figure SMS_91
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,>
Figure SMS_92
is a smaller constant, optionally +.>
Figure SMS_93
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:
Figure SMS_94
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:
Figure QLYQS_1
of the formula (I)
Figure QLYQS_2
and />
Figure QLYQS_3
The average value of the quality of the feature vector and the essence is +.>
Figure QLYQS_4
The number of samples is represented here as the sample size.
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:
Figure QLYQS_5
wherein ,
Figure QLYQS_6
、/>
Figure QLYQS_7
、/>
Figure QLYQS_8
the two features are respectively combined distribution and edge distribution;
the maximum information coefficient between the features is calculated, and the process is as follows:
Figure QLYQS_9
where R is a function of the sample size,
Figure QLYQS_10
, />
Figure QLYQS_11
for the number of test samples, +.>
Figure QLYQS_12
To adjust the parameters.
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;
Figure QLYQS_13
wherein ,
Figure QLYQS_14
for the fitness of particle i +.>
Figure QLYQS_15
Is the optimal value at the t-th iteration, < >>
Figure QLYQS_16
Is the worst value at the t-th iteration; />
Figure QLYQS_17
The particle quality after normalization;
s55: updating the gravitational constant G according to the following formula;
Figure QLYQS_18
wherein ,
Figure QLYQS_19
is the initial gravitational constant, +.>
Figure QLYQS_20
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
Figure QLYQS_21
wherein ,
Figure QLYQS_22
is gravitational constant, ++>
Figure QLYQS_23
Is the Euclidean distance between particle i and particle j;
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:
Figure QLYQS_24
wherein p is a random parameter, representing a random weight;
the acceleration of the particles is calculated according to the following formula:
Figure QLYQS_25
s58: updating particle velocity and position according to
Figure QLYQS_26
wherein ,
Figure QLYQS_29
is the k-dimensional component of the position of particle i, < >>
Figure QLYQS_32
Is the k-dimensional component of the velocity of particle i, < >>
Figure QLYQS_34
、/>
Figure QLYQS_27
、/>
Figure QLYQS_31
Is [0,1]Random parameters in->
Figure QLYQS_33
、/>
Figure QLYQS_35
For learning factors->
Figure QLYQS_28
For the current optimal position of the kth dimension individual, < >>
Figure QLYQS_30
The k-th dimension global optimal position;
by adjusting
Figure QLYQS_36
、/>
Figure QLYQS_37
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:
Figure QLYQS_38
wherein ,
Figure QLYQS_39
for the abrupt trigger value of the ith particle in the t-th iteration, when +.>
Figure QLYQS_40
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,>
Figure QLYQS_41
is a smaller constant;
s510: performing position uniform mutation
The uniform mutation update particle location formula is as follows:
Figure QLYQS_42
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.
8. The flavor quality detection method based on the flavor sensor of claim 1, wherein in the step S58
Figure QLYQS_43
、/>
Figure QLYQS_44
Calculated according to the following formula:
Figure QLYQS_45
Figure QLYQS_46
wherein G is an gravitation constant, T is the current iteration number, and T is the maximum iteration number.
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.
CN202310608841.XA 2023-05-29 2023-05-29 Essence quality detection method, system and medium based on smell sensor Active CN116400028B (en)

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)

* Cited by examiner, † Cited by third party
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

Patent Citations (15)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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