Internet of Things intelligent gas meter leakage detection and early warning system and method
By using a multi-sensor array and a multi-modal signal fusion algorithm, combined with equipment operating status judgment and dynamic detection threshold adjustment, the problem of misjudgment in traditional gas leak detection systems under high temperature and high humidity environments has been solved, achieving high-precision gas leak identification and early warning.
Patent Information
- Application Number
- CN202511467806.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-15
- Publication Date
- 2025-11-18
AI Technical Summary
Traditional gas leak detection systems struggle to identify minute leaks in high-temperature and high-humidity environments. Pressure stabilization devices and sensor drift lead to a high probability of false alarms. Traditional flow threshold detection methods frequently produce false alarms or misses when using gas at low flow rates.
Employing a multi-sensor array and multi-modal signal fusion algorithm, combined with equipment operating status judgment, the detection threshold and pressure compensation strategy are dynamically adjusted. Data is collected through temperature, humidity, pressure, flow and acoustic sensors, and accurate identification is achieved using a hybrid deep learning model and edge computing devices. The model parameters are then optimized through federated learning.
It significantly improves the ability to identify minute leak signals, reduces the probability of false alarms and missed alarms, and achieves high-precision gas leak detection and early warning in complex environments.
Smart Images

Figure CN120977078A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of gas leak detection technology, and in particular to an Internet of Things (IoT) smart gas meter leak detection and early warning system and method. Background Technology
[0002] Gas leaks are one of the major safety hazards facing urban energy supply systems, posing a risk of causing major safety accidents such as fires and explosions, seriously threatening people's lives and property and social stability. Traditional gas leak detection methods, such as manual inspections, have significant drawbacks, including low efficiency, limited coverage, susceptibility to severe weather, and difficulty in detecting hidden or minor leaks. With the development of Internet of Things (IoT) technology, online gas leak monitoring technology based on smart gas meters is gradually being applied, aiming to improve the real-time performance, sensitivity, and automation of detection.
[0003] Chinese patent application number CN202410330936.4 discloses a gas detection alarm system. This invention calculates the abnormal correlation index of event keywords through an event learning module, and dynamically updates the risk model by combining historical fault data, breaking through the limitations of traditional fixed threshold detection; furthermore, by matching the pairwise combinations of event keywords to accumulate abnormal indicators, it achieves a quantitative assessment of the risk of multiple events being associated, which is superior to the traditional method of triggering early warning by a single event.
[0004] However, in the high temperatures of summer, the gas pressure inside gas pipelines increases significantly. To avoid risks caused by pressure fluctuations, existing technologies typically install pressure regulators and other pressure stabilizing devices in gas systems. However, the frequent adjustments made by these devices to stabilize the pressure can cause pressure fluctuations that mask the signal characteristics of minute leaks. This makes it difficult for pressure monitoring systems to effectively identify actual leaks. Furthermore, in summer rainy weather, the sharp increase in ambient humidity often causes sensor readings to drift (for example, causing a deviation of about 3% in the steady-state pressure value). This drift can completely drown out the already weak leak signal in the background noise. Under the dual interference of pressure stabilization operation and sensor drift, the probability of traditional detection systems missing leaks will increase significantly.
[0005] In addition, high-temperature environments not only affect sensor accuracy but also change users' equipment usage habits. Frequent start-ups and shutdowns of appliances such as stoves and water heaters prevent the pipeline from forming a stable closed detection environment. Continuous pressure fluctuations render the traditional pressure-temperature closed-loop detection method unusable. For example, temporary cooking activities such as cooking late-night snacks or simmering over low heat have flow characteristics that are highly similar to micro-leakage, putting flow threshold-based detection methods in a dilemma: increasing sensitivity will lead to frequent false alarms, while decreasing sensitivity may miss real leaks.
[0006] In summary, the pressure stabilizing device strengthens the pressure stabilization operation to cope with high temperature and pressure fluctuations, and together with the frequent pressure adjustment required for equipment switching, it completely masks the characteristics of minor leaks. Sensor drift caused by environmental factors makes the low flow detection baseline inaccurate, and equipment switching brings additional flow fluctuations. Traditional systems cannot distinguish these complex causes, and the probability of misjudgment increases exponentially.
[0007] To address these issues, this invention proposes an IoT-based smart gas meter leak detection and early warning system and method. Summary of the Invention
[0008] The purpose of this invention is to provide an Internet of Things (IoT) smart gas meter leak detection and early warning system and method to solve the technical problems mentioned in the background art.
[0009] To achieve the above objectives, the present invention provides the following technical solution: a method for leak detection and early warning of an IoT smart gas meter, comprising the following steps:
[0010] S1: Collect multi-parameter data of the gas usage environment and gas pipeline through temperature sensors, humidity sensors, pressure sensors, acoustic sensors and flow sensors to form a multi-parameter environmental dataset;
[0011] S2: Based on the multi-parameter environmental dataset, a multi-modal signal fusion algorithm is used to identify the device operating status and output the device operating status information and the corresponding status confidence level;
[0012] The multimodal signal fusion processing employs either feature-level fusion or decision-level fusion.
[0013] S3: Determine whether the current period is within a stable monitoring window based on the equipment operating status information. The stable monitoring window refers to a period during which there are no gas appliance start-stop actions and the rate of change of environmental parameters is lower than a set threshold. Select different pressure data compensation strategies based on different judgment results, and output the compensated pressure characteristic data and the reliability label of the data.
[0014] S4: Combining the gas usage pattern characteristics learned from historical data, the real-time environmental parameter change rate, the equipment operating status information, and the reliability label of the pressure characteristic data, dynamically calculate and generate adaptive detection threshold parameters;
[0015] S5: Based on the confidence level of the equipment operating status information and the reliability label of the pressure characteristic data, dynamically adjust the weight of each parameter in the risk assessment model, calculate the comprehensive risk score, and determine the warning level;
[0016] S6: Based on the warning level information, control the pressure regulating equipment or shut-off valve through the actuator control module to perform safety operations corresponding to the warning level;
[0017] S7: The multi-source data, intermediate results and final warning results of this detection process are combined into sample data, which are used to update the model parameters used for equipment status identification, pressure compensation and threshold adjustment.
[0018] Preferably, the pressure compensation method in S3 specifically includes:
[0019] Based on the equipment operating status information, it is determined whether the current period is a stable monitoring window where there are no gas appliances starting or stopping and environmental parameters are changing steadily.
[0020] When the stable monitoring window is in effect, a linear regression model with temperature and humidity changes as independent variables is used to compensate and correct the pressure data, and the reliability of the output data is marked as high.
[0021] When not in the stable monitoring window, if the equipment status indicates that a specific gas appliance is operating at low flow, a preset pressure correction curve for that gas appliance is activated for compensation, and the reliability of the output data is marked as medium.
[0022] If the device status cannot be clearly identified or the status confidence level is below the threshold, stress compensation is suspended or a conservative compensation strategy is used, and the reliability of the output data is marked as low.
[0023] Preferably, the method for calculating the adaptive detection threshold parameter is as follows:
[0024] Adaptive detection threshold = base threshold × α;
[0025] The basic threshold is obtained by cluster analysis of historical gas consumption data. The calculation of the adjustment factor α satisfies the following: α is positively correlated with the rate of change of real-time environmental parameters, positively correlated with the frequency of change of equipment status, and negatively correlated with the reliability label of the pressure characteristic data.
[0026] Preferably, the dynamic adjustment of weights in S5 includes:
[0027] The higher the confidence level of the equipment operating status information, the greater the weight given to the equipment status features in the risk score calculation.
[0028] The lower the reliability indicated by the reliability label of the pressure feature data, the smaller the weight assigned to the pressure feature in the risk score calculation.
[0029] Preferably, the multimodal signal fusion processing employs a decision-level fusion method, specifically including:
[0030] Preliminary status assessments were made based on acoustic characteristics, flow patterns, and pressure fluctuation characteristics.
[0031] When pressure fluctuation characteristics indicate a decrease in pressure but flow characteristics do not indicate a synchronous increase in flow, a detailed analysis of the acoustic signal is triggered.
[0032] If the detailed analysis fails to identify the audio characteristics of the gas appliance starting and stopping, it is comprehensively judged as a suspected leak incident.
[0033] Preferably, the multimodal signal fusion algorithm is a feature-level fusion, which specifically includes:
[0034] Extract Mel frequency cepstral coefficients from acoustic signals, extract instantaneous rate of change from flow signals, and extract fluctuation trend features from pressure signals;
[0035] The extracted features are concatenated into a fused feature vector, which is then input into a hybrid deep learning model for processing. The hybrid deep learning model includes a convolutional neural network for processing acoustic features and a long short-term memory network for processing flow and pressure time-series features.
[0036] Preferably, in the weighted calculation of the risk assessment model, the weight value of the humidity parameter is dynamically adjusted according to the measured humidity value, specifically satisfying the following: when the measured humidity value exceeds a preset humidity threshold, the weight value increases linearly with the increase of the humidity value.
[0037] Preferably, the historically learned gas consumption pattern features are obtained by clustering historical gas consumption data using machine learning algorithms, and are used to distinguish between low-flow gas consumption conditions and suspected leakage conditions.
[0038] Among them, low-flow gas usage conditions are associated with the start-stop behavior of specific gas appliances, while suspected leakage conditions are characterized by continuous low flow and unrelated start-stop signals of gas appliances.
[0039] Preferably, in step S7, the sample data used to update the model parameters comes from data from multiple gas meter nodes within the same community. The global model is aggregated and updated in the cloud through federated learning, and then the updated model parameters are distributed to each node.
[0040] An IoT-based smart gas meter leak detection and early warning system includes:
[0041] The data acquisition module includes a temperature sensor, a humidity sensor, a pressure sensor, an acoustic sensor, and a flow sensor;
[0042] The edge computing device is connected to the data acquisition module via a fieldbus. The edge computing device uses an ARM architecture processor and has built-in multimodal signal fusion processing firmware.
[0043] The edge computing device includes:
[0044] The device status recognition unit is equipped with a hybrid neural network accelerator of CNN and LSTM;
[0045] An adaptive stress compensation unit is equipped with a linear regression calculation coprocessor;
[0046] The dynamic threshold adjustment unit is configured with real-time threshold calculation logic;
[0047] The cloud-based early warning platform connects to edge computing devices via a communication module and is configured to perform risk assessments and determine early warning levels.
[0048] The actuator control module connects to the pressure regulating equipment and shut-off valve via industrial Ethernet;
[0049] The units in the edge computing device are connected in sequence to form a data processing pipeline.
[0050] The beneficial effects of this invention are:
[0051] This invention effectively addresses the core technical challenge of masking leakage characteristics caused by sensor drift, pressure stabilization device operation, and frequent start-stop of user equipment in high-temperature and high-humidity environments. By deploying a multi-sensor array and employing a multi-modal signal fusion algorithm, the system can accurately identify the operating status of gas appliances, providing reliable preliminary information for subsequent analysis. It overcomes the shortcomings of traditional single-sensor data being susceptible to interference. Furthermore, it introduces a dynamic pressure data compensation strategy based on equipment operating status judgment, adopting differentiated compensation methods for different operating conditions such as stable periods and specific equipment operating periods, and outputting data reliability labels. This effectively isolates environmental fluctuations and equipment interference, significantly improving the ability to identify minute leakage signals. Attached Figure Description
[0052] Figure 1 This is a schematic diagram illustrating the steps of a method for detecting and warning leaks in an IoT-enabled smart gas meter according to the present invention.
[0053] Figure 2 This is a schematic diagram of the execution logic of the IoT smart gas meter leak detection and early warning method of the present invention. Detailed Implementation
[0054] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0055] Example 1
[0056] In the high temperatures of summer, the pressure stabilizing device intensifies its operation to cope with pressure fluctuations caused by high temperatures. This, combined with the frequent pressure adjustments required for equipment switching, completely masks the characteristics of minor leaks. Furthermore, sensor drift caused by environmental factors leads to inaccurate low-flow detection baselines. Equipment switching and frequent start-ups and shutdowns introduce additional flow fluctuations. Traditional systems cannot distinguish these complex causes, resulting in an exponentially increasing probability of misjudgment. This embodiment is invented to solve the above problems.
[0057] Please see Figure 1 and Figure 2 As shown, an embodiment of the present invention provides a method for leak detection and early warning of an IoT smart gas meter, comprising the following steps:
[0058] S1: Collect multi-parameter data of the gas usage environment and gas pipeline through temperature sensors, humidity sensors, pressure sensors, acoustic sensors and flow sensors to form a multi-parameter environmental dataset.
[0059] The acquisition of multi-parameter data is fundamental to the system's perception of the physical world. To address the issues of sensor drift under high temperature and humidity and the unreliability of single data, it is necessary to acquire multiple physical quantities simultaneously. In one embodiment of this invention, a DS18B20 digital sensor is used for temperature measurement and is installed close to the outer wall of the gas pipeline. An HTS221 capacitive sensor is used for humidity measurement to monitor the relative humidity of the environment. A MEMS piezoresistive pressure sensor with a range of 0-10 kPa and an accuracy of 0.5% FS is selected. An ICP-type accelerometer with a frequency response range of 0.5-20 kHz is used to capture the frequency characteristics of ultrasonic waves from pipeline vibration and gas leakage. A turbine flow meter is used for flow measurement.
[0060] Data acquisition is controlled by the MCU on the edge computing device, synchronously collected at a sampling rate of 10Hz, and preliminarily smoothed and denoised by Kalman filtering. All data are then stamped with millisecond-level timestamps to form a unified format multi-parameter environmental dataset, providing a high-quality time-aligned data source for subsequent fusion processing.
[0061] S2: Based on a multi-parameter environmental dataset, a multi-modal signal fusion algorithm is used to identify the operating status of the equipment and output the equipment operating status information and the corresponding status confidence.
[0062] Due to the varying computing resources of edge computing devices and the significant differences in hardware deployment environments between high-end communities and ordinary households, multimodal signal fusion processing employs feature-level fusion or decision-level fusion methods to improve the applicability and robustness of this solution.
[0063] For high-end communities with ample computing resources, a feature-level fusion approach is preferred. This approach concatenates low-level, high-dimensional feature vectors, such as the Mel-frequency cepstral coefficients of acoustic signals, the instantaneous rate of change of flow signals, and the fluctuation trend characteristics of pressure signals, into a unified fused feature vector. This massive feature vector contains a wealth of original information and is then fed into an end-to-end hybrid deep learning model for processing.
[0064] When feature-level fusion is used, the specific process is as follows:
[0065] a) First, feature extraction is performed on the edge side. After pre-emphasis, framing, and windowing, the acoustic signal is calculated to have a 256-point Mel spectrum, and then the 13-dimensional MFCC coefficients are extracted as features. The flow signal is calculated to have the mean of the absolute value of the first-order difference within the past 3-second window as the instantaneous rate of change. The pressure signal is fitted with the slope within the past 5 seconds using linear regression as the fluctuation trend feature.
[0066] b) After concatenating these feature vectors of different dimensions, they are input into a lightweight hybrid deep learning model deployed on the edge device. This model processes acoustic MFCC features by a one-dimensional convolutional layer (3 kernels, 16 kernels, ReLU activation) and processes the temporal relationship of flow and pressure features by an LSTM layer containing 8 hidden units.
[0067] c) Finally, the outputs of the two branches are fused in a fully connected layer, and the classification probabilities of the four states "shutdown", "low power", "high power" and "unknown" are output through the Softmax function, which is the state confidence.
[0068] Decision-level fusion is another feasible implementation approach, which can be chosen by ordinary households with limited computing resources. It reduces the computing power requirements of devices through modular processing and rule-based top-level reasoning. The specific steps are as follows:
[0069] First, separate preprocessing and judgment modules are established for the three types of signals: acoustic, flow, and pressure.
[0070] The acoustic module continuously monitors ambient sound, generates a Mel spectrum in real time, and matches it with the pre-stored operating audio of gas appliances (such as stoves and water heaters) to determine whether events such as "stove ignition / extinguishing" or "water heater start / stop" have occurred. If no specific event occurs, it outputs "no event".
[0071] The flow module monitors the flow rate. If the flow rate is consistently higher than the [kgh] low flow rate threshold, the flow rate is marked as "having flow"; otherwise, it is marked as "no flow". Short-term fluctuations below [kgh] indicate that the flow rate is stable. The pressure module monitors the pressure. If the pressure continues to decrease within a [10sec] time window and the rate of decrease is higher than the [0.01kpasec] threshold, the pressure is considered to be "rapidly decreasing".
[0072] Furthermore, based on the aforementioned modules, there exists a rule-based reasoning engine based on expert experience, serving as the top-level decision-making unit. This engine integrates the judgment results from the three modules. The rule states that if the pressure module determines a "sharp drop" lasting longer than n seconds (where n is a positive integer), and the flow module determines "no flow" or "extremely low flow with short-term fluctuations below [kgh]", a contradiction of "pressure drop but no gas usage" is considered to have occurred. This decision-making unit will then send a high-priority request to the acoustic module to initiate a detailed listening process to confirm whether gas usage has occurred but was not detected for various reasons. This detailed listening process focuses on monitoring ultrasonic signals that are easily masked by noise, such as low-intensity signals associated with leaks.
[0073] If the acoustic module determines during this targeted monitoring process that no known gas equipment start-up, shutdown, or operation events were detected, but there are abnormal ultrasonic signals indicating a leak, then the rule engine will, based on the above four pieces of evidence—abnormal pressure drop, no corresponding flow, no equipment acoustic events, and the presence of leak ultrasonic characteristics—calculate the confidence level of these four pieces of evidence and finally determine the equipment status as "highly suspected of leaking," with a high confidence level.
[0074] In subsequent analysis, the system will determine in real time whether it has entered the "stable monitoring window period"—that is, a period in which no gas appliances are started or stopped and environmental parameters such as temperature and humidity change slowly. Based on the judgment result, different pressure data compensation strategies will be selected, and the compensated pressure characteristic value and its reliability label will be output.
[0075] The criteria for determining a stable window can be set as follows: the device status remains unchanged for 30 seconds, and the absolute value of the temperature change rate is less than 0.1°C / second and the humidity change rate is less than 1% / second.
[0076] The specific process for stress compensation is as follows:
[0077] If the monitoring window is determined to be stable, the system will use a linear regression model with temperature and humidity changes as independent variables to compensate and correct the real-time pressure readings, and mark the reliability of the output data as "high".
[0078] Specifically:
[0079]
[0080] in, This is the compensated pressure value. This is the original pressure reading. , , It is the regression coefficient. The change in temperature The parameters mentioned above, which represent humidity changes, are determined by collecting historical pressure, temperature, and humidity data during a stable monitoring window period in the initial calibration phase of the system. The least squares method is then used to perform multiple linear regression fitting to fit these coefficients, enabling the model to accurately compensate for the systematic impact of environmental temperature and humidity changes on pressure readings.
[0081] When the system is not in a stable monitoring window but detects that a specific gas appliance is operating at low flow, it will use a pre-set pressure correction curve for that appliance to compensate. Specifically, the system will pre-collect the pipeline pressure fluctuation curve of the appliance during normal low flow operation, storing it as its "pressure fingerprint" in the database. During actual monitoring, once the appliance is detected to be running, the system will call the corresponding standard fluctuation curve and subtract the predicted appliance fluctuation from the measured pressure value, thereby suppressing pressure disturbances caused by normal gas usage and more clearly capturing the pressure drop trend caused by potential leaks. At this time, the system will mark the reliability of the output data as "moderate".
[0082] If the current equipment status cannot be clearly identified, or the system's judgment of the status is of low reliability, the use of complex compensation strategies will be suspended, and a conservative data smoothing method will be adopted instead. For example, a moving average value will be calculated for the original pressure data within the time window, and this will be used as the compensation result. In this case, the reliability of the data will be marked as "low".
[0083] The detection system also combines historically learned gas usage pattern characteristics, real-time environmental parameter changes, equipment operating status, and reliability labels of pressure data to dynamically generate adaptive detection thresholds. Specifically, the gas usage pattern characteristics are obtained through cluster analysis of historical gas usage behavior, which is used to distinguish between normal low-flow gas usage and suspected leaks. Normal low-flow conditions are usually accompanied by start-stop signals of specific gas appliances, while suspected leaks are characterized by continuous low flow but no corresponding equipment operating signals.
[0084] Furthermore, the system does not directly cluster the raw flow or pressure data, but first constructs feature vectors, including average flow, flow fluctuation degree, and the number of related acoustic events. For example, normal low flow gas usage may correspond to "low average flow, low fluctuation, accompanied by 1 to 2 start-stop signals", while suspected leakage may manifest as "low average flow, low fluctuation, no acoustic events".
[0085] After dividing the feature vectors into different categories using unsupervised clustering algorithms (such as K-Means), each category is then assigned an actual semantic label by combining other sensor signals. For example, if most data samples of a certain category are accompanied by acoustic signals of gas appliances starting and stopping, they are labeled as "normal gas usage mode"; if the samples show a continuous low flow but no equipment operation signal, they are labeled as "suspected leak mode".
[0086] The system uses these labeled pattern features as a comparison benchmark. In actual operation, by calculating the similarity between the real-time feature vector and each known pattern class, it can determine which gas consumption condition the current state is closer to, thereby achieving effective differentiation.
[0087] The calculation method for the adaptive detection threshold parameter in step S4 is as follows:
[0088] Adaptive detection threshold = base threshold × α;
[0089] The basic threshold is obtained by cluster analysis of historical gas consumption data. The adjustment factor α is calculated to satisfy the following conditions: α is positively correlated with the rate of change of real-time environmental parameters, positively correlated with the frequency of equipment status changes, and negatively correlated with the reliability label of pressure characteristic data.
[0090] Furthermore, the method for obtaining the basic threshold is as follows: During the initial learning phase, the system selects historical data from periods confirmed to be leak-free, especially data within the stable monitoring window, extracts the pressure change rate sequence over time, uses the K-Means clustering algorithm to perform cluster analysis on the sequence, and sets the pressure change rate value corresponding to the centroid of the largest cluster as the basic threshold. This value represents the background pressure fluctuation level of the system under normal conditions.
[0091] Furthermore, the formula for calculating the adjustment factor α is specified as follows:
[0092]
[0093] in, This is the arithmetic mean of the absolute values of the rates of change in ambient temperature and humidity over the most recent 60-second time window. This represents the number of times the device status identification result has changed within the last 5 minutes. It is a numerical value mapped based on the reliability label of the pressure characteristic data, with "high", "medium" and "low" reliability corresponding to 0.0, 0.5 and 1.0 respectively.
[0094] The coefficients k1, k2, and k3 in the formula are weighting coefficients, and their specific values need to be determined through experimental calibration. The calibration method is to use a historical dataset containing known normal operating conditions and leakage events, and take the minimum sum of the comprehensive false alarm rate and false alarm rate obtained when using different combinations of coefficients to judge leakage on the historical dataset as the optimization objective, and then optimize the coefficients k1, k2, and k3.
[0095] S5: Based on the confidence level of the equipment operating status information and the reliability label of the pressure characteristic data, dynamically adjust the weight of each parameter in the risk assessment model, calculate the comprehensive risk score, and determine the warning level.
[0096] In the weighted calculation of the risk assessment model, the weight value of the humidity parameter is dynamically adjusted according to the measured humidity value, specifically satisfying the following: when the measured humidity value exceeds a preset humidity threshold, the weight value increases linearly with the increase of the humidity value.
[0097] Specifically, the weights of device status characteristics: ;
[0098] Weights of stress characteristics: That is, when the reliability is "low", the weight is halved;
[0099] Humidity feature weight When the measured humidity is below 70%, the base weight is 0.2; when the humidity exceeds 70%, ... This achieves a linear increase with humidity, but the weights will eventually be normalized.
[0100] The overall risk score is:
[0101]
[0102] Where I represents the normalized value of the anomaly index for each feature, specifically:
[0103] ;
[0104] ;
[0105] .
[0106] The humidity baseline value is usually set as the local average daily humidity or an empirical value (such as 50%).
[0107] final Compared with two preset risk thresholds, four warning levels are determined: "normal", "observation", "warning", and "serious".
[0108] Risk thresholds (e.g., 0.3 and 0.7) are not fixed; their initial values are obtained through analysis and calibration of a large amount of historical operating data. The specific calibration method is as follows: collect a historical dataset containing various known operating conditions (clearly normal, minor abnormalities, confirmed leaks, etc.), and plot the comprehensive risk score of all samples in the dataset. Distribution curve (or histogram): By analyzing the distribution curve, select the score point that can most effectively distinguish different risk levels as the threshold.
[0109] For example, a threshold of 0.3 is located between the high end of the "normal" working condition sample distribution and the starting region of the "slightly abnormal" sample distribution, which can effectively filter out the vast majority of normal fluctuations; while a threshold of 0.7 is located in the high-scoring region of the "abnormal" sample distribution, which is used to identify high-risk events and ensure that the highest level of warning is triggered only under high confidence conditions.
[0110] S6: Based on the warning level information, control the pressure regulating equipment or shut-off valve through the actuator control module to perform safety operations corresponding to the warning level.
[0111] Based on the comprehensive risk score calculated in step S5, the system classifies the warning level into four levels: "normal", "observation", "warning" and "serious", and performs corresponding safety operations.
[0112] When the cloud-based early warning platform determines the level to "observation", it only records logs and updates the device status.
[0113] When the alert level is determined, the platform sends an alert notification to the user's mobile app via the 4G module and activates the local sound and light alarm on the edge device, such as a buzzer sounding or a light flashing.
[0114] When the situation is determined to be "serious", the platform immediately sends an encrypted shut-off command to the edge computing device via the MQTT protocol. After receiving the command, the actuator control module on the edge device will first verify the command signature, and then drive the relay switch to send a 24V pulse voltage for 2 seconds to the solenoid coil of the shut-off valve to ensure that the shut-off valve is reliably closed. At the same time, the status of this action will be fed back to the cloud platform for record-keeping to ensure the traceability of the operation.
[0115] S7: The multi-source data, intermediate results and final warning results of this test process are combined into sample data, which are used to update the model parameters used for equipment status identification, pressure compensation and threshold adjustment.
[0116] Preferably, the sample data used to update the model parameters comes from data from multiple gas meter nodes within the same community. The global model is aggregated and updated in the cloud through federated learning, and then the updated model parameters are distributed to each node.
[0117] Step S7 is a crucial closed-loop step for achieving continuous self-optimization and knowledge accumulation in the system. Its purpose is to enable the system to adapt to differences in gas usage habits among different households and the slow aging of equipment over time. This method not only uses data from a single test, but more importantly, it combines multi-source raw data from the testing process, intermediate results from each step (such as equipment status, compensated pressure, reliability labels, adaptive thresholds, and risk scores), and the final warning results into a labeled sample data set, which is then uploaded to the cloud.
[0118] Furthermore, in order to optimize the global model while protecting user privacy, the system adopts federated learning technology. It aggregates anonymized sample data from tens of thousands of gas meter nodes in the same community or region in the cloud for collaborative training, updates global model parameters such as equipment status recognition model, pressure compensation model, and threshold calculation logic, and then redistributes the updated and more powerful model parameters to the local models in various edge computing devices. Through this continuous "perception-decision-learning" cycle, the entire system can continuously evolve and increasingly accurately distinguish between normal operating conditions and leakage risks, thereby fundamentally reducing the probability of false alarms and missed alarms in the long term.
[0119] Example 2
[0120] This embodiment also provides an IoT smart gas meter leak detection and early warning system to implement the relevant methods in Embodiment 1 above, specifically including a data acquisition module, an edge computing device, a cloud early warning platform, and an actuator control module.
[0121] The data acquisition module includes temperature sensors, humidity sensors, pressure sensors, acoustic sensors, and flow sensors, and is responsible for collecting multiple physical parameters of the environment around the gas meter and the gas pipeline.
[0122] The edge computing device is connected to the data acquisition module via a fieldbus. The edge computing device uses an ARM architecture processor and has built-in multimodal signal fusion processing firmware. It inherits three key processing units and adopts a pipelined operation mode, specifically including:
[0123] The device status recognition unit is equipped with a hybrid neural network accelerator of CNN and LSTM for efficient operation of the status recognition algorithm;
[0124] The adaptive pressure compensation unit is equipped with a linear regression calculation coprocessor, which is dedicated to real-time compensation and correction of pressure data.
[0125] The dynamic threshold adjustment unit is equipped with real-time threshold calculation logic and is responsible for generating adaptive detection thresholds.
[0126] The cloud-based early warning platform connects to edge computing devices via a communication module, receives feature data that has been preprocessed at the edge, and runs a complex risk assessment model to determine the early warning level.
[0127] The actuator control module connects to the pressure regulating equipment and shut-off valve via industrial Ethernet. Based on the warning level instructions issued by the cloud, it drives the actuator to complete different levels of safety operations, from pressure fine-tuning to emergency shut-off.
[0128] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A method for leak detection and early warning of IoT smart gas meters, characterized in that, Includes the following steps: S1: Collect multi-parameter data of the gas usage environment and gas pipeline through temperature sensors, humidity sensors, pressure sensors, acoustic sensors and flow sensors to form a multi-parameter environmental dataset; S2: Based on the multi-parameter environmental dataset, a multi-modal signal fusion algorithm is used to identify the device operating status and output the device operating status information and the corresponding status confidence level; The multimodal signal fusion processing employs either feature-level fusion or decision-level fusion. S3: Determine whether the current period is within a stable monitoring window based on the equipment operating status information. The stable monitoring window refers to a period during which there are no gas appliance start-stop actions and the rate of change of environmental parameters is lower than a set threshold. Select different pressure data compensation strategies based on different judgment results, and output the compensated pressure characteristic data and the reliability label of the data. S4: Combining the gas usage pattern characteristics learned from historical data, the real-time environmental parameter change rate, the equipment operating status information, and the reliability label of the pressure characteristic data, dynamically calculate and generate adaptive detection threshold parameters; S5: Based on the confidence level of the equipment operating status information and the reliability label of the pressure characteristic data, dynamically adjust the weight of each parameter in the risk assessment model, calculate the comprehensive risk score, and determine the warning level; S6: Based on the warning level information, control the pressure regulating equipment or shut-off valve through the actuator control module to perform safety operations corresponding to the warning level; S7: The multi-source data, intermediate results and final warning results of this detection process are combined into sample data, which are used to update the model parameters used for equipment status identification, pressure compensation and threshold adjustment.
2. The method for leak detection and early warning of an IoT smart gas meter according to claim 1, characterized in that, The pressure compensation method in S3 specifically includes: Based on the equipment operating status information, it is determined whether the current period is a stable monitoring window where there are no gas appliances starting or stopping and environmental parameters are changing steadily. When the stable monitoring window is in effect, a linear regression model with temperature and humidity changes as independent variables is used to compensate and correct the pressure data, and the reliability of the output data is marked as high. When not in the stable monitoring window, if the equipment status indicates that a specific gas appliance is operating at low flow, a preset pressure correction curve for that gas appliance is activated for compensation, and the reliability of the output data is marked as medium. If the device status cannot be clearly identified or the status confidence level is below the threshold, stress compensation is suspended or a conservative compensation strategy is used, and the reliability of the output data is marked as low.
3. The method for leak detection and early warning of an IoT smart gas meter according to claim 1, characterized in that, The method for calculating the adaptive detection threshold parameter is as follows: Adaptive detection threshold = base threshold × α; The basic threshold is obtained by cluster analysis of historical gas consumption data. The adjustment factor α is calculated to satisfy the following conditions: α is positively correlated with the rate of change of real-time environmental parameters, positively correlated with the frequency of change of equipment status, and negatively correlated with the reliability label of the pressure characteristic data.
4. The method for leak detection and early warning of an IoT smart gas meter according to claim 3, characterized in that, The dynamic adjustment of weights in S5 includes: The higher the confidence level of the equipment operating status information, the greater the weight given to the equipment status features in the risk score calculation. The lower the reliability indicated by the reliability label of the pressure feature data, the smaller the weight assigned to the pressure feature in the risk score calculation.
5. The method for leak detection and early warning of an IoT smart gas meter according to claim 1, characterized in that, The multimodal signal fusion processing employs a decision-level fusion method, specifically including: Preliminary status assessments were made based on acoustic characteristics, flow patterns, and pressure fluctuation characteristics. When pressure fluctuation characteristics indicate a decrease in pressure but flow characteristics do not indicate a synchronous increase in flow, a detailed analysis of the acoustic signal is triggered. If the detailed analysis fails to identify the audio characteristics of the gas appliance starting and stopping, it is comprehensively judged as a suspected leak incident.
6. The method for leak detection and early warning of an IoT smart gas meter according to claim 1, characterized in that, The multimodal signal fusion algorithm is a feature-level fusion, which specifically includes: Extract Mel frequency cepstral coefficients from acoustic signals, extract instantaneous rate of change from flow signals, and extract fluctuation trend features from pressure signals; The extracted features are concatenated into a fused feature vector, which is then input into a hybrid deep learning model for processing. The hybrid deep learning model includes a convolutional neural network for processing acoustic features and a long short-term memory network for processing flow and pressure time-series features.
7. The method for leak detection and early warning of an IoT smart gas meter according to claim 1, characterized in that, In the weighted calculation of the risk assessment model, the weight value of the humidity parameter is dynamically adjusted according to the measured humidity value, specifically satisfying the following: when the measured humidity value exceeds a preset humidity threshold, the weight value increases linearly with the increase of the humidity value.
8. The method for leak detection and early warning of an IoT smart gas meter according to claim 1, characterized in that, The gas usage pattern features learned from history are obtained by clustering historical gas usage data using machine learning algorithms, and are used to distinguish between low-flow gas usage conditions and suspected leakage conditions. Among them, low-flow gas usage conditions are associated with the start-stop behavior of specific gas appliances, while suspected leakage conditions are characterized by continuous low flow and unrelated start-stop signals of gas appliances.
9. The method for leak detection and early warning of an IoT smart gas meter according to claim 1, characterized in that, In step S7, the sample data used to update the model parameters comes from data from multiple gas meter nodes within the same community. The global model is aggregated and updated in the cloud through federated learning, and then the updated model parameters are distributed to each node.
10. An Internet of Things (IoT) smart gas meter leak detection and early warning system, used to implement the method described in any one of claims 1-9, characterized in that, include: The data acquisition module includes a temperature sensor, a humidity sensor, a pressure sensor, an acoustic sensor, and a flow sensor; The edge computing device is connected to the data acquisition module via a fieldbus. The edge computing device uses an ARM architecture processor and has built-in multimodal signal fusion processing firmware. The edge computing device includes: The device status recognition unit is equipped with a hybrid neural network accelerator of CNN and LSTM; An adaptive stress compensation unit is equipped with a linear regression calculation coprocessor; The dynamic threshold adjustment unit is configured with real-time threshold calculation logic; The cloud-based early warning platform connects to edge computing devices via a communication module and is configured to perform risk assessments and determine early warning levels. The actuator control module connects to the pressure regulating equipment and shut-off valve via industrial Ethernet; The units in the edge computing device are connected in sequence to form a data processing pipeline.
Citation Information
Patent Citations
Gas detection alarm system
CN117935519A
Cited By
Intelligent gas meter remote reading method and system based on Internet of Things
CN121357441A
Building gas leakage monitoring method and monitoring device based on pressure signals
CN121702663A
AIoT cloud side collaborative Internet of Things management platform and method
CN121744128A
Multi-mode sensing fusion pipeline micro-leakage accurate positioning system and method thereof
CN121859209A
A multi-modal sensor fusion pipeline micro-leak precise positioning system and method thereof
CN121859209B