Gas detection model training method, detection method, device and vehicle

By constructing a combined model of convolutional neural networks, recurrent neural networks, and fully connected linear regression networks, the problem of insufficient accuracy and stability in gas detection in existing technologies is solved, enabling real-time and accurate monitoring and control of gas composition in space, and improving user experience.

CN122330356APending Publication Date: 2026-07-03GUANGZHOU AUTOMOBILE GROUP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510005700.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-02
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

Existing gas detection methods are insufficient in terms of accuracy, stability, and real-time performance, making it difficult to meet the real-time monitoring needs of air quality in space, especially for key gases such as volatile organic compounds, where the monitoring accuracy needs to be improved.

Method used

A combined model of convolutional neural network, recurrent neural network and fully connected linear regression network is used to acquire time-series data and actual values ​​of gas detection values ​​through sensors, construct a gas detection model, perform end-to-end training, optimize the detection model to improve accuracy and stability, and achieve real-time detection through sensor array and data acquisition board.

Benefits of technology

It improves the accuracy and stability of gas detection, enhances the robustness and versatility of the model, maintains stability in different environments, realizes real-time monitoring and instant information feedback of multiple gases, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122330356A_ABST
    Figure CN122330356A_ABST
Patent Text Reader

Abstract

This application relates to the field of vehicle technology, and particularly to a gas detection model training method, detection method, device, and vehicle. The method includes: acquiring a training dataset, which includes time-series data of detected gas values ​​and actual gas composition values ​​within a space; constructing a gas detection model for the space, wherein the detection model includes a convolutional neural network, a recurrent neural network, and a fully connected linear regression network; the convolutional neural network extracts feature vectors from the time-series data; the recurrent neural network filters the feature vectors; and the fully connected linear regression network outputs predicted gas composition values ​​based on the filtered feature vectors; and an optimized detection model is obtained based on the actual and predicted gas composition values. This solves the problems of low accuracy and stability, slow detection speed, poor real-time performance, and poor applicability in related technologies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of gas detection technology, and in particular to a gas detection model training method, detection method, device and vehicle. Background Technology

[0002] Monitoring and controlling indoor air quality has become a field of great interest, such as in-vehicle air quality monitoring. As people's demand for health and comfort continues to increase, so too is the focus on indoor air quality. Currently, while some spaces are equipped with air purification systems, real-time monitoring and precise control of key gas molecules within these spaces remain challenging.

[0003] In related technologies, gas detection methods typically employ chemical analysis, spectroscopy, and other methods. These methods involve collecting gas samples and conducting laboratory analysis to determine the concentration of various gaseous components. While these methods demonstrate excellent accuracy and precision, they suffer from drawbacks such as inconvenient sampling and slow detection speeds, making them unsuitable for real-time indoor air quality monitoring. Additionally, some miniaturized gas analysis instruments have been applied to indoor air quality monitoring. Although these instruments are small and portable, there is still room for improvement in terms of accuracy and stability. Summary of the Invention

[0004] This application provides a gas detection model training method, a gas detection method, a gas detection device, a vehicle, a storage medium, and a program product to solve the problems of poor gas detection accuracy and stability, slow detection speed, poor real-time performance, and poor applicability in related technologies.

[0005] The first aspect of this application provides a method for training a gas detection model, comprising the following steps: obtaining a training dataset, wherein the training dataset includes time-series data of gas detection values ​​in space and actual values ​​of gas composition; constructing a gas detection model in space, wherein the detection model includes a convolutional neural network, a recurrent neural network, and a fully connected linear regression network, wherein the convolutional neural network extracts feature vectors from the time-series data, the recurrent neural network filters the feature vectors, and the fully connected linear regression network outputs predicted values ​​of gas composition based on the filtered feature vectors; and obtaining an optimized detection model based on the actual values ​​and predicted values ​​of gas composition.

[0006] Optionally, the training dataset is obtained by: acquiring sample data of gas detection values ​​in the space through sensors; determining a reference gas reaction curve for the gas in the space based on the sample data, and obtaining the actual values ​​of gas components corresponding to the reference gas reaction curve; generating time-series data of gas detection values ​​in the space based on the reference gas reaction curve, and generating the training dataset based on the time-series data and the actual values ​​of gas components.

[0007] Optionally, the sample data of the gas detection value in the space is obtained through the sensor, including: acquiring the collection data of the gas detection value in the space through the sensor; calculating the delivery time of the gas in the space to the sensor; correcting the collection data according to the delivery time; and generating sample data according to the corrected data.

[0008] Optionally, the collected data can be corrected based on the delivery duration, including removing data corresponding to the delivery duration from the collected data.

[0009] Optionally, generating sample data based on the corrected data includes: normalizing the detection values ​​in the corrected data; and generating sample data based on the normalized detection values.

[0010] Optionally, generating sample data based on the normalized detection values ​​includes: generating an initial gas reaction curve based on the normalized detection values; performing differential processing on the initial gas reaction curve, and determining a selection threshold based on the differentially processed curve; selecting a reference gas reaction curve from the initial gas reaction curve based on the selection threshold, and generating sample data based on the reference gas reaction curve.

[0011] Optionally, the selection threshold is determined based on the curve after differentiation, including: identifying the vertices and valleys of the curve after differentiation; and using the data corresponding to the vertices and valleys as the selection threshold.

[0012] Optionally, identifying the vertices and valleys of the curve after differential processing includes: obtaining a target window of the curve after differential processing; performing a sliding window translation on the curve after differential processing according to the target window; and determining the vertices and valleys of the curve based on the result of the sliding window translation.

[0013] A second aspect of this application provides a gas detection method, comprising the following steps: acquiring current data of gas detection values ​​in a space through a sensor; generating a current gas reaction curve of the gas in the space based on the current data; inputting the current gas reaction curve into a gas detection model of the gas in the space, and the detection model outputting the gas composition detection result of the gas in the space, wherein the detection model includes a convolutional neural network, a recurrent neural network, and a fully connected linear regression network, the convolutional neural network extracting feature vectors of the current gas reaction curve, the recurrent neural network filtering feature vectors, and the fully connected linear regression network outputting the gas composition detection result based on the filtered feature vectors.

[0014] Optionally, generating a current gas response curve for the gas in the space based on the current data includes: calculating the delivery time of the gas in the space to the sensor; correcting the current data based on the delivery time; and generating a current gas response curve for the gas in the space based on the corrected data.

[0015] A third aspect of this application provides a gas detection device, comprising: a reaction chamber, wherein a sensor array and a data acquisition board are disposed within the reaction chamber; a gas pumping assembly for pumping gas from a space into the reaction chamber, wherein the sensor array reacts with the gas in the space, and the data acquisition board acquires the detection value of the gas in the space; and a vehicle controller for generating a gas composition detection result based on the detection value of the gas in the space, wherein the vehicle controller is provided with a gas detection model for the gas in the space, wherein the detection model includes a convolutional neural network, a recurrent neural network, and a fully connected linear regression network, wherein the convolutional neural network extracts the feature vector of the current gas reaction curve, the recurrent neural network filters the feature vector, and the fully connected linear regression network outputs the gas composition detection result based on the filtered feature vector.

[0016] Optionally, the reaction chamber is a sealed container.

[0017] Optionally, the gas pumping assembly includes a gas sampling pump, multiple valves, and delivery piping.

[0018] A fourth aspect of this application provides a vehicle including a gas detection device as described in the above embodiments.

[0019] A fifth aspect of this application provides a computer-readable storage medium having a computer program stored thereon, which is executed by a processor to perform the gas detection model training method, or the gas detection method, as described in the above embodiments.

[0020] A sixth aspect of this application provides a computer program product, including a computer program or instructions, characterized in that, when the computer program or instructions are executed, they implement the gas detection model training method or the gas detection method as described in the above embodiments.

[0021] Therefore, this application has at least the following beneficial effects:

[0022] (1) In this embodiment, a training dataset can be generated by acquiring time-series data of gas detection values ​​and actual gas composition values ​​in space through sensors. The time-series data is input into the detection model to obtain gas composition prediction values. Based on the actual and predicted gas composition values, an optimized detection model is obtained, thereby improving the accuracy of model detection. The detection model includes a convolutional neural network, a recurrent neural network, and a fully connected linear regression network. The convolutional neural network extracts feature vectors from the time-series data, the recurrent neural network filters feature vectors, and the fully connected linear regression network outputs gas composition prediction values ​​based on the filtered feature vectors. The entire model is trained end-to-end, which makes the detection model results more accurate. The multi-layer network structure improves the model's resistance to noise and interference, enabling it to maintain stable performance under different environmental conditions. It is robust and can adapt to different types of gas, enhancing the model's versatility and scalability.

[0023] (2) In this embodiment, the current data of the gas detection value in the space can be obtained by the sensor, and the current gas reaction curve of the gas in the space can be generated according to the current data. The current gas reaction curve is input into the gas detection model to obtain the gas composition detection result. The detection model includes a convolutional neural network, a recurrent neural network, and a fully connected linear regression network. The convolutional neural network extracts the feature vector of the current gas reaction curve, the recurrent neural network filters the feature vector, and the fully connected linear regression network outputs the gas composition detection result based on the filtered feature vector. This enables the key patterns and features in the gas detection curve to be fully identified in practical applications, improves the generalization ability of the model, and makes the detection model more efficient in processing data and more real-time, thereby saving a lot of time and resources.

[0024] (3) The gas detection device of this application embodiment can monitor multiple gases simultaneously by setting multiple different types of sensors in the reaction chamber, which improves the detection range and sensitivity of the system. The sensor array reacts to the gas and generates detailed detection curves, which helps to capture more subtle changes and improve detection accuracy. The data acquisition board collects the detection values ​​of the gas in the space and transmits these data to the vehicle controller for processing. The vehicle controller uses the detection model to output the gas composition detection results, thereby providing real-time gas composition detection results in a short time, providing instant information feedback to the driver and personnel, and improving the user experience.

[0025] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description

[0026] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:

[0027] Figure 1 This is a flowchart of a gas detection model training method provided according to an embodiment of this application;

[0028] Figure 2 This is a schematic diagram of a gas detection curve provided according to an embodiment of this application;

[0029] Figure 3 This is an overall framework diagram of the detection model provided according to the embodiments of this application;

[0030] Figure 4 This is a diagram illustrating the convolution operation process for mixed gas detection according to an embodiment of this application.

[0031] Figure 5This is a diagram of a many-to-many RNN (Recurrent Neural Network) structure provided according to an embodiment of this application.

[0032] Figure 6 This is a flowchart of a gas detection method provided according to an embodiment of this application;

[0033] Figure 7 This is a block diagram of a gas detection device provided according to an embodiment of this application;

[0034] Figure 8 This is a gas path design diagram of a mass flow controller for detecting key gas molecules in space, provided according to an embodiment of this application.

[0035] Figure 9 This is a schematic diagram of an interactive graphical interface provided according to an embodiment of this application.

[0036] Explanation of reference numerals in the attached drawings: reaction chamber 100, gas pumping assembly 200, and vehicle controller 300. Detailed Implementation

[0037] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.

[0038] With the continuous development of industry and the improvement of intelligence levels, the monitoring and control of air quality in space has become increasingly important. Currently, gas detection methods typically employ chemical analysis, spectrometry, and miniaturized gas analysis instruments, but several technical challenges remain.

[0039] 1. Accuracy of gas composition monitoring: Current indoor air quality monitoring systems can often only monitor the concentration of common pollutants, such as PM2.5 and formaldehyde. The accuracy of monitoring key gases such as volatile organic compounds (VOCs) needs to be improved.

[0040] 2. Stability of gas flow and reaction: In the space environment, the flow of gas is affected by factors such as vehicle movement and temperature changes, which can easily lead to unstable gas flow, thereby affecting the accuracy and stability of the sensor.

[0041] 3. Sensor selection and applicability: There are many types of sensors on the market, but different sensors have different detection characteristics and sensitivities for different gases. Therefore, it is a challenge to select a suitable sensor and make it suitable for the space environment.

[0042] 4. Real-time Data Acquisition and Processing: In-space air quality monitoring systems need to be able to acquire and process large amounts of gas composition data in real time, and react and control accordingly to ensure the health and comfort of personnel. Therefore, the algorithm and system design for real-time data acquisition and processing is also a crucial technical issue.

[0043] The gas detection device of this application can be installed inside a space to monitor the concentration of key gas molecules, such as volatile organic compounds, carbon monoxide, and carbon dioxide. Changes in the concentration of these key gases may directly affect the health and comfort of drivers and personnel. Therefore, timely and accurate monitoring and control of the concentration of these gases is crucial for ensuring the air quality inside the space. It can ensure stable gas flow and accurate response, as well as the preparation of mixed VOC gas datasets, providing reliable technical support for the research and development and application of air quality monitoring systems in spaces.

[0044] The following description, with reference to the accompanying drawings, describes a gas detection model training method, a gas detection method, a gas detection device, a vehicle, a storage medium, and a program product according to embodiments of this application.

[0045] Specifically, Figure 1 This is a schematic flowchart of a gas detection model training method provided in an embodiment of this application.

[0046] like Figure 1 As shown, the training method for this gas detection model includes the following steps:

[0047] In step S101, a training dataset is obtained, wherein the training dataset includes time-series data of gas detection values ​​in space and actual values ​​of gas composition.

[0048] It is understood that the embodiments of this application can obtain a training dataset in order to subsequently train the detection model using the training dataset.

[0049] It should be noted that the time-series data of gas detection values ​​within a space refers to the sensor's detection results of changes in gas composition within the space at different points in time. It is typically recorded in time series format, reflecting the change of the sensor's output signal over time, and is not specifically limited to any particular space. Space includes vehicle interiors, rooms, etc.

[0050] In this embodiment, obtaining the training dataset includes: acquiring sample data of gas detection values ​​in the space through sensors; determining a reference gas reaction curve for the gas in the space based on the sample data, and obtaining the actual values ​​of gas components corresponding to the reference gas reaction curve; generating time-series data of gas detection values ​​in the space based on the reference gas reaction curve; and generating the training dataset based on the time-series data and the actual values ​​of gas components. Gas component detection includes gas type and concentration.

[0051] It is understood that, in the embodiments of this application, a reference gas response curve for the gas in the space can be determined based on sample data of the gas detection values ​​in the space, time series data of the gas detection values ​​in the space can be generated based on the reference gas response curve, and a training dataset can be generated based on the time series data and the actual values ​​of gas composition, thereby improving the accuracy and stability of the training data, so as to improve the accuracy of the detection model in the future.

[0052] Specifically, when gas comes into contact with the gas sensor array, a dynamic detection curve is generated. This curve accurately reflects the real-time state of the gas, such as... Figure 2 The gas detection curve is shown below. The horizontal axis represents the time point of gas detection, and the vertical axis represents the normalized sensor detection value intensity. The entire detection curve is divided into three stages: First, the baseline stage, where dry air is introduced into the gas reaction chamber through a mass flow controller to purge and eliminate interference from other gases until the detection curve reaches a stable state, then the second stage begins. The second stage is the reaction stage, where the mixed gas enters the gas reaction chamber at a constant flow rate and reacts with the sensor, and the curve gradually stabilizes. Finally, the third stage, the recovery stage, begins. Once the detection curve has stabilized, the mixed gas flow is stopped, and dry air is introduced into the gas reaction chamber again, allowing the curve to return to the baseline state.

[0053] In this embodiment of the application, obtaining sample data of gas detection values ​​in a space through a sensor includes: acquiring collection data of gas detection values ​​in a space through a sensor; calculating the delivery time of gas in the space to the sensor; correcting the collection data based on the delivery time; and generating sample data based on the corrected data.

[0054] It is understood that the embodiments of this application can acquire the detection data of the gas in the space through the sensor; calculate the delivery time of the gas in the space to the sensor; correct the acquired data according to the delivery time; and generate sample data according to the corrected data, thereby improving the accuracy and stability of the sample data and ensuring the quality of the sample data.

[0055] Specifically, during the acquisition of the gas reaction curve, there is a delay between the start of gas introduction and the change in sensor detection value. This is because the gas transport through the pipeline takes a certain amount of time, which causes a delay. Therefore, a delay correction method is adopted here. First, the pipeline transport time is calculated. Where Volme is the pipe volume and flow is the flow rate, and these are then removed as a delay time to obtain the corrected concentration versus detection curve.

[0056] In this embodiment of the application, correcting the collected data based on the transmission duration includes: removing data corresponding to the transmission duration from the collected data.

[0057] It is understood that the embodiments of this application can remove the data corresponding to the transmission time in the collected data, thereby avoiding the impact on the quality of the sample data and improving the accuracy and stability of the data.

[0058] In this embodiment of the application, generating sample data based on the corrected data includes: normalizing the detection values ​​in the corrected data; and generating sample data based on the normalized detection values.

[0059] It is understood that the embodiments of this application can normalize the detection values ​​in the corrected data; generate sample data based on the normalized detection values, and use the normalization method to reduce the variance of the data, avoid overfitting in the subsequent training process, thereby improving the generalization ability of the model.

[0060] Specifically, since the value of its ordinate shows that its detection value is very large, the variance of the detection value distribution will be very large, which will lead to a significant overfitting phenomenon during training. Here, a method similar to relative difference is used to normalize the detection value of the mixed gas, as shown in formula (1):

[0061]

[0062] Among them, C t C max These are the sensor's real-time conductivity and maximum conductivity, respectively, C. re The unit is 1.

[0063] In this embodiment of the application, generating sample data based on the normalized detection values ​​includes: generating an initial gas reaction curve based on the normalized detection values; performing differential processing on the initial gas reaction curve, and determining a selection threshold based on the differentially processed curve; selecting a reference gas reaction curve from the initial gas reaction curve based on the selection threshold, and generating sample data based on the reference gas reaction curve.

[0064] It is understood that, in the embodiments of this application, an initial gas reaction curve can be generated based on the normalized detection value; the initial gas reaction curve is differentiated, and a selection threshold is determined based on the differentiated curve; a reference gas reaction curve is selected from the initial gas reaction curve based on the selection threshold, and sample data is generated based on the reference gas reaction curve. This can highlight the changing trend of the detection curve to select more representative data, thereby improving the accuracy and representativeness of the data.

[0065] It should be noted that, since not every stage of data is suitable as a data sample feature, the information in some stages may be redundant and cannot effectively reflect the curve characteristics of the gas. Therefore, in order to ensure the accuracy and representativeness of the data, the data from the start of the gas reaction to the time when the reaction reaches a steady state are selected as the final gas sample data in this embodiment of the application.

[0066] In this embodiment of the application, determining the selection threshold based on the curve after differential processing includes: identifying the vertices and valleys of the curve after differential processing; and using the data corresponding to the vertices and valleys as the selection threshold.

[0067] It is understood that the embodiments of this application can identify the vertices and valleys of the curve after differential processing; and use the data corresponding to the vertices and valleys as selection thresholds to select more representative data, which helps to improve the accuracy and generalization ability of the model.

[0068] In this embodiment of the application, identifying the vertices and valleys of the curve after differential processing includes: obtaining a target window of the curve after differential processing; performing a sliding window translation on the curve after differential processing according to the target window; and determining the vertices and valleys of the curve based on the result of the sliding window translation.

[0069] It is understood that the embodiments of this application can obtain the target window of the curve after differential processing; perform sliding window translation on the curve after differential processing according to the target window, and determine the vertex and valley of the curve according to the result of sliding window translation, so as to select more representative data, which helps to improve the accuracy and generalization ability of the model.

[0070] It should be noted that this application uses the differential threshold method to determine the reaction curve segment. After taking the differential of the reaction curve, the data point where the differential difference reaches the peak threshold is first found by sliding window translation as the reaction start point. Then, the data point where the differential value reaches the valley threshold is taken as the reaction stop point by sliding window translation. The resulting gas reaction stage curve is the curve segment from the reaction start point to the reaction stop point.

[0071] Specifically, a suitable sliding window size is selected, and starting from the first data point of the differential curve, the sliding window is moved point by point. Within each window, the maximum value of the differential value is found. When the maximum differential value within a certain window reaches or exceeds the vertex threshold, the data point corresponding to that window is the reaction start point. The sliding window continues to move backward from the identified vertex position. Within each window, the minimum value of the differential value is found. When the minimum differential value within a certain window reaches or falls below the valley threshold, the corresponding data point is the reaction stop point.

[0072] In step S102, a gas detection model for the gas in the space is constructed. The detection model includes a convolutional neural network, a recurrent neural network, and a fully connected linear regression network. The convolutional neural network extracts feature vectors from the time-series data, the recurrent neural network filters the feature vectors, and the fully connected linear regression network outputs predicted gas composition values ​​based on the filtered feature vectors.

[0073] It is understood that the embodiments of this application can construct a gas detection model for gases in space. The detection model includes a convolutional neural network, a recurrent neural network, and a fully connected linear regression network. The convolutional neural network extracts feature vectors from time-series data, the recurrent neural network filters feature vectors, and the fully connected linear regression network outputs gas composition prediction values ​​based on the filtered feature vectors. Since the entire model is trained end-to-end, the results of the detection model are more accurate. The multi-layer network structure improves the model's resistance to noise and interference, enabling it to maintain stable performance under different environmental conditions. It is robust, adaptable to different types of gases, and enhances the model's versatility and scalability.

[0074] It should be noted that, as Figure 3 As shown, the detection model mainly consists of three parts: a convolutional neural network (CNN), a recurrent neural network (RNN), and a fully connected linear regression layer. First, the convolutional neural network (CNN) primarily processes the original time-series data x... t The feature extraction stage involves combining and selecting more meaningful high-level features for use in subsequent recurrent neural networks (RNNs) and regression layers. Then, the high-level features output from the convolutional neural network (CNN) are input into the RNN layer. The RNN analyzes these high-level features over time, selecting the most suitable features for temporal prediction. Finally, the selected feature vectors are concatenated into a fully connected layer for linear regression calculation, ultimately yielding the predicted output value y. pre .

[0075] The detection dataset of the mixed gas in the sensor is shown in Equation (2):

[0076] V={(x1,y1),(x2,y2),…,(x T y T (2)

[0077] Where V represents the dataset, (n is the dimension of the input variable), y t ∈{C1, C2} (C1 and C2 are continuous real values), T is the time period; the purpose of real-time prediction of gas composition is to establish x t With y tThe dependency relationship between them, when a new x comes in. t At that time, an output vector y can be predicted. pre x t Indicates time, y t This indicates the detected value of the gas.

[0078] Specifically, (1) Convolutional Neural Network (CNN) part:

[0079] Considering that a recurrent neural network (RNN) will be used for subsequent processing on the time axis, a two-dimensional convolution method is adopted for the detection of multivariate mixed gases. The original multi-sensor data is convolved and transformed into a one-dimensional vector for subsequent RNN processing.

[0080] The input detection sequence A has a dimension of (M, N), where m is the number of sampling points in the time domain and n is the number of sensor arrays; the size of the convolution kernel B is (H, N), and the width of the convolution kernel B is equal to the width of A, so that the result after convolution is a one-dimensional vector. The specific calculation formula (3) is as follows:

[0081]

[0082] In the above formula, 1≤i≤M-H+1, j=1, S is a one-dimensional vector, and S(i,j) represents the result after the i-th convolution; the specific operation process is as follows: Figure 4 As shown, * represents the convolution operation, and D represents the depth of the convolution (the number of convolution kernels).

[0083] This convolutional neural network does not use pooling operations; it is only used to extract instantaneous features in the time domain. After convolution, new temporally continuous features are extracted. In this structure, the result after convolution is nonlinearly transformed using the ReLU function as shown in Equation (4). Then, the vectors extracted from each time step of convolution are concatenated together to provide temporally continuous input for the recurrent neural network (RNN) layer.

[0084] h t =ReLU(W t *X t +b t ) t=1,2,...,T (4)

[0085] In the above formula, h t The output of the convolution is used as the subsequent temporal input feature, W. t X is the convolution kernel for the time period. t These are multivariate detection values ​​in the time domain of the mixed gas.

[0086] (2) Recurrent Neural Network Part:

[0087] like Figure 3 As shown, the Convolutional Neural Network (CNN) concatenates the output features (one-dimensional vectors) of the gas mixture detection after convolution to form temporally continuous features, and then directly inputs these concatenated features into the Recurrent Neural Network (RNN). In practical applications, the two most effective sequence models of the Recurrent Neural Network (RNN) are Long Short-Term Memory and Gated Recurrent Unit.

[0088] This application uses Long Short-Term Memory (LSTM) as the processing unit of the Recurrent Neural Network (RNN). Structurally, the Gated Recurrent Unit (GRU) is simpler than LSTM, but in later experiments, due to the larger dataset, LSTM showed better expressive performance, as verified by subsequent comparative experiments. LSTM introduces three gates: an input gate, a forget gate, and an output gate, along with memory cells identical to those in the hidden state. The specific calculation formulas (5), (6), (7), (8), (9), and (10) are as follows:

[0089] I t =σ(X) t W xi +H t-1 W hi +b i (5)

[0090] F t =σ(X) t W xf +H t-1 W hf +b f (6)

[0091] O t =σ(X) t W xo +H t-1 W ho +b o (7)

[0092]

[0093]

[0094] H t =O t ⊙tanh(C t (10)

[0095] In the formula, the small batch input at time step t (where n is the number of input samples and d is the number of input vectors) This is the hidden state at the previous time step t. These represent the input gate, forget gate, and output gate at time step t, respectively. σ is the sigmoid activation function, tanh(x) is the activation function for candidate memory cells, and ⊙ represents element-wise multiplication. The recurrent neural network (RNN) uses a many-to-many form as follows: Figure 5 As shown, each time step has a corresponding output (hidden state), which provides the input vector for the final fully connected linear regression layer.

[0096] (3) Fully connected linear regression layer:

[0097] The real-time hidden state output from the recurrent neural network (RNN) eventually enters a fully connected linear regression layer, which unfolds the hidden state at each time step into a fully connected structure. The output value at each time step is predicted by calculating the linear regression value, as shown in formula (11), where y t The predicted outputs for different times are as follows: These are the weight parameters for the fully connected layer.

[0098]

[0099] In step S103, an optimized detection model is obtained based on the actual and predicted values ​​of the gas composition.

[0100] It is understood that the embodiments of this application can obtain an optimized detection model based on the actual and predicted values ​​of gas composition, thereby improving the accuracy of the detection model.

[0101] According to the gas detection model training method proposed in this application, a training dataset is generated by acquiring time-series data of gas detection values ​​and actual gas composition values ​​in space through sensors. The time-series data is then input into the detection model to obtain gas composition prediction values. Based on the actual and predicted gas composition values, an optimized detection model is obtained, thereby improving the accuracy of model detection. The detection model includes a convolutional neural network, a recurrent neural network, and a fully connected linear regression network. The convolutional neural network extracts feature vectors from the time-series data, the recurrent neural network filters feature vectors, and the fully connected linear regression network outputs gas composition prediction values ​​based on the filtered feature vectors. The entire model is trained end-to-end, which makes the detection model results more accurate. The multi-layer network structure improves the model's resistance to noise and interference, enabling it to maintain stable performance under different environmental conditions. It is robust, adaptable to different gas types, and enhances the model's versatility and scalability.

[0102] It should be noted that the gas detection model training method in the previous embodiment was from the perspective of training dataset generation, i.e., offline processing, which involved filtering and correcting the gas response curves of the gas in the space generated from historical sampling data. In contrast, the gas detection method is applied in the online application stage, correcting the data sampled at the current moment to generate the current gas response curve of the gas in the space, thereby improving the accuracy and stability of the data and thus improving the accuracy of the model output. Any details not elaborated between the embodiments can be found in the relevant references, which will be discussed below in conjunction with the appendix. Figure 6 The gas detection methods are described in detail below:

[0103] Figure 6 This is a schematic flowchart of the gas detection method provided in the embodiments of this application.

[0104] like Figure 6 As shown, the gas detection method includes the following steps:

[0105] In step S201, the current data of the gas detection value in the space is obtained by the sensor.

[0106] It is understood that the embodiments of this application can obtain the current data of the gas detection value in the space through the sensor, so as to generate the current gas reaction curve of the gas in the space based on the current data.

[0107] In step S202, the current gas reaction curve of the gas in the space is generated based on the current data.

[0108] It is understood that the embodiments of this application can generate the current gas reaction curve of the gas in the space based on the current data, so that the current gas reaction curve can be input into the gas detection model of the gas in the space, and the detection model can output the gas composition detection results of the gas in the space.

[0109] In this embodiment of the application, generating the current gas response curve of the gas in the space based on the current data includes: calculating the delivery time of the gas in the space to the sensor; correcting the current data based on the delivery time; and generating the current gas response curve of the gas in the space based on the corrected data.

[0110] It is understood that the embodiments of this application can calculate the delivery time of gas in the space to the sensor; correct the current data according to the delivery time; and generate the current gas response curve of the gas in the space according to the corrected data, so that the key patterns and features in the gas detection curve can be fully identified in practical applications, thereby improving the generalization ability of the model.

[0111] In step S203, the current gas reaction curve is input into the gas detection model of the space, and the detection model outputs the gas composition detection result of the space. The detection model includes a convolutional neural network, a recurrent neural network, and a fully connected linear regression network. The convolutional neural network extracts the feature vector of the current gas reaction curve, the recurrent neural network filters the feature vector, and the fully connected linear regression network outputs the gas composition detection result based on the filtered feature vector.

[0112] It is understood that the embodiments of this application can input the current gas reaction curve into the gas detection model of the gas in the space, and the detection model outputs the gas composition detection results of the gas in the space. The detection model has higher data processing efficiency and better real-time performance, thereby saving a lot of time and resources.

[0113] According to the gas detection method proposed in this application, the current data of the gas detection value in the space is obtained by a sensor, and the current gas reaction curve of the gas in the space is generated based on the current data. The current gas reaction curve is input into the gas detection model to obtain the gas composition detection result. The detection model includes a convolutional neural network, a recurrent neural network, and a fully connected linear regression network. The convolutional neural network extracts the feature vector of the current gas reaction curve, the recurrent neural network filters the feature vector, and the fully connected linear regression network outputs the gas composition detection result based on the filtered feature vector. This method can fully identify the key patterns and features in the gas detection curve in practical applications, improve the generalization ability of the model, and make the detection model more efficient in processing data and more real-time, thereby saving a lot of time and resources.

[0114] Next, the gas detection device according to the embodiments of this application is described with reference to the accompanying drawings.

[0115] Figure 7 This is a block diagram of a gas detection device according to an embodiment of this application.

[0116] like Figure 7 As shown, the gas detection device 10 includes: a reaction chamber 100, a gas pumping assembly 200, and a vehicle controller 300.

[0117] The reaction chamber 100 is equipped with a sensor array and a data acquisition board. The gas pumping assembly 200 pumps the gas in the space into the reaction chamber 100. The sensor array reacts with the gas in the space, and the data acquisition board collects the detection values ​​of the gas in the space. The vehicle controller 300 generates gas composition detection results based on the detection values ​​of the gas in the space. The vehicle controller 300 is equipped with a gas detection model for the gas in the space. The detection model includes a convolutional neural network, a recurrent neural network, and a fully connected linear regression network. The convolutional neural network extracts the feature vector of the current gas reaction curve, the recurrent neural network filters the feature vector, and the fully connected linear regression network outputs the gas composition detection results based on the filtered feature vector.

[0118] The reaction chamber is a sealed container.

[0119] The gas pumping assembly includes a gas sampling pump, multiple valves, and delivery pipelines.

[0120] It is understood that the gas detection device in this application embodiment uses a combination of hardware and software to collect mixed VOC gas datasets, improving the automation level of the experiment and the accuracy of data acquisition. The use of a customized gas reaction chamber and sensor array ensures the stability and accuracy of the sensor curves. The control software improves the convenience and control precision of the experimental operation. The data acquisition system enables real-time monitoring and storage of experimental data, ensuring the accuracy and reliability of the experimental data.

[0121] Specifically, such as Figure 8 As shown, the gas detection device includes a mass flow controller with a pipeline connection interface and a digital / analog control interface for precise measurement and control of gas flow; a gas reaction chamber is a closed container housing a gas sensor array and a data acquisition board for gas to react with the sensors and collect data; the gas path system includes components such as a gas sampling pump, pipelines, and valves for gas transmission and control; and the control software is a graphical interface (e.g., [example software]). Figure 9 As shown, the system includes elements such as setting parameters and control buttons, used to set and adjust parameters such as gas flow rate and ventilation duration, to achieve automated control of the experimental process. It provides an intuitive and user-friendly interface, simplifies experimental operation procedures, and improves the accuracy and repeatability of experiments through automated control functions. The data acquisition system is used to display the real-time resistance of the sensor and save the corresponding sensor data. It has data recording and graphical display functions, and can monitor and save experimental data in real time, facilitating subsequent data processing and analysis.

[0122] Precise airflow control is achieved through software design: Multiple interconnected mass flow controllers are controlled using MATLAB. Specifically: 1. The computer establishes a connection with the mass flow controllers; 2. The mass flow controller sequence table is read, where the first row of the first column represents the number of available mass flow controllers; the first row of the second column represents the number of cycles in the entire gas collection process; the third column represents the execution time of each step; and the following three columns represent the flow rate of each mass flow controller in the current step; 3. The computer communicates with the mass flow controllers and controls their flow rate according to the parameters set in the mass flow controller sequence table.

[0123] It should be noted that the mass flow controller is connected to the gas reaction chamber via a pipeline to control the gas flow rate into the reaction chamber; the sensor array inside the gas reaction chamber is connected to the data acquisition board, and data acquisition and control are achieved through control software; the pipes, valves and other components in the gas path system design are interconnected to regulate the gas flow direction and flow rate; the control software communicates with the mass flow controller to control and monitor the experimental process; the data acquisition system communicates with the data acquisition board via Bluetooth to display and save the sensor's real-time resistance data.

[0124] In summary, through the precise design and control of the mass flow controller and gas reaction chamber, accurate detection and stable control of key gas molecules within the space can be achieved, ensuring the accuracy and reliability of experimental data. Utilizing corrosion-resistant materials, a sophisticated gas handling system, and a well-sealed gas reaction chamber, this invention ensures safety and reliability during the experimental process, avoiding safety risks caused by gas leakage or uncontrolled reactions. Through the software interface and data saving function, this invention enables real-time data monitoring, convenient data saving and export, greatly improving the efficiency and accuracy of data processing and reducing the workload of experimental personnel. Through the automated operation function and interactive graphical interface of the control software, this invention makes experimental operations more convenient and simpler, reducing the professional skill requirements for operators and minimizing human error during the experimental process.

[0125] According to the gas detection device proposed in the embodiments of this application, the gas detection device realizes the acquisition of mixed VOC gas datasets by combining hardware and software, which improves the automation level of the experiment and the accuracy of data acquisition. The use of customized gas reaction chamber and sensor array ensures the stability and accuracy of sensor curves. The control software improves the convenience of experimental operation and control precision. The data acquisition system realizes real-time monitoring and storage of experimental data, ensuring the accuracy and reliability of experimental data.

[0126] This application also provides a vehicle that includes the gas detection device described in the above embodiments.

[0127] This application also provides a computer-readable storage medium storing a computer program or instructions thereon, which, when executed by a processor, implements the gas detection model training method or the gas detection method described above.

[0128] This application also provides a computer program product, including a computer program or instructions, characterized in that, when the computer program or instructions are executed, they implement the above-mentioned gas detection model training method, or gas detection method.

[0129] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0130] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0131] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or N executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.

[0132] It should be understood that the various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or more of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0133] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.

Claims

1. A method for training a gas detection model, characterized in that, Includes the following steps: Obtain a training dataset, wherein the training dataset includes time-series data of gas detection values ​​and actual gas composition values ​​in space; A gas detection model for the gas in the space is constructed, wherein the detection model includes a convolutional neural network, a recurrent neural network, and a fully connected linear regression network. The convolutional neural network extracts feature vectors from the time-series data, the recurrent neural network filters the feature vectors, and the fully connected linear regression network outputs gas composition prediction values ​​based on the filtered feature vectors. The optimized detection model is obtained based on the actual and predicted values ​​of the gas components.

2. The gas detection model training method according to claim 1, characterized in that, The acquisition of the training dataset includes: Sample data of gas detection values ​​within the space are obtained through sensors; Based on the sample data, a reference gas reaction curve for the gas in the space is determined, and the actual values ​​of the gas components corresponding to the reference gas reaction curve are obtained. Time-series data of gas detection values ​​in the space are generated based on the reference gas reaction curve, and a training dataset is generated based on the time-series data and the actual values ​​of gas composition.

3. The gas detection model training method according to claim 2, characterized in that, The sample data for acquiring the detected values ​​of the gas in the space through sensors includes: The sensor acquires the detection data of the gas in the space; Calculate the delivery time of the gas in the space to the sensor; The collected data is corrected based on the transmission duration, and sample data is generated based on the corrected data.

4. The gas detection model training method according to claim 3, characterized in that, The step of correcting the collected data based on the transmission duration includes: Remove the data corresponding to the transmission duration from the collected data.

5. The gas detection model training method according to claim 3, characterized in that, The step of generating sample data based on the corrected data includes: The detection values ​​in the corrected data are normalized. The sample data is generated based on the normalized detection values.

6. The gas detection model training method according to claim 5, characterized in that, The step of generating the sample data based on the normalized detection values ​​includes: An initial gas reaction curve is generated based on the normalized detection values; The initial gas reaction curve is differentiated, and a threshold is determined based on the differentiated curve. A reference gas reaction curve is selected from the initial gas reaction curve based on the selected threshold, and the sample data is generated based on the reference gas reaction curve.

7. The gas detection model training method according to claim 6, characterized in that, The step of determining the selection threshold based on the curve after differentiation includes: Identify the apex and valley of the curve after the differential processing; The data corresponding to the vertices and valleys are used as the selection threshold.

8. The gas detection model training method according to claim 7, characterized in that, The process of identifying the vertices and valleys of the curve after the differential processing includes: Obtain the target window of the curve after the differential processing; The curve after differential processing is shifted using the target window, and the apex and valley of the curve are determined based on the result of the shift.

9. A gas detection method, characterized in that, Includes the following steps: The current data of the gas detection values ​​in the space are obtained through sensors; Generate the current gas reaction curve of the gas in the space based on the current data; The current gas reaction curve is input into the gas detection model of the space, and the detection model outputs the gas composition detection result of the space. The detection model includes a convolutional neural network, a recurrent neural network, and a fully connected linear regression network. The convolutional neural network extracts the feature vector of the current gas reaction curve, the recurrent neural network filters the feature vector, and the fully connected linear regression network outputs the gas composition detection result based on the filtered feature vector.

10. The gas detection method according to claim 9, characterized in that, The step of generating the current gas reaction curve of the gas in the space based on the current data includes: Calculate the delivery time of the gas in the space to the sensor; The current data is corrected based on the transport duration, and the current gas reaction curve of the gas in the space is generated based on the corrected data.

11. A gas detection device, characterized in that, include: A reaction chamber, wherein a sensor array and a data acquisition board are disposed within the reaction chamber; A gas pumping assembly is used to pump gas from the space into the reaction chamber, wherein the sensor array is used to react with the gas in the space, and the data acquisition board is used to acquire the detection value of the gas in the space; A vehicle controller is used to generate gas composition detection results based on the detected values ​​of the gas in the space. The vehicle controller is equipped with a gas detection model for the gas in the space. The detection model includes a convolutional neural network, a recurrent neural network, and a fully connected linear regression network. The convolutional neural network extracts the feature vector of the current gas reaction curve, the recurrent neural network filters the feature vector, and the fully connected linear regression network outputs the gas composition detection results based on the filtered feature vector.

12. The gas detection device according to claim 11, characterized in that, The reaction chamber is a sealed container.

13. The gas detection device according to claim 11, characterized in that, The gas pumping assembly includes a gas sampling pump, multiple valves, and delivery pipelines.

14. A vehicle comprising a gas detection device as described in any one of claims 11-13.

15. A computer-readable storage medium having a computer program or instructions stored thereon, characterized in that, When the computer program or instructions are executed by the processor, they are used to implement the gas detection model training method as described in any one of claims 1-8, or the gas detection method as described in any one of claims 9-10.

16. A computer program product comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed, they implement the gas detection model training method as described in any one of claims 1-8, or the gas detection method as described in any one of claims 9-10.