Method for detecting acetone gas in mixed gas

The gas detection model constructed through the multi-task learning framework uses the shared layer and feature enhancement module to extract timing features, which solves the problem of limited detection accuracy and generalization ability of acetone gas in mixed gases in traditional methods, and achieves efficient qualitative and quantitative analysis.

CN120068939APending Publication Date: 2025-05-30CHANGCHUN UNIV OF TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510144928.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-10
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

Among mixed gases, traditional deep learning methods are difficult to accurately distinguish and detect acetone and ethanol gases, especially when they are present at the same time, resulting in limited detection accuracy and generalization capabilities.

Method used

A multi-task learning framework is used to build a gas detection model, and the timing characteristics of gas response intensity data are extracted through the shared layer, combined with the feature enhancement module and the feature processing module, and qualitative detection and quantitative analysis are performed using the classification subnet and the regression subnet respectively.

Benefits of technology

This method reduces data requirements and labeling costs, improves the generalization ability and detection accuracy of the model, and can accurately perform qualitative and quantitative analysis in complex environments, solving the challenge of traditional methods for detection of acetone gas in mixed gases.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120068939A_ABST
    Figure CN120068939A_ABST
Patent Text Reader

Abstract

The invention discloses a method for detecting acetone gas in mixed gas, which specifically comprises the following steps of: (1) periodically acquiring response intensity data of gas to be detected through a sensor array, and preprocessing the response intensity data; and (2) extracting response intensity data in a response stage or a stable stage, inputting the response intensity data into the gas detection model, and carrying out qualitative detection and quantitative detection on acetone gas in the gas to be detected by the gas detection model. According to the method, a model architecture sharing bottom layer features is constructed through multi-task learning, gas qualitative and quantitative tasks are processed at the same time, on one hand, data requirements and labeling cost are reduced, and limited data resources can be utilized more efficiently by sharing a feature extraction layer; and on the other hand, collaborative optimization among tasks is realized through multi-task learning, so that the model can learn the variety characteristics and the concentration characteristics of the gas at the same time, and the overall performance is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of gas detection. More specifically, the present invention relates to a method for detecting acetone gas in a mixed gas. Background Art

[0002] Volatile organic compounds (VOCs) are a class of organic compounds that are easily volatile under normal temperature and pressure, have relatively low boiling points and small molecular weights. Many VOCs have been proven to be toxic and have serious impacts on human health. As one of the VOC gases, acetone is not only flammable and explosive, but also damages the human nervous system when inhaled in excess. Therefore, in fields such as medicine, chemistry, biology, and energy, it is crucial to quickly and accurately detect the concentration of acetone gas. Ethanol, as another VOC gas, has chemical similarities to acetone, which makes it a challenge to accurately distinguish them in the detection of mixed gases. Both gases have the characteristic of being volatile and often appear simultaneously in many industrial and environmental scenarios. Moreover, the presence of ethanol often interferes with the detection results of acetone gas during the acetone detection process. For example, in diabetes screening, the level of acetone gas is detected through an exhaled breath test, while ethanol may be present simultaneously due to alcohol consumption, which requires the detection system to be able to accurately distinguish these two gases. In addition, acetone and ethanol often intersect in industrial emissions, environmental monitoring, and natural environments. Therefore, the accurate identification and quantitative detection of acetone gas in the mixed gas of these two VOC gases pose certain challenges.

[0003] In the field of gas detection, traditional deep learning methods often require the development of separate independent models when dealing with gas qualitative and quantitative tasks. The above methods have the following disadvantages:

[0004] (1) The cost of model development is high. It is necessary to collect a large amount of data for qualitative and quantitative tasks separately, and the data annotation work is heavy.

[0005] (2) The model training process is complex. The qualitative and quantitative models need to be optimized separately and are difficult to cooperate, resulting in an extended development cycle.

[0006] (3) The model performance is limited. Due to the lack of unified modeling for the two tasks, the model may not be able to fully utilize the common information in the data in practical applications, thus affecting the detection accuracy and generalization ability. Summary of the Invention

[0007] The present invention provides a method for detecting acetone gas in a mixed gas, aiming to improve the above problems.

[0008] The present invention is implemented as follows. A method for detecting acetone gas in a mixed gas is as follows:

[0009] Step (1): Periodically collect the response intensity data of the gas to be measured through the sensor array, and preprocess the response intensity data.

[0010] Step (2): Extract the response intensity data in the response stage or the stable stage, and input it into the gas detection model. The gas detection model conducts qualitative and quantitative detection of acetone gas in the gas to be measured.

[0011] Furthermore, the gas detection model includes: a shared layer, a feature enhancement module, and a feature processing module connected in sequence, a classification sub-network and a regression sub-network respectively connected to the feature processing module. Among them, the shared layer is used to extract the temporal features of the gas response intensity data, the feature enhancement module is used to strengthen the temporal features extracted in the shared layer, the feature processing module is used to further strengthen the temporal features of the feature enhancement module, the classification sub-network is used to detect whether there is acetone gas in the gas to be measured, and the regression sub-network is used to detect the concentration of acetone gas in the gas to be measured.

[0012] Furthermore, the shared layer is composed of two layers of GRU.

[0013] Furthermore, the feature enhancement module includes an SE layer and a self-attention mechanism. Among them, the SE layer is composed of an average pooling layer, a fully connected layer, a ReLU activation function, a fully connected layer, and a Sigmoid activation function connected in sequence. Among them, the average pooling layer compresses the input data, then reduces the dimension through the fully connected layer and the ReLU activation function, and then expands through the fully connected layer and the Sigmoid activation function. The self-attention mechanism divides the expanded feature vector into query Q, key K, and value V, calculates the attention weight through the dot product of query Q and key K, and uses the attention weight to perform weighted summation on value V to output the temporal enhanced feature.

[0014] Furthermore, the feature processing module is composed of a fully connected layer, a batch normalization layer, and a ReLU activation function.

[0015] Furthermore, the classification sub-network and the regression sub-network have the same network architecture, including: a fully connected layer, a batch normalization layer, a Dropout layer, and a ReLU activation function.

[0016] Furthermore, the preprocessing process of the gas response intensity data includes:

[0017] Perform baseline subtraction on the gas response intensity data collected by each sensor in the sensor array, and perform normalization on the gas response intensity data after baseline subtraction.

[0018] Furthermore, train the gas detection module based on sample data. The samples include: ethanol gas with different concentrations, acetone gas with different concentrations, and mixed gas formed by acetone and ethanol with different concentration ratios.

[0019] Furthermore, the process of constructing the samples is specifically as follows:

[0020] By configuring ethanol liquids with different concentrations and then evaporating the ethanol liquids with different concentrations to form ethanol gases with different concentrations; by configuring acetone liquids with different concentrations and then evaporating the acetone liquids with different concentrations to form acetone gases with different concentrations; mixing the ethanol liquids with different concentrations and the acetone liquids with different concentrations, and then evaporating the mixed liquid to form mixed gases with different concentrations of the two.

[0021] Furthermore, for the regression task in the regression sub-network, the mean squared error loss function is used to calculate the loss value, and for the classification task in the classification sub-network, the focal loss function is used to calculate the loss value.

[0022] The present invention constructs a model architecture that shares underlying features through multi-task learning to simultaneously process gas qualitative and quantitative tasks. On the one hand, it reduces data requirements and annotation costs, and through the shared feature extraction layer, it can more efficiently utilize limited data resources; on the other hand, multi-task learning realizes collaborative optimization between tasks, enabling the model to simultaneously learn the species features and concentration features of gases, thereby improving the overall performance; in addition, this integrated model architecture also enhances the generalization ability of the model, enabling it to more accurately perform qualitative and quantitative analysis when facing complex environments and unknown gases, bringing new breakthroughs to the field of gas detection. Description of the Drawings

[0023] Figure 1 It is a flowchart of the method for detecting acetone gas in the mixed gas provided by the embodiment of the present invention;

[0024] Figure 2 It is a schematic structural diagram of the gas detection model provided by the embodiment of the present invention;

[0025] Figure 3 It is a response curve diagram of the sensor array provided by the embodiment of the present invention. Among them, (a) is the response curve of each sensor in the sensor array, and (b) is a segmented schematic diagram of a single response curve;

[0026] Figure 4 It is a performance analysis diagram of the gas prediction model provided by the embodiment of the present invention. Among them, (a) is the relationship curve between the number of training times and the model accuracy, (b) is the relationship curve between the number of training times and the total loss, (c) is the relationship curve between the number of ethanol samples and the concentration prediction, and (d) is the relationship curve between the number of acetone samples and the concentration prediction;

[0027] Figure 5 It is a confusion matrix when using the response intensity data in different stages provided by the embodiment of the present invention. Among them, (a) is the stable stage and (b) is the response stage;

[0028] Figure 6 The result of optimizing the sensor array provided by the embodiment of the present invention, where (a) is a schematic diagram of the influence of the number of sensors in the multi-task model (MTL-GRUA) on the accuracy rate and R 2 value, and (b) is a schematic diagram of the influence of the number of sensors in the single-task model (GRUA-C and GRUA-A) on the accuracy rate and R 2 value. Embodiment

[0030] Next, with reference to the accompanying drawings, through the description of the embodiments, the specific embodiments of the present invention will be further described in detail to help those skilled in the art have a more complete, accurate and in-depth understanding of the inventive concept and technical solution of the present invention.

[0031] Figure 1 The flowchart of the acetone gas detection method in the mixed gas provided by the embodiment of the present invention is as follows:

[0032] Step (1): Periodically collect the response intensity data of the gas to be measured through the sensor array, and preprocess the response intensity data;

[0033] In the embodiment of the present invention, a sensor array is composed of different types of sensors. Each response of each sensor in the sensor array is divided into three stages, namely the response stage, the stable stage and the recovery stage. The response stage is the stage from when the measured gas contacts the sensor until the response intensity reaches the maximum change amount (such as 90% or the specified change amount). The stable stage is the stage where the response intensity changes little and can reflect the relative concentration of the gas. The recovery stage is the stage from the maximum change amount of the response intensity decreasing to or approaching the initial response intensity. In order to reduce the influence of baseline drift, the gas response intensity data collected by each sensor in the sensor array is processed by subtracting the baseline, and its expression is as follows:

[0034] S baseline = S raw - S fit ;

[0035] Wherein, S baseline is the gas response intensity data after subtracting the baseline value, S raw is the gas response intensity data collected by the sensor, and S fit is the fitted baseline value of the corresponding sensor, which is obtained by linearly fitting the initial value of each gas response.

[0036] Normalize the gas response intensity data after subtracting the baseline, and normalize the data to the interval [0,1]. The expression is as follows:

[0037]

[0038] Among them, s i represents the i-th sampling data point of each sensor within the sampling period. Min(s i ) and Max(s i ) represent the minimum and maximum values of the sampling data of each sensor within the sampling period, and s i ′ represents the data point after normalization.

[0039] In step (2), the response intensity data in the response stage or the stable stage is extracted and input into the gas detection module. The gas detection model performs qualitative and quantitative detection on acetone gas in the gas to be detected.

[0040] Figure 2 FIG. is a schematic structural diagram of the gas detection model provided by an embodiment of the present invention. The gas detection module includes: a shared layer, a feature enhancement module, and a feature processing module connected in sequence, a classification sub-network and a regression sub-network respectively connected to the feature processing module. Among them, the shared layer is used to extract the temporal features of the gas response intensity data, the feature enhancement module is used to strengthen the temporal features extracted in the shared layer, the feature processing module is used to further strengthen the temporal features of the feature enhancement module, the classification sub-network is used to detect whether there is acetone gas in the gas to be detected, and the regression sub-network is used to detect the concentration of acetone gas in the gas to be detected.

[0041] In the embodiment of the present invention, the shared layer is composed of two layers of GRUs, and each layer of GRU has 32 hidden layers, which are used to initially learn the temporal features of the data. The temporal features extracted by the shared layer provide basic data for the subsequent feature enhancement module. Through the feature representation of the shared layer, the model can more efficiently utilize the temporal data of acetone and ethanol, enhance the generalization ability, reduce overfitting, and thus lay a solid foundation for the further processing of the feature enhancement module.

[0042] The feature enhancement module includes an SE layer and a self-attention mechanism. Among them, the SE layer consists of an average pooling layer, a fully connected layer, a ReLU activation function, a fully connected layer, and a Sigmoid activation function connected in sequence. Among them, the average pooling layer compresses the input data (T×D) to (1×D), then reduces the dimension to (1×C) through the fully connected layer and the ReLU activation function, and then expands it to (1×D) through the fully connected layer and the Sigmoid activation function. The expanded feature vector is divided into query Q, key K, and value V. The attention weights are calculated by the dot product of query Q and key K, and the value V is weighted and summed with the attention weights to output a temporal enhancement feature with a dimension of T×D. Each feature (or time step) in the time series data is compressed into a single value through global average pooling, so as to obtain the global information of the entire sequence. The importance weights of each feature (or time step) are learned through the fully connected layer and the activation function, and the learned weights are applied to the original features (or time steps) through scaling to enhance important features and suppress unimportant features. The SE layer enables the model to adaptively adjust the weights of different features, while the self-attention mechanism allows the model to dynamically focus on the key features of different time steps according to the correlations in the input sequence. These functions enable the model to better capture long-term dependencies and fine-grained temporal information when processing complex time series data, thus optimizing the expression of temporal features, making them more discriminative, and being able to provide more accurate and robust inputs for classification and regression tasks.

[0043] In the embodiment of the present invention, the feature processing module consists of a fully connected layer, a batch normalization layer, and a ReLU activation function. The feature transformation is performed through the fully connected layer, the batch normalization accelerates the training and improves the stability, and the ReLU introduces nonlinearity to jointly enhance the learning and generalization capabilities of the model.

[0044] In the embodiment of the present invention, the classification sub-network and the regression sub-network have the same network architecture, including: a fully connected layer, a batch normalization layer, regularization (Dropout layer), and a ReLU activation function. By adopting a hard sharing strategy, the classification sub-network and the regression sub-network can jointly learn the underlying feature representations on the basis of sharing the same architecture. This sharing not only improves the training efficiency, but also promotes the knowledge transfer between the two tasks and reduces the risk of overfitting. The hard sharing architecture enables the model to better utilize the similarities between the two tasks, thereby improving the overall performance. Especially when the data is insufficient, the generalization ability can be improved by means of the shared feature representations.

[0045] The gas detection module uses a multi-task learning (MTL) framework to optimize the performance of acetone gas detection. The shared layer and the feature enhancement module improve the representation ability of gas signals, while the hard sharing strategy enables the model to simultaneously process classification and regression tasks, reducing the model complexity and enhancing the detection accuracy and robustness. Especially in the detection of acetone gas, it can significantly improve the accuracy and response speed.

[0046] The present invention provides a rapid detection method for acetone gas in mixed gases based on a multi-task learning framework, which preprocesses the original sensor data by baseline subtraction and normalization. The multi-task learning idea is combined with GRU, and the SE layer and the self-attention mechanism are introduced as the feature enhancement module, thereby building a gas detection model (also known as the MTL-GRUA model) to simultaneously perform the tasks of qualitative identification and quantitative analysis of acetone and ethanol in the gas to be detected. Through the multi-task learning characteristics, the purpose of rapid gas detection and sensor array optimization is achieved.

[0047] The experimental process is as follows: The CGS-8 intelligent gas sensing analysis system provided by Beijing Elite Technology Co., Ltd. is used for data collection. Before the gas sensing experiment, the position, type, and optimal working current of the sensor should be considered first. During the process of establishing the sensor array, due to the cross-sensitivity characteristics of different sensors, data collection will also cause mutual interference. Therefore, it is necessary to design appropriate sensor combinations and determine the optimal working current through multiple groups of experiments. The present invention screened 8 commercial semiconductor metal oxide sensors and used them to form a sensor array. According to the content of the sensor manuals of different types, the optimal working current is adjusted to make the sensor response stable. Among them, TGS822, TGS2602, TGS2620, and TGS2620-C00 are produced by Figaro Company, and WSP2110 and MQ3 are produced by Winsen Company. The sensor models and the optimal working currents of the sensors are shown in Table 1.

[0048] Table 1 Sensor models, target gases, detection ranges, and optimal working currents

[0049]

[0050] After setting the heating current, the sensor starts to preheat for 1 hour. After the baseline stabilizes, a flat-tip sampler is used to collect organic solvents of different volumes. Turn on the switches of the liquid evaporator and the fan, and the fan is used to accelerate the uniform diffusion of the gas. Wait for 3 to 5 minutes until the sensor response intensity reaches the stable range. Open the gas chamber and flush with air until the sensor response intensity returns to the baseline level. In a single experiment, the concentration of each gas is set in the range of 1 to 30 ppm, and the original resistance and response intensity values, as well as the response and recovery curves, are automatically recorded in a file. During the experiment, all gas tests are carried out at one atmosphere, with a relative humidity of (50±10)%, an ambient temperature of (26±2)°C, a sampling interval of 0.1 second, and the sensor response intensity is defined as R a / R g , where R a and R g are the output resistance values of the sensor in air and the target gas, respectively.

[0051] In the experiment, the static gas distribution method is used. A flat-tip sampler is used to extract 95% anhydrous ethanol and 98% acetone respectively, and the extraction range is 10 uL. Since high-purity anhydrous ethanol and acetone are used directly, according to the following formula, the extracted liquid volume will be very small, making it difficult to control and inject into the evaporating dish. Therefore, ethanol and acetone diluted to 10% concentration are used during the experiment. The gas concentration calculation formula is as follows:

[0052]

[0053] where Q is the volume of the liquid to be measured (mL), V is the volume of the gas chamber (mL), C is the concentration of the gas to be prepared (ppm), M is the molecular weight of the substance (g / mol), d is the concentration of the liquid to be measured (%), r is the liquid density (g / mL), T R is the laboratory ambient temperature (°C), and T B is the gas chamber temperature (°C).

[0054] The static gas distribution method is used to construct sample data, and the gas detection model is trained based on the sample data. The samples mainly include ethanol gas of different concentrations, acetone gas of different concentrations, and mixed gases formed by acetone and ethanol with different concentration ratios. Since the chemical properties of ethanol are very similar to those of acetone, ethanol gas is used as the interfering gas, and both single gases and mixed gases are used as training samples to improve the recognition accuracy of acetone. The specific process of sample construction is as follows:

[0055] (1) By configuring ethanol liquids with different concentrations and then evaporating the ethanol liquids with different concentrations, ethanol gases with different concentrations are formed; (2) By configuring acetone liquids with different concentrations and then evaporating the acetone liquids with different concentrations, acetone gases with different concentrations are formed; (3) Ethanol liquids with different concentrations and acetone liquids with different concentrations are mixed and then evaporated to form a mixed gas of the two.

[0056] Loss functions play a crucial role in multi-task processing strategies. They determine the overall impact of different tasks on the model training process and allocate appropriate attention to each task. In addition, they also improve the learning efficiency of tasks and reduce the interference of data noise. In the present invention, the focal loss function is used for the classification task in the classification sub-network, while the mean squared error (MSE) loss function is used for the regression task in the regression sub-network.

[0057] The focal loss function L 1 is defined as follows: FL(p t ) = -α t (1 - p t ) γ log(p t ), where p t is the predicted probability of the true class, α t is the weight factor used to handle class imbalance, and γ is a tuning parameter used to reduce the weight of easily classified samples. The mean squared error loss function L 2 is defined as follows: where y i is the true value, i.e., the value in the sample label, is the predicted value, and n is the number of samples. The total loss function L: L = αL 1 + βL 2 , L 1 is the loss function for the gas classification task, L 2 is the loss function for the concentration prediction task, and α, β are the weight factors for the two tasks.

[0058] After building the gas detection model, the PSO method is used to automatically find the optimal hyperparameters. The hyperparameter search results are shown in Table 2:

[0059] Table 2 Hyperparameter Search Results

[0060]

[0061] Figure 3(a) is the response curve graph of the sensor array provided by the embodiment of the present invention. It shows the gas response process from 1 ppm to 30 ppm. Considering the performance degradation of the sensor due to long-term heating, the concentration gradient was strengthened in the subsequent three experiments to obtain a more obvious response curve. During the single gas experiment of this work, the entire response curve was divided into three stages: the response stage, the stable stage, and the recovery stage, as Figure 3 (b) shows. Part a is defined as the response stage, which refers to the stage from when the sensor contacts the target gas to when its detected value (such as resistance, current, etc.) reaches 90% of the stable value. Part b is defined as the stable stage, following the response stage. When the sensor response reaches a relatively stable state, the reading value can be considered as an accurate and effective gas concentration measurement value. The recovery stage refers to the stage from when the detected gas is removed from the gas chamber until the reading value of the sensor response returns to the value in the air or reaches a certain low percentage of the stable value, corresponding to part c.

[0062] Figure 4 is the qualitative and quantitative experimental result graph of ethanol, acetone, and their binary mixed gas provided by the embodiment of the present invention. In Figure 4 (a), it can be seen that after only 10 iterations, the training accuracy and validation accuracy rapidly increase and stabilize above 0.98, indicating that the model performs well on both the training set and the validation set, and there is no obvious overfitting phenomenon; Figure 4 (b) further shows that as the number of training rounds increases, the training loss and validation loss continuously decrease and stabilize below 0.05 after 20 iterations. Finally, the training loss stabilizes at 0.045 and the validation loss stabilizes at 0.048, which further confirms the robustness and effectiveness of the model. Figure 4 (c) and 4(d) show the performance of the MTL-GRUA model in predicting the concentrations of two target gases (ethanol C 2 H 5 OH and acetone CH 3 COCH 3 ). In these figures, the horizontal axis represents the number of samples, and the vertical axis represents the gas concentration value. The predicted values of the model are very close to the actual values, showing a high degree of consistency. For ethanol C 2 H 5 OH, the predicted values of the model almost completely coincide with the actual values in most samples, indicating that the prediction accuracy of the model is extremely high. Similarly, for acetone CH 3 COCH 3, the model accurately tracked the changes in the actual values across the entire sample range, further confirming its effectiveness and robustness in the gas concentration prediction task. This experiment used the dataset from part b (stable phase). The experimental samples included data from eight gas sensors at different concentrations from 1 to 30 ppm. 40 sample points were randomly selected from each group of ethanol and acetone, and 60 sample points were randomly selected from each group of gas mixtures to form a dataset of 1680×8. It was divided into a training set, a validation set, and a test set in the ratio of 6:3:1. The present invention uses accuracy, model loss, coefficient of determination R 2 and root mean square error RMSE as evaluation metrics.

[0063] Accuracy represents the percentage of correctly predicted samples, specifically as follows:

[0064]

[0065] Among them, Accuracy represents accuracy; TP represents true positive cases, that is, the number of positive samples correctly classified by the classifier; TN represents true negative cases, that is, the number of negative samples correctly classified by the classifier; FP represents false positive cases, that is, the number of negative samples misclassified as positive samples by the classifier; FN represents false negative cases, that is, the number of positive samples misclassified as negative samples by the classifier.

[0066] R 2 represents the proportion of variance explained by the model, usually ranging from 0 to 1, and the value closer to 1 indicates a better fit, specifically as follows:

[0067]

[0068] Among them, R 2 is a value between 0 and 1, used to measure the goodness of fit of the model to the data; y i is the i-th actual observation value; is the i-th predicted value, is the average of all actual observation values.

[0069] RMSE is a measure of the accuracy of the model prediction, representing the average difference between the predicted value and the actual value, specifically as follows:

[0070]

[0071] Among them, RMSE is the standard deviation of the prediction error, used to measure the average difference between the predicted value and the actual value; y i is the i-th actual observation value, is the i-th predicted value.

[0072] Figure 5(a) and (b) are the confusion matrices when using the gas response intensity data in the stable stage and the response stage respectively. There is almost no difference in the classification accuracy results of the MTL-GRUA model (gas detection model), and misclassification occurs only once in both parts of the data, indicating that the model has an extremely low false positive rate. In the rapid detection experiment, the data randomly selected from part a (response stage) was used as the main data set, which contains various information about the concentration change. In this way, the change in gas concentration can be detected faster while maintaining good classification and regression performance.

[0073] Figure 6 The experimental result graph of the sensor array optimization of the mixed gas provided by the embodiment of the present invention reveals the performance of different models when the number of sensors changes. As Figure 6 (a) shows, the multi-task model (MTL-GRUA) can still maintain relatively stable accuracy and R 2 value when the number of sensors decreases, showing strong robustness. In contrast, as Figure 6 (b) shows, the classification accuracy and regression performance of the single-task models (GRUA-C and GRUA-A) both decrease when the number of sensors decreases. It is worth noting that even when the number of sensors decreases significantly, the performance of the MTL-GRUA model does not deteriorate significantly until the number of sensors decreases from eight to two. This phenomenon highlights the crucial importance of balancing the number of sensors and performance in the sensor array design. In the sensor array optimization experiment, the present invention adopted the method of gradually randomly reducing the number of sensors in the array to evaluate the performance of the model. At the beginning of the experiment, the data of eight gas sensors were collected to form a complete data set. Subsequently, one sensor was randomly reduced each time, creating seven different data sets. Specifically, the data of seven sensors were used in the second experiment, the data of six sensors were used in the third experiment, and so on, until only the data of a single sensor was used in the last experiment. The evaluation metrics of the model were recorded and analyzed at each step of the reduction process to determine the impact of reducing the number of sensors on the model performance. The present invention compared the performance of the multi-task learning framework with that of separate classification and regression models, and verified its feasibility in the sensor array optimization.

[0074] The present invention has been described by way of example. Obviously, the specific implementation of the present invention is not limited by the above methods. As long as various non-substantive improvements are made by adopting the method concept and technical solution of the present invention, or the concept and technical solution of the present invention are directly applied to other occasions without improvement, they are all within the protection scope of the present invention.

Claims

1. A method for detecting acetone gas in a mixed gas, characterized in that: The method is specifically as follows: Step (1) periodically collecting response intensity data of the gas to be tested through a sensor array and preprocessing the response intensity data; Step (2) extracts the response intensity data in the response phase or the stable phase and inputs it into a gas detection model. The gas detection model performs qualitative and quantitative detection on the acetone gas in the gas to be detected.

2. The method for detecting acetone gas in a mixed gas according to claim 1, characterized in that: The gas detection model includes: a shared layer, a feature enhancement module and a feature processing module connected in sequence, and a classification sub-network and a regression sub-network connected to the feature processing module respectively, wherein the shared layer is used to extract the time series characteristics of the gas response intensity data, the feature enhancement module is used to strengthen the time series characteristics extracted in the shared layer, the feature processing module is used to further strengthen the time series characteristics of the feature enhancement module, the classification sub-network is used to detect whether there is acetone gas in the gas to be tested, and the regression sub-network is used to detect the concentration of acetone gas in the gas to be tested.

3. The method for detecting acetone gas in a mixed gas according to claim 2, characterized in that: The shared layer consists of two layers of GRU.

4. The method for detecting acetone gas in a mixed gas according to claim 2, characterized in that: The feature enhancement module includes an SE layer and a self-attention mechanism, wherein the SE layer is composed of an average pooling layer, a fully connected layer, a ReLU activation function, a fully connected layer, and a Sigmoid activation function connected in sequence. The average pooling layer compresses the input data, and then reduces the dimension through the fully connected layer and the ReLU activation function, and then expands it through the fully connected layer and the Sigmoid activation function. The self-attention mechanism divides the expanded feature vector into query Q, key K, and value V. The attention weight is calculated by the dot product of the query Q and the key K, and the value V is weighted summed with the attention weight to output the temporal enhancement feature.

5. The method for detecting acetone gas in a mixed gas according to claim 2, characterized in that: The feature processing module consists of a fully connected layer, a batch normalization layer, and a ReLU activation function.

6. The method for detecting acetone gas in a mixed gas according to claim 2, characterized in that: The classification subnetwork and the regression subnetwork have the same network architecture, including: fully connected layer, batch normalization layer, Dropout layer, and ReLU activation function.

7. The method for detecting acetone gas in a mixed gas according to claim 1, characterized in that: The preprocessing process of gas response intensity data includes: Baseline subtraction processing is performed on the gas response intensity data collected by each sensor in the sensor array, and normalization processing is performed on the gas response intensity data after the baseline subtraction processing.

8. The method for detecting acetone gas in a mixed gas according to claim 1, characterized in that: The gas detection module is trained based on sample data, which includes: ethanol gas of different concentrations, acetone gas of different concentrations, and mixed gas formed by acetone and ethanol of different concentration ratios.

9. The method for detecting acetone gas in a mixed gas according to claim 8, characterized in that: The sample construction process is as follows: Ethanol liquids of different concentrations are prepared and then evaporated to form ethanol gases of different concentrations; acetone liquids of different concentrations are prepared and then evaporated to form acetone gases of different concentrations; ethanol liquids of different concentrations are mixed with acetone liquids of different concentrations and then evaporated to form mixed gases of the two liquids of different concentrations.

10. The method for detecting acetone gas in a mixed gas according to claim 8, characterized in that: For the regression task in the regression subnetwork, the mean square error loss function is used to calculate the loss value, and for the classification task in the classification subnetwork, the focus loss function is used to calculate the loss value.

Citation Information

Cited By

  • Method for rapidly detecting concentration of mixed gas based on Mamba

    CN120685851A