Gas leakage identification method and system based on sound positioning, medium and equipment
By combining a microphone array and a gas diffusion model with POMDP, particle filters, and LSTM-DQN networks, rapid and accurate location of gas leaks was achieved, solving the problems of response lag and inaccurate location in traditional methods, and improving the real-time performance and accuracy of gas leak detection.
Patent Information
- Application Number
- CN202511487882.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-17
- Publication Date
- 2025-12-30
AI Technical Summary
Traditional gas leak detection methods have a slow response time, making it impossible to provide rapid early warnings in the early stages of a leak, and they cannot accurately trace the location of the leak point. Existing sound source localization methods have low localization accuracy in complex environments, and deep learning models do not effectively utilize temporal information, resulting in low search efficiency.
Leakage acoustic signals are collected by a microphone array, and the gas diffusion process is simulated by combining the leakage gas convection-diffusion model. The model is then modeled as POMDP, and the confidence state of the sound source location is iteratively updated using a particle filter. Spatial distribution features are extracted using DBSCAN clustering, and an LSTM-DQN network is constructed to fuse spatiotemporal features, achieving cross-scenario generalization and dynamic optimization.
It improves the accuracy and real-time performance of gas leak location, reduces losses, enhances pipeline safety protection capabilities, and significantly improves precision, stability, and efficiency.
Smart Images

Figure CN121237124A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of gas leak detection technology, and in particular to a gas leak detection method, system, medium and device based on sound localization. Background Technology
[0002] Gas leaks pose a serious threat to public safety and the ecological environment, and quickly locating the leak source is crucial for responding to such incidents. Traditional detection methods mainly rely on chemical sensors to monitor gas concentration thresholds, triggering local audible and visual alarms only after the gas has diffused to the detector. This approach has significant drawbacks: first, there is a time lag in the response, making it impossible to provide rapid early warning in the initial stages of a leak; second, existing systems can only determine that a leak has occurred, but cannot accurately trace the leak point, greatly delaying emergency repairs.
[0003] Sound source localization for leak detection has become a research hotspot in recent years. However, traditional sound source localization methods based on Time Difference of Origin (TDOA) and beamforming have significant limitations in complex environments. When a gas pipeline leaks, background noise (such as wind noise and mechanical vibration) severely interferes with the sound signal, leading to increased time delay estimation errors and decreased localization accuracy. For example, the TDOA method is susceptible to multipath effects in low signal-to-noise ratio environments, while the beamforming method requires high array calibration and is difficult to maintain robustness in practical applications. Deep learning for sound source location search has become a good option. However, existing techniques exhibit large performance fluctuations in turbulent diffusion models, especially with changes in wind speed or low gas release intensity, resulting in low search efficiency. Although some studies have attempted to introduce particle filtering or entropy strategies to optimize the search process, they have failed to effectively utilize temporal information, leading to a lack of long-term perspective in decision-making. Summary of the Invention
[0004] To address the aforementioned problems, the present invention aims to provide a gas leak identification method, system, medium, and device based on sound localization, which improves the localization accuracy and real-time performance in complex environments by incorporating a dynamic correction mechanism.
[0005] To achieve the above objectives, in a first aspect, the technical solution adopted by the present invention is as follows: a gas leak identification method based on sound localization, comprising: acquiring leak sound wave signals through a microphone array and extracting acoustic features in a complex background; simulating the diffusion process of gas in a turbulent environment after leakage through an established gas convection-diffusion model, combining the gas concentration distribution in the simulated diffusion process with acoustic features to predict the sound source localization at the leak location; modeling the sound source localization search process as POMDP, iteratively updating the confidence state of the sound source location through a particle filter; extracting spatial distribution features of the confidence state through DBSCAN clustering as input to an LSTM-DQN network, fusing spatiotemporal features through the constructed LSTM-DQN network, achieving cross-scene generalization through transfer learning, and dynamically optimizing the output sound source coordinates through a Q-network.
[0006] Furthermore, leaked sound wave signals are acquired using a microphone array to extract acoustic features from complex backgrounds, including: Leaked acoustic signals are acquired using a 128-channel microphone array. The original audio signals are preprocessed, including framing the original audio signals, pre-emphasis to suppress low-frequency noise, and windowing using a Hamming window to reduce spectral leakage. The preprocessed audio signal is subjected to MFCC feature extraction to extract acoustic features in complex backgrounds.
[0007] Furthermore, the convection-diffusion model for the leaked gas is as follows: any position Average gas concentration at for:
[0008] In position Place a sensor with a radius of [missing information] at [missing information]. For a spherical sensor, the number of gas particles received by the sensor per unit time is expressed as the average impact rate. express:
[0009] Sensor location It was detected exactly within a unit of time. The probability of a gas particle is:
[0010] In the formula, In two-dimensional space The location of a leak source exists in the middle. The constant rate at which gas particles are released at this location; The gas particles are affected by wind speed in space. is the diffusion coefficient of gas particles in space; For scale parameters, This represents the average lifetime of the particles.
[0011] Furthermore, the sound source localization search process is modeled as a POMDP, and the confidence state of the sound source location is iteratively updated through a particle filter, including: Sound source search is defined as a seven-tuple partially observable Markov decision process; each partially observable Markov decision process includes a state set S, an action set A, and an observation set Ω; a particle filter is used for the continuous confidence state space. Perform iterative updates to update the confidence state; Furthermore, the continuous confidence state space is iteratively updated using a particle filter, including: Time step Confidence state in Depend on Weighted samples Approximate representation, where Represents particle state parameters, It is particle weight; We employ sequential importance sampling and assume the existence of a confidence state related to the target. Similar suggestion distribution In the suggested distribution Sampling and extraction are performed on the above. Based on the unchanged sound source parameters, point estimation and Represented as Then the update rule for the particle filter is:
[0012] When the number of valid samples is lower than a preset threshold, resampling is performed, and a Markov chain Monte Carlo shift step is introduced to improve sample diversity.
[0013] Furthermore, the spatial distribution features of the confidence states are extracted using DBSCAN clustering, including: Spatial distribution features are extracted using DBSCAN clustering, and the feature vectors of the extracted confidence states are obtained. for: ; in, This represents the ratio of the number of noise points to the total number of samples. This is the ratio of the number of samples in the largest cluster to the total number of samples. The total number of valid clusters; for ; for ; for ; Indicates the size of the search domain. It is the center of the largest cluster. This is the location of the search engine.
[0014] Furthermore, the LSTM-DQN network replaces the fully connected layers of the traditional DQN with LSTM to construct a spatiotemporal feature fusion model: Input layer: 6-dimensional feature vectors extracted by DBSCAN ; LSTM layer: 128 nodes, with a gating mechanism to store historical observation sequences, dynamically adjusting the information flow through the gating mechanism, and outputting the hidden state. ; Output layer: Fully connected layer mapping To action value ; Training an LSTM-DQN network includes: Initialize scene parameters and randomly generate sound source locations and searcher starting points; DBSCAN processes the current particle distribution and performs feature extraction; based on A greedy strategy is used to select actions. After the actions are executed, the state transition tuples are stored in the experience replay cache D. During training, small batches of transition data are uniformly sampled from the experience replay cache D. If the next state If it is in a terminated state, then set the total reward. for Otherwise, through the target network Calculate the total reward; Finally, gradient descent is performed to update the approximate network. Parameters, target network Every Steps were reset to The loop terminates when the sound source is located or the step threshold is reached.
[0015] Secondly, the technical solution adopted by this invention is as follows: a gas leak identification system based on sound localization, comprising: a sound data acquisition and processing module, which acquires leak sound wave signals through a microphone array and extracts acoustic features in a complex background; a leak gas diffusion simulation module, which simulates the diffusion process of gas after leakage in a turbulent environment through an established leak gas convection-diffusion model, and combines the gas concentration distribution in the simulated diffusion process with acoustic features to predict the sound source localization at the leak location; a POMDP optimization module, which models the sound source localization search process as POMDP, and iteratively updates the confidence state of the sound source location through a particle filter; and an identification module, which extracts spatial distribution features of the confidence state through DBSCAN clustering, uses it as input to an LSTM-DQN network, fuses spatiotemporal features through the constructed LSTM-DQN network, achieves cross-scene generalization through transfer learning, and dynamically optimizes the output sound source coordinates through a Q-network.
[0016] Thirdly, the technical solution adopted by the present invention is: a computer-readable storage medium for storing one or more programs, wherein the one or more programs include instructions, which, when executed by a computing device, cause the computing device to perform any of the methods described above.
[0017] Fourthly, the technical solution adopted by the present invention is: a computing device comprising: one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include instructions for performing any of the methods described above.
[0018] The present invention has the following advantages due to the adoption of the above technical solutions: This invention uses an optimized DQN model to process audio data from leaking gas pipelines in real time. When a gas leak is detected, it begins to predict the leak location incrementally until an optimal location is reached, at which point the location is recorded and an alarm is triggered. This intelligent identification of gas leak locations helps to quickly pinpoint leak locations, reducing losses caused by gas leaks and improving pipeline safety. Furthermore, it significantly improves accuracy, stability, and efficiency. Attached Figure Description
[0019] Figure 1 This is a flowchart of the gas leak identification method based on sound localization in an embodiment of the present invention; Figure 2 This is a schematic diagram of the LSTM-DQN structure in an embodiment of the present invention, describing the network topology (input layer, LSTM layer, fully connected layer) and data flow (confidence feature vector input, Q-value output). Figure 3This is a schematic diagram of sample distribution in an embodiment of the present invention, showing the initial particle distribution; Figure 4 These are the effective clusters after DBSCAN clustering in this embodiment of the invention, with the largest and smallest clusters after classification marked; Figure 5 This is an example of the search process when the number of search steps k=32 in an embodiment of the present invention; Figure 6 The performance of LSTM-DQN (SR and MSS) under different DBSCAN parameters in the embodiments of the present invention is shown, and the optimal parameters are Eps=0.2 and MinPts=15. Detailed Implementation
[0020] To address the shortcomings of traditional sound source localization methods for oil and gas pipeline leaks in complex environments, including low time delay estimation accuracy due to background noise interference, poor robustness of single signal processing algorithms, and lack of integration of physical propagation constraints in deep learning models, this invention provides a gas leak identification method, system, medium, and device based on sound localization. The method includes: acquiring leak sound wave signals through a microphone array and extracting acoustic features from the complex background; simulating the diffusion process of leaked gas in a turbulent environment using an established gas convection-diffusion model, combining the simulated gas concentration distribution with acoustic features to predict the sound source localization at the leak location; modeling the sound source localization search process as a POMDP, iteratively updating the confidence state of the sound source location using a particle filter; extracting spatial distribution features from the confidence state through DBSCAN clustering, using this as input to an LSTM-DQN network; fusing spatiotemporal features through the constructed LSTM-DQN network; achieving cross-scenario generalization through transfer learning; and dynamically optimizing the output sound source coordinates through a Q-network. This invention solves the following core problems by adopting the aforementioned technical solutions: (1) The time delay estimation error of the traditional generalized cross-correlation (GCC) algorithm increases significantly in strong noise environments, resulting in a decrease in the accuracy of sound source localization. (2) When LSTM networks process acoustic time-series features alone, they do not combine the physical constraints of sound wave propagation (such as the sound velocity attenuation model), which limits the reliability of dynamic correction. (3) Existing methods rely on a single optimization objective (such as localization accuracy), neglecting the synergistic optimization of computational efficiency and system generalization, making it difficult to adapt to the real-time monitoring needs of complex industrial scenarios.
[0021] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the described embodiments of the present invention are within the scope of protection of the present invention.
[0022] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.
[0023] In one embodiment of the present invention, a gas leak identification method based on sound localization is provided. In this embodiment, as... Figure 1 As shown, the method includes the following steps: 1) Acquire leaked sound wave signals through a microphone array and extract acoustic features from complex backgrounds.
[0024] 2) The gas convection-diffusion model is established to simulate the diffusion process of gas in a turbulent environment after leakage. The gas concentration distribution in the simulated diffusion process is combined with acoustic characteristics to predict the sound source location at the leakage location.
[0025] 3) The sound source localization search process is modeled as POMDP, and the confidence state of the sound source location is updated iteratively through particle filters.
[0026] 4) The confidence state is clustered by DBSCAN to extract spatial distribution features, which are then used as input to the LSTM-DQN network. The spatiotemporal features are fused through the constructed LSTM-DQN network, and cross-scene generalization is achieved by using transfer learning. The output sound source coordinates are dynamically optimized through the Q network.
[0027] In step 1) above, the leaked sound wave signal is acquired through a microphone array, and the acoustic features in the complex background are extracted, including the following steps: 1.1) Leakage acoustic signals are acquired through a 128-channel microphone array. The original audio signals are preprocessed, including framing the original audio signals, pre-emphasis to suppress low-frequency noise, and windowing with a Hamming window to reduce spectral leakage.
[0028] For example, the original audio signal is framed with a frame length of 25ms and a frame shift of 10ms; the pre-emphasis coefficient is 0.97.
[0029] 1.2) Perform MFCC feature extraction on the preprocessed audio signal to extract acoustic features in complex backgrounds.
[0030] In this embodiment, MFCC feature extraction includes the following process: FFT Transform: Calculate the Fast Fourier Transform (FFT) of each frame of the signal to obtain the power spectrum.
[0031] Mel filtering: It uses 40 triangular bandpass filter banks mapped to the Mel scale to simulate the characteristics of human hearing.
[0032] Logarithmic compression and DCT: The output of the filter bank is logarithmically taken and compressed to 13-dimensional MFCC coefficients by Discrete Cosine Transform (DCT).
[0033] In step 2) above, since the diffusion process of gas in a turbulent environment after leakage can be simulated by establishing a convection-diffusion model, this embodiment adopts a forward diffusion model for the leaked gas. Assuming a two-dimensional space... middle There is a leak source at a constant rate. The gas particles are released, and these gas particles are affected by wind speed in space. and diffusion coefficient It spreads and proliferates through the combined effects of these factors. Therefore: The convection-diffusion model for leaked gas is as follows: any position Average gas concentration at for:
[0034] In the formula, In two-dimensional space The location of a leak source exists in the middle. The constant rate at which gas particles are released at this location; The gas particles are affected by wind speed in space. is the diffusion coefficient of gas particles in space; For scale parameters, For the average lifetime of particles, the parameter This reflects the combined influence of wind speed and diffusion on the diffusion process.
[0035] If in position Place a sensor with a radius of [missing information] at [missing information]. For a spherical sensor, the number of gas particles it receives per unit time can be expressed as the average impact rate. express:
[0036] During gas diffusion, the contact between the sensor and gas particles is random and can be modeled as a Poisson process. If the sensor is located at... It was detected exactly within a unit of time. The probability of a gas particle is:
[0037] The leaked gas convection-diffusion model established by the above methods can simulate the gas flow in a leaked gas pipeline scenario, helping to predict the location of the sound source at the leak location.
[0038] In step 3) above, the core objective of the search process model is to address the state uncertainty problem in sound source localization. In complex environments (such as gas leak scenarios), sensors may not be able to directly observe the true location of the sound source, but can only infer it indirectly through local observations (such as gas particle impaction rate). Existing methods (such as those based on grid discretization) struggle to handle continuous state spaces and high-dimensional computational problems. Therefore, this embodiment models the search process as a sequential decision problem using the POMDP framework, combining iterative solutions for confidence states with particle filters, ultimately achieving efficient and robust sound source localization.
[0039] Specifically, the sound source localization search process is modeled as a POMDP, and the confidence state of the sound source location is iteratively updated through a particle filter, including the following steps: 3.1) Sound source search is defined as a seven-tuple partially observable Markov decision process (POMDP); each set of partially observable Markov decision processes includes a state set S, an action set A, and an observation set Ω.
[0040] In this embodiment, the state set (S) is a set of sound source location parameters (which remains fixed). Action set (A): {↑ (forward), ↓ (backward), ← (left), → (right)}, to move the agent with a fixed step size.
[0041] Observation set (Ω): The number of gas particles detected by the sensor d It follows a Poisson distribution:
[0042] in, The average impact velocity.
[0043] Confidence state update: due to the fixed state The simplified update formula is as follows:
[0044] By dynamically updating the state probability distribution, the agent's action decisions are guided.
[0045] 3.2) For continuous confidence state space, adopt... The particle filter is iteratively updated to update the confidence state.
[0046] In this embodiment, to address the challenge of solving the continuous confidence state space, a particle filter is used for iterative updating of the continuous confidence state space, including the following steps: 3.1.1) Time step Confidence state in Depend on Weighted samples Approximate representation, where Represents particle state parameters, It is particle weight; After particle sampling, the confidence state is represented as follows: (7) in, It is the Dirac function. It is a weighted average of the midpoint estimates in the state space.
[0047] 3.1.2) Ordinal importance sampling is used, and it is assumed that there is a confidence state related to the target. Similar suggestion distribution In the suggested distribution Sampling and extraction are performed on the above. Specifically, in the proposed distribution Sampling and decimation are performed on the particle filter, and the update rule is as follows: (8) in, It is the state transition probability. It is the observation likelihood function, representing the likelihood during action. Below, particles Generate observations The probability of.
[0048] 3.1.3) Based on the unchanged sound source parameters, point estimation... and Represented as Then the update rule of the particle filter in equation (8) is simplified to:
[0049] 3.1.4) When the number of valid samples is lower than the preset threshold, resampling is performed, and a Markov chain Monte Carlo moving step is introduced to improve the diversity of samples and ensure the performance of the particle filter.
[0050] In step 4) above, the spatial distribution features of the confidence states are extracted using DBSCAN clustering. Specifically, the feature vector of the extracted confidence states is obtained by extracting spatial distribution features through DBSCAN clustering. for: ; in, This represents the ratio of the number of noise points to the total number of samples. This is the ratio of the number of samples in the largest cluster to the total number of samples. The total number of valid clusters; for ; for ; for ; Indicates the size of the search domain. It is the center of the largest cluster. This is the location of the search engine.
[0051] In this embodiment, the sample features are designed as follows: spatial distribution features are extracted from the confidence states based on particle filtering using DBSCAN clustering; the feature vector of the confidence states is defined. These six features describe the confidence state from different perspectives. , and It is related to the sample distribution and reflects the degree of sample clustering. , and The maximum cluster contains the most samples, quantifying the spatial relationship between the maximum cluster and the searcher. and By normalizing the search domain size, spatial relationship features can be generalized to search regions of different scales.
[0052] In step 4) above, the LSTM-DQN network is constructed by replacing the fully connected layers of the traditional DQN with LSTM to build a spatiotemporal feature fusion model. Input layer: 6-dimensional feature vectors extracted by DBSCAN ; LSTM layer: 128 nodes, with a gating mechanism to store historical observation sequences, dynamically adjusting the information flow through the gating mechanism, and outputting the hidden state. ; Output layer: Fully connected layer mapping To action value .
[0053] In this embodiment, the information flow is dynamically adjusted through the gating mechanism (forget gate / input gate) of LSTM, which solves the long-term dependency problem.
[0054] In this embodiment, the training of the LSTM-DQN network includes the following steps: 4.1) Initialize scene parameters and randomly generate sound source locations and searcher starting points; 4.2) DBSCAN processes the current particle distribution and performs feature extraction; 4.3) Based on A greedy strategy is used to select actions. After the actions are executed, the state transition tuples are stored in the experience replay cache D. During training, small batches of transition data are uniformly sampled from the experience replay cache D. 4.4) If the next state If it is in a terminated state, then set the total reward. for Otherwise, through the target network Calculate the total reward; 4.5) Finally, perform gradient descent to update the approximate network. Parameters, target network Every Steps were reset to The loop terminates when the sound source is located or the step threshold is reached.
[0055] In this embodiment, the training mechanism is optimized as follows: Based on the foregoing, the three key elements of sound source search reinforcement learning are as follows: State: The state is represented by the sample set of the particle filter, and the spatial distribution features are extracted by the DBSCAN algorithm.
[0056] Action: Action Set It includes four behaviors: moving forward, backward, left, and right with a fixed step size. This design is widely used in baseline studies for robot path planning.
[0057] Reward: Since the objective is to minimize the number of search steps, the agent receives a negative reward for each step. When the sound source is located, the agent receives a positive reward. .
[0058] LSTM-DQN source search algorithm as follows Figure 2 As shown. The input consists of initial parameters such as scene size, release intensity, and wind speed. The output is the trained network model. Scene parameters, including particle filters, sound source locations, and searcher locations, are randomly initialized in each training round.
[0059] In each training round, the agent obtains observations at a new location. and rewards This observation is used to update the confidence state. Confidence state features were then extracted using the DBSCAN algorithm. The features are input into the Q-network to generate a value function estimate for each action. The searcher is based on... Greedy strategy selects action The system executes actions. Then, the system will transfer the state transition tuple. Store the data in the experience replay cache D. During training, uniformly sample small batches of transition data from D. If the next state... If it is in a terminated state, then set the total reward. for Otherwise, through the target network Calculate the total reward. Finally, perform gradient descent to update the approximate network. The parameters. Target network. Every Steps were reset to The loop terminates when the sound source is located or the step count threshold is reached.
[0060] In one embodiment of the present invention, a gas leak detection system based on sound localization is provided, comprising: The sound data acquisition and processing module acquires leaked sound wave signals through a microphone array and extracts acoustic features from complex backgrounds. The leaked gas diffusion simulation module simulates the diffusion process of gas in a turbulent environment after a leak by establishing a convection-diffusion model. It combines the gas concentration distribution during the simulated diffusion process with acoustic characteristics to predict the location of the sound source at the leak location. The POMDP optimization module models the sound source localization search process as POMDP and iteratively updates the confidence state of the sound source location through particle filters. The recognition module extracts spatial distribution features of the confidence state through DBSCAN clustering, which are used as input to the LSTM-DQN network. The constructed LSTM-DQN network fuses spatiotemporal features and uses transfer learning to achieve cross-scene generalization. The output sound source coordinates are dynamically optimized through the Q network.
[0061] In the above embodiments, the method of acquiring leaked sound wave signals through a microphone array and extracting acoustic features from a complex background includes: Leaked acoustic signals are acquired using a 128-channel microphone array. The original audio signals are preprocessed, including framing the original audio signals, pre-emphasis to suppress low-frequency noise, and windowing using a Hamming window to reduce spectral leakage. The preprocessed audio signal is subjected to MFCC feature extraction to extract acoustic features in complex backgrounds.
[0062] In the above embodiments, the convection-diffusion model for the leaked gas is as follows: any position Average gas concentration at for:
[0063] In position Place a sensor with a radius of [missing information] at [missing information]. For a spherical sensor, the number of gas particles received by the sensor per unit time is expressed as the average impact rate. express:
[0064] Sensor location It was detected exactly within a unit of time. The probability of a gas particle is:
[0065] In the formula, In two-dimensional space The location of a leak source exists in the middle. The constant rate at which gas particles are released at this location; The gas particles are affected by wind speed in space. is the diffusion coefficient of gas particles in space; For scale parameters, This represents the average lifetime of the particles.
[0066] In the above embodiments, the sound source localization search process is modeled as a POMDP, and the confidence state of the sound source location is iteratively updated through a particle filter, including: Sound source search is defined as a seven-tuple partially observable Markov decision process; each set of partially observable Markov decision processes includes a state set S, an action set A, and an observation set Ω; The continuous confidence state space is iteratively updated using a particle filter to update the confidence state; In the above embodiments, the continuous confidence state space is iteratively updated using a particle filter, including: Time step Confidence state in Depend on Weighted samples Approximate representation, where Represents particle state parameters, It is particle weight; We employ sequential importance sampling and assume the existence of a confidence state related to the target. Similar suggestion distribution In the suggested distribution Sampling and extraction are performed on the above. Based on the unchanged sound source parameters, point estimation and Represented as Then the update rule for the particle filter is:
[0067] When the number of valid samples is lower than a preset threshold, resampling is performed, and a Markov chain Monte Carlo shift step is introduced to improve sample diversity.
[0068] In the above embodiments, the spatial distribution features of the confidence states are extracted using DBSCAN clustering, including: Spatial distribution features are extracted using DBSCAN clustering, and the feature vectors of the extracted confidence states are obtained. for: ; in, This represents the ratio of the number of noise points to the total number of samples. This is the ratio of the number of samples in the largest cluster to the total number of samples. The total number of valid clusters; for ; for ; for ; Indicates the size of the search domain. It is the center of the largest cluster. This is the location of the search engine.
[0069] In the above embodiments, the LSTM-DQN network uses LSTM to replace the fully connected layers of the traditional DQN to construct a spatiotemporal feature fusion model: Input layer: 6-dimensional feature vectors extracted by DBSCAN ; LSTM layer: 128 nodes, with a gating mechanism to store historical observation sequences, dynamically adjusting the information flow through the gating mechanism, and outputting the hidden state. ; Output layer: Fully connected layer mapping To action value ; Training an LSTM-DQN network includes: Initialize scene parameters and randomly generate sound source locations and searcher starting points; DBSCAN processes the current particle distribution and performs feature extraction; based on A greedy strategy is used to select actions. After the actions are executed, the state transition tuples are stored in the experience replay cache D. During training, small batches of transition data are uniformly sampled from the experience replay cache D. If the next state If it is in a terminated state, then set the total reward. for Otherwise, through the target network Calculate the total reward; Finally, gradient descent is performed to update the approximate network. Parameters, target network Every Steps were reset to The loop terminates when the sound source is located or the step threshold is reached.
[0070] The system provided in this embodiment is used to execute the above-described method embodiments. For specific processes and details, please refer to the above embodiments, which will not be repeated here.
[0071] In this embodiment, to further illustrate the technical solution of the present invention, the present invention is further explained through hardware deployment and specific method execution process.
[0072] (1) Hardware deployment: A 128-channel microphone array is installed near the oil and gas pipeline, with the array axis strictly parallel to the pipeline direction. MEMS type sensors are selected, with an array diameter of 0.15m and a sampling rate of 48kHz.
[0073] (2) Signal Acquisition and Preprocessing: Leaked acoustic signals were acquired using a 128-channel microphone array. The original audio signal was framed (25ms frame length, 10ms frame shift), pre-emphasized (coefficient 0.97) to suppress low-frequency noise, and a Hamming window was applied to reduce spectral leakage. After FFT transformation, the Fast Fourier Transform (FFT) of each frame was calculated to obtain the power spectrum. Then, a 13-dimensional MFCC vector was obtained through Mel filtering and DCT.
[0074] (3) Convection-diffusion gas model construction: An 8×8 unit rectangular gas leakage scenario is constructed using an environmental simulator, and the gas concentration distribution is dynamically calculated using a fluid dynamics model.
[0075] The core parameters of the model include: sound source intensity Q (1.0 unit), wind speed V (0.0 unit, simplified fixed direction), diffusion coefficient f (1.0), average particle lifetime τ (250 units), detector size ψ (1.0 unit), and searcher movement step size (0.5 units).
[0076] like Figure 3 As shown, the particle filter is initialized with 3000 particles, and the probability distribution of the sound source location is updated through sequential importance sampling.
[0077] like Figure 4 As shown, the feature extractor is based on the DBSCAN clustering algorithm and extracts a six-dimensional feature vector from the particle distribution.
[0078] The LSTM-DQN agent receives feature vectors, outputs the optimal search action, and continuously optimizes the strategy through an experience replay mechanism.
[0079] (4) Particle filter state estimation: Initialization: 3000 particles are uniformly generated in an 8×8 space, with each particle representing a candidate solution for the sound source location.
[0080] Update process: Weight update: based on the actual number of hits by the detector d And particle prediction hit rate q The weights are updated according to the Poisson likelihood.
[0081] Resampling: When the effective number of particles Neff When the value is less than 1500, resample according to the weight ratio.
[0082] MCMC optimization: Add Gaussian noise (σ=0.1) to the Markov chain Monte Carlo shift to avoid local convergence.
[0083] (5) Spatiotemporal feature extraction: The DBSCAN density clustering algorithm was used to process the particle distribution (parameters Eps=0.2, MinPts=15) to extract a six-dimensional feature: the ratio of noise points to the total number of samples. The ratio of the number of samples in the largest cluster to the total number of samples. The total number of effective clusters , , and .
[0084] (6) LSTM-DQN decision network: The network architecture is as follows: Input layer: 6-dimensional feature vector; Hidden layer: 10-neuron fully connected layer + ReLU activation; Output layer: 4 neurons (corresponding to the Q values of 4 actions).
[0085] The training mechanism is as follows: (61) Experience replay pool: stores transfer records.
[0086] (62) Dual network mechanism: Main network: Parameters are updated in real time; Target network: Synchronize main network parameters every 500 steps.
[0087] (63) Loss function: mean squared error loss.
[0088] (64) - Greedy strategy: Initial exploration rate of 1.0, linearly decaying to 0.01.
[0089] (7) Training process: (71) Initialization: Randomly generate the sound source location and the searcher starting point; (72) Single-step loop: Feature extraction: DBSCAN processes the current particle distribution; Action selection: - Greedy strategy outputs actions; Environmental interaction: Perform movement to obtain new location / hit count / reward; Particle update: Update the filter based on new observations; Experience storage: Saves transfer records to the playback pool; Network update: Sample 32 records from the playback pool to train the network.
[0090] (73) Termination conditions: such as Figure 5 As shown, the termination condition is successful location of the sound source (distance ≤ 0.5), or reaching the upper limit of 1000 steps (marked as failure).
[0091] (8) Implementation of transfer learning: When scene parameters change (e.g., the region size becomes 10×8): load the pre-trained model parameters, freeze the weights of the underlying network, and fine-tune the output layer using a small learning rate (0.0001).
[0092] In summary, this invention, verified through experiments (500 Monte Carlo simulations), significantly improves accuracy, stability, and efficiency: Accuracy Improvement: In scenarios with Q=1 (release intensity) and V=0 (wind speed), the positioning error is reduced by 42%, and the success rate (SR) reaches 99.6%, outperforming the entropy strategy (SR 98.4%) and random search (SR 56.4%). Stability Enhancement: The LSTM dynamic correction mechanism effectively suppresses noise disturbances, reducing the average search steps (MSS) to 36.57 steps when wind speed changes (V=1). Real-time Optimization: Transfer learning verification shows that this technique has strong generalization ability; after retraining in new scenarios (such as a 10×8 area), the SR remains at 99.8%. Figure 6 As shown, the experimental data are based on the standard diffusion model parameters: diffusion rate Average lifetime of gas particles Sensor size The particle filter sample size is set to 3000, and it moves in a fixed step size of 0.5.
[0093] In one embodiment of the present invention, a computing device is provided. This computing device can be a terminal and may include a processor, a communication interface, memory, a display screen, and an input device. The processor, communication interface, and memory communicate with each other via a communication bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and computer programs. When the computer programs are executed by the processor, they implement the methods described in the above embodiments. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The communication interface is used for wired or wireless communication with external terminals. Wireless communication can be achieved through Wi-Fi, a management network, NFC (Near Field Communication), or other technologies. The display screen can be a liquid crystal display (LCD) or an e-ink display. The input device can be a touch layer covering the display screen, or buttons, a trackball, or a touchpad mounted on the casing of the computing device, or an external keyboard, touchpad, or mouse. The processor can call logical instructions stored in the memory.
[0094] Furthermore, the logical instructions in the aforementioned memory can be implemented as software functional units and sold or used as independent products, and can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0095] In one embodiment of the present invention, a computer program product is provided, the computer program product including a computer program stored on a non-transitory computer-readable storage medium, the computer program including program instructions, and when the program instructions are executed by a computer, the computer is able to perform the methods provided in the above-described method embodiments.
[0096] In one embodiment of the present invention, a non-transitory computer-readable storage medium is provided, which stores server instructions that cause a computer to perform the methods provided in the above embodiments.
[0097] The computer-readable storage medium provided in the above embodiments has a similar implementation principle and technical effect to the above method embodiments, and will not be described again here.
[0098] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0099] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0100] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0101] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A sound-based gas leak identification method, characterized in that, Comprise: Acoustic features in complex background are extracted by collecting leakage acoustic wave signals through microphone array; The diffusion process of gas after leakage in turbulent environment is simulated through the established convective-diffusion model of leakage gas, and the gas concentration distribution in the simulated diffusion process is combined with the acoustic features to predict the sound source positioning at the leakage location; The sound source positioning search process is modeled as POMDP, and the confidence state of the sound source position is iteratively updated through the particle filter; The spatial distribution features of the confidence state are extracted through DBSCAN clustering, which are used as the input of the LSTM-DQN network, and the spatio-temporal features are fused through the constructed LSTM-DQN network, and the cross-scene generalization is realized through transfer learning, and the sound source coordinates are output through the dynamic optimization of the Q network.
2. The gas leakage identification method based on sound localization according to claim 1, wherein, Acoustic features in complex background are extracted by collecting leakage acoustic wave signals through microphone array, comprising: The leakage acoustic wave signals are collected through a 128-channel microphone array, and the original audio signals are preprocessed, including framing the original audio signals, pre-emphasis to suppress low-frequency noise, and windowing through Hamming window to reduce spectral leakage; The preprocessed audio signals are subjected to MFCC feature extraction, and the acoustic features in the complex background are extracted. 3.The gas leakage identification method based on sound localization of claim 1, wherein, The convective-diffusion model of leakage gas is: arbitrary position average gas concentration at the position is: At a location where a spherical sensor with a sensing radius is placed, the number of gas particles received by the sensor per unit time is represented by the average impact rate : The sensor is located at a position The probability of detecting exactly gas particles in a unit of time is In the formula, In two-dimensional space The location of a leak source exists in the middle. The constant rate at which gas particles are released at this location; The gas particles are affected by wind speed in space. is the diffusion coefficient of gas particles in space; For scale parameters, This represents the average lifetime of the particles. 4.The gas leakage identification method based on sound localization of claim 1, wherein, The sound source positioning search process is modeled as POMDP, and the confidence state of the sound source position is iteratively updated through the particle filter, comprising: The sound source search is defined as a seven-tuple partially observable Markov decision process; Each set of partially observable Markov decision processes includes a state set S, an action set A, and an observation set Ω; The particle filter is used to iteratively update the continuous confidence state space, and the confidence state is updated. 5.The gas leakage identification method based on sound localization of claim 4, wherein, The particle filter is used to iteratively update the continuous confidence state space, comprising: time step confidence state in by weighted samples approximation, wherein denotes a particle state parameter, is a particle weight; Sequentially importance sampling is employed, and it is assumed that there exists a target confidence state A similar proposal distribution Sampling is drawn from the proposal distribution ; Based on the invariance of the sound source parameters, the point estimate and is expressed as The update rule of the particle filter is then When the number of effective samples is lower than the preset threshold, resampling is performed, and a Markov chain Monte Carlo moving step is introduced to improve the diversity of samples. 6.The gas leakage identification method based on sound localization of claim 1, wherein, The spatial distribution features of the confidence state are extracted through DBSCAN clustering, comprising: The spatial distribution features are extracted by DBSCAN clustering, and the feature vector of the confidence state is extracted is: ; wherein, is the ratio of the number of noise points to the total number of samples; is the ratio of the number of samples in the largest cluster to the total number of samples; is the total number of valid clusters; is ; is ; is ; denotes the size of the search domain, is the center position of the largest cluster, is the position of the searcher.
7. The gas leakage identification method based on sound localization according to claim 1, wherein, The LSTM-DQN network is, which replaces the traditional DQN full connection layer with LSTM to construct a spatio-temporal feature fusion model: Input layer: 6-dimensional feature vector extracted by DBSCAN ; LSTM layer: 128 nodes, gate mechanism stores history observation sequence, dynamically adjusts information flow through gate mechanism, outputs hidden state ; Output layer: fully connected layer mapping to action value ; The training of the LSTM-DQN network comprises: Initialize the scene parameters, randomly generate the sound source position and the search starting point; The current particle distribution is processed by DBSCAN, and the features are extracted; Based on The greedy policy selects an action, stores the state transition tuple into the experience replay buffer D after executing the action, and uniformly samples small batches of transition data from the experience replay buffer D during training. If the next state is the terminal state, then set the total reward to , otherwise compute the total reward through the target network ; Finally, gradient descent updates the parameters of the approximation network , the target network is reset every steps to ; the loop is terminated when the sound source is located or a step threshold is reached.
8. A gas leak identification system based on sound localization characterized in that, Comprise: The sound data acquisition and processing module collects leakage acoustic wave signals through microphone array, and extracts acoustic features in complex background; The leakage gas diffusion simulation module simulates the diffusion process of gas after leakage in turbulent environment through the established convective-diffusion model of leakage gas, and combines the gas concentration distribution in the simulated diffusion process with the acoustic features to predict the sound source positioning at the leakage location; The POMDP optimization module models the sound source positioning search process as POMDP, and iteratively updates the confidence state of the sound source position through the particle filter; The recognition module extracts the spatial distribution characteristics through DBSCAN clustering of the confidence state, takes the spatial distribution characteristics as the input of the LSTM-DQN network, fuses the space-time characteristics through the constructed LSTM-DQN network, realizes cross-scene generalization through migration learning, and dynamically optimizes the output sound source coordinates through the Q network.
9. A computer-readable storage medium storing one or more programs, the one or more programs comprising instructions that when executed by a computer cause the computer to perform a method of any of claims 1-8. The one or more programs include instructions, which when executed by a computing device, cause the computing device to perform any of the methods of claims 1-7.
10. A computing device, comprising: Comprise: One or more processors, memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs include instructions for performing any of the methods of claims 1-7. One or more processors, memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs include instructions for performing any of the methods of claims 1-7.
Citation Information
Cited By
Leakage monitoring method based on LNG gas system
CN122050612A
Acoustic monitoring and fault cell positioning method and system for battery spray valve of energy storage power station
CN122282308A
Gas extraction drilling hole leakage rapid detection device and method based on acoustic spectrum analysis
CN122630152A