Gas classification method based on electronic nose and sensor sensing convolutional network

By introducing a sensor-sensing convolutional network into the electronic nose system, and using the correlation between sensors to extract features, the problem of low accuracy of pepper variety classification and origin traceability in the prior art is solved, and higher recognition accuracy and robustness are achieved.

CN120217197APending Publication Date: 2025-06-27SOUTHWEST UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510274688.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-10
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

The prior art has problems such as low recognition accuracy, poor robustness and difficulty in real-time monitoring in terms of pepper variety classification and origin traceability, and traditional electronic nose systems do not fully utilize the heterogeneity and correlation between sensors.

Method used

The gas classification method based on electronic nose and sensor sensing convolution network is adopted to deeply explore and utilize the correlation between sensors to extract deeper features through sensor attention modules, local perception structures and wide-area perception structures.

Benefits of technology

It improves the accuracy and robustness of pepper variety classification and origin traceability, realizes real-time monitoring, and has small network parameters, which is suitable for hardware deployment and has noise immunity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120217197A_ABST
    Figure CN120217197A_ABST
Patent Text Reader

Abstract

A gas classification method based on an electronic nose and a sensor sensing convolutional network is characterized by comprising the following steps: step 1, constructing a gas identification and classification system based on the electronic nose and the sensor sensing convolutional network; 2, the electronic nose collects gas characteristic data and transmits the gas characteristic data to the sensor to sense the convolutional network; 3, a sensor attention module in the sensor sensing convolutional network performs attention weight distribution on the gas feature data to obtain attention feature data, and transmits the attention feature data to a local sensing structure; 4, performing local feature extraction on the attention feature data by the local sensing structure to obtain local feature data, and transmitting the local feature data to a wide-area sensing structure; 5, the wide area sensing structure carries out channel shuffling and grouping convolution operation on the local feature data, and finally a gas classification result is obtained. The method has the advantages that the correlation between the sensors can be deeply explored and fully utilized to extract deeper features, and the model performance is further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of gas recognition, and in particular to a gas classification method based on an electronic nose and a sensor-aware convolutional network. Background Art

[0002] The combination of gas detection technology based on an electronic nose and deep learning algorithms provides an intelligent solution for the identification and origin tracing of chili peppers and other varieties, showing significant advantages in improving detection efficiency and objectivity. However, in the field of chili pepper variety classification and origin tracing, the existing technologies face the following challenges: First, the current mainstream methods for chili pepper variety classification and origin tracing rely on expensive equipment and professional operations, making it difficult to achieve real-time monitoring; Second, traditional electronic nose systems rely on shallow machine learning models (such as SVM, random forest), with insufficient ability to capture the time-varying characteristics of multi-source sensor signals, resulting in low accuracy in variety identification and origin tracing, and these algorithms lack robustness.

[0003] Disadvantages of the prior art: The existing methods do not fully utilize the heterogeneity and correlation between the electronic nose sensor arrays. Currently, the mainstream network models mainly focus on extracting and generating features from sensor data, while ignoring the interaction between the sensors themselves. In addition, these models often have high complexity, contain a large number of parameters, and require a large amount of sensor response data for training. The data acquisition process of the electronic nose is relatively time-consuming, and complex models also pose challenges to the deployment of hardware and online environments. Summary of the Invention

[0004] A gas classification method based on an electronic nose and a sensor-aware convolutional network provided by the present invention can deeply explore and fully utilize the correlation between sensors to extract deeper features, further improving the performance of the model.

[0005] To achieve the above object, a key aspect of a gas classification method based on an electronic nose and a sensor-aware convolutional network provided by the present invention includes the following steps:

[0006] Step 1: Construct a gas recognition and classification system based on an electronic nose and a sensor-aware convolutional network. The gas recognition and classification system includes an electronic nose, on which a sensor-aware convolutional network SACNet is integrated. The sensor-aware convolutional network SACNet is provided with a sensor attention module, a local perception structure, and a wide-area perception structure connected in sequence;

[0007] Step 2: The electronic nose collects gas feature data M and transmits it to the sensor-aware convolutional network SACNet;

[0008] Step 3: The sensor perceives that the sensor attention module in the convolutional network SACNet assigns attention weights to the gas feature data M to obtain attention feature data b, and transmits it to the local perception structure;

[0009] Step 4: The local perception structure performs local feature extraction on the attention feature data b to obtain local feature data c, and transmits it to the wide-area perception structure;

[0010] Step 5: The wide-area perception structure performs channel shuffle and grouped convolution operations on the local feature data c to finally obtain the gas classification result Y.

[0011] Through the above design, the sensor attention module adaptively adjusts the weights of each sensor according to the relevance between the gas information obtained by each sensor and the specific task, ensuring that important features are fully concerned. The local perception structure focuses on the information interaction between adjacent sensors and adjacent timestamps, capturing local spatio-temporal features. The wide-area perception structure can adaptively search for the optimal combination of sensors and data points, so as to perform more comprehensive and in-depth feature extraction, making full use of the correlation between sensor arrays. Finally, the network can deeply explore and make full use of the correlation between sensors to extract deeper features, further improving the model performance.

[0012] Preferably: In the step 1, the sensor attention module is provided with an input layer, a first two-dimensional convolutional layer, a second two-dimensional convolutional layer, a flattening layer, a fully connected layer and a multiplication unit connected in sequence. The input layer is also connected to the multiplication unit. The output ends of the first two-dimensional convolutional layer and the second two-dimensional convolutional layer are both built-in with ReLU functions, and the output end of the fully connected layer is built-in with a sigmoid activation function.

[0013] In view of the significant differences in the responses of different sensors to various chemical substances, the present invention proposes an innovative sensor attention mechanism. This mechanism aims to adaptively adjust its weight according to the relevance between the gas information obtained by each sensor and the specific task to be solved. By doing so, it can effectively reduce the interference from irrelevant sensors, which may introduce noise into the data, and help the network focus on the most important sensor signals. This enables the model to more accurately amplify the features of chili gas information, thereby improving the overall recognition performance. The attention mechanism enables the model to prioritize the sensors with the most information, ensuring that the system utilizes the most relevant data while minimizing the impact of less useful or noisy sensor inputs.

[0014] Preferably: In the step 3, the sensor attention module assigns attention weights to the gas feature data M, and the steps are as follows:

[0015] Step 31: The input layer in the sensor attention module acquires the gas feature data M and passes it to the first two-dimensional convolutional layer and the multiplication unit;

[0016] Step 32: The first two-dimensional convolutional layer performs a channel expansion operation on the gas feature data M using a 3×3 convolutional kernel, and then activates it through the ReLU function to obtain the first activation data a1, and passes it to the second two-dimensional convolutional layer;

[0017] Step 33: The second two-dimensional convolutional layer performs a channel compression operation on the first activation data a1, and then activates it through the ReLU function to obtain the second activation data a2, and passes it to the flattening layer;

[0018] Step 34: The flattening layer flattens the feature map of the second activation data a2 to obtain the flattened data a3, and passes it to the fully connected layer;

[0019] Step 35: The fully connected layer performs a fully connected operation on the flattened data a3, and then activates it through the sigmoid activation function to obtain the weight vector w, and passes it to the multiplication unit;

[0020] The calculation expression of the weight vector w is as follows:

[0021] w = S(ReConv(EXConv(M)))

[0022] where M is the original feature map, that is, the gas feature data; w is the weight vector generated based on the feature map, EXConv() represents the extended channel convolution operation, ReConv() represents the reduced channel convolution operation, and S() represents the sigmoid activation function;

[0023] Step 36: The multiplication unit multiplies the gas feature data and the weight vector w element by element to obtain the attention feature data b, and the expression is as follows:

[0024]

[0025] where ⊙ represents element-wise multiplication, and M' represents the feature map after being assigned weights, that is, the attention feature data b.

[0026] The sensor attention module first uses a 3×3 convolutional kernel to expand the channels of the original feature map composed of gas feature data to enrich the feature expression. Then, it compresses the channels through convolution, which not only enhances feature sharing but also reduces the sensitivity of the model to specific input changes, thereby improving the robustness of the model. Next, the compressed feature map is flattened through a flattening layer and connected to a fully connected layer to obtain the attention scores of each sensor. Finally, a sigmoid activation function is applied after the fully connected layer to activate the neurons. The experimental results show that the sigmoid function effectively helps the model capture the relationships between inputs.

[0027] Preferably: in the step 1, the local perception structure is provided with a point convolutional layer, a third two-dimensional convolutional layer, a first normalization layer, a fourth two-dimensional convolutional layer, a second normalization layer, and a residual connection layer connected in sequence. The output end of the point convolutional layer is also connected to the residual connection layer, and a ReLU function is built in the output end of the first normalization layer.

[0028] The local sensing structure is designed to accurately extract the local details of the sensor gas information. This structure combines two consecutive 3×3 convolutional layers, normalization layers, and activation functions, which work together to achieve high-order feature representation and non-linear transformation. The two convolutional layers are connected using residuals, which promotes gradient flow and effectively alleviates the gradient vanishing problem.

[0029] Preferably: in the step 4, the local perception structure performs local feature extraction on the attention feature data b as follows:

[0030] Step 41: The point convolutional layer in the local perception structure performs a point convolution operation on the attention feature data b to obtain point convolution data b1, and passes it to the third two-dimensional convolutional layer and the residual connection layer;

[0031] Step 42: The third two-dimensional convolutional layer performs a convolution operation on the point convolution data b1 to obtain third convolution data b2, and passes it to the first normalization layer;

[0032] Step 43: The first normalization layer normalizes the third convolution data b2, and then activates it through the ReLU function to obtain third activation data b3, and passes it to the fourth two-dimensional convolutional layer;

[0033] Step 44: The fourth two-dimensional convolutional layer performs a convolution operation on the third activation data b3 to obtain fourth convolution data b4, and passes it to the second normalization layer;

[0034] Step 45: The second normalization layer normalizes the fourth convolution data b4 to obtain second normalization data b5, and passes it to the residual connection layer;

[0035] Step 46: The residual connection layer performs a residual connection operation on the point convolution data b1 and the second normalized data b5 to obtain local feature data c.

[0036] Preferably: In the step 1, the wide - area sensing structure is provided with a channel shuffle module, a variable - kernel convolution module, an average pooling layer, and a second fully - connected layer connected in sequence. The variable - kernel convolution module is provided with N variable - kernel convolution layers connected in parallel.

[0037] In the wide - area sensing structure, channel shuffle is combined with grouped convolution operations to significantly improve the performance of the neural network, reduce computational complexity, and enhance feature extraction capabilities. This strategy not only improves the robustness of the network but also effectively reduces the risk of overfitting. This optimization step makes the network architecture more adaptable to the characteristics of the chili gas information dataset, laying a solid foundation for subsequent feature extraction work.

[0038] Preferably: In the step 5, the wide - area sensing structure performs channel shuffle and grouped convolution operations on the local feature data c, and the steps are as follows:

[0039] Step 51: The channel shuffle module in the wide - area sensing structure performs a channel shuffle operation on the local feature data c to obtain shuffled data c1, and transfers it to the variable - kernel convolution module;

[0040] Step 52: Each variable - kernel convolution layer in the variable - kernel convolution module performs a variable - kernel convolution operation on the shuffled data c1 respectively, and then splices the outputs of all variable - kernel convolution layers together to obtain variable - kernel convolution data c2, and transfers it to the average pooling layer;

[0041] Step 53: The average pooling layer performs an average pooling operation on the variable - kernel convolution data c2 to obtain pooled data c3, and transfers it to the second fully - connected layer;

[0042] Step 54: The second fully - connected layer performs a fully - connected operation on the pooled data c3 to obtain the gas classification result Y.

[0043] Considering the strong linear or non - linear relationship between the gas information from a single sensor and the cross - sensitivity between different sensors, the present invention proposes a local sensing structure and a wide - area sensing structure. These structures are designed to capture fine - grained local information and broader context patterns.

[0044] The local sensing structure focuses on the information interaction between adjacent sensors and adjacent timestamps, aiming to extract local features that are usually crucial for detecting subtle patterns in gas data. By modeling the interaction between adjacent sensors and time points, this structure can capture local dependencies, which are essential for understanding short-range correlations and temporal dynamics in the data.

[0045] The wide-area sensing structure goes beyond the limitations of adjacent sensors and data points, enabling the model to adaptively search for the optimal combination of sensors and data points for more comprehensive and in-depth feature extraction. This structure enhances the model's ability to capture long-term dependencies and cross-sensor relationships, which are crucial for understanding the broader context of gas data. By combining information from different sensors and time points, the wide-area sensing structure helps the model integrate multiple perspectives, achieve more robust feature extraction, and improve the overall performance of tasks such as chili variety classification and traceability.

[0046] These two structures complement each other, enabling the model to effectively utilize sensor data in local and wider areas, thereby obtaining more accurate and reliable predictions.

[0047] Preferably, the variable kernel convolutional layer is provided with a fifth two-dimensional convolutional layer, a resampling layer, a reshaping layer, a sixth two-dimensional convolutional layer, and a third normalization layer connected in sequence, and a Swish function is built in at the output end of the third normalization layer.

[0048] Replace the traditional convolution operation scheme with variable kernel convolution. The unique design of the variable kernel enables the model to search for the most suitable convolution kernel size in the feature map of chili gas information, while inheriting the ability of deformable convolution to accurately capture the linear and nonlinear relationships between non-adjacent time points of a single sensor and effectively capture the feature correlations between non-adjacent sensors. This step further enhances the model's ability to understand and represent the chili gas information dataset, enabling the model to more accurately extract key features in complex environments and achieve precise odor recognition and classification.

[0049] Preferably, the i-th variable kernel convolutional layer performs variable kernel convolution operation on the shuffled data c1, and the steps are as follows:

[0050] Step S1: The fifth two-dimensional convolutional layer in the variable kernel convolutional layer performs a convolution operation on the shuffled data c1 to obtain fifth convolutional data d1, and transmits it to the resampling layer;

[0051] Step S2: The resampling layer resamples the fifth convolutional data d1 to obtain sampled data d2, and transmits it to the reshaping layer;

[0052] Step S3: The reshaping layer reshapes the sampled data d2 to obtain reshaped data d3, and transfers it to the sixth two-dimensional convolutional layer;

[0053] Step S4: The sixth two-dimensional convolutional layer performs a convolution operation on the reshaped data d3 to obtain sixth convolutional data d4, and transfers it to the third normalization layer;

[0054] Step S5: The third normalization layer normalizes the sixth convolutional data d4, and then activates it through the Swish function to obtain the output c2i of the i-th variable kernel convolutional layer.

[0055] Preferably, the gas feature data M is chili gas data;

[0056] The gas classification result Y is either the chili variety classification result or the chili origin classification result.

[0057] According to actual usage requirements, the corresponding training set can be used to train the sensor-aware convolutional network SACNet, thereby achieving accurate classification of various gases.

[0058] When the training set is the chili gas data set of different varieties from the same origin, the gas classification result Y is the chili variety classification result; when the training set is the chili gas data set of the same variety from different origins, the gas classification result Y is the chili origin classification result.

[0059] Advantages of the present invention:

[0060] 1. Sensor attention can accurately evaluate the importance of each sensor in the data fusion and information extraction process;

[0061] 2. The local sensing structure and the wide-area sensing structure work together to efficiently and quickly extract the core features of chili data through sensor information;

[0062] 3. The number of network parameters is small, which creates conditions for deployment on hardware devices and is feasible;

[0063] 4. It has strong anti-noise ability and can better adapt to the external environment of the application scenario. Description of the Drawings

[0064] Figure 1 It is a schematic diagram of the structure of the sensor-aware convolutional network SACNet in the embodiment;

[0065] Figure 2 It is a schematic diagram of the structure of the variable kernel convolutional layer in the embodiment;

[0066] Figure 3 It is a comparison diagram of the small sample experiment results in the embodiment;

[0067] Figure 4 It is a comparison chart of the experimental results of the anti-noise performance analysis in the embodiments. Specific implementation manners

[0068] The present invention will be further described in detail below with reference to the accompanying drawings and specific examples. The following embodiments or drawings are used to illustrate the present invention, but not to limit the scope of the present invention.

[0069] As Figure 1 shown: A gas classification method based on an electronic nose and a sensor-aware convolutional network includes the following steps:

[0070] Step 1: Construct a gas recognition and classification system based on an electronic nose and a sensor-aware convolutional network. The gas recognition and classification system includes an electronic nose, and a sensor-aware convolutional network SACNet is integrated on the electronic nose. The sensor-aware convolutional network SACNet is provided with a sensor attention module, a local perception structure, and a wide-area perception structure that are connected in sequence;

[0071] Step 2: The electronic nose collects gas feature data M and transmits it to the sensor-aware convolutional network SACNet;

[0072] Step 3: The sensor attention module in the sensor-aware convolutional network SACNet performs attention weight assignment on the gas feature data M to obtain attention feature data b and transmits it to the local perception structure;

[0073] Step 4: The local perception structure performs local feature extraction on the attention feature data b to obtain local feature data c and transmits it to the wide-area perception structure;

[0074] Step 5: The wide-area perception structure performs channel shuffle and grouped convolution operations on the local feature data c to finally obtain a gas classification result Y.

[0075] In the step 1, the sensor attention module is provided with an input layer, a first two-dimensional convolutional layer, a second two-dimensional convolutional layer, a flattening layer, a fully connected layer, and a multiplication unit that are connected in sequence. The input layer is also connected to the multiplication unit. ReLU functions are built in the output ends of the first two-dimensional convolutional layer and the second two-dimensional convolutional layer, and a sigmoid activation function is built in the output end of the fully connected layer.

[0076] In the step 3, the sensor attention module performs attention weight assignment on the gas feature data M, and the steps are as follows:

[0077] Step 31: The input layer in the sensor attention module obtains the gas feature data M and transmits it to the first two-dimensional convolutional layer and the multiplication unit;

[0078] Step 32: The first two-dimensional convolutional layer uses a 3×3 convolutional kernel to perform a channel expansion operation on the gas feature data M, and then activates it through the ReLU function to obtain the first activation data a1, which is then passed to the second two-dimensional convolutional layer;

[0079] Step 33: The second two-dimensional convolutional layer performs a channel compression operation on the first activation data a1, and then activates it through the ReLU function to obtain the second activation data a2, which is then passed to the flattening layer;

[0080] Step 34: The flattening layer flattens the feature map of the second activation data a2 to obtain the flattened data a3, which is then passed to the fully connected layer;

[0081] Step 35: The fully connected layer performs a fully connected operation on the flattened data a3, and then activates it through the sigmoid activation function to obtain the weight vector w, which is then passed to the multiplication unit;

[0082] The calculation expression of the weight vector w is as follows:

[0083] w = S(ReConv(EXConv(M)))

[0084] where M is the original feature map, that is, the gas feature data; w is the weight vector generated based on the feature map, EXConv() represents the extended channel convolution operation, ReConv() represents the reduced channel convolution operation, and S() represents the sigmoid activation function;

[0085] Step 36: The multiplication unit multiplies the gas feature data and the weight vector w element by element to obtain the attention feature data b, and the expression is as follows:

[0086]

[0087] where ⊙ represents element multiplication, and M' represents the feature map after being assigned weights, that is, the attention feature data b.

[0088] In the step 1, the local perception structure is provided with a point convolutional layer, a third two-dimensional convolutional layer, a first normalization layer, a fourth two-dimensional convolutional layer, a second normalization layer, and a residual connection layer connected in sequence. The output end of the point convolutional layer is also connected to the residual connection layer, and a ReLU function is built in the output end of the first normalization layer.

[0089] In the step 4, the local perception structure performs local feature extraction on the attention feature data b, and the steps are as follows:

[0090] Step 41: The point convolution layer in the local perception structure performs point convolution operation on the attention feature data b to obtain point convolution data b1, and transmits it to the third two-dimensional convolution layer and the residual connection layer;

[0091] Step 42: The third two-dimensional convolution layer performs convolution operation on the point convolution data b1 to obtain third convolution data b2, and transmits it to the first normalization layer;

[0092] Step 43: The first normalization layer performs normalization operation on the third convolution data b2, and then activates it through the ReLU function to obtain third activation data b3, and transmits it to the fourth two-dimensional convolution layer;

[0093] Step 44: The fourth two-dimensional convolution layer performs convolution operation on the third activation data b3 to obtain fourth convolution data b4, and transmits it to the second normalization layer;

[0094] Step 45: The second normalization layer performs normalization operation on the fourth convolution data b4 to obtain second normalization data b5, and transmits it to the residual connection layer;

[0095] Step 46: The residual connection layer performs residual connection operation on the point convolution data b1 and the second normalization data b5 to obtain local feature data c.

[0096] In the step 1, the wide-area perception structure is provided with a channel shuffle module, a variable kernel convolution module, an average pooling layer and a second fully connected layer which are connected in sequence. The variable kernel convolution module is provided with N variable kernel convolution layers connected in parallel.

[0097] In the step 5, the wide-area perception structure performs channel shuffle and grouped convolution operations on the local feature data c, and the steps are as follows:

[0098] Step 51: The channel shuffle module in the wide-area perception structure performs channel shuffle operation on the local feature data c to obtain shuffled data c1, and transmits it to the variable kernel convolution module;

[0099] Step 52: Each variable kernel convolution layer in the variable kernel convolution module performs variable kernel convolution operation on the shuffled data c1 respectively, and then splices the outputs of all variable kernel convolution layers together to obtain variable kernel convolution data c2, and transmits it to the average pooling layer;

[0100] Step 53: The average pooling layer performs average pooling operation on the variable kernel convolution data c2 to obtain pooled data c3, and transmits it to the second fully connected layer;

[0101] Step 54: The second fully connected layer performs full connection operation on the pooled data c3 to obtain the gas classification result Y.

[0102] As shown Figure 2 in the figure: The variable kernel convolutional layer is provided with a fifth two-dimensional convolutional layer, a resampling layer, a reshaping layer, a sixth two-dimensional convolutional layer, and a third normalization layer connected in sequence. A Swish function is built in the output end of the third normalization layer.

[0103] The i-th variable kernel convolutional layer performs variable kernel convolution operation on the shuffled data c1, and the steps are as follows:

[0104] Step S1: The fifth two-dimensional convolutional layer in the variable kernel convolutional layer performs a convolution operation on the shuffled data c1 to obtain fifth convolutional data d1, and transmits it to the resampling layer;

[0105] Step S2: The resampling layer resamples the fifth convolutional data d1 to obtain sampled data d2, and transmits it to the reshaping layer;

[0106] Step S3: The reshaping layer reshapes the sampled data d2 to obtain reshaped data d3, and transmits it to the sixth two-dimensional convolutional layer;

[0107] Step S4: The sixth two-dimensional convolutional layer performs a convolution operation on the reshaped data d3 to obtain sixth convolutional data d4, and transmits it to the third normalization layer;

[0108] Step S5: The third normalization layer normalizes the sixth convolutional data d4, and then activates it through the Swish function to obtain the output c2i of the i-th variable kernel convolutional layer.

[0109] The gas feature data M is chili gas data;

[0110] The gas classification result Y is either a chili variety classification result; or a chili origin classification result.

[0111] Next, a large number of experiments are carried out on the self-built dataset to verify the performance of the sensor perception convolutional network SACNet in the present invention, and its performance is compared with several representative CNN models. The comparison models are MobileNet of mobile neural network, GCN of graph neural network, ViT of vision transformer, ResNet-18 of residual network, SqueezeNet of compression neural network, GAT of graph attention network, LRCNN of lightweight residual convolutional neural network, GoogLeNet of Google deep neural network, ShuffleNet of channel shuffle network, Transformer of transformer, and LIRDN of lightweight interleaved residual dense network.

[0112] 1. Chili gas dataset

[0113] All data involved in the present invention are collected in the intelligent sensory laboratory of the Pepper Research Institute of Guizhou Academy of Agricultural Sciences, and the electronic nose used is the commercial PEN3 electronic nose produced by AIRSENSE of Germany. Under the strict guidance of experts, three groups of peppers were carefully selected to construct three data sets. The first group consists of 13 different varieties, namely Qianjiao No. 8, Jiaoyang No. 1, Dafang wrinkled pepper, Huaxi pepper, Huangping line pepper, Sichuan pepper No. 19, Changla No. 7, Lafeng Guomei, Huiteng, Xiuting, Cangjiao No. 1, Yanjiao No. 425 and Sanying pepper No. 8. Each variety uses an electronic nose to collect 100 gas samples, a total of 1,300 samples, constituting data set A, which aims to verify the model's performance in distinguishing pepper varieties. Group 2 and Group 3 consisted of Jiaoyang No. 6 and Line Pepper No. 301, respectively, but from 7 different origins, namely Yunnan, Xinjiang, Chongqing, Hunan, Shaanxi, Inner Mongolia and Henan. 100 gas samples were collected using an electronic nose from each origin, totaling 700 samples, constituting Dataset B and Dataset C, respectively, to test the accuracy of the model in the traceability of pepper origin. By changing the pepper variety while keeping the origin consistent, the generalization of the subsequent model can be evaluated and the bias that some varieties may effectively distinguish the origin while others may perform poorly can be reduced.

[0114] 2. Pepper classification experiment

[0115] The present invention is compared with more than ten mainstream neural network models. The results after 1:1 division of the training set and the test set of all data sets are as follows:

[0116] The experimental results of dataset A are shown in Table 1:

[0117] Table 1

[0118]

[0119]

[0120] The experimental results of dataset B and dataset C are shown in Table 2:

[0121] Table 2

[0122]

[0123] 3. Small sample experimental results

[0124] In practical applications, the limitation of training samples is a common challenge. Therefore, the model must learn effectively under limited training samples and perform well on test samples. In order to evaluate the generalization ability of the present invention under small sample training conditions, this embodiment conducts an in-depth study on the impact of different numbers of training samples on model performance.

[0125] In this experiment, nine different training and testing ratios were established: 1:9, 2:8, 3:7, 4:6, 5:5, 6:4, 7:3, 8:2, and 9:1. For dataset A, the training sample counts were 130, 260, 390, 520, 650, 780, 910, 1040, and 1170 respectively; for datasets B and C, the corresponding training sample counts were 70, 140, 210, 280, 350, 420, 490, 560, and 630 respectively. By conducting experiments using different models with these ratios, detailed experimental results were obtained. The specific experimental results are as Figure 3 shown.

[0126] 4. Experimental results of anti-noise performance analysis

[0127] In the actual measurement of the electronic nose, various types of noise interference are inevitable. To verify the anti-noise performance of the present invention, in this embodiment, noise was artificially added to the three datasets to simulate the noise measurement environment. Specifically, Gaussian white noise with a mean of 0 and a standard deviation of 0.1 was introduced into the original data. The performance comparison results of various methods under different training and testing set ratios are as Figure 4 shown.

[0128] Through a large number of experiments, it is proved that the method proposed by the present invention shows better effects than mainstream methods in various situations. At the same time, the model has fewer parameters and strong anti-noise performance, and has higher practical value compared with most mainstream methods. The method of the present invention combines the electronic nose with the convolutional neural network for the first time to complete the dual tasks of pepper variety classification and origin traceability. The specific advantages are as follows:

[0129] (1) Sensor attention can accurately evaluate the importance of each sensor in the data fusion and information extraction process;

[0130] (2) The local sensing structure and the wide-area sensing structure work together to efficiently and quickly extract the core features of pepper data through sensor information;

[0131] (3) The network has fewer parameters, which creates conditions for deployment on hardware devices and is feasible;

[0132] (4) It has strong anti-noise performance and can better adapt to the external environment of the application scenario.

[0133] The above are only the preferred embodiments of the present invention and are not used to limit the present invention. For those skilled in the art, the present invention can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A gas classification method based on electronic nose and sensor perception convolutional network, characterized in that: The following steps are involved: Step 1: construct a gas identification and classification system based on an electronic nose and a sensor perception convolutional network, wherein the gas identification and classification system includes an electronic nose, and a sensor perception convolutional network SACNet is integrated on the electronic nose, and the sensor perception convolutional network SACNet is provided with a sensor attention module, a local perception structure, and a wide-area perception structure connected in sequence; Step 2: The electronic nose collects gas characteristic data M and passes it to the sensor perception convolutional network SACNet; Step 3: The sensor attention module in the sensor perception convolutional network SACNet performs attention weight allocation on the gas feature data M to obtain attention feature data b, and passes it to the local perception structure; Step 4: The local perception structure extracts local features from the attention feature data b to obtain local feature data c, and transmits the local feature data c to the wide-area perception structure; Step 5: The wide-area sensing structure performs channel shuffling and group convolution operations on the local feature data c, and finally obtains the gas classification result Y.

2. The gas classification method based on electronic nose and sensor perception convolutional network according to claim 1 is characterized in that: In step 1, the sensor attention module is provided with an input layer, a first two-dimensional convolutional layer, a second two-dimensional convolutional layer, a flattening layer, a fully connected layer and a multiplication unit connected in sequence, the input layer is also connected to the multiplication unit, the output ends of the first two-dimensional convolutional layer and the second two-dimensional convolutional layer are both built-in with ReLU functions, and the output end of the fully connected layer is built-in with a sigmoid activation function.

3. The gas classification method based on electronic nose and sensor perception convolutional network according to claim 2 is characterized in that: In step 3, the sensor attention module allocates attention weights to the gas characteristic data M in the following steps: Step 31: The input layer in the sensor attention module obtains the gas characteristic data M and passes it to the first two-dimensional convolution layer and the multiplication unit; Step 32: The first two-dimensional convolution layer uses a 3×3 convolution kernel to perform a channel expansion operation on the gas characteristic data M, and then activates it through a ReLU function to obtain first activation data a1, and passes it to the second two-dimensional convolution layer; Step 33: the second two-dimensional convolutional layer performs a channel compression operation on the first activation data a1, and then activates it through a ReLU function to obtain second activation data a2, and passes it to the flattening layer; Step 34: the flattening layer flattens the feature map of the second activation data a2 to obtain flattened data a3, and passes it to the fully connected layer; Step 35: The fully connected layer performs a fully connected operation on the flattened data a3, and then activates it through a sigmoid activation function to obtain a weight vector w, and passes it to the multiplication unit; The calculation expression of the weight vector w is as follows: w=S(ReConv(EXConv(M))) Where M is the original feature map, i.e., the gas feature data; w is the weight vector generated based on the feature map, EXConv() represents the extended channel convolution operation, ReConv() represents the reduced channel convolution operation, and S() represents the sigmoid activation function; Step 36: The multiplication unit multiplies the gas characteristic data and the weight vector w element by element to obtain attention characteristic data b, which is expressed as follows: Among them, ⊙ represents element multiplication, and M' represents the feature map after the weight is assigned, that is, the attention feature data b.

4. The gas classification method based on electronic nose and sensor perception convolutional network according to claim 1 is characterized in that: In step 1, the local perception structure is provided with a point convolution layer, a third two-dimensional convolution layer, a first normalization layer, a fourth two-dimensional convolution layer, a second normalization layer and a residual connection layer connected in sequence, the output end of the point convolution layer is also connected to the residual connection layer, and the output end of the first normalization layer has a built-in ReLU function.

5. The gas classification method based on electronic nose and sensor perception convolutional network according to claim 4 is characterized in that: In step 4, the local perception structure extracts local features from the attention feature data b, and the steps are as follows: Step 41: the point convolution layer in the local perception structure performs a point convolution operation on the attention feature data b to obtain point convolution data b1, and passes it to the third two-dimensional convolution layer and the residual connection layer; Step 42: the third two-dimensional convolution layer performs a convolution operation on the point convolution data b1 to obtain third convolution data b2, and passes it to the first normalization layer; Step 43: the first normalization layer performs a normalization operation on the third convolution data b2, and then activates it through a ReLU function to obtain third activation data b3, and passes it to the fourth two-dimensional convolution layer; Step 44: the fourth two-dimensional convolution layer performs a convolution operation on the third activation data b3 to obtain fourth convolution data b4, and passes it to the second normalization layer; Step 45: the second normalization layer performs a normalization operation on the fourth convolution data b4 to obtain second normalized data b5, and passes it to the residual connection layer; Step 46: The residual connection layer performs a residual connection operation on the point convolution data b1 and the second normalized data b5 to obtain local feature data c.

6. The gas classification method based on electronic nose and sensor perception convolutional network according to claim 1 is characterized in that: In step 1, the wide-area perception structure is provided with a channel shuffling module, a variable kernel convolution module, an average pooling layer and a second fully connected layer connected in sequence, and the variable kernel convolution module is provided with N variable kernel convolution layers connected in parallel.

7. The gas classification method based on electronic nose and sensor perception convolutional network according to claim 6 is characterized in that: In step 5, the wide-area perception structure performs channel shuffling and group convolution operations on the local feature data c, and the steps are as follows: Step 51: the channel shuffling module in the wide-area perception structure performs a channel shuffling operation on the local feature data c to obtain shuffled data c1, and passes it to the variable kernel convolution module; Step 52: Each variable kernel convolution layer in the variable kernel convolution module performs a variable kernel convolution operation on the shuffled data c1 respectively, and then concatenates the outputs of all variable kernel convolution layers together to obtain variable kernel convolution data c2, and passes it to the average pooling layer; Step 53: the average pooling layer performs an average pooling operation on the variable kernel convolution data c2 to obtain pooling data c3, and passes it to the second fully connected layer; Step 54: The second fully connected layer performs a fully connected operation on the pooled data c3 to obtain a gas classification result Y.

8. The gas classification method based on electronic nose and sensor perception convolutional network according to claim 7 is characterized in that: The variable kernel convolution layer is provided with a fifth two-dimensional convolution layer, a resampling layer, a reshaping layer, a sixth two-dimensional convolution layer, and a third normalization layer which are connected in sequence, and a Swish function is built in the output end of the third normalization layer.

9. The gas classification method based on electronic nose and sensor perception convolutional network according to claim 8 is characterized in that: The i-th variable kernel convolution layer performs a variable kernel convolution operation on the shuffled data c1, and the steps are as follows: Step S1: the fifth two-dimensional convolution layer in the variable kernel convolution layer performs a convolution operation on the shuffled data c1 to obtain fifth convolution data d1, and passes it to the resampling layer; Step S2: the resampling layer resamples the fifth convolution data d1 to obtain sampled data d2, and passes it to the reshaping layer; Step S3: the reshaping layer reshapes the sampled data d2 to obtain shaped data d3, and passes it to the sixth two-dimensional convolutional layer; Step S4: the sixth two-dimensional convolution layer performs a convolution operation on the shaping data d3 to obtain sixth convolution data d4, and passes it to the third normalization layer; Step S5: The third normalization layer performs a normalization operation on the sixth convolution data d4, and then activates it through a Swish function to obtain the output c2i of the i-th variable kernel convolution layer.

10. The gas classification method based on electronic nose and sensor perception convolutional network according to claim 1 is characterized in that: The gas characteristic data M is pepper gas data; The gas classification result Y is either a classification result of pepper varieties or a classification result of pepper origin.