A method and system for detecting hydrogen leaks
By using visual detection tape and visual sensors combined with deep learning models on hydrogen pipelines, the problems of real-time detection and data fusion in hydrogen leak detection have been solved, enabling accurate identification and early warning, reducing operation and maintenance costs, and forming an intelligent safety management system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- YINGKOU INST OF TECH
- Filing Date
- 2026-05-09
- Publication Date
- 2026-06-30
AI Technical Summary
Existing hydrogen leak detection technologies suffer from limited monitoring range, delayed response, poor environmental adaptability, high cost, susceptibility to interference, and failure to achieve real-time assessment and early warning.
By employing visual hydrogen leak detection tape, visual sensing devices, virtual pipeline models, and deep learning models, combined with fluid dynamics simulation, accurate real-time detection and early warning of hydrogen leaks can be achieved.
It has achieved accurate identification and quantitative assessment of hydrogen leaks, reduced false alarm rates, enabled 24/7 unmanned intelligent monitoring, reduced operation and maintenance costs, broken down data fusion barriers, and provided digital safety management infrastructure.
Abstract
Description
Technical Field
[0001] This invention relates to the field of hydrogen leak detection technology, specifically to a hydrogen leak detection method and system. Background Technology
[0002] Hydrogen, as an important clean energy source and industrial raw material, is widely used in fields such as hydrogen metallurgy. However, its small molecular size and flammable and explosive properties also bring extremely high leakage risks. Current mainstream detection technologies all have significant limitations: point-based gas sensors have limited monitoring range, slow response, and poor environmental adaptability; infrared or ultrasonic detection technologies are expensive and easily affected by complex industrial environments; traditional methods combining manual inspection with color-changing tape are inefficient, have blind spots, and rely on subjective judgment. Although there have been attempts to automate this through cameras and image processing, these methods are mostly based on simple color threshold comparisons, are easily affected by changes in lighting and contamination, have high false alarm rates, and have not been deeply integrated with factory digital management systems, failing to achieve real-time assessment and predictive early warning of leakage situations. Therefore, there is an urgent need to develop an intelligent leak monitoring solution that can adapt to complex working conditions, achieve accurate real-time detection, and deeply integrate with digital systems. Summary of the Invention
[0003] To solve the above technical problems, the present invention provides the following technical solution: a hydrogen leak detection method and system, comprising:
[0004] A physical detection layer, comprising a visual hydrogen leak detection tape attached to the outer surface of the hydrogen pipeline to be monitored, wherein the detection tape undergoes a reversible or irreversible color change upon contact with hydrogen.
[0005] A data perception layer, comprising a visual sensing device deployed around the pipe for continuously acquiring video stream data containing the detection tape at a preset frame rate;
[0006] A digital twin layer, comprising a virtual pipeline model that is mapped in real time to a physical pipeline, the virtual pipeline model integrating a fluid dynamics simulation engine;
[0007] The data analysis and decision-making layer includes a preprocessing module, a hydrogen leak visual recognition model, and a twin-driven and feedback module.
[0008] The preprocessing module is used to perform image alignment and region of interest extraction on the video stream data, and to convert the RGB image to the HSL color space;
[0009] The hydrogen leak visual recognition model includes:
[0010] The spatial feature extraction unit is used to extract spatial feature vectors representing color distribution and texture from the HSL image of the current frame;
[0011] The temporal change analysis unit is used to perform differential calculation and processing on continuous video frames to extract temporal feature vectors that characterize the motion trend and diffusion rate of the changing region.
[0012] The feature fusion and decision unit is used to fuse the spatial feature vector and the temporal feature vector, and to determine the leakage event based on the fused feature vector. When a leakage is determined, the leakage area segmentation map, color change level and diffusion rate parameters are output simultaneously.
[0013] The twin-driven and feedback module is used to synchronize the discrimination results and parameters output by the hydrogen leak visual recognition model to the virtual pipeline model for visualization and dynamic simulation of the leak, and to generate early warning and handling instructions.
[0014] Preferably, the temporal variation analysis unit calculates the differential image sequence between consecutive video frames and extracts the temporal feature vector using a temporal encoder, wherein the temporal encoder is a 3D convolutional neural network or a Transformer encoder structure.
[0015] Preferably, the feature fusion and decision unit includes a sub-network for outputting a pixel-level leak region segmentation map, and a sub-network for regression calculation of color change level and diffusion rate, wherein the color change level is determined based on a comprehensive assessment of the hue deviation from the reference value and the degree of saturation increase of the leak region.
[0016] Preferably, the hydrogen leak visual recognition model is a neural network model based on temporal features and multispectral fusion. It is trained using labeled video stream data that includes normal state, simulated leak color change process and interference scene. The labels include leak area mask, color change level label and change trajectory.
[0017] Preferably, the warning and response instructions generated by the twin-driven and feedback module control the system to perform at least one of the following operations:
[0018] The leak point and simulated diffusion cloud map are highlighted in the digital twin visualization interface;
[0019] Trigger the audible and visual alarm;
[0020] Send alarm information including the location, level, and spread rate of the leak to the maintenance personnel's terminal;
[0021] Automatically adjust or close valves associated with leak points.
[0022] A method for detecting hydrogen leaks includes the following steps:
[0023] S1: Construct a digital twin virtual pipeline model corresponding to the physical hydrogen pipeline and the attached inspection tape;
[0024] S2: Continuously acquire video streams of the monitored area through a visual sensing device, and perform image preprocessing and color space conversion;
[0025] S3: Input the preprocessed continuous video frames into the hydrogen leak visual recognition model;
[0026] S4: The model extracts spatial and temporal feature vectors through a spatial feature extraction unit and a temporal change analysis unit, respectively, and then performs comprehensive discrimination through feature fusion and decision-making unit;
[0027] S5: If a leak is detected, output structured data including the leak area, color change level, and diffusion rate;
[0028] S6: Inject the structured data into the digital twin virtual pipeline model, drive the model to visualize the leakage situation and simulate the diffusion, and generate and execute feedback instructions accordingly.
[0029] Preferably, in step S4, the comprehensive judgment process specifically includes:
[0030] Based on the fused feature vectors, a binary classification is first performed to determine whether leakage has occurred;
[0031] If a leak is identified, a pixel-level segmentation map of the leak area is generated by segmentation subnetwork, and the color change level and diffusion rate are calculated by regression subnetwork.
[0032] Preferably, in step S6, the diffusion simulation specifically includes:
[0033] By utilizing the fluid dynamics simulation engine within the virtual pipeline model, combined with real-time output of leak location, diffusion rate parameters, and pipeline operating condition sensor data, the concentration distribution of hydrogen in space and its diffusion trend over time can be predicted.
[0034] It has the following beneficial effects:
[0035] By deeply integrating multispectral visual AI recognition with dynamic digital twins, a comprehensive upgrade has been achieved in detection capabilities, safety levels, operation and maintenance modes, and system value. Through spatiotemporal dual-dimensional analysis and HSL color space conversion, accurate identification and quantitative assessment of hydrogen leaks have been realized, effectively avoiding false alarms and missed alarms. It can also determine the severity level and diffusion rate of leaks. With the real-time fluid simulation capabilities of digital twins, dynamic prediction and visualization of leak situations have been achieved, transforming safety management from a post-event alarm to a proactive defense mode of pre-event warning and in-event analysis. It completely replaces high-risk manual inspections, realizing all-weather unmanned intelligent operation and significantly reducing operation and maintenance costs and safety risks. It breaks down information barriers between visual data, sensor data, and control systems, realizing multi-source data fusion and automated safety linkage, forming a self-learning and optimizing industrial safety intelligent hub, and providing a new generation of infrastructure-level solutions for digital safety management and control in the hydrogen energy and process industries. Detailed Implementation
[0036] The technical solutions in the embodiments of the present invention will be clearly and completely described below. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0037] In the first embodiment, the present invention provides a technical solution: the real-time hydrogen leak detection system of this embodiment is deployed on the main hydrogen transmission pipeline of a hydrogen metallurgical plant, and a hydrogen leak detection method is as follows:
[0038] Physical detection layer deployment: At all potential leakage risk points such as welds, valves, and flange connections of the pipeline, a visual hydrogen leak detection tape is tightly attached in a spiral or strip shape. The base of the tape is a waterproof and oil-proof material, and the surface is coated with a chemical indicator that is sensitive to hydrogen. Under normal conditions, it is pale yellow, and after contact with hydrogen, it turns orange, red, or even dark blue depending on the concentration and exposure time.
[0039] Data perception layer deployment: Along the pipeline corridor, an industrial high-definition network camera (visual sensing device) with an IP67 protection rating is installed every 10-15 meters. Its field of view ensures coverage of all inspection tapes within a 5-meter range on both sides. The camera is connected to the factory LAN via industrial Ethernet and continuously collects 720p resolution video streams at a rate of 15 frames per second (15fps). At the same time, pressure sensors and flow meters are installed at key nodes of the pipeline, and their data is connected to the system via the Modbus protocol.
[0040] Training and deployment of the hydrogen leak visual recognition model (HSL-ViTNet):
[0041] The experiment simulated hydrogen leaks at different locations, with different apertures, and at different pressures on the experimental pipeline, and used deployed cameras to collect hundreds of hours of video data.
[0042] The video data was annotated frame by frame, and the color-changing areas were delineated using annotation tools to generate pixel-level segmentation masks. Simultaneously, experts labeled the color-changing level of each leaked event segment based on color chart comparison and leakage rate.
[0043] Data augmentation: Randomly rotate the images (±5°), fine-tune the brightness and contrast (±10%), and add noise to simulate water stains and dust to improve the robustness of the model. Finally, a dataset containing more than 100,000 labeled images was constructed and divided into training set, validation set and test set in a 7:2:1 ratio.
[0044] Build the HSL-ViTNet model using the PyTorch framework;
[0045] Spatial feature extraction unit: The first three convolutional blocks of ResNet-18 pre-trained on ImageNet are used as the backbone, and its fully connected layers are removed to output a 512-dimensional spatial feature vector.
[0046] Temporal variation analysis unit: The input is a stack of difference images of 3 consecutive frames (t-2, t-1, t). It adopts a simple 3DCNN structure, which includes two 3D convolutional layers (kernel size 3x3x3) and pooling layers, and finally outputs a 256-dimensional temporal feature vector.
[0047] Feature Fusion and Decision Unit: The 768-dimensional fused feature vector is input into a fully connected decision network. This network first uses a binary classification output layer to determine "leakage." If leakage is detected, two parallel branches are activated:
[0048] Segmentation branch: A lightweight U-Net decoder reconstructs a binary segmentation map of the leaked region of the input image based on fused features;
[0049] Regression branch: Two fully connected layers, which output a scalar representing the color change level (1-5) and a scalar representing the diffusion rate (unit: pixels / second, calculated by analyzing the difference between the segmented area of the current frame and the previous frame).
[0050] Training process: The Adam optimizer is used with an initial learning rate of 1e-4. Cross-entropy loss is used to train the classification task, Dice loss to train the segmentation task, and mean squared error loss to train the regression task. The total loss is the weighted sum of the three losses. Early stopping is performed on the validation set to prevent overfitting.
[0051] Model Deployment: The trained model is exported in ONNX format and deployed on the factory edge computing server. This server directly receives video streams from the camera and performs real-time inference with an inference latency of less than 100 milliseconds, meeting the real-time requirements.
[0052] The system workflow is as follows:
[0053] Data acquisition and preprocessing: Camera No. 3, located near "Valve No. 12 in Area A", continuously acquires video streams. The preprocessing module first extracts the ROI region containing the detected tape from each frame image based on the pre-stored coordinates of "Valve A-12" in the digital twin model. Then, the RGB image is converted to the HSL color space.
[0054] Intelligent Recognition and Judgment: The HSL-ViTNet model receives continuous video frames. The spatial feature extraction unit discovers that the hue (H) channel of the tape ROI in the current frame shifts towards the red frequency band in a local area. Simultaneously, the temporal change analysis unit finds that this color shift region has persisted for the past 5 frames and its area is steadily expanding at a rate of approximately 120 pixels / second. The feature fusion and decision unit comprehensively judges: leakage has occurred with a confidence level of 99.5%. The segmentation branch outputs a precise outline of the color-changing region, and the regression branch determines the color-changing level to be 3, with a diffusion rate of 125 pixels / second.
[0055] Digital Twin Synchronization and Simulation: The data analysis and decision-making layer packages the above results (location: valve 12 in area A; level: 3; rate: 125) and sends them to the twin-driven module. The module immediately marks a red flashing leak point at the corresponding location in the virtual pipeline model. Centered on this point, it calls the built-in CFD (Computational Fluid Dynamics) lightweight simulation engine. The engine combines the current pipeline pressure (3MPa), wind speed (0.5m / s, from environmental sensors), and leak rate parameters to simulate the diffusion cloud map of hydrogen in the downwind direction in real time, and visualizes it in the 3D model with a semi-transparent blue gradient layer.
[0056] Decision Feedback and Execution: The system automatically triggers the following actions based on preset rules (level ≥ 3):
[0057] High-level warning: On the digital twin screen in the factory's central control room, the model of valve No. 12 in area A is highlighted and flashing, and an alarm window pops up, displaying leakage parameters and a simulated cloud map;
[0058] Information push: Alarm information (including location, level, and screenshot of simulated spread range) will be automatically pushed to regional safety officers and equipment maintenance team leaders via WeChat.
[0059] Linkage control: Send a suggested instruction to the pipeline control system: "Consider reducing the pressure of the upstream pipeline in area A and prepare to isolate valve section A-12." After operator confirmation, it can be executed with one click.
[0060] Post-event confirmation and model optimization: Maintenance personnel quickly arrive at the scene based on the alarm information, confirm the leak point, and after handling, they can mark the event as a "true positive" in the system. The relevant video clips and handling results of the event will be automatically stored in the database for future incremental learning of the HSL-ViTNet model, making its judgment on similar scenarios more accurate.
[0061] Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. All other embodiments obtained by those skilled in the art and related fields based on the embodiments of the present invention without inventive effort should fall within the scope of protection of the present invention. Structures, devices, and operating methods not specifically described and explained in the present invention, unless otherwise specified or limited, shall be implemented according to conventional means in the art.
Claims
1. A hydrogen leak detection system, characterized in that, include: A physical detection layer, comprising a visual hydrogen leak detection tape attached to the outer surface of the hydrogen pipeline to be monitored, wherein the detection tape undergoes a reversible or irreversible color change upon contact with hydrogen. A data perception layer, comprising a visual sensing device deployed around the pipe for continuously acquiring video stream data containing the detection tape at a preset frame rate; A digital twin layer, comprising a virtual pipeline model that is mapped in real time to a physical pipeline, the virtual pipeline model integrating a fluid dynamics simulation engine; The data analysis and decision-making layer includes a preprocessing module, a hydrogen leak visual recognition model, and a twin-driven and feedback module. The preprocessing module is used to perform image alignment and region of interest extraction on the video stream data, and to convert the RGB image to the HSL color space; The hydrogen leak visual recognition model includes: The spatial feature extraction unit is used to extract spatial feature vectors representing color distribution and texture from the HSL image of the current frame; The temporal change analysis unit is used to perform differential calculation and processing on continuous video frames to extract temporal feature vectors that characterize the motion trend and diffusion rate of the changing region. The feature fusion and decision unit is used to fuse the spatial feature vector and the temporal feature vector, and to determine the leakage event based on the fused feature vector. When a leakage is determined, the leakage area segmentation map, color change level and diffusion rate parameters are output simultaneously. The twin-driven and feedback module is used to synchronize the discrimination results and parameters output by the hydrogen leak visual recognition model to the virtual pipeline model for visualization and dynamic simulation of the leak, and to generate early warning and handling instructions.
2. The hydrogen leak detection system according to claim 1, characterized in that, The temporal variation analysis unit calculates the differential image sequence between consecutive video frames and extracts the temporal feature vector using a temporal encoder, which is a 3D convolutional neural network or a Transformer encoder structure.
3. The hydrogen leak detection system according to claim 1, characterized in that, The feature fusion and decision unit includes a sub-network for outputting a pixel-level leak region segmentation map, and a sub-network for regression calculation of color change level and diffusion rate, wherein the color change level is determined based on a comprehensive assessment of the hue deviation from the baseline value and the degree of saturation increase in the leak region.
4. The hydrogen leak detection system according to claim 1, characterized in that, The hydrogen leak visual recognition model is a neural network model based on the fusion of temporal features and multispectral data. It is trained using labeled video stream data that includes normal state, simulated leak color change process and interference scene. The labels include leak area mask, color change level label and change trajectory.
5. A hydrogen leak detection system according to claim 1, characterized in that, The warning and response instructions generated by the twin-driven and feedback module control the system to perform at least one of the following operations: The leak point and simulated diffusion cloud map are highlighted in the digital twin visualization interface; Trigger the audible and visual alarm; Send alarm information including the location, level, and spread rate of the leak to the maintenance personnel's terminal; Automatically adjust or close valves associated with leak points.
6. A method for detecting hydrogen leaks based on the hydrogen leak detection system according to any one of claims 1-5, characterized in that, Includes the following steps: S1: Construct a digital twin virtual pipeline model corresponding to the physical hydrogen pipeline and the attached inspection tape; S2: Continuously acquire video streams of the monitored area through a visual sensing device, and perform image preprocessing and color space conversion; S3: Input the preprocessed continuous video frames into the hydrogen leak visual recognition model; S4: The model extracts spatial and temporal feature vectors through a spatial feature extraction unit and a temporal change analysis unit, respectively, and then performs comprehensive discrimination through feature fusion and decision-making unit; S5: If a leak is detected, output structured data including the leak area, color change level, and diffusion rate; S6: Inject the structured data into the digital twin virtual pipeline model, drive the model to visualize the leakage situation and simulate the diffusion, and generate and execute feedback instructions accordingly.
7. The hydrogen leak detection method according to claim 6, characterized in that, In step S4, the comprehensive discrimination process specifically includes: Based on the fused feature vectors, a binary classification is first performed to determine whether leakage has occurred; If a leak is identified, a pixel-level segmentation map of the leak area is generated by segmentation subnetwork, and the color change level and diffusion rate are calculated by regression subnetwork.
8. A hydrogen leak detection method according to claim 6, characterized in that, In step S6, the diffusion simulation specifically involves: By utilizing the fluid dynamics simulation engine within the virtual pipeline model, combined with real-time output of leak location, diffusion rate parameters, and pipeline operating condition sensor data, the concentration distribution of hydrogen in space and its diffusion trend over time can be predicted.