Quick calculation method and device for natural gas deviation factor
By combining video intelligence and adaptive threshold algorithms with pressure sensors and cleaning mechanisms, the problems of low efficiency in calculating natural gas deviation coefficients and poor video clarity have been solved, achieving efficient and accurate calculation of natural gas deviation coefficients and identification of abnormal behavior.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- PETROCHINA CO LTD
- Filing Date
- 2024-11-27
- Publication Date
- 2026-05-29
Smart Images

Figure CN122116583A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, specifically to a method and apparatus for quickly calculating the deviation coefficient of natural gas. Background Technology
[0002] Currently, the methods for determining the deviation coefficient of natural gas in China can be divided into three main categories: direct laboratory measurement, chart / table lookup, and formula method. Among these, the experimental measurement method is time-consuming and costly, and cannot be performed frequently or at any time, making it unsuitable for reserve calculations and other gas field studies involving high-frequency parameter changes. The formula method, suitable for programmed calculations, is also widely used, but it involves numerous calculation models, each applicable to different types of reservoirs, and the calculations are relatively complex. The chart method, using the Standing-Katz deviation coefficient chart, is relatively simple but has low accuracy. The table lookup method requires multiple lookups and interpolation calculations, a complex process prone to errors, and is inefficient.
[0003] Traditional computer modeling systems rely primarily on manual browsing to discover illegal or irregular events. Operators can only dispatch and handle events manually, which is inefficient and leads to untimely responses. Furthermore, during computer modeling, the cameras in the computer modeling units are often exposed to the outdoors for extended periods, causing dust to accumulate on their surfaces, resulting in poor video clarity. Summary of the Invention
[0004] This invention aims to at least partially solve the aforementioned problems by utilizing existing front-end surveillance camera access systems to achieve intelligent access to ordinary videos, enabling automatic identification and analysis of abnormal behaviors and pressure sensors. This allows for the timely detection, handling, and feedback of abnormal behaviors in video areas at low cost and high availability, greatly improving the efficiency of traditional computer models. Furthermore, it involves surface cleaning of the cameras in the computer model units to ensure the clarity of the computer model.
[0005] To achieve the above objectives, the present invention provides the following technical solution: a method and apparatus for rapid calculation of natural gas deviation coefficient, comprising a computer model unit, a data input unit, a rule setting unit, a natural gas deviation precision analysis unit, a pressure sensor unit, an event handling unit, a data recording unit, and a data storage unit; The rule setting unit is used to set the video area warning rule algorithm. It combines the monitoring dataset and the set dataset. By comprehensively analyzing and judging multiple image frames, it can completely and accurately discover and describe the changes in the video area, so as to achieve the purpose of identifying the video area. The set dataset is a fixed image frame that is input in advance, and the monitoring dataset is an image frame obtained by real-time monitoring. Warning thresholds are set for different monitoring objects. In order to ensure the accuracy of the calculation and the speed of the algorithm, the threshold adaptive update method is used for calculation. The natural gas deviation precision analysis unit is used in conjunction with the video area early warning rule algorithm to perform screen patrol analysis on the video input unit. It sets a video dataset, monitors the status of the area, and then compares each frame of each video stream with the set dataset. Once the value set by the algorithm is found, an early warning is issued immediately. The data input unit is responsible for accessing all surveillance videos monitored by the front-end computer model unit's cameras that support the information transmission, exchange, and control technology requirements of the public safety computer model network system, and converting the video streams into other protocols for forwarding. The pressure sensor unit senses various types of events and sends the pressure sensor data to the relevant personnel for processing. Event sources include manually uploaded events and events automatically generated by the video analysis unit. The event handling unit is used to receive, handle, and provide feedback on events. It provides early warnings and supervision for events that are not handled or reported in a timely manner, marks events that are not handled or reported in a timely manner, and stores them through the data storage unit.
[0006] Preferably, the computer model unit is a camera, which is used to monitor the treatment area in real time; The data recording unit can be set to automatically detect user objects for generated early warning events and promptly notify users via SMS, WeChat, and system push notifications. The data storage unit stores the time and cause of an event, and subsequently stores the processing method and time of the event.
[0007] Preferably, the video area early warning rule algorithm is set to the following value: (Where X is the value set by the algorithm, A1 is the set dataset, and A2 is the same dataset as the set dataset). The threshold adaptive update method is as follows: subtract the monitoring dataset A3 (x,y,z) from the set dataset A1 (x,y,z) to obtain the same dataset A2 (x,y,z), which is the same dataset as the set dataset. The expression is: , When A2(x,y,z) = 1, it indicates that pixel (x,y) is a moving point; otherwise, it is a stationary point. T(x,y,z) is the difference threshold, used to eliminate misjudgments that may be caused by noise due to imaging and other reasons. T(x,y,z) is an adaptive function that is automatically adjusted according to the motion characteristics of the pixel. The update process is as follows: , Where T(x,y,z+1) is the adaptive update result; α is the update coefficient; I(x,y,z) is the grayscale value of the image; and M(x,y,z) is the set dataset matching operator, which only takes two values: 0 and 1. Then, the background is extracted from the monitoring dataset, and based on the sequence frames, the previous background frame, and the update coefficients during the update process, the updated background result is obtained as follows: , R(x,y,z) is used to count the number of times that pixel (x,y) remains unchanged over two consecutive frames. If a pixel is different from the background but has remained unchanged for a long time over two consecutive frames, then the object at that pixel has entered the field of view and stopped, and should be treated as the background. SNum is the threshold for measuring whether it is stopped, and SNum=36.
[0008] Preferably, the video refers to the video stream accessed in two ways: conforming to the GB / T28181-2011 protocol and the GB / T28181-2016 protocol. The video stream forwarding format can be converted to RTSP, FLV, HLS and RTMP protocols.
[0009] Preferably, the video area early warning rule algorithms analyze the accessed video in a series or series-parallel manner; wherein the monitoring types of the video area early warning rule algorithms include illegal parking, disorderly stacking of materials, disorderly parking of non-motorized vehicles, and business operations outside the store in fixed areas.
[0010] Preferably, the method and apparatus for quickly calculating the natural gas deviation coefficient also includes a mobile app.
[0011] Preferably, the mobile app can be either a mobile phone or a tablet.
[0012] Preferably, the computer model unit includes a camera and a base. A water spray mechanism is provided on one side of the base, a drive mechanism is installed on one side of the camera, and a cleaning mechanism is provided on one side of the drive mechanism. The drive mechanism includes a drive motor fixed inside the base. A universal joint is fixedly connected to one side of the drive motor. Ball sleeves are fitted at corresponding ends of the universal joint, and ball sleeves are fitted at the other two ends of the universal joint. A fixing rod is fixedly connected to one end of each ball sleeve, and the fixing rod is fixedly connected to the camera. A gear is fixedly connected to the universal joint on one side of the drive motor. A gear plate is meshed with one side of the gear. A telescopic rod is fixedly connected to one side of the gear plate. A U-shaped plate is fixedly connected to one end of the telescopic rod. A drive motor is fixedly connected to the universal joint adjacent to the drive motor. A gear is fixedly connected to the universal joint on one side of the drive motor. A gear plate is meshed with one side of the gear. An extension rod is fixedly connected to one side of the gear plate.
[0013] Preferably, the cleaning mechanism includes a side plate fixed to one side of the camera. A sliding groove is formed on one side of the side plate. A slider is slidably connected inside the sliding groove. A toothed plate is fixedly connected to one side of the slider. An extension rod is fixedly connected to the slider and the toothed plate on the same side. A collar is fitted on the outer surface of the extension rod. A sliding groove is formed at one end of the sliding groove. A bidirectional lead screw is rotatably connected inside the sliding groove. A slider is slidably connected to the outer surface of the bidirectional lead screw. An extension block is fixedly connected to one side of the slider. A double-sided scraper is engaged on one side of the extension block. A gear is fixedly connected to one end of the bidirectional lead screw. Water-absorbing fibers are fixedly connected to one side of the double-sided scraper.
[0014] Preferably, the water spraying mechanism includes a water inlet pipe fixed to one side of the base. One end of the water inlet pipe has multiple spray nozzles. A baffle plate abuts against one side of each spray nozzle. An extension plate is fixedly connected to one side of the baffle plate, and one side of the extension plate is fixed to the toothed plate. The computer modeling unit selects the most suitable calculation model based on the specific composition of the natural gas (e.g., whether it contains H2S and CO2), pressure (e.g., whether it is below 35 MPa), and temperature range. For example, for natural gas without H2S and CO2, the Standing-Katz deviation coefficient chart can be used for correction; for natural gas with a pressure below 35 MPa, the Cranmer method can be considered. Based on the selected model, necessary parameters such as pressure (p), temperature (T), and density (ρ) are input. These parameters can usually be obtained through on-site measurement or laboratory analysis.
[0015] Beneficial effects This invention provides a rapid calculation method and apparatus for the natural gas deviation coefficient, which has the following advantages compared with the prior art: 1. The method and device for quickly calculating the natural gas deviation coefficient, through the data input unit, is responsible for inputting all data conforming to the GB28181 protocol into this system. It can convert GB28181 protocol video into RTSP, FLV, HLS and RTMP protocols, and realize the storage, conversion and distribution of video data, and realize the management of cameras from different manufacturers on the same platform.
[0016] 2. The method and device for quickly calculating the natural gas deviation coefficient can set early warning rules for the video area through the rule setting unit. It can provide early warning for events and, in terms of social governance, provide early warning for places such as illegal parking, random dumping of materials, disorderly parking of non-motorized vehicles, and businesses operating outside designated areas, as well as for vehicles and materials placed outside designated areas. By setting rules, ordinary surveillance cameras can be made intelligent and the resources of various cameras can be integrated.
[0017] 3. The rapid calculation method and device for the natural gas deviation coefficient, through a precise natural gas deviation analysis unit, analyzes the camera footage according to set video early warning rules. If an image matching the early warning rules is found, an early warning is issued, and an early warning event is generated. The pressure sensor unit automatically dispatches the generated early warning event to the corresponding personnel for handling, realizing automatic identification and analysis of abnormal behavior. The pressure sensor handles the entire process and collects necessary parameters such as natural gas pressure and temperature. These devices may include pressure sensors, temperature sensors, etc., used to execute the calculation process of the selected calculation model. This device may be a computer or dedicated calculator, pre-installed with corresponding calculation software or algorithms, for displaying or recording calculation results. This device may be a display screen, printer, or other type of recording device. If automated control or monitoring of the calculation process is required, control devices can be added. This device may include controllers, alarms, etc.
[0018] 4. The rapid calculation method and device for the natural gas deviation coefficient uses a drive motor to control the camera to swing left and right, enabling computer modeling of different areas. During the swing, gear two drives the toothed plate two to move, which in turn controls the extension rod to move the slider one inside the groove one. Simultaneously, the toothed plate three meshes with gear three, driving the bidirectional lead screw to rotate, which in turn controls the bidirectional scraper to reciprocate. At the same time, the extension plate moves the baffle. The through holes on the baffle expose the water spray nozzle when the bidirectional scraper rises, allowing dust and water to be scraped off from above and then wiped dry from below. The cleaning process during rotation does not affect the camera's acquisition and ensures the clarity of the computer model. Attached Figure Description
[0019] Figure 1 A quick calculation method for natural gas deviation coefficient and a device structure diagram; Figure 2 A quick calculation method and apparatus flow chart for natural gas deviation coefficient; Figure 3 A schematic diagram of the computer model unit for a quick calculation method and device for natural gas deviation coefficient; Figure 4 A computer model unit schematic diagram of a method and apparatus for quickly calculating the deviation coefficient of natural gas; Figure 5 A schematic diagram of the cleaning mechanism in a computer model unit for a quick calculation method and device for natural gas deviation coefficient; Figure 6 A partial schematic diagram of the cleaning mechanism in a computer model unit for a quick calculation method and device for natural gas deviation coefficient; Figure 7 A quick calculation method and device for natural gas deviation coefficient, and a computer-based appropriate formula for judging and selecting the calculation results; Figure 8 This diagram illustrates a quick calculation method and device for the natural gas deviation coefficient, including computer table lookup results and multiple interpolation calculation results.
[0020] In the diagram: 1. Camera; 2. Base; 3. Water spray mechanism; 301. Water inlet pipe; 302. Extension plate; 303. Baffle; 304. Water nozzle; 4. Drive mechanism; 401. Drive motor one; 402. Universal joint; 403. Ball sleeve one; 404. Telescopic rod; 405. Toothed plate one; 406. Gear one; 407. Fixed rod; 408. Ball sleeve two; 409. Gear two; 410. Toothed plate two; 411. Drive motor two; 412. Extension rod; 5. Cleaning mechanism; 501. Side plate; 502. Slide groove one; 503. Slider one; 504. Toothed plate three; 505. Collar; 506. Slide groove two; 507. Two-way lead screw; 508. Slider two; 509. Extension block; 510. Double-sided scraper; 511. Gear three. Detailed Implementation
[0021] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0022] Example 1: Please see Figure 1-2A rapid calculation method and device for natural gas deviation coefficient, including a computer model unit, a data input unit, a rule setting unit, a natural gas deviation precision analysis unit, a pressure sensor unit, an event handling unit, a data recording unit, and a data storage unit; The computer model unit is a camera, which is used to monitor the treated area in real time; The data input unit is responsible for accessing all surveillance videos monitored by the cameras of the front-end computer model unit that support the information transmission, exchange, and control technology requirements of the public safety computer model network system. The information transmission, exchange, and control technology requirements of the public safety computer model network system are GB28181 protocol. The data input unit converts the video stream into other protocols for forwarding. To support cameras from different manufacturers, the data input unit uses ZLMediaKit streaming media service to access the media streams from the front-end devices. ZLMediaKit streaming media service supports Linux, Windows, iOS, and Android platforms, which enables the storage, conversion, and distribution of video data, and allows for the management of cameras from different manufacturers on the same platform. The rule setting unit is used to set the video region warning rule algorithm, and the video region warning rule algorithm is set to a value of [value missing]. (Where X is the value set by the algorithm, A1 is the set dataset, and A2 is the same dataset as the monitoring dataset and the set dataset). The monitoring dataset and the set dataset are combined, and through comprehensive analysis and judgment of multiple image frames, the changes in video areas are completely and accurately discovered and described, achieving the purpose of identifying video areas. The set dataset consists of pre-input fixed image frames, and the monitoring dataset consists of image frames obtained from real-time monitoring. Warning thresholds are set for different monitoring objects. To ensure the accuracy of the calculation and the speed of the algorithm, the system adopts an adaptive threshold update method. The dataset A2 (x,y,z), which is the same dataset as the set dataset, is obtained by subtracting the monitoring dataset A3 (x,y,z) from the set dataset A1 (x,y,z), i.e., the expression is: , When A2(x,y,z) = 1, it indicates that pixel (x,y) is a moving point; otherwise, it is a stationary point. T(x,y,z) is the difference threshold, used to eliminate misjudgments that may be caused by noise due to imaging and other reasons. T(x,y,z) is an adaptive function that is automatically adjusted according to the motion characteristics of the pixel. The update process is as follows: , Where T(x,y,z+1) is the adaptive update result; α is the update coefficient; I(x,y,z) is the grayscale value of the image; and M(x,y,z) is the set dataset matching operator, which only takes two values: 0 and 1. Then, the background is extracted from the monitoring dataset, and based on the sequence frames, the previous background frame, and the update coefficients during the update process, the updated background result is obtained as follows: , R(x,y,z) is used to count the number of times that pixel (x,y) remains unchanged in two consecutive frames. If a pixel is different from the background but has remained unchanged for a long time in two consecutive frames, then the object at that pixel has entered the field of view and stopped, and should be treated as the background. SNum is the threshold for measuring whether it is stationary, and SNum=36. It can be seen from the above formula that the above background extraction method considers the initial background of the image, the possible gradual changes in the field of view, and the possibility of objects moving into the field of view and stopping. Therefore, this method can extract the background image more accurately, and intelligentize ordinary surveillance cameras by setting rules and integrate the resources of various cameras. The natural gas deviation precision analysis unit is used in conjunction with the video area early warning rule algorithm to perform screen-by-screen analysis on the video input unit. It sets a video dataset, monitors the status of the area, and then compares each frame of each video stream with the set dataset. Once the value reaches the percentage set by the algorithm, an early warning is immediately issued. The video analysis unit operates in an asynchronous multi-threaded manner. According to the set video early warning rules, it performs screen-by-screen analysis on the camera images. If the image meets the early warning rules, an early warning is issued and an early warning event is generated. The pressure sensor unit automatically dispatches the generated early warning event to the corresponding personnel for processing, realizing automatic identification and analysis of abnormal behavior and full-process processing of the pressure sensor. The pressure sensor unit detects various types of events and sends the pressure sensor data to the relevant personnel for processing. Event sources include manually uploaded events and events automatically generated by the video analysis unit. The event handling unit is used to receive, handle, and provide feedback on events. It provides early warnings and supervision for events that are not handled or reported in a timely manner, marks events that are not handled or reported in a timely manner, and stores them through the data storage unit. The data recording unit can be set to automatically detect user objects for generated early warning events and promptly notify users via SMS, WeChat, and system push notifications. The data storage unit stores the time and cause of an event, and subsequently stores the processing method and time of the event.
[0023] In this embodiment, the video refers to access via two methods: conforming to the GB / T28181-2011 protocol and the GB / T28181-2016 protocol. The video stream forwarding format can be converted to RTSP, FLV, HLS, and RTMP protocols.
[0024] In this embodiment, the video area early warning rule algorithms analyze the accessed video in a series or series-parallel manner; the monitoring types of the video area early warning rule algorithms include illegal parking, random stacking of materials, random parking of non-motorized vehicles, and business operations outside the store in fixed areas.
[0025] In this embodiment, the method and apparatus for quickly calculating the natural gas deviation coefficient also include a mobile app.
[0026] In this embodiment, the mobile app can be either a mobile phone or a tablet.
[0027] Example 2: Please see Figure 3-7 The computer model unit includes a camera 1 and a base 2. A water spray mechanism 3 is located on one side of the base 2, and a drive mechanism 4 is mounted on one side of the camera 1. A cleaning mechanism 5 is located on one side of the drive mechanism 4. The drive mechanism 4 includes a drive motor 401 fixed inside the base 2. A universal joint 402 is fixedly connected to one side of the drive motor 401. Ball sleeves 403 are fitted at corresponding ends of the universal joint 402, and ball sleeves 408 are fitted at the other two ends of the universal joint 402. A fixing rod 407 is fixedly connected to one end of each ball sleeve 408, and the fixing rod 407 is fixedly connected to the camera 1. Next, a gear 406 is fixedly connected to the universal joint 402 on one side of the drive motor 401. A gear plate 405 is meshed with one side of the gear 406. A telescopic rod 404 is fixedly connected to one side of the gear plate 405. A U-shaped plate is fixedly connected to one end of the telescopic rod 404. A drive motor 411 is fixedly connected to the universal joint 402 on the adjacent side of the drive motor 401. A gear 409 is fixedly connected to the universal joint 402 on one side of the drive motor 411. A gear plate 410 is meshed with one side of the gear 409. An extension rod 412 is fixedly connected to one side of the gear plate 410.
[0028] In this embodiment, the cleaning mechanism 5 includes a side plate 501 fixed to one side of the camera 1. A first groove 502 is provided on one side of the side plate 501. A first slider 503 is slidably connected inside the first groove 502. A third toothed plate 504 is fixedly connected to one side of the first slider 503. An extension rod 412 is fixedly connected to the same side of the first slider 503 and the third toothed plate 504. A collar 505 is fitted onto the outer surface of the extension rod 412. A second groove 506 is provided at one end of the first groove 502 on the side plate 501. A bidirectional lead screw 507 is rotatably connected inside the second groove 506. The outer surface of 07 is slidably connected to a slider 508. An extension block 509 is fixedly connected to one side of the slider 508. A double-sided scraper 510 is snapped onto one side of the extension block 509. A gear 3 511 is fixedly connected to one end of the bidirectional lead screw 507. Water-absorbing fibers are fixedly connected to one side of the double-sided scraper 510. Dust and water are scraped off by the bidirectional scraper 510, and then the moisture on the surface of the camera 1 is wiped dry from below. This cleaning is performed during the rotation of the camera 1, so it does not affect the computer model of the camera 1, and the clarity of the computer model is ensured by the cleaning.
[0029] In this embodiment, the water spraying mechanism 3 includes a water inlet pipe 301 fixed to one side of the base 2. One end of the water inlet pipe 301 is provided with multiple water spray nozzles 304. One side of the water spray nozzles 304 abuts against a baffle 303. One side of the baffle 303 is fixedly connected to an extension plate 302. One side of the extension plate 302 is fixed to the toothed plate 504. By controlling the extension plate 302, the position of the baffle 303 is moved. The through hole on the baffle 303 can expose the water spray nozzle when the bidirectional scraper 510 rises, which is adapted to the operation of the bidirectional scraper 510 and can wash off the dust on the bidirectional scraper 510.
[0030] The working principle and specific steps of data-based precision governance and management applications based on artificial intelligence are as follows: S1: Computer Model: The computer model unit creates a computer model of the monitored area using a camera; S2: Front-end data input: The data input unit connects the front-end computer model to the system; S3: Set rule algorithm: The rule setting unit sets the video area warning rule algorithm and dynamically sets the warning threshold; S4: Video Screen Scanning Analysis: The Natural Gas Deviation Precision Analysis Unit uses rule-based algorithms to perform screen scanning analysis on the incoming video and generate early warning information; S5: Early Warning Temperature Sensor: In response to the generated early warning information, the pressure sensor unit sends the event pressure sensor to the relevant personnel for processing; S6: Unhandled Incident Supervision: The incident handling unit will provide staff with warnings and supervision for incidents that have not been handled or reported in a timely manner; S7: Event Push to Users: Records data units promptly notify users of any warning events that are generated.
[0031] The working principle of the computer model unit is as follows: The base 2 fixes the position of the camera 1. The drive motor 401 rotates, which drives the universal joint 402 to rotate through the ball sleeve 403, adjusting the tilt angle of the camera 1. Then, the drive motor 411 controls the universal joint 402 to rotate, controlling the camera 1 to swing left and right. At the same time, the gear 409 controls the position movement of the gear plate 410. The movement of the gear plate 410 controls the movement of the slider 503 inside the groove 502 through the extension rod 412. The gear 511 rotates through the gear plate 504, which then controls the rotation of the bidirectional lead screw 507, thereby controlling the slider 508 to move in the groove. The double-sided lead screw 507 slides on the camera 1. During the movement of the toothed plate 3 504, the position of the extension plate 302 is controlled to move, which in turn controls the position of the baffle 303. The through hole on the extension plate 302 is intermittently connected to the water spray nozzle 304. Water flows to the surface of the camera 1 through the water inlet pipe 301 and the water spray nozzle 304. Then, the double-sided scraper 510 scrapes the dust and water mixture on the surface of the camera 1 upward. After that, the water on the surface of the camera 1 is wiped dry by the downward movement of the double-sided scraper 510. At the same time, the water flow washes the mixture off the double-sided scraper 510. Thus, when the camera 1 swings to the position, the gear 2 409 and the toothed plate 2 410 do not mesh. The camera 1 can be cleaned by swinging left and right.
[0032] Furthermore, any content not described in detail in this specification is existing technology known to those skilled in the art.
[0033] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
[0034] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A rapid calculation method for natural gas deviation coefficient, characterized by: It includes a computer model unit, a data input unit, a rule setting unit, a natural gas deviation precision analysis unit, a pressure sensor unit, an event handling unit, a data recording unit, and a data storage unit; The rule setting unit is used to set the video area warning rule algorithm. It combines the monitoring dataset and the set dataset. By comprehensively analyzing and judging multiple image frames, it can completely and accurately discover and describe the changes in the video area. The set dataset is a fixed image frame that has been input in advance, and the monitoring dataset is an image frame obtained from real-time monitoring. Warning thresholds are set for different monitoring objects. To ensure the accuracy of the calculation and the speed of the algorithm, an adaptive threshold update method is used for calculation. The natural gas deviation precision analysis unit is used in conjunction with the video area early warning rule algorithm to perform screen patrol analysis on the video input unit. It sets a video dataset, monitors the status of the area, and then compares each frame of each video stream with the set dataset. Once the value set by the algorithm is found, an early warning is issued immediately. The data input unit is responsible for accessing all surveillance videos monitored by the front-end computer model unit's cameras that support the information transmission, exchange, and control technology requirements of the public safety computer model network system, and converting the video streams into other protocols for forwarding. The pressure sensor unit senses various types of events and sends the pressure sensor data to the relevant personnel for processing. Event sources include manually uploaded events and events automatically generated by the video analysis unit. The event handling unit is used to receive, handle, and provide feedback on events. It provides early warnings and supervision for events that are not handled or reported in a timely manner, marks events that are not handled or reported in a timely manner, and stores them through the data storage unit.
2. The rapid calculation method for the natural gas deviation coefficient according to claim 1, characterized in that: The computer model unit is a camera, which is used to monitor the treated area in real time; The data recording unit can be set to automatically detect user objects for generated early warning events and promptly notify users via SMS, WeChat, and system push notifications. The data storage unit stores the time and cause of an event, and subsequently stores the processing method and time of the event.
3. The rapid calculation method for the natural gas deviation coefficient according to claim 1, characterized in that: The video region early warning rule algorithm is set to the following value: (Where X is the value set by the algorithm, A1 is the set dataset, and A2 is the same dataset as the set dataset). The threshold adaptive update method is as follows: subtract the monitoring dataset A3 (x,y,z) from the set dataset A1 (x,y,z) to obtain the same dataset A2 (x,y,z), which is the same dataset as the set dataset. The expression is: , When A2(x,y,z) = 1, it indicates that pixel (x,y) is a moving point; otherwise, it is a stationary point. T(x,y,z) is the difference threshold, used to eliminate misjudgments that may be caused by noise due to imaging and other reasons. T(x,y,z) is an adaptive function that is automatically adjusted according to the motion characteristics of the pixel. The update process is as follows: , Where T(x,y,z+1) is the adaptive update result; α is the update coefficient; I(x,y,z) is the grayscale value of the image; and M(x,y,z) is the set dataset matching operator, which only takes two values: 0 and 1. Then, the background is extracted from the monitoring dataset, and based on the sequence frames, the previous background frame, and the update coefficients during the update process, the updated background result is obtained as follows: , R(x,y,z) is used to count the number of times that pixel (x,y) remains unchanged over two consecutive frames. If a pixel is different from the background but has remained unchanged for a long time over two consecutive frames, then the object at that pixel has entered the field of view and stopped, and should be treated as the background. SNum is the threshold for measuring whether it is stopped, and SNum=36.
4. The rapid calculation method for the natural gas deviation coefficient according to claim 1, characterized in that: The video refers to the video stream that is accessed in two ways: conforming to the GB / T28181-2011 protocol and the GB / T28181-2016 protocol. The video stream forwarding format can be converted to RTSP, FLV, HLS and RTMP protocols.
5. The rapid calculation method for the natural gas deviation coefficient according to claim 1, characterized in that: The video area early warning rule algorithms analyze the accessed video in a series or series-parallel manner; the monitoring types of the video area early warning rule algorithms include illegal parking, random stacking of materials, random parking of non-motorized vehicles, and business operations outside the store in fixed areas.
6. The rapid calculation method for the natural gas deviation coefficient according to claim 1, characterized in that: The method and apparatus for quickly calculating the natural gas deviation coefficient also include a mobile app.
7. The rapid calculation method for the natural gas deviation coefficient according to claim 6, characterized in that: The mobile app can be either a mobile phone or a tablet.
8. A quick calculation device for natural gas deviation coefficient, characterized in that: The computer model unit includes a camera (1) and a base (2). A water spraying mechanism (3) is provided on one side of the base (2). A drive mechanism (4) is installed on one side of the camera (1). A cleaning mechanism (5) is provided on one side of the drive mechanism (4). The drive mechanism (4) includes a drive motor (401) fixed inside the base (2). A universal joint (402) is fixedly connected to one side of the drive motor (401). A ball sleeve (403) is sleeved at each of the corresponding ends of the universal joint (402). A ball sleeve (408) is sleeved at the other two ends of the universal joint (402). A fixing rod (407) is fixedly connected to one end of the ball sleeve (408). The fixing rod (407) is connected to the camera (1). 1) Fixed connection: The universal joint (402) is fixedly connected to a gear (406) on one side of the drive motor (401). A gear plate (405) is meshed on one side of the gear (406). A telescopic rod (404) is fixedly connected on one side of the gear plate (405). A U-shaped plate is fixedly connected to one end of the telescopic rod (404). The universal joint (402) is fixedly connected to a drive motor (411) on the adjacent side of the drive motor (401). A gear (409) is fixedly connected to one side of the universal joint (402) on the drive motor (411). A gear plate (410) is meshed on one side of the gear (409). An extension rod (412) is fixedly connected to one side of the gear plate (410).
9. The quick calculation device for natural gas deviation coefficient according to claim 8, characterized in that: The cleaning mechanism (5) includes a side plate (501) fixed to one side of the camera (1). A sliding groove (502) is provided on one side of the side plate (501). A slider (503) is slidably connected inside the sliding groove (502). A toothed plate (504) is fixedly connected to one side of the slider (503). An extension rod (412) is fixedly connected to the same side of the slider (503) and the toothed plate (504). A collar (505) is sleeved on the outer surface of the extension rod (412). The side plate (501) is located on the sliding groove. One end of groove 1 (502) is provided with a sliding groove 2 (506). A two-way lead screw (507) is rotatably connected inside the sliding groove 2 (506). A slider 2 (508) is slidably connected to the outer surface of the two-way lead screw (507). An extension block (509) is fixedly connected to one side of the slider 2 (508). A double-sided scraper (510) is snapped onto one side of the extension block (509). A gear 3 (511) is fixedly connected to one end of the two-way lead screw (507). Water-absorbing fibers are fixedly connected to one side of the double-sided scraper (510).
10. The quick calculation device for natural gas deviation coefficient according to claim 9, characterized in that: The water spraying mechanism (3) includes a water inlet pipe (301) fixed to one side of the base (2). One end of the water inlet pipe (301) is provided with multiple water spray nozzles (304). One side of the water spray nozzle (304) abuts against a baffle (303). One side of the baffle (303) is fixedly connected to an extension plate (302). One side of the extension plate (302) is fixed to a toothed plate (504). The computer model unit selects the most suitable calculation model according to the specific composition of natural gas (such as whether it contains H2S and CO2), pressure (such as whether it is below 35MPa) and temperature range. For example, for natural gas that does not contain H2S and CO2, the Standing-Katz deviation coefficient chart can be used for correction. For natural gas with a pressure below 35MPa, the Cranmer method can be considered. According to the selected model, the necessary parameters are input, such as pressure (p), temperature (T), density (ρ), etc. These parameters can usually be obtained through on-site measurement or laboratory analysis.