A method and system for assessing the risk of gas leakage

By combining a multi-factor weighted model and spectral analysis, the problem of minute leak signals being overwhelmed by errors in existing gas leak detection methods has been solved, achieving gas leak risk assessment with high sensitivity and low false alarm rate.

CN123117790APending Publication Date: 2026-11-17HONGMENG SAFETY TECH (HANGZHOU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611306593.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-26
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing gas leak detection methods based on statistical models lack physical state feedback, making it easy for minute leak signals to be overwhelmed by model errors, resulting in insufficient detection sensitivity and accuracy.

Method used

By acquiring user basic profile data, historical gas consumption time series data, and fluid dynamic disturbance signals, and using a multi-factor weighted model combined with spectral analysis, differentiated calibration and coupling judgment are performed to improve the sensitivity and accuracy of leak detection.

Benefits of technology

It achieves highly sensitive detection of gas leaks, reduces false alarm rates, and improves the reliability and robustness of risk assessment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123117790A_ABST
    Figure CN123117790A_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for assessing gas leak risk, belonging to the field of gas safety monitoring technology. The method includes: acquiring metered gas consumption data and calculating an initial predicted gas consumption baseline value; collecting fluid dynamic disturbance signals and extracting low-frequency and high-frequency spectral features; determining the fluid physical state category based on the low-frequency spectral energy intensity, and implementing a differentiated calibration strategy for the model weights according to the physical state category; calculating the calibrated deviation rate and spectral difference degree, and determining the leak risk level when both meet the coupling judgment condition. This invention solves the problem in existing statistical model-based leak detection methods where the lack of physical state feedback leads to small leak signals being easily overwhelmed by model errors, achieving high-sensitivity detection and low false alarm rate assessment of gas leaks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a gas leak risk assessment method and system, belonging to the field of gas safety monitoring technology. Background Technology

[0002] Gas safety is crucial to the safety of residents' lives and property. With the development of Internet of Things (IoT) technology, gas leak risk assessment technology based on smart gas meter data has gradually become a research hotspot. Existing technical solutions typically employ statistical analysis methods, constructing user gas consumption profiles or multi-factor weighted models to predict theoretical gas consumption, comparing actual metering data with theoretical predictions, and determining the existence of leak risk based on the deviation rate.

[0003] However, the statistical models based on gas consumption deviation analysis have inherent limitations. Because user gas consumption behavior is significantly random and volatile, statistical models cannot fully cover all gas consumption scenarios, resulting in unavoidable statistical errors in the prediction results. In practical applications, the gas consumption deviation signals generated by minute leaks are often extremely weak and easily masked by the random errors in model predictions, leading to low signal-to-noise ratios in leak detection and making it difficult to effectively identify early-stage minute leaks.

[0004] Furthermore, most statistical models in existing technologies operate in an open-loop mode, lacking the perception and feedback of the actual physical state of the fluid inside the pipeline. The model parameters cannot be dynamically calibrated according to actual operating conditions, further limiting the sensitivity and accuracy of leak detection.

[0005] Therefore, a new solution is needed to address this problem. Summary of the Invention

[0006] The technical problem to be solved by the present invention is to provide a gas leak risk assessment method and system, which solves the problem that the lack of physical state feedback in the existing leak detection method based on statistical models makes it easy for small leak signals to be overwhelmed by model errors, and realizes high sensitivity detection and low false alarm rate assessment of gas leaks.

[0007] The technical problem to be solved by this invention is achieved by the following technical solution:

[0008] A gas leak risk assessment method includes the following steps:

[0009] Acquire the target user's basic profile data, historical gas consumption time series data, actual gas consumption data for the current metering cycle, and fluid dynamic disturbance signals;

[0010] Based on the user's basic profile data, historical gas consumption time series data, and environmental parameters at the current time, a multi-factor weighted model is invoked to calculate the initial predicted gas consumption baseline value for the target user in the current metering cycle;

[0011] The fluid dynamic disturbance signal is subjected to spectral transformation to extract low-frequency and high-frequency spectral features;

[0012] Based on the low-frequency spectral characteristics, the current physical state category of the fluid in the pipeline is determined, and a differentiated calibration strategy is applied to the weight parameters of the multi-factor weighted model according to the current physical state category to obtain the calibrated target gas consumption benchmark value.

[0013] Calculate the target deviation rate between the actual gas consumption data and the target gas consumption benchmark value, and calculate the spectral difference between the high-frequency band spectral characteristics and the benchmark spectral fingerprint corresponding to the current flow rate;

[0014] When both the target deviation rate and the spectral difference meet the preset coupling judgment conditions, the gas leakage risk level of the target user is determined.

[0015] Optionally, the step of calculating the initial predicted gas consumption baseline value for the target user in the current metering cycle based on the user's basic profile data, historical gas consumption time series data, and environmental parameters at the current time using a multi-factor weighted model specifically includes:

[0016] Based on the house area, number of permanent residents and list of gas equipment in the user basic profile data, the basic gas consumption base is determined;

[0017] Determine the time correction factor based on the season identifier, average daily temperature, and holiday identifier corresponding to the current time;

[0018] Based on the historical gas consumption average within a preset time window in the historical gas consumption time series data, the historical gas consumption weight value is determined.

[0019] Based on the average gas consumption of similar users with the same basic user profile data as the target user, determine the similar benchmarking correction value;

[0020] The initial predicted gas consumption baseline value is obtained by weighting and fusing the basic gas consumption base, time correction coefficient, historical gas consumption weight value, and similar benchmark correction value.

[0021] Optionally, determining the current physical state category of the fluid in the pipe based on the low-frequency spectral characteristics specifically includes:

[0022] Calculate the spectral energy intensity of the low-frequency band spectral characteristics;

[0023] If the energy intensity of the low-frequency band spectrum is less than the first energy threshold, then the current physical state category is determined to be pure laminar flow.

[0024] If the low-frequency spectrum energy intensity is greater than or equal to the first energy threshold and less than the second energy threshold, then the current physical state category is determined to be normal turbulent state;

[0025] If the low-frequency band spectral energy intensity is greater than or equal to the second energy threshold, the current physical state category is determined to be an abnormal mixed state.

[0026] Optionally, the step of applying a differentiated calibration strategy to the weight parameters of the multi-factor weighted model based on the current physical state category to obtain the calibrated target gas consumption benchmark value specifically includes:

[0027] When the flow is determined to be pure laminar flow, the initial predicted gas consumption benchmark value is forcibly set to the minimum metering resolution of the meter, and the weight coefficients in the multi-factor weighted model are set to zero.

[0028] When the flow is determined to be in a normal turbulent state, the low-frequency spectral features are periodically decomposed to extract the normal gas consumption component. The specific method of periodic decomposition is as follows: autocorrelation analysis is performed on the low-frequency spectral features to extract the component with a periodicity stronger than a preset threshold in the autocorrelation function as the normal gas consumption component, or short-time Fourier transform is performed on the low-frequency spectral features to extract the spectral components with stable periodic patterns in the time-frequency domain as the normal gas consumption component; the prediction deviation between the normal gas consumption component and the initial predicted gas consumption benchmark value is calculated, and the weight coefficients of the multi-factor weighted model are adjusted according to the prediction deviation to obtain the target gas consumption benchmark value;

[0029] When an abnormal mixed state is determined, the weight update of the multi-factor weighted model is frozen, and the initial predicted gas consumption benchmark value is used as the target gas consumption benchmark value.

[0030] Optionally, the method further includes:

[0031] When the flow is determined to be in a normal turbulent state, the model confidence level is calculated based on the difference between the target gas consumption reference value and the normal gas consumption component.

[0032] The deviation judgment threshold included in the coupling judgment condition is dynamically scaled based on the model confidence level.

[0033] Specifically, when the model confidence level is greater than or equal to the first confidence threshold, the deviation determination threshold is multiplied by a tightening factor less than 1; when the model confidence level is less than or equal to the second confidence threshold, the deviation determination threshold is multiplied by a relaxation factor greater than 1; when the model confidence level is greater than the second confidence threshold and less than the first confidence threshold, the deviation determination threshold remains unchanged; the first confidence threshold is greater than the second confidence threshold.

[0034] Optionally, calculating the spectral difference between the high-frequency band spectral features and the reference spectral fingerprint corresponding to the current traffic specifically includes:

[0035] Based on the continuous mapping function of traffic and spectral fingerprint, a theoretical reference spectral centroid and a theoretical reference spectral bandwidth are generated according to the current actual traffic. The continuous mapping function is fitted using piecewise cubic spline interpolation.

[0036] Calculate the first relative difference between the measured high-frequency band spectral centroid and the theoretical reference spectral centroid, and the second relative difference between the measured high-frequency band spectral bandwidth and the theoretical reference spectral bandwidth;

[0037] The sum of the first relative difference and the second relative difference is determined as the spectral difference degree;

[0038] The step of determining the gas leakage risk level of the target user when both the target deviation rate and the spectral difference meet the preset coupling judgment conditions specifically includes: if the target deviation rate is greater than the deviation judgment threshold and the spectral difference is greater than the difference judgment threshold, then the gas leakage risk level is determined to be a confirmed leakage risk.

[0039] Optionally, after outputting the risk assessment result of a suspected leak, the system triggers a safety valve shut-off procedure and performs a leak distance estimation step during the step-by-step valve shut-off process:

[0040] By controlling the built-in valve of the smart gas meter to gradually reduce the opening to different flow conditions, the high-frequency spectrum characteristics are collected respectively, and the rate of change of high-frequency spectrum energy with flow rate κ under each flow condition is calculated.

[0041] The rate of change κ is compared with a pre-calibrated distance-sensitivity mapping curve. Based on the comparison results, the distance range of the leak point relative to the smart gas meter is determined. The larger the absolute value of the rate of change κ, the closer the leak point is to the meter. The smaller the absolute value of the rate of change κ, the farther the leak point is from the meter.

[0042] Optionally, the method further includes:

[0043] When constructing or updating the continuous mapping function between the flow rate and the spectral fingerprint, if the flow is determined to be in a pure laminar state, the spectral data of the current period is discarded; if the flow is determined to be in a normal turbulent state and the confidence level of the model is higher than the preset confidence threshold and no leakage is confirmed, the spectral data of the current period is included as a positive sample in the training set of the continuous mapping function.

[0044] Optionally, the method further includes:

[0045] Obtain spectral difference data of multiple target gas meters within the same associated area;

[0046] Using the physical state category of pure laminar flow as a screening criterion, a collaborative analysis set is determined from the multiple target gas tables;

[0047] Calculate the time series variance of the spectral differences of each target gas meter in the collaborative analysis set within a sliding time window. The length of the sliding time window is determined based on the sampling period of the gas meter and the response speed requirements for leak detection.

[0048] Using the reciprocal of the time series variance as a weighting factor, the outlier of the spectral difference of each target gas meter is weighted to obtain the weighted outlier.

[0049] If the weighted outlier exceeds a preset outlier threshold, it is determined that the corresponding target gas meter has a gas leak.

[0050] A gas leak risk assessment system, comprising:

[0051] The data acquisition module is used to acquire the target user's basic profile data, historical gas consumption time series data, actual gas consumption data of the current metering cycle, and fluid dynamic disturbance signals;

[0052] The gas consumption behavior modeling module is used to calculate the initial predicted gas consumption benchmark value by calling a multi-factor weighted model based on the user basic profile data, historical gas consumption time series data and environmental parameters at the current time.

[0053] The spectrum feature extraction module is used to perform spectrum transformation on the fluid dynamic disturbance signal and extract low-frequency and high-frequency spectrum features.

[0054] The physical state determination module is used to determine the current physical state category of the fluid in the pipeline based on the low-frequency band spectral characteristics.

[0055] The model calibration module is used to perform a differentiated calibration strategy on the weight parameters of the multi-factor weighted model according to the current physical state category, so as to obtain the calibrated target gas consumption benchmark value.

[0056] The coupling determination module is used to calculate the target deviation rate between the actual gas consumption data and the target gas consumption benchmark value, and to calculate the spectral difference between the high-frequency band spectral characteristics and the benchmark spectral fingerprint corresponding to the current flow rate; when both the target deviation rate and the spectral difference meet the preset coupling determination conditions, the gas leakage risk level of the target user is determined.

[0057] The early warning and response module is used to perform corresponding early warning and response operations based on the leakage risk level assessment results.

[0058] The beneficial effects of this invention are:

[0059] 1. By introducing spectral analysis of fluid dynamic disturbance signals, a closed-loop mechanism of "spectral physical state feedback calibration" was established. This mechanism uses the actual physical state of the fluid to back-calibrate the weight parameters of the statistical model, effectively compressing the uncertainty range of the statistical model, enabling minute leakage signals to emerge effectively from the background noise of model prediction errors, and significantly improving the detection sensitivity of minute leaks;

[0060] 2. A coupled judgment logic based on deviation rate and spectral difference is adopted, requiring both dimensions of indicators to simultaneously meet threshold conditions before outputting a confirmed leak result. This mechanism avoids false alarms caused by temporary gas usage fluctuations or environmental interference due to single-dimensional detection, thus improving the reliability of risk assessment results;

[0061] 3. A model confidence level was defined based on the consistency between model predictions and physical perception, and the judgment threshold was dynamically scaled based on the confidence level. The threshold was tightened to improve sensitivity when the model is reliable, and relaxed to suppress false alarms when the model is unreliable, enabling the system to adapt to different operating conditions and maintain robust detection performance. Attached Figure Description

[0062] Figure 1 This is the main flowchart of the method of the present invention.

[0063] Figure 2 This is a flowchart of the fluid physical state determination and differential model calibration process of the present invention.

[0064] Figure 3 This is a flowchart of the coupling determination and threshold dynamic scaling of the present invention.

[0065] Figure 4 This is a system architecture diagram of the present invention. Detailed Implementation

[0066] To facilitate a clear understanding of the technical means, creative features, objectives, and effects of this invention, the invention will be further described below in conjunction with specific illustrations.

[0067] To address the technical problem that existing statistical models based on gas consumption deviation analysis are limited by the inherent randomness of user behavior and cannot perceive the true physical state of the fluid within the pipeline, resulting in minute leakage signals being overwhelmed by model prediction errors, this application provides a gas leakage risk assessment method, referencing... Figure 1 This includes the following steps.

[0068] After the smart gas meter is installed and debugged, and the pipeline system is confirmed to be leak-free, the offline calibration process of the benchmark fingerprint database is executed. The background system issues calibration commands to control the gas meter's built-in valves to open sequentially to multiple preset flow points.

[0069] In this embodiment, the preset flow rates include 0.1 cubic meters per hour, 0.2 cubic meters per hour, 0.4 cubic meters per hour, 0.6 cubic meters per hour, 0.8 cubic meters per hour, 1.0 cubic meters per hour, 1.5 cubic meters per hour, 2.0 cubic meters per hour, 2.5 cubic meters per hour, and 3.0 cubic meters per hour. Each flow rate is maintained stably for 30 seconds to allow the airflow in the pipeline to reach a fully developed turbulent state. During calibration, for diaphragm smart gas meters equipped with MEMS accelerometers, accelerometer signals are continuously acquired at a sampling frequency of 2 kHz. For ultrasonic smart gas meters, the ultrasonic transit time series is acquired using their existing ultrasonic transducers, with a sampling frequency of not less than 1 kHz. These signals are collectively referred to as fluid dynamic disturbance signals.

[0070] The acquired fluid dynamic disturbance signal is subjected to a Fast Fourier Transform (FFT) to convert the signal from the time domain to the frequency domain. The transformed spectrum is then divided into frequency bands: low-frequency spectral features are extracted with a cutoff frequency of 200 Hz, and high-frequency spectral features are extracted with a cutoff frequency of 800 Hz. The 200 Hz to 800 Hz band is considered a transition band and is not analyzed. In the high-frequency band, the spectral characteristic quantities corresponding to each flow point are calculated, including the spectral centroid and spectral bandwidth, which are used to characterize the concentrated frequency location of the high-frequency spectral energy and the degree of dispersion around the centroid, respectively.

[0071] Based on each preset flow point As the independent variable, with the corresponding spectral centroid and spectrum bandwidth Using the dependent variable, two continuous mapping functions are constructed. In this embodiment, piecewise cubic spline interpolation is used for fitting to obtain... and Two functions. This mapping function can interpolate and generate the corresponding theoretical reference spectrum centroid and theoretical reference spectrum bandwidth under any real-time flow value, eliminating the quantization error caused by discrete flow point matching.

[0072] Simultaneously calibrate the low-frequency band periodic spectral energy-flow mapping function. Under the known leak-free condition, determine the low-frequency band spectral characteristics. Autocorrelation analysis is performed to extract components from the autocorrelation function whose periodicity is stronger than a preset threshold. The periodicity intensity is quantified by calculating the ratio of the peak value of the autocorrelation function to its value at zero time delay; this ratio is between 0 and 1, with a ratio closer to 1 indicating stronger periodicity. Components with ratios greater than the preset threshold are identified as periodic components. The total energy of the extracted periodic components is then calculated. Using the corresponding instantaneous flow rate as input and the corresponding instantaneous flow rate as output, a mapping function is established using regression fitting. This mapping function is used to infer the normal gas consumption component from the spectral signal under normal turbulent conditions.

[0073] The offline calibration process for the distance-sensitivity mapping curve required for leak distance estimation is executed synchronously. A test platform consistent with the actual indoor piping conditions of users is built in a laboratory environment. On the test platform, the smart gas meter is installed in a standard position, and standard leak holes are set at different distances on the downstream pipeline of the meter. In this embodiment, the standard leak holes are set at seven locations: 1 meter, 2 meters, 3 meters, 5 meters, 8 meters, 12 meters, and 15 meters from the meter. At each location, a standard leak hole with a diameter of 0.5 mm is used to simulate a micro-leak. After the leak is initiated, fluid dynamic disturbance signals are collected according to the same procedure as routine monitoring. The high-frequency spectrum energy is recorded at different valve openings, and the rate of change of high-frequency spectrum energy with flow rate at each location point is calculated. The distance values ​​of each location point are compared with the corresponding... The values ​​are fitted to obtain a distance-sensitivity mapping curve. This mapping function is used to determine the appropriate response based on measured values ​​after leak confirmation. The value is used to estimate the distance between the leak point and the meter.

[0074] During routine monitoring, the gas meter triggers a leak risk assessment at a preset interval. In this embodiment, the assessment interval is set to be once every 5 minutes.

[0075] In the data acquisition step, at the start of each evaluation, the cumulative gas consumption reading for the current metering cycle, the current instantaneous flow rate, valve status indicators, meter online status indicators, and raw data of fluid dynamic disturbance signals collected from the accelerometer or ultrasonic transducer are first acquired. The acquisition time for the fluid dynamic disturbance signals is set to 2 seconds in this embodiment.

[0076] In the calculation of the initial forecast gas consumption baseline, based on the target user's basic profile data and historical gas consumption time series data, a multi-factor weighted model is invoked to calculate the initial forecast gas consumption baseline for the current metering cycle. The multi-factor weighted model specifically includes the following four types of factors.

[0077] For the basic fixed factors, the housing area, number of permanent residents, and gas equipment list are retrieved from the user's basic profile data. The housing area (A) is measured in square meters, the number of permanent residents (N) is measured in people, and the gas equipment list includes various types of equipment such as gas stoves, gas water heaters, and wall-mounted boilers. Based on the housing area, number of permanent residents, and gas equipment list, a linear weighted model is used to calculate the basic gas consumption baseline. The weight coefficients of each factor are preset and adjusted according to the equipment type.

[0078] For the time-related dynamic factor, a multiplicative model is used to calculate the time correction coefficient based on the season, average daily temperature, and holiday markers. The coefficients for each component are determined by fitting historical data. Seasonal indicators are divided into spring, summer, autumn, and winter, corresponding to values ​​1, 2, 3, and 4 respectively. The daily average temperature T is in degrees Celsius, obtained in real-time from the meteorological data interface. The holiday indicator H is a Boolean value indicating whether the day is a national statutory holiday.

[0079] For the user history factor, the historical gas consumption weight value is calculated using the exponentially weighted moving average method based on the historical gas consumption data within the sliding window. This assigns higher weight to recent data. In this embodiment, the preset time window length L is set to 30 days, and the decay coefficient is... Take 0.9.

[0080] For similar benchmarking factors, search for user groups with the same apartment type, population, and gas equipment configuration, and calculate their average gas consumption as the correction value for similar benchmarking. Specifically, the database is searched for other users whose house area, number of permanent residents, and gas appliance list are exactly the same as the target user's. The average daily gas consumption of these users during the same period is calculated, and the unit of this amount is cubic meters per hour.

[0081] The above four types of factors are weighted and fused to obtain the initial predicted gas consumption baseline value. The calculation formula is as follows:

[0082]

[0083] in, This represents the weighting coefficient of the basic fixed factor, with an initial value of 0.3; This represents the weighting coefficient of the user's history factor, with an initial value of 0.4; This represents the weighting coefficient of similar benchmark factors, with an initial value of 0.3; and The aforementioned weighting coefficients are calibrated in real time using spectral physical state feedback signals during operation.

[0084] In the spectral transformation and feature extraction steps of fluid dynamic disturbance signals, a Fast Fourier Transform (FFT) is performed on the acquired raw data of the fluid dynamic disturbance signals to convert the time-domain signal into a frequency-domain signal. The transformed spectrum is then divided into frequency bands: low-frequency spectral features are extracted using a cutoff frequency of 200 Hz. High-frequency spectral features were extracted using 800 Hz as the cutoff frequency. Low-frequency spectral characteristics Used for subsequent fluid physics state determination and model parameter calibration. High-frequency spectral characteristics. Used for subsequent leakage turbulence detection and spectral difference calculation.

[0085] In the fluid physical state determination and differential model calibration steps, the first step is based on the low-frequency spectral characteristics. Calculate the low-frequency spectral energy intensity E. The spectral energy intensity is calculated by summing the squares of the amplitudes of each frequency component within the low-frequency band. It characterizes the overall level of vibration energy in the low-frequency band; a lower energy intensity indicates a more stable or static airflow within the pipe, while a higher energy intensity indicates a more vigorous airflow. Compare the calculated spectral energy intensity E with a preset first energy threshold. Second energy threshold A comparison is made. In this embodiment, Take 0.3 (normalized energy value). The threshold value is set to 0.7. This threshold was determined through statistical analysis of a large amount of historical spectrum data under leak-free conditions. If the current physical state of the fluid in the pipe is determined to be pure laminar flow, it indicates that there is no airflow or the airflow is extremely weak in the pipe. If the physical state of the fluid in the pipe is determined to be normal turbulent flow, it represents the regular airflow generated by normal gas usage. If the physical state of the fluid in the current pipe is determined to be an abnormal mixing state, it indicates the presence of abnormal disturbance.

[0086] When the flow is determined to be purely laminar, it indicates that there is no active gas consumption by users during the current period, and only static or extremely slow airflow exists within the pipeline. In this case, the calibrated theoretical gas consumption baseline value will be used. Forced setting to the minimum metering resolution Minimum metering resolution The meaning is that, under ideal conditions with no gas flow, the noise floor of the smart gas meter's reading caused by factors such as mechanical vibration, electromagnetic interference, and analog-to-digital conversion quantization errors is physically equivalent to the metering reference value under the zero gas consumption assumption. In this embodiment, for a diaphragm smart gas meter, Take 0.002 cubic meters per hour; for ultrasonic smart gas meters, Take 0.001 cubic meters per hour. Simultaneously, set all weight coefficients in the multi-factor weighted model to zero, i.e. , , At this point, the model does not rely on any historical statistical information, but uses only the physical noise floor of the meter as the sole theoretical benchmark. The calibrated target gas consumption benchmark value. The formula for calculating the calibrated target deviation rate R' in pure laminar flow is:

[0087]

[0088] in, This represents the current instantaneous flow rate reading, expressed in cubic meters per hour. In pure laminar flow, the deviation rate is calculated using the instantaneous flow rate. With minimum metrological resolution A comparison is made. The physical meaning of this deviation rate is the proportion of abnormal instantaneous flow rates exceeding the meter's measurement noise floor. When Significantly greater than At this point, the deviation rate increases sharply, forming a strong leakage indication signal. In pure laminar flow, since the statistical model has been completely bypassed, the model confidence C is inapplicable, and dynamic threshold scaling is not performed. All decision thresholds in the coupled decision conditions remain unchanged from their initial calibration values. Simultaneously, the spectral data of the current period does not participate in the incremental learning of the benchmark fingerprint database to avoid anomalous data in the leakage state contaminating the benchmark model.

[0089] When it is determined to be a normal turbulent state, it indicates that the user is using the gas appliance normally, and there is regular turbulence in the pipeline generated by actions such as stove ignition or water heater operation. At this time, the low-frequency spectral characteristics... Periodic decomposition is performed to extract the normal gas consumption amount. The specific method of periodic decomposition is as follows: Autocorrelation analysis is performed to extract components with periodicity stronger than a preset threshold from the autocorrelation function as normal gas consumption components. The periodicity is quantified by the ratio of the main peak value of the autocorrelation function to the value of the autocorrelation function at zero time delay; a ratio closer to 1 indicates stronger periodicity. Alternatively, [the following can be done]... A short-time Fourier transform is performed to extract the spectral components with stable periodic patterns in the time-frequency domain as the normal gas consumption components. In this embodiment, autocorrelation analysis is preferred. The total energy of the extracted periodic components is then calculated. Input a pre-calibrated periodic spectral energy-flow mapping function To obtain the normal gas consumption amount .

[0090] The mapping function The data was obtained by regression fitting of the periodic component energy and corresponding flow rate values ​​of the meter under known leak-free conditions and various typical gas-using devices. In this embodiment, typical gas-using devices include three modes: single-burner ignition, simultaneous dual-burner ignition, and gas water heater operation.

[0091] Will Initial predictions of the multi-factor weighted model Perform cross-validation and calculate prediction bias. The calculation formula is as follows:

[0092]

[0093] in, This is a dimensionless prediction bias value used to measure the consistency between statistical model predictions and spectral physical perception. Deviation threshold from preset A comparison is made. In this embodiment, Take 0.15.

[0094] like This indicates that the model prediction is consistent with the spectrum perception, at which point the weight of historical factors should be increased. The specific increment is the current The value is reduced by 10%, while the basic fixed factor weight is reduced by the original proportion. Weights of similar benchmark factors This is done to keep the sum of the weighting coefficients at 1. This operation improves the model's fit to individual users' long-term gas usage habits and enhances the accuracy of the statistical model under reliable conditions. This indicates a significant discrepancy between the model's predictions and the spectrum perception; in this case, the weight of historical factors should be reduced. And increase the weight of similar benchmarking factors. The specific adjustment amount is Reduce the current value by 15%. Increase by the same amount accordingly. It remains unchanged. This operation introduces group data to correct biases in individual models, avoiding model drift caused by abnormal individual behavior.

[0095] Adjusted weights and satisfy Normalization constraints. Calibrated target gas reference value. The calculation formula is:

[0096]

[0097] The formula for calculating the calibrated target deviation rate R' under normal turbulent conditions is:

[0098]

[0099] in, This represents the average instantaneous flow rate reading for the current metering period, expressed in cubic meters per hour. This represents the calibrated target gas consumption baseline value, also in cubic meters per hour. Simultaneously, based on the target gas consumption baseline value... Compared with normal gas consumption The confidence level C of the difference calculation model is calculated using the following formula:

[0100]

[0101] Wherein, C is a dimensionless confidence index, with a value range of (0, 1]. The closer C is to 1, the more consistent the statistical model prediction is with the physical perception of the spectrum. The exponential function form ensures that the confidence level monotonically decreases as the deviation increases and is always positive, with a clear physical meaning.

[0102] When an abnormal mixed state is identified, it indicates that normal gas consumption and suspected leakage disturbances coexist within the pipeline, or that an abnormal disturbance source exists within the pipeline. At this point, all weight updates of the multi-factor weighted model are frozen, i.e., the system is maintained... , , No changes, no adjustments made. The calibrated target gas reference value. Equal to the initial predicted gas consumption baseline value ,Right now Simultaneously, a calibration untrusted flag is output, which is used for conditional judgment in subsequent threshold scaling and incremental learning logic.

[0103] In the calculation step of spectral difference, based on the spectral characteristics of the high-frequency band... The difference between the current traffic and the baseline spectral fingerprint is calculated. First, based on the current actual traffic value Q, a continuous mapping function is constructed. and Generate the theoretical reference spectral centroid for this flow rate. and theoretical reference spectrum bandwidth Then, the actual spectral centroid in the measured high-frequency band spectral characteristics is calculated. centroid of the theoretical reference spectrum The first relative difference, and the actual spectral bandwidth Compared with theoretical reference spectral bandwidth The second relative difference. The sum of the first relative difference and the second relative difference is taken as the spectral difference. The calculation formula is as follows:

[0104]

[0105] in, This represents the centroid of the measured high-frequency spectrum, in Hertz. This represents the centroid of the theoretical reference spectrum generated by the continuous mapping function under the current flow Q, in Hertz; This represents the measured high-frequency band bandwidth, in Hertz (Hz). It represents the theoretical baseline spectral bandwidth generated by the continuous mapping function under the current flow Q, in Hertz. It is a dimensionless difference index. The larger the value, the further the measured spectrum deviates from the reference fingerprint, and the higher the possibility of leakage.

[0106] In the steps of coupling determination and risk level assessment, refer to Figure 3 The calibrated target deviation rate R' and the spectral difference are compared. A coupling determination is performed. The coupling determination uses an AND logic condition, meaning that a risk assessment result confirming a leak is only output when both indicators simultaneously meet their respective preset threshold conditions. The determination rules are as follows: If... and If the deviation rate is found to be positive, a leakage risk is confirmed. At this point, an on-site inspection work order is generated, and the corresponding risk level is matched based on the specific deviation rate value. In this embodiment, the deviation determination threshold... Take 50% as the difference judgment threshold Take 0.4. If but If the error is not confirmed, it is classified as a Type I suspected leak. This situation indicates an abnormal deviation rate but no confirmed abnormality in the spectrum, which may stem from model calibration deviation. In this case, a retest command is generated, and the valve closure operation is not performed. but If so, it is determined to be a second type of suspected leakage. This situation is characterized by abnormal spectrum but the deviation rate does not exceed the standard, which may be due to the meter itself or external interference. In this case, a meter equipment inspection work order is generated. If and If no leakage is detected, it is determined that there is no leakage and no warning is triggered.

[0107] In the dynamic scaling step of the decision threshold, the decision threshold is determined based on the bias included in the coupling decision condition under normal turbulent conditions according to the model confidence C. Dynamic scaling is applied. When the model confidence level C is greater than the first confidence threshold... When the threshold for bias is reached, it indicates that the statistical model is highly reliable, and the bias judgment threshold is set accordingly. Multiply by a tightening factor less than 1 To improve detection sensitivity. In this embodiment, Take 0.85, Set it to 0.7. When the model confidence C is less than the second confidence threshold. When the threshold for bias is reached, it indicates that the statistical model has low reliability. Multiply by a relaxation factor greater than 1 This is to suppress possible false alarms. In this embodiment, Take 0.5, Take 1.5. When the model confidence C is at... and When the deviation judgment threshold is between The threshold remains unchanged and no scaling is performed. When the flow is determined to be purely laminar, the model confidence level C is not applicable, the threshold remains at its initial value, and no dynamic scaling is performed. When the flow is determined to be an anomalous mixture or there is a calibration unreliability flag, the threshold is locked at its initial value and no adjustment is made.

[0108] In the leakage distance estimation step, after the coupling judgment outputs a risk assessment result for a suspected leak (Category I or II), the system enters diagnostic mode to perform leakage distance estimation in order to obtain more accurate leak location information. In diagnostic mode, the system immediately initiates a safety valve closure procedure and simultaneously performs leakage distance estimation during the step-by-step valve closure process. Specifically, the system controls the built-in valve of the smart gas meter to sequentially perform small-closing actions (e.g., sequentially adjusting to 80%, 60%, and finally fully closed), operating stably for 5 seconds at each opening level, during which high-frequency spectrum characteristics are continuously collected. Then, the rate of change κ of the high-frequency spectrum energy with flow rate under various flow conditions is calculated, and its calculation formula is:

[0109]

[0110] in, It represents the change in high-frequency spectrum energy between two flow conditions, and this amount is measured in any relative energy unit. This indicates the corresponding change in flow rate, expressed in cubic meters per hour. This represents the sensitivity of high-frequency spectral energy to flow rate; the larger the absolute value, the more drastic the change in spectral energy with flow rate. The physical mechanism of this step is that when the valve opening changes the flow rate in the pipeline, the pressure difference and leakage velocity at the leak point also change, leading to a change in the intensity of leakage turbulence noise. The closer the leak point is to the meter, the higher the efficiency of the valve opening change in regulating the pressure difference at the leak point, because the pressure drop loss along the pipeline is small, thus the higher the sensitivity of the leakage turbulence noise intensity to changes in flow rate. The farther the leak point is from the meter, the less energy of the regulating signal reaches the leak point after attenuation along the pipeline, and the lower the sensitivity. The calculated rate of change... The distance-sensitivity mapping curve obtained through offline calibration is compared with the distance-sensitivity mapping curve, and the distance range of the leak point relative to the smart gas meter is determined based on the comparison results. The larger the absolute value, the closer the leak point is to the meter. The smaller the absolute value, the farther the leak point is from the meter. In this embodiment, the distance range is divided into three intervals: near end, middle section, and far end, corresponding to 0 to 3 meters, 3 to 10 meters, and more than 10 meters, respectively, providing a priority ranking basis for on-site maintenance.

[0111] In the online incremental learning step of the benchmark fingerprint database, after each evaluation cycle, a decision is made based on the judgment result and physical state category to determine whether to include the current cycle's spectral data in the incremental learning of the benchmark fingerprint database. When the flow is determined to be pure laminar, regardless of the judgment result, the spectral data of the current cycle is discarded and does not participate in incremental learning. This is because in pure laminar flow, if the instantaneous flow rate... Greater than the minimum metering resolution It is possible that a leak has already occurred and the situation is abnormal. When the spectrum approaches zero, the effective information contained in the spectrum is extremely low, and neither case is suitable as a benchmark sample. When the flow is determined to be normal turbulence and the model confidence C is higher than the preset confidence threshold, and no leakage is confirmed, the spectrum data of the current period is included as a positive sample in the training set of the continuous mapping function. In this embodiment, the preset confidence threshold is 0.9. The spectrum data is assigned to the corresponding flow group according to the current flow value, and within each group, an exponentially weighted moving average fusion is performed using preset update weights.

[0112]

[0113] in, This indicates that the weight is updated; in this embodiment, it is set to 0.05. This represents the original reference spectrum centroid under flow Q; This represents the centroid of the spectrum measured in the current period. When the model confidence level C is lower than the preset confidence threshold, the current spectrum data is discarded and not included in the training set. Similarly, the current spectrum data is discarded when there is a calibration unreliability flag or when it is determined to be an anomalous mixture state.

[0114] In the cross-meter collaborative analysis step, spectral difference data of multiple smart gas meters within the same gas pressure regulating box or building area are acquired within the same time period. First, the fluid physical state category currently determined for each meter is used as the filtering condition; only meters in a pure laminar flow state are included in the collaborative analysis set, excluding meters currently in normal gas consumption to eliminate interference from normal gas consumption behavior on leak detection. Then, in the filtered collaborative analysis set, the time series variance of the spectral difference of each target gas meter within the sliding time window is calculated. This is used to characterize the stability of the abnormal states of each table; and to calculate the outlier degree of the current spectral dissimilarity of each table. This is used to characterize the degree of deviation of each meter from the group mean. In this embodiment, the sliding time window length is set to 7 days. This length is determined based on the gas meter sampling cycle and the response speed requirements for leak detection, and can cover short-term fluctuations while reflecting persistent anomalies.

[0115] Furthermore, the outlier is weighted using the reciprocal of the time series variance as a weighting factor to obtain the weighted outlier. The calculation formula is as follows:

[0116]

[0117] in, This represents the outlier degree of the i-th representation; This represents the time series variance of the i-th table; This represents the mean of the time series variances of all tables in the collaborative analysis set; To prevent small values ​​from being divided by zero, in this embodiment, we take... This weighting method makes persistently stable abnormal indicators, i.e. Smaller watches receive higher weighted outliers, while watches with intermittent fluctuations, i.e. Larger table weighting limits, a characteristic that matches leakage features. If weighted outlier... Exceeding the preset outlier threshold If so, it is determined that there is a gas leak within the household where the meter is located. In this embodiment, Take 3.0.

[0118] In the manual reporting exemption and tiered early warning handling process, before outputting the risk level, the system first retrieves the target user's special gas usage reporting records within the assessment period. Special gas usage reporting includes legally permitted excessive gas usage scenarios such as adding new heating equipment, increased gas consumption due to prolonged periods of guests staying at home, and gas usage during renovation and construction. Users pre-enter reporting information via mobile application or customer service hotline, including the reporting type, start date, and end date. If the current assessment date falls within a valid reporting period, the risk assessment is automatically exempted, and the gas usage is marked as legally excessive, without triggering any early warning, thus avoiding false alarms for legal gas usage.

[0119] If no valid report is found, differentiated early warning and handling operations will be executed based on the coupling determination and risk level assessment results. No early warning will be triggered if no leakage is determined. If the current flow is in a normal turbulent state and the model confidence level C is greater than [value missing], [further action will be taken]. The current spectrum data is used as a positive sample to update the baseline fingerprint database. When a low-risk warning is issued, a self-check reminder is pushed to the target user's mobile terminal. This message includes suggestions to check the stove valve and connecting hoses, but no maintenance work order is generated. When a medium-risk warning is issued, a warning message is simultaneously pushed to the target user's mobile terminal and the back-end system of the area's maintenance personnel, generating a work order pending verification, requiring a telephone follow-up confirmation within 24 hours. When a high-risk emergency alarm is issued, an emergency notification is immediately pushed to the grid member and the emergency repair team, generating an expedited on-site verification work order. At the same time, a remote valve shut-off command is sent to the smart gas meter's built-in valve through the IoT channel to cut off the gas supply.

[0120] refer to Figure 4 The present invention also provides a gas leak risk assessment system for implementing the above-mentioned gas leak risk assessment method, comprising the following modules.

[0121] The metering data acquisition module is used to acquire the metering gas consumption data of the smart gas meter. This data includes cumulative gas consumption, instantaneous flow rate, valve status, and meter online status. The data is uploaded in real time through the Internet of Things channel.

[0122] The gas consumption behavior modeling module is used to generate theoretical gas consumption benchmark values ​​based on a multi-factor weighted model. This module includes a basic fixed factor calculation unit, a time-dynamic factor calculation unit, a user history factor calculation unit, and a peer benchmarking factor calculation unit. The outputs of each unit are weighted and fused according to preset weights, and the weight coefficients are calibrated in real-time using spectral physical state feedback signals during operation.

[0123] The fluid dynamic disturbance signal acquisition module is used to collect fluid dynamic disturbance signals from smart gas meters. For diaphragm smart gas meters, this module utilizes a built-in MEMS accelerometer to acquire mechanical vibration signals. For ultrasonic smart gas meters, this module uses an existing ultrasonic transducer to acquire high-frequency jitter sequences of ultrasonic wave transit time.

[0124] The spectrum feature extraction module is used to perform fast Fourier transform on fluid dynamic disturbance signals and extract low-frequency and high-frequency spectrum features. The frequency bands are divided with cutoff frequencies of 200 Hz and 800 Hz.

[0125] The physical state determination module is used to determine the physical state category of the fluid in the current pipeline based on the spectral energy intensity of the low-frequency band spectral characteristics. The physical state category includes pure laminar flow, normal turbulent flow, and abnormal mixing.

[0126] The model calibration module executes differentiated weight calibration strategies based on the physical state category. Under pure laminar flow, this module forces the theoretical gas consumption baseline value to be set to the minimum metering resolution and resets the weights of user behavior-related factors to zero. Under normal turbulent flow, this module dynamically adjusts the weights and calculates the model confidence score based on the cross-validation results of the normal gas consumption component derived from the spectrum and the model predictions. Under abnormal mixed conditions, this module freezes weight updates. The module outputs the calibrated theoretical gas consumption baseline value and the model confidence score.

[0127] The flow-spectrum continuous mapping module is used to construct a continuous mapping function between flow rate and the baseline spectral fingerprint. This module uses piecewise cubic spline interpolation for fitting. When the flow is determined to be in a normal turbulent state, the model confidence level is higher than a preset confidence threshold, and there is no leakage, the module incorporates the current spectral data into online incremental learning. When the flow is determined to be in a pure laminar state, the current spectral data is discarded.

[0128] The coupling determination module is used to verify the physical consistency of the calibrated deviation rate based on the difference between the high-frequency band spectral characteristics and the reference spectral fingerprint, and outputs the leakage risk level assessment result when the coupling determination condition is met.

[0129] The threshold dynamic scaling module is used to dynamically scale the decision threshold of the coupling decision module based on the physical state category and model confidence level. This module does not perform scaling in pure laminar flow, performs scaling based on confidence level in normal turbulent flow, and locks the threshold in abnormal mixed flow.

[0130] The reporting exemption module is used to retrieve the target user's special gas usage reporting records during the assessment period. If the current assessment date is within the valid reporting period, the risk assessment will be exempted and no warning will be triggered.

[0131] The early warning and response module is used to perform corresponding early warning and response operations based on the leakage risk level assessment results. These operations include user terminal push notifications, operation and maintenance background alarms, work order generation, and remote valve shut-off command issuance.

[0132] A complete example of an abnormal mixed state is presented using a diaphragm smart gas meter located in a residential user's kitchen to illustrate the system behavior under abnormal mixed conditions. The user's gas appliances include a dual-burner stove and a gas water heater. Currently, it is the evening peak hour, and the user is cooking on the stove. Simultaneously, a tiny crack exists in the gas connection hose below the stove, causing a continuous, minor leak. The gas meter collects accelerometer signals at a sampling frequency of 2 kHz for a sampling time of 2 seconds. After performing a Fast Fourier Transform on the collected signals, low-frequency spectral features are extracted with a cutoff frequency of 200 Hz, and high-frequency spectral features are extracted with a cutoff frequency of 800 Hz. The spectral energy intensity E is calculated based on the low-frequency spectral features. In this embodiment, due to the superposition of low-frequency turbulence generated by stove combustion and additional disturbances caused by the leak, the vibration energy within the pipe is significantly enhanced and fluctuates violently, resulting in the calculated spectral energy intensity. .Will Compare with a preset threshold. In this embodiment, the first energy threshold... The preset value is 0.3, the second energy threshold. The default value is 0.7. Because... The physical state determination module outputs that the current physical state category is an abnormal mixed state.

[0133] Upon responding to the abnormal mixture state determination, the model calibration module performs the following calibration operations: Freezes all weight updates for the multi-factor weighted model. This freezes the base fixed factor weights in the user's multi-factor weighted model. Keep the current value of 0.3, user historical factor weight. Maintain a weight of 0.4 for similar benchmark factors. Maintain 0.3 without any adjustment. The calibrated target gas reference value. Equal to the initial predicted gas consumption baseline value In this embodiment, Cubic meters per hour. Output calibration untrusted flag to the evaluation layer. The decision threshold is locked to the initial value, i.e., the deviation decision threshold. Difference determination threshold No threshold scaling is performed. The spectral data for the current period is not included in the incremental learning queue of the benchmark fingerprint database and is discarded directly.

[0134] Although model calibration was frozen, coupling decisions still performed normally. Actual instantaneous flow rate. The initial forecast is 0.85 cubic meters per hour, which includes 0.50 cubic meters per hour of normal gas consumption by the stove and 0.35 cubic meters per hour of leakage. cubic meters per hour, after calibration cubic meters per hour. The deviation rate after calibration is calculated as follows:

[0135]

[0136] The calculation of the frequency band spectral difference is as follows:

[0137]

[0138] The coupling judgment module performs conditional judgments: 70% > 50% and 0.75 > 0.4. If both conditions are met simultaneously, a risk assessment result confirming the leak is output. This confirmation of the leak triggers a high-risk emergency alarm. The system pushes an emergency notification to the grid worker and the emergency repair team, generating an expedited on-site verification work order. After the emergency repair personnel arrive, they use a leak detector to find the leak point at the stove's connecting hose. After replacing the hose, the leak is eliminated.

[0139] This example demonstrates robustness under anomalous mixed states. Model calibration is frozen to prevent the statistical model from being contaminated by anomalous data, but the leak detection channel operates independently and still accurately outputs a confirmation of a leak. Due to the unreliability of the model, the threshold is not scaled, resulting in a slight decrease in detection sensitivity, but this does not affect the qualitative judgment result.

[0140] A complete example under pure laminar flow conditions is provided using a diaphragm smart gas meter located in a residential household as an example to detail the entire leak detection process under pure laminar flow conditions. The user was out that day, and no gas appliances were used in the house. The gas meter collected accelerometer signals at a sampling frequency of 2 kHz for a sampling time of 2 seconds. After performing a Fast Fourier Transform on the collected signals, low-frequency and high-frequency spectral features were extracted. The spectral energy intensity E was calculated based on the low-frequency spectral features. In this embodiment, since there was no gas usage, the airflow in the pipeline was static, and the sensor only collected weak background noise, resulting in extremely low low-frequency spectral energy intensity. The calculated... .Will With preset threshold Comparison. Since 0.12 < 0.3, the physical state determination module outputs the current physical state category as pure laminar flow.

[0141] A multi-factor weighted model was used to calculate the initial predicted gas consumption baseline. The user's house area is 80 square meters, with 3 permanent residents. Gas appliances include a double-burner stove and a gas water heater. It is currently summer, not a holiday, with an average daily temperature of 28 degrees Celsius. The calculated baseline gas consumption was... cubic meters per hour, time correction factor Historical gas consumption weighting value cubic meters per hour, corresponding correction value for similar benchmarks cubic meters per hour. Initial weights. , , Initial forecast gas consumption baseline value cubic meters per hour.

[0142] In response to the pure laminar flow state determination, the model calibration module performs the following calibration operations. The calibrated target gas reference value is then used. Forced setting to the minimum metering resolution cubic meters per hour. All weight coefficients in the multi-factor weighted model are set to zero, i.e. , , .

[0143] Actual instantaneous flow reading The flow rate is 0.04 cubic meters per hour, which is higher than the meter's minimum resolution, indicating an abnormal flow rate in the pipeline. The target deviation rate after calibration is calculated as follows:

[0144]

[0145] Since the statistical model has been completely bypassed, the model confidence level $C$ is not applicable, the decision threshold remains at its initial value, and no threshold scaling is performed. Spectral difference is calculated based on high-frequency spectral characteristics. The current actual flow rate $Q$ is 0.04 cubic meters per hour, calculated using a continuous mapping function. and Generate theoretical reference spectral centroid and theoretical reference spectrum bandwidth Measured spectral centroid Hertz, theoretical reference spectral centroid Hertz, measured spectral bandwidth Hertz, theoretical reference spectral bandwidth Hertz. The spectral difference is calculated as follows:

[0146]

[0147] The coupling determination module performs conditional judgments. ,but If the condition of "abnormal deviation rate but no confirmed abnormality in spectrum" is met, the first type of suspected leak assessment result is output, and a retest command is generated. After the repair personnel arrive, they use a leak detector to detect a trace leak at the meter's air inlet connector, confirming that the internal sealing ring of the meter is aging. The leak is eliminated after the meter is replaced. This example verifies the high sensitivity characteristics under pure laminar flow conditions. Although the spectral difference does not exceed the standard, the strategy of setting the theoretical benchmark to zero under pure laminar flow conditions results in a deviation rate as high as 1900%, and the output of the suspected leak judgment still effectively guides the inspection to find micro-leakage in the meter.

[0148] This example illustrates the dynamic adjustment effect of model confidence on the decision threshold under normal turbulent conditions, using a diaphragm smart gas meter in normal gas usage. The user uses a gas water heater for showering in the evening while the stove is off. The gas meter collects accelerometer signals at a sampling frequency of 2 kHz for 2 seconds. After performing a Fast Fourier Transform on the collected signals, low-frequency and high-frequency spectral features are extracted. The spectral energy intensity E is calculated based on the low-frequency spectral features. In this embodiment, the gas water heater generates regular low-frequency turbulence, and the low-frequency spectrum exhibits significant energy concentration, allowing for the calculation of the spectral energy intensity. .Will With preset threshold and Comparison. Due to The physical state determination module outputs that the current physical state category is normal turbulent state.

[0149] The model calibration module responds to the normal turbulent state determination and performs periodic decomposition to extract the normal gas consumption component. This includes analysis of low-frequency spectral characteristics. Autocorrelation analysis is performed to extract components from the autocorrelation function whose periodicity is stronger than a preset threshold. The total energy of the extracted periodic components is then calculated. Input a pre-calibrated mapping function To obtain the normal gas consumption amount Cubic meters per hour. Initial predictions from the multi-factor weighted model. cubic meters per hour. Cross-validation calculates prediction bias:

[0150]

[0151] Will Deviation threshold from preset Comparison. Since 0.038 < 0.15, the model prediction is consistent with spectrum perception, so the weight of historical factors is increased. .Original After adjustment Reduce in sync with the rules and Up to 0.28. The calibrated target gas reference value. cubic meters per hour. The model confidence level is calculated as follows:

[0152]

[0153] Second confidence threshold Comparison. Since 0.957 > 0.85, the statistical model is highly reliable, and threshold scaling is performed. Bias judgment threshold. Multiply the initial value by 50% of the tightening factor. After scaling Actual instantaneous flow rate reading The flow rate is 0.60 cubic meters per hour. The target deviation rate after calibration is calculated as follows:

[0154]

[0155] The calculation of the high-frequency band spectral difference is as follows: The coupling determination module performs conditional judgments. If R' does not meet the deviation judgment threshold condition after tightening, a judgment result without leakage is output. If threshold scaling is not performed in this embodiment, Keep it at 50%. The output also shows no leakage. However, in scenarios with minor leakage, the tightened threshold of 35% can capture early leakage signals with a deviation rate of 40%, while the unscaled threshold of 50% will miss this early leakage. This example verifies the confidence-driven threshold scaling mechanism under normal turbulent conditions. When the model is reliable, tightening the threshold improves detection sensitivity, and when the model is unreliable, widening the threshold suppresses false alarms, achieving adaptive detection.

[0156] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments, and various changes and modifications can be made without departing from the spirit and scope of the invention, all of which fall within the scope of protection claimed by the present invention. The scope of protection of the present invention is defined by the appended claims and their equivalents.

Claims

1. A method for assessing the risk of gas leakage, characterized in that, Includes the following steps: Acquire the target user's basic profile data, historical gas consumption time series data, actual gas consumption data for the current metering cycle, and fluid dynamic disturbance signals; Based on the user's basic profile data, historical gas consumption time series data, and environmental parameters at the current time, a multi-factor weighted model is invoked to calculate the initial predicted gas consumption baseline value for the target user in the current metering cycle; The fluid dynamic disturbance signal is subjected to spectral transformation to extract low-frequency and high-frequency spectral features; Based on the low-frequency spectral characteristics, the current physical state category of the fluid in the pipeline is determined, and a differentiated calibration strategy is applied to the weight parameters of the multi-factor weighted model according to the current physical state category to obtain the calibrated target gas consumption benchmark value. Calculate the target deviation rate between the actual gas consumption data and the target gas consumption benchmark value, and calculate the spectral difference between the high-frequency band spectral characteristics and the benchmark spectral fingerprint corresponding to the current flow rate; When both the target deviation rate and the spectral difference meet the preset coupling judgment conditions, the gas leakage risk level of the target user is determined.

2. The method according to claim 1, characterized in that, The step of calculating the initial predicted gas consumption baseline value for the target user in the current metering cycle based on the user's basic profile data, historical gas consumption time series data, and environmental parameters at the current time, using a multi-factor weighted model, specifically includes: Based on the house area, number of permanent residents and list of gas equipment in the user basic profile data, the basic gas consumption base is determined; Determine the time correction factor based on the season identifier, average daily temperature, and holiday identifier corresponding to the current time; Based on the historical gas consumption average within a preset time window in the historical gas consumption time series data, the historical gas consumption weight value is determined. Based on the average gas consumption of similar users with the same basic user profile data as the target user, determine the similar benchmarking correction value; The initial predicted gas consumption baseline value is obtained by weighting and fusing the basic gas consumption base, time correction coefficient, historical gas consumption weight value, and similar benchmark correction value.

3. The method according to claim 1, characterized in that, The determination of the current physical state category of the fluid in the pipeline based on the low-frequency spectral characteristics specifically includes: Calculate the spectral energy intensity of the low-frequency band spectral characteristics; If the energy intensity of the low-frequency band spectrum is less than the first energy threshold, then the current physical state category is determined to be pure laminar flow. If the low-frequency spectrum energy intensity is greater than or equal to the first energy threshold and less than the second energy threshold, then the current physical state category is determined to be normal turbulent state; If the low-frequency band spectral energy intensity is greater than or equal to the second energy threshold, the current physical state category is determined to be an abnormal mixed state.

4. The method according to claim 3, characterized in that, The step of performing a differentiated calibration strategy on the weight parameters of the multi-factor weighted model according to the current physical state category to obtain the calibrated target gas consumption benchmark value specifically includes: When the flow is determined to be pure laminar flow, the initial predicted gas consumption benchmark value is forcibly set to the minimum metering resolution of the meter, and the weight coefficients in the multi-factor weighted model are set to zero. When the flow is determined to be in a normal turbulent state, the low-frequency spectral features are periodically decomposed to extract the normal gas consumption component. The specific method of periodic decomposition is as follows: autocorrelation analysis is performed on the low-frequency spectral features to extract the component with a periodicity stronger than a preset threshold in the autocorrelation function as the normal gas consumption component, or short-time Fourier transform is performed on the low-frequency spectral features to extract the spectral components with stable periodic patterns in the time-frequency domain as the normal gas consumption component; the prediction deviation between the normal gas consumption component and the initial predicted gas consumption benchmark value is calculated, and the weight coefficients of the multi-factor weighted model are adjusted according to the prediction deviation to obtain the target gas consumption benchmark value; When an abnormal mixed state is determined, the weight update of the multi-factor weighted model is frozen, and the initial predicted gas consumption benchmark value is used as the target gas consumption benchmark value.

5. The method according to claim 4, characterized in that, The method further includes: When the flow is determined to be in a normal turbulent state, the model confidence level is calculated based on the difference between the target gas consumption reference value and the normal gas consumption component. The deviation judgment threshold included in the coupling judgment condition is dynamically scaled based on the model confidence level. Specifically, when the model confidence level is greater than or equal to the first confidence threshold, the deviation determination threshold is multiplied by a tightening factor less than 1; when the model confidence level is less than or equal to the second confidence threshold, the deviation determination threshold is multiplied by a relaxation factor greater than 1; when the model confidence level is greater than the second confidence threshold and less than the first confidence threshold, the deviation determination threshold remains unchanged; the first confidence threshold is greater than the second confidence threshold.

6. The method according to claim 5, characterized in that, The calculation of the spectral difference between the high-frequency band spectral features and the reference spectral fingerprint corresponding to the current traffic specifically includes: Based on the continuous mapping function of traffic and spectral fingerprint, a theoretical reference spectral centroid and a theoretical reference spectral bandwidth are generated according to the current actual traffic. The continuous mapping function is fitted using piecewise cubic spline interpolation. Calculate the first relative difference between the measured high-frequency band spectral centroid and the theoretical reference spectral centroid, and the second relative difference between the measured high-frequency band spectral bandwidth and the theoretical reference spectral bandwidth; The sum of the first relative difference and the second relative difference is determined as the spectral difference degree; The step of determining the gas leakage risk level of the target user when both the target deviation rate and the spectral difference meet the preset coupling judgment conditions specifically includes: if the target deviation rate is greater than the deviation judgment threshold and the spectral difference is greater than the difference judgment threshold, then the gas leakage risk level is determined to be a confirmed leakage risk.

7. The method according to claim 6, characterized in that, After the risk assessment result of suspected leakage is output, the system triggers the safety valve closing procedure and performs the leakage distance estimation step during the step-by-step valve closing process: By controlling the built-in valve of the smart gas meter to gradually reduce the opening to different flow conditions, the high-frequency spectrum characteristics are collected respectively, and the rate of change of high-frequency spectrum energy with flow rate κ under each flow condition is calculated. The rate of change κ is compared with a pre-calibrated distance-sensitivity mapping curve. Based on the comparison results, the distance range of the leak point relative to the smart gas meter is determined. The larger the absolute value of the rate of change κ, the closer the leak point is to the meter. The smaller the absolute value of the rate of change κ, the farther the leak point is from the meter.

8. The method according to claim 6, characterized in that, The method further includes: When constructing or updating the continuous mapping function between the flow rate and the spectral fingerprint, if the flow is determined to be in a pure laminar state, the spectral data of the current period is discarded; if the flow is determined to be in a normal turbulent state and the confidence level of the model is higher than the preset confidence threshold and no leakage is confirmed, the spectral data of the current period is included as a positive sample in the training set of the continuous mapping function.

9. The method according to claim 1, characterized in that, The method further includes: Obtain spectral difference data of multiple target gas meters within the same associated area; Using the physical state category of pure laminar flow as a screening criterion, a collaborative analysis set is determined from the multiple target gas tables; Calculate the time series variance of the spectral differences of each target gas meter in the collaborative analysis set within a sliding time window. The length of the sliding time window is determined based on the sampling period of the gas meter and the response speed requirements for leak detection. Using the reciprocal of the time series variance as a weighting factor, the outlier of the spectral difference of each target gas meter is weighted to obtain the weighted outlier. If the weighted outlier exceeds a preset outlier threshold, it is determined that the corresponding target gas meter has a gas leak.

10. A gas leak risk assessment system, characterized in that, include: The data acquisition module is used to acquire the target user's basic profile data, historical gas consumption time series data, actual gas consumption data of the current metering cycle, and fluid dynamic disturbance signals; The gas consumption behavior modeling module is used to calculate the initial predicted gas consumption benchmark value by calling a multi-factor weighted model based on the user basic profile data, historical gas consumption time series data and environmental parameters at the current time. The spectrum feature extraction module is used to perform spectrum transformation on the fluid dynamic disturbance signal and extract low-frequency and high-frequency spectrum features. The physical state determination module is used to determine the current physical state category of the fluid in the pipeline based on the low-frequency band spectral characteristics. The model calibration module is used to perform a differentiated calibration strategy on the weight parameters of the multi-factor weighted model according to the current physical state category, so as to obtain the calibrated target gas consumption benchmark value. The coupling determination module is used to calculate the target deviation rate between the actual gas consumption data and the target gas consumption benchmark value, and to calculate the spectral difference between the high-frequency band spectral characteristics and the benchmark spectral fingerprint corresponding to the current flow rate; when both the target deviation rate and the spectral difference meet the preset coupling determination conditions, the gas leakage risk level of the target user is determined. The early warning and response module is used to perform corresponding early warning and response operations based on the leakage risk level assessment results.