A false alarm prevention method and system for a gas alarm based on an interference source identification model
By constructing an interference source identification model in the gas alarm and using multidimensional morphological feature vectors and pre-trained models to determine the signal type, the problem that existing gas alarms cannot distinguish between interference pseudo-absorption and real gas absorption is solved, thus fundamentally suppressing false alarms and continuously improving system performance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ANHUI ZHIBO PHOTOELECTRIC TECHNOLOGY CO LTD
- Filing Date
- 2026-06-23
- Publication Date
- 2026-07-21
AI Technical Summary
Existing gas alarms lack the ability to intelligently understand signals and cannot effectively distinguish between persistent interference-induced false absorption and genuine gas absorption depressions, resulting in the inability to eradicate false alarm problems.
An interference identification layer based on artificial intelligence algorithms is constructed. By extracting multidimensional morphological feature vectors of direct absorption spectral signals and using a pre-trained interference source identification model to determine the signal type, the signal only enters the concentration calculation and alarm decision-making stage when it is identified as real gas absorption.
It effectively shields false alarms caused by various types of interference, improving the false alarm suppression effect. It filters out persistent interference through morphological identification and optimizes the false alarm rate and false negative rate by combining a voting mechanism in the time dimension. Furthermore, the model can be updated in the cloud to improve its ability to identify new interference sources.
Smart Images

Figure CN122435751A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of gas detection and safety alarm technology, and in particular to a method and system for preventing false alarms in gas alarms based on an interference source identification model. Background Technology
[0002] In the field of gas safety in residential and commercial kitchens, gas alarms based on tunable diode laser absorption spectroscopy technology are widely used due to their advantages such as high selectivity, long lifespan, and no risk of failure due to poisoning. These alarms use a sawtooth wave current to drive a laser for wavelength scanning. A photodetector receives the light intensity signal after absorption by the gas, forming a direct absorption spectrum signal. The gas concentration is then inverted based on the absorption depression depth to make an alarm decision. However, in actual deployment environments, the direct absorption spectrum signal collected by the alarm is subject to interference from various internal and external factors. These factors include electromagnetic interference, optical etalon effects, water vapor condensation, oil adhesion, dust accumulation, and device aging. The signal waveform produces pseudo-absorption characteristics similar to the actual gas absorption depression pattern, and false alarms remain a key bottleneck restricting the market credibility of this type of product.
[0003] Currently, the common approach in this field to address the aforementioned false alarm problem is a technical solution based on fixed threshold discrimination and multiple confirmations over time series. The specific workflow of this solution is as follows: the alarm acquires a direct absorption spectrum signal in each scanning cycle, extracts the absorption depression depth from it, compares it with a preset fixed alarm threshold, and marks the scanning cycle as a suspected leakage event when the threshold is exceeded; subsequently, a counting vote is performed on the suspected markers from multiple consecutive scanning cycles, and when consecutive... N An alarm is triggered when all scan cycles are marked as suspected leaks; otherwise, the suspected leak markers are filtered out as transient interference. The core of this scheme is to use a time-dimension redundant confirmation mechanism to eliminate intermittent abnormal signals. Its underlying assumption is that the absorption signal generated by a real gas leak has time continuity, while interference signals are mostly intermittent or transient.
[0004] However, the existing solutions described above have inherent flaws in practical applications that cannot be overcome by parameter adjustments. The discrimination criteria of these solutions are limited to a single scalar indicator—the depth of the absorption depression—and statistical voting over time, completely neglecting the morphological information of the signal waveform itself. When interference exhibits persistent characteristics, such as periodic sinusoidal interference fringes superimposed on the absorption signal due to the etalon effect between optical elements, or power frequency ripples introduced by the power supply circuit continuously modulating the light intensity baseline, signals acquired over multiple consecutive scan cycles exhibit pseudo-absorption characteristics that are comparable to and similar in shape to the actual absorption depression depth. Under such conditions, the fixed threshold discrimination stage classifies each pseudo-absorption signal in each scan cycle as a suspected leakage event exceeding the threshold. The time-series confirmation mechanism continuously counts based on its voting logic, inevitably triggering false alarms. Because the existing solutions do not include a stage for identifying and distinguishing the signal waveform morphology at the architectural level, even adjusting the fixed threshold value or changing the confirmation window length cannot distinguish between persistent interference pseudo-absorption and real gas absorption depressions at the signal level, making it impossible to eradicate the false alarm problem within the existing architecture. Summary of the Invention
[0005] To address the aforementioned problems, this invention provides a method and system for preventing false alarms in gas alarms based on an interference source identification model. This aims to solve the false alarm problem caused by the lack of intelligent signal understanding capabilities in existing direct absorption spectral gas alarms. Before the traditional concentration inversion process, this invention constructs an interference identification layer based on an artificial intelligence algorithm. By extracting a set of multi-dimensional feature vectors that characterize the morphological features of the direct absorption spectral signal from each scanning cycle, a pre-trained classification model is used to determine the type of interference carried by the signal. Only when the signal is identified as genuine gas absorption does it proceed to the subsequent concentration calculation and alarm decision-making stages, thereby fundamentally shielding against false alarms caused by various types of interference.
[0006] To achieve the above objectives, the technical solution adopted by the present invention is: a method for preventing false alarms in gas alarms based on an interference source identification model, comprising: acquiring the direct absorption spectrum signal of each scanning cycle; The direct absorption spectral signal is normalized to obtain a normalized signal; Based on the calibrated methane absorption line positions, the normalized signal is divided into an absorption region and a baseline region; Calculate the noise standard deviation of the baseline region; Determine whether there are absorption depressions within the absorption area with a depth exceeding 3 times the noise standard deviation; if not, it is considered normal. If an effective absorption depression exists, the measured absorption depression is fitted with the standard Lorentz line shape using least squares, the root mean square value of the fitting residual is calculated, the Lorentz line shape fitting residual is obtained, the baseline region is fitted with a polynomial, the standard deviation of the fitting residual is calculated, the baseline smoothness is obtained, and the morphological feature vector containing at least the Lorentz line shape fitting residual and the baseline smoothness is extracted. The morphological feature vector is input into a pre-trained interference source identification model to obtain the signal type label output by the interference source identification model. When the signal type label is gas leak, concentration inversion and alarm decision are initiated; when the signal type label is not gas leak, concentration inversion and alarm decision are suppressed.
[0007] Preferably, the morphological feature vector further includes slope linearity and signal-to-noise ratio.
[0008] Preferably, the slope linearity is the determination coefficient of a linear fit performed on the slope portion after deducting the absorption depression.
[0009] Preferably, the signal-to-noise ratio is the ratio of the absorption indentation depth to the noise standard deviation.
[0010] Preferably, the Lorentz linear fitting residual d Lorentz Calculate using the following formula: in, M To absorb the number of sampling points in the concave region, y meas ( j ) is the first in the absorption depression region j The measured normalized signal amplitude at each sampling point y Lorentz ( j ) is the standard Lorentz function in the th... j Fitted values at each sampling point.
[0011] Preferably, the baseline flatness s residual Calculate using the following formula: in, P This represents the number of sampling points in the baseline region. x norm ( p ) is the first in the baseline region p Normalized signal amplitude at each sampling point x fit ( p ) is the polynomial fit at the th p Fitted values at each sampling point.
[0012] Preferably, the slope linearity is calculated using the following formula: in, R ² represents the slope linearity. Q To deduct the number of sampling points on the slope after absorption depression, x norm ( q ) is the first q Normalized signal amplitude at each sampling point x linear ( q ) is the linear fit in the th case. q The fitted values at each sampling point This represents the mean of the normalized signal amplitude for the slope portion.
[0013] Preferably, the activation concentration inversion and alarm decision includes: in continuous N An alarm is triggered when the interference source identification model outputs a gas leak signal type label for each scanning cycle. N It is a preset positive integer. N ≥2.
[0014] Preferably, the signal type label also includes interference. When the signal type label is interference, the morphological feature vector and the signal type label are reported to the cloud platform.
[0015] Preferably, after the morphological feature vector and the signal type label are reported to the cloud platform, the updated interference source identification model parameters are obtained from the cloud platform via over-the-air download technology.
[0016] A gas alarm false alarm prevention system based on an interference source identification model, comprising: a signal acquisition module for acquiring the direct absorption spectrum signal for each scanning cycle; The signal preprocessing module is used to normalize the direct absorption spectrum signal to obtain a normalized signal, divide the normalized signal into an absorption region and a baseline region according to the calibrated methane absorption line position, calculate the noise standard deviation of the baseline region, and determine whether there is an absorption depression in the absorption region with a depth exceeding 3 times the noise standard deviation. If there is no depression, it is determined to be normal. The morphological feature extraction module is used to perform least-squares fitting between the measured absorption depression and the standard Lorentz line type when there is an effective absorption depression, calculate the root mean square value of the fitting residual to obtain the Lorentz line type fitting residual, perform polynomial fitting on the baseline region, calculate the standard deviation of the fitting residual to obtain the baseline smoothness, and extract morphological feature vectors that contain at least the Lorentz line type fitting residual and the baseline smoothness. The interference source identification model inference module stores pre-trained interference source identification model parameters and is used to receive the morphological feature vector and output the signal type label. The decision-making and diversion module is used to initiate concentration inversion and alarm decision-making when the signal type label is gas leak, and to suppress concentration inversion and alarm decision-making when the signal type label is not gas leak.
[0017] Preferably, the morphological feature extraction module further includes: a slope linearity calculation unit, used to perform linear fitting on the slope portion after deducting absorption depressions, and use the determination coefficient of the fitting as the slope linearity; The signal-to-noise ratio calculation unit is used to calculate the ratio of the absorption indentation depth to the noise standard deviation as the signal-to-noise ratio; The morphological feature vector also includes the slope linearity and the signal-to-noise ratio.
[0018] By adopting the above technical solution, the present invention has the following beneficial effects.
[0019] (1) This invention constructs a joint identification mechanism of morphological feature vectors and interference source identification model, solving the problem that existing direct absorption spectroscopy gas alarms cannot distinguish between persistent interference false absorption and real gas absorption depressions from the signal morphology. Traditional methods rely on fixed thresholds or time series voting, without involving the authenticity of the signal waveform itself. In contrast, this invention extracts morphological feature vectors containing at least the Lorentz line fitting residual and baseline flatness for each scanning cycle, inputs them into a pre-trained interference source identification model, and outputs a signal type label by integrating multi-dimensional morphological features. Concentration inversion and alarm decision are initiated only when the label is gas leak; otherwise, the alarm is suppressed. This invention distinguishes interference from real leaks from the root cause of signal morphology, and the false alarm suppression effect is fundamentally improved compared with the voting mechanism based solely on the time dimension.
[0020] (2) The morphological feature vector of this invention also includes slope linearity and signal-to-noise ratio. The Lorentz line shape fitting residual characterizes the degree of deviation of the absorption depression from the standard Lorentz line shape, the baseline smoothness reflects the fluctuation of the baseline region due to interference fringes or power frequency interference, the slope linearity measures the degree of deviation of the signal slope from linearity after deducting the depression, and the signal-to-noise ratio characterizes the signal-to-noise level of the absorption depression depth relative to the noise substrate. The four types of features constitute a complementary morphological description system from four dimensions: internal morphology of the depression, signal substrate fluctuation, overall slope distortion, and signal quality. When the standard etalon effect produces sinusoidal interference superposition, the baseline smoothness and slope linearity deteriorate simultaneously, while the Lorentz line shape fitting residual may still be within the critical range; when electromagnetic interference introduces periodic ripples, the baseline smoothness increases significantly while the slope linearity remains relatively stable. The combined effect of multiple features enables the interference source identification model to maintain a high discrimination rate against various pseudo-absorptions under complex conditions of multiple interference source coupling and superposition.
[0021] (3) The Lorentzian linear fitting residuals of the present invention are obtained by calculating the root mean square value after least square fitting; the baseline flatness is obtained by calculating the standard deviation of the fitting residuals after polynomial fitting; and the slope linearity is obtained by calculating the coefficient of determination after linear fitting. The calculation process of each feature has a clear physical meaning and mathematical definition. The extraction process does not rely on empirical thresholds or manual parameter tuning, and the feature space remains stable when the same working condition signal is repeatedly collected. This characteristic provides a consistent sample distribution for offline training of the interference source identification model, provides reproducible input for online inference, and provides structural guarantee for the robustness of the classification results.
[0022] (4) The start-up concentration inversion and alarm decision of the present invention includes continuous N An alarm is triggered when all scan cycles are determined to be gas leaks. The interference source identification model completes the authenticity identification of signals in a single scan cycle in the morphological dimension, while the time series confirmation mechanism completes the consistency verification of multiple scan cycles in the time dimension. Morphological identification filters out periodic pseudo-signals generated by persistent interference, while time-dimensional identification filters out occasional residual interference. The two dimensions act on different attributes of the signal, complementing and being compatible with each other, achieving dual optimization of false alarm rate and false negative rate without adding additional hardware. When the signal type label is interference, the morphological feature vector and signal type label are reported to the cloud platform, and the terminal obtains the updated model parameters through over-the-air download technology. Interference event data is continuously aggregated to the cloud, and the training dataset expands as the device runs, improving the model's ability to identify new interference sources with iterative updates. The terminal silently obtains updated parameters, and the system's interference identification performance continues to evolve after deployment.
[0023] (5) This invention comprehensively judges the multidimensional morphological characteristics of signals through an interference source identification model. It can identify false depressions caused by the etalon effect, periodic ripples introduced by electromagnetic interference, and light intensity attenuation signals caused by water vapor, oil, and dust. It fundamentally solves the problem of false alarms caused by the inability of a single threshold, simple filtering, or pure time series voting to distinguish between true and false persistent interference. By updating the training dataset of the classification model, the ability to identify new interference sources can be expanded. With the help of the cloud platform, the model can be continuously iterated and updated, so that the system performance can be continuously improved over time. Attached Figure Description
[0024] The following provides a detailed discussion of the manufacture and application of preferred embodiments of the present invention. However, it should be understood that the present invention provides many applicable inventive concepts that can be embodied in various specific environments. The specific embodiments discussed are merely illustrative of specific ways of manufacturing and using the present invention and do not limit the scope of the invention. For those skilled in the art, other drawings can be obtained from these drawings without any creative effort.
[0025] Figure 1 This is a flowchart of the false alarm prevention algorithm of the present invention.
[0026] Figure 2 This is a flowchart illustrating the training and deployment process of the interference source identification model of this invention. Detailed Implementation
[0027] The following provides a detailed discussion of the manufacture and application of preferred embodiments of the present invention. However, it should be understood that the present invention provides many applicable inventive concepts that can be embodied in various specific environments. The specific embodiments discussed are merely illustrative of specific ways of manufacturing and using the invention and do not limit the scope of the invention.
[0028] This invention comprehensively judges the multidimensional morphological characteristics of signals through an interference source identification model. It can identify false depressions caused by the etalon effect, periodic ripples introduced by electromagnetic interference, and light intensity attenuation signals caused by water vapor, oil, and dust. This fundamentally solves the false alarm problem caused by the inability of single thresholds, simple filtering, or pure time-series voting to distinguish between genuine and false persistent interference. By updating the training dataset of the classification model, the ability to identify new interference sources can be expanded. Continuous iteration and updating of the model can be achieved through a cloud platform, enabling the system performance to continuously improve over time. The method of this invention does not conflict with existing time-series verification mechanisms and can be deployed collaboratively to form a dual false alarm prevention system of morphological identification and time-series voting. The following is a related description... Figure 1-2 To elaborate further.
[0029] In one specific embodiment of the present invention, a method for preventing false alarms in gas alarms based on an interference source identification model is provided. This method operates in the main control module of the gas alarm. The gas alarm employs tunable diode laser absorption spectroscopy technology, using a sawtooth wave current to drive a laser for wavelength scanning. A photodetector receives the light intensity signal after gas absorption, forming a direct absorption spectral signal. This method, by constructing an intelligent identification model at the front end, distinguishes between genuine gas absorption and false absorption features caused by various interferences at the signal morphology level, thus fundamentally solving the false alarm problem. This method works in conjunction with a time-series verification mechanism: the interference source identification model is responsible for the morphological authentication of a single signal, while the time-series verification mechanism is responsible for the continuous voting on multiple authentication results.
[0030] Figure 1 This is a schematic diagram illustrating the overall process of the AI-based interference source identification algorithm for preventing false alarms, provided in an embodiment of the present invention. Figure 1 As shown, the method includes the following steps. Step 1: Acquire the direct absorption spectrum signal for each scan cycle. The gas alarm acquires the raw direct absorption spectrum signal using a photodetector in each scan cycle. x ( n ).
[0031] Step 2: Normalize the direct absorption spectrum signal to obtain a normalized signal.
[0032] right x ( n The signal is normalized to eliminate scale differences caused by fluctuations in absolute light intensity, thus obtaining a normalized signal. x norm ( n Normalization can be achieved by dividing the signal amplitude by the maximum signal amplitude within the scan period.
[0033] Step 3: Based on the calibrated methane absorption line positions, divide the normalized signal into an absorption region and a baseline region; calculate the noise standard deviation of the baseline region.
[0034] Based on the wavelength positions of the methane absorption spectral lines within the scanning period determined during the preliminary calibration phase, the normalized signal is divided into an absorption region and a baseline region. The absorption region is the signal segment centered on the center wavelength of the absorption spectral line, covering a range several times the typical half-width at half-maximum (HWHM) of the methane absorption line. The baseline region is the signal segment far from the absorption spectral line and unaffected by gas absorption. The noise standard deviation of the baseline region is calculated. s noise , s noise This represents the sample standard deviation of the normalized signal amplitude at each sampling point in the baseline region.
[0035] Step 4: Determine whether there are absorption depressions in the absorption area with a depth exceeding 3 times the noise standard deviation. If not, it is considered normal.
[0036] Determine if there is a depth exceeding 3 within the absorption region. s noise Absorption indentations. If no indentation depth exceeding 3 is detected in the absorption area. s noise If an absorption depression is detected, the current scan cycle is directly determined to be normal, and subsequent feature extraction and model inference are not performed. This fast channel handles scenarios with no absorption signal under zero gas conditions, avoiding invalid calculations. If a valid absorption depression is detected, proceed to step 5.
[0037] Step 5: If an effective absorption depression exists, perform least-squares fitting between the measured absorption depression and the standard Lorentz line type, calculate the root mean square value of the fitting residual, obtain the Lorentz line type fitting residual, perform polynomial fitting on the baseline region, calculate the standard deviation of the fitting residual, obtain the baseline smoothness, and extract the morphological feature vector that includes at least the Lorentz line type fitting residual and the baseline smoothness.
[0038] Morphological feature vectors are extracted from the normalized signal. In this embodiment, the morphological feature vectors are four-dimensional vectors. F =[ d Lorentz , s residual , R ², SNR The definitions and calculation methods for each feature are as follows.
[0039] The Lorentz linear fitting residual d Lorentz The calculation formula is: in, d Lorentz denoted as the Lorentz line fitting residual, and denoted as a dimensionless real number. The smaller the value, the closer the depression morphology is to the actual gas absorption characteristics. M The number of sampling points for absorbing the concave region is determined by the length of the signal segment in the absorption region and the hardware sampling interval. j The sequence number of the sampling point within the absorption depression region. j =1,2,…, M . y meas ( j ) is the first in the absorption depression region j The measured normalized signal amplitude at each sampling point. y Lorentz ( j ) is the standard Lorentz function in the th...j The fitted values at each sampling point. This feature is used to distinguish between false depressions caused by etalon effects or impulse interference and real gas absorption depressions.
[0040] The baseline flatness s residual The calculation formula is: in, s residual denoted as baseline flatness, and denoted as a dimensionless real number. P This represents the number of sampling points in the baseline region. p The serial number of the sampling point within the baseline area. p =1,2,…, P x_norm(p) is the nth value within the baseline region. p Normalized signal amplitude at each sampling point. x fit ( p ) is the polynomial fit at the th p Fitted values at each sampling point. Baseline smoothing is achieved when there is no interference. s residual The value is relatively small. After superimposing interference fringes or power frequency interference, s residual The value increases.
[0041] The slope linearity R The formula for calculating ² is: in, R ² represents the slope linearity, a dimensionless real number ranging from 0 to 1. Q This is the number of sampling points for the slope portion after deducting the absorption depression. q The sequence number of the sampling points on the slope after deducting the absorption depression. q =1,2,…,Q. x norm ( q ) is the first q Normalized signal amplitude at each sampling point. x linear ( q ) is the linear fit in the th case. q Fitted values at each sampling point. This represents the mean of the normalized signal amplitude for the slope portion. Under normal operating conditions... R When the baseline is close to 1, it is disturbed. R ² Deviation from 1.
[0042] The signal-to-noise ratio SNR The calculation formula is: SNR = D / s noise ,in, SNR Let be the signal-to-noise ratio, and be a dimensionless real number. D = X baseline - X peak , X baseline This represents the interpolation magnitude of the baselines on both sides of the depression at the center of the depression. X peak The amplitude at the lowest point of the depression; s noise This represents the noise standard deviation for the baseline region. SNR A sustained decrease indicates an increase in the noise floor and a deterioration in signal quality.
[0043] The morphological feature vector composed of the above four features F The original waveform is used as the input for the subsequent classification model.
[0044] Step 6: Input the morphological feature vector into the pre-trained interference source identification model to obtain the signal type label output by the interference source identification model.
[0045] The morphological feature vector extracted in step 5 F The interference source identification model inference module is input. This module stores pre-trained model parameters, performs forward inference calculations, and outputs the signal type label corresponding to the scan cycle. In this embodiment, the signal type label output by the interference source identification model takes three values: normal, interference, and gas leak.
[0046] Step 7: When the signal type label is gas leak, activate concentration inversion and alarm decision; when the signal type label is not gas leak, suppress concentration inversion and alarm decision.
[0047] The decision-making and diversion module in the main control module receives the signal type label output in step 6 and performs the following diversion decision.
[0048] When the signal type label is "gas leak," concentration inversion and alarm decision-making are initiated. Concentration inversion is based on the absorption depression depth. D The actual concentration of the gas is calculated based on Lambert-Beer's Law. When the calculated concentration exceeds a preset safety threshold, an audible and visual alarm is triggered, and the gas valve is shut off. Optionally, a time-series confirmation mechanism can be incorporated to continuously verify the gas concentration. N An alarm is triggered only when each scan cycle determines that there is a gas leak and the concentration exceeds the limit. N It is a preset positive integer. N ≥2, in this implementation N Take 3.
[0049] When the signal type label is normal, it is determined that there is no gas leak or abnormal interference in the current environment, and the system maintains silent monitoring and records routine operation logs.
[0050] When the signal type label is "interference," the current concentration calculation and alarm output are suppressed. The morphological feature vector and signal type label collected are then reported to the cloud platform via the network module for subsequent model improvement and equipment health assessment. Steps 1 to 7 above constitute the core process of online operation of the gas alarm.
[0051] Figure 2 This is a flowchart illustrating the training and deployment process of the interference source identification model provided in this embodiment of the invention. Figure 2 This invention demonstrates a complete technical solution from dataset construction to model deployment and cloud evolution. For example... Figure 2 As shown, the complete solution includes the following steps. S1: Construction of multi-source interference dataset.
[0052] This step provides the training data foundation for the interference source identification model. The dataset construction employs a strategy combining simulation, real-world testing under key operating conditions, and continuous post-deployment supplementation. Signal data for most operating conditions are generated using laser absorption spectroscopy simulation technology. Data for non-absorption conditions, normal absorption conditions with different concentrations of methane gas, and optical interference conditions with interference fringes are generated through simulation based on molecular spectral databases and optical interference principles. Electromagnetic interference conditions are handled according to electromagnetic compatibility testing standards, injecting 50Hz common-mode interference and its harmonics into the equipment's power supply or signal link, and collecting the disturbed signals.
[0053] In harsh environmental conditions, attenuation films with varying transmittances are coated onto the detector windows or optical components to simulate light intensity attenuation effects caused by water vapor condensation, oil adhesion, dust accumulation, and device aging. In a circuit crosstalk condition, high-frequency switching signal lines are placed near sensitive signal lines to induce ground bounce and crosstalk noise. All simulated and measured signals are assigned type labels, including normal, interference, and gas leak. Interference labels cover electromagnetic interference, etalon effect, light intensity attenuation, and circuit crosstalk. This labeled data constitutes the benchmark dataset for offline model training.
[0054] S2: Signal preprocessing and morphological feature extraction.
[0055] This step processes the direct absorption spectral signals acquired in each scanning cycle to extract morphological feature vectors for model training. The specific implementation of this step is as follows: Figure 1 Steps 2 through 5 are identical, including normalization, region segmentation, noise standard deviation calculation, effective absorption depression detection, and extraction of four-dimensional morphological feature vectors. The extracted feature vectors and their corresponding signal type labels together constitute the training samples.
[0056] S3: Model selection and offline training.
[0057] The feature vectors generated in step S2 and their corresponding signal type labels are input into the selected classifier for supervised training. Optional classification models include Support Vector Machines, Random Forests, or Lightweight Neural Networks. Model selection comprehensively considers the computing power, storage, and real-time constraints of the target hardware platform. The following explanation uses Support Vector Machines as an example.
[0058] The training objective of Support Vector Machines (SVMs) is to find an optimal hyperplane that maximizes the classification margin. For the nonlinear problem of classification with multiple interference sources, a radial basis function kernel is introduced to map the original feature space to a high-dimensional space, and the sequence minimum optimization algorithm is used to solve the following optimization problem: in, oh The weight vector determines the direction of the normal to the classification hyperplane; b This is the bias term, which determines the offset of the hyperplane; The L2 norm squared of the weight vector is used to minimize the classification margin. C This is the penalty parameter, used to balance the classification margin and the tolerance for misclassification. C The value is a preset positive real number, determined through cross-validation; n This represents the total number of training samples. x i For the first i The slack variables for each sample allow for a certain degree of classification error.
[0059] Penalty parameters C The kernel width parameter of the radial basis kernel function c The optimal value is determined using a particle swarm optimization algorithm. Specifically, the labeled morphological feature vector sample set generated in step S2 is divided into a training set and a test set in an 8:2 ratio. 80% of the samples are used as the training set for supervised training of the support vector machine classifier, and the remaining 20% are used as the test set to evaluate the classification performance of the classifier under different parameter combinations. Each sample contains a morphological feature vector and its corresponding signal type label.
[0060] In particle swarm optimization, the position of each particle represents a set of candidate parameter combinations, i.e. P k =( C k , c k ),in P k For the first k The position of each particle. C k For the firstk The penalty parameter value corresponding to each particle. c k For the first k The kernel width parameter value corresponding to each particle. During initialization, the positions and velocities of multiple particles are randomly generated within a preset parameter search range, with a penalty parameter. C The search range is [0.01, 1000], and the kernel width parameter is... c The search range is [1, 1000]. For any combination of parameters corresponding to a particle, a support vector machine classifier is trained using the training set. The test set is input into the trained classifier to obtain the predicted signal type label for each sample. The predicted signal type label is compared with the true signal type label for each sample in the test set, and the classification accuracy is calculated as the fitness value of the particle. Classification accuracy Acc The calculation method is as follows: Acc = N correct / N test ×100%, of which N correct This represents the number of correctly classified samples in the test set. N test This represents the total number of samples in the test set.
[0061] The particle swarm optimization algorithm updates the individual optimal position and global optimal position of each particle based on its fitness value, and updates the particle's velocity and position in the following manner: in, V k t For the first k The particle in the first t Speed at the next iteration X k t For the first k The particle in the first t Position at the next iteration w For inertial weights, C 1 and C 2 represents the individual learning factor and the group learning factor, respectively. R 1 and R 2 is a random number within the interval [0,1]. For the first k The optimal position obtained by each particle in historical iterations. g best This represents the globally optimal position obtained by the entire particle swarm in historical iterations.
[0062] The particle swarm optimization process stops when the preset maximum number of iterations (1000) is reached, or when the classification accuracy corresponding to the globally optimal parameter combination reaches a preset classification accuracy threshold. The preset classification accuracy threshold is 95%. When the test set classification accuracy corresponding to the globally optimal parameter combination reaches or exceeds 95%, the penalty parameter corresponding to that globally optimal parameter combination is applied. C and kernel width parameter c These are determined as the final parameters. If the preset classification accuracy threshold is not reached, the number of particles, the maximum number of iterations, or the parameter search range are adjusted, and optimization is performed again until a parameter combination that meets the classification requirements is obtained. After training, for any new input feature vector... F The model outputs a signal type label, with values for normal, interference, or gas leak.
[0063] S4: Model Deployment and Online Inference.
[0064] The trained model parameters are formatted, quantized, and compressed, then solidified into executable code for the microcontroller and deployed in the alarm's main control module. The main control module includes an interference source identification model inference module, which stores the trained model parameters. During actual operation, the new signals acquired in each scanning cycle are processed... Figure 1 Morphological feature vectors are extracted after real-time processing in steps 2 to 5. F Input interference source identification model inference module, output signal type label.
[0065] S5: Decision routing based on reasoning results.
[0066] The decision-making and distribution module in the main control module receives the signal type label output in step S4 and executes the corresponding signal type label. Figure 1 The consistent diversion decision in step 7 is as follows: when the tag indicates a gas leak, concentration inversion and alarm decision are initiated; when the tag indicates a normal status, silent monitoring is maintained; when the tag indicates interference, the alarm is suppressed and the feature vector and tag are reported to the cloud platform.
[0067] S6: Anonymous data collection and continuous model evolution.
[0068] When a false alarm occurs during device operation, the anonymized feature data of the relevant devices is used as hard example samples, which are then reviewed, labeled, and added to the training dataset. The model is retrained using incremental data. The optimized model parameters are silently updated to all terminal devices across the network via over-the-air (OTA) technology. OTA technology refers to the technique of remotely transmitting data and updating parameters to terminal devices through a wireless communication network. After receiving the updated model parameters, the terminal devices load them into the interference source identification model inference module. Subsequent online inference is performed using the updated parameters, forming a continuously self-improving algorithmic closed loop.
[0069] Figure 1The four morphological features extracted in step 5 constitute a complementary morphological description system. The Lorentzian line fit residual determines the degree of deviation from actual gas absorption based on the internal morphology of the depression; baseline flatness identifies interference fringes and power frequency interference from signal substrate fluctuations; slope linearity detects nonlinear disturbances from overall slope distortion; and signal-to-noise ratio assists in identifying light intensity attenuation interference from the signal quality dimension. These four features are simultaneously input into the classification model as a whole feature vector, allowing the model to learn the feature distribution boundaries corresponding to different interference types in a high-dimensional feature space.
[0070] When the etalon effect produces sinusoidal interference superposition, both baseline smoothness and slope linearity deteriorate simultaneously, and the Lorentz linear fitting residual may still be within the critical range. When electromagnetic interference introduces periodic ripple, baseline smoothness increases while slope linearity remains relatively stable. The model accurately distinguishes between various disturbances and actual gas leaks in the feature space by integrating feature information from multiple dimensions. The calculation formulas and extraction processes of the above four features do not rely on empirical thresholds or manual parameter tuning. The feature space remains stable when repeatedly collecting signals under the same operating conditions, providing a consistent sample distribution for offline training of the model and reproducible input for online inference, thus structurally ensuring the robustness of the classification results.
[0071] Figure 1 The online operation process shown is the same as Figure 2 The training and deployment processes shown cooperate to form a complete closed-loop system. The construction of the multi-source interference dataset and offline model training provide pre-trained model parameters for the interference source identification model, while model deployment solidifies these parameters into the main control module. During online operation, the direct absorption spectral signal of each scanning cycle, after signal preprocessing and morphological feature extraction, is input into the interference source identification model to obtain signal type labels. The decision-making and triage module executes the corresponding triage decision based on the label. When the label is interference, the morphological feature vector and signal type label are reported to the cloud platform. The cloud platform uses the reported interference event data to expand the training dataset and iterate the model. The updated model parameters are then transmitted back to the terminal device via over-the-air (OTA) download technology, forming a data closed loop from dataset construction to model training, and from online inference to cloud evolution.
[0072] To further illustrate the implementation process and effects of this invention, the following comparative experiment was conducted in this embodiment. During the operation of a household gas alarm, due to the etalon effect formed between the reflecting surfaces within the optical cavity, periodic sinusoidal interference fringes were superimposed on the direct absorption spectral signal. Within one scanning cycle, the photodetector collected direct absorption spectral signals from 512 sampling points. After normalization, based on the calibrated methane absorption spectral line positions, sampling points 150 to 250 were designated as the absorption region, and sampling points 1 to 100 and 350 to 512 were designated as the baseline region.
[0073] Calculate the noise standard deviation of the baseline region to obtain s noise =0.012. The lowest point of the depression detected within the absorption region is located at the 202nd sampling point, and the depression depth is... D =0.18, exceeding 3 s noise =0.036, indicating the presence of an effective absorption depression.
[0074] Extract the four-dimensional morphological feature vector. Fit the absorbing indentation to the standard Lorentz line type and calculate the Lorentz line type fitting residual. d Lorentz =0.023. The baseline smoothness is obtained by calculating the standard deviation of the residuals after performing a quadratic polynomial fitting on the baseline region. s residual =0.041. After subtracting the depression, a linear fit is performed on the slope portion, and the coefficient of determination is calculated. R ² = 0.87. Calculate the signal-to-noise ratio. SNR =0.18 / 0.012 = 15.0. Eigenvector F =[0.023,0.041,0.87,15.0].
[0075] The feature vector is input into a trained support vector machine model, and the model outputs a signal type label of interference. The decision-making and diversion module suppresses the concentration calculation and alarm output, and reports the feature vector and label to the cloud. In contrast, if the existing technology uses a scheme based on fixed threshold discrimination and time series confirmation, the absorption depression depth of 0.18 in this scanning cycle exceeds the typical alarm threshold of 0.10, and will be marked as a suspected leak. Furthermore, due to the interference fringes generated by the etalon effect, which persist in multiple consecutive scanning cycles, the time series confirmation mechanism will trigger a false alarm. Therefore, in the case where the etalon effect interference inevitably triggers false alarms in the existing technology, this embodiment correctly identifies the signal type as interference by extracting and comprehensively judging multi-dimensional morphological features, thus avoiding the false alarm at its source. This solves the technical problem in the existing technology that cannot distinguish between persistent pseudo-absorption and real gas absorption depressions because it does not involve signal morphology identification.
[0076] In another embodiment of the present invention, a gas alarm false alarm prevention system based on an interference source identification model is provided. This system employs the aforementioned gas alarm false alarm prevention method and includes a signal acquisition module, a signal preprocessing module, a morphological feature extraction module, an interference source identification model inference module, and a decision-making and diversion module. The signal acquisition module is used to acquire the direct absorption spectrum signal for each scanning cycle. The signal preprocessing module is used to normalize the direct absorption spectrum signal to obtain a normalized signal. Based on the calibrated methane absorption line position, the normalized signal is divided into an absorption region and a baseline region. The noise standard deviation of the baseline region is calculated, and it is determined whether there is an absorption depression in the absorption region with a depth exceeding three times the noise standard deviation. If no such depression exists, the system is considered normal.
[0077] The morphological feature extraction module is used to calculate the Lorentz line fitting residual and baseline flatness when effective absorption depressions exist, and extract morphological feature vectors. The morphological feature extraction module also includes a slope linearity calculation unit and a signal-to-noise ratio (SNR) calculation unit. The slope linearity calculation unit performs linear fitting on the slope portion after deducting absorption depressions, using the coefficient of determination of the fit as the slope linearity. The SNR calculation unit calculates the ratio of the absorption depression depth to the noise standard deviation as the SNR. The morphological feature vectors also include slope linearity and SNR. The interference source identification model inference module stores pre-trained interference source identification model parameters and is used to receive morphological feature vectors and output signal type labels. The decision-based diversion module is used to initiate concentration inversion and alarm decision-making when the signal type label is gas leak, and to suppress concentration inversion and alarm decision-making when the signal type label is not gas leak. The signal acquisition module, signal preprocessing module, morphological feature extraction module, interference source identification model inference module, and decision-based diversion module each perform their respective functions.
[0078] Those skilled in the art will understand that the support vector machine (SVM) in the above embodiments is merely an example of a classification model. In practical applications, random forests or lightweight neural networks can be selected as the classification model based on the computing power and storage resources of the target hardware platform. The dimension of the morphological feature vector is not limited to four dimensions; other feature dimensions that characterize signal morphology can be added. The specific formulas and parameter values used in feature extraction can be adjusted according to the actual sensor characteristics and working environment. Various changes, substitutions, and modifications can be made without departing from the spirit and scope defined by the appended claims. Any existing or future-developed processing, machine, manufacturing, material composition, means, method, or step that can perform substantially the same function or obtain substantially the same result as the embodiments of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for preventing false alarms in gas alarms based on an interference source identification model, characterized in that, include: Acquire the direct absorption spectrum signal for each scan cycle; The direct absorption spectral signal is normalized to obtain a normalized signal; Based on the calibrated methane absorption line positions, the normalized signal is divided into an absorption region and a baseline region; Calculate the noise standard deviation of the baseline region; Determine whether there are absorption depressions within the absorption area with a depth exceeding 3 times the noise standard deviation; if not, it is considered normal. If an effective absorption depression exists, the measured absorption depression is fitted with the standard Lorentz line shape using least squares, the root mean square value of the fitting residual is calculated, the Lorentz line shape fitting residual is obtained, the baseline region is fitted with a polynomial, the standard deviation of the fitting residual is calculated, the baseline smoothness is obtained, and the morphological feature vector containing at least the Lorentz line shape fitting residual and the baseline smoothness is extracted. The morphological feature vector is input into a pre-trained interference source identification model to obtain the signal type label output by the interference source identification model. When the signal type label is gas leak, concentration inversion and alarm decision are initiated; when the signal type label is not gas leak, concentration inversion and alarm decision are suppressed.
2. The method according to claim 1, characterized in that: The morphological feature vectors also include ramp linearity and signal-to-noise ratio; The slope linearity is the determination coefficient of the linear fit performed on the slope portion after deducting the absorption depression. The signal-to-noise ratio is the ratio of the absorption indentation depth to the noise standard deviation.
3. The method according to claim 2, characterized in that: The Lorentz linear fitting residual δ Lorentz Calculate using the following formula: in, M To absorb the number of sampling points in the concave region, y meas ( j ) is the first in the absorption depression region j The measured normalized signal amplitude at each sampling point y Lorentz ( j ) is the standard Lorentz function in the th... j Fitted values at each sampling point.
4. The method according to claim 3, characterized in that: The baseline flatness σ residual Calculate using the following formula: in, P This represents the number of sampling points in the baseline region. x norm ( p ) is the first in the baseline region p Normalized signal amplitude at each sampling point x fit ( p ) is the polynomial fit at the th p Fitted values at each sampling point.
5. The method according to claim 4, characterized in that: The slope linearity is calculated using the following formula: in, R ² represents the slope linearity. Q To deduct the number of sampling points on the slope after absorption depression, x norm ( q ) is the first q Normalized signal amplitude at each sampling point x linear ( q ) is the linear fit in the th case. q The fitted values at each sampling point This represents the mean of the normalized signal amplitude for the slope portion.
6. The method according to claim 1, characterized in that: The activation concentration inversion and alarm decision include: in continuous N An alarm is triggered when the interference source identification model outputs a gas leak signal type label for each scanning cycle. N It is a preset positive integer. N ≥2.
7. The method according to claim 1, characterized in that: The signal type label also includes interference. When the signal type label is interference, the morphological feature vector and the signal type label are reported to the cloud platform.
8. The method according to claim 7, characterized in that: After the morphological feature vector and the signal type label are reported to the cloud platform, the updated interference source identification model parameters are obtained from the cloud platform via over-the-air download technology.
9. A gas alarm false alarm prevention system based on an interference source identification model, comprising the method described in any one of claims 1 to 8, characterized in that, include: The signal acquisition module is used to acquire the direct absorption spectrum signal for each scan cycle; The signal preprocessing module is used to normalize the direct absorption spectrum signal to obtain a normalized signal, divide the normalized signal into an absorption region and a baseline region according to the calibrated methane absorption line position, calculate the noise standard deviation of the baseline region, and determine whether there is an absorption depression in the absorption region with a depth exceeding 3 times the noise standard deviation. If there is no depression, it is determined to be normal. The morphological feature extraction module is used to perform least-squares fitting between the measured absorption depression and the standard Lorentz line type when there is an effective absorption depression, calculate the root mean square value of the fitting residual to obtain the Lorentz line type fitting residual, perform polynomial fitting on the baseline region, calculate the standard deviation of the fitting residual to obtain the baseline smoothness, and extract morphological feature vectors that contain at least the Lorentz line type fitting residual and the baseline smoothness. The interference source identification model inference module stores pre-trained interference source identification model parameters and is used to receive the morphological feature vector and output the signal type label. The decision-making and diversion module is used to initiate concentration inversion and alarm decision-making when the signal type label is gas leak, and to suppress concentration inversion and alarm decision-making when the signal type label is not gas leak.
10. The system according to claim 9, characterized in that: The morphological feature extraction module also includes: The slope linearity calculation unit is used to perform linear fitting on the slope portion after deducting absorption depressions, and the determination coefficient of the fitting is used as the slope linearity. The signal-to-noise ratio calculation unit is used to calculate the ratio of the absorption indentation depth to the noise standard deviation as the signal-to-noise ratio; The morphological feature vector also includes the slope linearity and the signal-to-noise ratio.