A device and method for gas leakage tracing and situation judgment

By combining environmental parameter acquisition, scene imaging, and TDLAS scanning with a Gaussian plume model, the problem of weak localization capability and poor detection accuracy of trace gas leaks is solved, achieving efficient and accurate gas leak tracing and situation assessment.

CN122392710APending Publication Date: 2026-07-14成都汉威智感科技有限公司

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
成都汉威智感科技有限公司
Filing Date
2026-03-17
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

Existing gas leak detection technologies struggle to accurately pinpoint leak sources in cases of minute leaks, and their low detection efficiency prevents them from providing accurate risk assessments.

Method used

The system employs an environmental parameter acquisition module, a scene imaging module, a TDLAS scanning detection module, and a scene understanding and leakage situation assessment module. Combined with a Gaussian plume model and optimization algorithms, it achieves high-precision gas leak tracing and situation assessment through a collaborative mechanism.

Benefits of technology

It enables rapid location and efficient detection of trace gas leaks, improving detection accuracy and efficiency. It is suitable for time-sensitive emergency response scenarios, especially for refining and chemical enterprises and pipeline inspection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122392710A_ABST
    Figure CN122392710A_ABST
Patent Text Reader

Abstract

The application discloses a device and method for gas leakage tracing and situation judgment, and belongs to the technical field of gas detection, and aims to solve the technical problems of weak leakage source rapid positioning ability and poor leakage detection accuracy of trace gas leakage in the prior art. It comprises an environmental parameter acquisition module, a scene imaging module, a TDLAS scanning detection module and a scene understanding and leakage situation judgment module. The scene understanding and leakage situation judgment module utilizes the position information of the suspected leakage point detected from the scene image by a target detection model; calculates the theoretical concentration of each observation point by a Gaussian plume model; constructs a target function by using each concentration value and the corresponding coordinates in the concentration matrix obtained by scanning the TDLAS scanning detection module, the theoretical concentration of the corresponding observation point, and inversely solves the target function by an optimization algorithm to obtain the optimal leakage source; and obtains the final gas leakage point by combining the environmental parameters, the optimal leakage source and the position information of the suspected leakage point.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of gas detection technology, and relates to gas leak tracing and situation assessment, and particularly to a device and method for gas leak tracing and situation assessment. Background Technology

[0002] Gas leak detection technology is widely used in petrochemical, natural gas transportation, and industrial park safety monitoring, playing a vital role in ensuring safe production and environmental protection. In particular, trace gas leaks, due to their small volume and limited spread, are often difficult to detect in a timely manner, but long-term accumulation can lead to serious safety hazards and economic losses.

[0003] Currently, gas leak detection technologies mainly include infrared gas cloud imaging technology, TDLAS laser telemetry technology, and detection technology that combines infrared imaging with TDLAS.

[0004] Infrared gas cloud imaging technology uses an infrared focal plane detector to image leaked gas, enabling large-scale and rapid monitoring. However, this type of detection technology has shortcomings: (1) it cannot accurately quantify the concentration of leaked gas, thus failing to provide quantitative evidence for subsequent risk assessment; (2) it cannot provide quantitative evidence for subsequent risk assessment, and for minor leaks, due to low gas concentration and poor imaging contrast, it is easy to miss detection.

[0005] TDLAS laser telemetry technology can measure gas concentration with high precision by analyzing the absorption spectrum of the laser after it passes through the gas. Although this type of detection technology has high detection accuracy and fast response speed, it also has obvious limitations: (1) single-point detection, the laser beam size is small (usually millimeter level), and the detection range is limited; (2) to locate the leak point, it is necessary to scan point by point, which is inefficient; (3) the concentration data of a single point is difficult to intuitively present the leak situation.

[0006] For detection technologies combining infrared imaging and TDLAS, the approach is typically a simple functional overlay: TDLAS is first used for single-point verification, followed by infrared imaging to locate the leak source. For example, in 2024, the applicant filed a patent application (CN202411270458.9) entitled "A Gas Leakage Infrared Imaging Concentration Inversion Device and Method." This concentration inversion device includes a gas leakage infrared imager and a gas tunable semiconductor laser absorption spectrometer. The gas leakage infrared imager is used to image the leaking gas and obtain the radiation distribution within the scene; the gas tunable semiconductor laser absorption spectrometer (TDLAS) is used to collect the gas leakage concentration at the leak point within the scene. This concentration inversion device not only images the leaking gas using the gas leakage infrared imager and collects the gas leakage concentration using TDLAS, but it also sets the optical axes of the two to have an angle θ, reducing the deviation between the observation point of the laser methane detection module and the center point of the infrared image within the effective distance. This reduces the misalignment between the amplitude value corresponding to the image center and the concentration detected by TDLAS, making it more suitable for large-scale scene concentration measurement.

[0007] In addition to the detection technology combining infrared imaging and TDLAS, the applicant has also applied for a detection technology combining visible light imaging and TDLAS (application numbers are 202411780151.3, 202411779943.9, and 202510121992.1, respectively).

[0008] Although the above solution solves the problem of gas leak detection, it still cannot solve the following problems: (1) For micro-leaks, TDLAS can detect the gas concentration of micro-leaks, but it cannot perform infrared imaging in complex backgrounds and low temperature difference environments; (2) Without utilizing prior knowledge of gas diffusion, it is impossible to infer the leak source from limited detection points; (3) The TDLAS scanning strategy is fixed and fails to optimize the scanning range based on preliminary detection results, resulting in low efficiency. Summary of the Invention

[0009] The purpose of this invention is to provide a device and method for tracing the source and assessing the situation of gas leaks, in order to solve the technical problems of weak rapid location of leak sources and poor leak detection accuracy in the prior art for traceable gas leaks.

[0010] To achieve the above objectives, the present invention specifically adopts the following technical solution: A device for tracing the source and assessing the situation of gas leaks includes an environmental parameter acquisition module, a scene imaging module, a TDLAS scanning detection module, and a scene understanding and leak situation assessment module. The environment parameter acquisition module is used to acquire environment parameters; The scene imaging module is used to image the detected scene and obtain a scene image; The TDLAS scanning detection module is used to detect the location information of suspected leak points detected from the scene image based on the target detection model of the scene understanding and leak situation judgment module, to detect the area of ​​suspected leak points, obtain multi-point gas concentration data, and form a concentration matrix. The scene understanding and leakage situation assessment module includes a target detection model and a Gaussian plume model. The target detection model is used to detect the location information of suspected leakage points in the scene image; the Gaussian plume model is used to calculate the theoretical concentration of each observation point; the concentration matrix obtained by the TDLAS scanning detection module is used to construct an objective function with each concentration value and corresponding coordinates in the concentration matrix and the theoretical concentration of the corresponding observation point; and the objective function is solved inversely by an optimization algorithm to obtain the optimal leakage source; combined with environmental parameters, the optimal leakage source, and the location information of suspected leakage points, the final gas leakage point is obtained.

[0011] Furthermore, when using the scenario understanding and leakage situation assessment module to obtain the final gas leak point, the specific steps are as follows: Step 1: Use each concentration value and its corresponding coordinate in the concentration matrix obtained by the TDLAS scanning detection module as observation data; Step 2: Determine the location of the leak source and leakage source strength ; Step 3: Calculate the theoretical concentration at each observation point using the Gaussian plume model; Step 4: Construct an objective function that minimizes the sum of squared residuals between the theoretical and measured concentrations; Step 5: Solve the objective function in reverse using an optimization algorithm to obtain the optimal leakage source parameters; Step 6: Using the trained target detection model, detect the location information of suspected leak points from the scene image; Step 7: Based on environmental parameters, optimal leak source parameters, and location information of suspected leak points, the final gas leak point is obtained.

[0012] Furthermore, in step three, when calculating the theoretical concentration at each observation point, the Gaussian plume model uses the following formula to calculate the concentration distribution: ; in, Represents the spatial coordinates of the observation point. Indicates the downwind observation point The gas concentration; This indicates the strength of the leakage source, which is an unknown quantity; This represents the average wind speed. This indicates the extent of gas diffusion in the horizontal direction perpendicular to the wind direction. Indicates the extent of gas diffusion in the direction perpendicular to the ground; This indicates the height of the leak source, which is an unknown quantity.

[0013] Furthermore, in step four, the objective function constructed is: ; in, Spatial coordinates representing the location of the leak source Indicates the strength of the leak source. Indicates the number of observation points. This indicates the first result obtained through the TDLAS scanning detection module. Measured concentrations at each observation point This represents the first result calculated based on the Gaussian plume model. Theoretical concentration at each observation point.

[0014] Furthermore, in step five, the optimization algorithms include particle swarm optimization and Levenberg-Marquardt algorithm; The steps for reverse engineering are as follows: First, a global search is performed using the particle swarm optimization algorithm to obtain an initial solution; Then, the Levenberg-Marquardt algorithm is used for local fine-grained solution.

[0015] Furthermore, in step six, the target detection model includes a backbone network, a neck network, and a detection head; The backbone network consists of the following modules arranged in sequence: Conv#1, Conv#2, C3k2#1, Conv#3, C3k2#2, Conv#4, C3k2#3, Conv#5, C3k2#4, SPPF, and C2PSA. The C3k2#2, C3k2#3, and C2PSA modules output feature maps F1, F2, and F3 at three different scales. The neck network includes Conv#6 module, Conv#7 module, Conv#8 module, Conv#9 module, Conv#10 module, upsampling#1 module, upsampling#2 module, BiFPN#1 module, BiFPN#2 module, BiFPN#3 module, BiFPN#4 module, RepNCSPELAN#1 module, RepNCSPELAN#2 module, RepNCSPELAN#3 module, and RepNCSPELAN#4 module. The feature maps F1, F2, and F3 output from the C2PSA module of the backbone network are used as inputs to the Conv#8, Conv#7, and Conv#6 modules, respectively. The output of the Conv#6 module, after being upsampled by the #1 module, is combined with the output of the Conv#7 module as input to the BiFPN#1 module. The output of the BiFPN#1 module is then used as input to the RepNCSPELAN#1 module. The output of the RepNCSPELAN#1 module, after being upsampled by the #2 module, is combined with the output of the Conv#8 module as input to the BiFPN#2 module. The output of the BiFPN#2 module is then used as input to the RepNCSPELAN#2 module. The output of the RepNCSPELAN#2 module is input to the detection head #1 on one hand, and then, after passing through the Conv#9 module, it is combined with the output of the RepNCSPELAN#1 module as the input of the BiFPN#3 module. The output of the BiFPN#3 module is used as the input of the RepNCSPELAN#3 module. The output of the RepNCSPELAN#3 module is input to the detection head #2 on one hand, and then, after passing through the Conv#10 module, it is combined with the output of the Conv#6 module as the input of the BiFPN#4 module. The output of the BiFPN#4 module is then used as the input of the detection head #3 after passing through the RepNCSPELAN#4 module.

[0016] Furthermore, when training the object detection model, the total loss function is: ; Target detection loss for: ; Classification loss for: ; Bounding box regression loss for: ; Target confidence loss for: ; Target segmentation loss for: ; Mask loss for: ; Dice coefficient loss for: ; Small goals increase losses for: ; Small target detection loss for: ; in, , , represent the weights of the object detection loss, object segmentation loss, and small object augmentation loss, respectively. Represents classification loss. This represents the bounding box regression loss. Indicates the target confidence loss. Indicates mask loss. This represents the Dice coefficient loss. This represents the weighting coefficient for smaller objectives. This indicates the loss in small target detection. This represents the classification loss for small targets. The bounding box regression loss represents the small target. This represents the target confidence loss for smaller targets; Represents the total number of samples. This represents the true class label (0 or 1) of the j-th sample. This represents the probability that the j-th sample is predicted as positive. This represents the intersection-union ratio (IoU) between the predicted bounding box and the ground truth bounding box. This represents the Euclidean distance between the center point of the predicted bounding box and the center point of the ground truth bounding box. This indicates the coordinates of the center point of the prediction box. This represents the coordinates of the center point of the true bounding box. This represents the length of the line connecting the smallest bounding rectangle that encloses the predicted bounding box and the ground truth bounding box. Indicates the total number of anchor frames. Indicates whether the m-th anchor box contains the target's true label (0 or 1). This indicates the prediction confidence level for whether the m-th anchor box contains the target. , Indicates the height and width of the mask. This represents the actual mask value (0 or 1) at position (x, y). This represents the prediction mask value (between 0 and 1) at position (x, y). Represents the set of pixels for the prediction mask. The set of pixels representing the actual mask. This represents the number of pixels in the intersection of the predicted mask and the true mask. This represents the total number of foreground pixels in the predicted mask. This represents the total number of foreground pixels in the actual mask.

[0017] Furthermore, it also includes a data fusion and display module; The data fusion and display module is used to fuse and display the gas concentration data obtained by the TDLAS scanning detection module and the suspected leak area, gas diffusion trend, and final gas leak point output by the scene understanding and leak situation assessment module.

[0018] A method for tracing the source and assessing the situation of a gas leak, comprising the aforementioned apparatus for tracing the source and assessing the situation of a gas leak, and comprising the following specific steps: Step S1: System initialization, setting the target gas type, acquiring environmental parameters through the environmental parameter acquisition module, and acquiring scene images through the scene imaging module; Step S2: The target detection model processes the scene image and detects the location information of suspected leakage points in the scene image; Step S3: If a suspected leak point is detected in step S2, the suspected leak area corresponding to the suspected leak point is mapped to the TDLAS scanning detection module. The TDLAS scanning detection module performs high-density scanning on the suspected leak area and low-density scanning on the non-suspected leak area. If no suspected leak point is detected in step S2, then uniform or adaptive density scanning is performed on the entire scene or the specified area of ​​interest. Step S4: The concentration data obtained by the TDLAS scanning detection module scanning each scanning point and the corresponding coordinates are correlated to obtain a concentration matrix; Step S5: Based on the Gaussian plume model, the gas diffusion of the leakage source is simulated, and the theoretical concentration of each observation point is calculated. An objective function is constructed based on the concentration value of each scanning point in the concentration matrix, the corresponding coordinates, and the theoretical concentration of the corresponding observation point. The objective function is then solved in reverse by an optimization algorithm to obtain the optimal leakage source. The final gas leakage point is obtained by combining the location information of the optimal leakage source and the suspected leakage point.

[0019] The beneficial effects of this invention are as follows: 1. This invention incorporates a TDLAS scanning detection module and a scene understanding and leak situation assessment module. Through a collaborative mechanism of "scene understanding-guided TDLAS scanning," it cleverly resolves the inherent contradiction between high-precision detection and high-efficiency surveying. It is particularly suitable for time-sensitive micro-leakage emergency response scenarios, effectively addressing the problems of weak rapid source location and poor leak detection accuracy in trace gas leaks. Using TDLAS's high-precision concentration measurement as the core detection method, it can optionally be combined with image target detection / semantic segmentation for auxiliary location, ensuring both accuracy and reliability of detection while improving TDLAS scanning efficiency. This collaborative detection approach leverages complementary advantages, achieving a balance between high efficiency and accuracy.

[0020] 2. This invention breaks through the bottleneck of micro-leakage detection. It does not rely on the visibility of gas in the image, but initiates accurate detection by identifying the structure of potential leak sources, fundamentally overcoming the failure problem of traditional imaging methods in micro-leakage scenarios. For low-concentration, small-scale leaks that are difficult to detect by traditional methods, this invention can effectively identify and locate them through collaborative mechanisms and physical modeling, and is suitable for application scenarios such as daily inspections of refining and chemical enterprises and detection of micro-cracks in pipelines.

[0021] 3. In this invention, the source tracing of gas leaks is highly accurate and robust. By adopting an inverse inversion method based on a Gaussian plume model, the prior physical knowledge of gas diffusion is fully utilized, enabling stable and accurate location of the leak source even with only a small number of sparse concentration sampling points, avoiding misjudgments caused by local concentration fluctuations. This invention can be used as an auxiliary detection tool, either in conjunction with manual inspections or integrated into automated monitoring systems. The detection results are output in the form of visual reports, reducing the professional knowledge requirements for operators.

[0022] 4. This invention provides complete decision support, from leak detection and source location to diffusion situation simulation and visualization. It offers an end-to-end solution, generating comprehensive and intuitive information that greatly enhances the situational awareness and decision-making efficiency of on-site personnel. Through multimodal data fusion, it combines abstract concentration data with real-world scenarios to generate intuitive visualization results. Users can clearly see where the gas leaked from, how it diffused, and the extent of its impact, facilitating rapid decision-making and response.

[0023] 5. In this invention, the TDLAS scanning strategy is adaptively adjusted according to the detection results, with high-density scanning of suspected areas and low-density scanning of other areas. Compared with traditional uniform scanning across the entire field, it can save more than 50% of the scanning time, making it particularly suitable for large-scale rapid inspection scenarios, achieving intelligent scanning and significantly improving scanning efficiency.

[0024] 6. In this invention, a Gaussian plume model is introduced, and the physical laws of gas diffusion are used to infer the location and intensity of the leak source from limited detection point data. The source can be accurately traced through physical modeling. Compared with simply relying on the concentration peak to determine the leak source, this invention considers environmental factors such as wind direction and wind speed, which significantly improves the accuracy of source tracing. Attached Figure Description

[0025] Figure 1 This is a schematic diagram of the device in this invention; Figure 2 This is a schematic diagram of the target detection model in this invention. Detailed Implementation

[0026] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments.

[0027] Therefore, 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.

[0028] Example 1 This embodiment provides a device for tracing the source and assessing the situation of gas leaks. It uses TDLAS two-dimensional scanning to form a concentration matrix and employs scene perception algorithms to analyze scene images to assist in localization. Combined with a Gaussian plume model, it simulates the gas diffusion situation, ultimately achieving high-precision detection, source analysis, and leak situation assessment of trace gas leaks. Furthermore, the analysis results can be visualized, making it suitable for assisting manual inspections and automated monitoring scenarios. It includes: an environmental parameter acquisition module, a scene imaging module, a TDLAS scanning detection module, and a scene understanding and leak situation assessment module, such as... Figure 1 As shown.

[0029] The environment parameter acquisition module is used to acquire environment parameters.

[0030] This environmental parameter acquisition module consists of various sensors used to measure environmental parameters such as wind speed, wind direction, temperature, humidity, and atmospheric stability. This module can be selected based on requirements and existing technologies can be used; no inventive effort is required from those skilled in the art.

[0031] The scene imaging module is used to image the detected scene and obtain a scene image.

[0032] The scene imaging module can be a visible light imaging module, an infrared imaging module, or a dual-mode imaging module combining visible light and infrared. The scene imaging module can be selected according to requirements and existing technologies can be applied; no inventive effort is required from those skilled in the art.

[0033] The TDLAS scanning detection module is used to detect the location information of suspected leak points from scene images based on the target detection model of the scene understanding and leak situation assessment module, and to detect the area of ​​suspected leak points to obtain multi-point gas concentration data and form a concentration matrix.

[0034] This TDLAS scanning detection module can be selected based on requirements and can utilize existing technologies. It includes at least a probe light emitter, a beam angle control unit, an optical receiving unit, and a signal processing unit. The probe light emitter emits laser light of a specific wavelength, and the beam angle control unit adjusts the laser emission angle point-by-point according to a set scanning trajectory (grid or spiral). After the laser light passes through the gas, it is diffusely reflected by the background object, and the optical receiving unit receives the reflected light signal. The signal processing unit analyzes the received signal and calculates the gas concentration at each scanning point based on the absorption spectrum characteristics. This TDLAS scanning detection module is used for multi-point detection of a target area, acquiring multi-point gas concentration data and forming a concentration matrix.

[0035] The scene understanding and leakage situation assessment module includes a target detection model and a Gaussian plume model. The target detection model uses the location information of suspected leak points detected in scene images, including flanges, pipes, and gas nozzles. The Gaussian plume model calculates the theoretical concentration at each observation point. The TDLAS scanning detection module uses each concentration value and corresponding coordinate in the concentration matrix, along with the theoretical concentration at the corresponding observation point, to construct an objective function. An optimization algorithm is then used to inversely solve the objective function to obtain the optimal leak source. Combining environmental parameters (including wind speed, wind direction, temperature, humidity, and atmospheric stability), the optimal leak source, and the location information of suspected leak points, the final gas leak point (including location coordinates, leak intensity, and diffusion trend) is calculated and obtained.

[0036] In practical applications, this scenario understanding and leakage situation assessment module utilizes the concentration matrix obtained by the TDLAS scanning detection module, along with measured environmental parameters (which can be manually input or automatically acquired by embedded sensors). By constructing an objective function and optimizing the algorithm in reverse, it fits the most probable coordinate location of the leakage source. and leakage source strength The specific steps are as follows: Step 1: Use each concentration value and its corresponding coordinate in the concentration matrix obtained by the TDLAS scanning detection module as observation data; Step 2: Determine the location of the leak source and leakage source strength Both are unknown parameters; Step 3: Calculate the theoretical concentration at each observation point using the Gaussian plume model; The scenario understanding and leakage situation assessment module uses the Gaussian plume model as the mathematical model for gas diffusion. The Gaussian plume model describes the concentration distribution of leaked gas from a point source in the atmosphere. When calculating the theoretical concentration at each observation point, the formula for calculating the concentration distribution using the Gaussian plume model is: ; in, Represents the spatial coordinates of the observation point. Indicates the downwind observation point The gas concentration; This indicates the strength of the leakage source, which is an unknown quantity; This represents the average wind speed. This indicates the extent of gas diffusion in the horizontal direction perpendicular to the wind direction. Indicates the extent of gas diffusion in the direction perpendicular to the ground; This indicates the height of the leak source, which is an unknown quantity.

[0037] Step 4: Construct an objective function that minimizes the sum of squared residuals between the theoretical and measured concentrations; The objective function constructed is based on the least squares method, and its expression is: ; in, Spatial coordinates representing the location of the leak source Indicates the strength of the leak source. Indicates the number of observation points. This indicates the first result obtained through the TDLAS scanning detection module. Measured concentrations at each observation point This represents the first result calculated based on the Gaussian plume model. Theoretical concentration at each observation point.

[0038] Step 5: Solve the objective function in reverse using an optimization algorithm to obtain the optimal leakage source parameters; The optimization algorithms include Particle Swarm Optimization (PSO) and the Levenberg-Marquardt algorithm, avoiding the problem of single algorithms easily getting trapped in local optima and improving the accuracy of source tracing. The reverse solution steps are as follows: First, the particle swarm optimization algorithm (PSO, an existing algorithm) is used to perform a global search to obtain an initial solution; Then, the Levenberg-Marquardt algorithm (an existing algorithm) is used for local fine-grained solution.

[0039] Step 6: Using the trained target detection model, detect the location information of suspected leak points such as flanges and pipes from the scene image; In step six, the target detection model includes a backbone network, a neck network, and a detection head, such as... Figure 2 As shown, the backbone network consists of four C3k2 modules, each incorporating a dynamic serpentine convolution DSConv. The neck network consists of four BiFPN modules, which employ bidirectional cross-scale connectivity and weighted feature fusion. A coordinate attention mechanism is embedded in the feature fusion node, encoding both lateral and longitudinal positional information to enable the model to adaptively focus on the spatial location features of small leak points while maintaining a lightweight design to meet real-time detection requirements.

[0040] The backbone network comprises the following modules arranged sequentially: Conv#1, Conv#2, C3k2#1, Conv#3, C3k2#2, Conv#4, C3k2#3, Conv#5, C3k2#4, SPPF, and C2PSA. The C3k2#2, C3k2#3, and C2PSA modules output feature maps F1, F2, and F3 at three different scales. Furthermore, each C3k2 module incorporates a dynamic serpentine convolution DSConv. DSConv adapts to the irregular boundaries of gas diffusion through freely deformable convolution kernel shapes, enhancing the feature extraction capability for irregular morphologies in leak areas.

[0041] The neck network includes Conv#6 module, Conv#7 module, Conv#8 module, Conv#9 module, Conv#10 module, upsampling#1 module, upsampling#2 module, BiFPN#1 module, BiFPN#2 module, BiFPN#3 module, BiFPN#4 module, RepNCSPELAN#1 module, RepNCSPELAN#2 module, RepNCSPELAN#3 module, and RepNCSPELAN#4 module. The feature maps F1, F2, and F3 output from the C2PSA module of the backbone network are used as inputs to the Conv#8, Conv#7, and Conv#6 modules, respectively. The output of the Conv#6 module, after being upsampled by the #1 module, is combined with the output of the Conv#7 module as input to the BiFPN#1 module. The output of the BiFPN#1 module is then used as input to the RepNCSPELAN#1 module. The output of the RepNCSPELAN#1 module, after being upsampled by the #2 module, is combined with the output of the Conv#8 module as input to the BiFPN#2 module. The output of the BiFPN#2 module is then used as input to the RepNCSPELAN#2 module. The output of the RepNCSPELAN#2 module is input to the detection head #1 on one hand, and then, after passing through the Conv#9 module, it is combined with the output of the RepNCSPELAN#1 module as the input of the BiFPN#3 module. The output of the BiFPN#3 module is used as the input of the RepNCSPELAN#3 module. The output of the RepNCSPELAN#3 module is input to the detection head #2 on one hand, and then, after passing through the Conv#10 module, it is combined with the output of the Conv#6 module as the input of the BiFPN#4 module. The output of the BiFPN#4 module is then used as the input of the detection head #3 after passing through the RepNCSPELAN#4 module.

[0042] Furthermore, during the training of the object detection model, a scale-aware weighting mechanism is introduced for target augmentation in small target regions, based on the object detection loss and instance segmentation loss. The total loss function is: ; Target detection loss for: ; Classification loss for: ; Bounding box regression loss for: ; Target confidence loss for: ; Target segmentation loss for: ; Mask loss for: ; Dice coefficient loss for: ; Small goals increase losses for: ; Small target detection loss for: ; in, , , represent the weights of the object detection loss, object segmentation loss, and small object augmentation loss, respectively. Represents classification loss. This represents the bounding box regression loss. Indicates the target confidence loss. Indicates mask loss. This represents the Dice coefficient loss. This represents the weighting coefficient for smaller objectives. This indicates the loss in small target detection. This represents the classification loss for small targets. The bounding box regression loss represents the small target. This represents the target confidence loss for smaller targets; Represents the total number of samples. This represents the true class label (0 or 1) of the j-th sample. This represents the probability that the j-th sample is predicted as positive. This represents the intersection-union ratio (IoU) between the predicted bounding box and the ground truth bounding box. This represents the Euclidean distance between the center point of the predicted bounding box and the center point of the ground truth bounding box. This indicates the coordinates of the center point of the prediction box. This represents the coordinates of the center point of the true bounding box. This represents the length of the line connecting the smallest bounding rectangle that encloses the predicted bounding box and the ground truth bounding box. Indicates the total number of anchor frames. Indicates whether the m-th anchor box contains the target's true label (0 or 1). This indicates the prediction confidence level for whether the m-th anchor box contains the target. , Indicates the height and width of the mask. This represents the actual mask value (0 or 1) at position (p, q). This represents the prediction mask value (between 0 and 1) at position (p, q). Represents the set of pixels for the prediction mask. The set of pixels representing the actual mask. This represents the number of pixels in the intersection of the predicted mask and the true mask. This represents the total number of foreground pixels in the predicted mask. This represents the total number of foreground pixels in the actual mask.

[0043] For targets with a bounding box area smaller than 32*32 pixels, assign a weight of 1.5 times. , , The values ​​were determined to be 0.6, 0.25, and 0.5, respectively.

[0044] During training, a transfer learning strategy was adopted, using the YOLO11-seg network pre-trained on the COCO dataset as the initial weights, and then fine-tuning it on a labeled industrial scenario gas leak dataset.

[0045] Step 7: Based on environmental parameters, optimal leak source parameters, and location information of suspected leak points, the final gas leak point is obtained.

[0046] The scenario understanding and leakage situation assessment module can also calculate the gas concentration distribution of the entire scenario based on the fitted leakage source parameters, generate a complete concentration field, and supplement the areas not scanned by TDLAS to form a more comprehensive leakage situation map.

[0047] When calculating the gas concentration distribution across the entire scenario, this forward calculation is also based on the aforementioned Gaussian plume diffusion model. Specifically, the method involves using the fitted coordinates of the leak source location... and leakage intensity By combining real-time collected environmental parameters such as wind speed, wind direction, and atmospheric stability, and substituting them into the Gaussian plume diffusion formula... Calculate any point in the scene The theoretical concentration value is obtained, thereby generating a complete concentration field covering the entire monitoring area.

[0048] Example 2 Based on Embodiment 1, a data fusion and display module is also included.

[0049] The data fusion and display module is used to fuse and display the gas concentration data obtained by the TDLAS scanning detection module and the suspected leak area, gas diffusion trend, and final gas leak point output by the scene understanding and leak situation assessment module.

[0050] This data fusion and display module merges the results of processing information from different sources: (1) Base layer: The scene image is used as the base image; (2) TDLAS data layer: TDLAS measured concentration data (in scatter or raster form) are displayed using pseudo-color mapping; (3) Diffusion simulation layer: Combine environmental data and scene images to establish a Gaussian plume model and simulate the gas leakage concentration field (presented as isoconcentration lines or heat maps). (4) Highlight layer of leakage area (optional): Based on the suspected area identified by the scene perception module, the boundary of the suspected leakage area can be displayed (marked in a semi-transparent manner) for comparison and verification; (5) Annotation Layer (Optional): Annotates the calculated location of the leak source (highlighted with a special icon) and displays key information such as the leak intensity. The data for this annotation layer comes from the leak source parameters obtained by the scene understanding and leak situation assessment module through inverse solution fitting, including the leak source location coordinates. and leakage intensity Unlike the leak area highlight layer and diffusion simulation layer, the annotation layer is only used to visually present the source tracing results on the visualization interface.

[0051] Through the processing and fusion of multi-layered information, users can intuitively see: where the suspected leak area is (segmentation results), how high the actual concentration is (TDLAS data), how the gas diffuses (plume model), and where the leak source is most likely (source tracing results).

[0052] Example 3 This embodiment provides a method for tracing the source and assessing the situation of gas leaks, which uses the apparatus for tracing the source and assessing the situation of gas leaks described in Embodiment 1 or Embodiment 2 above. The specific steps are as follows: Step S1: System initialization, setting the target gas type, acquiring environmental parameters through the environmental parameter acquisition module, and acquiring scene images through the scene imaging module.

[0053] The environmental parameters include wind speed, wind direction, temperature, humidity, and atmospheric stability.

[0054] Step S2: The target detection model processes the scene image and detects the location information of suspected leak points such as flanges, pipes, and gas tanks in the scene image.

[0055] The pixel coordinate range of the suspected leakage area output by the target detection model is used as a reference for TDLAS scanning.

[0056] Step S3: If a suspected leak point is detected in step S2, the suspected leak area corresponding to the suspected leak point is mapped to the TDLAS scanning detection module. The TDLAS scanning detection module performs high-density scanning on the suspected leak area and low-density scanning on the non-suspected leak area. If no suspected leak point is detected in step S2, then uniform or adaptive density scanning is performed on the entire scene or the specified area of ​​interest.

[0057] Step S4: The TDLAS scanning detection module scans each scanning point and associates the obtained concentration data with the corresponding coordinates to obtain a concentration matrix.

[0058] Step S5: Based on the Gaussian plume model, the gas diffusion of the leakage source is simulated, and the theoretical concentration of each observation point is calculated. An objective function is constructed based on the concentration value of each scanning point in the concentration matrix, the corresponding coordinates, and the theoretical concentration of the corresponding observation point. The objective function is then solved in reverse by an optimization algorithm to obtain the optimal leakage source. The final gas leakage point is obtained by combining the location information of the optimal leakage source and the suspected leakage point.

[0059] During diffusion simulation, the input parameters are: TDLAS concentration matrix, environmental parameters (wind speed, wind direction, atmospheric stability, etc.), and scene geometry information (detection distance, equipment height, etc.). Set optimization variables: Leakage source location coordinates and leakage intensity ; Optimization algorithms (such as Levenberg-Marquardt algorithm, particle swarm optimization, etc.) are used to solve for the optimal parameters, so as to minimize the error between the model-predicted concentration and the measured concentration. Output results: estimated location of the leak source, estimated leak intensity, and goodness-of-fit index (such as R², RMSE).

[0060] Example 4 Based on Example 3, the following steps are also included: Step S6: Using the leak source parameters obtained from the source tracing, calculate the gas concentration distribution of the entire detection scenario in a forward direction to generate a complete simulated concentration field; Step S7: Data fusion and visualization; The background image, leak area, TDLAS measured concentration, simulated concentration field, and leak source location are processed and fused together; pseudo-color mapping is used to visualize the concentration information, with low concentrations displayed in cool colors (blue and green) and high concentrations displayed in warm colors (yellow and red); the location of the leak source and the value of the leak intensity can be optionally marked; Step S8: Auxiliary decision output; Based on the leakage intensity and gas diffusion range, assess the leakage level (minor leak, slight leak, severe leak, etc.); combine scenario information to indicate potentially affected areas and recommended measures; generate a detection report, including detection time, location, leak source coordinates, concentration distribution map, leakage intensity, and other information.

[0061] Furthermore, in micro-leakage scenarios, due to the low gas concentration and small diffusion range, there may be cases of missed detection or incomplete segmentation. Therefore, the synergistic mechanism of this application plays an important role: (1) The scene imaging module guides the TDLAS scanning detection module to prioritize scanning of suspected leakage areas, thereby improving detection efficiency; (2) The high-precision concentration data of the TDLAS scanning detection module provides an accurate basis for gas leak detection and gas leak situation assessment, especially in scenarios where infrared gas cloud imaging is not possible; (3) The Gaussian plume model in the scenario understanding and leakage situation assessment module uses limited concentration data points to deduce the leakage source through physical laws and simulate the gas diffusion concentration field; (4) The complete concentration field obtained from the simulation supplements the information of the unscanned area, forming a comprehensive leakage situation map.

Claims

1. A device for tracing the source and assessing the situation of gas leaks, characterized in that: It includes an environmental parameter acquisition module, a scene imaging module, a TDLAS scanning and detection module, and a scene understanding and leakage situation assessment module; The environment parameter acquisition module is used to acquire environment parameters; The scene imaging module is used to image the detected scene and obtain a scene image; The TDLAS scanning detection module is used to detect the location information of suspected leak points detected from the scene image based on the target detection model of the scene understanding and leak situation judgment module, to detect the area of ​​suspected leak points, obtain multi-point gas concentration data, and form a concentration matrix. The scene understanding and leakage situation assessment module includes a target detection model and a Gaussian plume model. The target detection model is used to detect the location information of suspected leakage points from scene images; the Gaussian plume model is used to calculate the theoretical concentration of each observation point and obtain the gas diffusion trend. The objective function is constructed by using the concentration matrix obtained by the TDLAS scanning detection module, along with the corresponding coordinates and the theoretical concentration of the corresponding observation point. The objective function is then solved in reverse using an optimization algorithm to obtain the optimal leak source. The final gas leak point is obtained by combining environmental parameters, the optimal leak source, and the location information of suspected leak points.

2. The device for tracing the source and assessing the situation of gas leaks as described in claim 1, characterized in that: When using the scenario understanding and leakage situation assessment module to determine the final gas leak point, the specific steps are as follows: Step 1: Use each concentration value and its corresponding coordinate in the concentration matrix obtained by the TDLAS scanning detection module as observation data; Step 2: Determine the location of the leak source and leakage source strength ; Step 3: Calculate the theoretical concentration at each observation point using the Gaussian plume model; Step 4: Construct an objective function that minimizes the sum of squared residuals between the theoretical and measured concentrations; Step 5: Solve the objective function in reverse using an optimization algorithm to obtain the optimal leakage source parameters; Step 6: Using the trained target detection model, detect the location information of suspected leak points from the scene image; Step 7: Based on environmental parameters, optimal leak source parameters, and location information of suspected leak points, the final gas leak point is obtained.

3. The device for tracing the source and assessing the situation of gas leaks as described in claim 2, characterized in that: In step three, when calculating the theoretical concentration at each observation point, the Gaussian plume model uses the following formula to calculate the concentration distribution: ; in, Represents the spatial coordinates of the observation point. Indicates the downwind observation point The gas concentration; Indicates the strength of the leakage source; This represents the average wind speed. This indicates the extent of gas diffusion in the horizontal direction perpendicular to the wind direction. Indicates the extent of gas diffusion in the direction perpendicular to the ground; Indicates the height of the leak source.

4. The device for tracing the source and assessing the situation of gas leaks as described in claim 2, characterized in that: In step four, the objective function constructed is: ; in, Spatial coordinates representing the location of the leak source Indicates the strength of the leak source. Indicates the number of observation points. This indicates the first result obtained through the TDLAS scanning detection module. Measured concentrations at each observation point This represents the first result calculated based on the Gaussian plume model. Theoretical concentration at each observation point.

5. The device for tracing the source and assessing the situation of gas leaks as described in claim 2, characterized in that: In step five, the optimization algorithms include particle swarm optimization and Levenberg-Marquardt algorithm; The steps for reverse engineering are as follows: First, a global search is performed using the particle swarm optimization algorithm to obtain an initial solution; Then, the Levenberg-Marquardt algorithm is used for local fine-grained solution.

6. The device for tracing the source and assessing the situation of a gas leak as described in claim 2, characterized in that: In step six, the target detection model includes a backbone network, a neck network, and a detection head; The backbone network consists of the following modules arranged in sequence: Conv#1, Conv#2, C3k2#1, Conv#3, C3k2#2, Conv#4, C3k2#3, Conv#5, C3k2#4, SPPF, and C2PSA. The C3k2#2, C3k2#3, and C2PSA modules output feature maps F1, F2, and F3 at three different scales. The neck network includes Conv#6 module, Conv#7 module, Conv#8 module, Conv#9 module, Conv#10 module, upsampling#1 module, upsampling#2 module, BiFPN#1 module, BiFPN#2 module, BiFPN#3 module, BiFPN#4 module, RepNCSPELAN#1 module, RepNCSPELAN#2 module, RepNCSPELAN#3 module, and RepNCSPELAN#4 module. The feature maps F1, F2, and F3 output from the C2PSA module of the backbone network are used as inputs to the Conv#8, Conv#7, and Conv#6 modules, respectively. The output of the Conv#6 module, after being upsampled by the #1 module, is combined with the output of the Conv#7 module as input to the BiFPN#1 module. The output of the BiFPN#1 module is then used as input to the RepNCSPELAN#1 module. The output of the RepNCSPELAN#1 module, after being upsampled by the #2 module, is combined with the output of the Conv#8 module as input to the BiFPN#2 module. The output of the BiFPN#2 module is then used as input to the RepNCSPELAN#2 module. The output of the RepNCSPELAN#2 module is input to the detection head #1 on one hand, and then, after passing through the Conv#9 module, it is combined with the output of the RepNCSPELAN#1 module as the input of the BiFPN#3 module. The output of the BiFPN#3 module is used as the input of the RepNCSPELAN#3 module. The output of the RepNCSPELAN#3 module is input to the detection head #2 on one hand, and then, after passing through the Conv#10 module, it is combined with the output of the Conv#6 module as the input of the BiFPN#4 module. The output of the BiFPN#4 module is then used as the input of the detection head #3 after passing through the RepNCSPELAN#4 module.

7. The device for tracing the source and assessing the situation of a gas leak as described in claim 6, characterized in that: When training the object detection model, the total loss function is: ; Target detection loss for: ; Classification loss for: ; Bounding box regression loss for: ; Target confidence loss for: ; Target segmentation loss for: ; Mask loss for: ; Dice coefficient loss for: ; Small goals increase losses for: ; Small target detection loss for: ; in, , , represent the weights of the object detection loss, object segmentation loss, and small object augmentation loss, respectively. Indicates the target detection loss. Indicates the target segmentation loss. This indicates that smaller targets increase losses. Represents classification loss. This represents the bounding box regression loss. Indicates the target confidence loss. Indicates mask loss. This represents the Dice coefficient loss. This represents the weighting coefficient for smaller objectives. This indicates the loss in small target detection. This represents the classification loss for small targets. The bounding box regression loss represents the small target. This represents the target confidence loss for smaller targets; Represents the total number of samples. This represents the true class label (0 or 1) of the j-th sample. This represents the probability that the j-th sample is predicted as positive. This represents the intersection-union ratio (IoU) between the predicted bounding box and the ground truth bounding box. This represents the Euclidean distance between the center point of the predicted bounding box and the center point of the ground truth bounding box. This indicates the coordinates of the center point of the prediction box. This represents the coordinates of the center point of the true bounding box. This represents the length of the line connecting the smallest bounding rectangle that encloses the predicted bounding box and the ground truth bounding box. Indicates the total number of anchor frames. Indicates whether the m-th anchor box contains the target's true label (0 or 1). This indicates the prediction confidence level for whether the m-th anchor box contains the target. , Indicates the height and width of the mask. This represents the actual mask value (0 or 1) at position (p, q). This represents the prediction mask value (between 0 and 1) at position (p, q). Represents the set of pixels for the prediction mask. The set of pixels representing the actual mask. This represents the number of pixels in the intersection of the predicted mask and the true mask. This represents the total number of foreground pixels in the predicted mask. This represents the total number of foreground pixels in the actual mask.

8. The device for tracing the source and assessing the situation of a gas leak as described in claim 1, characterized in that: It also includes a data fusion and display module; The data fusion and display module is used to fuse and display the gas concentration data obtained by the TDLAS scanning detection module and the suspected leak area, gas diffusion trend, and final gas leak point output by the scene understanding and leak situation assessment module.

9. A method for tracing the source and assessing the situation of gas leaks, characterized in that: The apparatus for tracing the source and assessing the situation of gas leaks, as described in any one of claims 1-8, comprises the following steps: Step S1: System initialization, setting the target gas type, acquiring environmental parameters through the environmental parameter acquisition module, and acquiring scene images through the scene imaging module; Step S2: The target detection model processes the scene image and detects the location information of suspected leakage points in the scene image; Step S3: If a suspected leak point is detected in step S2, the suspected leak area corresponding to the suspected leak point is mapped to the TDLAS scanning detection module. The TDLAS scanning detection module performs high-density scanning on the suspected leak area and low-density scanning on the non-suspected leak area. If no suspected leak point is detected in step S2, then uniform or adaptive density scanning is performed on the entire scene or the specified area of ​​interest. Step S4: The concentration data obtained by the TDLAS scanning detection module scanning each scanning point and the corresponding coordinates are correlated to obtain a concentration matrix; Step S5: Based on the Gaussian plume model, the gas diffusion of the leakage source is simulated, and the theoretical concentration of each observation point is calculated. An objective function is constructed based on the concentration value of each scanning point in the concentration matrix, the corresponding coordinates, and the theoretical concentration of the corresponding observation point. The objective function is then solved in reverse by an optimization algorithm to obtain the optimal leakage source. The final gas leakage point is obtained by combining the location information of the optimal leakage source and the suspected leakage point.