Gas leakage monitoring and tracing system and method based on fixed probe and mobile detector cluster
By deploying fixed beacon probes and portable detectors in monitoring areas of industries such as chemical and petroleum, and combining data fusion and tracing algorithms on a cloud platform, the problem of locating and tracing gas leaks in complex environments has been solved, achieving accurate location and efficient emergency response.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-13
- Publication Date
- 2026-04-07
AI Technical Summary
Traditional gas leak monitoring is difficult to locate indoors or in complex environments. Fixed and mobile monitoring data lack a unified spatiotemporal reference, resulting in slow source tracing response and low accuracy, making it difficult to meet the needs of rapid emergency response.
Multiple fixed beacon probes are deployed within the monitoring area, using Bluetooth beacon signals for positioning. Combined with portable detectors, gas concentration is monitored. The cloud platform integrates the data and uses a source tracing algorithm to quickly locate the leak source. An improved weighted triangulation algorithm and neural network model are used to refine the concentration prediction.
It enables precise positioning and concentration monitoring in complex environments, improves the accuracy of source tracing and the efficiency of emergency response, and ensures the timeliness and safety of emergency response.
Smart Images

Figure CN121815404A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of gas leak monitoring technology, and in particular to a gas leak monitoring and tracing system and method based on a cluster of fixed probes and mobile detectors. Background Technology
[0002] In the safe production of industries such as chemical, petroleum, and gas, gas leak monitoring is a key link in ensuring personnel safety and environmental stability. Currently, it mainly relies on two types of technical solutions: fixed monitoring systems and portable detectors. Fixed monitoring systems deploy fixed detectors in key areas and transmit data through wired or wireless networks to achieve continuous monitoring at fixed points. Portable detectors are carried by inspection personnel and rely on GPS or manual recording of location information to complete gas detection in mobile scenarios. The data from both types of devices are finally uploaded to the monitoring center through a 4G network, and the monitoring data and the approximate location of personnel are displayed on a map. However, existing technologies face numerous bottlenecks in practical applications: GPS signals are prone to failure in scenarios such as petrochemical plants and underground pipe corridors, resulting in blind spots in indoor positioning; and the positioning accuracy of civilian GPS at 5-10 meters cannot meet the requirements for precise positioning. The GPS and 4G modules integrated in portable devices consume a lot of power, which seriously affects the device's battery life. At the same time, the lack of a unified spatial coordinate system between fixed monitoring points and mobile inspection data makes it difficult to conduct effective gas diffusion analysis, resulting in weak source tracing capabilities, inability to quickly locate the leak, and thus delaying emergency response and reducing emergency response efficiency. These problems pose a serious challenge to the reliability and safety of gas leak monitoring. Summary of the Invention
[0003] The problems solved by this invention are: traditional gas leak monitoring is difficult to locate indoors or in complex environments, lacks a unified spatiotemporal benchmark for fixed and mobile monitoring data, and has slow and low-precision source tracing response, making it difficult to meet the needs of rapid emergency response.
[0004] To address the aforementioned issues, this invention provides a gas leak monitoring and tracing method based on a cluster of fixed probes and mobile detectors. The monitoring and tracing method includes: deploying multiple fixed beacon probes within the monitoring area, with each fixed beacon probe periodically broadcasting a Bluetooth beacon signal and monitoring the gas concentration at the fixed location.
[0005] The portable detector receives Bluetooth beacon signals to perform positioning and monitors the gas concentration along the movement path; it obtains monitoring points based on fixed locations and the movement path, and acquires gas monitoring data at these points; the cloud platform receives and merges the gas monitoring data to obtain fused gas data; it determines whether to activate the emergency mode based on the gas concentration at the monitoring points; when the emergency mode is activated, the cloud platform discretizes the detection area into a grid and obtains candidate leak source grid points based on abnormal monitoring points; it calculates the predicted concentration at the monitoring points based on the leak tracing algorithm and the candidate leak grid points, and obtains the actual concentration at the monitoring points based on the fused gas data; based on the actual and predicted concentrations at the monitoring points, it obtains the most likely leak source location and evacuation route.
[0006] Compared with existing technologies, the technical effects achieved by this solution are as follows: Deploying fixed nodes with periodically broadcast Bluetooth beacons and integrating gas sensors creates a stable physical coordinate network, providing absolute or relative positional references for all mobile devices and enabling continuous gas monitoring in fixed areas. Portable detectors utilize Bluetooth beacon signals for positioning, overcoming GPS blind spots and achieving precise location and concentration monitoring along mobile paths. This fills gaps in fixed monitoring coverage, integrates monitoring resources from fixed locations and mobile paths, breaks down data barriers between fixed and mobile points, and aligns and manages discrete and heterogeneous monitoring data within a unified spatiotemporal coordinate system, laying the foundation for global analysis based on the concentration at monitoring points. The threshold rapidly triggers emergency response, preventing the risk of leakage spread. It enables intelligent switching between "routine monitoring" and "emergency source tracing," ensuring timely response. It transforms continuous monitoring areas into calculable discrete points, clarifying the range of potential leak sources and providing a suitable platform for the implementation of source tracing algorithms. Theoretical predicted concentrations of monitoring points are generated through source tracing algorithms, forming a precise comparison dimension with the fused actual concentrations. This provides core data support for leak source probability scoring, ensuring that the source tracing results are more consistent with the actual situation and improving the accuracy of source tracing. Through a dynamic emergency mode switching mechanism and evacuation route heatmap generation function, it provides visual decision support for emergency command, significantly improving the efficiency and safety of emergency response in gas leak scenarios.
[0007] In one embodiment of the present invention, the portable detector receives Bluetooth beacon signals to perform positioning and monitors the gas concentration along the movement path. Specifically, the portable detector receives multiple Bluetooth beacon signals and obtains the signal strength of each Bluetooth beacon signal; obtains the position coordinates of a fixed beacon probe based on the Bluetooth beacon signals; filters the Bluetooth beacon signals based on the signal strength and a signal strength threshold to obtain a number of valid Bluetooth beacons; when the number of valid Bluetooth beacons is greater than or equal to the number threshold, obtains the current position of the portable detector based on the signal strength and position coordinates using an improved weighted triangulation algorithm; when the number of valid Bluetooth beacons is less than the number threshold, an alternative positioning scheme is adopted.
[0008] Compared with existing technologies, the technical effects achieved by this solution are as follows: the reception of multiple Bluetooth beacon signals and the acquisition of signal strength provide the basic input for subsequent positioning calculations, while supporting effective beacon filtering, ensuring the redundancy and reliability of positioning data; the extraction of fixed beacon probe position coordinates binds Bluetooth beacon signals with known spatial coordinates, providing key reference for the positioning algorithm; effective beacon filtering improves the quality of beacon data participating in positioning calculations, ensuring positioning accuracy; and by introducing an improved weighted triangulation positioning algorithm and a dual-mode positioning mechanism with alternative positioning schemes, the problem of signal obstruction and insufficient accuracy of traditional GPS positioning in complex environments is effectively solved.
[0009] In one embodiment of the present invention, the cloud platform receives and fuses gas monitoring data to obtain fused gas data, specifically including: obtaining the gas concentration and location coordinates of each monitoring point within a target time period based on the gas monitoring data; using the gas concentration and location coordinates of each monitoring point within the target time period as the original data; establishing a spatial grid based on the monitoring area; constructing a four-dimensional data matrix of concentration-location-time based on the time resolution, the size of the spatial grid, and the original data; and performing missing value imputation and normalization processing on the four-dimensional data matrix data to obtain fused gas data.
[0010] Compared with existing technologies, the technical effects achieved by this solution are as follows: It accurately extracts the concentration and coordinate information of each monitoring point within the target time period, forming structured raw data, laying a unified data foundation for subsequent data fusion, ensuring the temporal and spatial correlation of the data, mapping discrete monitoring point data to a unified spatial grid, realizing the spatiotemporal standardization of monitoring data, allowing dispersed fixed or mobile monitoring data to form a continuous spatiotemporal data volume to support subsequent model calculations, filling data gaps through interpolation, eliminating systematic errors and dimensional differences between different monitoring devices through normalization, and outputting high-precision and highly consistent fused gas data. This effectively solves the core problems of data fragmentation and inconsistent spatiotemporal benchmarks in traditional monitoring systems.
[0011] In one embodiment of the present invention, when the emergency mode is activated, the cloud platform discretizes the detection area into a grid and obtains candidate leak source grid points based on the abnormal monitoring points. Specifically, this includes: calculating the concentration gradient vector, concentration gradient magnitude, horizontal azimuth angle, and vertical elevation angle based on the gas monitoring data of the abnormal monitoring points to obtain directional constraint data for the candidate leak source grid points; obtaining directional tolerance data for the candidate leak source grid points based on the horizontal and vertical azimuth angles; calculating the possible location region of the candidate leak source grid points based on the directional constraint data, directional tolerance data, and concentration values of the abnormal monitoring points; and using the grid points within the possible location region as candidate leak source grid points.
[0012] Compared with existing technologies, the technical effects achieved by adopting this technical solution are as follows: By constructing directional constraints through concentration gradient vectors, horizontal and vertical azimuth angles, the three-dimensional precise orientation of the leakage source is clarified, avoiding blind diffusion search. Combined with the possible area, the distance boundary is delineated, limiting the reasonable range between the leakage source and the abnormal monitoring point, which helps to eliminate invalid areas that are too far or too close.
[0013] In one embodiment of the present invention, the predicted concentration at the monitoring point is calculated based on the leak tracing algorithm and candidate leak grid points, and the actual concentration at the monitoring point is obtained based on the fused gas data, specifically including:
[0014] Acquire fused gas data, meteorological data, and topographic data of monitoring points within the monitoring area; perform time delay compensation on the fused gas data based on the meteorological data to obtain time-delayed gas data; obtain the actual concentration of the monitoring points during the target time period based on the time-delayed gas data; perform extrapolation based on the candidate leak grid points and meteorological data-driven gas diffusion model to obtain the initial predicted concentration of each candidate leak source grid point at each time window; correct the initial predicted concentration based on the time-delayed gas data and the neural network refinement model to obtain the predicted concentration.
[0015] Compared with existing technologies, the technical effects achieved by this solution are as follows: By using meteorological data to compensate for the time delay of fused gas data and mapping all data to the common starting point of "leakage occurrence," it is possible to compare: what are the theoretical initial responses at different locations at the same moment of leakage? This eliminates information distortion caused by distance, making it possible to compare the inherent sensitivity or representativeness of different monitoring points to the same source event. Based on multi-source constrained data, the initial predicted concentration for different time windows is extrapolated for each candidate leak source grid point, establishing a theoretical correspondence between "candidate source-spatial-temporal concentration," providing preliminary physical basis for leak source scoring, ensuring the physical rationality of the prediction results. By using a neural network refinement model to dynamically correct the initial prediction results, the simulation bias of traditional physical models in complex environments is effectively overcome, thereby outputting a final predicted concentration that closely matches the actual concentration, improving prediction accuracy, and providing core data support for the accurate scoring and location of candidate leak sources.
[0016] In one embodiment of the present invention, time delay compensation is performed on the fused gas data based on meteorological data to obtain time-delayed gas data, and the actual concentration of the monitoring point in the target time period is obtained based on the time-delayed gas data. Specifically, this includes: obtaining the wind speed and direction of the monitoring point and the candidate leakage grid point in the target time period based on meteorological data; calculating the delay time of the gas from the candidate leakage grid point to the monitoring point based on the wind speed and direction; and compensating the time series concentration of the monitoring point based on the delay time to obtain time-delayed gas data.
[0017] Compared with existing technologies, the technical effects achieved by this solution are as follows: It acquires core meteorological parameters, providing key driving data for time delay calculation, ensuring that subsequent delay compensation is based on actual wind field conditions on site. Vector analysis clarifies the relative wind field relationship between candidate leak sources and monitoring points, providing quantitative evidence for determining whether monitoring points are within effective diffusion coverage. Simultaneously, it provides core parameters for accurate time delay calculation, avoiding compensation deviations caused by misjudgments of wind direction, and eliminating data from monitoring points with no reference value, such as those in headwinds or invalid areas, ensuring the validity of time-delayed gas data.
[0018] In one embodiment of the present invention, the initial predicted concentration of each candidate leak source grid point at each monitoring point in each time window is obtained by extrapolating the candidate leak grid points and the meteorological data-driven gas diffusion model. Specifically, this includes: when the number of effective monitoring points in a time window is greater than or equal to a number threshold, the initial predicted concentration of each candidate leak source grid point at each monitoring point in each time window is obtained by extrapolating the candidate leak grid points and the meteorological data-driven gas diffusion model; when the number of effective monitoring points in a time window is less than the number threshold, the time window is skipped.
[0019] Compared with existing technologies, the technical effects achieved by adopting this technical solution are as follows: when the number of effective monitoring points in a time window is less than the threshold, the time window is skipped, avoiding wasting computing resources on low-quality data and producing unreliable results, thus improving the efficiency of traceability.
[0020] In one embodiment of the present invention, the initial predicted concentration is corrected based on time-delayed gas data and a neural network refinement model to obtain the predicted concentration. Specifically, this includes: obtaining topographic data of the monitoring area through a fluid dynamics model; feeding the initial predicted concentration, time-delayed gas data, meteorological data, and topographic data into the neural network refinement model to obtain the concentration residual between the actual concentration and the initial predicted concentration; and correcting the initial predicted concentration based on the concentration residual and a mixing loss function to obtain the predicted concentration.
[0021] Compared with existing technologies, the technical effects achieved by this solution are as follows: It accurately acquires spatial distribution and height data of buildings within the monitoring area, provides refined terrain constraints, solves the problem of traditional diffusion models ignoring building shading and flow around effects, and makes model extrapolation more closely aligned with complex industrial scenarios. Through a refined neural network model that integrates initial predicted concentration, time-delayed gas data, and multi-dimensional meteorological and terrain information, it accurately captures complex influencing factors in the gas diffusion process (such as terrain shading and meteorological fluctuations). Compared to a single physical model, it significantly reduces prediction bias, making the predicted concentration closer to the actual concentration distribution in the actual leakage scenario. It uses concentration residuals to quantify the difference between the actual concentration and the initial prediction, and combines this with a hybrid loss function for correction. This ensures both the good fit between the predicted results and the measured data, while also adhering to the physical laws of gas diffusion, avoiding unreasonable predictions caused by purely data-driven approaches, and improving the model's adaptability to complex scenarios.
[0022] In one embodiment of the present invention, the most likely location of the leakage source and the evacuation route are obtained based on the actual concentration and the predicted concentration at the monitoring point. Specifically, this includes: calculating the goodness of fit between the actual concentration and the predicted concentration, and obtaining the time weight cumulative score of the time window based on the time window length and meteorological data.
[0023] The probability score of candidate leak grid points as leak grid points is obtained by accumulating scores with time weights, goodness of fit, and prior probabilities; a leak probability heatmap is generated based on the probability scores, and the location of the most likely leak source and evacuation route are identified.
[0024] Compared with existing technologies, the technical effects achieved by this solution are as follows: by optimizing the matching degree between actual and predicted concentrations, combining the time window length and meteorological data stability to calculate time weights, weighted fusion of multi-dimensional data is achieved, and prior probability correction is added to make the probability scores of candidate grid points more consistent with the actual leakage scenario, significantly reducing the risk of misjudgment and improving the accuracy of leakage source location. Based on the probability scores, a leakage probability heat map is generated, which intuitively presents the leakage risk level of each location in the monitoring area, making it easier for staff to quickly locate high-probability leakage areas.
[0025] In one embodiment of the present invention, a gas leak monitoring and tracing system based on a cluster of fixed probes and mobile detectors is also provided. The gas leak monitoring and tracing method based on a cluster of fixed probes and mobile detectors described in the above embodiments is applied to this monitoring and tracing system. The monitoring and tracing system includes: a data monitoring module for monitoring gas concentration and meteorological data; a data analysis module for calculating and analyzing the location of the portable detector, the location of the leak source, and the evacuation route, and for analyzing and determining whether to activate the emergency mode; and a data communication module for sending and receiving Bluetooth beacon signals, gas monitoring data, meteorological data, the most likely location of the leak source, and the evacuation route, and for switching the emergency mode according to the gas concentration. This monitoring and tracing system has all the technical features of the above monitoring and tracing method, which will not be described in detail here. Attached Figure Description
[0026] Figure 1 A flowchart of a gas leak monitoring and tracing method based on a cluster of fixed probes and mobile detectors;
[0027] Figure 2 This is a schematic diagram of the gas leak monitoring and tracing system based on a cluster of fixed probes and mobile detectors according to the present invention.
[0028] Explanation of reference numerals in the attached figures:
[0029] 100 - Monitoring and traceability system; 110 - Data monitoring module; 120 - Data analysis module; 130 - Data communication module. Detailed Implementation
[0030] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0031] [First Embodiment]
[0032] See Figure 1 In one specific embodiment, the present invention provides a gas leak monitoring and tracing method based on a cluster of fixed probes and mobile detectors. The monitoring and tracing method includes:
[0033] S100. Multiple fixed beacon probes are deployed within the monitoring area. Each fixed beacon probe periodically broadcasts Bluetooth beacon signals and monitors the gas concentration at fixed points.
[0034] The S200 portable detector receives Bluetooth beacon signals to perform positioning and monitors the gas concentration along the movement path;
[0035] S300: Based on fixed locations and moving paths, the monitoring points are obtained, and gas monitoring data of the monitoring points are acquired. The cloud platform receives and merges the gas monitoring data to obtain merged gas data.
[0036] S400: Determine whether to activate the emergency mode based on the gas concentration at the monitoring point. When the emergency mode is activated, the cloud platform discretizes the detection area into a grid and obtains candidate leak source grid points based on the abnormal monitoring points.
[0037] S500: Calculate the predicted concentration at the monitoring point based on the leak source tracing algorithm and candidate leak grid points, and obtain the actual concentration at the monitoring point based on the fused gas data;
[0038] S600: Based on the actual and predicted concentrations at the monitoring points, the most likely location of the leak source and the evacuation route are obtained.
[0039] In step S100, the monitoring area can typically be a specific area with a risk of gas leakage, such as an industrial plant, chemical industrial park, or along a city gas pipeline. Within the monitoring area, multiple fixed beacon probes are scientifically and rationally deployed based on factors such as the area size, terrain complexity, and density of potential leak sources. Each fixed beacon probe periodically broadcasts a Bluetooth beacon signal at a preset time interval. This signal contains unique identification information for the probe, such as device ID, transmission power calibration value, device status, location coordinates, and timestamp.
[0040] In step S200, generally, at least one person carries a portable detector and moves within the monitoring area. During the movement, the portable detector automatically scans and connects to multiple surrounding Bluetooth beacon signals, calculates the current location of the portable detector based on the signal strength of the Bluetooth beacon signals and the position of the fixed beacon probe, and simultaneously performs gas concentration detection to form a "location-concentration-time" data record.
[0041] In step S300, the location of the fixed beacon probe is recorded as the fixed point, the monitoring point of the portable detector on the moving path is recorded as the moving point, and the fixed point and the moving point are recorded as the monitoring point. Generally speaking, gas monitoring data includes gas concentration value, location coordinates and monitoring timestamp. These data are collected in real time by the sensors built into the portable detector and the fixed beacon probe and uploaded to the cloud platform through the communication module.
[0042] Typically, gas monitoring data from fixed beacon probes is uploaded to the cloud platform via a 4G network, while data from portable devices is uploaded to the cloud platform via a LoRa network server. There are generally two modes for uploading gas monitoring data: In normal inspection mode, portable detectors use a low-power network for uploading, while fixed beacon probes upload in normal mode, for example, uploading gas monitoring data every 5 minutes; In emergency mode, portable detectors switch to high-speed sampling mode, for example, sampling and uploading to the cloud platform every 1 second, while fixed beacon probes upload in dense uploading mode, for example, uploading gas monitoring data every 10 seconds.
[0043] It should be noted that the device status information (such as battery level and signal strength) of the fixed beacon probe is uploaded immediately when it changes. In addition, when the LoRa network signal is poor or malfunctions, the inspection personnel can approach the device and quickly obtain the latest detection data and alarm records via Bluetooth.
[0044] In step S400, when the gas concentration at any monitoring point exceeds the preset concentration threshold, the emergency mode is activated. The preset concentration threshold is generally set by combining historical data statistical analysis, industry safety standards, and actual scenario requirements to ensure that the emergency response is triggered in a timely manner when the gas concentration reaches a level that may threaten personnel safety or cause an accident. Once the emergency mode is activated, the continuous space is converted into discrete grid coordinates through mathematical calculation and geometric division to generate a series of grid cells, and invalid areas (buildings, water bodies, etc.) are excluded to obtain candidate leak source grid points.
[0045] Candidate leak source grid points can be obtained through the following steps:
[0046] A. Generate grid coordinates:
[0047] ;
[0048] ;
[0049] ;
[0050] in, , and The spatial coordinate sequence represents the monitored area along the x, y, and z directions according to the grid size. x、 y and The set of coordinate points of a regular grid divided by z.
[0051] B. Create a grid point set:
[0052] ;
[0053] C. Exclude invalid areas such as buildings and water areas.
[0054] In step S500, the leak tracing algorithm includes a physical constraint diffusion model, a neural network refinement model, and a time delay compensation algorithm model. The physical constraint diffusion model is based on the physical laws of gas diffusion and combines meteorological and topographic data to simulate the diffusion process of gas in space, providing a basic theoretical framework for leak tracing. The neural network refinement model uses deep learning algorithms to train on a large amount of historical and real-time data, capturing the complex nonlinear relationships in the gas diffusion process and improving prediction accuracy. The time delay compensation algorithm model accurately calculates the time required for gas to diffuse from the leak source to the monitoring point. After mapping all data to the common starting point of "leak occurrence," it is possible to compare: what is the theoretical initial response at different locations at the same moment when the leak occurs? This eliminates the information distortion caused by distance, making it possible to compare the inherent sensitivity or representativeness of different monitoring points to the same source event.
[0055] In step S600, by comparing the actual concentration with the predicted concentration at the monitoring points, the probability of each candidate leak source grid point being a real leak source can be assessed. Various algorithms or models (such as least squares method, Bayesian inference, machine learning model, etc.) can be used to calculate the error or similarity between the actual concentration and the predicted concentration, thereby determining the most likely location of the leak source. At the same time, by combining information such as the topographic map, building distribution map and personnel evacuation route map of the monitoring area, the optimal evacuation route is planned to ensure that personnel can quickly and safely evacuate the danger zone in the event of a gas leak accident.
[0056] Fixed nodes deploying periodically broadcast Bluetooth beacons, integrated with gas sensors, form a stable physical coordinate network. This provides absolute or relative positional references for all mobile devices and enables continuous gas monitoring in fixed areas. Portable detectors utilize Bluetooth beacon signals for positioning, overcoming GPS blind spots and achieving precise location and concentration monitoring along mobile paths. This fills gaps in fixed monitoring coverage, integrates monitoring resources from fixed locations and mobile paths, breaks down data barriers between fixed and mobile points, and aligns and manages discrete and heterogeneous monitoring data within a unified spatiotemporal coordinate system. This lays the foundation for global analysis and allows for rapid emergency response triggering based on concentration thresholds at monitoring points, avoiding... It prevents the risk of leakage and spread from escalating; it enables intelligent switching between "routine monitoring" and "emergency source tracing," ensuring timely response; it transforms continuous monitoring areas into calculable discrete points, clarifying the range of potential leak sources and providing a suitable platform for the implementation of source tracing algorithms; it generates theoretical predicted concentrations for monitoring points through source tracing algorithms, forming a precise comparison dimension with the fused actual concentrations, providing core data support for leak source probability scoring, ensuring that source tracing results are more consistent with the actual situation, and improving the accuracy of source tracing; through a dynamic emergency mode switching mechanism and evacuation route heatmap generation function, it provides visual decision support for emergency command, significantly improving the efficiency and safety of emergency response in gas leak scenarios.
[0057] In one specific embodiment, the portable detector receives Bluetooth beacon signals to perform positioning and monitors the gas concentration along the movement path, specifically including:
[0058] S210, a portable detector, receives multiple Bluetooth beacon signals and acquires the signal strength of each Bluetooth beacon signal;
[0059] S220. Obtain the position coordinates of the fixed beacon probe based on the Bluetooth beacon signal;
[0060] S230. Filter Bluetooth beacon signals based on signal strength and signal strength threshold to obtain the number of valid Bluetooth beacons;
[0061] S240. When the number of valid Bluetooth beacons is greater than or equal to the number threshold, the current position of the portable detector is obtained by using an improved weighted triangulation algorithm based on the signal strength and position coordinates.
[0062] S250. When the number of valid Bluetooth beacons is less than the number threshold, an alternative positioning scheme shall be adopted.
[0063] In steps S210 to S240, Kalman filtering is performed on the RSSI sequence of each beacon to eliminate fluctuations and remove beacons with poor signal quality, such as signals with RSSI < -90dBm. The logarithmic distance path loss model is then used for distance estimation, as shown below:
[0064] ;
[0065] Where PL(d) is the path loss and d is the distance. The path loss value at a reference distance d0 is used, where n is the path loss exponent. To address shadow fading, the model parameters n and PL(d0) are calibrated based on field measurement data.
[0066] The weighted least squares method is used for triangulation, and the calculation formula is shown below:
[0067] ;
[0068] Among them, (x i ,y i ,z i Let be the position coordinates of the i-th fixed Bluetooth beacon probe, and w be the position coordinates of the i-th probe. i w represents the weight of the i-th fixed Bluetooth beacon probe. i Proportional to signal strength, (x,y,z) are the position coordinates of the portable detector. Let be the distance between the i-th fixed Bluetooth beacon probe and the portable detector;
[0069] The Levenberg-Marquardt algorithm is used for nonlinear optimization, a particle filter is applied to smooth the continuous positioning points, and a motion model is combined to eliminate the jitter in the positioning results, finally obtaining the current position of the portable detector.
[0070] In step S250, generally speaking, there may be Bluetooth signal coverage blind spots in the monitoring area. When there are Bluetooth signal coverage blind spots, there may be a situation where the number of effective Bluetooth beacons is less than the number threshold. The number threshold is generally 3. When the number of effective Bluetooth beacons is less than 3, an alternative positioning scheme is adopted. In the Bluetooth signal coverage blind spot, an inertial measurement unit (IMU) is used to perform dead reckoning to ensure positioning continuity.
[0071] The reception and acquisition of multiple Bluetooth beacon signals provide the basic input for subsequent positioning calculations, while supporting effective beacon filtering, ensuring the redundancy and reliability of positioning data. The extraction of fixed beacon probe position coordinates binds Bluetooth beacon signals with known spatial coordinates, providing key reference for the positioning algorithm. Effective beacon filtering improves the quality of beacon data participating in positioning calculations and ensures positioning accuracy. By introducing an improved weighted triangulation positioning algorithm and a dual-mode positioning mechanism with alternative positioning schemes, the problems of signal obstruction and insufficient accuracy of traditional GPS positioning in complex environments are effectively solved.
[0072] In one specific embodiment, the cloud platform receives and fuses gas monitoring data to obtain fused gas data, specifically including:
[0073] S310. Obtain the gas concentration and location coordinates of each monitoring point within the target time period based on the gas monitoring data;
[0074] S320. The gas concentration and location coordinates of each monitoring point within the target time period are used as raw data;
[0075] S330. Establish a spatial grid based on the monitoring area, and construct a four-dimensional data matrix of concentration-location-time based on the temporal resolution, spatial grid size, and raw data;
[0076] S340. Perform missing value interpolation and normalization on the four-dimensional data matrix to obtain fused gas data.
[0077] In step S330, constructing a four-dimensional data matrix of concentration-location-time generally requires the following steps:
[0078] Step 1: Determine the spatial grid:
[0079] ;
[0080] ;
[0081] ;
[0082] ;
[0083] in, , and This is a spatial coordinate sequence, consisting of sets of regular grid coordinate points in the monitoring area along the x, y, and z directions, divided by grid sizes dx, dy, and dz. It serves as the spatial dimension reference for the four-dimensional matrix. and It is the x-direction boundary of the monitoring area. and It is the boundary of the monitoring area in the y direction. and It is the z-direction boundary of the monitoring area. dz represents the spatial grid size. It is a time coordinate sequence. and It refers to the start and end times of the target time period.
[0084] Step 2: Initialize the four-dimensional matrix M, with dimensions:
[0085] ;
[0086] in, This represents the number of grid points in the x-direction. This represents the number of grid points in the y-direction. This represents the number of grid points in the y-direction. This represents the number of time points.
[0087] Step 3: For each monitoring point :
[0088] a. Find the nearest grid point:
[0089] ;
[0090] ;
[0091] ;
[0092] in, , and For the grid point index matched to the monitoring points, To obtain the index corresponding to the minimum value, and Let i be the actual coordinates of the i-th monitoring point. and It is the absolute value of the difference between the coordinates of the grid point and the coordinates of the monitoring point.
[0093] b. For each time point :
[0094] ;
[0095] in, These are the elements of the corresponding spatiotemporal grid points in the matrix. For the j-th time point, For the i-th monitoring point at Concentration value at any given time.
[0096] In step S340, the missing value imputation and normalization processing of four-dimensional data matrix data generally includes the following steps:
[0097] For each spatial location First, detect the missing value sequence. If the length of consecutive missing values is ≤ Using linear interpolation:
[0098] ;
[0099] in, Let be the missing concentration value to be imputed at time t. The concentration value at the previous valid time point before the missing point. The concentration value at one valid time point following the missing point. The time weighting coefficient represents the time weighting factor, indicating the time t to be interpolated. and The relative positions between them: the closer they are The more the weight is biased towards ,vice versa.
[0100] Otherwise, use spatiotemporal KNN interpolation: find the weighted average of the k nearest neighbor monitoring points.
[0101] Secondly, data normalization is performed:
[0102] a. Calculate global statistics:
[0103] ;
[0104] ;
[0105] in, Let M be the global mean of matrix M. For the operator of finding the mean of matrix M, Let M be the global standard deviation of matrix M. The operator for finding the standard deviation of matrix M.
[0106] b. Normalize separately for each monitoring point:
[0107] ;
[0108] in, These are the elements of the normalized data matrix. Let be the time series concentration of spatial location (i,j,k) in the original matrix. It is a local mean. This represents the local standard deviation.
[0109] It should be noted that for leak areas that diffuse in the atmosphere, the grid in the z-direction is sparser (e.g., the distances in the z-direction are distributed at 0m, 10m, 50m, and 100m), while for leak areas indoors, the grid in the z-direction is denser (divided according to the height of each floor, ceiling, or floor); for leak areas underwater, the z-direction is stratified according to water depth.
[0110] The system accurately extracts the concentration and coordinate information of each monitoring point within the target time period, forming structured raw data. This lays a unified data foundation for subsequent data fusion, ensuring the temporal and spatial correlation of the data. It maps discrete monitoring point data to a unified spatial grid, achieving spatiotemporal standardization of monitoring data. This allows scattered fixed or mobile monitoring data to form a continuous spatiotemporal data volume, supporting subsequent model calculations. By interpolating to fill data gaps and by normalizing to eliminate systematic errors and dimensional differences between different monitoring devices, it outputs high-precision and highly consistent fused gas data. This effectively solves the core problems of data fragmentation and inconsistent spatiotemporal benchmarks in traditional monitoring systems.
[0111] In one specific embodiment, when the emergency mode is activated, the cloud platform discretizes the detection area into a grid and obtains candidate leak source grid points based on the abnormal monitoring points, specifically including:
[0112] S410. Calculate the concentration gradient vector, concentration gradient magnitude, horizontal azimuth angle, and vertical elevation angle based on the gas monitoring data of the abnormal monitoring points to obtain the directional constraint data of the candidate leakage source grid points.
[0113] S420. Obtain the directional fault-tolerant data of candidate leakage source grid points based on the horizontal and vertical subtraction angles;
[0114] S430. Calculate the possible location regions of candidate leak source grid points based on directional constraint data, directional fault tolerance data, and concentration values of abnormal monitoring points.
[0115] S440. Select grid points within the possible location area as candidate grid points or candidate leak source grid points.
[0116] In step S410, the anomaly monitoring point The formula for calculating the concentration gradient vector is as follows:
[0117] ;
[0118] The concentration gradient vector is approximated using the finite difference method, with the gradient direction pointing in the direction of the fastest increase in concentration.
[0119] ;
[0120] ;
[0121] ;
[0122] in, Anomaly monitoring point Concentration gradient vector and These are the concentration gradient vectors in the x, y, and z directions, respectively.
[0123] The formula for calculating the magnitude of the concentration gradient is as follows:
[0124] Gradient magnitude (modulus):
[0125] ;
[0126] in, This represents the maximum rate of change in concentration, i.e., the gradient magnitude, and is expressed in units of concentration / length (e.g., ppm / m).
[0127] The formula for calculating the horizontal azimuth (φ) is as follows:
[0128] ;
[0129] The horizontal azimuth (φ) refers to the direction of the concentration gradient projected onto the horizontal plane, and its value ranges from 0° to 360° (or -180° to 180°).
[0130] The formula for calculating the vertical elevation angle (θ) is as follows:
[0131] ;
[0132] The vertical elevation angle (θ) is the angle between the concentration gradient and the horizontal plane, ranging from -90° to 90°. A positive θ value indicates an upward gradient (concentration increases with height), while a negative θ value indicates a downward gradient (concentration decreases with height).
[0133] In step S420, the formulas for calculating the horizontal subtending angle α and the vertical subtending angle β are as follows:
[0134] Horizontal angle α = 2 × (σ_φ + wind direction measurement error);
[0135] Vertical angle β = 2 × (σ_θ + wind direction measurement error);
[0136] Where σ_φ is the standard deviation of wind direction, and σ_φ and the wind direction measurement error are obtained from the technical documentation of the wind speed and direction measuring instrument. σ_θ is the angle corresponding to the standard deviation of vertical wind speed σ_w. The standard deviation of vertical wind speed fluctuation is related to atmospheric stability. Under neutral conditions near the ground, σ_w is usually related to the frictional velocity u*.
[0137] σ_w ≈ 1.25 u*. If u* is approximately 0.4 m / s, then σ_w ≈ 0.5 m / s.
[0138] , where U is the average wind speed (m / s).
[0139] In step S430, the possible location region can be obtained through the following steps:
[0140] (1). Estimating the initial distance (empirical formula):
[0141] ;
[0142] Here, 10 is an empirical coefficient, determined based on historical data or simulations, and is typically between 5 and 15. The gradient size is expressed in ppm / m. For monitoring points Concentration value (unit: ppm)
[0143] (2) Estimation using Briggs' formula and :
[0144] ;
[0145] ;
[0146] For example, the city stability condition is neutral (Category D):
[0147] ;
[0148] ;
[0149] in, The lateral diffusion parameter (unit: meter) represents the standard deviation of the concentration distribution laterally. is the vertical diffusion parameter (unit: meters), representing the standard deviation of the concentration distribution in the vertical direction, and d is the downwind distance (unit: meters).
[0150] Perform reverse tracing:
[0151] Gradient in reverse direction: ;
[0152] It should be noted that a negative gradient means from high concentration to low concentration. For ground monitoring points, a negative vertical gradient usually means that the source is below or at the same height.
[0153] (3) The formula for estimating the source height h based on the vertical gradient is as follows:
[0154] ;
[0155] Where h is the effective height of the leakage source (in meters) and z is the height of the monitoring point (in meters). The vertical concentration gradient is represented by the unit ppm / m. Vertical diffusion parameter (unit: meters). The concentration at the monitoring point is expressed in ppm.
[0156] (4) The formula for calculating the horizontal gradient optimization distance d is as follows:
[0157] Complete gradient vector:
[0158] ;
[0159] Theoretical gradient magnitude:
[0160] ;
[0161] generally, , ;
[0162] but:
[0163] ;
[0164] ;
[0165] so:
[0166] ;
[0167] For cities with a neutral condition coefficient (Category D): ,so ;
[0168] Adjust d (e.g., using Newton's iteration method) so that the theoretical gradient magnitude is approximately equal to the actual measured gradient magnitude:
[0169] ;
[0170] ;
[0171] (5) Possible location area:
[0172] Vertex position: Coordinates of the monitoring point ;
[0173] Axis direction: along the opposite direction of the gradient;
[0174] Horizontal subtended angle: α (e.g., 30°, representing a range of 15° to the left and right of the horizontal azimuth angle φ).
[0175] Vertical subtended angle: β (e.g., 20°, indicating a range of 10° above and below the vertical elevation angle θ).
[0176] Minimum distance: d_min;
[0177] Maximum distance: d_max;
[0178] Assuming the results are calculated from monitoring data:
[0179] Gradient horizontal azimuth: φ = 150° (southeast direction);
[0180] Gradient vertical elevation angle: θ = -20° (downward 20°);
[0181] Standard deviation of wind direction: σ_φ = 10°;
[0182] Vertical wind speed standard deviation: σ_w = 0.5 m / s, corresponding to an angle of approximately 8°;
[0183] Measurement error: ±5°;
[0184] So:
[0185] The horizontal angle α = 2 × (10° + 5°) = 30°;
[0186] The vertical angle β = 2 × (8° + 5°) = 26°;
[0187] Possible location area:
[0188] Horizontal range: 150° ± 15° (135° to 165°);
[0189] Vertical range: -20° ± 13° (-33° to -7°);
[0190] It should be noted that when θ is close to ±90°, the gradient is almost vertical, and the horizontal angle α should be increased (the uncertainty in the horizontal direction is large). The source may be almost directly above or below the monitoring point. When θ is close to 0°, the gradient is almost horizontal, and the vertical angle β should be increased (the uncertainty in the vertical direction is large). The source height is close to the monitoring point.
[0191] In addition, the candidate point generation rules are as follows:
[0192] Core region (high probability): along the axis, from d_min to d_max / 2, angle: within ±(α / 4, β / 4) in the opposite direction of (φ, θ), dense mesh: Δx=Δy=5m, Δz=2m.
[0193] Extended region (medium probability): The entire conical region, from d_min to d_max, angle: within ±(α / 2, β / 2) in the opposite direction of (φ, θ), medium grid: Δx=Δy=10m, Δz=5m.
[0194] The empirical values are for reference only.
[0195] Horizontal subduction angle α: Plains and open areas: 20°-30°, urban complex terrain: 30°-50°, low wind speed (<1m / s): 40°-60°; Vertical subduction angle β: Stable atmosphere: 15°-25°, unstable atmosphere: 25°-40°, near the ground (<10m): 20°-30°; Good data quality: reduce subduction angle; Stable meteorological conditions: reduce subduction angle; High monitoring point density: reduce subduction angle; Complex terrain: increase subduction angle.
[0196] By constructing directional constraints using concentration gradient vectors and horizontal and vertical azimuth angles, the three-dimensional precise orientation of the leak source was clarified, avoiding blind diffusion searches. By combining the possible areas to delineate distance boundaries, the reasonable range between the leak source and the abnormal monitoring points was limited, which helps to eliminate invalid areas that are too far or too close.
[0197] In a specific embodiment, the predicted concentration at the monitoring point is calculated based on the leak tracing algorithm and candidate leak grid points, and the actual concentration at the monitoring point is obtained based on the fused gas data, specifically including:
[0198] S510. Acquire fused gas data, meteorological data, and topographic data of monitoring points within the monitoring area;
[0199] S520. Time delay compensation is performed on the fused gas data based on meteorological data to obtain time-delayed gas data, and the actual concentration at the monitoring point is obtained based on the time-delayed gas data.
[0200] S530. Based on the candidate leak grid points and meteorological data, a gas diffusion model is driven to extrapolate the initial predicted concentration of each candidate leak source grid point at the monitoring point in each time window.
[0201] S540. The initial predicted concentration is corrected based on the time-delayed gas data and the neural network refinement model to obtain the predicted concentration.
[0202] In step S510, meteorological data generally includes wind speed, wind direction, temperature, humidity, and atmospheric stability. These data have a significant impact on the gas diffusion process and are key parameters for accurately simulating gas leak diffusion. They can be acquired through specialized sensors, such as ultrasonic anemometers, wind speed sensors, and temperature sensors. Topographic data covers the topographic information of the monitoring area, such as building distribution, elevation, slope, and surface roughness. These factors will change the flow path and diffusion speed of the gas. The topographic information of the monitoring area can be obtained through a simplified model of fluid dynamics (CFD). By combining meteorological and topographic data, the diffusion behavior of gas in complex environments can be simulated more realistically, providing a reliable basis for subsequent leak tracing.
[0203] In step S520, since the diffusion process of gas after leakage is affected by wind speed and wind direction, there is a time difference in the gas concentration changes at different monitoring points. Therefore, it is necessary to compensate for the time delay of the fused gas data based on the wind speed and wind direction information in the meteorological data in order to eliminate the impact of this time difference on the concentration analysis.
[0204] In step S530, the gas diffusion model is an important tool for simulating the diffusion process of gases in the environment. It can predict the concentration distribution of gases at different times and spatial locations based on the input meteorological data. There are various types of gas diffusion models, such as Gaussian plume models, Gaussian smoke cloud models, and complex models based on computational fluid dynamics (CFD). In practical applications, the appropriate model can be selected according to the complexity of the monitoring area and the availability of computing resources. For relatively simple open areas, Gaussian plume models or Gaussian smoke cloud models can quickly provide relatively accurate prediction results. However, for areas with complex terrain and building distribution, it is necessary to use complex models based on CFD for simulation to more accurately simulate the gas diffusion process.
[0205] For example, for point source leakage, the standard Gaussian model is used to quickly solve the concentration field, meeting real-time requirements.
[0206] ;
[0207] Where Q is the leakage rate and v is the wind speed. The lateral diffusion coefficient represents the range of gas diffusion in turbulent flow perpendicular to the wind direction. The larger the lateral concentration, the more dispersed the concentration. The vertical diffusion coefficient represents the turbulent diffusion range of the gas in the vertical direction. The larger the value, the more dispersed the concentration in the vertical direction; H represents a high effective source. These are the coordinates for downwind, crosswind, and vertical directions, respectively.
[0208] In step S540, the time-delayed gas data reflects the actual monitored gas concentration, while the neural network refinement model can capture the nonlinear characteristics and complex laws of the gas diffusion process by learning from a large amount of historical data. By inputting the time-delayed gas data into the neural network refinement model, the initial predicted concentration can be further corrected and optimized to obtain a more accurate predicted concentration.
[0209] By using meteorological data to compensate for time delays in fused gas data and mapping all data to the common starting point of "leak occurrence," it becomes possible to compare the theoretical initial responses at different locations at the same moment of leakage. This eliminates information distortion caused by distance, making it possible to compare the inherent sensitivity or representativeness of different monitoring points to the same source event. Based on multi-source constrained data, the initial predicted concentration for different time windows is extrapolated for each candidate leak source grid point, establishing a theoretical correspondence between "candidate source-spatial-temporal concentration." This provides preliminary physical basis for leak source scoring, ensuring the physical rationality of the prediction results. A refined neural network model is used to dynamically correct the initial prediction results, effectively overcoming the simulation bias of traditional physical models in complex environments. This results in a final predicted concentration that closely matches the actual concentration, improving prediction accuracy and providing core data support for the accurate scoring and location of candidate leak sources.
[0210] In one specific embodiment, time delay compensation is applied to the fused gas data based on meteorological data to obtain time-delayed gas data. The actual concentration at the monitoring point is then obtained based on the time-delayed gas data. Specifically, this includes:
[0211] S521. Obtain the wind speed and direction of the monitoring points and candidate leakage grid points within the target time period based on meteorological data;
[0212] S522. Calculate the time delay of gas from candidate leak grid points to monitoring points based on wind speed and wind direction;
[0213] S523. Compensate the time series concentration of the monitoring point according to the delay time to obtain time-delayed gas data.
[0214] In steps S522 and S523, the wind direction vector describes the direction and intensity of gas flow from the leak source to the monitoring point, while the downwind component reflects the speed of gas diffusion in the wind direction. The formula for calculating the wind direction vector is as follows:
[0215] ;
[0216] in, A wind direction vector, a vector that describes the direction and magnitude of the wind. For wind speed, This is the wind direction angle.
[0217] The formula for calculating relative position is as follows:
[0218] ;
[0219] in, It is a relative position vector. To monitor the coordinates of the points, The coordinates of the candidate leakage source are given.
[0220] The formula for calculating the tailwind component is as follows:
[0221] ;
[0222] in, For tailwind weight, This indicates the wind speed.
[0223] if A value greater than 0 indicates that the monitoring point is located downwind of the leak source, and the gas can be blown to that point by the wind; therefore, this monitoring point is valid. ,in, This is a delay time.
[0224] if ≤0, the monitoring point is located upwind or crosswind of the leak source, and the gas cannot be blown to that point by the wind; this monitoring point is invalid. =∞.
[0225] The time-delayed gas data is obtained by adjusting the fused gas data based on the delay, as shown in the following formula:
[0226] ;
[0227] In the aligned data, monitoring points At any moment The value is taken from the value of that monitoring point in the fused gas data. The value at any given moment.
[0228] in, This represents the actual gas concentration data matrix after time delay compensation processing. The dimensions of the four-dimensional data matrix are m rows corresponding to m monitoring points and n columns corresponding to n time points.
[0229] For example:
[0230] ;
[0231] Each row represents the concentration at each monitoring point (1-m) corresponding to time point i (1-n).
[0232] The delay time is the physical time required for gas to travel from the leak source to the monitoring point. Compensating for the time-series concentration at the monitoring point based on the delay time refers to the process of remapping all monitoring point data to the "leak occurrence time" reference frame through time alignment. For example:
[0233] Table 1 Timeline of raw observation data
[0234] Timeline t=0s t=50s t=100s t=150s event Leakage occurred Monitoring point 1 Peak detected Monitoring point 2 Peak detected
[0235] Table 2. Examples of raw observation data
[0236] Time (s) Concentration at monitoring point 1 (LEL) Concentration at monitoring point 2 (LEL) t=0 0 0 t=50 8 0 t=100 6 0.9 t=150 4 0.7
[0237] In the raw data, the peak values at the two monitoring points appeared at different times, but this was actually the same leak event.
[0238] Aligned by the time the leak occurred:
[0239] Table 3. Examples of aligned data
[0240] Time (s) Concentration at monitoring point 1 (LEL) Concentration at monitoring point 2 (LEL) t=0 8 (original t=50) 9 (original t=100) t=50 6 (original t=100) 7 (original t=150)
[0241] Acquiring core meteorological parameters provides crucial driving data for time delay calculations, ensuring that subsequent delay compensation is based on actual wind field conditions on-site. Vector analysis clarifies the relative wind field relationship between candidate leak sources and monitoring points, providing quantitative evidence for determining whether monitoring points are within effective diffusion coverage. It also provides core parameters for accurate time delay calculations, avoiding compensation deviations caused by misjudgments of wind direction. Data from monitoring points with no reference value, such as those in headwinds or invalid areas, is eliminated, ensuring the validity of time-delayed gas data.
[0242] In a specific embodiment, based on the candidate leak grid points and a meteorological data-driven gas diffusion model, the initial predicted concentrations of each candidate leak source grid point at the monitoring points within each time window are obtained, specifically including:
[0243] S531. When the number of effective monitoring points in a time window is greater than or equal to the number threshold, the initial predicted concentration of each candidate leak source grid point in each time window is obtained by extrapolating the gas diffusion model driven by the candidate leak grid points and meteorological data.
[0244] S532. When the number of valid monitoring points in a time window is less than the number threshold, skip the time window.
[0245] In step S531, the time delay compensation algorithm is used to obtain... ,if If the value is not ∞ and is not NaN (invalid or undefined numerical result), the effective monitoring point value is incremented by one. When the number of effective monitoring points in the time window reaches or exceeds the preset threshold, it indicates that the amount of data in the current time window is rich enough to support accurate concentration prediction. At this time, by combining building layout, height information, time-delayed gas data and meteorological data, the initial predicted concentration of each candidate leak source grid point in each time window can be calculated.
[0246] Typically, the theoretical model of a gas diffusion model can be expressed by the following formula:
[0247] ;
[0248] The above formula describes the spatial and temporal variation of gas concentration, representing the change in concentration at a fixed spatial point (x, y, z) over time, where D is the diffusion coefficient = f(wind speed, atmospheric stability). The diffusion term (discrete Laplace) and -v·∇c represent the advection term (wind transport). The source term is the discrete Dirac function, and v is the wind speed vector. = Wind speed × [cos(wind direction), sin(wind direction)], Q is the leakage source intensity, ( , , () indicates the location of the leak source.
[0249] To facilitate the practical solution of complex partial differential equations on a computer, and thus predict the spatiotemporal distribution of gas concentration in leak tracing, a physically constrained diffusion model is used to refine the above formulas. Discretize:
[0250]
[0251] in, Represents position in four-dimensional space The gas concentration at the next time step t+1, Let (i,j,k) be the concentration at position (i,j,k) at the current time t. This represents the advection term, where u, v, and w are the wind speeds in the x, y, and z directions, respectively. The negative sign indicates that the concentration is transported along the direction of the airflow. Let be the source term, representing the gas release rate at position (i,j,k).
[0252] Discretization of the three-dimensional Laplacian operator:
[0253] ;
[0254] Where Δx, Δy, and Δz are the grid spacings in the x, y, and z directions, respectively.
[0255] Three-dimensional advection discretization:
[0256] ;
[0257] ;
[0258] ;
[0259] To ensure the stability of the values, Must meet:
[0260] ;
[0261] When the number of valid monitoring points in a time window is less than the threshold, the time window is skipped, which avoids wasting computing resources on low-quality data and producing unreliable results, thus improving the efficiency of traceability.
[0262] In one specific embodiment, the initial predicted concentration is corrected based on time-delayed gas data and a refined neural network model to obtain the predicted concentration, specifically including:
[0263] S541. Obtain topographic data of the monitoring area through a fluid dynamics model;
[0264] S542. Input the initial predicted concentration, time-delayed gas data, meteorological data and terrain data into the neural network refinement model to obtain the concentration residual between the actual concentration and the initial predicted concentration.
[0265] S543. Correct the initial predicted concentration based on the concentration residual and the mixing loss function to obtain the predicted concentration.
[0266] In step S542, the initial predicted concentration, time-delayed gas data, meteorological data, and terrain data are used as inputs and fed into a pre-trained neural network refinement model. This neural network can capture the difference between the actual concentration and the initial predicted concentration, i.e., the concentration residual, by learning the concentration change patterns in a large amount of historical data.
[0267] The training process for the refined neural network model is as follows:
[0268] a) Constructing the model training dataset
[0269] The training dataset includes historical real-world leak event data and physical model simulation data.
[0270] Input features: {Physical model prediction: M_pred_physical[t]; Meteorological parameters: wind speed, wind direction, temperature, humidity; Topographic parameters: elevation, slope, roughness}
[0271] Output labels: [Concentration at monitoring point 1, Concentration at monitoring point 2, ..., Concentration at monitoring point n]
[0272] b) Objective function: the residuals between observed data and physical model predictions
[0273] ;
[0274] Where y is the residual between the actual concentration and the concentration predicted by the physical model. M_pred_physical[t] represents the actual concentration data at each monitoring point at time t, and M_pred_physical[t] represents the concentration predicted by the physical model.
[0275] c) Define the loss function: Use a hybrid loss function.
[0276] ;
[0277] Among them, the data fitting loss (MSE) is: ;
[0278] Physical consistency loss: ;
[0279] in, A penalty can be imposed for relative deviation:
[0280] ;
[0281] Penalty can be applied to absolute deviation:
[0282] ;
[0283] It can also be a physical residual constraint:
[0284] ;
[0285] Spatial smoothness loss:
[0286] ;
[0287] in, It is the spatial neighborhood of the i-th monitoring point. It is a distance weight, usually taken as...
[0288] ;
[0289] in, The weighting coefficients for the physical consistency loss control the degree of deviation between the neural network prediction and the physical model. The weighting coefficients for spatial smoothness loss control the spatial continuity of the prediction results; It is a small constant, so avoid dividing by zero (usually take...). ).
[0290] In step S543, the initial predicted concentration is corrected by combining a predefined mixed loss function. The mixed loss function usually includes a combination of multiple loss functions such as mean squared error loss and absolute error loss. It can comprehensively consider the impact of different error types on the prediction results, thereby obtaining a more accurate correction result.
[0291] By integrating initial predicted concentration, time-delayed gas data, and multi-dimensional meteorological and topographical information through a refined neural network model, the model accurately captures complex influencing factors in the gas diffusion process (such as terrain obstruction and meteorological fluctuations). Compared with a single physical model, this significantly reduces prediction bias, making the predicted concentration closer to the actual concentration distribution in the actual leakage scenario. The difference between the actual concentration and the initial prediction is quantified by the concentration residual, and then corrected by a hybrid loss function. This ensures that the prediction results fit the measured data well while following the physical laws of gas diffusion, avoiding unreasonable predictions caused by purely data-driven approaches, and improving the model's adaptability to complex scenarios.
[0292] In one specific embodiment, the most likely location of the leak source and the evacuation route are obtained based on the actual and predicted concentrations at the monitoring points, specifically including:
[0293] S610. Calculate the goodness of fit between the actual concentration and the predicted concentration, and obtain the cumulative score of the time weight of the time window based on the time window length and meteorological data.
[0294] S620. Based on the cumulative score with time weight, goodness of fit and prior probability, obtain the probability score of candidate leaking grid points as leaking grid points.
[0295] S630. Generate a leak probability heatmap based on the probability score, and identify the most likely leak source location and evacuation route.
[0296] In step S610, the formula for calculating the goodness of fit (R²) between the actual concentration and the predicted concentration is as follows:
[0297] ;
[0298] in, This represents the aligned actual gas concentration at the i-th valid monitoring point. , This represents the gas concentration predicted by the BP-network at the i-th valid monitoring point. , This represents the average actual gas concentration at all valid monitoring points.
[0299] In step S620, the time-weighted cumulative score, goodness of fit, and prior probability are comprehensively considered to obtain a probability score for the candidate leaking grid point as the actual leaking grid point. The prior probability is pre-set based on historical data, empirical knowledge, etc., and it provides an initial probability assessment for each candidate leaking grid point, which is accomplished by the following steps:
[0300] (1) Calculate time weights :
[0301] ;
[0302] in, Let k be the length of the k-th time window. The maximum time window length, Minimum time window length, These are the deviations in wind speed along the x, y, and z directions, respectively.
[0303] (2) Calculate the total score : ;
[0304] (3) If the number of effective time windows > 0, then the average score = P(g) ÷ number of effective time windows, and the prior probability is obtained based on the equipment density and historical leakage.
[0305] (4) Final score = Average score × Prior adjustment;
[0306] Otherwise: Final score = 0.
[0307] In step S630, a leak probability heatmap is generated based on the probability score. The heatmap visually displays the likelihood of each area becoming a leak source, with darker colors indicating a higher probability. The heatmap clearly shows which locations within the entire monitoring area are more likely to experience gas leaks. It also marks the most likely leak source locations, providing clear targets for emergency response personnel. Furthermore, based on gas diffusion patterns and terrain factors, reasonable evacuation routes are planned to ensure that personnel can safely and quickly evacuate the danger zone in the event of a gas leak.
[0308] By optimizing the matching degree between actual and predicted concentrations, and combining the time window length and meteorological data stability to calculate time weights, a weighted fusion of multi-dimensional data is achieved. Then, prior probability correction is added to make the probability scores of candidate grid points more consistent with the actual leakage scenario, significantly reducing the risk of misjudgment and improving the accuracy of leakage source location. Based on the probability scores, a leakage probability heat map is generated, which intuitively presents the leakage risk level of each location in the monitoring area, making it easier for staff to quickly locate high-probability leakage areas.
[0309] See Figure 2In one specific embodiment, the present invention also provides a gas leak monitoring and tracing system based on a cluster of fixed probes and mobile detectors. The gas leak monitoring and tracing method based on a cluster of fixed probes and mobile detectors described in the above embodiments is applied to the monitoring and tracing system 100. The monitoring and tracing system 100 includes: a data monitoring module 110, which is used to monitor gas concentration and meteorological data; a data analysis module 120, which is used to calculate and analyze the location of the portable detector, the location of the leak source, and the evacuation route, and analyze and determine whether to activate the emergency mode; and a data communication module 130, which is used to send and receive Bluetooth beacon signals, gas monitoring data, meteorological data, the most likely location of the leak source, and the evacuation route, and switch the emergency mode according to the gas concentration. This monitoring and tracing system has all the technical features of the above monitoring and tracing method, which will not be described in detail here.
[0310] While the present invention has been disclosed above, it is not limited thereto. Any person skilled in the art can make various modifications and alterations without departing from the spirit and scope of the invention; therefore, the scope of protection of the present invention should be determined by the scope defined in the claims.
Claims
1. A gas leak monitoring and source tracing method based on a cluster of fixed probes and mobile detectors, characterized in that, The monitoring and tracing methods include: Multiple fixed beacon probes are deployed within the monitoring area. Each fixed beacon probe periodically broadcasts a Bluetooth beacon signal and monitors the gas concentration at a fixed location. The portable detector receives the Bluetooth beacon signal to perform positioning and monitors the gas concentration along the movement path; The monitoring points are obtained based on the fixed points and the moving path, and the gas monitoring data of the monitoring points are acquired. The cloud platform receives and merges the gas monitoring data to obtain fused gas data; Whether to activate the emergency mode is determined based on the gas concentration at the monitoring point; When the emergency mode is activated, the cloud platform discretizes the detection area into a grid and obtains candidate leak source grid points based on the abnormal monitoring points; The predicted concentration at the monitoring point is calculated based on the leak tracing algorithm and the candidate leak grid points, and the actual concentration at the monitoring point is obtained based on the fused gas data. The most likely location of the leak and the evacuation route are obtained based on the actual concentration and the predicted concentration at the monitoring points.
2. The monitoring and tracing method according to claim 1, characterized in that, The portable detector receives the Bluetooth beacon signal to perform positioning and monitors the gas concentration along the movement path, specifically including: The portable detector receives multiple Bluetooth beacon signals and acquires the signal strength of each Bluetooth beacon signal; The position coordinates of the fixed beacon probe are obtained based on the Bluetooth beacon signal; The Bluetooth beacon signals are filtered based on the signal strength and the signal strength threshold to obtain the number of valid Bluetooth beacons; When the number of valid Bluetooth beacons is greater than or equal to the number threshold, the current position of the portable detector is obtained by using an improved weighted triangulation algorithm based on the signal strength and the position coordinates. When the number of valid Bluetooth beacons is less than the number threshold, an alternative positioning scheme is adopted.
3. The monitoring and tracing method according to claim 2, characterized in that, The cloud platform receives and fuses the gas monitoring data to obtain fused gas data, specifically including: Based on the gas monitoring data, obtain the gas concentration and location coordinates of each monitoring point within the target time period; The gas concentration and location coordinates of each monitoring point within the target time period are used as raw data; A spatial grid is established based on the monitoring area, and a four-dimensional data matrix of concentration-location-time is constructed based on the temporal resolution, the size of the spatial grid, and the original data. The four-dimensional data matrix is subjected to missing value interpolation and normalization to obtain the fused gas data.
4. The monitoring and tracing method according to claim 3, characterized in that, When the emergency mode is activated, the cloud platform discretizes the detection area into a grid and obtains candidate leak source grid points based on the abnormal monitoring points, specifically including: Based on the gas monitoring data of the abnormal monitoring points, the concentration gradient vector, concentration gradient magnitude, horizontal azimuth angle, and vertical elevation angle are calculated to obtain the directional constraint data of the candidate leakage source grid points; The directional fault-tolerant data of the candidate leakage source grid points are obtained based on the horizontal and vertical subtraction angles. The possible location regions of the candidate leak source grid points are calculated based on the directional constraint data, the directional fault tolerance data, and the concentration values of abnormal monitoring points. The grid points within the possible location area are selected as the candidate leak source grid points.
5. The monitoring and tracing method according to claim 4, characterized in that, The step of calculating the predicted concentration at the monitoring point based on the leak tracing algorithm and the candidate leak grid points, and obtaining the actual concentration at the monitoring point based on the fused gas data, specifically includes: Acquire the fused gas data, meteorological data, and terrain data of the monitoring points within the monitoring area; The time delay compensation is performed on the fused gas data based on the meteorological data to obtain time-delayed gas data, and the actual concentration at the monitoring point in the target time period is obtained based on the time-delayed gas data. Based on the candidate leak grid points and the meteorological data-driven gas diffusion model, the initial predicted concentration of each candidate leak source grid point at the monitoring point in each time window is obtained; The initial predicted concentration is corrected based on the time-delayed gas data and the neural network refinement model to obtain the predicted concentration.
6. The monitoring and tracing method according to claim 5, characterized in that, The step of performing time delay compensation on the fused gas data based on the meteorological data to obtain time-delayed gas data, and obtaining the actual concentration at the monitoring point in the target time period based on the time-delayed gas data, specifically includes: Based on the meteorological data, the wind speed and direction at the monitoring points and the candidate leak grid points within the target time period are obtained. Calculate the time delay of gas from the candidate leak grid point to the monitoring point based on the wind speed and wind direction; The time-series concentration at the monitoring point is compensated based on the delay time to obtain the time-delayed gas data.
7. The monitoring and tracing method according to claim 6, characterized in that, The step of extrapolating from the candidate leak grid points and the meteorological data-driven gas diffusion model to obtain the initial predicted concentration of each candidate leak source grid point at the monitoring point in each time window specifically includes: When the number of effective monitoring points in the time window is greater than or equal to the number threshold, the initial predicted concentration of each candidate leak source grid point at the monitoring point in each time window is obtained by extrapolating the candidate leak grid points and the meteorological data-driven gas diffusion model. When the number of valid monitoring points in the time window is less than the number threshold, the time window is skipped.
8. The monitoring and tracing method according to claim 7, characterized in that, The step of correcting the initial predicted concentration based on the time-delayed gas data and the neural network refinement model to obtain the predicted concentration specifically includes: The topographic data of the monitored area were obtained using a fluid dynamics model. The initial predicted concentration, the time-delayed gas data, the meteorological data, and the terrain data are fed into the neural network refinement model to obtain the concentration residual between the actual concentration and the initial predicted concentration; The initial predicted concentration is corrected based on the concentration residual and the mixing loss function to obtain the predicted concentration.
9. The monitoring and tracing method according to claim 8, characterized in that, The process of obtaining the most probable leak source location and evacuation route based on the actual concentration and the predicted concentration at the monitoring points specifically includes: Calculate the goodness of fit between the actual concentration and the predicted concentration, and obtain the time weight cumulative score of the time window based on the time window length and the meteorological data; The probability score of a candidate leaking grid point as a leaking grid point is obtained based on the cumulative score with time weight, the goodness of fit, and the prior probability. The leakage probability heatmap is generated based on the probability score, and the location of the most likely leakage source and the evacuation route are identified.
10. A gas leak monitoring and tracing system based on a cluster of fixed probes and mobile detectors, characterized in that, The monitoring and tracing method according to any one of claims 1 to 9 is applied to the monitoring and tracing system, the monitoring and tracing system comprising: The data monitoring module is used to monitor the gas concentration and the meteorological data; The data analysis module is used to calculate and analyze the location of the portable detector, the location of the leak source and the evacuation route, and to determine whether to activate the emergency mode. The data communication module is used to send and receive the Bluetooth beacon signal, the gas monitoring data, the meteorological data, the location of the most likely leak source and the evacuation route, and switch the emergency mode according to the gas concentration.