Ppb-grade methane gas online detection method, equipment, medium and product
Through infrared absorption spectral signal processing and algorithm analysis, combined with multi-spectral line weight matching and drift compensation model, the problem of high detection cost of ppb-level methane is solved, and low-cost, high-precision and stable online detection is achieved.
Patent Information
- Application Number
- CN202510691613.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-27
- Publication Date
- 2025-08-26
AI Technical Summary
The existing PPB-grade methane detection technology relies on high-cost hardware equipment, resulting in high detection costs and complex maintenance, making it difficult to achieve high accuracy and stability in complex environments.
By acquiring infrared absorption spectral signals, multi-scale noise separation and baseline correction are performed, combined with multi-spectral line weight matching algorithm and drift compensation model of real-time environmental parameters, the methane characteristic intensity is adaptively calibrated, and the pre-trained concentration inversion model and anomaly detection model are used to achieve online detection.
Reliance on high-cost hardware is reduced, detection accuracy and reliability is improved, environmental adaptability and stability is enhanced, and real-time monitoring of ppb-grade methane gas is achieved with low-cost, miniaturized real-time monitoring of ppb-grade methane gas.
Smart Images

Figure CN120539094A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a ppb-level methane gas online detection method, equipment, medium and product. Background Art
[0002] Methane is a colorless, odorless, and highly flammable hazardous gas. As the main component of natural gas and biogas, it is typically found in large quantities in coal mines, oil fields, and other places, and is widely used in daily life and industrial production. In an aerobic environment, once the methane concentration exceeds the standard, even the slightest open flame will cause an explosion. In addition, as a major greenhouse gas, excessive methane emissions trigger the greenhouse effect, which will change the global climate and ecosystem. The task of greenhouse gas detection is arduous and complex, and accurate and effective greenhouse gas emission monitoring is an effective technical support. This puts forward new indicators and requirements for greenhouse gas emission monitoring methods.
[0003] Among related technologies, ppb-level (parts per billion) methane detection plays a key role in curbing global warming (its greenhouse effect is 28 times stronger than CO2), preventing industrial leakage accidents (such as trace leaks in natural gas pipelines), and optimizing emission reduction strategies in the agriculture and energy industries, providing highly sensitive data support for environmental monitoring and energy security.
[0004] The currently commonly used ppb-level ultra-low concentration methane gas detection technology is more dependent on the hardware performance of the detection equipment and has a high cost. Summary of the Invention
[0005] In view of the above technical problems and defects, the purpose of the present invention is to provide a method, equipment, medium and product for online detection of ppb-level methane gas, which can alleviate the problem of high cost of ppb-level methane detection.
[0006] To achieve the above objectives, in a first aspect, the present invention provides a ppb-level methane gas online detection method, comprising: collecting infrared absorption spectrum signals of the gas to be measured in a target environment; obtaining original spectrum data containing methane and interfering gases from the infrared absorption spectrum signals; performing multi-scale noise separation and baseline correction on the original spectrum data to obtain effective spectrum features after denoising; extracting methane-specific absorption peaks from the effective spectrum features based on a preset methane characteristic spectrum line database; comparing the methane-specific absorption peaks with the interfering gas spectrum lines through a multi-spectral line weight matching algorithm to suppress cross-sensitivity. The cross-sensitivity method senses and obtains the methane characteristic intensity. The cross-sensitivity refers to the phenomenon that when detecting methane, the measurement is inaccurate due to interference from other gas signals; the methane characteristic intensity is adaptively calibrated according to the drift compensation model constructed by real-time environmental parameters to obtain the calibrated characteristic intensity; the calibrated characteristic intensity is mapped to the ppb-level methane concentration value through the pre-trained concentration inversion model; multiple ppb-level methane concentration values are arranged according to a time series relationship to obtain concentration time series data; the concentration time series data is input into a preset anomaly detection model to detect whether a methane leakage event has occurred in the target environment.
[0007] The present invention collects infrared absorption spectrum signals and performs multi-scale noise separation and baseline correction to effectively remove noise interference and accurately extract methane-specific absorption peaks. A multi-spectral line weight matching algorithm is used to suppress cross-sensitivity and improve detection accuracy. The drift compensation model based on real-time environmental parameters can adaptively calibrate the characteristic intensity of methane, effectively offset the interference caused by environmental factors, reduce the need for frequent calibration, and improve equipment stability and reliability. At the same time, the pre-trained concentration inversion model can quickly map the calibrated characteristic intensity to ppb-level methane concentration values to meet real-time monitoring needs. By arranging the concentration values in time series and inputting them into the anomaly detection model, methane leakage incidents can be warned in a timely manner to ensure industrial production and environmental protection. The present invention achieves optimization in hardware requirements. By designing signal processing and algorithm analysis, it reduces dependence on equipment hardware performance, so that the detection equipment does not need to use high-cost precision hardware, such as low-temperature cooling detectors and high-reflectivity mirrors, thereby significantly reducing the cost of use.
[0008] Optionally, in some embodiments, the methane-specific absorption peak is compared with the interfering gas spectrum line through a multi-spectral line weight matching algorithm to suppress cross-sensitivity and obtain the methane characteristic intensity, including: identifying the interfering gas spectrum line that overlaps with the methane-specific absorption peak in the target environment to generate multiple potential interference spectrum lines; assigning an interference weight value to each of the interference spectrum lines based on the correlation between the absorption intensity and concentration of the interfering gas; determining a spectrum line matching threshold according to real-time environmental parameters and the interference weight value; determining the difference boundary between the methane-specific absorption peak and the interference spectrum line according to the spectrum line matching threshold; performing spectrum line stripping on the methane-specific absorption peak through the difference boundary to obtain a methane spectrum signal; normalizing the methane spectrum signal to output the methane characteristic intensity after suppressing cross-sensitivity.
[0009] By adopting the technical solution of the above embodiment, by identifying the interfering gas spectral lines overlapping with the methane-specific absorption peak and generating multiple potential interference spectral lines, various interference factors in a complex environment can be fully considered. Based on the correlation between the absorption intensity and concentration of the interfering gas, an interference weight value is assigned to each interfering spectral line, thereby achieving a quantitative assessment of the impact of different interfering gases. The spectral line matching threshold is further determined based on the real-time environmental parameters and the interference weight value, and the difference boundary between the methane-specific absorption peak and the interference spectral line is determined accordingly, making the extraction of the methane spectral signal more accurate. Finally, by normalizing the methane spectral signal and outputting the methane characteristic intensity after suppressing cross-sensitivity, the measurement inaccuracy caused by interference from other gas signals is effectively reduced, and the credibility of the detection results is improved.
[0010] Optionally, in some embodiments, the real-time environmental parameters include real-time temperature, real-time humidity, and real-time air pressure, and determining the spectral line matching threshold according to the real-time environmental parameters and the interference weight value includes: determining the spectral line matching threshold according to a preset spectral line matching threshold adjustment formula, where the matching threshold adjustment formula includes: ; Among them, θ represents the spectrum line matching threshold, θ0 represents the reference threshold, α, β, and γ are environmental correction coefficients, T represents the real-time temperature, and T ref represents the reference temperature, H represents the real-time temperature, H ref represents reference humidity, P represents real-time air pressure, P ref represents the reference pressure, w i represents the interference weight value, and i is the index number.
[0011] The technical solution of the above embodiment is adopted to introduce real-time environmental parameters to accurately adjust the spectral line matching threshold, significantly enhancing the adaptability of the detection method to environmental changes. Using a preset spectral line matching threshold adjustment formula, environmental factors such as real-time temperature, humidity, and air pressure are comprehensively considered with the interference weight value, so that the spectral line matching threshold can dynamically adapt to different detection environments. This threshold adjustment mechanism based on environmental parameters not only improves the accuracy of distinguishing between methane-specific absorption peaks and interference spectral lines, but also effectively reduces measurement errors caused by environmental fluctuations, further improving the accuracy and stability of detection, and ensuring that methane gas can still be accurately detected in complex and changing environments.
[0012] Optionally, in some embodiments, based on the correlation between the absorption intensity and concentration of the interfering gas, an interference weight value is assigned to each interference spectrum line, including: obtaining the absorption intensity distribution spectrum line data of the interfering gas at different concentrations; performing linear or nonlinear regression analysis based on the absorption intensity distribution spectrum line data and known concentration data to obtain the intensity and concentration correlation coefficients of multiple spectrum lines; inputting the intensity and concentration correlation coefficients into a preset weight allocation function to obtain the interference weight value assigned to the interference spectrum line, and the interference weight value assigned to the interference spectrum line is related to the sensitivity of the absorption intensity to concentration changes.
[0013] Using the technical solution of the above embodiment, by acquiring absorption intensity distribution spectral data of interfering gases at different concentrations and performing linear or nonlinear regression analysis on known concentration data, the intensity-concentration correlation coefficients of multiple spectral lines are obtained, providing a reliable basis for weight assignment. These correlation coefficients are input into a preset weight assignment function. The resulting interference weights for the interfering spectral lines more accurately reflect the degree of interference of each interfering spectral line on methane detection, thereby more effectively suppressing cross-sensitivity in subsequent detection processes and improving the reliability of detection results.
[0014] Optionally, in some embodiments, after inputting the intensity and concentration correlation coefficient into a preset weight distribution function to obtain the interference weight value of the interference spectrum line distribution, it also includes: normalizing the interference weight value of the interference spectrum line distribution to obtain a normalized weight coefficient; substituting the normalized weight coefficient into a multi-component spectral superposition model to verify the fit between the interference gas mixed spectrum reconstruction result and the measured data.
[0015] By adopting the technical solution of the above embodiment, the accuracy and credibility of the detection method are further optimized by adding the normalization processing of the interference weight value assigned to the interference spectrum line and the multi-component spectrum superposition model verification step. The interference weight value assigned to the interference spectrum line is normalized to obtain a normalized weight coefficient, so that the weight distribution of each interference spectrum line is more reasonable and unified, which is convenient for subsequent calculations and comparisons. The normalized weight coefficient is substituted into the multi-component spectrum superposition model to verify the fit between the reconstruction result of the interference gas mixed spectrum and the measured data, which can effectively evaluate the rationality of the weight distribution and the accuracy of the model. If the reconstruction result has a high fit with the measured data, it proves the scientific nature of the weight distribution and model construction, thereby providing a more reliable guarantee for subsequent methane detection and further improving the performance and stability of the entire detection system.
[0016] Optionally, in some embodiments, a drift compensation model is constructed using real-time environmental parameters, including: determining a weight coefficient of the influence of each environmental parameter on drift based on the correlation between the real-time environmental parameters and the historical drift amount; constructing a nonlinear drift compensation function based on the weight coefficient; optimizing the parameters of the drift compensation function through an online calibration experiment to generate dynamically updated compensation model parameters; and constructing the drift compensation model based on the compensation model parameters.
[0017] By adopting the technical solution of the above embodiment, a drift compensation model based on real-time environmental parameters is constructed, which effectively solves the drift problem caused by changes in environmental factors during the detection process, and further improves the stability and reliability of the detection results. First, based on the correlation between real-time environmental parameters and historical drift amounts, the weight coefficient of each environmental parameter on the drift is determined, and the degree of influence of different environmental factors on the detection results is clarified. The nonlinear drift compensation function constructed based on the weight coefficient can more accurately describe the complex relationship between environmental parameters and drift amounts. The drift compensation function is optimized through online calibration experiments to generate dynamically updated compensation model parameters, so that the drift compensation model can adapt to environmental changes in real time and effectively offset the drift effect. This not only reduces the need for frequent calibration and reduces maintenance costs, but also improves the stability and service life of the equipment, further enhancing the practicality and economy of the detection method.
[0018] Optionally, in some embodiments, the drift compensation function includes: ; Where, ΔC comp Indicates the drift compensation amount; E i (i=1,2,3) and E j (j=1,2) represent real-time environment parameters, E i,ref and E j,ref They represent reference environment parameters, t represents detection time, α i, β, γ j , δ, and λ represent the weight coefficients respectively.
[0019] By adopting the technical solution of the above embodiment, the construction details of the drift compensation model are further clarified by limiting the specific form of the drift compensation function, making the detection method more operational and accurate. The drift compensation function comprehensively considers multiple real-time environmental parameters and their reference values, such as temperature, humidity, air pressure, etc., and quantifies the influence of each parameter by introducing a weight coefficient, which can more comprehensively and meticulously describe the influence of environmental factors on methane detection. This multi-parameter comprehensive compensation mechanism effectively improves the accuracy and adaptability of drift compensation, ensuring that the characteristic intensity of methane can be accurately calibrated under different environmental conditions. At the same time, the dynamic update characteristics of the drift compensation function enable it to continuously adapt to environmental changes, further improving the stability and reliability of the detection system, and providing a strong guarantee for the realization of high-precision ppb-level methane gas online detection.
[0020] In a second aspect, an embodiment of the present invention provides an electronic device, comprising: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the electronic device to execute the method described in the first aspect or the second aspect, and any possible implementation of the first aspect or the second aspect.
[0021] In a third aspect, the present invention provides a computer-readable storage medium comprising instructions, which, when executed on the electronic device, enables the electronic device to execute the method described in the first aspect or the second aspect, and any possible implementation of the first aspect or the second aspect.
[0022] In a fourth aspect, the present invention provides a computer program product comprising instructions, which, when the computer program product is run on the electronic device, enables the electronic device to execute the method described in the first aspect or the second aspect, and any possible implementation of the first aspect or the second aspect.
[0023] It is understood that the electronic device provided in the second aspect, the storage medium provided in the third aspect, and the computer program product provided in the fourth aspect are all used to execute the method provided by the present invention. Therefore, the beneficial effects that can be achieved can be referred to the beneficial effects of the corresponding methods and will not be repeated here.
[0024] One or more technical solutions provided by the present invention have at least the following technical effects or advantages: 1. Reduce hardware performance dependence and usage costs: This invention optimizes the detection process through advanced signal processing and algorithmic analysis, eliminating the need for expensive precision hardware such as cryogenically cooled detectors and high-reflectivity mirrors, significantly reducing operational costs. Furthermore, adaptive calibration and dynamic adjustment of environmental parameters reduce reliance on hardware stability, further reducing maintenance costs and complexity.
[0025] 2. Improve detection accuracy and reliability: This method effectively removes noise interference and accurately extracts methane-specific absorption peaks through multi-scale noise separation and baseline correction. A multi-line weight matching algorithm suppresses cross-sensitivity and improves detection accuracy. A drift compensation model based on real-time environmental parameters adaptively calibrates methane characteristic intensity, effectively offsetting interference from environmental factors, reducing the need for frequent calibration, and improving device stability and reliability.
[0026] 3. Enhance environmental adaptability and stability: This invention significantly enhances the detection method's adaptability to changing environments by dynamically adjusting the line-matching threshold and drift compensation model using real-time environmental parameters. Specifically, by utilizing a preset line-matching threshold adjustment formula and a nonlinear drift compensation function that comprehensively considers real-time environmental factors such as temperature, humidity, and air pressure, the detection system maintains high precision and stability in complex and changing environments, ensuring the accuracy and reliability of detection results. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The accompanying drawings are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present invention, and together with the specification, are used to explain the principles of the present invention. Obviously, the drawings described below are only some embodiments of the present invention, and those skilled in the art can derive other drawings based on these drawings without inventive effort. In the drawings: Figure 1 This is a flow chart of a method for online detection of ppb-level methane gas according to an embodiment of the present invention; Figure 2 It is a schematic diagram of the architecture of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0028] The terms used in the following embodiments of the present invention are for the purpose of describing specific embodiments only and are not intended to limit the present invention. As used in the specification of the present invention, the singular expressions "a," "an," "above," "the," and "this" are intended to include the plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used in the present invention refers to any and all possible combinations of one or more of the listed items.
[0029] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying relative importance or implicitly indicating the quantity of the technical features indicated. Thus, a feature designated "first" or "second" may explicitly or implicitly include one or more of such features. In the description of the embodiments of the present invention, unless otherwise specified, "plurality" means two or more.
[0030] It should also be noted that, unless otherwise clearly specified and limited, in the embodiments of the present invention, terms such as "setting" and "connection" should be understood in a broad sense. For example, "connection" can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, or it can be the internal connection of two components; it can be a wired communication connection or a wireless communication connection. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to the specific circumstances. The embodiments of the present invention are described in detail below.
[0031] Methane concentrations in the atmosphere typically range from parts per million to parts per billion (ppb), but its global warming potential (GWP) over a century is 28 times that of carbon dioxide. Even small increases (e.g., ppb-level fluctuations) can significantly exacerbate climate change. Furthermore, methane leaks are a major safety hazard in the energy industry (natural gas pipelines, shale gas extraction). Even trace leaks of 0.1 ppb, accumulated over time, can pose an explosion risk (the lower explosion limit of methane is 4.4% by volume). Furthermore, ppb-level methane released from agricultural activities (ruminants, rice paddies) and wetlands is a key parameter in carbon cycle research, and accurate monitoring supports the development of emission reduction strategies and the achievement of targets.
[0032] ppb-level methane detection plays a key role in curbing global warming (its greenhouse effect is 28 times stronger than CO2), preventing industrial leakage accidents (such as trace leaks in natural gas pipelines), and optimizing emission reduction strategies in the agriculture and energy industries, providing highly sensitive data support for environmental monitoring and energy security.
[0033] Among the related technologies, the commonly used ppb-level methane detection technology mainly relies on high-precision spectroscopic methods. For example, tunable diode laser absorption spectroscopy (TDLAS) uses a narrow-linewidth laser to scan the characteristic absorption peak of methane (such as the 3.3 μm band), combined with a long optical path gas chamber (>100 m) or optical cavity enhancement technology (such as cavity ring-down spectroscopy CRDS) to improve sensitivity, which can achieve a detection limit of 1-10 ppb. In addition, off-axis integrated cavity output spectroscopy (OA-ICOS) and photoacoustic spectroscopy based on quantum cascade lasers (QCL) are also used for trace methane detection, but they rely on precision hardware such as cryogenically cooled detectors and high-reflectivity mirrors (reflectivity >99.99%), resulting in high equipment costs (hundreds of thousands to millions of yuan), bulky size, complex maintenance, and relatively high cost of use.
[0034] Therefore, the embodiment of the present invention provides an algorithm-driven ppb-level methane gas online detection technology. Through signal processing and multi-model collaborative optimization, it overcomes the dependence of traditional high-precision spectroscopy technology on complex hardware systems and realizes low-cost, miniaturized, and highly stable real-time monitoring of ultra-low concentration methane.
[0035] Compared with traditional solutions, this embodiment uses multi-scale noise separation and baseline correction technology combined with a dynamic spectral line weight matching algorithm. Without the need for long optical path air cavities or ultra-high reflectivity optical devices, it can achieve efficient extraction of methane characteristic absorption peaks and cross-interference suppression using only ordinary infrared spectrum data, thereby improving anti-interference capabilities and effectively solving the false alarm problem in an environment where multiple gas components coexist.
[0036] Furthermore, an adaptive drift compensation model based on real-time environmental parameters corrects characteristic intensity deviations through dynamic feedback from temperature, humidity, and pressure, reducing calibration frequency and improving the reliability of long-term monitoring at industrial sites. Furthermore, the dual-engine power of a deep learning concentration inversion model and an unsupervised anomaly detection algorithm not only overcomes the traditional linear inversion's reliance on ideal operating conditions, but also accurately identifies ppb-level concentration fluctuations in complex noise environments, enabling precise detection of leaks through time-series data analysis.
[0037] The embodiment of the present invention reduces the requirements for device hardware performance through full-process algorithm closed-loop optimization, has the advantages of low cost, miniaturization, high adaptability, etc., and can be widely used in various scenarios.
[0038] The following combination Figure 1 , specifically describing a ppb-level methane gas online detection method provided in this embodiment, comprising the following steps: Step 201: Collect infrared absorption spectrum signals of the gas to be measured in the target environment.
[0039] Specifically, an optical detection system can be built using a non-dispersive infrared (NDIR) sensor or a tunable diode laser (TDLAS). When the target gas flows through a closed gas chamber, an infrared light source (such as a broadband halogen lamp or a 3.3 μm band laser) emits infrared light in a specific wavelength range (such as 3.2-3.4 μm). After being absorbed by the measured gas in the gas chamber, the attenuated light intensity is received by a thermopile detector or a photodiode and converted into an electrical signal.
[0040] The light intensity signal is captured in real time at a sampling rate of 1 kHz using a high-precision analog-to-digital converter (ADC, 24-bit resolution), and the ambient temperature, air pressure, and humidity parameters are recorded synchronously to compensate for thermal drift and scattering interference. The infrared absorption spectrum signal is ultimately output with a time resolution of 1 second.
[0041] Step 202: Acquire raw spectrum data containing methane and interfering gas from the infrared absorption spectrum signal.
[0042] Specifically, the infrared absorption spectrum signal undergoes preliminary preprocessing, including low-pass filtering (cutoff frequency 100Hz) to remove high-frequency circuit noise and baseline fitting (such as Savitzky-Golay smoothing) to eliminate low-frequency baseline offsets caused by light source fluctuations. Subsequently, the time-domain signal is converted into a frequency-domain absorption spectrum using Fourier transform or wavelength calibration algorithms (such as absorption peak positioning based on a reference gas). The characteristic absorption peak of methane (near 3.3μm) and the absorption lines of coexisting interfering gases (such as water vapor and ethane in the 2.7μm or 3.4μm bands) are extracted. This forms a raw spectral dataset containing a wavelength-absorbance matrix. This is then stored as structured data (such as HDF5 format) to obtain the raw spectral data, providing input for subsequent noise separation and feature extraction.
[0043] Step 203 : performing multi-scale noise separation and baseline correction on the original spectral data to obtain effective spectral features after denoising.
[0044] This step aims to separate random noise and systematic noise from the raw spectral data and eliminate baseline drift to extract effective spectral features.
[0045] Specifically, multiscale wavelet decomposition (MDW) is first used to perform multiresolution analysis on the raw spectral data. For example, a five-layer decomposition using Daubechies wavelet basis functions (such as db5) is performed on the signal, dividing the spectral signal into high-frequency detail components (D1-D5) and low-frequency approximation components (A5). High-frequency components (D1-D3) correspond to random noise such as sensor circuit noise and photodetector thermal noise, and are filtered out using an adaptive threshold noise reduction algorithm (such as the SUREShrink threshold method). Low-frequency components (D4-D5) may contain baseline fluctuations caused by light source drift or gas cell window contamination and require further processing.
[0046] Subsequently, for baseline correction, the asymmetric least squares (ALS) method is used to iteratively fit the low-frequency component: the smoothing parameter λ (such as 1e5) and the asymmetric weight parameter p (such as 0.01) are set, the baseline curve is fitted by minimizing the objective function (weighted residual sum of squares), and the baseline is subtracted point by point to obtain a flattened spectral signal.
[0047] Finally, the denoised high-frequency details and the corrected low-frequency signals are reconstructed to generate effective spectral features with improved signal-to-noise ratio (for example, from the original SNR=10dB to SNR=25dB) and reduced baseline offset (for example, the baseline fluctuation is reduced from ±5% to ±0.2%). The effective spectral features are specifically an effective spectral feature matrix.
[0048] This process can be accelerated by GPU (such as CUDA parallel computing) to achieve real-time processing, ensuring that the noise separation and baseline correction of a single spectral data are completed within 1 second, meeting the timeliness requirements of online detection.
[0049] Step 204 : extracting methane-specific absorption peaks from the effective spectral features based on a preset methane characteristic spectral line database.
[0050] This step is based on a preset methane characteristic spectral line database (including the main absorption peak, secondary peak, and temperature-pressure broadening parameters of methane near 3.3 μm), accurately locating the methane absorption peak from the effective spectral features and quantifying its intensity.
[0051] First, the denoised spectrum is compared with the theoretical absorption spectrum in the database through a spectral matching algorithm (such as dynamic time warping DTW or correlation coefficient method), and the similarity score of each wavelength point is calculated (such as the correlation coefficient threshold is set to 0.9) to preliminarily screen the candidate absorption peaks.
[0052] Subsequently, nonlinear least squares fitting (Levenberg-Marquardt algorithm) was used to perform a detailed analysis of the candidate peaks: the Voigt line shape (taking into account both Doppler and collision broadening effects) was used as the fitting function, and the peak position (λ), peak height (A), half-width at half maximum (FWHM) and baseline offset were used as optimization variables. The measured spectral curve was iteratively approximated, and the residual sum of squares (RSS) was calculated to evaluate the goodness of fit (for example, when RSS < 1e-4, it was determined to be a valid methane peak).
[0053] At the same time, principal component analysis (PCA) or independent component analysis (ICA) is used to separate the absorption lines of coexisting interfering gases (such as the adjacent peak of ethane at 3.4 μm), and cross-sensitivity is suppressed by projecting them into an orthogonal feature space.
[0054] Finally, the integrated area or peak height of the methane-specific absorption peak is extracted as the characteristic intensity, and the preliminary concentration value is calculated in combination with the absorption coefficient in the database (such as the line intensity S provided by the Hitran database).
[0055] In this embodiment, the robustness of feature extraction can be ensured by setting a confidence interval (such as peak position deviation <0.1 nm, half-height width matching error <5%), and finally outputting the relevant parameters of the methane-specific absorption peak.
[0056] Step 205 : Using a multi-spectral line weight matching algorithm, the methane specific absorption peak is compared with the interfering gas spectrum line to suppress cross-sensitivity and obtain the methane characteristic intensity.
[0057] Among them, cross-sensitivity refers to the phenomenon that when detecting methane, the measurement is inaccurate due to interference from other gas signals.
[0058] This implementation leverages the prior spectral characteristics of the interfering gas (wavelength position, absorption intensity, and broadening properties) to perform a multi-component decomposition of the measured spectrum. Using a least-squares optimization algorithm, the algorithm dynamically assigns weight coefficients to each spectral line, removing the interfering signal from the mixed spectrum. A constrained optimization framework (such as non-negative weight constraints and normalization conditions) ensures physical interpretability. A sliding window mechanism is introduced to adapt to dynamic changes in gas composition in real time. This allows for precise extraction of methane's characteristic absorption intensity in complex multi-gas scenarios, eliminating baseline shifts and spurious peak interference caused by cross-sensitivity.
[0059] Specifically, a preset high-resolution absorption spectrum database containing methane and common interfering gases (such as ethane, water vapor, carbon dioxide, etc.) is first called. The database covers the absorption coefficient, temperature-pressure broadening parameters and interference weight threshold of each gas in the target band (such as around 3.3 μm).
[0060] After receiving valid spectral features, the algorithm uses spectral deconvolution to decompose the mixed absorption spectrum into a linear combination of the primary methane component and the secondary interfering gas components. Specifically, through non-negative matrix factorization (NMF) or sparse coding techniques, the measured spectrum is expressed as a weighted sum of basis functions (i.e., the theoretical spectral lines of each gas). L1 regularization constraints are introduced to enhance the sparsity of the solution, thereby highlighting the dominant methane component and suppressing secondary interfering gases.
[0061] Furthermore, the algorithm uses iteratively reweighted least squares (IRLS) to dynamically optimize the weight coefficients. The contribution weights of interfering spectral lines are adjusted through multiple iterations until the residual error between the reconstructed and measured spectra converges to a preset threshold (e.g., mean square error <1e-6). During this process, the algorithm incorporates a sliding window mechanism to fine-tune the weight assignment for localized regions of the spectrum (e.g., a ±0.5 nm window centered on the methane absorption peak), effectively resolving the issue of ambiguous attribution caused by spectral line overlap.
[0062] Finally, the purified methane characteristic intensity is obtained by spectral subtraction of the interference component, and its cross-sensitivity suppression rate can be effectively improved, which is better than the traditional single-peak detection method.
[0063] Step 206 : Adaptively calibrate the methane characteristic intensity according to the drift compensation model constructed based on the real-time environmental parameters to obtain a calibrated characteristic intensity.
[0064] This embodiment achieves dynamic stability compensation for detection signals by building a correlation model between environmental variables and system drift. This embodiment can identify and quantify the nonlinear effects of environmental fluctuations (temperature, humidity, air pressure) and hardware aging on feature strength.
[0065] Multi-source sensors are integrated to collect environmental parameters in real time, constructing a multidimensional input vector containing time-series historical data (such as the average value and change gradient over the previous 60 seconds) and spatial distribution characteristics (such as temperature differences within the sensor). Based on this, an ensemble learning framework (such as random forest or gradient boosting tree) is used to train the drift prediction model. The training data is obtained through laboratory accelerated aging experiments and multi-environment simulation tests, covering a temperature range of -40°C to 85°C, a humidity of 10% to 95%, and an air pressure range of 70-110 kPa.
[0066] The model learns the complex mapping relationship between environmental parameters and signal drift, and outputs drift compensation factors (such as gain coefficients and bias terms) in real time during the online phase. At the same time, a recursive filtering mechanism (such as Kalman filtering or particle filtering) is introduced to fuse real-time observation data with model predictions, dynamically correcting the uncertainty of the compensation parameters.
[0067] In addition, for long-term drift, the autoregressive moving average (ARIMA) model can be embedded to analyze the time series trend of feature intensity and predict the drift direction in advance to achieve preventive calibration.
[0068] Through the above-mentioned multi-model collaboration, the fluctuation amplitude of the calibrated feature intensity in extreme environments can be significantly reduced, and there is no need for frequent manual calibration, which significantly improves the environmental robustness and maintenance efficiency of the system.
[0069] Step 207 : Mapping the calibrated feature intensity to a ppb-level methane concentration value through a pre-trained concentration inversion model.
[0070] Specifically, a theoretical concentration calculation framework is first established based on the generalized Beer-Lambert law. The baseline concentration value is calculated using the methane absorption coefficient (ε), optical path length (L), and environmental correction factors (temperature T, air pressure P). The calculation formula is as follows: ; Among them, C base is the baseline concentration, f(T,P) is the correction function for the temperature-pressure broadening effect, I 校准 is the characteristic intensity after calibration.
[0071] However, in ppb-level detection, the nonlinear response of the detector, light path scattering loss, and intermolecular collision effects can cause the theoretical model to deviate from reality. To this end, a deep residual network (ResNet) is introduced to construct an error correction model: the network input includes the baseline concentration C base , environmental parameters and spectral characteristics (such as absorption peak symmetry, signal-to-noise ratio), and outputs the concentration residual ΔC. The network is trained end-to-end using millions of calibration data (provided by quantum cascade laser spectrometers) to learn the spatial distribution characteristics and nonlinear response patterns of system errors. During online inference, the final concentration C final Calculated as: C final =C base +ΔC.
[0072] To ensure long-term reliability, this embodiment integrates an online self-learning module. This module periodically (e.g., every 24 hours) injects zero gas (N2) and standard gas (e.g., 50 ppb CH4 / N2). By comparing measured values with expected values, the network weights and theoretical model parameters are dynamically updated. This hybrid architecture achieves an absolute error of ±1 ppb within the 0-100 ppb range and adapts to different hardware configurations through transfer learning techniques (e.g., domain adaptation), forming a scalable and universal inversion engine.
[0073] Step 208 : Arrange the multiple ppb-level methane concentration values according to a time series relationship to obtain concentration time series data.
[0074] Specifically, based on the time series data modeling framework, the real-time ppb-level methane concentration values (sampling frequency 1 Hz) are strictly aligned with the UTC timestamp, and interpolation algorithms (such as linear interpolation or cubic spline interpolation) are used to fill in missing data points caused by communication delays or sensor failures to ensure the equally spaced characteristics of the time series (Δt = 1 second).
[0075] Furthermore, a sliding window statistical method (60-second window length, 1-second step length) is used to calculate the local mean and variance, generating smoothed concentration trajectories (e.g., Savitzky-Golay filtering) to mitigate random noise interference with trend analysis. For data storage, a sharded storage structure is designed for a time series database (e.g., InfluxDB), partitioned by hour and establishing an inverted index to support millisecond-level range queries. Metadata tags (e.g., sensor ID, geolocation coordinates) can also be embedded to achieve spatiotemporal fusion of multi-node monitoring data, providing grid-based analysis capabilities for macro-leak source tracing.
[0076] The final output of concentration time series data combines high resolution (1 second level), completeness (missing rate <0.1%), and scalability (supporting real-time writing of TB-level data), providing a data foundation for subsequent dynamic pattern analysis.
[0077] Step 209 : Input the concentration time series data into a preset anomaly detection model to detect whether a methane leakage event occurs in the target environment.
[0078] The anomaly detection model uses a hierarchical anomaly detection architecture, combining threshold triggering with a deep learning model to capture sudden leaks and slowly accumulating anomalies. The anomaly detection model includes the following structural layers: The primary detection layer: Based on the 3σ-EWMA (exponentially weighted moving average) model, it dynamically calculates a local baseline for the concentration series (with a 300-second window length). A primary alarm is triggered when the real-time concentration exceeds the baseline + 3σ (σ is the sliding standard deviation) for 5 consecutive seconds. This layer achieves millisecond-level response to sudden leaks (such as pipeline ruptures) with a false alarm rate of less than 1%. The 3σ-EWMA model is a time-series anomaly detection algorithm that integrates dynamic baseline estimation with statistical process control. Its core principle is to weight historical data using exponentially decaying weights to construct an adaptive baseline and calculate a fluctuation threshold, thereby capturing abnormal events that deviate from the normal fluctuation range. Specifically, the model assigns a time decay factor (e.g., λ = 0.2) to the input time-series concentration data (e.g., second-by-second methane concentration values), giving more weight to recent data. The model then calculates the exponentially weighted mean (EWMA mean) and standard deviation (EWMA standard deviation) in real time, dynamically updating the baseline level (baseline = EWMA mean ± 3 × EWMA standard deviation). Anomaly alarms are triggered when real-time concentration values consistently exceed the baseline range. This model suppresses false alarms by smoothing historical noise (such as Gaussian white noise), and adapts to sudden increases or slow-changing concentration trends (such as trace accumulation in the early stages of a leak) through rapid response weights (such as λ value adjustment). Compared with the fixed threshold method, its false alarm rate is reduced by more than 50%, making it particularly suitable for real-time monitoring scenarios in non-steady-state environments (such as day and night temperature differences causing concentration baseline drift).
[0079] Advanced Detection Layer: A spatiotemporal graph convolutional network (ST-GCN) is used to model the spatiotemporal correlations of multi-sensor data. The network inputs are a concentration time series matrix (N sensors × T time steps) and a sensor spatial adjacency matrix (built based on GIS coordinates). A graph convolutional layer extracts spatial dependency features, and a coupled gated recurrent unit (GRU) captures temporal evolution patterns. The output is an anomaly probability score (0-1) for each node. A probability greater than 0.95 and persisting for 10 minutes is considered a persistent leak (e.g., a chronic leak in an underground pipeline).
[0080] Root cause analysis layer: Based on a spatiotemporal diffusion model of the leak event (such as the Gaussian plume model), the leak source location and release rate are inverted. Using a Bayesian inference framework, multi-sensor concentration time series data is used as observations. Leak source parameters (coordinates x, y, intensity Q) are estimated through Markov Chain Monte Carlo (MCMC) sampling, achieving a location error of less than 3 meters.
[0081] The anomaly detection model in this embodiment continuously adapts to environmental changes through online learning mechanisms (such as elastic weight curation (EWC)), effectively reducing false alarm rates. It also supports quantitative assessment of leak levels (e.g., micro leaks <10 ppb / min, severe leaks >100 ppb / min), providing a basis for graded decision-making in emergency response. This enables early and accurate warning of methane leaks.
[0082] Through the aforementioned methods and steps, this embodiment reduces reliance on high-precision hardware, significantly reducing costs while maintaining ppb-level methane detection performance. Traditional infrared detection relies on high-performance sensors (such as quantum cascade lasers and long-path constant-temperature gas chambers) to overcome noise and drift. This embodiment improves the signal-to-noise ratio at the software level through multi-scale noise separation and baseline correction. This algorithm-enhanced algorithm enables low- and mid-range sensors (such as uncooled thermopile detectors) to reach the detection limit of high-end hardware (1 ppb), reducing hardware procurement costs by over 60%. A multi-line weight matching algorithm replaces complex filters or spectrometer systems through dynamic interference suppression, eliminating the need for multi-channel detectors or high-resolution spectral modules. A drift compensation model uses environmental parameters to modify feature intensities in real time, reducing the need for constant-temperature and constant-pressure gas chambers and precision temperature control circuits. A pre-trained concentration inversion model uses data-driven correction for hardware nonlinearity, reducing stringent requirements for detector linearity and light source stability. The overall solution uses algorithm optimization to achieve hardware performance replacement. While maintaining a detection accuracy of 0.1-100 ppb (error ±1 ppb), it reduces equipment manufacturing costs by more than 50% and reduces operation and maintenance costs (such as calibration frequency and consumables replacement), providing a cost-effective solution for large-scale deployment in industrial sites and monitoring in remote areas.
[0083] By leveraging the innovative concept of "algorithms replacing hardware," the embodiments of the present invention achieve a breakthrough balance between cost, portability, interference resistance, and real-time performance, providing a cost-effective solution for methane emission reduction monitoring and production safety early warning. This solution is particularly suitable for distributed deployment and long-term unattended monitoring under complex working conditions, and has significant economic value and social significance.
[0084] In some embodiments, step 205 may further include the following steps: S2051, identifying interfering gas spectral lines in the target environment that overlap with the methane-specific absorption peak, and generating multiple potential interfering spectral lines.
[0085] Specifically, a pre-built multi-gas spectral fingerprint library (covering the absorption coefficients and broadening parameters of common interfering substances such as ethane, propane, and water vapor in the 3.0-3.5 μm band) can be used. A dynamic line matching algorithm (such as dynamic time warping or cross-correlation analysis) is used to calculate the similarity score between the measured spectrum and the theoretical spectral lines of each interfering gas within a ±0.5 nm range, centered on the methane-specific absorption peak. If the Pearson correlation coefficient in a local region exceeds a threshold (e.g., >0.85), the spectral line is identified as a potential interfering line. Wavelet decomposition techniques are also introduced to perform multi-scale noise filtering on the spectrum (e.g., db4 wavelet basis 5-layer decomposition) to eliminate high-frequency noise that interferes with matching accuracy. Ultimately, a list of candidate interfering lines (e.g., the 3.31 μm peak for ethane and the 3.28 μm peak for water vapor) and their wavelength offsets are generated, forming a list of multiple interfering lines.
[0086] S2052: Allocate an interference weight value to each interference spectral line based on the correlation between the absorption intensity and concentration of the interfering gas.
[0087] Specifically, a weight distribution model is constructed based on the nonlinear relationship between the absorption intensity and concentration of interfering gases. For each interfering gas, a concentration-absorbance response function (such as a polynomial regression or sigmoid function) is fitted using laboratory calibration data (absorption intensity curves at different concentrations). The theoretical absorption intensity under the current environmental parameters (temperature and pressure) is calculated and compared with the integrated intensity of the corresponding interfering spectral line in the measured spectrum.
[0088] The weight calculation uses an entropy-based approach: A multi-index evaluation matrix is constructed based on the ratio of the measured to theoretical intensity of the interference line (deviation), the wavelength spacing from the main methane peak (interference potential), and the prior probability of coexisting gas concentrations (such as the typical proportion of ethane in a natural gas environment). The contribution of each indicator is quantified using information entropy, and a normalized interference weight value (summing to 1) is ultimately assigned. The interference weight value reflects the potential impact of the interference line on methane measurement. Higher weights indicate greater cross-sensitivity to methane detection and require priority suppression.
[0089] In some embodiments, step S2052 may further include the following steps: (1) Obtain the absorption intensity distribution spectral line data of the interfering gas at different concentrations.
[0090] Specifically, a series of interfering gas samples with known concentrations are first prepared, covering the range of concentrations likely to occur in actual testing. These samples are then placed in an infrared spectroscopy analysis system. Using a high-precision infrared light source and detector, multiple spectral scans are performed for each interfering gas concentration to obtain its absorption intensity distribution at different wavelengths. To ensure data accuracy, the collected spectral data requires preprocessing, such as noise removal and baseline correction. Furthermore, environmental parameters such as temperature and pressure are recorded during the experiment, as these factors can affect the gas's absorption characteristics.
[0091] In this way, the absorption intensity distribution spectral line data of the interfering gas at different concentrations can be fully obtained, providing a reliable data basis for subsequent regression analysis.
[0092] (2) Based on the absorption intensity distribution spectrum line data and known concentration data, perform linear or nonlinear regression analysis to obtain the correlation coefficient between the intensity and concentration of multiple spectrum lines.
[0093] Specifically, the absorption intensity distribution spectral data obtained in the first step is combined with the corresponding known concentration data. An appropriate regression model is selected, using either linear or nonlinear regression, depending on the assumption of a linear relationship in the data. Model parameters are estimated using optimization algorithms such as the least squares method to minimize the error between the predicted values and the actual concentration values. The regression analysis results in correlation coefficients between the intensity of each spectral line and its concentration, reflecting the sensitivity of the line intensity to changes in concentration.
[0094] To ensure the reliability of the regression model, statistical tests such as R² values and significance tests are required to assess the model's goodness of fit and predictive ability. The key to this step lies in properly selecting the regression model and accurately calculating the correlation coefficient between the intensity and concentration of each spectral line, providing a scientific basis for subsequent weight allocation.
[0095] (3) The intensity-concentration correlation coefficient is input into a preset weight distribution function to obtain the interference weight value of the interference spectrum line distribution.
[0096] The interference weight value assigned to the interference spectrum line is related to the sensitivity of the absorption intensity to the concentration change.
[0097] Specifically, a weight distribution function is constructed, which takes the intensity-concentration correlation coefficient as the input variable. The design of the weight distribution function should ensure that the weight value can reasonably reflect the sensitivity of the absorption intensity to concentration changes. Generally, the spectral line with a higher correlation coefficient should have a correspondingly higher weight value, because this means that the spectral line is more sensitive to concentration changes and interferes with methane measurement more significantly. By substituting the correlation coefficient into the weight distribution function, the interference weight value of each interfering spectral line is calculated. The expression of the weight distribution function can be: ; Among them, w i is the interference weight value of the i-th interference spectrum line; r i is the correlation coefficient between the intensity and concentration of the i-th interference line; α is a tuning parameter used to control the steepness of weight distribution and can be adjusted according to actual application requirements; n is the total number of interfering spectral lines.
[0098] The weight distribution function takes the correlation coefficient r i Normalization is performed to ensure that the sum of all weights is 1. The degree of concentration of weight distribution can be adjusted by adjusting the parameter α. When α is large, the weights are more concentrated on the spectra with higher correlation coefficients. When α = 1, the weight distribution is proportional to the correlation coefficient.
[0099] This step requires comprehensive consideration of the interference degree and measurement requirements of each spectral line to achieve reasonable weight distribution of the interfering spectral lines and provide an accurate quantitative basis for subsequent spectral line matching and interference suppression.
[0100] In some embodiments, after step (3), the method further includes: (4) Normalize the interference weight value assigned to the interference spectrum line to obtain a normalized weight coefficient.
[0101] First, the interference weight value set {w1,w2,…,w n Normalization is performed. The goal of normalization is to map all weight values to a uniform range, usually [0, 1], to facilitate subsequent calculations and comparisons. Normalization can be performed using a variety of methods, including linear normalization and min-max normalization.
[0102] (5) Substitute the normalized weight coefficient into the multi-component spectral superposition model to verify the fit between the reconstructed results of the interfering gas mixture spectrum and the measured data.
[0103] The normalized weight coefficients {w1′, w2′,…, w n Substitute into the multi-component spectrum superposition model. This model is based on the linear superposition principle and assumes that the mixed spectrum is the result of weighted superposition of each component spectrum according to its weight coefficient. Mathematically, it can be expressed as: ; Among them, S reconstructed (λ) is the reconstructed mixed spectrum, S i (λ) is the spectrum of the i-th interfering gas. In order to verify the fit between the reconstruction result and the measured data, statistical analysis methods are used, such as calculating the coefficient of determination (R 2 ), root mean square error (RMSE) and other indicators.
[0104] Specifically, the absorption intensity of the reconstructed spectrum is compared with that of the measured spectrum in the same wavelength range, and the difference between them is calculated. 2 A value close to 1 and a small RMSE indicate that the reconstruction results have a high degree of fit with the measured data, verifying the accuracy and reliability of the model. This process not only helps to evaluate the rationality of the weight distribution but also provides a basis for model optimization and improvement.
[0105] S2053: Determine a spectrum line matching threshold according to the real-time environmental parameters and the interference weight value.
[0106] Specifically, first, real-time environmental parameters such as temperature, humidity, and air pressure are collected. These parameters have a significant impact on the absorption spectrum of the interfering gas. Combined with the interference weight value, a dynamic spectrum line matching threshold model is established. This model determines the matching threshold for distinguishing between methane-specific absorption peaks and interference spectrum lines under current environmental conditions by analyzing the relationship between environmental parameters and interference weight values. Specifically, the spectrum line matching threshold model may use methods such as multivariate linear regression and neural networks to dynamically adjust the matching threshold based on historical data and real-time data. For example, when the ambient temperature rises, the absorption spectrum of the interfering gas may shift or broaden. At this time, the model will adjust the threshold accordingly according to the temperature change to ensure that the spectrum lines of methane and interfering gas can be accurately distinguished. At the same time, the interference weight value will also affect the size of the threshold. Interference spectrum lines with higher weight values require more stringent matching conditions.
[0107] In this way, a reasonable spectral line matching threshold is determined by comprehensively considering the real-time environmental parameters and the interference weight value to effectively distinguish the spectral lines of methane and interfering gases.
[0108] In some embodiments, the real-time environmental parameters include real-time temperature, real-time humidity, and real-time air pressure. This step may specifically include: determining the spectrum line matching threshold according to a preset spectrum line matching threshold adjustment formula, where the matching threshold adjustment formula includes: ; Among them, θ represents the spectrum line matching threshold, θ0 represents the reference threshold, α, β, and γ are environmental correction coefficients, T represents the real-time temperature, and T ref represents the reference temperature, H represents the real-time temperature, H ref represents reference humidity, P represents real-time air pressure, P ref represents the reference pressure, w i represents the interference weight value, and i is the index number.
[0109] In this embodiment, the gas absorption line width broadens with increasing temperature (Doppler effect and collision broadening), and the threshold value needs to be Positive correlation is used to adapt to the spectral line blurring effect.
[0110] Water vapor will change the transmittance of the sensor window through the adsorption effect, introducing baseline drift, exp(βH / H ref ) Dynamically increase the threshold to suppress false alarms caused by humidity.
[0111] When the pressure decreases, the absorption peak height decreases, which needs to be calculated by exp(γP / P ref ) Reduce threshold sensitivity to avoid missed detections at low concentrations. The exponential form effectively captures the nonlinear cumulative effects of environmental parameters, avoiding over-compensation or under-compensation caused by linear superposition.
[0112] Weight Item , compressing the interference gas weight wi to the [−1,1] interval, suppressing the dominant influence of high-weight interference (such as weight saturation when ethane concentration suddenly increases), while retaining the fine-tuning ability of low-weight interference. It is used to smooth transition characteristics, avoid threshold oscillation caused by weight mutation, and improve algorithm stability.
[0113] The matching threshold adjustment formula couples environmental parameters through exponential functions and suppresses interference dominance through weight normalization. Mathematically, it takes into account both sensitivity and stability, and physically conforms to the dynamic response law of gas spectrum detection. It is an effective combination of engineering experience and theoretical models.
[0114] S2054: Determine the difference boundary between the methane-specific absorption peak and the interference spectrum line according to the spectrum line matching threshold.
[0115] Specifically, a spectral line matching threshold is first used as a judgment criterion. This threshold integrates the influence of real-time environmental parameters and interference weight values. By comparing the difference in absorption intensity between the methane-specific absorption peak and the interference line, the boundary position is preliminarily delineated when the intensity of the methane absorption peak exceeds the threshold.
[0116] At the same time, the wavelength shift between the two is analyzed, and the full width at half maximum of each absorption peak is determined using algorithms such as Gaussian fitting, which serves as a reference indicator of the boundary. In addition, considering the differences in spectral line shape, such as symmetry and peak state, curve fitting or filtering techniques are used to further refine the difference boundary.
[0117] Ultimately, by combining these multi-faceted analysis results, the difference boundary between the methane-specific absorption peak and the interference spectral line is determined, providing precise guidance for subsequent spectral line stripping.
[0118] S2055, performing spectral line stripping on the methane-specific absorption peak through the difference boundary to obtain a methane spectrum signal.
[0119] Specifically, the separation point between the methane-specific absorption peak and the interfering spectral line is first determined based on the difference boundary. Then, signal processing techniques, such as Fourier transform or wavelet transform, are used to convert the spectral signal from the time domain to the frequency domain or wavelet domain. In this transformed domain, a filter is designed to separate the methane signal based on the frequency or wavelet coefficient range corresponding to the difference boundary.
[0120] A bandpass filter can be used, with a passband corresponding to the characteristic frequency of the methane absorption peak and a stopband covering the frequency range of the interfering spectral lines. Through filtering, the methane absorption signal can be extracted from the mixed spectrum while suppressing the influence of the interfering gas.
[0121] Finally, the filtered signal is inversely transformed and restored to the time domain to obtain a pure methane spectral signal. This process requires precise signal processing algorithms and a deep understanding of spectral characteristics to ensure accurate extraction of the methane signal and effective suppression of interference.
[0122] S2056: Normalize the methane spectrum signal and output the methane characteristic intensity after suppressing cross sensitivity.
[0123] Normalization methods may include mapping the intensity value of the spectral signal to a predefined range, such as [0, 1] or [-1, 1], or normalizing the spectral signal based on characteristics such as the integrated area and peak height. The purpose of normalization is to eliminate signal differences under different measurement conditions and improve the comparability and stability of characteristic intensities. After normalization, the methane characteristic intensity is obtained after suppressing cross-sensitivity. The key to this step is to select an appropriate normalization method to ensure the accuracy and consistency of the methane characteristic intensity and provide reliable input data for the final concentration inversion.
[0124] At the same time, the absorption intensity can be compensated and corrected in combination with real-time environmental parameters (temperature, humidity, and air pressure), and a standardized characteristic value linearly related to the methane concentration can be output, providing highly consistent input for subsequent quantitative inversion and ensuring the accuracy and comparability of cross-scene detection.
[0125] In some embodiments, constructing a drift compensation model based on real-time environmental parameters includes the following steps: S2061: Determine a weight coefficient of the influence of each environmental parameter on the drift based on the correlation between the real-time environmental parameter and the historical drift amount.
[0126] Specifically, a large amount of historical data is first collected, including real-time environmental parameters (such as temperature, humidity, air pressure, etc.) and corresponding drift data. Statistical analysis methods such as multivariate linear regression and principal component analysis are used to evaluate the correlation between each environmental parameter and drift. The correlation analysis can be quantified as a correlation coefficient, expressed as r i , where i represents different environmental parameters. Based on these correlation coefficients, the weight coefficient w of each environmental parameter on the drift is determined i , the weight coefficient can be calculated by normalization so that the sum of all weight coefficients is 1. The specific formula is: ; Among them, w i is the weight coefficient of the i-th environmental parameter, r i is the correlation coefficient of the ith environmental parameter, r j is the correlation coefficient of the jth environmental parameter, and n is the total number of environmental parameters.
[0127] The key to this step is to accurately evaluate the correlation between each environmental parameter and the drift amount, and reasonably allocate weight coefficients to provide a scientific basis for the subsequent construction of the drift compensation function.
[0128] S2062: Construct a nonlinear drift compensation function based on the weight coefficient.
[0129] Specifically, the weight coefficients {w1,w2,…,w n}, construct a nonlinear drift compensation function. Nonlinear functions can use polynomial regression, neural network, support vector machine and other methods. Taking polynomial regression as an example, assuming that the environmental parameters are x1, x2, ..., x n, Drift compensation function f(x1,x2,…,x n ) can be expressed as: ; Among them, ϕ(xi) is the i-th environmental parameter x i Nonlinear transformations, such as polynomial terms and exponential functions, are used. In this way, the nonlinear effects of various environmental parameters are incorporated into the drift compensation function. The purpose of constructing a nonlinear drift compensation function is to capture the complex relationship between environmental parameters and drift, thereby improving the accuracy and adaptability of drift compensation. The key to this step lies in selecting an appropriate nonlinear model and using weight coefficients to rationally integrate the effects of various environmental parameters.
[0130] In some embodiments, in order to achieve accurate drift suppression under complex working conditions and meet the stability requirements of ppb-level monitoring, the drift compensation function may further specifically include: ; Where, ΔC comp Indicates the drift compensation amount; α i , β, γ j , δ, and λ respectively represent the weight coefficients obtained in step S2061.
[0131] Specifically, the parameters of the drift compensation function are defined as follows: E i (i=1,2,3): Real-time environmental parameters, corresponding to the physical values of temperature, humidity, and air pressure respectively.
[0132] E j (j=1,2): Real-time environmental parameters, corresponding to two physical quantities among temperature, humidity and air pressure.
[0133] E i,ref : Reference baseline value of environmental parameters (such as standard laboratory conditions), used for normalization calculations.
[0134] αi : Specifically, it is the weight coefficient of the quadratic term of the environmental parameters, which quantifies the intensity of the nonlinear influence of temperature, humidity, and air pressure on drift.
[0135] β: Specifically, it is the weight coefficient of the cross-coupling term, which controls the contribution ratio of the synergistic effect of temperature and humidity to drift.
[0136] γ j (j=1,2): Specifically used to represent the nonlinear coupling coefficient of temperature and humidity in the cross-coupling term, reflecting the mutual amplification effect between the two.
[0137] δ: The saturation value of the time-accumulated drift, which indicates the theoretical upper limit of the drift after long-term use of the sensor.
[0138] λ: exponential decay coefficient, which determines the rate at which the time-accumulated drift approaches the saturation value δ (unit: h⁻¹).
[0139] t: Accumulated sensor operating time (hours), used to quantify gradual drift caused by aging or contamination.
[0140] The drift compensation function of this embodiment significantly improves the environmental adaptability and long-term stability of the detection system through multi-dimensional parameter coupling and time-domain dynamic correction mechanism, as shown in the following aspects: Multi-parameter collaborative compensation: The first term is in the form of quadratic weighting ( ) captures the nonlinear drift characteristics of environmental parameters such as temperature, humidity, and air pressure (for example, the temperature increase causes the detector gain to attenuate in a square relationship), and avoids overfitting through convex optimization characteristics; the second term is the product term Describe the cross-coupling effects between parameters (such as humidity and temperature jointly affecting the transmittance of an optical window) and enhance the compensation accuracy under the combined action of multiple factors.
[0141] Time domain drift suppression: the third term δ⋅(1−e −λt ) introduces a time decay factor to simulate the gradual drift caused by sensor aging or contamination (such as the accumulation of dark current of the photodetector over time), quickly responds to short-term fluctuations in the early stage (the gradient is maximum at t→0), and gradually saturates in the later stage to avoid overcompensation.
[0142] Advantages of the mathematical structure: the square term forces the compensation curve to be smooth (avoiding mutations), the product term retains the physical interpretability of parameter interactions, the exponential term ensures the convergence of the time integral, and the overall function ensures differentiability while achieving flexible switching between offline calibration and online adaptation through weight coefficients.
[0143] In this embodiment, the function can achieve a long-term drift suppression rate of >90% in a wide temperature range of -40°C to 85°C and a humidity range of 10%-95%, and reduce the 24-hour baseline fluctuation from ±5% to ±0.3%, significantly reducing the frequency of manual calibration and improving ppb-level detection reliability.
[0144] S2063 , optimizing the parameters of the drift compensation function through an online calibration experiment to generate dynamically updated compensation model parameters.
[0145] Specifically, an online calibration experiment is designed to collect environmental parameters and corresponding drift data in real time. Using this data, the drift compensation function constructed in step S2062 is optimized. Parameter optimization can be performed using methods such as gradient descent, genetic algorithm, and particle swarm optimization. Taking gradient descent as an example, the parameters in the function are adjusted by minimizing the mean square error between the predicted drift and the actual drift. The optimization process can be expressed as: θ new =θ old −η⋅∇J(θ old ); Among them, θ new represents the updated compensation model parameters, θ old represents the compensation model parameters before update, η is the learning rate, J is the loss function (such as mean square error), ∇J(θ old ) indicates that the parameter θ old The gradient of the loss function J at this parameter, that is, the rate of change and direction of the loss function at this parameter.
[0146] The real-time data from the online calibration experiment enables the compensation model parameters to be dynamically updated to adapt to changing environmental conditions. The key to this step is to design an effective online calibration experiment and select an appropriate optimization algorithm to ensure the real-time and accuracy of the compensation model parameters.
[0147] S2064: Construct the drift compensation model based on the compensation model parameters.
[0148] Among them, the drift compensation model can automatically calculate and compensate the drift amount according to the real-time environmental parameters, thereby improving the stability of the measurement results. Specifically, the real-time collected environmental parameters are input into the drift compensation model, and the model outputs the corresponding compensation value based on the optimized parameters and the constructed functional relationship. The compensated measurement result can be expressed as: compensated =y measured −f(x1,x2,…,x n); Among them, y measured is the original measurement value, y compensated is the measured value after compensation, f(x1,x2,…,x n ) is the output of the drift compensation model.
[0149] The key to this step is to ensure the real-time responsiveness and high precision of the drift compensation model, so that it can effectively offset the drift caused by environmental factors in practical applications and improve the reliability and stability of the entire detection system.
[0150] The method of this embodiment reduces the requirements for equipment hardware and improves the sensitivity and anti-interference capability of ppb-level methane detection through the coordinated optimization of the multi-line weight matching algorithm and the dynamic drift compensation model. Its beneficial effects are reflected in: 1. Hardware performance decoupling and cost optimization: Through multi-scale noise separation algorithms (such as wavelet decomposition and baseline correction) and drift compensation models (ΔC comp Software-level optimization of the algorithm (non-linear compensation) significantly reduces dependence on the extreme performance of sensor hardware (such as detector signal-to-noise ratio and light source stability). This allows low- and mid-end infrared sensors (cost reduction of 40-60%) to achieve the detection performance of high-end devices (detection limit of 1 ppb) after algorithm enhancement, while reducing the configuration requirements of high-cost hardware such as high-precision constant temperature gas chambers and low-temperature cooling modules.
[0151] 2. High-precision detection: Based on a hybrid physics-data inversion model (residual learning compensates for nonlinear errors), it achieves detection accuracy in the range of 0.1-100 ppb (error ±1 ppb), which is two orders of magnitude higher than the sensitivity of traditional infrared sensors.
[0152] 3. Anti-cross-interference: Through spectral line stripping technology based on difference boundary judgment (interference suppression rate > 95%) and the entropy weight method-TOPSIS weight allocation model, the spectral overlap interference of coexisting gases such as ethane and water vapor is effectively eliminated, reducing the false alarm rate by 80%.
[0153] 4. Strong environmental adaptability: A temperature, humidity, and air pressure coupled drift compensation function and online self-calibration mechanism are constructed to maintain long-term stability of ±0.5% in extreme environments ranging from -40°C to 85°C, breaking through the limitations of traditional sensors that rely on constant temperature and pressure conditions.
[0154] 5. Real-time leak warning: An anomaly detection model based on the ST-GCN spatiotemporal graph convolutional network achieves second-level response and sub-meter leak location (positioning error <3 meters).
[0155] In summary, the method of this embodiment achieves hardware performance replacement through algorithm innovation, which can reduce equipment procurement and operation and maintenance costs by 50%, and provide a cost-effective solution for large-scale deployment in industrial sites and monitoring in remote areas.
[0156] The method provided in the above embodiment can be executed by an electronic device. The following describes the electronic device in the embodiment of the present invention from the perspective of hardware processing. Figure 2 , which is a schematic diagram of a physical device structure of an electronic device in an embodiment of the present invention.
[0157] It should be noted that Figure 2The structure of the electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present invention.
[0158] like Figure 2 As shown, the electronic device includes a central processing unit (CPU) 401, which can perform various appropriate actions and processes, such as the methods described in the above embodiments, based on programs stored in a read-only memory (ROM) 402 or programs loaded from a storage unit 408 into a random access memory (RAM) 403. RAM 403 also stores various programs and data required for system operation. CPU 401, ROM 402, and RAM 403 are interconnected via a bus 404. An input / output (I / O) interface 405 is also connected to bus 404.
[0159] The following components are connected to the input / output (I / O) interface 405: an input section 406 including an audio input device, push button switches, and the like; an output section 407 including a display, an audio output device, indicator lights, and the like; a storage section 408 including a hard disk and the like; and a communication section 409 including a network interface card such as a LAN (Local Area Network) card or a modem. The communication section 409 performs communication processing via a network such as the Internet. A drive 410 is also connected to the input / output (I / O) interface 405 as needed. Removable media 411, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 410 as needed, so that computer programs read from the media can be installed in the storage section 408 as needed.
[0160] In particular, according to an embodiment of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, an embodiment of the present invention includes a computer program product comprising a computer program carried on a computer-readable medium, the computer program including a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 409 and / or installed from removable media 411. When executed by the central processing unit (CPU) 401, the computer program performs the various functions defined in the present invention.
[0161] It should be noted that specific examples of computer-readable storage media may include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0162] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present invention. Each box in the flowchart or block diagram can represent a module, program segment, or part of the code, and the above-mentioned module, program segment, or part of the code contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings.
[0163] Specifically, the electronic device of this embodiment includes a processor and a memory, the memory is coupled to one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and one or more processors call the computer instructions to enable the electronic device to execute the method provided by the above embodiment.
[0164] As another aspect, the present invention further provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiments, or may exist independently and not incorporated into the electronic device. The storage medium carries one or more computer programs, and when executed by a processor of the electronic device, the electronic device implements the methods provided in the above embodiments.
[0165] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that the technical solutions described in the above embodiments can still be modified, or some of the technical features thereof can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present invention.
[0166] As used in the above embodiments, the term “when” may be interpreted to mean “if” or “after” or “in response to determining that” or “in response to detecting that”, depending on the context. Similarly, the phrases “upon determining that” or “if (stated condition or event) is detected” may be interpreted to mean “if determining that” or “in response to determining that” or “upon detecting (stated condition or event)” or “in response to detecting (stated condition or event)”, depending on the context.
[0167] Those skilled in the art will appreciate that all or part of the process steps in the above-described method embodiments can be implemented by a computer program instructing the relevant hardware. The program can be stored in a computer-readable storage medium, and when executed, the program can include the process steps in the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.
Claims
1. A ppb-level methane gas online detection method, characterized in that: include: Collect infrared absorption spectrum signals of the gas being measured in the target environment; Acquiring original spectrum data containing methane and interfering gas from the infrared absorption spectrum signal; Performing multi-scale noise separation and baseline correction on the raw spectral data to obtain effective spectral features after denoising; Extracting methane-specific absorption peaks from the effective spectral features based on a preset methane characteristic spectral line database; The methane-specific absorption peak is compared with the interfering gas spectrum using a multi-spectral weight matching algorithm to suppress cross-sensitivity and obtain the methane characteristic intensity. Cross-sensitivity refers to the phenomenon in which measurement inaccuracy is caused by interference from other gas signals when detecting methane. Adaptively calibrating the methane characteristic intensity according to a drift compensation model constructed based on real-time environmental parameters to obtain a calibrated characteristic intensity; Mapping the calibrated characteristic intensities to ppb-level methane concentration values through a pre-trained concentration inversion model; Arranging the plurality of ppb-level methane concentration values according to a time series relationship to obtain concentration time series data; The concentration time series data is input into a preset anomaly detection model to detect whether a methane leakage event occurs in the target environment.
2. The method according to claim 1, characterized in that The methane specific absorption peak is compared with the interfering gas spectrum line by a multi-spectral line weight matching algorithm to suppress cross sensitivity and obtain the methane characteristic intensity, including: Identifying interfering gas spectral lines in the target environment that overlap with the methane-specific absorption peak, and generating multiple potential interfering spectral lines; Based on the correlation between the absorption intensity and concentration of the interfering gas, an interference weight value is assigned to each of the interfering spectral lines; Determine a spectrum line matching threshold according to real-time environmental parameters and the interference weight value; determining a difference boundary between the methane-specific absorption peak and the interference spectrum line according to the spectrum line matching threshold; Performing spectral line stripping on the methane-specific absorption peak through the difference boundary to obtain a methane spectrum signal; The methane spectrum signal is normalized to output the methane characteristic intensity after suppressing cross sensitivity.
3. The method according to claim 2, characterized in that The real-time environmental parameters include real-time temperature, real-time humidity, and real-time air pressure. The determining of the spectrum line matching threshold according to the real-time environmental parameters and the interference weight value includes: The spectral line matching threshold is determined according to a preset spectral line matching threshold adjustment formula, wherein the matching threshold adjustment formula includes: ; Wherein, θ represents the spectrum line matching threshold, θ0 represents the reference threshold, α, β, and γ are environmental correction coefficients, T represents the real-time temperature, and T ref represents the reference temperature, H represents the real-time temperature, H ref represents reference humidity, P represents real-time air pressure, P ref represents the reference pressure, w i represents the interference weight value, and i is the index number.
4. The method according to claim 2, characterized in that The allocating an interference weight value to each of the interference spectral lines based on the correlation between the absorption intensity and concentration of the interfering gas includes: Obtaining absorption intensity distribution spectral line data of the interfering gas at different concentrations; Based on the absorption intensity distribution spectrum line data and known concentration data, performing linear or nonlinear regression analysis to obtain correlation coefficients between the intensity and concentration of multiple spectrum lines; The intensity-concentration correlation coefficient is input into a preset weight distribution function to obtain the interference spectrum line distribution interference weight value, and the interference spectrum line distribution interference weight value is related to the sensitivity of the absorption intensity to the concentration change.
5. The method according to claim 4, characterized in that After inputting the intensity-concentration correlation coefficient into a preset weight distribution function to obtain the interference spectral line distribution interference weight value, the method further includes: Normalizing the interference weight values assigned to the interference spectral lines to obtain normalized weight coefficients; The normalized weight coefficient is substituted into the multi-component spectrum superposition model to verify the fit between the reconstructed result of the interfering gas mixture spectrum and the measured data.
6. The method according to any one of claims 1 to 5, characterized in that The drift compensation model is constructed based on real-time environmental parameters, including: Determining the weight coefficient of each environmental parameter's influence on the drift based on the correlation between the real-time environmental parameter and the historical drift amount; Constructing a nonlinear drift compensation function based on the weight coefficient; Optimizing the parameters of the drift compensation function through an online calibration experiment to generate dynamically updated compensation model parameters; The drift compensation model is constructed based on the compensation model parameters.
7. The method according to claim 6, characterized in that The drift compensation function includes: ; Where, ΔC comp Indicates the drift compensation amount; E i (i=1,2,3) and E j (j=1,2) represent real-time environment parameters, E i,ref and E j,ref They represent reference environment parameters, t represents detection time, α i , β, γ j , δ, and λ represent the weight coefficients respectively.
8. An electronic device, characterized in that: including one or more processors and memory; The memory is coupled to the one or more processors, and is configured to store computer program codes, where the computer program codes include computer instructions. The one or more processors call the computer instructions to enable the electronic device to execute the method according to any one of claims 1 to 7.
9. A computer-readable storage medium storing computer instructions, characterized in that: When the computer instructions are executed on an electronic device, the electronic device is caused to execute the method according to any one of claims 1 to 7.
10. A computer program product, characterized in that When the computer program product is run on an electronic device, the electronic device is enabled to perform the method according to any one of claims 1 to 7.
Citation Information
Cited By
Oxygen sensor error compensation method and system based on physical information constraint
CN120778678A
Self-adaptive dynamic baseline correction method for hydrogen leakage detection
CN120869452A
Method and system for detecting gas concentration in epitaxial growth reaction cavity, computer equipment and storage medium
CN121049206A
Crop spectrometer temperature drift calibration method based on dynamic temperature drift compensation
CN121230870A
Processing method for laser natural gas leakage point positioning imaging based on unmanned aerial vehicle
CN121253481A