Long-time continuous gas consumption alarm detection method and system for intelligent diaphragm gas meter

By calculating the Hall pulse interval flow rate of the diaphragm gas meter and introducing the pulse timeout flow rate, the problem of false alarms and missed alarms in long-term gas consumption detection of the diaphragm gas meter was solved, achieving accurate gas consumption alarms and reducing the accident rate and cost.

CN122016012APending Publication Date: 2026-05-12ZHEJIANG WEIXING INTELLIGENT METER STOCK
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHEJIANG WEIXING INTELLIGENT METER STOCK
Filing Date
2025-12-31
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing diaphragm gas meters cannot accurately measure flow rate, leading to false alarms and missed alarms during long-term gas usage detection. This results in an inability to promptly reflect users' gas usage and poses a safety hazard.

Method used

By calculating the time interval between two adjacent Hall pulses, the current pulse interval flow rate is determined. Combined with the preset flow rate range and error range, the timer accuracy is dynamically switched, and the pulse timeout flow rate is introduced for auxiliary judgment, so as to realize the long-term gas consumption alarm detection from the meter end.

Benefits of technology

It reduced false alarm and false alarm rates, decreased safety incidents, ensured gas safety for users, reduced costs, and improved the accuracy and timeliness of gas detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122016012A_ABST
    Figure CN122016012A_ABST
Patent Text Reader

Abstract

The invention discloses a long-time continuous gas consumption alarm detection method and system for an intelligent diaphragm gas meter, and the method comprises the steps: S1, calculating the current pulse interval flow velocity Vp of the gas meter according to the time interval between two adjacent Hall pulses; s2, judging whether the current pulse interval flow velocity Vp is within a preset continuous air flow velocity monitoring range or not, and if not, executing the step S5; if yes, executing the step S3; s3, judging whether the current pulse interval flow velocity Vp is within the redundancy error range of the datum point flow velocity or not, and if not, executing the step S5; if yes, the continuous gas consumption time Ttotal is accumulated, and the step S4 is executed; s4, judging whether the accumulated continuous gas use time Ttotal reaches a preset continuous gas use alarm time threshold value or not, and if not, executing the step S1 again; if yes, alarm and valve closing operation is executed; and S5, the reference flow velocity is updated to be the pulse interval flow velocity value for triggering the judgment, the continuous gas consumption time Ttotal is reset, and the step S1 is executed again.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of gas meter measurement technology, and in particular to a method and system for detecting long-term continuous gas consumption alarms for intelligent diaphragm gas meters. Background Technology

[0002] With social development, gas appliances are becoming increasingly common in homes. However, in recent years, gas safety accidents have also become more frequent. There are frequent cases where residents forget to turn off their gas appliances and leave the area, causing the appliances to burn dry for extended periods, leading to fires and other safety incidents. Therefore, the ability of gas meters to have a long-term, continuous gas usage alarm detection function is particularly important.

[0003] In the current industry technology, the method to determine whether a user has been using gas for a long time is usually to detect whether the flow rate of the meter is constant over a period of time. However, diaphragm gas meters cannot accurately measure the gas flow rate like ultrasonic gas meters, and their measurement method of obtaining signals through Hall pulses cannot reflect the user's gas usage in a timely manner. Therefore, under the current technical conditions, the alarm methods of diaphragm gas meters for detecting whether a user has been using gas for a long time will basically have the problems of missed alarms and false alarms.

[0004] Therefore, in view of the above-mentioned technical problems, the present invention proposes a method and system for detecting long-term continuous gas consumption alarm of intelligent diaphragm gas meter. Summary of the Invention

[0005] The purpose of this invention is to address the shortcomings of existing technologies by providing a method and system for detecting long-term continuous gas usage alarms in intelligent diaphragm gas meters. This detection scheme, which requires no additional sensors, is low-cost, and determines the user's gas usage habits solely from the meter, can greatly reduce false alarms and missed alarms in long-term gas usage detection of diaphragm gas meters.

[0006] To achieve the above objectives, the present invention adopts the following technical solution: A method for detecting long-term continuous gas consumption alarms in a smart diaphragm gas meter, comprising: Step S1. Calculate the current pulse interval flow rate V of the gas meter based on the time interval between two adjacent Hall pulses. p ; Step S2. Determine the current pulse interval flow velocity V p Is it within the preset continuous airflow rate monitoring range? If not, proceed to step S5; if yes, proceed to step S3. Step S3. Determine the current pulse interval flow velocity V p Is it within the redundancy error range of the reference point flow rate? If not, proceed to step S5; if yes, determine that the current pulse is a continuous gas consumption pulse, and accumulate the continuous gas consumption time T. total And execute step S4; Step S4. Determine the cumulative continuous gas usage time T total If the preset continuous gas consumption alarm time threshold has been reached, if not, step S1 is executed again; if so, it is determined to be an abnormal continuous gas consumption for a long time, and an alarm and valve shut-off operation is performed. Step S5. Update the reference flow rate to the pulse interval flow rate value that triggered this judgment, and set the continuous gas usage time T. total Clear the cache and repeat step S1.

[0007] Furthermore, in step S1, the current pulse interval flow rate V p , represented as: V p = (S×3600) / t1; Where S represents the gas volume corresponding to a single Hall pulse; t1 represents the time interval between two adjacent Hall pulses.

[0008] Furthermore, the redundancy error range of the reference point flow velocity in step S3 is expressed as follows: V3=V ref -V ref ×α; V4=V ref +V ref ×α; Where V3 represents the lower limit of the redundancy error range of the reference point flow velocity; V4 represents the upper limit of the redundancy error range of the reference point flow velocity; V ref α represents the reference point flow velocity; α represents the set flow velocity fluctuation.

[0009] Furthermore, the procedure before step S2 includes: Obtain the pulse timeout velocity V out Determine the pulse timeout flow velocity V out If the flow rate exceeds the lower limit V3 of the redundancy error range of the reference point, proceed to step S5; otherwise, continue to step S2.

[0010] Furthermore, the pulse timeout velocity V out , represented as: V out = (S×3600) / t2; Where t2 represents the time elapsed from the last Hall pulse trigger moment to the current judgment moment.

[0011] Furthermore, the timer precision used for timing is dynamically switched based on the time interval t1 between two adjacent Hall pulses, or based on the time t2 that has elapsed from the last Hall pulse trigger moment to the current judgment moment; wherein the timer precision includes millisecond-level timers and second-level timers.

[0012] Furthermore, step S1 also includes: When gas flow is first detected, the current pulse interval flow velocity V calculated for the first time will be used. p Set as the initial reference flow velocity V ref .

[0013] Furthermore, the triggering condition for the pulse interval flow rate value that triggers this judgment in step S5 is: Execute the pulse timeout judgment flow velocity V out Is the pulse timeout velocity V greater than the lower limit of the redundancy error range of the reference point flow velocity V3? out ; Alternatively, the current pulse interval flow rate V can be used when executing steps S2 and S3. p .

[0014] Furthermore, step S1 is executed by a first task, which is an interrupt service task triggered in response to each Hall pulse; steps S2-S5 are executed by a second task, which is a background task periodically triggered by an independent timer.

[0015] Correspondingly, a long-term continuous gas consumption alarm detection system for a smart diaphragm gas meter is also provided, including: The calculation module is used to calculate the current pulse interval flow rate V of the gas meter based on the time interval between two adjacent Hall pulses. p ; The first judgment module is used to determine the current pulse interval flow velocity V. p Is it within the preset continuous airflow rate monitoring range? The second judgment module determines the current pulse interval flow velocity V. p Is it within the redundancy error range of the reference point flow velocity? The third judgment module determines the cumulative continuous gas usage time T. total Has the preset continuous gas consumption alarm time threshold been reached? The update module is used to update the reference flow rate to the pulse interval flow rate value that triggered this judgment, and to set the continuous gas usage time T. total Reset to zero.

[0016] Compared with existing technologies, this invention determines whether a user is using gas continuously for a long time from the source of the meter, reducing the gas safety accident rate and the cost of gas safety early warning. Moreover, it can minimize the occurrence of false alarms based on the characteristics of the membrane meter, ensuring a good gas usage experience for residential users while maximizing gas safety. Attached Figure Description

[0017] Figure 1This is a flowchart of a long-term continuous gas consumption alarm detection method for an intelligent diaphragm gas meter provided in Embodiment 1; Figure 2 This is an overall flowchart of a long-term continuous gas consumption alarm detection method for an intelligent diaphragm gas meter provided in Embodiment 1. Detailed Implementation

[0018] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that, unless otherwise specified, the following embodiments and features described therein can be combined with each other.

[0019] The purpose of this invention is to address the shortcomings of existing technologies by providing a method and system for detecting long-term continuous gas consumption alarms in intelligent diaphragm gas meters.

[0020] Example 1

[0021] This embodiment provides a method for detecting long-term continuous gas consumption alarms in a smart diaphragm gas meter, such as... Figure 1-2 As shown, it includes: Step S1. Calculate the current pulse interval flow rate V of the gas meter based on the time interval between two adjacent Hall pulses. p ; Step S2. Determine the current pulse interval flow velocity V p Is it within the preset continuous airflow rate monitoring range? If not, proceed to step S5; if yes, proceed to step S3. Step S3. Determine the current pulse interval flow velocity V p Is it within the redundancy error range of the reference point flow rate? If not, proceed to step S5; if yes, determine that the current pulse is a continuous gas consumption pulse, and accumulate the continuous gas consumption time T. total And execute step S4; Step S4. Determine the cumulative continuous gas usage time T total If the preset continuous gas consumption alarm time threshold has been reached, if not, step S1 is executed again; if so, it is determined to be an abnormal continuous gas consumption for a long time, and an alarm and valve shut-off operation is performed. Step S5. Update the reference flow rate to the pulse interval flow rate value that triggered this judgment, and set the continuous gas usage time T. total Clear the cache and repeat step S1.

[0022] The smart diaphragm gas meter in this embodiment includes a diaphragm gas metering mechanism, a Hall sensor, a microcontroller, a second timer A, a millisecond timer B (e.g., 10ms), a valve control module, a communication module, a clock module, etc.

[0023] The diaphragm gas metering mechanism is the core mechanical part located inside the gas meter housing, in the airflow channel between the gas inlet and outlet. It uses gas pressure to drive the diaphragm to reciprocate, converting the gas volume into mechanical rotation output.

[0024] The Hall sensor is installed near the diaphragm gas metering mechanism, usually on a PCB board or a dedicated bracket. It is used to detect the rotation of the magnet and output a pulse signal. Each pulse corresponds to a gas volume S=0.01 liters (it should be noted that this value is the design constant of the diaphragm meter and can be adjusted according to different models).

[0025] The microcontroller (MCU) is a low-power microcontroller mounted on the main control PCB board, usually located in the moisture-proof and sealed area inside the casing. It runs embedded programs and is responsible for pulse processing, flow rate calculation, time accumulation, and logical judgment.

[0026] The second timer A and the millisecond timer B are both integrated inside the microcontroller.

[0027] The valve control module is located near the gas outlet of the gas meter. It is usually a solenoid valve or a motor valve and is connected to the main PCB through wires. It receives instructions from the microcontroller and executes the gas on / off switch.

[0028] Valve control module: Solenoid valve or motor valve, used for emergency gas supply cut-off.

[0029] The communication module is usually a separate PCB board (such as an NB-IoT module), installed next to the main PCB or in a dedicated area inside the meter housing. It communicates with the gas management platform to report alarm information to the gas company's cloud platform.

[0030] The clock module is integrated inside the microcontroller or connected to an external RTC chip to provide accurate real-time time for timing and task scheduling.

[0031] The execution of this embodiment is completed by two tasks working together. The first task is the Hall pulse detection task T1, which responds to the interrupt service routine triggered by each Hall pulse. The second task is the continuous gas consumption detection task T2, which is a background task triggered by an independent timer and has an execution cycle of 1 minute.

[0032] In step S1, the current pulse interval flow rate V of the gas meter is calculated based on the time interval between two adjacent Hall pulses. p .

[0033] In this embodiment, step S1 further includes: when gas flow is detected for the first time, the initially calculated current pulse interval flow velocity V is... p Set as the initial reference flow velocity V ref .

[0034] The gas meter has an internal status flag to indicate whether the reference flow rate has been initialized. When the gas meter is powered on for the first time, or restarted after a reset or power failure, the status flag is in an uninitialized state. Alternatively, if the gas meter has no gas flow for more than a preset time (e.g., 24 hours), the system will automatically set the status flag to an uninitialized state to trigger the relearning of the reference flow rate.

[0035] When the status flag is uninitialized, the microcontroller enters the reference flow rate initialization preparation mode. In this mode, the microcontroller continuously monitors the pulse signal output by the Hall sensor. When the microcontroller detects the first Hall pulse, it first checks whether a second timer A or a 10ms timer B is already enabled. If neither second timer A nor 10ms timer B is detected, then second timer A is immediately enabled, and the first time point T of the pulse generation is immediately recorded by second timer A. start Recording the first time point T start Then, continue waiting for the second Hall pulse. When the second Hall pulse is detected, record the second time point T at which it is generated. end .

[0036] Calculate the first time point T start With the second time point T end The time difference between them gives the first pulse interval time t. 1A =T end -T start .

[0037] If t 1A If the pulse interval is less than 36 seconds, the current flow rate is considered relatively fast (greater than 1 m³ / h). At this point, to obtain a more precise pulse interval, a switching operation is performed: the second timer A is stopped, and the 10ms timer B is started. The 10ms timer B will read a value T in 10-millisecond increments. new_start Continue waiting for the third Hall pulse. When the third Hall pulse is detected, record the second time point T at which it is generated. new_end .

[0038] Calculate time point T new_start With time point T new_end The time difference between them gives the first pulse interval time t. 1B =T new_end -T new_startConvert this value to seconds t1=t 1B After multiplying by 0.01, the current pulse interval flow rate V of the gas meter is calculated based on the initial pulse interval time t1. p , represented as: V p =(S×3600) / t1=(0.01×3600) / t1; Where S represents the gas volume corresponding to a single Hall pulse.

[0039] If t 1A If the current flow rate is ≥36s, it is determined that the current flow rate is slow. In this case, there is no need to switch timers; the t recorded by the second timer A can be used directly. 1A That is, t1=t 1A The current pulse interval flow rate V of the gas meter is calculated based on the initial pulse interval time t1. p , represented as: V p =(S×3600) / t1=(0.01×3600) / t1; If the microcontroller has not executed the minute timer task T2, then the calculated first valid current pulse interval flow rate V will be used. p Directly assign the value to the reference flow velocity variable V ref That is, let V ref =V p This setup operation occurs after the system is in baseline learning mode and has successfully passed the initial flow rate validity verification.

[0040] After completing the initial reference flow velocity V ref After the settings are complete, the system enters a normal operation detection loop and continues to apply a dynamic timer switching strategy to optimize power consumption. If a 10ms timer B is currently being used for measurement, and the pulse interval t1 obtained from a certain measurement is too long, for example, its original count t... 1B If the flow rate is ≥40000 (corresponding to approximately 40 seconds, flow rate <0.9 m³ / h), then the flow rate is considered to have dropped to a very low level. At the start of the next metering cycle, the system will actively switch back to second timer A to reduce the power consumption caused by the high-frequency timer operation. Conversely, if t is found when using second timer A... 1A If the time is less than 36 seconds again, switch back to the high-precision timer B. By intelligently selecting the most suitable timing accuracy based on the actual flow rate, the system reads the current system time and the time of the previous pulse each time a pulse is triggered, thereby obtaining the pulse interval time, and then calculating the current pulse interval flow rate V based on the pulse interval time. p .

[0041] Next, if the microcontroller executes the minute timer task T2 once per minute, it will perform the following operations, which will pre-store the externally set continuous gas flow rate detection range (V1~V2), the reference point flow rate redundancy error range (V3~V4), the preset flow rate fluctuation value α (percentage), and the preset alarm time threshold T. alarm Wherein, the lower limit of the redundancy error of the reference point flow velocity is V3=V ref -V ref *α, upper limit of redundancy error for reference point flow velocity V4=V ref +V ref *α; V1 is the minimum upper limit of the gas meter's flow rate, for example, V2 is the maximum flow rate Q of the gas meter. max 1.2 times; T alarm =480 minutes = 8 hours.

[0042] In this embodiment, before step S2, the method further includes: obtaining the pulse timeout flow rate V. out Determine the pulse timeout flow velocity V out If the flow rate exceeds the lower limit V3 of the redundancy error range of the reference point, proceed to step S5; otherwise, continue to step S2.

[0043] Diaphragm gas meters measure gas volume using Hall pulses. When the gas flow rate is low (e.g., 0.01 m³ / h), the time required to flow through the standard volume of 0.01 liters needed to generate a single pulse can be very long.

[0044] In existing detection methods, task T2 is executed once per minute, and one of the core criteria for its judgment is the current pulse interval flow rate V. p V p The calculation depends on the most recent complete pulse interval time t1. This means that at low flow rates, the system must wait for a complete pulse interval, which may take tens of minutes or even hours, to end before obtaining a new V. p The value is used for judgment.

[0045] Assuming the current reference flow velocity V ref The corresponding pulse interval is 100 seconds. If the flow rate decreases slightly, the actual pulse interval will extend to 125 seconds. Task T2 needs to wait 125 seconds for a new pulse to arrive and calculate V. p Only then can we determine the V. p Is it still within the baseline redundancy error range? During the 125 seconds of waiting (more than 2 minutes), even though the gas has been continuously used at a near-constant low flow rate, the system lacks a new V... p The data is insufficient to determine continuous gas usage within a minute-by-minute task, thus preventing the accumulation of continuous gas usage time. This leads to significant delays and a high risk of missed detections in the assessment of low-flow continuous gas usage.

[0046] To overcome the detection blind spot caused by waiting for a complete pulse interval in existing methods, this embodiment introduces a pulse timeout velocity V in task T2. out As an auxiliary judgment parameter, V out It is an instantaneous flow velocity value estimated based on the time elapsed since the previous pulse was triggered.

[0047] At the execution time of each minute task T2, obtain the current time T. now With the most recent Hall pulse trigger time T last Time difference t2=T now -T last (Unit: seconds), therefore the pulse timeout velocity V out Represented as: V out = (S×3600) / t2; Where t2 represents the time elapsed from the last Hall pulse trigger moment to the current judgment moment.

[0048] V out This represents the flow rate value that would be inferred from the current waiting time t2 if the next pulse were to occur at this very moment. It provides a continuous flow rate estimate during the waiting period for a new pulse.

[0049] This embodiment introduces V out Subsequently, the decision-making logic for task T2 was enhanced. In each minute-long task, V was first calculated. out If V out If the flow rate is ≤V3, it indicates that the flow rate has significantly fallen below the baseline, and gas usage may have stopped or decreased substantially. In this case, proceeding to step S5 will immediately reset the accumulated continuous gas usage time T to zero. total and V out Set as the new baseline V ref V ref =V out This greatly speeds up the response to gas supply stoppages, eliminating the need to wait for the next pulse.

[0050] In scenarios with continuous low-flow gas consumption, V out A flow rate reference available during the pulse interval is provided. The logic for task T2 can be adjusted so that V... out >V3, V out If V1 > V1 and there are no other exceptions, then step S2 can be continued, even if there is no new V. p The data may still tend to maintain the assumption of continuous gas consumption, thus allowing for a cumulative time T. total The normal accumulation within certain minute intervals effectively alleviates the problem of stagnation in the accumulation time caused by long pulse intervals.

[0051] This embodiment introduces a pulse timeout velocity V. out During the interval of waiting for the pulse, it is no longer in a state of no data to judge, but instead uses V out Continuous monitoring is enabled. Judgments regarding gas usage interruptions or significant changes are no longer limited to pulse intervals, achieving near real-time status awareness. For continuous low-flow gas usage, the cumulative time interruptions caused by waiting for pulses are reduced, making safety mechanisms such as the 8-hour alarm threshold more reliable.

[0052] In step S2, the current pulse interval flow rate V is determined. p Is it within the preset continuous airflow rate monitoring range? If not, proceed to step S5; if yes, proceed to step S3.

[0053] Determine the current V p Is it within (V1~V2)? If V p If the flow rate is outside this range, it is determined to be an abnormal flow rate (such as a sudden large flow rate or interference pulse). Step S5 is executed, that is, the cumulative time of continuous gas consumption by the user is reduced to zero, and the flow rate V between the pulse intervals is set to zero. p Set the new continuous gas reference point flow rate V ref At this time, V ref =V p If V p If the user's gas usage is within this range, it indicates that the user has used gas steadily within that minute and has not operated the gas equipment. Proceed to step S3.

[0054] In step S3, the current pulse interval flow rate V is determined. p Is it within the redundancy error range of the reference point flow rate? If not, proceed to step S5; if yes, determine that the current pulse is a continuous gas consumption pulse, and accumulate the continuous gas consumption time T. total Then proceed to step S4.

[0055] Determine the current pulse interval flow velocity V p Whether it is within (V3~V4), if V p If the user's gas usage is within this range, it indicates that the user's gas consumption has been stable within that minute and no gas equipment has been operated. Therefore, the user's cumulative gas consumption time is incremented by one minute, and the process waits for the next minute's task to re-evaluate and execute the cumulative continuous gas consumption time T. total =T total +1 (minutes), and proceed to step S4; if V p If the user's gas usage time is not within this range, then proceed to step S5, which involves resetting the cumulative time of continuous gas consumption to zero and setting the pulse interval flow rate V. p Set the new continuous gas reference point flow rate V ref At this time, V ref =V p.

[0056] In step S4, the cumulative continuous gas usage time T is determined. total If the preset continuous gas consumption alarm time threshold has been reached, if not, step S1 is executed again; if so, it is determined to be an abnormal continuous gas consumption for a long time, and an alarm and valve closing operation is performed.

[0057] Determine the cumulative continuous gas usage time T total Has the preset alarm time threshold T been reached? alarm The threshold T alarm The reasonable maximum time setting is based on the continuous gas consumption of the household (such as stewing soup or slow cooking).

[0058] If T total ≥T alarm If the system determines that the gas usage is abnormal and has been running for an extended period, it will trigger an audible and visual alarm, close the control valve, and report the alarm information (meter ID, alarm time, duration, and average flow rate) through the communication module.

[0059] If T total <T alarm If the test fails, return to step S1 to continue the detection.

[0060] In step S5, the reference flow rate is updated to the pulse interval flow rate value that triggered this judgment, and the continuous gas usage time T is set. total Clear the cache and repeat step S1.

[0061] The trigger condition for this judgment, which is the pulse interval flow velocity value, is: Timeout judgment V out ≤V3, meaning the pulse timeout value V is used for judgment. out Is the pulse timeout velocity V greater than the lower limit of the redundancy error range of the reference point flow velocity V3? out .

[0062] V p Not within the range (V1~V2), and V p Not in (V3~V4), that is, during the execution of steps S2 and S3, the current pulse interval flow rate V. p .

[0063] Based on the above judgment conditions, the reference point flow velocity V ref Updated to the flow rate value V that triggered this judgment. out or V p And reset the accumulated time T to zero. total =0, restart the detection process.

[0064] Compared with existing technologies, this embodiment determines whether a user is using gas continuously for a long time from the source at the meter end, reducing the gas safety accident rate and lowering the cost of gas safety early warning. Moreover, it can minimize the occurrence of false alarms based on the characteristics of the membrane meter, ensuring a good gas usage experience for residential users while maximizing user gas safety.

[0065] Correspondingly, a long-term continuous gas consumption alarm detection system for a smart diaphragm gas meter is also provided, including: The calculation module is used to calculate the current pulse interval flow rate V of the gas meter based on the time interval between two adjacent Hall pulses. p ; The first judgment module is used to determine the current pulse interval flow velocity V. p Is it within the preset continuous airflow rate monitoring range? The second judgment module determines the current pulse interval flow velocity V. p Is it within the redundancy error range of the reference point flow velocity? The third judgment module determines the cumulative continuous gas usage time T. total Has the preset continuous gas consumption alarm time threshold been reached? The update module is used to update the reference flow rate to the pulse interval flow rate value that triggered this judgment, and to set the continuous gas usage time T. total Reset to zero.

[0066] Example 2

[0067] The difference between the long-term continuous gas consumption alarm detection method for a smart diaphragm gas meter provided in this embodiment and that in Embodiment 1 is: This embodiment illustrates the method using a specific numerical value.

[0068] The pulse interrupt task (T1) is an external interrupt service routine triggered by a Hall pulse and has the highest execution priority.

[0069] The minute-based scheduled task (T2) is triggered by an RTC alarm event and is executed once every minute. It has a low execution priority.

[0070] Assuming a smart diaphragm gas meter is installed in a user's home, a single pulse corresponds to a gas volume S = 0.01 liters = 0.00001 cubic meters, the flow rate fluctuation percentage α = 10% = 0.1, and the continuous gas consumption alarm threshold T... alarm = 480 minutes (8 hours), global traffic monitoring range V1=0.04 m³ / h (minimum traffic limit), V2=6.0 m³ / h (maximum traffic).

[0071] At a certain moment, the current time interval t1 = 127s, and the reference flow velocity V ref =Vp =3.6 m³ / h, lower limit of baseline redundancy error V3=V ref -V ref ×α = 3.6 - 0.36 = 3.24 m³ / h, upper limit of baseline redundancy error V4 = V ref +V ref ×α = 3.6 + 0.36 = 3.96 m³ / h, cumulative continuous gas consumption time T total =0 minutes.

[0072] The system executes task T2 once per minute to determine continuous gas usage. At this time, the pulse timeout period t2 = 5 seconds. Therefore, the pulse timeout flow rate V... out = (0.01 * 3600) / 5 = 7.2 m³ / h, at this time V out >V3, because there is no complete V p Data will not be used for continuous gas consumption accumulation at this time; the current benchmark V will be maintained. ref =3.6 m³ / h remains unchanged.

[0073] After the second minute timer task, the pulse timeout time t2 = 65s, and the pulse timeout flow rate V out = (0.01 * 3600) / 65 = 0.554 m³ / h, at this time V out <V3, cumulative continuous gas usage time, T total = 0, then V out Set as the new baseline flow velocity V ref V ref =V out =0.554m³ / h, then V3 = (0.554 - 0.554 * 0.1) = 0.499m³ / h.

[0074] After the third minute timer task, the pulse timeout time t2 = 125 seconds, and the pulse timeout flow rate V... out =(0.01*3600) / 125=0.288m³ / h,V out <V3, cumulative continuous gas usage time, T total = 0, V out Set as the new baseline flow velocity V ref V ref =V out =0.288 m³ / h, then V3 = (0.228 - 0.228 * 0.1) = 0.259 m³ / h; Between the third and fourth minute timer tasks, it can be known that V p= (0.01*3600) / 127 = 0.283 m³ / h. If a new Hall pulse is triggered at this time, assuming the new Hall pulse time is still 127 seconds, then during the fourth minute timer task, the pulse timeout time t2 = 60 - (127 - 125) = 58 seconds. V out =(0.01*3600) / 58=0.620m³ / h, currently there is precise V p =0.283 m³ / h, at this time V out >V3, that is, 0.620 > 0.259, then determine V. p Determine whether V is within [V1, V2], i.e., 0.283 ∈ [0.04, 6.0]. p Whether it is within [V3, V4], i.e., 0.283 ∈ [0.259, 0.317], where V4 = 0.288 + 0.0288 = 0.317 m³ / h, therefore, all judgment conditions are met, and the current pulse is determined to be a continuous gas consumption pulse, with the cumulative continuous gas consumption time T. total =T total +1 = 0 + 1 = 1 minute.

[0075] When the user maintains a stable gas supply with minimal flame, and the pulse interval remains at 127 seconds, the precise V is calculated within each 127-second pulse interval. p =0.283m³ / h, V p Within the current baseline range [0.259, 0.317], the subsequent stable accumulation process is as follows: First minute task (approximately 58 seconds after the pulse), t2≈58 seconds, V out ≈0.620 m³ / h, V out >V3(0.259), V p >V3, cumulative 1 minute, T total Increase; Second minute task (approximately 118 seconds after the pulse): t2≈118 seconds, V out ≈0.305 m³ / h, V out >V3(0.259), V p >V3, cumulative 1 minute, T total Increase; Based on the above, within each 127-second (approximately 2.12-minute) pulse interval, the system executes two minute tasks, successfully accumulating two minutes of continuous gas usage time. Therefore, the cumulative efficiency = 2 / 2.12 ≈ 94.3%. Assuming the user forgets to turn off the stove and continues to use the lowest setting, the system steadily accumulates T units per minute. total When T totalWhen the time reaches 480 minutes, the microcontroller outputs a valve-closing signal to cut off the gas supply and uploads alarm information through the communication module.

[0076] This embodiment achieves a cumulative efficiency of over 94% even at an extremely low flow rate of 0.283 m³ / h, from an initial error of V. ref =3.6 m³ / h, through two V out The system automatically corrects to a value close to the actual 0.288 m³ / h, and passes V at 65 seconds. out An abnormal flow rate was detected and baseline correction was initiated via V. out The V3 judgment avoids erroneous zeroing of the cumulative time under normal low flow conditions, ensuring that continuous gas use for 8 hours can be reliably detected and alarmed.

[0077] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.

Claims

1. A method for detecting long-term continuous gas consumption alarm in a smart diaphragm gas meter, characterized in that, include: Step S1. Calculate the current pulse interval flow rate V of the gas meter based on the time interval between two adjacent Hall pulses. p ; Step S2. Determine the current pulse interval flow velocity V p Is it within the preset continuous airflow rate monitoring range? If not, proceed to step S5; if yes, proceed to step S3. Step S3. Determine the current pulse interval flow velocity V p Is it within the redundancy error range of the reference point flow rate? If not, proceed to step S5; if yes, determine that the current pulse is a continuous gas consumption pulse, and accumulate the continuous gas consumption time T. total And execute step S4; Step S4. Determine the cumulative continuous gas usage time T total If the preset continuous gas consumption alarm time threshold has been reached, if not, step S1 is executed again; if so, it is determined to be an abnormal continuous gas consumption for a long time, and an alarm and valve shut-off operation is performed. Step S5. Update the reference flow rate to the pulse interval flow rate value that triggered this judgment, and set the continuous gas usage time T. total Clear the cache and repeat step S1.

2. The method for detecting long-term continuous gas consumption alarm of a smart diaphragm gas meter according to claim 1, characterized in that, In step S1, the current pulse interval velocity V p , is represented as: 5 p = (S×3600) / t1; Where S represents the gas volume corresponding to a single Hall pulse; t1 represents the time interval between two adjacent Hall pulses.

3. The method for detecting long-term continuous gas consumption alarm of a smart diaphragm gas meter according to claim 1, characterized in that, The redundancy error range of the reference point flow velocity in step S3 is expressed as follows: V3=V ref -V ref ×α; V4=V ref +V ref ×α; Where V3 represents the lower limit of the redundancy error range of the reference point flow velocity; V4 represents the upper limit of the redundancy error range of the reference point flow velocity; V ref α represents the reference point flow velocity; α represents the set flow velocity fluctuation.

4. The method for detecting long-term continuous gas consumption alarm of a smart diaphragm gas meter according to claim 3, characterized in that, The procedure preceding step S2 also includes: Obtain the pulse timeout velocity V out Determine the pulse timeout flow velocity V out If the flow rate exceeds the lower limit V3 of the redundancy error range of the reference point, proceed to step S5; otherwise, continue to step S2.

5. The method for detecting long-term continuous gas consumption alarm of a smart diaphragm gas meter according to claim 4, characterized in that, The pulse timeout velocity V out , is represented as: In out = (S×3600) / t2; Where t2 represents the time elapsed from the last Hall pulse trigger moment to the current judgment moment.

6. The method for detecting long-term continuous gas consumption alarm of a smart diaphragm gas meter according to claim 5, characterized in that, The timer precision used for timing is dynamically switched based on the time interval t1 between two adjacent Hall pulses, or based on the time t2 that has elapsed from the last Hall pulse trigger moment to the current judgment moment. The timer precision includes millisecond-level timers and second-level timers.

7. The method for detecting long-term continuous gas consumption alarm of a smart diaphragm gas meter according to claim 1, characterized in that, Step S1 also includes: When gas flow is first detected, the current pulse interval flow velocity V calculated for the first time will be used. p Set as the initial reference flow velocity V ref .

8. The method for detecting long-term continuous gas consumption alarm of a smart diaphragm gas meter according to claim 4, characterized in that, The triggering condition for the pulse interval velocity value that triggers this judgment in step S5 is: Execute the pulse timeout judgment flow velocity V out Is the pulse timeout velocity V greater than the lower limit of the redundancy error range of the reference point flow velocity V3? out ; Alternatively, the current pulse interval flow rate V can be used when executing steps S2 and S3. p .

9. A method for detecting long-term continuous gas consumption alarm in a smart diaphragm gas meter according to claim 1, characterized in that, Step S1 is executed by a first task, which is an interrupt service task triggered in response to each Hall pulse; steps S2-S5 are executed by a second task, which is a background task periodically triggered by an independent timer.

10. A detection system for a long-term continuous gas consumption alarm detection method for an intelligent diaphragm gas meter based on any one of claims 1-9, characterized in that, include: The calculation module is used to calculate the current pulse interval flow rate V of the gas meter based on the time interval between two adjacent Hall pulses. p ; The first judgment module is used to determine the current pulse interval flow velocity V. p Is it within the preset continuous airflow rate monitoring range? The second judgment module determines the current pulse interval flow velocity V. p Is it within the redundancy error range of the reference point flow velocity? The third judgment module determines the cumulative continuous gas usage time T. total Has the preset continuous gas consumption alarm time threshold been reached? The update module is used to update the reference flow rate to the pulse interval flow rate value that triggered this judgment, and to set the continuous gas usage time T. total Reset to zero.