Hybrid gas concentration detection method and system based on multi-sensor data fusion
Patent Information
- Application Number
- CN202611031770.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-13
- Publication Date
- 2026-09-15
AI Technical Summary
[0003]然而,现有技术存在以下问题:单一类型的气体传感器通常对多种气体组分同时产生响应,即存在交叉敏感性,当多种气体共存时,传感器输出信号是各组分响应的叠加,难以区分各气体组分的实际浓度,导致混合气体浓度检测精度严重不足
[0097](1) Effective decoupling of cross-interference significantly improves detection accuracy. By constructing a sensor array containing multiple types of sensors, the different sensitivity response characteristics of different types of sensors to the same gas component are utilized to provide rich differentiated information. Furthermore, an attention-based data fusion network is adopted to adaptively learn the contribution of each sensor to different gas components through cross-sensor attention weights, effectively decoupling the cross-interference between components in the mixed gas. In the CO and H2 mixed gas detection experiment, the average absolute error of CO concentration detection decreased from 42.3 ppm in the single-sensor scheme to 8.7 ppm, and the average absolute error of H2 concentration detection decreased from 56.8 ppm to 11.2 ppm, with a cross-interference elimination rate of 87.5%.
Smart Images

Figure CN122754418A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of gas detection technology, and in particular to a method and system for detecting the concentration of mixed gases based on multi-sensor data fusion. Background Technology
[0002] Mixed gas concentration detection has significant application value in fields such as industrial safety, environmental monitoring, and occupational health. Complex scenarios often exist in industrial production sites, mining environments, and indoor spaces where multiple gas components coexist, such as carbon monoxide and hydrogen, or methane and hydrogen sulfide. Accurately detecting the actual concentration of each component in a mixed gas is a prerequisite for achieving safety early warning and pollution control.
[0003] However, existing technologies suffer from the following problems: single-type gas sensors typically respond to multiple gas components simultaneously, exhibiting cross-sensitivity. When multiple gases coexist, the sensor output signal is a superposition of the responses of each component, making it difficult to distinguish the actual concentration of each gas component, resulting in severely insufficient accuracy in mixed gas concentration detection. Taking electrochemical carbon monoxide sensors as an example, they also exhibit significant cross-response to hydrogen. When carbon monoxide and hydrogen are present in the environment simultaneously, the detected carbon monoxide concentration will deviate significantly due to interference from hydrogen, with deviations exceeding 30%, severely impacting the reliability of detection results and the accuracy of subsequent safety decisions.
[0004] The information disclosed in this background section is intended only to enhance the understanding of the general background of the invention and should not be construed as an admission or in any way implying that the information constitutes prior art known to those skilled in the art. Summary of the Invention
[0005] This invention provides a method and system for detecting the concentration of mixed gases based on multi-sensor data fusion, thereby effectively solving the problems in the background art.
[0006] To achieve the above objectives, the technical solution adopted by the present invention is: a method and system for detecting the concentration of mixed gases based on multi-sensor data fusion, comprising the following steps:
[0007] A sensor array containing multiple types of sensors is constructed, and the multi-channel response signal of the gas mixture to be tested is acquired using the sensor array;
[0008] The multi-channel response signal is preprocessed to obtain the preprocessed signal for each channel;
[0009] Multi-domain features are extracted from the preprocessed signal, including time-domain features, frequency-domain features, and time-frequency-domain features.
[0010] The multi-domain features are input into an attention-based data fusion network. The features of each sensor are weighted and fused and decoupled from cross-interference through a cross-sensor attention mechanism to output the concentration of each gas component in the mixed gas.
[0011] Based on the concentration detection results of each gas component, a concentration warning or control operation is performed.
[0012] Furthermore, the sensor array includes at least two of the following: electrochemical sensors, semiconductor sensors, non-dispersive infrared sensors, and catalytic combustion sensors; the various types of sensors have different sensitivity response characteristics to the same gas component and cross-sensitivity to different gas components.
[0013] Furthermore, the preprocessing of the multi-channel response signal includes: performing baseline correction on the multi-channel response signal to eliminate sensor zero-point drift; and performing normalization processing on the baseline-corrected signal to map each channel signal to a uniform numerical range.
[0014] Furthermore, the multi-domain features include: the time-domain features are the mean, variance, peak value, and rise time of the signal; the frequency-domain features are the dominant frequency component and power spectral density of the signal after Fourier transform; and the time-frequency-domain features are the wavelet energy coefficients at each scale of the signal after wavelet transform.
[0015] Furthermore, the attention-based data fusion network includes a feature encoding layer, a cross-sensor attention layer, and a concentration regression layer. The feature encoding layer independently encodes the multi-domain features of each sensor and maps them to a feature vector of a unified dimension. The cross-sensor attention layer learns the correlation weights between each sensor and performs weighted fusion of the encoded feature vectors to achieve decoupling from cross-interference. The concentration regression layer regresses and outputs the concentration of each gas component based on the fused feature vector.
[0016] Furthermore, the attention weights of the cross-sensor attention layer are calculated as follows:
[0017] ;
[0018] ;
[0019] Among them, h i and h j These are the feature vectors of sensor i and sensor j after being encoded by the feature encoding layer, respectively. W1, W2, and v are learnable parameters, and α... ij The attention weights of sensor j on sensor i; fused features c i The calculation method is as follows:
[0020] .
[0021] Furthermore, the training method for the data fusion network includes: configuring multiple sets of standard mixed gases with known concentrations as calibration samples; collecting the response signals of the sensor array to each set of calibration samples and extracting multi-domain features as training data; and training the data fusion network using a joint loss function that includes a concentration prediction mean square error term and a component correlation penalty term, wherein the joint loss function is:
[0022] ;
[0023] Among them, L MSE L represents the mean square error between the predicted and actual concentrations of each gas component. corr λ is the correlation penalty term between the predicted concentrations of different gas components, and λ is the balance coefficient.
[0024] Furthermore, the method also includes an online adaptive calibration step: acquiring ambient temperature and humidity parameters in real time, introducing the environmental parameters as auxiliary inputs into the data fusion network, dynamically adjusting the weight allocation of the cross-sensor attention mechanism, and compensating for the impact of environmental changes on sensor response characteristics.
[0025] Furthermore, the concentration warning or control operation includes: comparing the concentration of each gas component with a preset safety threshold, and triggering a graded alarm signal when the concentration of any component exceeds the safety threshold; the method is applicable to industrial site toxic and harmful gas monitoring, mine gas monitoring, or indoor air quality monitoring scenarios.
[0026] The present invention also includes a mixed gas concentration detection system based on multi-sensor data fusion, using the method described above, wherein the system comprises:
[0027] The signal acquisition module is used to construct a sensor array containing various types of sensors and acquire multi-channel response signals of the gas mixture to be tested.
[0028] The preprocessing module is used to perform baseline correction and normalization on the multi-channel response signals to obtain the preprocessed signals of each channel.
[0029] The feature extraction module is used to extract time-domain features, frequency-domain features, and time-frequency-domain features from the preprocessed signal;
[0030] The fusion detection module is used to input the multi-domain features into the attention mechanism-based data fusion network, perform weighted fusion and cross-interference decoupling through cross-sensor attention mechanism, and output the concentration of each gas component;
[0031] The early warning and control module is used to perform concentration early warning or control operations based on the concentration detection results.
[0032] The present invention also includes a computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the method as described above.
[0033] The present invention also includes a storage medium having a computer program stored thereon, which, when executed by a processor, implements the method as described above.
[0034] The beneficial effects of this invention are as follows: By constructing a sensor array containing multiple types of sensors, and utilizing the different sensitivity response characteristics of different types of sensors to the same gas component, rich differentiated information is provided; and an attention-based data fusion network is employed, which adaptively learns the contribution of each sensor to different gas components through cross-sensor attention weights, effectively decoupling the cross-interference between components in the mixed gas. The cross-sensor attention mechanism can automatically adjust the fusion weights of each sensor according to the input signal. When the component ratio of the mixed gas changes, the network adaptively updates the attention allocation without manual parameter adjustment, overcoming the performance degradation problem of existing fixed-weight fusion methods when the component ratio changes. Extracting features in the time domain, frequency domain, and time-frequency domain from the preprocessed signal, compared to schemes that only use time domain amplitude, can more comprehensively characterize the sensor response signal features, providing richer input for the attention fusion network and further improving the concentration detection accuracy. Attached Figure Description
[0035] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0036] Figure 1 This is a flowchart of the method in Embodiment 1 of the present invention;
[0037] Figure 2 This is a schematic diagram of the system structure in Embodiment 1 of the present invention;
[0038] Figure 3 This is an overall flowchart of the mixed gas concentration detection method based on multi-sensor data fusion in Embodiment 2 of the present invention;
[0039] Figure 4 This is a schematic diagram of the multi-sensor array structure in Embodiment 2 of the present invention;
[0040] Figure 5This is a schematic diagram of the data fusion network structure based on the attention mechanism in Embodiment 2 of the present invention;
[0041] Figure 6 This is a schematic diagram of the module structure of the mixed gas concentration detection system based on multi-sensor data fusion in Embodiment 4 of the present invention;
[0042] Figure 7 This is a schematic diagram of the computer device in Embodiment 5 of the present invention. Detailed Implementation
[0043] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0044] Example 1:
[0045] like Figure 1 As shown: A method and system for detecting the concentration of mixed gases based on multi-sensor data fusion, comprising the following steps:
[0046] Construct a sensor array containing multiple types of sensors, and use the sensor array to acquire multi-channel response signals of the gas mixture to be tested;
[0047] The multi-channel response signals are preprocessed to obtain the preprocessed signals for each channel;
[0048] Extracting multi-domain features from the preprocessed signal, including time-domain features, frequency-domain features, and time-frequency-domain features;
[0049] Multi-domain features are input into an attention-based data fusion network. The features of each sensor are weighted and fused and decoupled from cross-interference through a cross-sensor attention mechanism to output the concentration of each gas component in the mixed gas.
[0050] Based on the concentration detection results of each gas component, concentration warning or control operations are executed.
[0051] By constructing a sensor array containing multiple types of sensors, and leveraging the varying sensitivity response characteristics of different sensor types to the same gas component, rich and differentiated information is provided. An attention-based data fusion network is employed, which adaptively learns the contribution of each sensor to different gas components through cross-sensor attention weights, effectively decoupling cross-interference between components in the gas mixture. The cross-sensor attention mechanism automatically adjusts the fusion weights of each sensor based on the input signal. When the component ratio of the gas mixture changes, the network adaptively updates the attention allocation without manual parameter adjustment, overcoming the performance degradation problem of existing fixed-weight fusion methods when the component ratio changes. Features in the time domain, frequency domain, and time-frequency domain are extracted from the preprocessed signal. Compared to schemes using only time-domain amplitude, this provides a more comprehensive characterization of the sensor response signals, offering richer input to the attention fusion network and further improving concentration detection accuracy.
[0052] In this embodiment, the sensor array includes at least two of the following: electrochemical sensors, semiconductor sensors, non-dispersive infrared sensors, and catalytic combustion sensors; multiple types of sensors have different sensitivity response characteristics to the same gas component and cross-sensitivity to different gas components.
[0053] The preprocessing of the multi-channel response signal includes: baseline correction of the multi-channel response signal to eliminate sensor zero-point drift; and normalization of the baseline-corrected signal to map the signal of each channel to a uniform numerical range.
[0054] As a preferred embodiment of the above, the multi-domain features include: time-domain features such as the mean, variance, peak value and rise time of the signal; frequency-domain features such as the main frequency component and power spectral density of the signal after Fourier transform; and time-frequency-domain features such as the wavelet energy coefficients of the signal at each scale after wavelet transform.
[0055] The attention-based data fusion network includes a feature encoding layer, a cross-sensor attention layer, and a concentration regression layer. The feature encoding layer independently encodes the multi-domain features of each sensor and maps them to a feature vector of a unified dimension. The cross-sensor attention layer learns the correlation weights between each sensor and performs weighted fusion of the encoded feature vectors to achieve decoupling from cross-interference. The concentration regression layer regresses the concentration of each gas component based on the fused feature vector.
[0056] In this embodiment, the attention weights across the sensor attention layer are calculated as follows:
[0057] ;
[0058] ;
[0059] Among them, hi and h j These are the feature vectors of sensor i and sensor j after being encoded by the feature coding layer, respectively. W1, W2, and v are learnable parameters, and α is the feature vector of sensor i and sensor j after being encoded by the feature coding layer. ij The attention weights of sensor j on sensor i; fused features c i The calculation method is as follows:
[0060] .
[0061] The training method for the data fusion network includes: configuring multiple sets of standard mixed gases with known concentrations as calibration samples; collecting the response signals of the sensor array to each set of calibration samples and extracting multi-domain features as training data; and training the data fusion network using a joint loss function that includes a concentration prediction mean square error term and a component correlation penalty term. The joint loss function is as follows:
[0062] ;
[0063] Among them, L MSE L represents the mean square error between the predicted and actual concentrations of each gas component. corr λ is the correlation penalty term between the predicted concentrations of different gas components, and λ is the balance coefficient.
[0064] As a preferred embodiment of the above, the method further includes an online adaptive calibration step: acquiring ambient temperature and humidity parameters in real time, introducing the environmental parameters as auxiliary inputs into the data fusion network, dynamically adjusting the weight allocation of the cross-sensor attention mechanism, and compensating for the impact of environmental changes on the sensor response characteristics.
[0065] In this embodiment, performing concentration warning or control operations includes: comparing the concentration of each gas component with a preset safety threshold, and triggering a graded alarm signal when the concentration of any component exceeds the safety threshold; the method is applicable to industrial site toxic and harmful gas monitoring, mine gas monitoring, or indoor air quality monitoring scenarios.
[0066] like Figure 2 As shown, this embodiment also includes a mixed gas concentration detection system based on multi-sensor data fusion, using the method described above. The system includes:
[0067] The signal acquisition module is used to construct a sensor array containing various types of sensors and acquire multi-channel response signals of the gas mixture to be tested.
[0068] The preprocessing module is used to perform baseline correction and normalization on the multi-channel response signals to obtain the preprocessed signals for each channel.
[0069] The feature extraction module is used to extract time-domain features, frequency-domain features, and time-frequency-domain features from the preprocessed signal;
[0070] The fusion detection module is used to input multi-domain features into an attention-based data fusion network, perform weighted fusion and cross-interference decoupling through a cross-sensor attention mechanism, and output the concentration of each gas component.
[0071] The early warning and control module is used to perform concentration early warning or control operations based on the concentration detection results.
[0072] Example 2:
[0073] This embodiment takes the detection of carbon monoxide (CO) and hydrogen (H2) mixed gas concentration in an industrial setting as an example, combined with... Figures 3 to 5 The method of this invention will be described in detail below. The detection range for CO concentration is 0-500 ppm, and the detection range for H2 concentration is 0-1000 ppm.
[0074] Step 1: Construct a sensor array and acquire multi-channel response signals.
[0075] like Figure 4 As shown, this embodiment constructs a sensor array containing four types of sensors: an electrochemical CO sensor (highly sensitive to CO and cross-responsive to H2), a semiconductor H2 sensor (highly sensitive to H2 and cross-responsive to CO), a non-dispersive infrared (NDIR) CO2 sensor (selectively responsive to hydrocarbons), and a catalytic combustion sensor (sensitive to the total amount of combustible gas). These four sensors are integrated into the same gas chamber. When the mixed gas enters the chamber, each sensor simultaneously generates a response signal, forming a four-channel response signal.
[0076] Step 2: Signal preprocessing.
[0077] Baseline correction and normalization were performed on the four-channel response signals. Baseline correction employed a zero-point calibration method, where the baseline output values of each sensor were acquired in a clean air environment, and the baseline values were subtracted from the actual measured signals to eliminate zero-point drift. Normalization used a Min-Max normalization method, mapping each channel signal to the [0, 1] interval.
[0078] x norm = (x - x min ) / (x max - x min );
[0079] Where x is the baseline-corrected signal value, x min and x max These are the minimum and maximum response values of the sensor within its detection range, respectively.
[0080] Step 3: Multi-domain feature extraction.
[0081] Multi-domain features are extracted from the preprocessed signals of each sensor, specifically including:
[0082] (1) Time domain characteristics: Calculate the mean, variance, peak value and rise time (the time required for the signal to rise from 10% steady state value to 90% steady state value), a total of 4 time domain characteristics;
[0083] (2) Frequency domain features: Perform Fast Fourier Transform (FFT) on the signal to extract the first 5 main frequency components and their corresponding power spectral density values, for a total of 10 frequency domain features;
[0084] (3) Time-frequency domain features: The signal is subjected to 4-level discrete wavelet transform using db4 wavelet, and the energy values of the approximation coefficients and detail coefficients of each level are extracted, resulting in a total of 8 time-frequency domain features.
[0085] Each sensor extracts a 22-dimensional feature vector, for a total of 88-dimensional features from the four sensors.
[0086] Step 4: Attention Fusion Network Detection.
[0087] like Figure 5 As shown, 88-dimensional multi-domain features are input into an attention-based data fusion network, which consists of three layers:
[0088] (1) Feature encoding layer: Four independent fully connected networks are used to encode the 22-dimensional features of the four sensors respectively. Each fully connected network contains two hidden layers (number of neurons 128→64) and outputs a 64-dimensional feature vector h. i (i=1,2,3,4) map the features of different sensors to a unified dimension.
[0089] (2) Cross-sensor attention layer: Calculate the attention weight α between each sensor according to formulas (1) to (3). ij And generate fusion feature c i Attention weight α ij This represents the contribution of sensor j's features to the calculation of the gas component concentration corresponding to sensor i. In the CO-H2 mixed gas scenario, the electrochemical CO sensor has a large cross-response to H2. The attention mechanism automatically reduces the fusion weight of the semiconductor H2 sensor's features to the electrochemical CO sensor, thereby suppressing the interference of H2 on CO detection.
[0090] (3) Concentration regression layer: The four fusion features c1 to c4 are concatenated into a 256-dimensional vector, and the CO concentration and H2 concentration are regressed through a 2-layer fully connected network (256→128→2).
[0091] Network Training: Sixty-four standard CO-H2 gas mixtures of known concentrations were configured as calibration samples. The CO concentration gradients were 0, 50, 100, 200, 300, 400, and 500 ppm, and the H2 concentration gradients were 0, 100, 200, 400, 600, 800, and 1000 ppm, forming 64 calibration samples. The response signals of the sensor array to each sample were collected, and multi-domain features were extracted as training data. A joint loss function L = L... MSE + λ · L corr Training is conducted, where L MSE L represents the mean square error between the predicted and actual values of CO and H2 concentrations. corr λ is the square of the Pearson correlation coefficient between predicted CO and H2 concentrations (to encourage decoupling of prediction results), with λ set to 0.1. The Adam optimizer is used with a learning rate of 0.001, trained for 200 epochs.
[0092] Step 5: Concentration warning.
[0093] The detected CO and H2 concentrations are compared with preset safety thresholds. In this embodiment, the CO safety threshold is set to 50 ppm, and the H2 safety threshold is set to 500 ppm. A level one alarm is triggered when the CO concentration exceeds 50 ppm, and a level two alarm is triggered when it exceeds 200 ppm; a level one alarm is triggered when the H2 concentration exceeds 500 ppm, and a level two alarm is triggered when it exceeds 800 ppm. The alarm signals are output synchronously through an audible and visual alarm and a remote monitoring platform.
[0094] Detection Results: Validated on 32 test samples, the method of this invention achieved a mean absolute error (MAE) of 8.7 ppm for CO concentration detection and 11.2 ppm for H2 concentration detection. In comparison, the MAE of a single electrochemical CO sensor was 42.3 ppm (due to H2 cross-interference), and the MAE of the fixed-weighted average fusion method was 25.6 ppm. The cross-interference elimination rate of the method of this invention reached 87.5%, representing a 66.0% improvement in detection accuracy compared to the fixed-weighted fusion method.
[0095] Detection methods CO detection MAE (ppm) <![CDATA[H2 detection MAE (ppm)]]> Cross-interference cancellation rate Single sensor (electrochemical CO) 42.3 — — Fixed-weighted average fusion 25.6 33.4 39.5% This invention (attention fusion) 8.7 11.2 87.5%
[0096] The beneficial effects of this embodiment are as follows:
[0097] (1) Effective decoupling of cross-interference significantly improves detection accuracy. By constructing a sensor array containing multiple types of sensors, the different sensitivity response characteristics of different types of sensors to the same gas component are utilized to provide rich differentiated information. Furthermore, an attention-based data fusion network is adopted to adaptively learn the contribution of each sensor to different gas components through cross-sensor attention weights, effectively decoupling the cross-interference between components in the mixed gas. In the CO and H2 mixed gas detection experiment, the average absolute error of CO concentration detection decreased from 42.3 ppm in the single-sensor scheme to 8.7 ppm, and the average absolute error of H2 concentration detection decreased from 56.8 ppm to 11.2 ppm, with a cross-interference elimination rate of 87.5%.
[0098] (2) Adaptive fusion weights to adapt to changes in component ratio. The cross-sensor attention mechanism can automatically adjust the fusion weights of each sensor according to the input signal. When the component ratio of the mixed gas changes, the network adaptively updates the attention allocation without the need for manual parameter adjustment, thus overcoming the performance degradation problem of existing fixed-weight fusion methods when the component ratio changes.
[0099] (3) Multi-domain feature extraction and full utilization of information. Features in the time domain, frequency domain and time-frequency domain are extracted from the preprocessed signal. Compared with the scheme that only uses the time domain amplitude, it can more comprehensively characterize the feature information of the sensor response signal, provide richer input for the attention fusion network and further improve the concentration detection accuracy.
[0100] (4) Environmental adaptive compensation and good long-term stability. By introducing environmental temperature and humidity parameters as auxiliary inputs, the attention weight allocation is dynamically adjusted to effectively compensate for the impact of environmental changes on the sensor response characteristics, thereby improving the long-term detection stability of the system under complex environmental conditions.
[0101] Example 3:
[0102] This embodiment verifies the transferability of the method of the present invention in a scenario where a three-component mixed gas of CH4, CO, and H2S coexists in a mine. The sensor array includes: a catalytic combustion CH4 sensor (range 0-4% LEL), an electrochemical CO sensor (range 0-500 ppm), an electrochemical H2S sensor (range 0-100 ppm), and a semiconductor sensor (responsive to all three gases). The CH4 concentration gradient was set to 0.5%, 1.0%, 1.5%, 2.0%, 2.5%, and 3.0%, the CO concentration gradient was set to 0, 50, 100, 200, and 300 ppm, and the H2S concentration gradient was set to 0, 10, 20, 50, and 80 ppm, with a total of 125 sets of calibration samples configured.
[0103] The network structure is the same as in Example 2, except that the feature encoding layer is adjusted to have 4 independent encoding networks corresponding to 4 sensors, and the output dimension of the concentration regression layer is adjusted to 3 (concentrations of CH4, CO, and H2S). The training hyperparameters are the same as in Example 2.
[0104] Test results show that the MAE for CH4 concentration detection is 0.08% LEL, for CO concentration detection is 12.3 ppm, and for H2S concentration detection is 3.1 ppm. Compared with the fixed-weight fusion method, the detection accuracy of the three components is improved by 54.2%, 48.7%, and 61.5%, respectively, verifying the portability and versatility of the method under different gas combinations and sensor configurations.
[0105] Example 4:
[0106] This embodiment illustrates the system's online adaptive calibration function and hardware implementation. For example... Figure 6 As shown, the system of the present invention includes a signal acquisition module, a preprocessing module, a feature extraction module, a fusion detection module, and an early warning control module.
[0107] Hardware Components: The signal acquisition module includes a sensor array air chamber, signal conditioning circuitry (including amplification and filtering), and a 16-bit ADC analog-to-digital converter with a sampling frequency of 10Hz. The preprocessing and feature extraction modules are implemented using an STM32H7 series microcontroller, performing baseline correction, normalization, and multi-domain feature extraction. The fusion detection module is implemented using an embedded NPU acceleration chip, performing inference operations on the attention fusion network with a single inference latency of less than 50ms. The early warning control module includes an audible and visual alarm, a 4G communication module, and a monitoring platform interface. The system also integrates an SHT31 temperature and humidity sensor to collect ambient temperature and humidity parameters in real time.
[0108] Online adaptive calibration: During system operation, the SHT31 sensor collects ambient temperature (T) and relative humidity (RH) in real time, and concatenates T and RH as auxiliary input vectors into the input of the concentration regression layer. When the ambient temperature changes from 20℃ to 40℃, the sensitivity of the electrochemical CO sensor drifts by approximately 15%. The attention fusion network, by introducing environmental parameters as auxiliary input, dynamically adjusts the attention weight allocation, reducing the detection error caused by temperature drift from 15.2% to 2.3%, effectively compensating for the impact of environmental changes on the sensor's response characteristics.
[0109] Inter-module connections: The output of the signal acquisition module is connected to the input of the preprocessing module; the output of the preprocessing module is connected to the input of the feature extraction module; the output of the feature extraction module is connected to the input of the fusion detection module; and the output of the fusion detection module is connected to the input of the early warning control module. The output of the temperature and humidity sensor is connected to the auxiliary input of the fusion detection module for online adaptive calibration.
[0110] Example 5:
[0111] Please see Figure 7 The diagram shows a structural schematic of a computer device provided in an embodiment of this application. An embodiment of this application provides a computer device 400, including a processor 410 and a memory 420. The memory 420 stores a computer program executable by the processor 410. When the computer program is executed by the processor 410, it performs the method described above.
[0112] This application embodiment also provides a storage medium 430, on which a computer program is stored, and the computer program is executed by a processor 410 to perform the above method.
[0113] The storage medium 430 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0114] In the description of this invention, 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 indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. "A plurality of" means two or more, unless otherwise explicitly specified.
[0115] In this invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," "linking," and "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0116] 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 the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Furthermore, 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.
[0117] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process, and the scope of the preferred embodiments of the invention 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 will be understood by those skilled in the art to which embodiments of the invention pertain.
[0118] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0119] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in 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 a combination 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.
[0120] 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.
[0121] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present invention.
Claims
1. A method for detecting the concentration of a mixed gas based on multi-sensor data fusion, characterized in that, Includes the following steps: A sensor array containing multiple types of sensors is constructed, and the multi-channel response signal of the gas mixture to be tested is acquired using the sensor array; The multi-channel response signal is preprocessed to obtain the preprocessed signal for each channel; Multi-domain features are extracted from the preprocessed signal, including time-domain features, frequency-domain features, and time-frequency-domain features. The multi-domain features are input into an attention-based data fusion network. The features of each sensor are weighted and fused and decoupled from cross-interference through a cross-sensor attention mechanism to output the concentration of each gas component in the mixed gas. Based on the concentration detection results of each gas component, a concentration warning or control operation is performed.
2. The method according to claim 1, characterized in that, The sensor array includes at least two of the following: electrochemical sensors, semiconductor sensors, non-dispersive infrared sensors, and catalytic combustion sensors; The various types of sensors have different sensitivity response characteristics to the same gas component and exhibit cross-sensitivity to different gas components.
3. The method according to claim 1, characterized in that, The preprocessing of the multi-channel response signal includes: Baseline correction is performed on the multi-channel response signal to eliminate sensor zero-point drift; The baseline-corrected signal is normalized to map the signals of each channel to a uniform numerical range.
4. The method according to claim 1, characterized in that, The multi-domain features include: The time-domain features are the signal's mean, variance, peak value, and rise time; The frequency domain features are the dominant frequency component and power spectral density of the signal after Fourier transform; The time-frequency domain features are the wavelet energy coefficients at each scale after the signal undergoes wavelet transform.
5. The method according to claim 1, characterized in that, The attention-based data fusion network includes a feature encoding layer, a cross-sensor attention layer, and a concentration regression layer. The feature encoding layer independently encodes the multi-domain features of each sensor and maps them to a feature vector of a unified dimension. The cross-sensor attention layer learns the correlation weights between each sensor and performs weighted fusion on the encoded feature vectors to achieve decoupling from cross-interference. The concentration regression layer outputs the concentration of each gas component based on the fused feature vector regression.
6. The method according to claim 5, characterized in that, The attention weights of the cross-sensor attention layer are calculated as follows: ; ; Among them, h i and h j These are the feature vectors of sensor i and sensor j after being encoded by the feature encoding layer, respectively. W1, W2, and v are learnable parameters, and α... ij The attention weights of sensor j on sensor i; fused features c i The calculation method is as follows: 。 7. The method according to claim 5, characterized in that, The training method for the data fusion network includes: Multiple sets of standard mixed gases with known concentrations are configured as calibration samples. The response signals of the sensor array to each set of calibration samples are collected and multi-domain features are extracted as training data. The data fusion network is trained using a joint loss function that includes a concentration prediction mean square error term and a component correlation penalty term. The joint loss function is as follows: ; Among them, L MSE L represents the mean square error between the predicted and actual concentrations of each gas component. corr λ is the correlation penalty term between the predicted concentrations of different gas components, and λ is the balance coefficient.
8. The method according to claim 1, characterized in that, The method also includes an online adaptive calibration step: The system acquires ambient temperature and humidity parameters in real time, uses these parameters as auxiliary inputs into the data fusion network, and dynamically adjusts the weight allocation of the cross-sensor attention mechanism to compensate for the impact of environmental changes on sensor response characteristics.
9. The method according to claim 1, characterized in that, The concentration warning or control operation includes: The concentration of each gas component is compared with a preset safety threshold. When the concentration of any component exceeds the safety threshold, a graded alarm signal is triggered. The method is applicable to scenarios such as monitoring toxic and harmful gases in industrial sites, monitoring methane gas in mines, or monitoring indoor air quality.
10. A mixed gas concentration detection system based on multi-sensor data fusion, characterized in that, The system includes: The signal acquisition module is used to construct a sensor array containing various types of sensors and acquire multi-channel response signals of the gas mixture to be tested. The preprocessing module is used to perform baseline correction and normalization on the multi-channel response signals to obtain the preprocessed signals of each channel. The feature extraction module is used to extract time-domain features, frequency-domain features, and time-frequency-domain features from the preprocessed signal; The fusion detection module is used to input the multi-domain features into the attention mechanism-based data fusion network, perform weighted fusion and cross-interference decoupling through cross-sensor attention mechanism, and output the concentration of each gas component; The early warning and control module is used to perform concentration early warning or control operations based on the concentration detection results.
11. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1-9.
12. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the method as described in any one of claims 1-9.