A gas micro-leakage detection method and system based on gas feature image

CN122793391BActive Publication Date: 2026-10-30GUANGDONG HUAINTELLIGENT INFORMATION TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202611295647.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-08-25
Publication Date
2026-10-30
Estimated Expiration
2046-08-25

AI Technical Summary

Technical Problem

[0006]本发明的目的在于提供一种基于用气特征画像的燃气微泄漏检测方法及系统,旨在解决现有技术中因将偶发性多设备叠加流量误识别为正常行为导致基线置信区间扩张、进而影响微漏检测准确性的技术问题,能够实现对合法多设备叠加流量的有效隔离,防止其污染动态基线,从而保障置信区间的窄范围边界,有效提升对微小泄漏的识别灵敏度

Benefits of technology

第三判定模块,用于在所述叠加流量事件结束后,恢复使用所述燃气流量动态基线作为监测边界,用以判定在所述低频用气期间是否存在与所述燃气设备运行状态无关的第二附加流量分量,并根据所述第二附加流量分量的判定结果,输出第二微漏预警信息。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122793391B_ABST
    Figure CN122793391B_ABST
Patent Text Reader

Abstract

The application provides a gas micro-leakage detection method and system based on gas feature images, and relates to the technical field of gas safety monitoring. The method comprises the following steps: dividing a low-frequency gas period and establishing a baseline according to a gas image; extracting a real-time flow waveform, identifying a high-flow event deviating from the baseline, and combining device status and the image to determine whether it is a multi-device superimposed flow; if so, the superimposed data is prohibited from updating the baseline; then, each device feature template is called to reconstruct an expected waveform, and a residual sequence is obtained by the difference between the measured flow and the expected waveform, combined with environmental parameters, to determine whether there is additional flow unrelated to the device during the superimposed period; after the superimposed period ends, the baseline monitoring boundary is restored, and it is determined whether there is additional flow. The method of the application can effectively isolate the legal multi-device superimposed flow, prevent it from polluting the dynamic baseline, thereby guaranteeing the narrow range boundary of the confidence interval, and effectively improving the identification sensitivity of the micro-leakage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of gas safety monitoring technology, and more specifically, to a method and system for detecting micro-leaks in gas based on gas usage characteristic profiles. Background Technology

[0002] In modern gas safety management, analyzing user equipment usage habits for gas leak monitoring has become an important means of improving safety. Such systems typically rely on long-term accumulated stable gas usage segments to construct behavioral templates and establish dynamic baseline models based on these templates. In actual operation, the system often marks periods such as early morning as quiet periods with extremely low gas usage probability and narrows the confidence interval of the dynamic baseline to an extremely narrow range close to zero flow rate to achieve highly sensitive detection of even minor, continuous leaks.

[0003] However, in complex application scenarios such as winter heating in northern regions, the intermittent heating operation of the wall-hung boiler often overlaps with the short-term use of domestic hot water by users. When the wall-hung boiler starts according to the preset program to maintain room temperature, if the user simultaneously turns on the domestic hot water, the superposition of the two gas flow rates will form a short-duration but significantly high-flow pulse. Although this pulse is a legitimate characteristic of user gas consumption, its flow level far exceeds the upper limit of the confidence interval of the historical quiet baseline for that period.

[0004] Existing adaptive adjustment strategies for behavioral baselines have significant shortcomings when dealing with such sporadic, multi-device combined pulses. On the one hand, if the system treats them as anomalies, false alarms will occur, reducing user trust in the system. On the other hand, if the system absorbs them as normal recent behavioral data, the existing update mechanism will identify the pulse as legitimate noise, leading to a significant expansion of the confidence interval during quiet periods. This mechanism lacks effective isolation for legitimate but rare overlapping traffic events, thus disrupting the narrow confidence boundaries originally set for minor leaks. After the confidence interval expands, genuine minor leak signals are easily submerged within the wide confidence interval, causing the system to be unable to effectively identify minor, persistent leaks during subsequent nighttime periods, thus creating security vulnerabilities.

[0005] To address the aforementioned issues, existing technologies urgently need improvement. Summary of the Invention

[0006] The purpose of this invention is to provide a gas micro-leakage detection method and system based on gas usage characteristic profiles. It aims to solve the technical problem in the prior art where the misidentification of occasional multi-device superimposed flow as normal behavior leads to the expansion of the baseline confidence interval, which in turn affects the accuracy of micro-leakage detection. The invention can effectively isolate legitimate multi-device superimposed flow, prevent it from contaminating the dynamic baseline, thereby ensuring the narrow range boundary of the confidence interval and effectively improving the sensitivity of micro-leakage identification.

[0007] In a first aspect, the present invention provides a method for detecting micro-leaks in natural gas based on gas consumption characteristic profiling, comprising the following steps: S1. Acquire real-time gas flow data, gas equipment operating status data, and environmental parameters of the monitored pipeline; S2. Based on the user's historical gas consumption behavior profile, determine the low-frequency gas consumption period and establish a dynamic baseline for gas flow rate for the low-frequency gas consumption period; S3. Extract the waveform features of the real-time gas flow data, and identify high flow events that deviate from the dynamic baseline of the gas flow based on the waveform features; S4. Combining the operating status data, the environmental parameters, and the user's historical gas consumption behavior profile, determine whether the high flow event is a superimposed flow event caused by the operation of multiple gas devices; S5. If it is determined that the high flow event belongs to the superimposed flow event, then the preset isolation protection logic is activated; the isolation protection logic includes prohibiting the use of the flow data corresponding to the superimposed flow event to update the gas flow dynamic baseline; S6. Call the operating feature template corresponding to each of the gas devices, combine it with the operating status data, reconstruct the expected flow waveform, and perform difference processing on the real-time gas flow data and the expected flow waveform to obtain the flow residual sequence; S7. Based on the environmental parameters, by continuously monitoring the flow residual sequence, determine whether there is a first additional flow component that is unrelated to the operating status of the gas equipment during the existence of the superimposed flow event, and output the first micro-leakage warning information according to the determination result of the first additional flow component; S8. After the superimposed flow event ends, the gas flow dynamic baseline is restored as the monitoring boundary to determine whether there is a second additional flow component that is unrelated to the operating status of the gas equipment during the low-frequency gas consumption period, and outputs the second micro-leakage warning information based on the determination result of the second additional flow component.

[0008] The gas micro-leakage detection method based on gas consumption feature profile provided by this invention has the advantages of effectively identifying and isolating multiple device superimposed flow events, avoiding abnormal expansion of the baseline confidence interval due to superimposed flow, thereby ensuring high-sensitivity monitoring of small and continuous leaks during low-frequency gas consumption, significantly reducing false alarm rate and improving system safety.

[0009] Secondly, the present invention provides a gas micro-leakage detection system based on gas consumption characteristic profiling, comprising: The acquisition module is used to acquire real-time gas flow data, gas equipment operating status data, and environmental parameters of the monitored pipeline; A module is established to determine low-frequency gas usage periods based on the user's historical gas usage behavior profile, and to establish a dynamic baseline for gas flow during the low-frequency gas usage periods. The identification module is used to extract the waveform features of the real-time gas flow data and, based on the waveform features, identify high flow events where the flow rate deviates from the dynamic baseline of the gas flow. The first determination module is used to combine the operating status data, the environmental parameters and the user's historical gas consumption behavior profile to determine whether the high flow event is a superimposed flow event caused by the operation of multiple gas devices. The protection module is used to activate preset isolation protection logic if it is determined that the high flow event belongs to the superimposed flow event; the isolation protection logic includes prohibiting the use of the flow data corresponding to the superimposed flow event to update the gas flow dynamic baseline; The processing module is used to call the operating feature template corresponding to each of the gas devices, combine it with the operating status data, reconstruct the expected flow waveform, and perform difference processing on the real-time gas flow data and the expected flow waveform to obtain the flow residual sequence. The second determination module is used to determine, based on the environmental parameters and by continuously monitoring the flow residual sequence, whether there is a first additional flow component that is unrelated to the operating status of the gas equipment during the existence of the superimposed flow event, and to output a first micro-leakage warning message based on the determination result of the first additional flow component. The third determination module is used to restore the use of the gas flow dynamic baseline as the monitoring boundary after the superimposed flow event ends, in order to determine whether there is a second additional flow component that is unrelated to the operating status of the gas equipment during the low-frequency gas consumption period, and to output the second micro-leakage warning information based on the determination result of the second additional flow component.

[0010] As can be seen from the above, the gas micro-leakage detection method based on gas usage characteristic profiles provided by this invention solves the problem in existing technologies where the confidence interval is disrupted and micro-leakage signals are masked due to the misidentification of legitimate but rare superimposed flow events as noise, by constructing a dynamic baseline based on the user's historical behavior and introducing a real-time identification and isolation mechanism for superimposed flow events generated by multiple devices. By activating isolation logic and performing residual analysis independently during superimposed events, it can not only effectively identify micro-leakage signals hidden in high-flow pulses, but also maintain high sensitivity for long-term monitoring through a robust baseline adaptive adjustment mechanism. This solution effectively reduces the false alarm rate of the system and significantly improves the ability to detect minute gas leaks in complex gas usage scenarios, providing accurate and reliable technical support for the safety management of gas pipeline networks.

[0011] Other features and advantages of the invention will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing embodiments of the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the written description and the accompanying drawings. Attached Figure Description

[0012] Figure 1 This is a flowchart of a gas micro-leakage detection method based on gas consumption feature profiling provided in an embodiment of the present invention.

[0013] Figure 2 This is a schematic diagram of a gas micro-leakage detection system based on gas consumption feature profiling provided in an embodiment of the present invention.

[0014] Label Explanation: 100. Acquisition Module; 200. Establishment Module; 300. Identification Module; 400. First Judgment Module; 500. Protection Module; 600. Processing Module; 700. Second Judgment Module; 800. Third Judgment Module. Detailed Implementation

[0015] 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. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0016] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this invention, terms such as "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0017] In the process of using user equipment usage behavior analysis for gas safety monitoring, the dynamic baseline model relies on long-term accumulated stable gas usage segments to construct accurate behavioral templates. In actual operation, the system typically marks periods such as early morning as quiet periods with extremely low gas usage probability based on historical gas usage patterns, and narrows the confidence interval of the dynamic baseline to an extremely narrow range close to zero flow rate to improve the detection sensitivity for minor, persistent leaks. However, in gas micro-leak detection, because the gas usage feature profile cannot cover low-frequency, occasional multi-device gas usage scenarios, the system often misjudges legitimate high-flow pulses as noise and incorrectly updates the dynamic baseline, thereby compromising the micro-leak detection sensitivity. The essence of this problem is that the existing adaptive adjustment strategy for behavioral baselines lacks an isolation mechanism for occasional multi-device combined pulses, causing the system to be unable to distinguish the boundary between legitimate but rare superimposed flow rates and abnormal flow rates, thus leading to unnecessary expansion of the baseline confidence interval.

[0018] For example, in northern winter heating environments, wall-hung boiler users commonly experience an overlap between intermittent nighttime heating operation and occasional domestic hot water use. Late at night, the boiler is intermittently running according to a preset program to maintain room temperature. If a user gets up at night and briefly turns on the domestic hot water, the combined gas flow from both sources creates a high-flow pulse lasting several tens of seconds. This pulse represents legitimate gas usage, but it far exceeds the upper limit of the confidence interval for the historical quiet period. Because behavioral profiling is difficult to establish for specific combinations of boiler heating and domestic hot water usage in extremely low-frequency, sporadic events, the system will identify this sudden high-flow pulse as noise, thus significantly expanding the confidence interval for the quiet period. This approach disrupts the originally narrow confidence boundary that closely monitors minute, persistent leaks. The actual micro-leak signals are then flooded by the wide confidence interval during the subsequent nighttime period, preventing the system from effectively identifying minute, persistent leaks.

[0019] If the above problems are not addressed, the dynamic baseline update mechanism will continue to absorb legitimate but rare superimposed flow, leading to a loss of the tightness of the monitoring boundary. As the confidence interval continues to expand, the system's ability to detect minute flow anomalies will significantly decrease, causing micro-leakage signals to be masked in the background of normal flow fluctuations, thus leading to the failure of the safety monitoring function and failing to meet the high-standard monitoring requirements for gas pipeline safety.

[0020] For reference, see the appendix. Figure 1 This invention provides a method for detecting micro-leaks in natural gas based on gas consumption characteristic profiles, comprising the following steps: S1. Acquire real-time gas flow data, gas equipment operating status data, and environmental parameters of the monitored pipeline; S2. Based on the user's historical gas consumption behavior profile, determine the low-frequency gas consumption period and establish a dynamic baseline for gas flow during the low-frequency gas consumption period; S3. Extract waveform features from real-time gas flow data, and identify high flow events that deviate from the dynamic baseline of gas flow based on waveform features; S4. Combine operating status data, environmental parameters, and user historical gas consumption behavior profiles to determine whether the high flow event is a superimposed flow event caused by the operation of multiple gas devices; S5. If the high flow event is determined to be an overlay flow event, the preset isolation protection logic is activated; the isolation protection logic includes prohibiting the use of flow data corresponding to the overlay flow event to update the dynamic baseline of gas flow. S6. Call the operating characteristic template corresponding to each gas device, combine it with the operating status data, reconstruct the expected flow waveform, and perform difference processing on the real-time gas flow data and the expected flow waveform to obtain the flow residual sequence; S7. Based on environmental parameters, by continuously monitoring the flow residual sequence, determine whether there is a first additional flow component that is unrelated to the operating status of the gas equipment during the existence of the superimposed flow event, and output the first micro-leakage warning information according to the determination result of the first additional flow component; S8. After the superimposed flow event ends, the dynamic baseline of gas flow is restored as the monitoring boundary to determine whether there is a second additional flow component that is unrelated to the operating status of gas equipment during low-frequency gas use, and outputs the second micro-leakage warning information based on the determination result of the second additional flow component.

[0021] For ease of understanding, the following explains some key terms in this embodiment: Real-time gas flow data refers to the instantaneous value of gas flowing in the pipeline, which is continuously collected by a flow sensor. It is usually expressed as volume or mass per unit time and is a direct reflection of gas consumption.

[0022] Operating status data of gas appliances: refers to information such as the operating mode, power setting, start-stop status, etc. of gas appliances (such as wall-hung boilers, gas water heaters, gas stoves, etc.) at a specific point in time. This data can be provided by the sensors or intelligent controllers built into the equipment.

[0023] Environmental parameters refer to external conditions that affect the operation of gas equipment and gas consumption, such as outdoor temperature, indoor temperature, humidity, and air pressure. These parameters can be obtained through environmental sensors.

[0024] User historical gas usage profile: This refers to a statistically significant user gas usage characteristic model formed by long-term collection and analysis of users' gas usage patterns, habits, and preferences under different time periods and environmental conditions. This profile can reflect the user's typical gas usage patterns, such as when gas consumption is high and when it is low.

[0025] Low-frequency gas usage periods: These refer to specific time periods, determined by analyzing users' historical gas usage behavior profiles, during which users consume less gas or at lower volumes, such as late at night or when users are out. Any significant fluctuations in gas flow during these periods may indicate anomalies.

[0026] Dynamic baseline for gas flow: This refers to a reference line established during periods of low-frequency gas consumption, based on historical user gas usage patterns and actual monitoring data, to measure normal gas flow levels. This baseline typically includes a mean and a confidence interval to determine whether real-time flow deviates from the normal range.

[0027] Waveform characteristics: These refer to the specific patterns exhibited by the curve of real-time gas flow data over time, such as the rate of increase, peak value, duration, and rate of decrease of flow. These characteristics can be used to identify different gas consumption events.

[0028] High flow event: refers to the phenomenon that real-time gas flow data significantly exceeds the upper limit of the confidence interval of the dynamic baseline of gas flow within a short period of time, which may be caused by normal gas consumption behavior, gas consumption by multiple devices, or abnormal leakage.

[0029] Overlapping flow events: These refer to situations where multiple gas appliances operate simultaneously within the same time period, causing their individual gas flows to overlap and form a total flow. Although the flow rate is high in such events, it is considered legitimate gas usage by the user.

[0030] Isolation protection logic: This refers to a special processing mechanism adopted by the system after identifying superimposed flow events. Its core is to prohibit the use of the flow data corresponding to the superimposed flow event to update the dynamic baseline of gas flow, so as to prevent the baseline from being abnormally raised, thereby protecting the sensitivity of micro-leak detection.

[0031] Operating characteristic templates: These are pre-stored data models that describe the typical gas flow characteristics of various gas appliances under different operating modes or power settings. These templates can be used to predict the expected flow of the equipment under specific conditions.

[0032] Expected flow waveform: refers to the curve that predicts the total gas flow rate generated by all operating equipment over a specific time period, obtained by superimposing and calculating based on the operating status data of gas equipment and the corresponding operating characteristic template.

[0033] Flow residual sequence: This refers to the sequence of differences obtained by subtracting the real-time gas flow data from the expected flow waveform point by point. This sequence reflects the deviation between the actual flow and the expected flow during normal equipment operation, and helps to identify additional flow unrelated to equipment operation.

[0034] The first additional flow component refers to the extra flow that exists during the duration of the superimposed flow event, determined by analyzing the flow residual sequence, and is unrelated to the normal operation of the gas equipment. This is often an early sign of micro-leakage.

[0035] The second additional flow component refers to the extra flow unrelated to the normal operation of gas equipment, determined by monitoring the continuous deviation of real-time gas flow data from the dynamic baseline of gas flow relative to the gas flow after the superimposed flow event ends, during periods of low-frequency gas consumption. This is also an indication of micro-leakage.

[0036] The following provides a more detailed explanation of the above technical solution: This application proposes a gas micro-leakage detection method based on gas consumption feature profiles, aiming to solve the problem that in gas micro-leakage detection, the gas consumption feature profiles are difficult to cover low-frequency and occasional multi-device superimposed gas consumption scenarios, which causes the system to misjudge legitimate high-flow pulses as noise and incorrectly update the dynamic baseline, thereby compromising the sensitivity of micro-leakage detection.

[0037] In step S1, the system acquires real-time gas flow data, gas equipment operating status data, and environmental parameters from the monitored pipeline. Real-time gas flow data can be continuously collected using flow sensors installed on the gas pipeline, such as ultrasonic or turbine flow meters, recording instantaneous flow values ​​at a high frequency (e.g., once per second). Gas equipment operating status data can be obtained from smart gas meters, smart home systems, or the device's own controller interface. For example, it can acquire the start / stop status, set temperature, and operating mode of a wall-hung boiler, as well as the usage time and set temperature of a gas water heater. Environmental parameters can be acquired using indoor and outdoor temperature and humidity sensors, such as outdoor and indoor ambient temperatures. The acquisition of this multi-source data provides the foundation for subsequent refined analysis.

[0038] In step S2, the system identifies low-frequency gas usage periods based on the user's historical gas consumption behavior profile and establishes a dynamic baseline for gas flow during these periods. The user's historical gas consumption behavior profile can be obtained by collecting and analyzing user gas usage data over a long period using data mining techniques. For example, the system can analyze the daily, weekly, and monthly gas consumption distribution over the past few months or even years to identify periods with generally low gas consumption, such as late at night or during weekdays. After identifying the low-frequency gas usage periods, the system collects flow data during these periods under conditions of no or extremely low gas consumption and calculates its mean and standard deviation to construct a confidence interval for the dynamic baseline of gas flow. This confidence interval can be determined using statistical methods, such as adding or subtracting three times the standard deviation from the mean, or by setting a very narrow range based on experience to improve sensitivity to small changes in flow rate.

[0039] In step S3, the system extracts waveform features from the real-time gas flow data and identifies high-flow events where the flow rate deviates from the dynamic baseline of the gas flow based on these features. Waveform feature extraction can employ signal processing techniques, such as calculating the rising edge, falling edge, peak value, duration, and integral area of ​​the flow data. For example, when real-time gas flow data exhibits waveform features where the rising rate exceeds a preset threshold A, reaches a peak value, and then falls at a rate exceeding a preset threshold B within a preset duration (e.g., several seconds to tens of seconds), and its peak value exceeds a preset multiple (e.g., 1.5 times) of the upper limit of the dynamic baseline confidence interval, the system identifies it as a high-flow event. This identification method can capture instantaneous large flow fluctuations, providing a basis for subsequent event classification.

[0040] In step S4, the system combines operational status data, environmental parameters, and the user's historical gas usage profile to determine whether the high-flow event is a superimposed flow event caused by the operation of multiple gas appliances. For example, when the system identifies a high-flow event, it simultaneously checks the operational status data of the gas appliances to see if multiple appliances are running at the same time when the event occurs. It also considers environmental parameters; for example, intermittent operation of the wall-hung boiler is common in low-temperature winter environments. Furthermore, the user's historical gas usage profile can provide statistical patterns of the user's use of specific appliances during specific time periods. By integrating this information, the system can determine whether the high-flow event matches the characteristics of multiple appliances operating simultaneously. For example, if the high-flow event occurs late at night, and the operational status data shows that the wall-hung boiler and gas water heater are running simultaneously, and the ambient temperature is low, this may be a superimposed flow event.

[0041] In step S5, if the high-flow event is determined to be a superimposed flow event, a preset isolation protection logic is activated. This isolation protection logic includes prohibiting the use of flow data corresponding to the superimposed flow event to update the dynamic baseline of gas flow. When the system confirms that a high-flow event is a legitimate multi-device superimposed gas consumption behavior, the system will activate the isolation protection logic to prevent this legitimate but high-flow data from contaminating the dynamic baseline during low-frequency gas consumption periods. This means that even if the flow value of the superimposed flow event far exceeds the confidence interval of the dynamic baseline, the system will not include it in the dynamic baseline update calculation. In this way, the dynamic baseline can be effectively prevented from being unnecessarily raised or widened, thereby maintaining the sensitivity to detect minor leaks.

[0042] In step S6, the system calls the operating characteristic template corresponding to each gas appliance, combines it with the operating status data, reconstructs the expected flow waveform, and performs difference processing between the real-time gas flow data and the expected flow waveform to obtain a flow residual sequence. The operating characteristic template can be pre-established through experiments or historical data analysis, storing typical flow curves of each gas appliance under different operating modes and power settings. For example, the flow curve of a wall-hung boiler in heating mode, and the flow curve of a gas water heater at different outlet water temperatures. When multiple appliances are running simultaneously, the system calls the corresponding flow characteristics from the template based on their operating status data and performs time-series superposition to construct the expected total flow waveform under the current appliance operating state. Subsequently, the real-time collected gas flow data is compared point-by-point with this expected flow waveform, and the instantaneous difference between the two is calculated to form a flow residual sequence. This residual sequence should theoretically be close to zero; any persistent non-zero residual may indicate an anomaly.

[0043] In step S7, based on environmental parameters, the system continuously monitors the flow residual sequence to determine whether a first additional flow component unrelated to the operating status of the gas equipment exists during the duration of the superimposed flow event. Based on the determination of the first additional flow component, a first micro-leakage warning is output. During the duration of the superimposed flow event, since the flow generated by normal equipment operation is canceled out by the expected flow waveform, the flow residual sequence mainly reflects the additional flow unrelated to equipment operation. The system continuously monitors this residual sequence and makes judgments in conjunction with environmental parameters. For example, if the flow residual sequence remains at a non-zero level exceeding a preset threshold when the ambient temperature is stable and there are no other known gas usage behaviors, a micro-leakage may exist. Once such a first additional flow component is determined, the system immediately outputs a first micro-leakage warning to remind the user or maintenance personnel to check.

[0044] In step S8, after the superimposed flow event ends, the system resumes using the dynamic baseline of gas flow as the monitoring boundary to determine whether a second additional flow component unrelated to the operating status of gas equipment exists during low-frequency gas usage. Based on the determination result of the second additional flow component, a second micro-leakage warning message is output. When the superimposed flow event ends, for example, when all relevant equipment stops running, the system will re-activate the dynamic baseline of gas flow established in step S2 as the primary monitoring boundary. During subsequent low-frequency gas usage, the system will continuously monitor whether the real-time gas flow data continuously deviates from this dynamic baseline. If the real-time flow data continues to be higher than the upper limit of the dynamic baseline even when no equipment is running, it is determined that a second additional flow component unrelated to the operating status of gas equipment exists, and a second micro-leakage warning message is output. This two-stage monitoring mechanism ensures effective detection of micro-leaks in complex gas usage scenarios and during normal low-frequency gas usage.

[0045] The following example will provide a more detailed explanation of the above technical solution: Suppose User A lives in a northern region and has a wall-mounted boiler and a gas water heater installed in their home. One winter night, during a low-frequency gas usage period determined by the system based on the user's historical gas consumption profile, the boiler is intermittently running according to a preset program to maintain the indoor temperature. At this time, User A gets up at night and briefly turns on the gas water heater for washing.

[0046] First, in step S1, the system continuously acquires real-time gas flow data, operating status data of the wall-hung boiler and gas water heater (such as the start-up and shutdown status of the wall-hung boiler and the usage time of the gas water heater), and environmental parameters (such as indoor and outdoor temperatures).

[0047] In step S2, based on user A's historical gas usage profile, the system has identified the period from 1 a.m. to 5 a.m. every day as a low-frequency gas usage period, and has established an extremely narrow dynamic baseline for gas flow during this period, with an upper limit of confidence interval close to zero, to ensure high sensitivity to minor leaks.

[0048] When user A turns on the gas water heater, the real-time gas flow rate data will rise rapidly, forming a high-flow pulse. In step S3, the system extracts the waveform characteristics of this real-time gas flow rate data and identifies this high-flow event where the flow rate far exceeds the upper limit of the dynamic baseline confidence interval.

[0049] Next, in step S4, the system combines the acquired operating status data (the wall-hung boiler is running, and the gas water heater is on), environmental parameters (late winter night, low outdoor temperature), and user A's historical gas usage profile (user A occasionally uses hot water late winter nights) to determine that this high-flow event is a superimposed flow event caused by the simultaneous operation of the wall-hung boiler and the gas water heater. For example, the system will analyze the statistical patterns of user A's gas water heater usage during the operation of the wall-hung boiler late winter nights and verify whether the flow increment of this high-flow event matches the rated power of the gas water heater.

[0050] Since the high-flow event is determined to be a legitimate superimposed flow event, in step S5, the system immediately activates the isolation protection logic, prohibiting the use of the flow data corresponding to this superimposed flow event to update the dynamic baseline of gas flow. This prevents the dynamic baseline from being erroneously widened due to this legitimate but high-flow pulse, thereby protecting the sensitivity of micro-leak detection.

[0051] During the duration of the superimposed flow event, the system enters a refined monitoring mode. In step S6, the system calls the respective operating characteristic templates of the wall-hung boiler and the gas water heater, and reconstructs an expected flow waveform by combining their operating status data. For example, the expected flow curve of the wall-hung boiler in the current operating mode is superimposed with the expected flow curve of the gas water heater under short-term use. Subsequently, the system performs difference processing on the real-time gas flow data and this reconstructed expected flow waveform to obtain a flow residual sequence.

[0052] In step S7, the system continuously monitors this flow residual sequence. If, during the duration of this superimposed flow event, the flow residual sequence remains at a non-zero level exceeding a preset threshold, and environmental parameters (e.g., temperature) are stable, and no other known factors can explain this residual, the system determines that a first additional flow component unrelated to the operating status of the gas equipment exists and outputs a first micro-leakage warning. For example, if the residual sequence continuously displays an additional flow of 0.01 cubic meters per hour, this may indicate the presence of a micro-leakage.

[0053] When user A turns off the gas water heater and the wall-mounted boiler enters the next intermittent operation stop phase, in step S8, the system determines that the superimposed flow event has ended. At this time, the system resumes using the gas flow dynamic baseline established in step S2 as the monitoring boundary. During subsequent low-frequency gas usage periods, the system will continuously monitor real-time gas flow data. If the real-time flow data continues to deviate from the upper limit of the dynamic baseline even when no equipment is running, for example, if it continues to exceed the baseline upper limit of 0.005 cubic meters per hour, the system will determine that there is a second additional flow component unrelated to the operating status of the gas equipment and output a second micro-leakage warning message.

[0054] As can be seen from the above examples, the technical solution of this application achieves accurate capture of micro-leak signals in complex gas usage scenarios by introducing a multi-level flow monitoring and isolation mechanism. Traditional existing gas micro-leak detection methods face a dilemma when dealing with situations where user A experiences intermittent operation of the wall-hung boiler for heating and short-term use of the gas water heater late at night in winter. This is because the behavioral profile is insufficient to establish a specific combination of operation templates for wall-hung boiler heating and domestic hot water in extremely low-frequency, sporadic events. If this is treated as an anomaly, it reduces the user's trust in the system; if it is absorbed as normal recent behavioral data, the dynamic baseline update mechanism will identify the pulse as legitimate noise, thus significantly expanding the confidence interval during quiet periods. Existing adaptive behavioral baseline adjustment strategies typically lack isolation mechanisms for sporadic multi-device combination pulses, easily disrupting the narrow confidence boundaries originally set for micro-leakage when absorbing such legitimate but rare superimposed flow. This leads to a situation where, during the intermittent operation of the wall-hung boiler for heating and the short-term use of domestic hot water in winter nights, when a low-frequency but legitimate high-flow pulse from a combination of multiple devices suddenly occurs during a quiet period marked by the behavior profile, the update logic of the dynamic baseline confidence interval identifies the pulse as noise and expands the interval. This destroys the extremely narrow confidence boundary that was originally used to closely monitor minute and continuous leaks, and the real micro-leak signals are flooded by the wide confidence interval during the subsequent nighttime period and cannot be effectively detected.

[0055] This application addresses the aforementioned issues through the following key technical points: First, by acquiring multi-dimensional real-time data, it lays the foundation for subsequent refined analysis. Utilizing user historical behavior profiles to determine low-frequency gas usage periods and establish a dynamic baseline effectively defines the normal gas usage background. By extracting waveform features to identify high-flow events and combining this with multi-dimensional cross-validation based on operating status, environmental parameters, and behavioral profiles, it accurately distinguishes between legitimate superimposed gas usage and abnormal flow. The crucial isolation protection logic, by prohibiting the use of superimposed flow event data to update the dynamic baseline, effectively prevents unnecessary expansion of the baseline confidence interval, thereby maintaining the rigor of the monitoring boundary. During superimposed events, by reconstructing the expected waveform using operating feature templates and calculating residuals, it is possible to isolate micro-leakage components unrelated to equipment operation from complex superimposed flow. Finally, baseline monitoring is restored after the event ends, ensuring continuous monitoring of micro-leakage signals during low-frequency gas usage periods. The core innovation of this solution lies in the deep integration of behavioral profiles, equipment operating status, and flow waveform analysis. Through a dynamic isolation mechanism, it solves the interference of legitimate high-flow pulses on the sensitivity of micro-leakage detection, achieving improved accuracy of gas safety monitoring while ensuring user experience.

[0056] In some embodiments, the specific steps in step S2 include: S21. Based on the user's historical gas usage profile, a clustering algorithm using probability density estimation is used to identify periods when the gas usage probability is below a preset threshold as low-frequency gas usage periods; S22. Extract stable, no-flow data segments during periods of low-frequency gas usage; S23. Calculate the mean and standard deviation of the flow rate for a stable, airless data segment; S24. Combining the background noise parameter and zero drift parameter of the flow sensor, construct the confidence interval of the dynamic baseline of gas flow based on the mean and standard deviation of the flow.

[0057] Clustering algorithms based on probability density estimation are statistical methods used to identify groups of samples with similar characteristics within a dataset. Their function is to quantify the probability distribution of gas consumption in different time periods based on users' historical gas consumption data, thereby classifying periods with lower gas consumption probabilities as low-frequency gas consumption periods. For example, kernel density estimation (KDE) can be used to estimate the gas consumption probability density function, or density-based clustering algorithms (such as DBSCAN) can be used to identify periods with sparse gas consumption data. These algorithms can effectively distinguish between normal high-frequency gas consumption periods and occasional low-frequency gas consumption periods, avoiding misjudgments that may result from simple threshold division. A preset threshold is a pre-defined value used to define low and high gas consumption probabilities. When the estimated gas consumption probability for a certain period is lower than this threshold, it is considered a low-frequency gas consumption period. This threshold can be set based on historical data analysis, expert experience, or system debugging results; for example, it can be set to a certain percentile of the gas consumption probability distribution (such as the 5th percentile) or an absolutely low probability value (such as 0.01). Low-frequency gas usage periods refer to specific time periods when users use gas very infrequently or almost not at all, such as late at night or when users are away. During these periods, normal gas flow should be close to zero, making it an ideal window for micro-leak detection. Stable no-flow data segments refer to the set of continuous data points during low-frequency gas usage periods where the gas flow sensor continuously monitors flow values ​​that remain at extremely low levels (close to or equal to zero) for extended periods without significant fluctuations. These segments eliminate interference from occasional, short-term gas usage, more accurately reflecting the background flow characteristics of the pipeline in a no-flow state. Flow mean and standard deviation are two important parameters in statistics describing the central tendency and dispersion of data. The flow mean reflects the average flow level of stable no-flow data segments, while the standard deviation reflects the range of fluctuation of these flow data around the mean. By calculating these two parameters, the background noise and micro-fluctuation characteristics of the pipeline in a no-flow state can be quantified. The background noise parameter of the flow sensor refers to the inherent random fluctuations in its output signal when no actual flow passes through. This noise is determined by the physical characteristics of the sensor and cannot be completely eliminated, but it can be quantified through parameterization. Zero-point drift parameters refer to the phenomenon where the output signal of a flow sensor changes slowly with time, temperature, or other environmental factors when there is zero flow input. These parameters are inherent physical characteristics of the sensor and are obtained through calibration under laboratory conditions or statistical analysis of long-term operating data. They are important for constructing accurate confidence intervals because they represent the non-zero fluctuations that may exist in the sensor readings even under ideal no-flow conditions. The confidence interval of the dynamic baseline of gas flow is a statistical concept that represents the range within which gas flow data should fall under normal no-flow conditions during periods of low-frequency gas use.This range is constructed by combining the flow rate mean and standard deviation with the sensor's inherent parameters. Its purpose is to provide a dynamic and adaptive monitoring boundary for micro-leak detection. Any flow rate that consistently exceeds this range may be considered abnormal, thereby triggering a micro-leak warning.

[0058] This application's solution provides a scientific statistical basis for constructing a dynamic baseline for gas flow through a refined data processing workflow. First, based on users' historical gas consumption behavior profiles, the system uses a clustering algorithm based on probability density estimation to identify periods with a gas consumption probability below a preset threshold as low-frequency gas consumption periods. This step effectively eliminates high-frequency gas consumption interference and accurately identifies quiet periods with extremely low gas consumption probabilities, thus ensuring the high representativeness of the data source for baseline construction. After determining the low-frequency gas consumption periods, the system extracts stable no-flow data segments within these periods. This aims to eliminate the contamination of the baseline mean and standard deviation by occasional gas consumption behavior, ensuring that the calculated statistical characteristics accurately reflect the pipeline's background state. Subsequently, the system calculates the flow mean and standard deviation of these stable no-flow data segments, quantifying the background flow characteristics of the pipeline under no-gas consumption conditions. Finally, combining the background noise parameters and zero-point drift parameters of the flow sensor, the system constructs a confidence interval for the dynamic baseline of gas flow based on the calculated flow mean and standard deviation. This approach not only considers fluctuations in environmental data but also fully takes into account the inherent errors of hardware devices, achieving a shift from pure data statistics to a monitoring mode that combines physical and statistical methods. Through the above steps, the dynamic baseline confidence interval constructed by this scheme can cover normal background noise while maintaining high sensitivity to minute flow anomalies, laying a solid benchmark for subsequent micro-leakage detection.

[0059] As a specific implementation method, when constructing a dynamic baseline for gas flow, the system first identifies low-frequency gas consumption periods based on the user's historical gas usage profile, such as daily gas consumption curves and gas appliance start-up records from the past few weeks or months, using a clustering algorithm based on probability density estimation. For example, the system can use a Gaussian Mixture Model (GMM) to model the probability distribution of a user's gas consumption over a 24-hour period, and then set a preset threshold, such as periods with a gas consumption probability below 0.005, to identify them as low-frequency gas consumption periods. Typically, this identifies the early morning hours (e.g., 11:00 PM to 5:00 AM the following day) as quiet periods with extremely low gas consumption probabilities. After identifying these low-frequency gas consumption periods, the system extracts stable, no-flow data segments from historical behavior profiles, such as gas flow data from all quiet periods within the past two weeks. These segments refer to periods where the flow rate remains at an extremely low level (e.g., less than 0.001 cubic meters per hour) for several consecutive minutes (e.g., 5 minutes) without significant fluctuations. The system then calculates the total flow mean and standard deviation of these extracted stable no-flow data segments. For example, if 1000 stable no-flow data points are collected, the system calculates their mean and standard deviation. Based on this, the system combines the inherent thermal noise characteristics and zero-point drift parameters of the flow sensor used. These parameters are typically provided by the sensor manufacturer or obtained through long-term operational calibration; for example, a noise floor of ±0.0005 m³ / h and a zero-point drift of ±0.0002 m³ / h. The system combines these physical parameters with the statistically calculated flow mean and standard deviation to construct a very narrow dynamic baseline confidence interval for gas flow. Specifically, the lower limit of this confidence interval is usually hard-set to zero, while the upper limit can be set to a very small value, such as 0.005 m³ / h, or a calculation based on the statistical mean plus three times the standard deviation, adjusted for the sensor's noise floor and zero-point drift, ensuring that the upper limit can encompass normal sensor fluctuations and extremely small background flow. In this way, the new real-time gas flow data has a slight corrective effect on the dynamic baseline of gas flow, causing it to slowly move closer to the current actual low flow background, while avoiding a large impact on the baseline from a single abnormal data.

[0060] Through the above technical solution, this application effectively solves the problem that traditional methods, when constructing dynamic baselines for gas micro-leak detection, lack precise definition of low-frequency gas usage periods and refined processing of baseline parameters, resulting in the baseline failing to accurately reflect the true quiet state and thus affecting the ability to identify minor abnormal flow rates. This solution introduces a clustering algorithm based on probability density estimation, which can scientifically and accurately identify low-frequency gas usage periods with extremely low probability from complex user historical gas usage behavior profiles, providing a high-quality data source for baseline construction. Based on this, by extracting stable no-flow data segments and calculating their flow mean and standard deviation, the interference of occasional gas usage behavior is effectively eliminated, making the baseline statistical characteristics purer. More importantly, this solution incorporates the background noise parameters and zero-point drift parameters of the flow sensor into the construction of the confidence interval, achieving an organic combination of physical characteristics and statistical methods. This ensures that the constructed dynamic baseline confidence interval for gas flow not only accurately reflects the background flow characteristics of the pipeline in a no-gas-use state but also fully considers the inherent errors of the sensor, thus forming a monitoring boundary that can effectively suppress false alarms while maintaining high sensitivity to minor, continuous leaks. This significantly improves the sensitivity and accuracy of gas micro-leak detection, providing a solid and reliable benchmark for subsequent micro-leak early warning.

[0061] In some embodiments, the gas appliances that generate superimposed flow events include wall-hung boilers and gas water heaters; The specific steps in step S4 include: S41. Based on the user's historical gas usage profile, analyze the statistical patterns of intermittent operation of the wall-hung boiler and short-term use of the gas water heater; S42. Based on environmental parameters, assess the timing and duration of high-flow events to obtain assessment results; S43. Based on the operating status data, verify whether the flow increment of the high flow event matches the gas consumption corresponding to the rated power of the gas water heater, and obtain the verification results; S44. Based on statistical patterns, evaluation results, and verification results, determine whether a high-flow event is a superimposed flow event caused by the operation of multiple devices.

[0062] Wall-hung boilers are typically used for heating and providing domestic hot water, and their operation may include intermittent operation to maintain indoor temperature, especially at night. Gas water heaters, on the other hand, are mainly used to provide instant domestic hot water, and their use is usually short-term and sporadic. These two types of devices may operate simultaneously or alternately in specific scenarios, resulting in overlapping gas flow rates. Analyzing the statistical patterns of the intermittent operation of wall-hung boilers and the short-term use of gas water heaters aims to uncover the typical operating patterns and their combinations during specific time periods from users' historical gas usage profiles. This can be achieved through time series analysis, event correlation analysis, or rule-based pattern matching of historical data. Environmental parameters refer to external conditions that affect the operation of gas equipment and users' gas usage behavior, including outdoor temperature, indoor temperature, humidity, seasonal information, weather conditions, etc., obtained through external sensors or meteorological service interfaces. The assessment of the timing and duration of high-flow events aims to determine, in conjunction with current environmental parameters, whether the observed timing and duration of high-flow events conform to the typical operating characteristics of specific gas appliances under the current environment. Specifically, typical operating characteristics under different environments mainly refer to the gas usage patterns that gas appliances (such as wall-hung boilers and gas water heaters) are expected to exhibit under specific environmental conditions (e.g., winter heating environments, nighttime hours), conforming to users' historical gas usage habits and the physical operating laws of the equipment. These characteristics specifically include: 1. Timing characteristics: This refers to whether the high-flow event occurs within the time window during which a specific device would typically start under the current environmental conditions. For example, in the late winter night, the intermittent start-up of a wall-hung boiler to maintain room temperature is consistent with its heating logic.

[0063] 2. Duration Characteristics: This refers to whether the duration of a high-flow event matches the typical operating duration of a particular device under the current environmental conditions. For example, short-term use of a gas water heater typically lasts from tens of seconds to two or three minutes.

[0064] 3. Physical Characteristics of Flow Waveforms: For multi-device superimposed flow events, the flow waveform will exhibit a specific physical shape. For example, starting a wall-hung boiler will create a basic flow plateau, followed by the gas water heater turning on, which will cause a secondary flow surge, forming a higher superimposed plateau. Finally, the flow will drop as the devices are turned off. The height, width, and slope of the rising and falling edges of these waveforms are all considered physical characteristics.

[0065] Determining these typical operating characteristics is a multi-dimensional and comprehensive evaluation process that combines environmental parameters, historical user gas consumption profiles, and equipment operation models. The specific methods are as follows: 1. Verification based on macro-environment and behavioral background: The system first determines the current macro-environmental context from the acquired environmental parameters. For example, it checks whether the outdoor temperature is below the preset heating critical temperature and whether the current timestamp falls within the user-defined nighttime heat preservation period. These conditions are used to confirm whether the current scenario meets the macro-environmental requirements for wall-hung boiler heating and nighttime hot water use.

[0066] 2. Model-based prediction of wall-hung boiler operation: If environmental conditions meet the macro-background of winter heating, the system will invoke an intermittent operation cycle prediction model for the wall-hung boiler. This model is constructed based on the actual operating records of the boiler over the past few days and the thermodynamic dissipation equation for the indoor-outdoor temperature difference. Specifically, this thermodynamic dissipation equation is usually a comprehensive mathematical expression, which can be simplified as follows: Heat loss rate = total heat transfer coefficient × total heat transfer area × indoor-outdoor temperature difference; Among them, the heat transfer coefficient represents the thermal insulation performance of the building envelope (such as walls, roof, windows, floors, etc.), and the heat transfer area represents the surface area of ​​the building in contact with the external environment, including the area of ​​the exterior walls, windows, roof, etc.

[0067] In this intermittent operation cycle prediction model for wall-hung boilers, the lost energy actually refers to the heat that the building needs to replenish in order to maintain the set indoor temperature. The heat loss rate calculated by the thermodynamic dissipation equation directly quantifies the heat energy lost from the building to the environment per unit time under a specific indoor-outdoor temperature difference.

[0068] The function of a wall-hung boiler is to generate heat by burning natural gas to compensate for the lost energy, thereby maintaining the indoor temperature within a comfortable range. When the wall-hung boiler operates intermittently, it does not provide continuous heating. Instead, it starts when the indoor temperature drops to a certain level due to heat loss, heats for a period of time to raise the indoor temperature, and then stops operating, waiting for the temperature to drop again.

[0069] This model combines the actual operating records of the wall-hung boiler over the past few days to dynamically predict reasonable start-up intervals and single-run durations. Its logic is as follows: 2.1. Quantifying heating load: The thermodynamic dissipation equation calculates the current heat loss rate of the building based on the real-time or predicted indoor-outdoor temperature difference, i.e. the heating load that the wall-hung boiler needs to provide.

[0070] 2.2. Optimized Operation Strategy: By comparing and calibrating the actual operating records of the previous few days (including the actual start-up time, running time, gas consumption, and corresponding indoor and outdoor temperature changes of the boiler) with the calculation results of the thermodynamic dissipation equation, the system can learn and optimize the thermodynamic characteristics of the specific building under different environmental conditions. For example, if the equation predicts a heat loss of X, and the boiler actually takes Y minutes to raise the indoor temperature to the target value, the system can adjust its estimation of heat loss or the operating efficiency parameters of the boiler based on this historical data.

[0071] 2.3. Predicted operating parameters: Based on the calibrated thermodynamic dissipation equation, the system can dynamically predict when the wall-hung boiler needs to start (start-up interval) and how long each start-up will take to maintain the indoor temperature in the current or future period of time, in order to compensate for the energy lost by the building in the most economical or efficient way.

[0072] Therefore, through this model, the system can dynamically predict the reasonable start-up interval and approximate duration of a single operation of the wall-hung boiler under current environmental conditions (such as current outdoor temperature, indoor set temperature, etc.). These prediction results define the typical occurrence timing and duration of the wall-hung boiler under the current environment. The system compares the occurrence time of the current high-flow event with the predicted legal start-up time window of the wall-hung boiler, allowing for a certain tolerance (e.g., plus or minus ten minutes).

[0073] 3. Matching gas water heater usage based on historical behavioral profiles: For short-term use of gas water heaters, the system extracts the actual duration of the high-flow plateau from the flow waveform of high-flow events. Then, the system matches this actual duration with the statistical histogram or kernel density estimation distribution of the user's historical nighttime water usage. If the duration falls within the confidence interval of the historical distribution (e.g., the 95% confidence interval), its duration is considered to conform to typical characteristics.

[0074] 4. Physical logic timing matching of flow waveform: The system also performs microscopic timing feature extraction and matching on the flow waveforms of high-flow events. It analyzes the height, width, and slope of each step of the flow waveform, as well as the rising and falling edges, to determine whether it strictly conforms to the specific physical logic timing of the combined heating and domestic hot water pulses from the wall-hung boiler. For example, it checks for the existence of a basic flow plateau caused by the boiler startup, a high-level superimposed plateau formed by the secondary flow surge due to the start of domestic hot water, and the subsequent flow decline process.

[0075] 5. Equipment start / stop association verification: The system performs rigorous start-stop correlation verification, checking whether each step change in the flow waveform has a strong correlation on the time axis with the device valve opening / closing signals and water flow switch signals transmitted from the IoT gateway. This ensures the synchronization between flow changes and actual device operation, allowing for dynamic delay compensation of two to five seconds even considering the physical delays of mechanical valve action and gas transmission.

[0076] Through the comprehensive evaluation and matching process described above, the system can determine whether the timing and duration of the observed high-flow event, under the current environmental parameters, conform to the typical operating characteristics of a specific gas equipment. Only when the environmental background, timing, and duration all conform to thermodynamic logic and user history will the system ultimately confirm the sudden high-flow event as a legitimate multi-device combined pulse.

[0077] Operational status data refers to the real-time operating status information of gas appliances at a specific moment. This can include the appliance's on / off status, operating mode, power setting, flame status, water temperature, and gas valve opening. It is typically obtained through smart gas meters, built-in sensors, or communication with the appliance's control system. Verifying whether the flow increment during a high-flow event matches the rated power of the gas water heater aims to physically confirm whether the flow increment during the high-flow event matches the gas consumption corresponding to the rated power of the gas water heater. It should be noted that when designing and calibrating gas water heaters, manufacturers calculate the gas flow required to achieve the rated power based on the type of gas used (such as natural gas, liquefied petroleum gas, etc.) and its known calorific value. Therefore, the rated power of each gas water heater corresponds to a theoretical maximum gas consumption flow. The system calculates the theoretically expected gas consumption flow under full-load operation based on the gas water heater's "rated power" and the known "calorific value" of the gas. Then, the system compares the "flow increment observed during a high-flow event" with this "theoretical gas consumption flow." "Conformity" here refers to "consistency" or "correspondence," meaning whether the actual observed flow rate increment matches the theoretical flow rate derived from the rated power of the gas water heater within a reasonable error range. If the two are numerically close to or fall within a preset matching range, they are considered to be consistent.

[0078] Determining whether a high-traffic event is a cumulative traffic event generated by multiple devices is a process of making a final decision based on the aforementioned analysis and verification results. This can be achieved through a decision logic, an expert system, or a classification algorithm.

[0079] This method, by introducing a multi-dimensional verification mechanism, aims to accurately identify legitimate high-flow events generated by the joint operation of specific gas appliances such as wall-hung boilers and gas water heaters during low-frequency gas usage periods. First, based on a user's historical gas usage profile, the method deeply analyzes the statistical patterns of intermittent operation of the wall-hung boiler and short-term use of the gas water heater. This step extracts the inherent logic of equipment operation from the user's long-term behavioral patterns, providing a behavioral basis for subsequent event determination. For example, the system can identify that during winter nights, the wall-hung boiler intermittently starts to maintain room temperature, possibly accompanied by short-term use of the gas water heater. Based on this, the system evaluates the timing and duration of the detected high-flow events according to current environmental parameters. This evaluation incorporates external environmental factors, such as outdoor temperature and season, further narrowing the scope of event determination and helping to eliminate interference unrelated to equipment operation. Simultaneously, the system verifies whether the flow increment of the high-flow event matches the rated power of the gas water heater based on real-time acquired operating status data. This verification provides objective evidence at the physical parameter level, ensuring the matching of the flow increment with actual equipment operation. Ultimately, the system comprehensively utilizes the statistical patterns obtained from the above analysis, environmental assessment results, and flow increment verification results to perform logical judgments to determine whether the high flow event truly belongs to a superimposed flow event generated by the operation of multiple devices such as wall-hung boilers and gas water heaters. Through this multi-dimensional and refined judgment mechanism, the solution of this application can effectively distinguish between legitimate high flow events and potential anomalies. When determined to be a legitimate superimposed flow event, the system will activate preset isolation protection logic, prohibiting the use of the flow data corresponding to the event to update the dynamic baseline of gas flow. This enables the system to maintain effective detection capability for minor, continuous leaks even in complex gas usage scenarios.

[0080] As a specific implementation method, a concrete example is given below. Suppose that late one winter night in northern China, a user's smart gas meter detects a sudden high-flow pulse in the gas flow, lasting approximately 45 seconds, exceeding the dynamic baseline confidence interval during the current low-frequency gas usage period. The system first analyzes the user's historical gas usage profile. By statistically analyzing the user's nighttime gas usage data over the past few weeks or even months, the system finds a statistical pattern in the user's nighttime usage during winter nights (e.g., 2 AM to 4 AM): intermittent operation of the wall-mounted boiler (e.g., running for 15 minutes every hour to maintain room temperature) and occasional short-term use of the gas water heater (e.g., getting up at night to wash hands or fetch water, typically lasting between 30 seconds and 1 minute). Simultaneously, the system obtains the current environmental parameters, such as an outdoor temperature of -8°C and an indoor temperature of 20°C. Based on these environmental parameters, the system assesses the timing (3:15 AM) and duration (45 seconds) of the current high-flow event. The assessment results show that intermittent operation of the wall-hung boiler is expected in such a cold environment, and the short-term hot water use of 45 seconds is consistent with the user's habit of getting up at night. Therefore, the timing and duration of the event are reasonable. Next, the system acquires the operating status data of the wall-hung boiler and the gas water heater. The data shows that before the high-flow event, the wall-hung boiler was in intermittent operation in heating mode. When the high-flow pulse occurs, the gas water heater is detected as igniting and providing hot water. The system further verifies the flow increment of the high-flow event. Assuming the rated power of the gas water heater in the user's home is 24kW, its corresponding gas consumption rate is approximately 2.5 cubic meters per hour. The system calculates the instantaneous flow increment of the current high-flow event to be 2.45 cubic meters per hour, which highly matches the flow value corresponding to the rated power of the gas water heater, with the error within an acceptable range. Finally, the system synthesizes the above analysis results: the user's historical behavior profile supports the possibility of multiple devices operating in combination during this period; the environmental assessment concludes that the timing and duration of the event are reasonable, and the flow increment is consistent with the rated power of the gas water heater. Based on this evidence, the system determines that the high flow event is a legitimate superimposed flow event generated by the joint operation of the wall-hung boiler and the gas water heater. Subsequently, the system will activate isolation protection logic to ensure that the high flow data is not used to update the dynamic baseline of gas flow during low-frequency gas usage periods, thereby effectively preventing baseline contamination and maintaining the sensitivity of micro-leak detection.

[0081] Through the above technical solution, this application effectively addresses the technical problem of the system's inability to accurately distinguish between legitimate multi-device superimposed flow events and abnormal situations in complex gas usage scenarios, especially when intermittent operation of wall-hung boilers and short-term use of gas water heaters overlap during winter nights. This solution constructs a multi-dimensional and refined judgment mechanism by introducing statistical pattern analysis based on users' historical gas usage behavior profiles, evaluating event timing and duration in conjunction with environmental parameters, and verifying flow increments based on operating status data and equipment rated power. This enables the system to accurately identify superimposed flow events generated by the joint operation of specific gas devices such as wall-hung boilers and gas water heaters, avoiding misjudging normal gas usage behavior as abnormal. Therefore, this solution significantly reduces the false alarm rate and increases user trust in the gas micro-leak detection system. More importantly, by accurately identifying and isolating these legitimate superimposed flow events, the system can effectively prevent their flow data from being incorrectly included in the gas flow dynamic baseline update process. This ensures that the confidence interval of the dynamic baseline remains narrow during periods of low-frequency gas use, thus maintaining the system's sensitivity to detecting minute, persistent leaks and avoiding the risk of real micro-leak signals being obscured due to baseline contamination. Overall, this solution significantly improves the accuracy, reliability, and intelligence of gas micro-leak detection, especially in specific scenarios with complex gas usage behaviors.

[0082] In some embodiments, the specific steps in step S6 include: S61. Based on the operating status data, retrieve the corresponding operating characteristic data of each gas device from the pre-stored flow characteristic templates of each gas device under different operating modes or specific power conditions to obtain the corresponding flow value; S62. The obtained corresponding flow values ​​are time-series superimposed to reconstruct the expected flow waveform; S63. Time-align the real-time gas flow data with the expected flow waveform; S64. Calculate the instantaneous flow difference between the time-aligned real-time gas flow data and the expected flow waveform to obtain the flow residual sequence.

[0083] First, based on the operational status data, the corresponding flow rate value is obtained by retrieving the corresponding operational characteristic data for each gas appliance from pre-stored flow characteristic templates for different operating modes or specific power levels. The operational status data can originate from the gas appliance's intelligent controller, IoT sensors, user manual input, or be inferred indirectly through power consumption, temperature changes, etc. Its function is to provide the current operating mode (e.g., heating mode, hot water mode, standby mode, etc. for a wall-hung boiler) and power level (e.g., heating power setting for a gas water heater). The pre-stored flow characteristic templates are established through laboratory testing or long-term field data collection for different models, operating modes, and power levels of gas appliances. They contain standard gas consumption flow curves or discrete flow values ​​for the appliances under specific operating conditions. For example, the template can be a lookup table storing the theoretical instantaneous flow rate values ​​of the appliance at different time points under specific operating modes and power levels; or, the template can be a parameterized mathematical model capable of outputting the expected flow waveform based on input parameters (such as power and temperature settings). The system analyzes the current operating status data, accurately matches and calls the flow characteristic data in the template that best matches the current operating status of the device, thereby obtaining the theoretical gas consumption flow value of the device in the current state.

[0084] Secondly, the acquired flow values ​​are time-series superimposed to reconstruct the expected flow waveform. The purpose of time-series superimposition is to simulate the cumulative effect of the theoretical gas consumption flow of multiple gas appliances operating simultaneously over time. For example, if the wall-hung boiler is in heating mode and the gas water heater is in short-time heating mode, the system will obtain the corresponding flow values ​​from their respective flow characteristic templates, and then sum these flow values ​​at the same time point to obtain an expected flow waveform that reflects the total theoretical gas consumption of all operating appliances. This superimposition can be a simple linear summation, or a more complex weighted superimposition or convolution operation that considers factors such as appliance startup delay and flow response time.

[0085] Next, the real-time gas flow data is time-aligned with the expected flow waveform. Time alignment is a crucial step in ensuring the accuracy of subsequent difference calculations, as real-time gas flow data may deviate slightly from the theoretical model due to sensor sampling frequency, data transmission delay, or actual device startup response time. Time alignment can be achieved in several ways. For example, a cross-correlation algorithm can be used to calculate the optimal lag between the two time series, and then one of the series can be shifted; alternatively, anchoring alignment can be performed by identifying common feature points in the two waveforms (such as the rising and falling edges of the flow); or, if the system has a high-precision time synchronization mechanism, alignment can be performed directly based on timestamps.

[0086] Finally, the instantaneous flow difference between the time-aligned real-time gas flow data and the expected flow waveform is calculated to obtain the flow residual sequence. The instantaneous flow difference refers to the difference between the real-time monitored gas flow and the reconstructed expected flow at each time sampling point. For example, if the real-time flow is X and the expected flow is Y, then the instantaneous flow difference is XY. By calculating the instantaneous flow difference for all sampling points, a continuous flow residual sequence can be obtained. This residual sequence should theoretically only contain flow components unrelated to normal equipment operation, such as minute leakage flow, sensor noise, or abnormal gas usage behavior not fully covered by the model.

[0087] This application's solution achieves in-depth analysis and separation of concurrent flow from multiple devices by constructing a refined equipment operation feature template library. First, by retrieving flow characteristics from pre-stored templates based on operational status data under specific modes, the theoretical gas consumption of each gas device under its current operating state can be reconstructed. This feature acquisition method based on equipment operating mechanisms ensures the high accuracy of the subsequently reconstructed expected flow waveform. Second, by time-series superimposing the acquired flow values, the comprehensive flow pattern of multiple devices operating simultaneously can be simulated, providing a dynamic reference benchmark consistent with actual operating logic for subsequent difference processing. Next, by aligning real-time flow data with the expected waveform, time misalignment caused by equipment startup delays or sensor sampling deviations is effectively eliminated, ensuring the accuracy of the comparison. Finally, by calculating the instantaneous flow difference after time alignment to obtain a flow residual sequence, normal equipment operating flow is removed from the real-time data, allowing the residual sequence to purely reflect the presence of abnormal flow unrelated to equipment operation, thus providing a reliable data foundation for accurate subsequent micro-leakage determination. This solution effectively solves the technical challenge of detecting micro-leakage caused by normal fluctuations in complex gas usage environments by refining macroscopic flow monitoring into microscopic equipment feature matching and waveform reconstruction.

[0088] The following is a concrete example. Suppose that on a winter night, the user's wall-mounted boiler is intermittently providing heating in a low-power mode, while the user briefly turns on the gas water heater for washing. The system first obtains the operating status data of the wall-mounted boiler in "heating mode, power set to P1" and the gas water heater in "hot water mode, duration T, power set to P2" through the smart home gateway or the gas appliance's built-in sensors. Based on this operating status data, the system retrieves the standard flow waveform template A for the wall-mounted boiler in "heating mode, power P1" and the standard flow waveform template B for the gas water heater in "hot water mode, power P2" from a pre-stored flow characteristic template library. Subsequently, the system superimposes templates A and B on the time axis to generate a total expected flow waveform reflecting the simultaneous operation of the wall-mounted boiler and the gas water heater. For example, at a certain moment, the theoretical flow rate of the wall-mounted boiler is 0.5 cubic meters per hour, and the theoretical flow rate of the gas water heater is 1.5 cubic meters per hour, then the expected flow rate is 2.0 cubic meters per hour. Simultaneously, the system continuously collects real-time gas flow data from the monitored pipelines. To eliminate delays in data acquisition and transmission, the system employs a cross-correlation algorithm to time-align the real-time gas flow data with the reconstructed expected flow waveform. After alignment, the system calculates the difference between the real-time flow and the expected flow point by point. For example, if the real-time flow is 2.05 cubic meters per hour and the expected flow is 2.0 cubic meters per hour, the residual is 0.05 cubic meters per hour. By continuously calculating these instantaneous differences, a flow residual sequence is obtained. This residual sequence will serve as the basis for determining the presence of micro-leakage in subsequent steps, as it has eliminated flow fluctuations caused by normal equipment operation.

[0089] Through the above technical solution, this application effectively solves the problem that traditional methods struggle to accurately separate flow fluctuations generated by normal equipment operation in complex scenarios with multiple gas devices operating concurrently, thus failing to precisely extract micro-leak signals from the superimposed flow. This solution, through refined equipment operation feature template matching and flow waveform reconstruction, accurately separates normal gas flow from real-time data, allowing the flow residual sequence to more purely reflect potential micro-leak signals. This significantly improves the accuracy and sensitivity of micro-leak detection in complex gas usage environments, avoiding misjudging normal gas usage behavior as abnormal and preventing true micro-leak signals from being masked by normal fluctuations. In the entire gas micro-leak detection method, this solution provides high-confidence input data for subsequent micro-leak determination, making it a key link in achieving accurate micro-leak early warning.

[0090] In some embodiments, the specific steps in step S7 include: S71. During the duration of superimposed traffic events, establish a short-term baseline for the traffic residual sequence; S72. Continuously monitor the offset of the flow residual sequence relative to the short-term baseline; S73. If the environmental parameters meet the preset conditions and the offset exceeds the preset range within the preset time, it is determined that there is a first additional flow component that is unrelated to the operating status of the gas equipment during the duration of the superimposed flow event, and the first micro-leakage warning information is output.

[0091] During the duration of superimposed flow events, the system needs to establish a short-term baseline for the flow residual sequence. This short-term baseline aims to dynamically capture and characterize the expected fluctuation range and trend of the flow residual sequence under the condition of simultaneous operation of multiple gas devices. It can be established using various techniques. For example, a moving average algorithm can be used, averaging the flow residual sequence data determined to be free of the first additional flow component over a recent period to smooth out instantaneous noise and reflect the average residual level under the current superimposed flow event. Another approach is to use the exponentially weighted moving average (EWMA) algorithm, which assigns higher weights to recently determined data free of the first additional flow component, enabling it to respond more quickly to dynamic changes in the flow residual sequence, thus forming a more real-time short-term baseline.

[0092] After the short-term baseline is established, the system will continuously monitor the offset of the flow residual sequence relative to the short-term baseline. This monitoring aims to detect abnormal changes in the flow residual sequence that exceed the normal fluctuation range in real time. This offset can be easily obtained by calculating the difference between the real-time flow residual value and the short-term baseline value. Alternatively, statistical control charts (such as the Cumulative Sum Control Chart (CUSUM) or the Exponentially Weighted Moving Average Control Chart (EWMA)) can also be used to monitor the offset. These methods are more sensitive to detecting small but persistent offsets, thus effectively distinguishing normal fluctuations from potential micro-leakage signals.

[0093] To ensure the accuracy of micro-leak detection, this application introduces a multi-verification mechanism. First, the system checks whether environmental parameters meet preset conditions, such as whether ambient temperature, humidity, or air pressure is stable, to eliminate interference from environmental factors on flow measurement. Second, the system determines whether the offset continuously exceeds a preset range for a preset duration. The preset range can be a fixed threshold or a dynamically determined interval based on short-term baseline statistical characteristics (such as standard deviation). The preset duration ensures that the detected anomaly is not a momentary fluctuation but a persistent signal. Only when all these conditions are met simultaneously does the system determine the existence of a first additional flow component unrelated to the gas equipment's operating state, thus confirming the presence of a micro-leak, and immediately outputs a first micro-leak warning message. This warning message can be presented in various forms, such as through audible and visual alarms, sending notifications to the user's mobile terminal, or uploading the information to a cloud monitoring platform.

[0094] This application's solution establishes a short-term baseline for the flow residual sequence during the duration of superimposed flow events. This short-term baseline dynamically adapts to the complex and fluctuating flow characteristics caused by the operation of multiple gas devices, thereby localizing the flow residual fluctuations generated by normal device operation and effectively shielding these expected changes. Based on this, the system continuously monitors the offset of the flow residual sequence relative to this short-term baseline, enabling the real-time capture of any abnormal flow exceeding the normal fluctuation range—i.e., potential micro-leak signals. To further improve the accuracy and robustness of detection, this solution also incorporates preset environmental parameters. Only when environmental conditions are stable and the offset continuously exceeds the preset range within a preset time period is a first additional flow component unrelated to the gas device's operating state determined, and a first micro-leak warning is output. This multi-verification mechanism ensures accurate identification of real micro-leak phenomena in the context of complex superimposed flow events, significantly reducing the risk of false alarms and missed alarms. In this way, this application maintains high sensitivity for detecting minute leaks while effectively addressing the challenges posed by multi-device superimposed flow events, ensuring the reliability of gas safety monitoring.

[0095] As a specific implementation method, during the gas micro-leak detection process, when the system identifies a superimposed flow event caused by the simultaneous operation of a wall-hung boiler and a gas water heater—for example, during a winter night when the boiler intermittently starts heating and the user briefly turns on the gas water heater—the system has already calculated the flow residual sequence based on real-time gas flow data and the expected flow waveform. To accurately detect micro-leaks in this complex scenario, the system immediately establishes a short-term baseline for the flow residual sequence during the duration of the superimposed flow event. Specifically, the system can use a 10-second moving average window to process the flow residual sequence to generate this short-term baseline. Subsequently, the system continuously calculates the offset between the real-time flow residual sequence and this short-term baseline. For example, if environmental parameters (such as outdoor temperature between -10°C and 0°C and wind speed below 5 m / s) meet preset conditions, and the offset (e.g., continuously greater than 0.003 cubic meters per hour) exceeds the preset range for a preset duration (e.g., continuously for 5 minutes), the system will determine that there is a first additional flow component that is unrelated to the normal operation of the gas equipment, and immediately send a first micro-leakage warning to the user through a smartphone application, while triggering an audible and visual alarm on the local device.

[0096] Through the above technical solution, this application effectively solves the problem that during the duration of superimposed flow events generated by the operation of multiple gas devices, due to the complex and dynamic fluctuations in device operating states, it is difficult to accurately distinguish between normal device operating fluctuations and potential micro-leak signals relying solely on the global flow residual sequence. This solution establishes a short-term baseline for the flow residual sequence during the duration of superimposed flow events, dynamically adapting to complex gas usage scenarios and effectively filtering out flow fluctuations caused by normal device operation. This allows the minute first additional flow component to be accurately captured even in complex contexts. Combined with preset environmental parameters and the determination of the persistence of the offset within a preset time period, false alarms caused by environmental interference and instantaneous fluctuations are further eliminated, significantly improving the accuracy and reliability of micro-leak detection during superimposed flow events, thereby avoiding the risk of missed or false alarms and ensuring the safety of gas use.

[0097] In some embodiments, the specific steps in step S8 include: S81. When the waveform characteristics no longer exhibit the typical pattern of superimposed flow events and the real-time gas flow data stabilizes at a preset level, the superimposed flow event is determined to have ended; S82. After the superimposed flow event ends, a stabilization period is established; during the stabilization period, the real-time gas flow data is smoothed, and the dynamic baseline of gas flow is adaptively adjusted; the adaptive adjustment includes: using the real-time gas flow data during the stabilization period with preset weights to update the dynamic baseline of gas flow (i.e., integrating it into the calculation of the original baseline mean and standard deviation); the preset weight of the new real-time gas flow data is less than the preset weight of the original baseline data before the dynamic baseline of gas flow is updated; S83. Using the adjusted dynamic baseline of gas flow as the monitoring boundary, continuously monitor the real-time gas flow data to determine whether there is a second additional flow component unrelated to the operating status of gas equipment during low-frequency gas use; if the real-time gas flow data continuously exceeds the monitoring boundary, it is determined that there is a second additional flow component, and based on the determination result of the second additional flow component, output the second micro-leakage warning information.

[0098] The statement regarding "waveform characteristics no longer exhibiting the typical pattern of superimposed flow events" refers to the system analyzing the shape, amplitude, and duration of real-time gas flow data to determine whether it has deviated from the unique flow pattern generated by the simultaneous operation of multiple gas devices. For example, it may no longer exhibit steep rising edges, high-amplitude plateaus, or slow falling edges. This can be achieved through pattern recognition algorithms, such as threshold-based feature matching or wavelet analysis. Specifically: 1. For threshold-based feature matching methods: The typical pattern of superimposed traffic events is usually characterized by a steep rising edge, a high-amplitude plateau lasting for a period of time, and a subsequent slow falling edge. To identify the end of the event, the system needs to continuously monitor changes in these waveform characteristics.

[0099] The disappearance of rising and falling edges: When a superimposed traffic event begins, the traffic rises rapidly, forming a distinct rising edge; when the event ends, the traffic falls from a high level, forming a falling edge. When the traffic data no longer shows a rapid rising or falling trend, that is, when the rate of change of traffic (first derivative) is lower than the preset "steep" threshold, it indicates that the dynamic change phase of the event has passed.

[0100] The fading of high-amplitude plateaus: During the duration of a superimposed flow event, the flow rate remains at a level significantly above the baseline. One sign that the event has ended is that the flow rate consistently falls below a preset "high-amplitude" threshold and stabilizes at a level close to the dynamic baseline during periods of low-frequency gas consumption.

[0101] Duration and stability: The system also monitors the duration of low traffic levels (e.g., near zero traffic). When traffic data remains stable at a preset low level for a period of time (e.g., a preset number of seconds or minutes), and its volatility (e.g., standard deviation) is also below a preset threshold, it can be further confirmed that the superimposed traffic event has ended.

[0102] 2. Regarding wavelet analysis methods: Wavelet analysis is a signal processing technique that can decompose a signal into components at different frequencies and time scales. It is very suitable for analyzing non-stationary transient signals, such as flow pulses.

[0103] Feature extraction: The waveforms of superimposed flow events (such as steep rising edges, high-amplitude plateaus, and slow falling edges) exhibit specific coefficient patterns and energy distributions in the wavelet domain. For example, steep edges correspond to significant values ​​of high-frequency wavelet coefficients, while sustained high-flow plateaus correspond to energy concentrations at specific scales.

[0104] Pattern Recognition: The system can pre-establish typical pattern templates for superimposed traffic events in the wavelet domain. During real-time monitoring, the system continuously performs wavelet transform on the traffic data and analyzes its wavelet coefficients. When the pattern of the real-time wavelet coefficients deviates significantly from the typical pattern of the superimposed traffic event, or tends to be consistent with the wavelet coefficient pattern of the background low-flow pattern, it can be determined that the superimposed traffic event has ended. For example, when the energy of the high-frequency wavelet coefficients decreases significantly, indicating that the rapid change in traffic has stopped, and the energy distribution of the low-frequency wavelet coefficients also returns to the background noise level, the event can be considered to have ended.

[0105] It should be noted that the main purpose of identifying high-flow events (corresponding to step S3) is to capture any instantaneous large flow fluctuations, providing a preliminary basis for subsequent event classification. The judgment in this process is based on the deviation of real-time gas flow data from the dynamic baseline of gas flow. This is a relatively broad preliminary identification aimed at discovering any flow anomalies that may require attention.

[0106] The main purpose of identifying the end of a superimposed traffic event (corresponding to step S81) is to confirm that a specific, known superimposed traffic event has completely terminated and that the system has returned to a relatively stable background traffic state, so as to safely resume normal baseline monitoring and adjustment. This process is based on two criteria: 1. The waveform characteristics no longer exhibit the typical pattern of superimposed flow events: This means that the system no longer detects the unique flow patterns generated by the simultaneous operation of multiple gas devices, such as steep rising edges, high-amplitude plateaus, or slow falling edges. This requires the system to use pattern recognition algorithms, such as threshold-based feature matching, wavelet analysis, or machine learning classifiers, to determine whether the current flow waveform has deviated from this complex, multi-device operating characteristic pattern.

[0107] 2. Real-time gas flow data remains stable at a preset level: This requires that the real-time gas flow data remain at a low level with small fluctuations over a period of time, typically close to zero flow or the average flow level during low-frequency gas consumption periods defined by the user's historical gas consumption profile. This can be determined by calculating the mean and variance of the flow data and comparing them with a preset stability threshold.

[0108] The main difference between the two is: 1. Different purposes: Identifying high-traffic events is to discover the beginning of an anomaly, which is a trigger-based detection; while identifying the end of superimposed traffic events is to confirm the termination of a specific event, which is a confirmation process of state regression.

[0109] 2. Different judgment objects: High flow event identification is for any phenomenon where flow deviates from the baseline; while the end of superimposed flow event identification is for a specific type of waveform known as superimposed flow event, to determine whether it has disappeared.

[0110] 3. Different analytical focuses: Identifying high-flow events focuses on the "high" and "deviation" of the flow, paying attention to the rising and peak characteristics of the waveform; while identifying the end of superimposed flow events focuses on the waveform "no longer showing a specific pattern" (i.e., the disappearance of complex patterns) and the flow "stabilizing at a low level" (i.e., returning to a quiet state), which is a more complex pattern matching and state confirmation.

[0111] 4. Different Judgment Conditions: Identifying high-flow events mainly relies on whether the flow exceeds the upper limit of the dynamic baseline confidence interval; while identifying the end of superimposed flow events requires two conditions to be met simultaneously: first, the waveform characteristics no longer conform to the typical pattern of superimposed events; second, the real-time flow data stabilizes at a preset low level. This indicates that the latter requires a more refined and comprehensive judgment.

[0112] In short, identifying a high-traffic event means "detecting a large amount of traffic," while identifying the end of an overlapping traffic event means "confirming that the previous high-traffic event has ended normally and the system has returned to a quiet state."

[0113] The phrase "real-time gas flow data stabilizes at a preset level" refers to real-time gas flow data remaining at a low level with minimal fluctuations over a period of time, typically close to zero flow or the average flow level during low-frequency gas consumption periods defined by the user's historical gas consumption profile. This can be determined by calculating the mean and variance of the flow data and comparing them with a preset stability threshold. By comprehensively judging these two conditions, the system can accurately identify the end time of superimposed flow events, ensuring that subsequent baseline adjustment operations are performed after the system has returned to a relatively stable background flow state.

[0114] The "stabilization period" refers to a pre-set transition phase that the system initiates after the superimposed flow event is determined. The purpose of this stabilization period is to provide a buffer time for the system to ensure that all gas appliances have completely stopped operating and that flow fluctuations in the pipeline have sufficiently attenuated, providing a clean data environment for subsequent flow data smoothing and baseline adaptive adjustment. The duration of the stabilization period can be configured according to the actual application scenario and pipeline characteristics, for example, it can be set to several minutes to tens of minutes.

[0115] The phrase "smoothing real-time gas flow data" refers to the system filtering the collected real-time gas flow data during the stable period to eliminate instantaneous noise and minor fluctuations. Commonly used smoothing methods include, but are not limited to, moving average filtering, exponential smoothing filtering, or Kalman filtering. Smoothing obtains more representative flow data, reduces random errors in the data, and thus provides a more reliable input for subsequent dynamic baseline adaptive adjustment of gas flow.

[0116] The phrase "adaptive adjustment of the dynamic baseline for gas flow" refers to the system correcting the original dynamic baseline for gas flow based on smoothed real-time gas flow data from the stable period. This adjustment aims to allow the baseline to gradually adapt to the current low flow background while maintaining its stability. Adaptive adjustment may include updating statistical parameters such as the mean and standard deviation of the baseline. The phrase "updating the dynamic baseline for gas flow with preset weights using real-time gas flow data from the stable period" means that when updating the baseline, new data from the stable period will not completely replace historical data, but will be incorporated into the baseline calculation with a small preset weight. For example, a weighted average or exponentially weighted moving average method can be used. The phrase "the preset weight of the new real-time gas flow data is less than the preset weight of the original baseline data before the dynamic baseline update" means that the correction effect of the new data is slight, and historical baseline data still dominates the update process. This design effectively prevents single or short-term flow fluctuations from causing significant interference to the baseline, thereby maintaining the rigor and stability of the monitoring boundary.

[0117] Regarding "using the adjusted dynamic baseline of gas flow as the monitoring boundary," this means that after adaptive adjustment, the system uses the updated dynamic baseline of gas flow (usually its confidence interval) as a reference standard to determine whether abnormal flow exists. Regarding "continuously monitoring real-time gas flow data," this means the system will continuously compare the real-time collected gas flow data with this monitoring boundary. Regarding "determining whether there is a second additional flow component unrelated to the operating status of gas equipment during low-frequency gas use," this means that if the real-time gas flow data continuously exceeds the adjusted monitoring boundary, and this deviation is not caused by known gas equipment operation, the system will determine that there is an additional, unexplained flow component, which is usually an indication of a micro-leak. Regarding "outputting a second micro-leak warning message," this means that once a second additional flow component is determined to exist, the system will immediately generate and send a warning message to notify the user or relevant management personnel that there may be a gas micro-leak so that timely measures can be taken.

[0118] This application's solution, through dual determination of waveform characteristics and flow level, can accurately identify the end time of superimposed flow events, ensuring that subsequent baseline adjustments are made after the system returns to a stable state, thus avoiding the miscalculation of fluctuations during the event into the baseline. After the superimposed flow event ends, the system first establishes a stabilization period during which real-time gas flow data is smoothed to effectively filter out instantaneous noise, providing a more representative data basis for baseline updates. Subsequently, the system adaptively adjusts the dynamic baseline of gas flow with preset weights, where the weight of new data is set to be less than that of the original baseline data. This design cleverly protects the stability of historical baselines. It ensures that new real-time data only slightly corrects the baseline, allowing it to gradually approach the current actual low flow background while effectively preventing significant interference from single abnormal data, thereby maintaining the tightness of the monitoring boundary. Finally, using the adjusted baseline as the monitoring boundary allows for more accurate determination of the existence of a second additional flow component unrelated to equipment operation, thus maintaining high sensitivity monitoring of minor leaks even after the superimposed event ends, ensuring the continuity and accuracy of gas safety monitoring. This mechanism, combined with the aforementioned isolation protection logic (prohibiting the use of superimposed flow event data to update the baseline), forms a complete and robust baseline management strategy, effectively solving the problem that high flow events interfere with the accuracy of micro-leak detection baselines in complex gas usage scenarios.

[0119] The following is a concrete example. Suppose that during a period of low-frequency gas usage (e.g., 3 AM), the system detects a high-flow event resulting from the intermittent operation of the wall-hung boiler and short-term use of the gas water heater. Following the steps described above, this superimposed flow event is identified and isolated, and its flow data does not contaminate the dynamic baseline of gas flow. When this superimposed flow event ends, for example, when the real-time gas flow data remains below 0.01 cubic meters per hour for 5 consecutive minutes and the flow waveform no longer exhibits obvious pulse characteristics, the system determines that the superimposed flow event has ended. Subsequently, the system initiates a 15-minute stabilization period. During this stabilization period, the system performs a 5-minute moving average smoothing process on the real-time gas flow data to eliminate any potential minor fluctuations. Next, the system adaptively adjusts the dynamic baseline of gas flow. Specifically, the system uses an exponentially weighted moving average method to update the mean and standard deviation of the baseline, where the smoothed real-time gas flow data from the stabilization period is assigned a weight of 0.05, while the historical baseline data retains a weight of 0.95. In this way, the new data slightly corrects the baseline, gradually bringing it closer to the current actual low flow background, while avoiding a single abnormal data point from significantly impacting the baseline. The adjusted dynamic baseline for gas flow (e.g., with an upper confidence interval of 0.008 cubic meters per hour) is set as the new monitoring boundary. The system continuously monitors real-time gas flow data. If the real-time flow data is found to be continuously higher than 0.008 cubic meters per hour for 10 consecutive minutes without any indication of gas equipment operation, a second additional flow component is determined to exist, and a second micro-leakage warning is immediately output.

[0120] Through the above technical solution, this application effectively solves the problem that the baseline update process is overly sensitive to single abnormal data or cannot smoothly transition to the true low-flow background after the superimposed flow event ends. This solution provides a clean and reliable data foundation for baseline adjustment by accurately determining the end time of the superimposed flow event and smoothing the real-time data during the subsequent stabilization period. More importantly, by introducing an adaptive adjustment mechanism with a preset weight that is smaller than the original baseline data, it ensures that the dynamic baseline of gas flow can slowly and stably approach the current actual low-flow background, while effectively avoiding significant interference from single abnormal data on the baseline, thus maintaining the tightness of the monitoring boundary. This allows the system to continue to maintain high-sensitivity monitoring of minute leaks after the superimposed flow event ends, significantly improving the accuracy and reliability of gas micro-leak detection, avoiding missed or false alarms due to baseline contamination, and ensuring the safety of gas use.

[0121] Reference Appendix Figure 2This invention provides a gas micro-leakage detection system based on gas consumption feature profiles (this gas micro-leakage detection system based on gas consumption feature profiles adopts the gas micro-leakage detection method based on gas consumption feature profiles described in the above embodiments, and the specific process is described in the corresponding steps above), including: The acquisition module 100 is used to acquire real-time gas flow data, gas equipment operating status data, and environmental parameters of the monitored pipeline; Module 200 is established to determine low-frequency gas usage periods based on users' historical gas usage behavior profiles and to establish a dynamic baseline for gas flow during low-frequency gas usage periods. The identification module 300 is used to extract waveform features of real-time gas flow data and identify high flow events that deviate from the dynamic baseline of gas flow based on the waveform features. The first determination module 400 is used to combine operating status data, environmental parameters and user's historical gas consumption behavior profile to determine whether a high flow event is a superimposed flow event caused by the operation of multiple gas devices. The protection module 500 is used to activate preset isolation protection logic if it is determined that the high flow event is an overlay flow event; the isolation protection logic includes prohibiting the use of flow data corresponding to the overlay flow event to update the dynamic baseline of gas flow. The processing module 600 is used to call the operating characteristic template corresponding to each gas device, combine it with the operating status data, reconstruct the expected flow waveform, and perform difference processing on the real-time gas flow data and the expected flow waveform to obtain the flow residual sequence. The second determination module 700 is used to determine, based on environmental parameters and by continuously monitoring the flow residual sequence, whether there is a first additional flow component that is unrelated to the operating status of the gas equipment during the existence of the superimposed flow event, and to output the first micro-leakage warning information based on the determination result of the first additional flow component. The third determination module 800 is used to restore the use of the gas flow dynamic baseline as the monitoring boundary after the superimposed flow event ends, in order to determine whether there is a second additional flow component that is unrelated to the operating status of the gas equipment during low-frequency gas use, and to output the second micro-leakage warning information based on the determination result of the second additional flow component.

[0122] In this context, the units described as separate components may or may not be physically separate. Similarly, the components shown as units may or may not be physical units; they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0123] Furthermore, the functional modules in the various embodiments of the present invention can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0124] In this document, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, without necessarily requiring or implying any such actual relationship or order between these entities or operations.

[0125] The above description is merely an embodiment of the present invention and is not intended to limit the scope of protection of the present invention. For those skilled in the art, the present invention can have various modifications and variations. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for detecting micro-leaks in natural gas based on gas consumption characteristic profiling, characterized in that, Including the following steps: S1. Acquire real-time gas flow data, gas equipment operating status data, and environmental parameters of the monitored pipeline; S2. Based on the user's historical gas consumption behavior profile, determine the low-frequency gas consumption period and establish a dynamic baseline for gas flow rate for the low-frequency gas consumption period; S3. Extract the waveform features of the real-time gas flow data, and identify high flow events that deviate from the dynamic baseline of the gas flow based on the waveform features; S4. Combining the operating status data, the environmental parameters, and the user's historical gas consumption behavior profile, determine whether the high flow event is a superimposed flow event caused by the operation of multiple gas devices; S5. If it is determined that the high-flow event belongs to the superimposed flow event, then the preset isolation protection logic is activated; The isolation protection logic includes prohibiting the use of the flow data corresponding to the superimposed flow event to update the gas flow dynamic baseline; S6. Call the operating feature template corresponding to each of the gas devices, combine it with the operating status data, reconstruct the expected flow waveform, and perform difference processing on the real-time gas flow data and the expected flow waveform to obtain the flow residual sequence; S7. Based on the environmental parameters, by continuously monitoring the flow residual sequence, determine whether there is a first additional flow component that is unrelated to the operating status of the gas equipment during the existence of the superimposed flow event, and output the first micro-leakage warning information according to the determination result of the first additional flow component; S8. After the superimposed flow event ends, the gas flow dynamic baseline is restored as the monitoring boundary to determine whether there is a second additional flow component that is unrelated to the operating status of the gas equipment during the low-frequency gas consumption period, and outputs the second micro-leakage warning information based on the determination result of the second additional flow component. The gas appliances that generate the superimposed flow events include wall-hung boilers and gas water heaters; The specific steps in step S4 include: S41. Based on the user's historical gas usage profile, analyze the statistical patterns of the intermittent operation of the wall-hung boiler and the short-term use of the gas water heater; S42. Based on the environmental parameters, evaluate the timing and duration of the high-flow event to obtain the evaluation result; S43. Based on the operating status data, verify whether the flow increment of the high flow event matches the gas consumption corresponding to the rated power of the gas water heater, and obtain the verification result; S44. Based on the statistical regularity, the evaluation results, and the verification results, determine whether the high-traffic event is a superimposed traffic event generated by the operation of multiple devices; The specific steps in step S7 include: S71. During the duration of the superimposed traffic event, establish a short-term baseline for the traffic residual sequence; S72. Continuously monitor the offset of the flow residual sequence relative to the short-term baseline; S73. If the environmental parameters meet the preset conditions and the offset exceeds the preset range for a preset duration, it is determined that there is a first additional flow component that is unrelated to the operating status of the gas equipment during the duration of the superimposed flow event, and the first micro-leakage warning information is output. The specific steps in step S8 include: S81. When the waveform characteristics no longer exhibit the typical pattern of the superimposed flow event and the real-time gas flow data stabilizes at a preset level, the superimposed flow event is determined to have ended; S82. After the superimposed flow event ends, a stabilization period is established; during the stabilization period, the real-time gas flow data is smoothed, and the gas flow dynamic baseline is adaptively adjusted; the adaptive adjustment includes: updating the gas flow dynamic baseline with the real-time gas flow data during the stabilization period using a preset weight; the preset weight of the new real-time gas flow data is less than the preset weight of the original baseline data before the gas flow dynamic baseline is updated. S83. Using the adjusted dynamic baseline of gas flow as the monitoring boundary, continuously monitor the real-time gas flow data to determine whether there is a second additional flow component unrelated to the operating status of the gas equipment during the low-frequency gas usage period; if the real-time gas flow data continuously exceeds the monitoring boundary, it is determined that there is a second additional flow component, and the second micro-leakage warning information is output according to the determination result of the second additional flow component.

2. The gas micro-leakage detection method based on gas consumption characteristic profiling according to claim 1, characterized in that, In step S2, the specific steps for determining low-frequency gas usage periods based on the user's historical gas usage behavior profile include: S21. Based on the user's historical gas usage profile, a clustering algorithm using probability density estimation is adopted to identify the time period when the gas usage probability is below a preset threshold as the low-frequency gas usage period.

3. The gas micro-leakage detection method based on gas consumption characteristic profiling according to claim 1, characterized in that, In step S2, the specific steps for establishing a dynamic baseline for gas flow during the low-frequency gas consumption period include: S22. During the low-frequency gas usage period, extract stable no-airflow data segments; S23. Calculate the mean and standard deviation of the flow rate of the stable no-airflow data segment; S24. Combining the background noise parameter and zero drift parameter of the flow sensor, and based on the mean flow rate and the standard deviation, construct the confidence interval of the dynamic baseline of the gas flow rate.

4. The gas micro-leakage detection method based on gas consumption characteristic profiling according to claim 1, characterized in that, In step S6, the specific steps for reconstructing the expected flow waveform by calling the operating characteristic template corresponding to each of the gas devices and combining it with the operating status data include: S61. Based on the operating status data, obtain the corresponding flow value by calling the operating characteristic data corresponding to each gas device from the pre-stored flow characteristic templates of each gas device under different operating modes or specific power conditions; S62. The obtained corresponding flow values ​​are time-series superimposed to reconstruct the expected flow waveform.

5. The gas micro-leakage detection method based on gas consumption characteristic profiling according to claim 1, characterized in that, In step S6, the specific steps for performing difference processing on the real-time gas flow data and the expected flow waveform to obtain the flow residual sequence include: S63. Time-align the real-time gas flow data with the expected flow waveform; S64. Calculate the instantaneous flow difference between the time-aligned real-time gas flow data and the expected flow waveform to obtain the flow residual sequence.

6. A gas micro-leakage detection system based on gas consumption characteristic profiling, employing the gas micro-leakage detection method as described in any one of claims 1-5, characterized in that, include: The acquisition module is used to acquire real-time gas flow data, gas equipment operating status data, and environmental parameters of the monitored pipeline; A module is established to determine low-frequency gas usage periods based on the user's historical gas usage behavior profile, and to establish a dynamic baseline for gas flow during the low-frequency gas usage periods. The identification module is used to extract the waveform features of the real-time gas flow data and, based on the waveform features, identify high flow events where the flow rate deviates from the dynamic baseline of the gas flow. The first determination module is used to combine the operating status data, the environmental parameters and the user's historical gas consumption behavior profile to determine whether the high flow event is a superimposed flow event caused by the operation of multiple gas devices. The protection module is used to activate preset isolation protection logic if it is determined that the high-flow event belongs to the superimposed flow event. The isolation protection logic includes prohibiting the use of the flow data corresponding to the superimposed flow event to update the gas flow dynamic baseline; The processing module is used to call the operating feature template corresponding to each of the gas devices, combine it with the operating status data, reconstruct the expected flow waveform, and perform difference processing on the real-time gas flow data and the expected flow waveform to obtain the flow residual sequence. The second determination module is used to determine, based on the environmental parameters and by continuously monitoring the flow residual sequence, whether there is a first additional flow component that is unrelated to the operating status of the gas equipment during the existence of the superimposed flow event, and to output a first micro-leakage warning message based on the determination result of the first additional flow component. The third determination module is used to restore the use of the gas flow dynamic baseline as the monitoring boundary after the superimposed flow event ends, in order to determine whether there is a second additional flow component that is unrelated to the operating status of the gas equipment during the low-frequency gas consumption period, and to output the second micro-leakage warning information based on the determination result of the second additional flow component.

Citation Information

Patent Citations

  • Method for realizing gas safety management through registering gas burning equipment with gas meter

    CN109141774A

  • Safety control system and method for gas leakage

    CN118582679A

  • Intelligent water meter anomaly detection system and method

    CN120524394A