A method, device, equipment and storage medium for detecting abnormality in a gas pipeline

By using the method of collecting gas flow rate at random time points and adjusting the sampling frequency in the ultrasonic gas meter, the problem that the anti-gas theft method in the existing technology is easily bypassed is solved, and more efficient gas pipeline monitoring and management is achieved.

CN117516647BActive Publication Date: 2024-08-27ZHEJIANG RONGXIN GAS METER
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311519320.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-14
Publication Date
2024-08-27
Estimated Expiration
2043-11-14

AI Technical Summary

Technical Problem

The existing anti-gas theft method of ultrasonic gas meters can easily be circumvented by external parties by controlling the detection frequency, resulting in the inability to effectively prevent gas theft.

Method used

By collecting the gas flow rate at random time points in the ultrasonic gas meter, the average value of multiple collections is calculated. If it is less than the set threshold, it is adjusted to fast mode to increase the sampling frequency, and when necessary, an alarm message is issued and the gas pipeline is closed. Port valve.

Benefits of technology

It effectively prevents external gas theft, improves the management efficiency and detection accuracy of gas pipelines, and ensures system safety and resource conservation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117516647B
    Figure CN117516647B
Patent Text Reader

Abstract

The present application provides a method, device, equipment and storage medium for detecting abnormalities in a gas pipeline, which relates to the field of ultrasonic technology. The method includes: controlling an ultrasonic gas meter to collect gas flow rates at multiple random time points, adding the collected gas flow rates to obtain a first flow rate; obtaining multiple gas flow rates collected by the ultrasonic gas meter within a preset time period, and adding the collected multiple gas flow rates to obtain a second flow rate; calculating the average value of the first flow rate and the second flow rate to obtain a first average value; if the first average value is less than a set threshold, adjusting the operation mode of the ultrasonic gas meter to a fast mode, and obtaining the flow rate average value of multiple gas flow rates collected by the ultrasonic gas meter in the fast mode within a set time period to obtain a second average value; if the second average value is not within a set range, issuing an alarm message and closing the valve at the gas pipeline inlet. The technical effect of the present application is to prevent external gas theft.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of ultrasonic technology, and in particular to a method, device, equipment and storage medium for detecting abnormalities in a gas pipeline. Background Art

[0002] Ultrasonic gas meter is a gas meter that uses the propagation principle of ultrasonic waves to measure the gas flow.

[0003] The anti-theft of ultrasonic gas meters has always been a difficult problem to solve. The existing anti-theft methods are generally to set up a detection program in the ultrasonic gas meter, and use the detection program to detect the flow rate to determine whether the gas is stolen. However, by simply mastering the detection frequency of the detection program and controlling the opening and closing of the intake valve on the intake pipe through the pulsation device, it is possible to avoid detection and achieve external gas theft. Summary of the invention

[0004] The present application provides a gas pipeline anomaly detection method, device, equipment and storage medium for preventing external gas theft.

[0005] In a first aspect, the present application provides a method for detecting anomalies in a gas pipeline, which is applied to a computer device, and the method includes: controlling an ultrasonic gas meter to collect gas flow rates at multiple random time points within a preset time period, and adding the gas flow rates collected at the multiple random time points to obtain a first flow rate; obtaining multiple gas flow rates collected by the ultrasonic gas meter within the preset time period, and adding the multiple gas flow rates collected within the preset time period to obtain a second flow rate, wherein the multiple collection time points corresponding to the multiple gas flow rates collected within the preset time period are different from the multiple random time points; calculating the average value of the first flow rate and the second flow rate to obtain a first average value; if the first average value is less than a set threshold, adjusting the operation mode of the ultrasonic gas meter to a fast mode, and obtaining the flow rate average value of multiple gas flow rates collected by the ultrasonic gas meter within a set time period in the fast mode to obtain a second average value; if the second average value is not within a set range, issuing an alarm message and closing the valve at the gas pipeline inlet.

[0006] By adopting the above technical solution, by randomly increasing the gas flow rate detection once or multiple times, the outside world cannot accurately grasp the detection frequency of the detection program. If the first average value is less than the set threshold, the system will automatically adjust the operation mode of the ultrasonic gas meter to the fast mode. In the fast mode, the sampling frequency is increased to obtain the flow rate data more quickly to adapt to the situation where the flow rate changes more frequently and prevent external gas theft.

[0007] Optionally, controlling the ultrasonic gas meter to collect the gas flow rate at the multiple random time points includes: obtaining multiple random time points generated by a random number generator within a preset time period; and controlling the ultrasonic gas meter to collect the gas flow rate at the multiple random time points within the preset time period.

[0008] By adopting the above technical solution, the random number generator is used to generate multiple random time points within the preset time period, which can ensure the randomness and diversity of the sampling time points. The outside world cannot accurately grasp the detection frequency of the detection program, and it is also impossible to control the opening and closing of the intake valve on the intake pipe through the pulsation device to achieve external air theft.

[0009] Optionally, obtaining multiple gas flow rates collected by the ultrasonic gas meter within the preset time period includes: obtaining the number of historical abnormalities detected by the ultrasonic gas meter; determining the detection time interval of the ultrasonic gas meter based on the historical number of abnormalities; determining the number of times the ultrasonic gas meter detects the gas flow rate within the preset time period based on the detection time interval; obtaining multiple gas flow rates collected by the ultrasonic gas meter within the preset time period.

[0010] By adopting the above technical solution, by obtaining the number of historical abnormalities detected by the ultrasonic gas meter, the detection time interval can be determined according to the number of abnormalities. If the number of historical abnormalities is small, it means that the gas flow rate is relatively stable, and the detection time interval can be increased and the number of collections can be reduced, thereby saving resources and energy. On the contrary, if the number of historical abnormalities is large, it means that the gas flow rate may have large fluctuations or faults, and it is necessary to increase the detection time interval and increase the number of collections to capture abnormal situations more comprehensively.

[0011] Optionally, if the first average value is less than a set threshold value, the operating mode of the ultrasonic gas meter is adjusted to the fast mode, including: obtaining the average flow rate of multiple flow rates of gas obtained within a preset time period before the preset time period; determining the size of the set threshold value based on the average flow rate; comparing the first average value and the threshold value, if the first average value is less than the set threshold value, adjusting the operating mode of the ultrasonic gas meter to the fast mode.

[0012] By adopting the above technical solution, adaptive mode switching can be achieved by obtaining the average flow rate of multiple flow rates of gas obtained within a preset time period before the preset time period, and determining the size of the set threshold according to the average flow rate. According to the comparison result of the first average value and the set threshold, if the first average value is less than the set threshold, the operation mode of the ultrasonic gas meter is adjusted to the fast mode. In this way, the appropriate working mode can be automatically selected according to the actual flow rate, thereby improving the accuracy and efficiency of monitoring.

[0013] Optionally, the method of obtaining the average flow rate of multiple gas flow rates collected by the ultrasonic gas meter in the fast mode within a set time period and obtaining a second average value also includes: if the second average value is within a set range, canceling the fast mode of the ultrasonic gas meter.

[0014] By adopting the above technical solution, when the second average value is within the set range, canceling the fast mode can reduce the acquisition frequency and sampling frequency, thereby saving resources and reducing energy consumption. When the flow rate is relatively stable, high-frequency acquisition in the fast mode is no longer required, which can reduce the cost of system operation and improve energy efficiency.

[0015] Optionally, if the second average value is not within the set range, maintenance information is sent to the terminal device of the maintenance personnel so that the maintenance personnel can inspect the gas pipeline, including: if the second average value is not within the set range, generating maintenance information including abnormal gas flow rate information, abnormal occurrence time, and abnormal location; sending the maintenance information to the preset terminal device of the maintenance personnel so that the maintenance personnel can inspect the gas pipeline.

[0016] By adopting the above technical solution, the gas flow rate can be monitored in real time and accurately, which not only increases the management efficiency of the gas pipeline, but also improves the accuracy of detection, thereby effectively preventing external gas theft and other potential dangers.

[0017] Optionally, if the second average value is not within the set range, after issuing an alarm message and closing the valve at the gas pipeline inlet, the method also includes: sending maintenance information to the terminal device of the maintenance personnel so that the maintenance personnel can inspect the gas pipeline.

[0018] By adopting the above technical solution, real-time notification and response can be achieved by sending maintenance information to the terminal equipment of maintenance personnel. Once an abnormality occurs in the gas pipeline, maintenance personnel can quickly receive maintenance information and take immediate action to carry out maintenance. This can greatly shorten the fault response time and improve maintenance efficiency.

[0019] In a second aspect, the present application provides a gas pipeline anomaly detection device, the device comprising: a control module, an acquisition module, a calculation module, an adjustment module and an output module; wherein the control module is used to control the ultrasonic gas meter to collect gas flow rates at multiple random time points within a preset time period, and add the gas flow rates collected at the multiple random time points to obtain a first flow rate; the acquisition module is used to obtain multiple gas flow rates collected by the ultrasonic gas meter within the preset time period, and add the multiple gas flow rates collected within the preset time period to obtain a second flow rate, and the multiple collection time points corresponding to the multiple gas flow rates collected within the preset time period are different from the multiple random time points; the calculation module is used to calculate the average value of the first flow rate and the second flow rate to obtain a first average value; the adjustment module is used to adjust the operation mode of the ultrasonic gas meter to a fast mode if the first average value is less than a set threshold, and obtain the flow rate average value of multiple gas flow rates collected by the ultrasonic gas meter within a set time period in the fast mode to obtain a second average value; the output module is used to issue an alarm message and close the valve of the gas pipeline inlet if the second average value is not within a set range.

[0020] By adopting the above technical solution, by randomly increasing the gas flow rate detection once or multiple times, the outside world cannot accurately grasp the detection frequency of the detection program. If the first average value is less than the set threshold, the system will automatically adjust the operation mode of the ultrasonic gas meter to the fast mode. In the fast mode, the sampling frequency is increased to obtain the flow rate data more quickly to adapt to the situation where the flow rate changes more frequently and prevent external gas theft.

[0021] In a third aspect, the present application provides an electronic device that adopts the following technical solution: it includes a processor, a memory, a user interface and a network interface, the memory is used to store instructions, the user interface and the network interface are used to communicate with other devices, and the processor is used to execute the instructions stored in the memory so that the electronic device executes a computer program such as any of the above-mentioned gas pipeline abnormality detection methods.

[0022] In a fourth aspect, the present application provides a computer-readable storage medium, which adopts the following technical solution: storing a computer program that can be loaded by a processor and execute any of the above-mentioned gas pipeline anomaly detection methods.

[0023] In summary, the present application includes at least one of the following beneficial technical effects:

[0024] 1. By randomly increasing the gas flow rate once or multiple times, the outside world cannot accurately grasp the detection frequency of the detection program, thus preventing external gas theft;

[0025] 2. Automatically select the appropriate working mode according to the actual flow rate to improve the accuracy and efficiency of monitoring. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 It is a flow chart of a gas pipeline anomaly detection method provided in an embodiment of the present application;

[0027] Figure 2 It is a structural schematic diagram of a gas pipeline abnormality detection device provided in an embodiment of the present application;

[0028] Figure 3 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application.

[0029] Explanation of the accompanying drawings: 1. Control module; 2. Acquisition module; 3. Calculation module; 4. Adjustment module; 5. Output module; 1000. Electronic device; 1001. Processor; 1002. Communication bus; 1003. User interface; 1004. Network interface; 1005. Memory. DETAILED DESCRIPTION

[0030] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments.

[0031] In the description of the embodiments of the present application, words such as "illustrative", "for example" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "illustrative", "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "illustrative", "for example" or "for example" is intended to present related concepts in a concrete way.

[0032] Ultrasonic gas meters use the time difference method to measure gas flow rate, and reflect the flow rate of the fluid by measuring the difference in the speed of the ultrasonic signal when it propagates downstream and upstream in the fluid. Because the error caused by the change of sound speed with the fluid temperature is small, the accuracy is high, and it is currently widely used.

[0033] Ultrasonic gas meters are gas meters that use the propagation principle of ultrasonic waves to measure gas flow. Ultrasonic waves are sound waves with a frequency higher than 20,000 Hz. They have good directionality, strong penetration, and are easy to obtain concentrated sound energy. They can propagate over long distances in water and can be used for distance measurement, speed measurement, cleaning, welding, stone crushing, sterilization, etc.

[0034] Ultrasonic gas meters use ultrasonic detection technology to detect the instantaneous flow of gas in the gas passage at a fixed time period. Ultrasonic gas meters use the time difference method to measure flow. When the fluid passes through the gas meter, sound waves propagate in the fluid. The propagation speed of sound waves in the downstream direction increases, while it decreases in the upstream direction. The same propagation distance has different propagation times. Ultrasonic gas meters use the difference between the downstream propagation time and the upstream propagation time of sound waves in the gas to measure the flow rate of the gas, and then multiply it by the cross-sectional area of ​​the inner wall of the pipeline to get the instantaneous flow rate of the ultrasonic gas meter.

[0035] The anti-gas theft of ultrasonic gas meters has always been a difficult problem to solve. The existing anti-gas theft method is generally to set a detection program in the ultrasonic gas meter, and detect the flow rate through the detection program to determine whether the gas is stolen. However, this method is generally very complicated in structure, requires great changes to the gas meter, and is inconvenient to use.

[0036] A common way to steal gas is to set a pulsation device near the intake pipe of the ultrasonic gas meter. The pulsation device can control the opening and closing of the intake valve on the intake pipe. A detection program is set in the ultrasonic gas meter. The detection frequency of the detection program is generally fixed, such as detecting once every 2 seconds. In this way, you only need to master the detection frequency of the detection program and control the opening and closing of the intake valve on the intake pipe through the pulsation device to avoid detection and achieve external gas theft. For example, when the detection program is detecting, the pulsation device controls the intake valve to intake air and achieve gas leakage. The rest of the time, the pulsation device controls the intake valve to close and achieve external gas theft.

[0037] In response to the above problems, the present application proposes a solution. Take one minute as an example. Under normal circumstances, since the ultrasonic gas meter detects once every 2 seconds, it is considered that the number of detections of the ultrasonic gas meter within one minute is 30 times. The outside world only needs to grasp the detection frequency of the detection program and control the opening and closing of the intake valve on the intake pipe through the pulsation device to avoid detection and realize external gas theft. In order to solve the above situation, the present application generates one or more random time points through a random number generator, so that the ultrasonic gas meter randomly increases the number of detections by one or more times on the original number of detections. For example, under normal circumstances, the ultrasonic gas meter will detect once in the 2nd second, once in the 4th second, and so on. The time spent on detection is generally 125ms; after adding one or more random time points, the ultrasonic gas meter may increase the number of detections by one time in the 3rd second or the 5th second. In this way, the outside world cannot grasp the detection frequency of the detection program. As long as there is gas theft, it can be discovered at the first time.

[0038] For the sake of convenience, here we take increasing the number of detections once as an example for illustration. For increasing the number of detections multiple times, please refer to this embodiment. Generally speaking, the more times the detection is increased, the more accurate the detection is. However, the more times the detection is increased, the more energy is consumed. Therefore, the number of times the detection is increased needs to be determined according to the actual situation, and no further details will be given here. For example, normally 30 detections are performed in one minute. After increasing the number of detections by one time, 31 detections will be performed in one minute. The gas flow rates collected by the gas meter for 31 times in one minute are obtained, and the average value of the 31 gas flow rates is calculated to obtain an average value. The average value is compared with a threshold value. The threshold value can be set according to the actual situation. If the average value is less than the threshold value, it is considered that there is a possibility of gas theft. In order to make the detection result more accurate, the average value of the gas flow rate can be collected for a few more minutes, and then compared to determine whether there is a possibility of gas theft.

[0039] If it is determined that there may be a possibility of gas theft, the ultrasonic gas meter will be switched to fast mode. Fast mode usually refers to a data collection mode, which is characterized by a higher collection frequency, faster acquisition of gas flow data and more accurate measurement results. In standard mode, the ultrasonic gas meter may collect data at a lower sampling frequency, which can reduce power consumption and extend battery life. However, due to the low sampling frequency, data collection may not be intensive enough, and accurate measurement results cannot be provided for instantaneous or rapidly changing gas flow.

[0040] To meet the demand for higher sampling frequency and more accurate measurement, ultrasonic gas meters provide a fast mode option. In fast mode, the gas meter collects data at a higher sampling frequency, so that changes in gas flow can be measured more frequently, providing more accurate measurement results. The choice of fast mode depends on the needs of the specific application. For scenarios that require more accurate and real-time gas flow monitoring, such as applications that require rapid detection of gas leaks or precise metering, selecting fast mode can provide higher measurement accuracy and response speed.

[0041] After switching to the fast mode, the average value of the gas flow rate is collected. According to the size of the average value, it is further determined whether there is gas theft or gas leakage. If the average value is not within the set range, it is considered that the current gas pipeline is abnormal, an alarm message is issued and the valve at the gas pipeline inlet is closed. If no abnormal state is detected in the fast mode, the fast mode is stopped. The fast mode is set according to the actual situation, which can be 10 seconds or one minute, and no further details are given here. Please refer to the following embodiments for specific implementation.

[0042] Figure 1 is a flow chart of a gas pipeline anomaly detection method provided in an embodiment of the present application. It should be understood that although Figure 1The steps in the flowchart are shown in sequence as indicated by the arrows, but the steps are not necessarily executed in the order indicated by the arrows; unless otherwise specified in this document, there is no strict order restriction for the execution of the steps, and the steps may be executed in other orders; and Figure 1 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0043] The present application discloses a method for detecting abnormalities in a gas pipeline. Figure 1 As shown, the method includes S101-S105.

[0044] S101, controlling the ultrasonic gas meter to collect gas flow rates at multiple random time points within a preset time period, and adding the gas flow rates collected at the multiple random time points to obtain a first flow rate.

[0045] In one example, the preset time period here can be set by yourself to determine the time period in which the gas flow rate needs to be collected. This can be any time period, such as a few minutes, a few hours, or longer. Generate multiple random time points within the preset time period. These time points should be randomly selected within the preset time period, and a random number generation algorithm can be used to generate appropriate time points.

[0046] Using a random number generation algorithm to generate a suitable time point specifically includes determining a preset time period for which a random time point needs to be generated. For example, a time period from a start time to an end time. According to the start time and the end time of the preset time period, a random number range is determined, and this range will be used to generate a random number to represent the position of the time point within the preset time period. Select an appropriate random number generation algorithm, such as a linear congruential method or a Mersenne rotation algorithm, which can generate uniformly distributed random numbers. Generate multiple random numbers using the selected random number generation algorithm. The generated random number should be between the start time and the end time of the preset time period. Map the generated random number to a time point within the preset time period. According to the random number and the time range of the preset time period, a specific time point is calculated, and multiple random time points are generated as needed. The above steps can be repeated, generating a random time point each time until the required number is reached.

[0047] Then control the ultrasonic gas meter to collect gas flow rate at multiple random time points. At each random time point within the preset time period, the ultrasonic gas meter will automatically collect the gas flow rate to ensure the normal operation of the gas meter and record the collected data at each time point. The gas flow rates collected at all random time points are added together to obtain the first flow rate.

[0048] S102, obtaining multiple gas flow rates collected by the ultrasonic gas meter within a preset time period, and adding the multiple gas flow rates collected within the preset time period to obtain a second flow rate, wherein the multiple collection time points corresponding to the multiple gas flow rates collected within the preset time period are different from the multiple random time points.

[0049] In an example, the first thing that needs to be explained is that the number of historical abnormalities detected by the ultrasonic gas meter is obtained; based on the number of historical abnormalities, the detection time interval of the ultrasonic gas meter is determined; based on the detection time interval, the number of times the ultrasonic gas meter detects the gas flow rate within a preset time period is determined; and multiple gas flow rates collected by the ultrasonic gas meter within the preset time period are obtained.

[0050] Obtain the historical number of abnormalities from the records or logs of the ultrasonic gas meter. These abnormalities can be statistical data of abnormal gas flow rate, equipment failure, or other abnormal conditions. Determine the detection time interval of the ultrasonic gas meter based on the historical number of abnormalities. Generally, more abnormalities may require more frequent detection, while fewer abnormalities may require longer time intervals. Make adjustments based on experience and needs, and ensure that the time interval can detect abnormalities in a timely manner. According to the preset time period and the determined detection time interval, calculate the number of detections that the ultrasonic gas meter should perform within the time period. Divide the preset time period by the detection time interval and round it to get the number of detections. Within the preset time period, the ultrasonic gas meter will collect gas flow rates multiple times, ensure that the gas flow rate data collected each time is recorded, and analyze and process it based on the recorded gas flow rate data. Statistical indicators such as average, maximum, and minimum values ​​can be calculated, and other analysis methods can be used to detect abnormal conditions or observe the changing trend of flow rates.

[0051] The random time points in the above steps are different from the time points at which the ultrasonic gas meter normally collects gas flow rates. For example, assuming that historical data shows that the ultrasonic gas meter collects gas 30 times at the 2nd, 4th, and 6th seconds of each minute, and so on, the multiple random time points cannot be the same as the above time points and need to avoid the above time points.

[0052] At each collection time point within the preset time period, the ultrasonic gas meter will automatically collect the gas flow rate. After each collection time point, the gas flow rate data collected by the gas meter is recorded. These data will be the results of multiple gas flow rate collections within the preset time period. The multiple gas flow rate data within the preset time period are added together to obtain the second flow rate. Based on the collected data, an appropriate algorithm is used to add the multiple flow rate data. The collection time point in this process is determined based on the preset time period, rather than the random time point generated previously, to ensure that the required multiple gas flow rate data are obtained within the preset time period, and the addition operation is performed to obtain the second flow rate.

[0053] S103, calculating an average value of the first flow rate and the second flow rate to obtain a first average value.

[0054] In one example, the first flow rate average value = the sum of the first flow rate data / the number of the first flow rate data; the second flow rate average value = the sum of the second flow rate data / the number of the second flow rate data, the first average value = (the first flow rate average value + the second flow rate average value) / 2, and the first average value can be obtained through the above steps.

[0055] S104, if the first average value is less than the set threshold value, the operation mode of the ultrasonic gas meter is adjusted to the fast mode, and the flow rate average value of multiple gas flow rates collected by the ultrasonic gas meter in the fast mode within the set time period is obtained to obtain the second average value.

[0056] In one example, when the first average value is less than the set threshold, there may be a possibility of gas theft or gas leakage. In order to make the final result accurate, the average flow rate values ​​of multiple gas flow rates in multiple consecutive time periods can be obtained, and then the multiple average flow rate values ​​are compared with the set threshold. Generally speaking, when the difference between two consecutive average values ​​and the threshold reaches more than twice, there may be a possibility of gas theft or gas leakage.

[0057] In order to further determine the abnormal state, the operation mode of the ultrasonic gas meter can be adjusted to the fast mode at this time. Generally speaking, when the ultrasonic gas meter is in the fast mode, it may increase power consumption and reduce battery life. Therefore, the operation time of the fast mode needs to be set according to the actual situation. Generally speaking, the operation time of the fast mode can be 10 seconds or 20 seconds, or the average value of multiple gas flow rates obtained by the ultrasonic gas meter in the fast mode, and then the average value of multiple gas flow rates is obtained to obtain a second average value. Through the above steps, the operation mode of the ultrasonic gas meter can be adjusted according to whether the first average value is less than the set threshold, and the average value of multiple gas flow rates collected within the set time in the fast mode can be obtained to obtain the second average value.

[0058] S105: If the second average value is not within the set range, an alarm message is issued and the valve at the gas inlet of the gas pipeline is closed.

[0059] In one example, the set range should meet safety standards and system requirements. Compare the calculated second average value with the set range. If the second average value exceeds the set range, the next step is required; otherwise, the process ends without alarming or closing the valve. According to the system design, an alarm message is sent to relevant personnel through appropriate communication channels (such as sound alarm, display, SMS, email, etc.) to remind them that the second average value of the ultrasonic gas meter exceeds the set range. According to the system design and safety process, take appropriate measures to close the valve at the gas pipeline inlet to prevent further gas from flowing into the system. The specific steps and operations for closing the valve should follow the safety specifications and the guidance of the equipment manufacturer. Once the valve is closed, ensure that the system is subject to necessary safety inspections and repairs. Check the possible causes of the failure, fix the problem and ensure that the system returns to normal operation before reopening the valve.

[0060] After obtaining the average flow rate of multiple gas flow rates collected by the ultrasonic gas meter in the fast mode within a set time period and obtaining the second average value, the method further includes: if the second average value is within a set range, canceling the fast mode of the ultrasonic gas meter.

[0061] In one example, according to the set range, it is checked whether the calculated second average value is within the set range. If the second average value is within the set range, it means that the detection result of the gas meter is normal, and the fast mode of the ultrasonic gas meter can be cancelled to avoid excessive loss.

[0062] If the second average value is not within the set range, maintenance information is sent to the terminal device of the maintenance personnel so that the maintenance personnel can inspect the gas pipeline, including: if the second average value is not within the set range, maintenance information including abnormal gas flow rate information, abnormal occurrence time, and abnormal location is generated; the maintenance information is sent to the preset terminal device of the maintenance personnel so that the maintenance personnel can inspect the gas pipeline.

[0063] In one example, when implementing this gas pipeline abnormality detection method, when the second average value (i.e., the flow rate average value of multiple gas flow rates collected within a set time when the ultrasonic gas meter operates in fast mode) is not within a set range, the system will immediately generate maintenance information including abnormal gas flow rate information, abnormality occurrence time, and abnormal location, so that maintenance personnel can quickly and accurately understand the abnormal situation and perform maintenance as soon as possible, thereby minimizing the impact of the abnormality on the gas pipeline and the surrounding environment.

[0064] In specific implementation, the system will use the built-in anomaly detection algorithm to compare the second average value with the set range. Once the second average value is found to be beyond or below the set range, the system will immediately identify it as an abnormality and start generating maintenance information. This maintenance information will include the time when the abnormality occurred (provided by the system's built-in time module), the location of the abnormality (provided by the location information of the ultrasonic gas meter), and the abnormal gas flow rate information (provided by the second average value).

[0065] After the maintenance information is generated, the system will immediately send this information to the terminal device of the preset maintenance personnel. This sending process can be completed through SMS, email, application notification or other effective communication methods. When the maintenance personnel receive this maintenance information, they can quickly and accurately find the location of the abnormality based on the data in the information, and understand the specific situation of the abnormality, so as to carry out timely and effective maintenance.

[0066] If the second average value is not within the set range, an alarm message is issued and the valve at the gas inlet of the gas pipeline is closed, and the method also includes: sending maintenance information to the terminal equipment of the maintenance personnel so that the maintenance personnel can inspect the gas pipeline.

[0067] In one example, when the second average value does not meet the set range, it is determined whether it is necessary to send maintenance information to the maintenance personnel according to the system design and operation requirements. This can be achieved through SMS, email, application notification or other communication methods to prepare maintenance information containing necessary information. This information may include the location of the gas pipeline, description of the abnormal situation, alarm information and other relevant details to ensure that the maintenance information is clear and provides sufficient information for the maintenance personnel to understand the problem and take appropriate actions. Send the prepared maintenance information to the maintenance personnel's terminal device. According to the settings of the system and communication channels, select an appropriate method to send the information and ensure that the information can be conveyed to the maintenance personnel in a timely manner. After receiving the maintenance information, the maintenance personnel go to the corresponding location of the gas pipeline for maintenance according to the detailed description and location information provided in the information. The maintenance personnel should take appropriate measures to repair the problem according to safety standards and operating procedures, and ensure that the valve is not reopened before the pipeline resumes normal operation.

[0068] After the maintenance personnel complete the inspection of the gas pipeline, they should confirm that the problem has been solved and the pipeline has returned to normal. They can communicate with the operation center or relevant personnel, or send a confirmation message on the terminal device to ensure that the problem has been properly handled.

[0069] Based on the above method, the present application also discloses a gas pipeline abnormality detection device, such as Figure 2 As shown, Figure 2 It is a structural schematic diagram of a gas pipeline abnormality detection device provided in an embodiment of the present application.

[0070] A gas pipeline abnormality detection device comprises: the device comprises: a control module 1, an acquisition module 2, a calculation module 3, an adjustment module 4 and an output module 5; wherein the control module 1 is used to control the ultrasonic gas meter to collect gas flow rate at multiple random time points within a preset time period, and add the gas flow rates collected at multiple random time points to obtain a first flow rate; the acquisition module 2 is used to obtain multiple gas flow rates collected by the ultrasonic gas meter within the preset time period, and add the multiple gas flow rates collected within the preset time period to obtain a second flow rate, and the multiple collection time points corresponding to the multiple gas flow rates collected within the preset time period are different from the multiple random time points; the calculation module 3 is used to calculate the average value of the first flow rate and the second flow rate to obtain the first average value; the adjustment module 4 is used to adjust the operation mode of the ultrasonic gas meter to the fast mode if the first average value is less than a set threshold, and obtain the flow rate average value of multiple gas flow rates collected by the ultrasonic gas meter in the fast mode within a set time length to obtain a second average value; the output module 5 is used to issue an alarm message and close the valve of the gas pipeline inlet if the second average value is not within a set range.

[0071] In one example, the control module 1 is further used to obtain multiple random time points generated by a random number generator within a preset time period; and control the ultrasonic gas meter to collect the gas flow rate at multiple random time points within the preset time period.

[0072] In one example, the acquisition module 2 is also used to obtain the number of historical anomalies detected by the ultrasonic gas meter; determine the detection time interval of the ultrasonic gas meter based on the number of historical anomalies; determine the number of times the ultrasonic gas meter detects gas flow rate within a preset time period based on the detection time interval; and obtain multiple gas flow rates collected by the ultrasonic gas meter within a preset time period.

[0073] In one example, the adjustment module 4 is also used to obtain the average flow rate of multiple flow rates of gas obtained within a preset time period before a preset time period; determine the size of a set threshold based on the average flow rate; compare the first average value and the threshold, and if the first average value is less than the set threshold, adjust the operation mode of the ultrasonic gas meter to the fast mode.

[0074] In one example, the apparatus is further configured to cancel the fast mode of the ultrasonic gas meter if the second average value is within a set range.

[0075] In one example, the above-mentioned device is also used to generate maintenance information including abnormal gas flow rate information, abnormal occurrence time, and abnormal location if the second average value is not within a set range; and send the maintenance information to a preset maintenance personnel's terminal device so that the maintenance personnel can inspect the gas pipeline.

[0076] In one example, the above device is also used to send maintenance information to the terminal device of the maintenance personnel so that the maintenance personnel can inspect the gas pipeline.

[0077] It should be noted that: when the device provided in the above embodiment realizes its function, only the division of the above functional modules is used as an example. In actual application, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.

[0078] See also Figure 3 , is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 3 As shown, the electronic device 1000 may include: at least one processor 1001 , at least one network interface 1004 , a user interface 1003 , a memory 1005 , and at least one communication bus 1002 .

[0079] The communication bus 1002 is used to realize the connection and communication between these components.

[0080] The user interface 1003 may include a display screen (Display) and a camera (Camera). Optionally, the user interface 1003 may also include a standard wired interface and a wireless interface.

[0081] The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).

[0082] Among them, the processor 1001 may include one or more processing cores. The processor 1001 uses various interfaces and lines to connect various parts in the entire server, and executes various functions of the server and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 1005, and calling data stored in the memory 1005. Optionally, the processor 1001 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 1001 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 1001, and it can be implemented separately through a chip.

[0083] Among them, the memory 1005 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory 1005 includes a non-transitory computer-readable storage medium. The memory 1005 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 1005 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 1005 may optionally also be at least one storage device located away from the aforementioned processor 1001. As Figure 3 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and an application program of a gas pipeline anomaly detection method.

[0084] exist Figure 3In the electronic device 1000 shown, the user interface 1003 is mainly used to provide an input interface for the user and obtain data input by the user; and the processor 1001 can be used to call an application program for a gas pipeline abnormality detection method stored in the memory 1005. When executed by one or more processors, the electronic device executes one or more methods described in the above embodiments.

[0085] An electronic device readable storage medium stores instructions, which, when executed by one or more processors, enable the electronic device to execute one or more of the methods described in the above embodiments.

[0086] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the order of the actions described, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required for the present application.

[0087] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0088] In the several embodiments provided in the present application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some service interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.

[0089] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0090] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0091] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a memory and includes several instructions for a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned memory includes: various media that can store program codes, such as USB flash drives, mobile hard drives, magnetic disks or optical disks.

[0092] The above is only an exemplary embodiment of the present disclosure, and the scope of the present disclosure cannot be limited thereto. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the specification and practicing the disclosure here, those skilled in the art will easily think of other embodiments of the present disclosure. This application is intended to cover any modification, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the technical field not recorded in the present disclosure. The description and examples are only regarded as exemplary, and the scope and spirit of the present disclosure are defined by the claims.

Claims

1. A method for detecting abnormality in a gas pipeline, characterized in that: The method comprises: obtaining a plurality of random time points generated by a random number generator and being within a preset time period; controlling an ultrasonic gas meter to collect gas flow rates at the plurality of random time points within the preset time period, and adding the gas flow rates collected at the plurality of random time points to obtain a first flow rate; obtaining the number of historical abnormalities detected by the ultrasonic gas meter; determining a detection time interval of the ultrasonic gas meter according to the number of historical abnormalities; determining the number of times the ultrasonic gas meter detects gas flow rates within the preset time period according to the detection time interval; obtaining multiple gas flow rates collected by the ultrasonic gas meter within the preset time period, and adding the preset flow rates to the gas flow rates collected at the plurality of random time points; obtaining the gas flow rates collected by the ultrasonic gas meter multiple times ... preset flow rates; obtaining the gas flow rates collected by the ultrasonic gas meter multiple times within the preset time period, and adding the preset flow rates to the preset flow rates. Suppose that multiple gas flow rates collected within a time period are added together to obtain a second flow rate, and the multiple collection time points corresponding to the multiple gas flow rates collected within the preset time period are different from the multiple random time points; calculate the average value of the first flow rate and the average value of the second flow rate to obtain a first average value; if the first average value is less than a set threshold, adjust the operation mode of the ultrasonic gas meter to a fast mode, and obtain the flow rate average value of multiple gas flow rates collected by the ultrasonic gas meter within a set time period in the fast mode to obtain a second average value; if the second average value is not within the set range, issue an alarm message and close the valve at the gas pipeline inlet.

2. A gas pipeline anomaly detection method according to claim 1, characterized in that: If the first average value is less than a set threshold value, the operation mode of the ultrasonic gas meter is adjusted to the fast mode, including: obtaining the average flow rate of multiple flow rates of gas obtained within a preset time period before the preset time period; determining the size of the set threshold value based on the average flow rate; comparing the first average value and the threshold value, if the first average value is less than the set threshold value, the operation mode of the ultrasonic gas meter is adjusted to the fast mode.

3. A gas pipeline anomaly detection method according to claim 1, characterized in that: The method of obtaining the average flow rate of multiple gas flow rates collected by the ultrasonic gas meter in the fast mode within a set time period and obtaining a second average value also includes: if the second average value is within a set range, canceling the fast mode of the ultrasonic gas meter.

4. A gas pipeline anomaly detection method according to claim 1, characterized in that: If the second average value is not within the set range, maintenance information is sent to the terminal device of the maintenance personnel so that the maintenance personnel can inspect the gas pipeline, including: if the second average value is not within the set range, maintenance information including abnormal gas flow rate information, abnormal occurrence time, and abnormal location is generated; the maintenance information is sent to the preset terminal device of the maintenance personnel so that the maintenance personnel can inspect the gas pipeline.

5. A gas pipeline anomaly detection method according to claim 1, characterized in that: If the second average value is not within the set range, after issuing an alarm message and closing the valve at the gas pipeline inlet, the method also includes: sending maintenance information to the terminal device of the maintenance personnel so that the maintenance personnel can inspect the gas pipeline.

6. A gas pipeline abnormality detection device, characterized in that: The device comprises: a control module (1), an acquisition module (2), a calculation module (3), a regulation module (4) and an output module (5); wherein the control module (1) is used to acquire a plurality of random time points generated by a random number generator and within a preset time period; control the ultrasonic gas meter to collect gas flow rates at the plurality of random time points within the preset time period, and add the gas flow rates collected at the plurality of random time points to obtain a first flow rate; the acquisition module (2) is used to acquire the number of historical abnormalities detected by the ultrasonic gas meter; determine the detection time interval of the ultrasonic gas meter according to the number of historical abnormalities; determine the number of times the ultrasonic gas meter detects the gas flow rate within the preset time period according to the detection time interval; acquire the number of times the ultrasonic gas meter detects the gas flow rate within the preset time period The plurality of gas flow rates collected are summed up within the preset time period to obtain a second flow rate, wherein the plurality of collection time points corresponding to the plurality of gas flow rates collected within the preset time period are different from the plurality of random time points; the calculation module (3) is used to calculate the average value of the sum of the average value of the first flow rate and the average value of the second flow rate to obtain a first average value; the adjustment module (4) is used to adjust the operation mode of the ultrasonic gas meter to a fast mode if the first average value is less than a set threshold value, and obtain the flow rate average value of the plurality of gas flow rates collected by the ultrasonic gas meter within a set time period in the fast mode to obtain a second average value; the output module (5) is used to issue an alarm message and close the valve at the gas inlet of the gas pipeline if the second average value is not within a set range.

7. An electronic device, characterized in that: The electronic device comprises a processor (1001), a memory (1005), a user interface (1003) and a network interface (1004), wherein the memory (1005) is used to store instructions, the user interface (1003) and the network interface (1004) are used to communicate with other devices, and the processor (1001) is used to execute the instructions stored in the memory so that the electronic device executes the method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that: A computer program is stored which can be loaded by a processor and execute the method according to any one of claims 1 to 5.