Multi-gas classification method and system based on electronic nose and medium

By combining downsampling, preprocessing, and a deep convolutional neural network with a channel selection module, the problems of signal distortion and pattern overlap in multi-gas identification are solved, achieving high-precision, low-dimensional, and efficient gas classification, making it an electronic nose system suitable for complex environments.

CN121656484APending Publication Date: 2026-03-13GUANGDONG POLYTECHNIC NORMAL UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-13
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

Existing electronic nose systems suffer from signal distortion and pattern overlap in multi-gas identification, leading to increased classification model recognition error and decreased generalization ability, making it difficult to balance recognition accuracy, computational efficiency, and robustness.

Method used

A multi-gas classification method based on an electronic nose is adopted. By downsampling, preprocessing, channel selection and deep convolutional neural network, combined with wrap-around single-channel evaluation and channel attention module, the sensor channels that contribute the most to the classification task are selected, reducing data dimensionality and suppressing noise interference.

Benefits of technology

It achieves a balance between high classification accuracy and computational efficiency, improves the robustness of the electronic nose system, and is suitable for real-world scenarios with limited resources or requiring rapid response.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121656484A_ABST
    Figure CN121656484A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of electronic sensing and mode recognition, and discloses a multi-gas classification method and system based on an electronic nose and a medium, and the method comprises the following steps: collecting an original time sequence response signal of target gas; down-sampling the original time sequence response signal according to a predetermined scaling factor; preprocessing the sampled time sequence response signal, and segmenting the preprocessed time sequence response signal into a plurality of samples according to a predetermined window strategy; based on the constructed sample, a channel subset is selected from multiple channels through a channel selection module, and the channel selection module comprises one of a package-based single-channel evaluation method and a channel attention-based end-to-end weight extraction method; inputting a sample corresponding to the selected channel subset into a deep convolutional neural network for supervised training to obtain a gas classification model; and classifying the target gas by using the trained gas classification model to obtain a classification result. According to the method, the dimension and redundancy of the data can be reduced, and the recognition precision, the calculation efficiency and the robustness are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electronic sensing and pattern recognition technology, and in particular to a multi-gas classification method, system and medium based on an electronic nose. Background Technology

[0002] An electronic nose system is an intelligent device that detects and identifies gases or volatile components using a chemical sensor array, simulating the biological olfactory mechanism. With continuous advancements in sensor manufacturing processes, data acquisition technologies, and machine learning algorithms, electronic noses have demonstrated broad application potential in various fields, including environmental monitoring, public safety, industrial process control, food quality assessment, and medical diagnosis. By rapidly and automatically sensing and classifying multiple gases in the air or samples, they significantly improve monitoring efficiency, reduce reliance on manual labor, and enhance emergency response and routine monitoring capabilities. A typical electronic nose multi-gas classification system usually includes five core stages: sensor data acquisition, signal preprocessing, channel or feature selection, sample construction, and classification. The raw time-series signals acquired by the sensor array typically contain noise, baseline drift, response drift, and inter-channel redundancy, and are also susceptible to interference from environmental factors such as temperature and humidity. Therefore, preprocessing operations such as resampling, filtering, baseline correction, and standardization are generally required in the early stages to improve signal quality. Feature or channel selection, a crucial step between preprocessing and classification, aims to eliminate redundant or low-contribution sensor channels, reduce data dimensionality, and thus improve the model's computational efficiency and generalization ability. Subsequently, by dividing the preprocessed signal into time windows and extracting time-domain or frequency-domain features, samples suitable for machine learning model input are constructed. Finally, a classification algorithm is used to determine the gas category. Although signal quality can be improved to some extent by optimizing sensor selection, array arrangement, and controlling environmental conditions, in practical applications, signal distortion and pattern overlap are still difficult to completely avoid due to factors such as changes in gas concentration, cross-sensitivity of mixed gases, sensor aging, and environmental fluctuations. Failure to effectively process and optimize the signal will lead to increased classification model recognition errors, decreased generalization ability, and even the inability to accurately distinguish the target gas category.

[0003] Currently, multi-gas identification methods can be mainly divided into two categories: one is traditional machine learning methods based on manual feature engineering, such as extracting features like time-domain peak values, integral values, rise times, or frequency-domain wavelet coefficients, and then combining them with classifiers such as Support Vector Machines (SVM) and Random Forests for gas discrimination. While this type of method offers strong interpretability, it relies on expert experience, has limited ability to represent complex response patterns, and its performance significantly degrades when the number of gas categories increases or when noise and drift are present. The other category is end-to-end classification methods based on deep learning, such as using one-dimensional convolutional neural networks (1D-CNN) or recurrent neural networks (RNN) to directly learn feature representations from the original signal and complete the classification. This type of method performs well in complex gas mixing scenarios, but it requires a large amount of training data and computational resources, has weak model interpretability, and is prone to overfitting when data is insufficient. Therefore, in the practical deployment of electronic nose systems, there is an urgent need for a gas classification method that can balance recognition accuracy, computational efficiency, and robustness. Summary of the Invention

[0004] The purpose of this invention is to overcome at least one deficiency in the prior art and provide a multi-gas electronic nose. The classification method, system, and medium of this invention can reduce the dimensionality and redundancy of data, and improve recognition accuracy, computational efficiency, and robustness.

[0005] To achieve the above objectives, in a first aspect, the present invention provides a multi-gas classification method based on an electronic nose, the method comprising the following steps: The raw time-series response signal of the target gas is acquired using a multi-channel gas sensor array of an electronic nose; The original timing response signal is downsampled according to a predetermined scaling factor to obtain the sampled timing response signal; The sampled time-series response signal is preprocessed, and the preprocessed time-series response signal is divided into multiple samples according to a predetermined window strategy. Each sample includes time-series data from multiple channels and corresponds to a gas concentration and category. Based on the constructed samples, a subset of channels is selected from multiple channels through a channel selection module, which includes at least one of wrap-around single-channel evaluation and end-to-end weight extraction based on channel attention. The samples corresponding to the selected channel subset are input into a deep convolutional neural network for supervised training to obtain a gas classification model. The target gas is classified using a trained gas classification model to obtain the classification results.

[0006] Furthermore, the downsampling employs median pooling, the specific calculation method of which is as follows:

[0007] in, , Here, k represents the sequence number of the non-overlapping continuous window, and k is the size of the downsampling window. Represents the original input data. This represents the output data after downsampling.

[0008] Furthermore, the preprocessing includes denoising, baseline correction, and normalization.

[0009] Furthermore, the baseline correction includes the difference method, the relative method, and the fractional method, wherein the calculation formula for the difference method is as follows:

[0010] in, The value obtained by subtracting the mean of the baseline signal from the original signal. The mean of the baseline signal is given; the formula for the relative method is as follows:

[0011] The formula for calculating fractions is as follows:

[0012] in, This is a relative correction value, which is the ratio of the difference between the original signal and the mean of the baseline signal to that baseline mean. The fractional correction value is the ratio of the original signal to the mean of the baseline signal.

[0013] Furthermore, the predetermined window strategy determines the window size based on the gas concentration change time, including: for a dataset where the gas concentration change time is a fixed value, the window size is set to that fixed value; for a dataset where the gas concentration change time is a variable value, the window size is set to the minimum change time or a predefined value.

[0014] Furthermore, the single-channel evaluation based on a packaged approach includes the following steps: For each channel, a one-dimensional convolutional neural network is used as input for training and testing, with the signal of that channel as input. Repeat the training and testing process multiple times, and calculate the average classification accuracy for that channel. The weights of each channel are generated based on the average classification accuracy, the channels are sorted based on the weights, and a subset of channels is selected according to a first predetermined rule.

[0015] Furthermore, the one-dimensional convolutional neural network includes an input layer, multiple convolutional blocks, a fully connected layer, and an output layer, with each convolutional block followed by an activation function and a pooling layer.

[0016] Furthermore, the end-to-end weight extraction based on channel attention includes the following steps: Embed a channel attention module in a multi-channel convolutional neural network and perform end-to-end training using multi-channel signals as input; The channel attention module calculates the weight score for each channel, and the calculation includes performing global average pooling, fully connected mapping, and activation function processing on the input. The channel weight scores of multiple samples are averaged and normalized to obtain attention weights. Channels are then sorted based on these attention weights, and a subset of channels is selected according to a second predetermined rule.

[0017] Secondly, the present invention also provides a multi-gas classification system based on an electronic nose, the classification system being based on the classification method described in the first aspect, comprising: Acquisition module: configured to acquire raw time-series response signals of the target gas using a multi-channel gas sensor array of the electronic nose; Downsampling module: configured to downsample the original timing response signal by a predetermined scaling factor to obtain a sampled timing response signal; The preprocessing module is configured to preprocess the sampled time-series response signal and divide the preprocessed time-series response signal into multiple samples according to a predetermined window strategy. Each sample includes time-series data from multiple channels and corresponds to a gas concentration and category. Selection module: configured to select a subset of channels from multiple channels based on constructed samples, the channel selection module including at least one of wrap-around single-channel evaluation and end-to-end weight extraction based on channel attention; Training module: Configured to input samples corresponding to the selected channel subset into a deep convolutional neural network for supervised training to obtain a gas classification model; Classification module: Configured to classify the target gas using a trained gas classification model and obtain the classification results.

[0018] Thirdly, the present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method described in the first aspect.

[0019] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention introduces a channel selection module that integrates two complementary strategies. This module can filter out the sensor channels that contribute most to the classification task, significantly reducing the number of input channels and thus lowering data dimensionality and redundancy. Simultaneously, by focusing on key features, the module effectively suppresses noise and irrelevant variables, achieving high classification accuracy while ensuring high computational efficiency and robustness. This overcomes the traditional method's difficulty in balancing accuracy and efficiency, providing reliable technical support for the deployment of electronic noses in resource-constrained embedded devices or real-world scenarios requiring rapid response. Attached Figure Description

[0020] Figure 1 This is a flowchart of a multi-gas classification method based on an electronic nose according to Embodiment 1 of the present invention; Figure 2 This is a typical response curve of eight sensors on an array in a single sampling of a wind tunnel dataset, as shown in Embodiment 1 of this aspect. Figure 3 This is a response curve of the sensor array of Embodiment 1 of the present invention to a dynamically changing mixed gas; Figure 4 This is a visualization comparison of the signals of two datasets before and after downsampling in Embodiment 1 of the present invention, wherein... Figure 4 (a) is the original high-sampling-rate signal of dataset one; Figure 4 (b) is the signal of dataset one after median pooling downsampling; Figure 4 (c) is the original high-sampling-rate signal of dataset two; Figure 4 (d) is the signal of dataset 2 after median pooling downsampling; Figure 5 This is a schematic diagram of the structure of a one-dimensional convolutional neural network according to Embodiment 1 of the present invention; Figure 6 This is a schematic diagram of a one-dimensional convolutional neural network structure with a channel attention module according to Embodiment 1 of the present invention; Figure 7 This is a schematic diagram of the deep convolutional neural network structure according to Embodiment 1 of the present invention, wherein, Figure 7 (a) shows the overall structure of a deep convolutional network; Figure 7 (b) is a schematic diagram of the structure of a convolutional block; Figure 8 This is a bar chart of empirical weighted evaluation for a single-channel wrap-around method according to Embodiment 2 of the present invention, wherein... Figure 8 (a) represents the empirical weights of each channel in dataset one; Figure 8 (b) represents the empirical weights for each channel in dataset two; Figure 9 This is a histogram of the attention weights for embedded channel evaluation in Embodiment 2 of the present invention, wherein... Figure 9 (a) represents the attention weights for dataset 1; Figure 9 (b) represents the attention weights for dataset two; Figure 10 This is a block diagram of a multi-gas classification system based on an electronic nose according to Embodiment 3 of the present invention. Detailed Implementation

[0021] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0022] Example 1 Please see Figure 1 A preferred embodiment of the present invention provides a multi-gas classification method based on an electronic nose, the method comprising the following steps: Step S1: Acquire the raw time-series response signal of the target gas using the multi-channel gas sensor array of the electronic nose; Step S2: Downsample the original timing response signal according to a predetermined scaling factor to obtain the sampled timing response signal; Step S3: Preprocess the sampled time-series response signal and divide the preprocessed time-series response signal into multiple samples according to a predetermined window strategy. Each sample includes time-series data from multiple channels and corresponds to a gas concentration and category. Step S4: Based on the constructed samples, a subset of channels is selected from multiple channels through a channel selection module, which includes at least one method of wrap-around single-channel evaluation and end-to-end weight extraction based on channel attention. Step S5: Input the samples corresponding to the selected channel subset into a deep convolutional neural network for supervised training to obtain a gas classification model; Step S6: Use the trained gas classification model to classify the target gas and obtain the classification results.

[0023] This embodiment introduces a channel selection module that integrates two complementary strategies. This module can filter out the sensor channels that contribute the most to the classification task, significantly reducing the number of input channels and thus reducing data dimensionality and redundancy. Simultaneously, by focusing on key features, this module effectively suppresses noise and irrelevant variables, achieving high classification accuracy while also possessing excellent computational efficiency and robustness, overcoming the traditional method's difficulty in balancing accuracy and efficiency.

[0024] In an optional embodiment, the data acquisition step in step S1 is specifically implemented as follows: Step S1.1: The sensor array used in this embodiment consists of various gas sensors with differentiated response characteristics to the target gas. When selecting sensors, priority is given to models with high sensitivity and wide response range to ensure coverage of common concentration ranges of the target gas in the intended application scenario, thereby effectively reducing the risk of feature failure due to sensor response saturation or weak signal.

[0025] Step S1.2: Place the sensor array in the detection chamber and introduce the target gas sample. After the sensor array is exposed to the gas, its electrical parameters will change with the gas concentration. This change is acquired in real time and converted into a voltage signal. The acquisition system records the response of all channels at a constant sampling frequency to generate the original time-series response signal.

[0026] Step S1.3: The raw data obtained after acquisition is recorded and stored in a multi-channel time-series format with timestamps. Each data record contains complete metadata, specifically including: sampling frequency, high-precision timestamp of each data point, and a unique sensor channel identifier.

[0027] For details on the acquisition process and the resulting raw signal characteristics, please refer to the appendix. Figure 2 With appendix Figure 3 .in, Figure 2 The typical response curves of eight sensors on an array are shown in a single sampling of a wind tunnel dataset. Figure 3 This shows a segment of the sensor array's response curve to a dynamically changing gas mixture in the gas mixture dataset.

[0028] In an optional embodiment, in step S2, the predetermined scaling factor (downsampling factor) is determined by the following factors: the sampling rate of the original signal, the target frequency band of the gas response to be retained, and the length of the input sequence required by the subsequent deep convolutional neural network (DCNN). This embodiment uses median pooling to achieve downsampling, which can effectively smooth instantaneous noise and preserve the overall trend of the signal. Its specific calculation method is as follows:

[0029] in, , Here, k represents the sequence number of the non-overlapping continuous window, and k is the size of the downsampling window. Represents the original input data. This represents the output data after downsampling. Specifically, the system traverses the original signal using a non-overlapping sliding window with a window width of k. For each window, the median of all original data points within the window is calculated, and this median is used as a new data point in the downsampled signal. This process is repeated until the entire original sequence has been traversed, thereby generating a new time-series signal with a length shortened to approximately 1 / k of the original sequence. Through this operation, the amount of data can be significantly reduced while preserving the key characteristics of the gas response. A comparison of the effects of this downsampling process can be found in the appendix. Figure 4 The image shows the signal waveforms before and after downsampling.

[0030] In an optional embodiment, in step S3, the preprocessing includes denoising, baseline correction, and normalization, wherein denoising may employ low-pass filtering. Baseline correction includes differential, relative, and fractional methods, wherein the calculation formula for the differential method is as follows:

[0031] in, The value obtained by subtracting the mean of the baseline signal from the original signal. The mean of the baseline signal is given; the formula for the relative method is as follows:

[0032] The formula for calculating fractions is as follows:

[0033] in, This is a relative correction value, which is the ratio of the difference between the original signal and the mean of the baseline signal to that baseline mean. The fractional correction value is the ratio of the original signal to the mean of the baseline signal. To eliminate differences in dimensions and numerical ranges between sensor channels due to inherent sensitivity or range variations, the baseline-corrected data is standardized. This embodiment uses the maximum resolution of the analog-to-digital converter (ADC) as the normalization benchmark, ensuring that the standardization process matches the hardware system characteristics. The standardization calculation formula is as follows:

[0034] Here, ADC refers to the maximum resolution of the analog-to-digital converter (ADC) used in the data transmission process. For example, a 12-bit ADC has a maximum resolution of 2. 12 =4096, This is the normalized data.

[0035] Furthermore, the preprocessed time-series response signal is divided into multiple samples according to a predetermined window strategy. Each sample includes time-series data from multiple channels and corresponds to a gas concentration and category. The predetermined window strategy determines the window size based on the gas concentration change time, including: for datasets where the gas concentration change time is a fixed value, the window size is set to that fixed value; for datasets where the gas concentration change time is a variable value, the window size is set to the minimum change time or a predefined value.

[0036] For example, to objectively evaluate model performance, this embodiment uses a 5-fold cross-validation method to partition the entire dataset. Specifically, all data is randomly and uniformly divided into 5 parts. In subsequent model training and evaluation, a total of 5 experiments are conducted. In each experiment, one part of the data is used as the test set, and the other four parts are used as the training set. The final performance index is the average of the 5 test results. After completing the partitioning of the training and test sets, based on the physical process of gas release, a predetermined window strategy is used to segment the preprocessed time-series signal to construct the sample units for model input. This embodiment implements this method for the two public datasets used as follows: 1) For dataset 1: Observations show that the complete variation period of gas concentration in this dataset is a fixed 260 seconds. Therefore, the size of window 1 is set to 260, and non-overlapping slices are directly performed on the continuous time series signal using this fixed length. Each slice constitutes a sample containing multi-channel time series data and corresponds to a specific gas concentration and category label.

[0037] 2) For Dataset 2: The gas concentration in this dataset fluctuates randomly between 80 and 120 seconds. First, based on the recorded actual gas concentration change time, continuous data segments of the same concentration change are identified and divided into data units. Then, to standardize the input scale, the size of window 2 is set to 80, and the first 80 seconds of data from each data unit are taken, ultimately forming a standard input sample. This sample also contains time-series data from multiple channels, and associates them with their corresponding gas concentrations and categories.

[0038] In an optional embodiment, step S4, the wrap-around single-channel evaluation includes the following steps: For each channel, the signal from that channel is used as input, and a one-dimensional convolutional neural network (1D-CNN) is used for training and testing. The network structure includes: an input layer that receives a tensor of shape [T×1], where T is the time step. A feature extraction layer consisting of two concatenated one-dimensional convolutional blocks. The first convolutional block contains two one-dimensional convolutional layers with an output dimension of 64, followed by a ReLU activation function and a max-pooling layer. The second convolutional block has an output dimension of 128, and its layer connection is the same as the first convolutional block. The output layer, consisting of a fully connected layer and a Softmax function, is used to output the probability distribution of gas categories. For a detailed description of the network structure, please refer to the appendix. Figure 5 .

[0039] The training and testing processes are repeated multiple times to calculate the average classification accuracy for that channel; in this embodiment, for each individual channel C in the sensor array... i The time-series signal is used as input to the 1D-CNN classifier for supervised learning. Before training, the dataset is divided into training, validation, and test sets in a fixed ratio; in this embodiment, the ratio is 60%:20%:20%. During training, the validation set is used to monitor model performance to select the best model. Finally, the classification accuracy of this channel in this experiment is calculated on the test set and denoted as . To eliminate the influence of randomness and obtain stable evaluation results, the training-testing process in step 2 above is repeated R times (R=5 in this embodiment) to obtain the accuracy series for this channel. Then, the average classification accuracy of this channel is calculated according to the following formula:

[0040] in, Average accuracy for each channel.

[0041] Weights are generated for each channel based on the average classification accuracy. Channels are then ranked according to their weights, and a subset of channels is selected based on a first predetermined rule. The average accuracy of all channels is normalized, and the empirical weight for each channel is calculated using the following formula:

[0042] in, The weights of each channel are represented, and finally, a subset of channels is selected according to a first predetermined rule. In this embodiment, the rule is: all channels are arranged in descending order of empirical weights, and channels with weights higher than a set threshold are selected to form the final subset of channels.

[0043] The end-to-end weight extraction based on channel attention includes the following steps: A channel attention module is embedded in a multi-channel convolutional neural network, and end-to-end training is performed using multi-channel signals as input. In this embodiment, a one-dimensional convolutional neural network (CA-CNN) integrating a channel attention (CA) module is constructed. During training, the constructed multi-channel sample tensor is... (Its shape is) Where B is the batch size, C is the number of channels, and T is the time step, the data is directly input into the network for end-to-end training. The overall architecture of this network can be found in the appendix. Figure 6 . The channel attention module calculates the weight score for each channel, including performing global average pooling, fully connected mapping, and activation function processing on the input. Specifically, during training, the channel attention (CA) module calculates a set of channel weight scores for each input sample. The CA module performs the following operations sequentially: 1) Global Average Pooling: Global average pooling (GAP) is performed on the input tensor X along the time dimension T to compress the temporal information and obtain a channel description vector. The calculation formula is as follows:

[0044] in, This is the output after pooling.

[0045] 2) Weight mapping and activation: The channel description vector is then mapped and activated. Input a bottleneck fully connected layer and pass it through the Sigmoid activation function. This is mapped to the initial weight score of each channel. The calculation formula is as follows:

[0046] in, and For the parameters and biases of the fully connected layer, For the generated channel weight scores, This is the Sigmoid activation function.

[0047] 3) Feature weighting: The obtained channel weights The input sample X is multiplied channel-by-channel to generate a channel-attention-weighted feature map, which serves as the input to the subsequent CNN classifier. The calculation formula is as follows:

[0048] The channel weight scores of multiple samples are averaged and normalized to obtain attention weights. Channels are then ranked based on these attention weights, and a subset of channels is selected according to a second predetermined rule. In this embodiment, after model training is complete, a final evaluation of channel importance is performed, including: weight statistics, collecting channel weight scores calculated by the CA module from multiple samples on a test set or a dedicated validation set. The weight scores of each channel are averaged and normalized to obtain the final attention weight for each channel. Subset selection: A channel subset is selected according to a second predetermined rule. In this embodiment, the rule is: all channels are arranged in descending order of their final attention weights, and channels with weights higher than a set threshold are selected to form the optimized channel subset.

[0049] In an optional embodiment, step S5 specifically includes: 1) Network Structure: The Deep Convolutional Neural Network (DCNN) used in this embodiment aims to automatically learn deep feature representations from low-dimensional samples after channel selection. Its core structure is shown in the attached figure. Figure 7 As shown, it specifically includes: multiple convolutional blocks: the network consists of multiple sequentially connected convolutional blocks. Each convolutional block contains 6 computational layers, the detailed structure of which is shown in the appendix. Figure 7 (b) consists of a core of two convolutional layers, with each convolutional layer followed by a batch normalization layer and a ReLU activation function. Residual connections are shown in the appendix. Figure 7 As shown in (a), residual connections are set between each convolutional block to alleviate the gradient vanishing problem in deep network training, promote model convergence, and improve performance. Classifier: After all convolutional blocks, a global pooling layer and a fully connected layer are connected to finally output the predicted probability of each gas class.

[0050] 2) Training Strategy and Hyperparameter Settings: Supervised training of the model employs the following strategies and parameter configurations: Loss Function and Optimizer: Cross-entropy loss is used, optimized using stochastic gradient descent, with momentum set to 0.9. Learning Rate Scheduling: The initial learning rate is set to 0.01, with a dynamic adjustment strategy: when the model's accuracy on the validation set does not improve for five consecutive training epochs and the change is less than 0.00001, the learning rate is reduced to one-tenth of its original value. Early Stopping Mechanism: To effectively prevent overfitting, an early stopping strategy is introduced: when the validation set loss does not show a significant decrease within three consecutive training epochs, training is terminated, and the model parameters are restored to the optimal performance on the validation set.

[0051] In an optional embodiment, in step S6, the target gas is classified using a trained gas classification model to obtain a classification result.

[0052] Example 2 To verify the effectiveness of the electronic nose multi-gas classification optimization method proposed in this invention, this embodiment was tested on two publicly available gas datasets.

[0053] I. Test Dataset 1. Gas sensor arrays in open sampling settings: This dataset was collected in a wind tunnel under open sampling conditions. It uses a large-scale array of 72 sensors (covering 6 types) to record high-concentration gas response time-series data of 10 high-priority chemical substances. It is suitable for evaluating the classification and generalization capabilities of the system in real-world scenarios.

[0054] 2. Gas sensor array under dynamic gas mixtures: This dataset contains time-series signals from 16 chemical sensors exposed to dynamically changing gas mixtures (including methane-carbon monoxide and ethylene-carbon monoxide mixtures), suitable for studying the robustness of mixed gas identification and algorithms.

[0055] II. Experiment Implementation Process This embodiment strictly follows the aforementioned method flow, and the specific parameter settings are as follows: 1. Downsampling: The original sampling frequency of both datasets is 100 Hz. Median pooling is used for downsampling, and the window size k is set to 100.

[0056] 2. Baseline Correction and Standardization: Baseline correction employs the differential method shown in Example 1, with the baseline value being the average signal value when the gas is not in contact with the sensor. Standardization employs the method shown in Example 1, where the resolution of the analog-to-digital converter (ADC) is set to 12.

[0057] 3. Channel selection: 1) Wrap-up single-channel evaluation: using Figure 5 The one-dimensional convolutional neural network (1D-CNN) structure shown is divided into training, validation, and test sets in a 60%:20%:20% ratio. Each channel is independently trained and tested 5 times (R=5), and the average accuracy is calculated and normalized to obtain empirical weights. The weight distribution for each channel is shown in the image. Figure 8 According to the first predetermined rule, weights are selected for the wind tunnel dataset. Channels with a value >0.02 were ultimately selected as follows: 28, 29, 30, 31, 32, 33, 35, 36, 37, 38, 39, 40, 44, 45, 46, 47, 48; weights were selected for the mixed gas dataset. For channels with a value >0.07, the final selected channel numbers are: 3, 4, 5, 6, 7, 8, 11, 12, 15, 16.

[0058] 2) Embedded Channel Evaluation: End-to-end training was performed using CA-CNN with an integrated channel attention module. After training, the channel scores of multiple samples on the validation set were statistically analyzed, and the attention weights were obtained by averaging and normalization. Their distribution is shown in [Figure showing distribution]. Figure 9 According to the second predetermined rule, channels with attention weights > 0.55 were selected for the wind tunnel dataset, and the final selected channel numbers are: 1, 3, 4, 17, 19, 25, 27, 29, 30, 34, 35, 36, 37, 38, 39, 41, 43, 47, 48; channels with attention weights > 0.6 were selected for the mixed gas dataset, and the final selected channel numbers are: 1, 2, 5, 6, 10, 11, 13, 14, 15, 16.

[0059] 3) Model Training and Testing: Input the channel subset data obtained from the two channel selection methods described above into... Figure 7 The classifier is trained in a Deep Convolutional Neural Network (DCNN) and evaluated on an independent test set. Classification performance is quantified by accuracy, which is calculated using the following formula:

[0060] Where TP and TN are the number of samples correctly predicted as positive or negative, respectively, while FP and FN are the number of samples incorrectly predicted as positive or negative, respectively.

[0061] III. Experimental Results and Analysis Based on the above experimental process, this embodiment systematically validates the optimization method on two public datasets and compares it with various traditional machine learning algorithms (Support Vector Machine, Random Forest, k-Nearest Neighbors, KNN) and deep learning algorithms (MLP). The experimental results (see Tables 1 to 6) demonstrate the effectiveness, robustness, and innovation of this invention from multiple dimensions.

[0062] 1. Basic performance comparison Performance on the open environment dataset (Dataset 1): As shown in Table 1, the method of this invention (DCNN) exhibits high stability (lowest standard deviation, 0.0108) under different environmental parameters (wind speed, temperature), and its classification accuracy (average 97.83%) is comparable to the optimal algorithm (MLP, 98.64%). This demonstrates that the deep convolutional network framework constructed in this invention possesses excellent environmental adaptability and robustness in complex open sampling environments.

[0063] Table 1: Comparison of accuracy of various classification algorithms for wind tunnel datasets under different environmental settings

[0064] Performance on the mixed gas dataset (Dataset 2): As shown in Table 2, in a more complex scenario with a closed environment and dynamically changing gas concentration, the method of this invention (DCNN) achieved the highest classification accuracy (96.03%) among all comparison algorithms. This demonstrates the advantages of the end-to-end feature learning mode of this invention in handling complex mixed gas patterns.

[0065] Table 2: Comparison of accuracy of various classification algorithms for mixed gas datasets

[0066] 2. Channel selection effect verification Effectiveness of Wrapped Channel Selection: For dataset 1, after wrapped channel selection (Table 3), the classification accuracy of the proposed method (DCNN) remains stable compared to the baseline full-channel model (Table 1) (98.00% vs 97.83%), even with a significant reduction in the number of input channels, and still maintains the best stability.

[0067] Table 3: Comparison of accuracy of various classification algorithms for wind tunnel datasets under different environmental settings after enclosed channel selection.

[0068] For dataset two (Table 4), this method further improved the accuracy to the best level in all experiments (96.14%). This fully demonstrates that the wrap-around single-channel evaluation can effectively eliminate redundant and interfering channels, reduce data dimensionality, focus on key features, and thus maintain or even improve classification performance.

[0069] Table 4: Comparison of accuracy of various classification algorithms for the mixed gas dataset after encapsulation channel selection

[0070] The superiority of embedded channel selection: For dataset 1, after embedded channel selection (Table 5), the proposed method (DCNN) achieved the highest accuracy (98.01%) in all experiments, significantly outperforming its full-channel benchmark and all other algorithms. This demonstrates that the embedded method based on channel attention can identify the channel combinations that contribute most to the classification task through end-to-end training.

[0071] Table 5: Comparison of accuracy of various classification algorithms for wind tunnel datasets under different environmental settings after embedded channel selection.

[0072] For dataset 2 (Table 6), the embedded method is still better than the traditional algorithm, but slightly less effective than the wrapping method. This shows that the two strategies are complementary and can be flexibly selected according to the specific characteristics of the data.

[0073] Table 6: Comparison of accuracy of various classification algorithms for the mixed gas dataset after embedded channel selection

[0074] The electronic nose multi-gas classification optimization framework of this invention, by introducing a deep convolutional neural network (DCNN) and an innovative dual-strategy channel selection module, performs excellently on different types of datasets. Experimental results show that this framework not only has high accuracy and robustness in full-channel mode, but also intelligently optimizes the input through channel selection. While significantly reducing data dimensionality (computational overhead), it ensures that classification accuracy is not lost or even improved, successfully solving the problem of balancing accuracy and efficiency in existing technologies.

[0075] Example 3 Please see Figure 10 An embodiment of the present invention provides a multi-gas classification system based on an electronic nose, comprising: Acquisition module: configured to acquire raw time-series response signals of the target gas using a multi-channel gas sensor array of the electronic nose; Downsampling module: configured to downsample the original timing response signal by a predetermined scaling factor to obtain a sampled timing response signal; The preprocessing module is configured to preprocess the sampled time-series response signal and divide the preprocessed time-series response signal into multiple samples according to a predetermined window strategy. Each sample includes time-series data from multiple channels and corresponds to a gas concentration and category. Selection module: configured to select a subset of channels from multiple channels based on constructed samples, the channel selection module including at least one of wrap-around single-channel evaluation and end-to-end weight extraction based on channel attention; Training module: Configured to input samples corresponding to the selected channel subset into a deep convolutional neural network for supervised training to obtain a gas classification model; Classification module: Configured to classify the target gas using a trained gas classification model and obtain the classification results.

[0076] The system in this embodiment is based on the method described in Embodiment 1. Therefore, the options proposed in Embodiment 1 are also applicable to this embodiment. To avoid repetition, they will not be described again here.

[0077] In addition, embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method described in embodiment 1.

[0078] The readable storage medium can be any available medium or data storage device that the processor can access, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks, optical storage, digital video discs (DVDs), Blu-ray discs (BDs), high-definition universal discs (HVDs), etc.) and semiconductor storage (such as read-only memory (ROMs), erasable programmable read-only memory (EPROMs), electrically erasable programmable read-only memory (EEPROMs), non-volatile memory (NAND flash), solid-state drives, etc.).

[0079] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the implementation of the present invention. Those skilled in the art can make other variations or modifications based on the above description. It is neither necessary nor possible to exhaustively describe all embodiments here. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the claims of the present invention.

Claims

1. A multi-gas classification method based on an electronic nose, characterized in that, The method includes the following steps: The raw time-series response signal of the target gas is acquired using a multi-channel gas sensor array of an electronic nose; The original timing response signal is downsampled according to a predetermined scaling factor to obtain the sampled timing response signal; The sampled time-series response signal is preprocessed, and the preprocessed time-series response signal is divided into multiple samples according to a predetermined window strategy. Each sample includes time-series data from multiple channels and corresponds to a gas concentration and category. Based on the constructed samples, a subset of channels is selected from multiple channels through a channel selection module, which includes at least one of wrap-around single-channel evaluation and end-to-end weight extraction based on channel attention. The samples corresponding to the selected channel subset are input into a deep convolutional neural network for supervised training to obtain a gas classification model. The target gas is classified using a trained gas classification model to obtain the classification results.

2. The multi-gas classification method based on an electronic nose according to claim 1, characterized in that, The downsampling uses median pooling, and its specific calculation method is as follows: in, , Here, k represents the sequence number of the non-overlapping continuous window, and k is the size of the downsampling window. Represents the original input data. This represents the output data after downsampling.

3. The multi-gas classification method based on an electronic nose according to claim 1, characterized in that, The preprocessing includes denoising, baseline correction, and normalization.

4. The multi-gas classification method based on an electronic nose according to claim 3, characterized in that, The baseline correction includes the difference method, the relative method, and the fractional method. The calculation formula for the difference method is as follows: in, The value obtained by subtracting the mean of the baseline signal from the original signal. The mean of the baseline signal is given; the formula for the relative method is as follows: The formula for calculating fractions is as follows: in, This is a relative correction value, which is the ratio of the difference between the original signal and the mean of the baseline signal to that baseline mean. The fractional correction value is the ratio of the original signal to the mean of the baseline signal.

5. A multi-gas classification method based on an electronic nose according to any one of claims 1-4, characterized in that, The predetermined window strategy determines the window size based on the gas concentration change time, including: for datasets where the gas concentration change time is a fixed value, the window size is set to that fixed value; for datasets where the gas concentration change time is a variable value, the window size is set to the minimum change time or a predefined value.

6. The multi-gas classification method based on an electronic nose according to claim 5, characterized in that, The package-based single-channel evaluation includes the following steps: For each channel, a one-dimensional convolutional neural network is used as input for training and testing, with the signal of that channel as input. Repeat the training and testing process multiple times, and calculate the average classification accuracy for that channel. The weights of each channel are generated based on the average classification accuracy, the channels are sorted based on the weights, and a subset of channels is selected according to a first predetermined rule.

7. A multi-gas classification method based on an electronic nose according to claim 6, characterized in that, The one-dimensional convolutional neural network includes an input layer, multiple convolutional blocks, a fully connected layer, and an output layer. Each convolutional block is followed by an activation function and a pooling layer.

8. A multi-gas classification method based on an electronic nose according to claim 7, characterized in that, The end-to-end weight extraction based on channel attention includes the following steps: Embed a channel attention module in a multi-channel convolutional neural network and perform end-to-end training using multi-channel signals as input; The channel attention module calculates the weight score for each channel, and the calculation includes performing global average pooling, fully connected mapping, and activation function processing on the input. The channel weight scores of multiple samples are averaged and normalized to obtain attention weights. Channels are then sorted based on these attention weights, and a subset of channels is selected according to a second predetermined rule.

9. A multi-gas classification system based on an electronic nose, characterized in that, The classification system is based on the classification method according to any one of claims 1-8, comprising: Acquisition module: configured to acquire raw time-series response signals of the target gas using a multi-channel gas sensor array of the electronic nose; Downsampling module: configured to downsample the original timing response signal by a predetermined scaling factor to obtain a sampled timing response signal; The preprocessing module is configured to preprocess the sampled time-series response signal and divide the preprocessed time-series response signal into multiple samples according to a predetermined window strategy. Each sample includes time-series data from multiple channels and corresponds to a gas concentration and category. Selection module: configured to select a subset of channels from multiple channels based on constructed samples, the channel selection module including at least one of wrap-around single-channel evaluation and end-to-end weight extraction based on channel attention; Training module: Configured to input samples corresponding to the selected channel subset into a deep convolutional neural network for supervised training to obtain a gas classification model; Classification module: Configured to classify the target gas using a trained gas classification model and obtain the classification results.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8.

Citation Information

Cited By

  • Gas identification method and system based on physical-data dual-drive framework

    CN121877972A