Gas leakage rate prediction method and equipment

By preprocessing and feature extraction of gas leakage videos, and using regression algorithm models to predict gas leakage rate, the problems of waste of resources and slow calculation speed in the prior art are solved, and fast and accurate gas leakage rate detection is achieved.

CN119919852APending Publication Date: 2025-05-02NORTH CHINA INSTITUTE OF SCIENCE & TECHNOLOGY (NATIONAL SAFETY TRAINING CENTER OF COAL MINES)
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411995516.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-05-02

AI Technical Summary

Technical Problem

The existing gas leakage rate detection technology has the problems of waste of resources and slow calculation speed. Traditional methods require the arrangement of a large number of sensors and perform complex calculations.

Method used

By obtaining gas leakage video for pre-processing, including inter-frame differential processing and noise reduction processing, extracting gas cloud data and inputting a pre-trained regression algorithm model for prediction, the rapid and accurate prediction of gas leakage rate is achieved.

Benefits of technology

This method reduces dependence on sensors, reduces resource waste, and improves the accuracy and calculation speed of gas leakage rate prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119919852A_ABST
    Figure CN119919852A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a gas leakage rate prediction method and device, and belongs to the technical field of gas leakage detection. The method comprises the following steps: acquiring a gas leakage video; pre-processing the gas leakage video, wherein the pre-processing comprises inter-frame differential processing and noise reduction processing; extracting gas cloud data of the gas leakage video, wherein the gas cloud data comprises a shape feature, a time feature and a pixel value feature of each frame of the gas leakage video; and inputting the gas cloud data into a pre-trained regression algorithm model to obtain a gas leakage rate prediction result. The method is used for reducing the defects that in the prior art, resource waste is likely to be caused, and the calculation speed is low.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of gas leakage detection, and in particular to a gas leakage rate prediction method and device. Background Art

[0002] As a major chemical industry country, my country has seen frequent production safety accidents in recent years, which has aroused widespread concern in society. Fire and explosion accidents account for the majority of total accidents, among which fire and explosion accidents are mainly caused by dangerous gas leaks. Therefore, real-time monitoring of gas leaks is crucial to prevent accidents. Gas leakage rate detection is an important issue in the field of gas leakage monitoring. Through gas leakage rate detection, the trend prediction and impact range of the leakage can be obtained, and the consequences of the leakage can be evaluated, so as to make perfect emergency decisions.

[0003] Spectral video imaging has a wide range of applications in the chemical industry, especially in the field of gas leakage because of its advantages such as non-contact detection and visualization of gases that are invisible to the human eye. In spectral video imaging technology, most long-wave bands of gas leakage have characteristic absorption spectra. Therefore, using spectral video imaging technology to image the gas cloud of gas leakage and using artificial intelligence recognition of gas cloud images has broad prospects for predicting gas leakage rates.

[0004] As a means of artificial intelligence, deep learning can automatically identify data features, automatically perform calculations, and automatically make predictions. Combining gas leakage rate detection with deep learning can quickly and accurately detect gas leakage rates.

[0005] The existing gas leakage rate detection technology is mainly detected through sensors and calculation models. Patent CN118428257A introduces the regularization method to calculate the gas leakage rate through the sensor concentration information. Patent CN118711681A analyzes the concentration distribution changes, radial distribution and mean square displacement of gas molecules based on molecular dynamics trajectories, and uses the formula qt=P1V-P2V to establish a gas leakage rate calculation model, where q represents the gas leakage rate, t represents the leakage time, V represents the gas volume, P1 represents the gas pressure before the leakage, and P2 represents the gas pressure after the leakage. Compared with artificial intelligence algorithms, sensors and calculation models are not only cumbersome to calculate, but also require many parameters to be measured, and the calculation speed is slow, which easily leads to waste of resources. However, there are relatively few existing gas leakage rate detection technologies combined with artificial intelligence algorithms. Patent CN117034740A proposes a gas leakage rate detection method combined with deep learning. Several gas concentration sensors and wind speed sensors are arranged in the area to be tested, and the obtained gas concentration and wind speed data are input into the deep learning prediction model to predict the gas leakage rate. Although this method combines artificial intelligence algorithms, it still requires the deployment of a large number of sensors and cannot avoid the problem of resource waste.

[0006] The inventors of the present application discovered during the process of implementing the present invention that the above-mentioned solutions in the prior art have the defects of easily causing waste of resources and slow computing speed. Summary of the invention

[0007] The purpose of the embodiments of the present invention is to provide a gas leakage rate prediction method and device, which are used to reduce the defects of the prior art that easily cause waste of resources and slow calculation speed.

[0008] In order to achieve the above-mentioned objectives, in a first aspect, an embodiment of the present invention provides a gas leakage rate prediction method, the method comprising: acquiring a gas leakage video; preprocessing the gas leakage video, the preprocessing comprising frame difference processing and noise reduction processing; extracting gas cloud data of the gas leakage video, the gas cloud data comprising shape features, time features and pixel value features of each frame of the gas leakage video; and inputting the gas cloud data into a pre-trained regression algorithm model to obtain a gas leakage rate prediction result.

[0009] Optionally, the inter-frame difference processing includes: acquiring a background frame, where the background frame is the first frame of the gas leakage video; and performing background subtraction on each frame of the gas leakage video and the background frame.

[0010] Optionally, the noise reduction process includes: performing noise reduction on each frame of the gas leakage video using an elimination formula, the elimination formula being:

[0011]

[0012] Wherein, I(x,y) is the pixel value of the pixel with coordinates (x,y) in each frame, n is the preset pixel value threshold, I′(x,y) is the pixel value of the pixel with coordinates (x,y) after noise reduction; and it is determined whether the number of consecutive non-zero pixels in each frame is less than the preset number. If so, the pixel values ​​of the corresponding consecutive non-zero pixels are set to zero.

[0013] Optionally, extracting the gas cloud data of the gas leakage video includes: performing the following operations on each frame of the gas leakage video: obtaining the shooting time of the frame to obtain the time feature; traversing the frame pixel by pixel to obtain the distance between the pixels in the upper and lower directions of the frame as the width of the gas cloud, and the distance between the pixels in the leftmost and rightmost directions as the length of the gas cloud to obtain the shape feature; and traversing the frame pixel by pixel to obtain the pixel value of each pixel, and selecting the first pixel value as the pixel value feature, wherein the first pixel value is the maximum value, the median or the pixel value with the most occurrences among the pixel values ​​of all pixels in the frame.

[0014] Optionally, the pre-trained regression algorithm model includes: a linear regression algorithm model, an SVR algorithm model, a Bayesian algorithm model, a KNN algorithm model, a decision tree algorithm model or a random forest regression algorithm model.

[0015] Optionally, the pre-trained regression algorithm model is an SVR algorithm model.

[0016] Optionally, the training method of the regression algorithm model includes: obtaining simulated gas cloud data, the simulated gas cloud data being obtained through a gas leakage simulation experiment; dividing the simulated gas cloud data into a training set and a test set; training different regression algorithm models based on the simulated gas cloud data of the training set; testing the different regression algorithm models based on the simulated gas cloud data of the test set; and comparing the test results of the different regression algorithm models, and selecting the optimal regression algorithm model based on accuracy for gas leakage rate prediction.

[0017] Optionally, obtaining the simulated gas cloud data through the gas leakage simulation experiment includes: fixing other simulation parameters and setting the leakage rate as the only variable; performing a gas leakage simulation experiment based on different leakage rates to obtain simulated gas cloud data corresponding to different leakage rates; comparing and verifying the simulated gas cloud data of each leakage rate with the real gas cloud data of the same leakage rate; optimizing the simulation parameters based on the verification results until the simulated gas cloud data of each leakage rate is successfully compared and verified with the real gas cloud data of the same leakage rate; and performing a gas leakage simulation experiment based on the optimized simulation parameters to obtain the simulated gas cloud data, wherein the real gas cloud data is obtained through a spectral video imaging gas leakage simulation experiment.

[0018] Optionally, successful comparison and verification of the simulated gas cloud data with the real gas cloud data of the same leakage rate includes: calculating the difference in shape characteristics between the simulated gas cloud data and the real gas cloud data with the same diffusion time to obtain a first difference; calculating the slope of the curve of the simulated gas cloud data changing with the diffusion time to obtain a first slope; calculating the slope of the curve of the real gas cloud data changing with the diffusion time to obtain a second slope; and if the first difference is less than a preset threshold value, and the first slope is the same as the second slope, then the comparison and verification is judged to be successful.

[0019] On the other hand, the present invention provides a device for predicting gas leakage rate, the device comprising a memory and a processor, the processor being used to run a program, wherein the program, when run, is used to execute any of the above-mentioned gas leakage rate prediction methods of the present application.

[0020] Through the above technical scheme, the method proposed in the present invention first uses inter-frame difference processing and noise reduction processing to eliminate the influence of background and noise on statistical experimental data, realizes the complete smoothness of the gas cloud image, and obtains an image of only the gas cloud. Then, the extracted gas cloud data is used to predict in the pre-trained regression algorithm model to obtain the gas leakage rate, thereby improving the accuracy of the gas leakage rate prediction. At the same time, when using the method proposed in the present invention to predict the gas leakage rate, it is only necessary to obtain the gas leakage video without deploying a large number of sensors and measuring a large number of parameters for calculation, thereby reducing the waste of resources and improving the calculation speed.

[0021] Other features and advantages of the embodiments of the present invention will be described in detail in the subsequent detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The accompanying drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the following specific implementations, they are used to explain the embodiments of the present invention, but do not constitute a limitation on the embodiments of the present invention. In the accompanying drawings:

[0023] Figure 1 It is a flow chart of a gas leakage rate prediction method provided in one embodiment of the present invention.

[0024] Figure 2 It is a flow chart of a gas leakage rate prediction method provided by another embodiment of the present invention.

[0025] Figure 3 It is a schematic diagram of the structure of a device provided by an embodiment of the present invention.

[0026] Description of Reference Numerals

[0027] 101 processor 102 memory

[0028] 103 bus 10 device DETAILED DESCRIPTION

[0029] The specific implementation of the embodiment of the present invention is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described here is only used to illustrate and explain the embodiment of the present invention, and is not used to limit the embodiment of the present invention.

[0030] It should be noted that the acquisition, transmission, storage, use, and processing of data in the technical solution of this application are in compliance with the relevant provisions of national laws and regulations. In the embodiments of this application, some existing solutions in the industry such as certain software, components, and models may be mentioned, which should be considered as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of this application, but it does not mean that the applicant has or will necessarily use the solution.

[0031] Figure 1 FIG. 1 is a flow chart of a method for predicting a gas leakage rate according to an embodiment of the present invention. Figure 1 The method comprises the following steps S101 to S104.

[0032] Step S101: Acquire a gas leakage video.

[0033] Step S102: preprocessing the gas leakage video, wherein the preprocessing includes frame difference processing and noise reduction processing.

[0034] Step S103: extracting gas cloud data of the gas leakage video, wherein the gas cloud data includes shape features, time features, and pixel value features of each frame of the gas leakage video.

[0035] Step S104: inputting the gas cloud data into a pre-trained regression algorithm model to obtain a gas leakage rate prediction result.

[0036] Among them, gas leakage video can be shot by infrared spectrum camera.

[0037] The method proposed in the present invention firstly utilizes the physical properties of gas clouds, and pre-processes the gas leakage video by using inter-frame difference processing and noise reduction processing, thereby eliminating the influence of complex background and multiple noise points on statistical experimental data, achieving the complete smoothness of the gas cloud image, and obtaining an image of only the gas cloud. Then, the gas cloud data is extracted and input into a pre-trained regression algorithm model, and the gas leakage rate is predicted by the features of multiple dimensions such as shape, time and pixel value, thereby improving the accuracy of the gas leakage rate prediction. When the method proposed in the present invention is used to predict the gas leakage rate, it is only necessary to obtain the gas leakage video without deploying a large number of sensors and measuring a large number of parameters for calculation, thereby reducing the waste of resources and improving the calculation speed.

[0038] Furthermore, the inter-frame difference processing includes: acquiring a background frame, where the background frame is the first frame of the gas leakage video; and performing background subtraction on each frame of the gas leakage video and the background frame.

[0039] It should be noted that since the method proposed in the present invention is used to predict the leakage rate, there is no strict limitation on the state of the background frame. For example, the background frame can be an image without leakage or an image with a small amount of gas leakage. By performing background subtraction on each frame and the background frame, the influence of the background is eliminated, which effectively improves the accuracy and reliability of leakage detection, especially in complex backgrounds, and can more accurately predict the gas leakage rate.

[0040] Furthermore, the noise reduction process includes: using an elimination formula to reduce noise for each frame of the gas leakage video, and the elimination formula is:

[0041]

[0042] Wherein, I(x,y) is the pixel value of the pixel with coordinates (x,y) in each frame, n is the preset pixel value threshold, I′(x,y) is the pixel value of the pixel with coordinates (x,y) after noise reduction; and it is determined whether the number of consecutive non-zero pixels in each frame is less than the preset number. If so, the pixel values ​​of the corresponding consecutive non-zero pixels are set to zero.

[0043] The method proposed in the present invention performs two steps in noise reduction. First, the noise reduction formula is used to set the pixels whose pixel values ​​are less than the preset pixel value threshold to zero, thereby eliminating most of the noise points. It should be noted that the gas cloud image has a physical property that there are a continuous preset number, such as m non-zero pixels. In the second step of noise reduction, this physical property is used to set the pixels whose continuous number of continuous non-zero pixels in the image is less than m to zero pixels to eliminate the remaining noise points, so that an image with only gas clouds is obtained.

[0044] Furthermore, extracting the gas cloud data of the gas leakage video includes performing the following operations on each frame of the gas leakage video.

[0045] The shooting time of the frame is obtained to obtain the time feature.

[0046] The frame is traversed pixel by pixel, and the distance between the pixels in the uppermost and lowermost directions of the frame is obtained as the width of the gas cloud, and the distance between the pixels in the leftmost and rightmost directions is obtained as the length of the gas cloud, thereby obtaining the shape feature.

[0047] The frame is traversed pixel by pixel, the pixel value of each pixel is obtained, and the first pixel value is selected as the pixel value feature.

[0048] The first pixel value is the maximum value, median value or the pixel value with the most occurrence among the pixel values ​​of all pixels in the frame.

[0049] When obtaining shape features, the width and length of the gas cloud can be expressed in pixels. When the first pixel value is the maximum value among all pixel values, it can be found by the following formula:

[0050]

[0051] Among them, i is the horizontal coordinate of the pixel, j is the vertical coordinate of the pixel, M is the width of each frame, N is the length of each frame, I(i,j) is the position of the pixel at a certain point in the image, and max(I) is the maximum pixel value.

[0052] Furthermore, the pre-trained regression algorithm model includes: a linear regression algorithm model, an SVR algorithm model, a Bayesian algorithm model, a KNN algorithm model, a decision tree algorithm model or a random forest regression algorithm model.

[0053] When selecting a regression algorithm model, one of the various existing algorithm models may be selected. In fact, multiple algorithm models may be trained, and the optimal algorithm model may be selected based on the accuracy of each algorithm model for gas leakage rate prediction.

[0054] Specifically, the training method of the regression algorithm model includes the following steps.

[0055] Acquire simulated gas cloud data, wherein the simulated gas cloud data is obtained through a gas leakage simulation experiment.

[0056] The simulated gas cloud data is divided into a training set and a test set.

[0057] Different regression algorithm models are trained based on the simulated gas cloud data of the training set.

[0058] The different regression algorithm models are tested based on the simulated gas cloud data of the test set.

[0059] The test results of the different regression algorithm models are compared, and the optimal regression algorithm model is selected based on the accuracy for gas leakage rate prediction.

[0060] Table 1 is a comparison result of the accuracy of several regression algorithm models trained in one embodiment of the present invention. It can be seen from Table 1 that the detection accuracy of the SVR algorithm is the best, so the pre-trained regression algorithm model can be the SVR algorithm model. In addition, when comparing the accuracy of several regression algorithm models, different proportions of training sets and test sets can be divided to compare different regression algorithms, so as to make a more comprehensive evaluation of different regression algorithms.

[0061] Table 1 Algorithm detection accuracy comparison

[0062]

[0063]

[0064] When the selected regression algorithm model is the SVR algorithm model, when the model is used to predict gas leakage data, the calculation formula of the loss function is:

[0065]

[0066] Among them, ε is an insensitive loss function, and the error within the range of ε is not included in the loss. y is the true value, and f(x) is the model prediction value. The tolerance interval is introduced through the loss function to enhance the robustness of the model and reduce the sensitivity to noise. At the same time, it well reflects the difference between the true value and the predicted value, so as to better optimize the model.

[0067] The kernel function of the SVR algorithm model is RBF, and the calculation formula is:

[0068]

[0069] Among them, δ is the kernel width parameter, x i and x j is the input feature. The kernel function can be used to map the input data to a higher-dimensional space, making the data linearly separable without significantly increasing the computational complexity.

[0070] The optimization objective formula of the SVR algorithm model is:

[0071]

[0072] Among them, w is the weight vector of the model, C is the regularization parameter, which is used to balance the control model complexity and training error, ζ iis a slack variable used to represent the prediction error beyond the range of ε. The prediction error can be well limited by optimizing the objective formula.

[0073] After training is completed, the SVR algorithm's prediction formula for data is:

[0074]

[0075] Where b is the bias term and m is the number of support vectors. i And the kernel function K(x i ,x) to realize the prediction of new data x.

[0076] Furthermore, obtaining the simulated gas cloud data through the gas leakage simulation experiment includes the following steps.

[0077] The other simulation parameters are fixed and the leakage rate is set as the only variable.

[0078] A gas leakage simulation experiment is carried out based on different leakage rates to obtain simulated gas cloud data corresponding to different leakage rates.

[0079] The simulated gas cloud data of each leakage rate are compared and verified with the real gas cloud data of the same leakage rate.

[0080] The simulation parameters are optimized based on the verification results until the simulated gas cloud data of each leakage rate is successfully verified by comparison with the real gas cloud data of the same leakage rate.

[0081] A gas leakage simulation experiment is performed based on the optimized simulation parameters to obtain the simulated gas cloud data.

[0082] The real gas cloud data is obtained through a spectral video imaging gas leakage simulation experiment.

[0083] It should be noted that when obtaining real gas cloud data through the spectral video imaging gas leakage simulation experiment, a spectral video imaging gas leakage simulation platform is first built, and the platform can be built in the way of existing technology. When conducting the experiment, similar to the simulation experiment, other parameters that affect the gas shape are also fixed, and the leakage rate is set as the only variable. Then, the infrared spectral camera is used to shoot and obtain gas leakage videos with several leakage rates. After obtaining the video, preprocessing is performed and the gas cloud data is extracted to obtain the required real gas cloud data for comparison with the gas leakage simulation experiment.

[0084] Furthermore, the successful comparison and verification of the simulated gas cloud data with the real gas cloud data of the same leakage rate includes the following steps.

[0085] The difference in shape characteristics between the simulated gas cloud data and the real gas cloud data with the same diffusion time is calculated to obtain a first difference.

[0086] The slope of the curve of the simulated gas cloud data changing with diffusion time is calculated to obtain the first slope.

[0087] The slope of the curve of the real gas cloud data changing with diffusion time is calculated to obtain the second slope.

[0088] If the first difference is smaller than a preset threshold value, and the first slope is the same as the second slope, then it is determined that the comparison verification is successful.

[0089] In this step, the accuracy of the simulated gas cloud data is verified by comparing the consistency of the simulated gas cloud data with the real gas cloud data in terms of shape characteristics and diffusion speed changes. Specifically, the shape difference between the simulated gas cloud data and the real gas cloud data under the same diffusion time is first calculated. If this difference is less than the preset threshold, it indicates that the two data are close in shape; secondly, the slope of the simulated gas cloud data and the real gas cloud data over time is compared and analyzed. For example, the slope of the first pixel over time curve can be selected. If the two are the same, it indicates that the simulated gas cloud data can accurately simulate the diffusion process of the real gas cloud, and the simulation parameters can be used to conduct a large number of experiments to obtain the required simulated gas cloud data.

[0090] Figure 2 FIG. 1 is a flow chart of a method for predicting a gas leakage rate according to another embodiment of the present invention. Figure 2 As shown, the entire process of the method proposed in the present invention can be divided into the following steps S201 to S207.

[0091] Step S201: Experimental design and data collection. The experimental design includes the design of a spectral video imaging gas leakage simulation experiment and a gas leakage simulation experiment, as well as corresponding data collection.

[0092] Step S202: Data preprocessing: The data preprocessing here is for the data obtained from the spectral video imaging gas leakage simulation experiment, while the data obtained from the gas leakage simulation experiment does not need preprocessing.

[0093] Step S203: Verification and optimization of simulation data. The two types of data are compared and verified, and the simulation parameters are optimized based on the verification results, so that the data obtained by the gas leakage simulation experiment is close to the real value.

[0094] Step S204: Simulation experiment data collection: Based on the optimized simulation parameters, a large number of simulation experiments are performed and experimental data are collected.

[0095] Step S205: Dataset division and algorithm comparison: In this step, the data set is divided into training sets and test sets of different proportions, and multiple existing algorithm models are compared.

[0096] Step S206: Model training: Based on data sets of different proportions, train different selected algorithm models, and select the optimal algorithm model from them.

[0097] Step S207: New data prediction: The optimal algorithm model is used to predict the new data, that is, the optimal algorithm model is used to predict the gas leakage rate in actual production.

[0098] The present invention also provides a device for predicting gas leakage rate, for example, Figure 3 As shown, the device includes a memory and a processor, wherein the processor is used to run a program, wherein the program is used to execute the gas leakage rate prediction method when being run.

[0099] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0100] An embodiment of the present invention provides a storage medium on which a program is stored. When the program is executed by a processor, the gas leakage rate prediction method is implemented.

[0101] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0102] The processor includes a kernel, which calls the corresponding program unit from the memory. One or more kernels can be set, and the gas leakage rate prediction can be achieved by adjusting the kernel parameters.

[0103] An embodiment of the present invention further provides a computer program product, which, when executed on a data processing device, is suitable for executing a program for initializing the gas leakage rate prediction.

[0104] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0105] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0106] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0107] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0108] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0109] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0110] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0111] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0112] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. A method for predicting gas leakage rate, characterized in that: The method comprises: Get a video of the gas leak; Preprocessing the gas leakage video, wherein the preprocessing includes frame difference processing and noise reduction processing; Extracting gas cloud data of the gas leakage video, wherein the gas cloud data includes shape features, time features, and pixel value features of each frame of the gas leakage video; and The gas cloud data is input into a pre-trained regression algorithm model to obtain a gas leakage rate prediction result.

2. The method according to claim 1, characterized in that The inter-frame difference processing includes: Acquire a background frame, where the background frame is the first frame of the gas leakage video; and Each frame of the gas leakage video is subjected to background subtraction from the background frame.

3. The method according to claim 1, characterized in that The noise reduction process comprises: Each frame of the gas leakage video is subjected to noise reduction using an elimination formula, and the elimination formula is: Wherein, I(x,y) is the pixel value of the pixel with coordinates (x,y) in each frame, n is a preset pixel value threshold, and I′(x,y) is the pixel value of the pixel with coordinates (x,y) after noise reduction; and It is determined whether the number of consecutive non-zero pixels in each frame is less than a preset number. If so, the pixel values ​​of the corresponding consecutive non-zero pixels are set to zero.

4. The method according to claim 1, characterized in that: Extracting the gas cloud data of the gas leakage video includes: For each frame of the gas leak video, perform the following operations: Obtaining the shooting time of the frame to obtain the time feature; Traversing the frame pixel by pixel, obtaining the distance between the pixels in the uppermost and lowermost directions of the frame as the width of the gas cloud, and the distance between the pixels in the leftmost and rightmost directions as the length of the gas cloud, to obtain the shape feature; and Traverse the frame pixel by pixel, obtain the pixel value of each pixel, select the first pixel value as the pixel value feature, The first pixel value is the maximum value, median value or the pixel value with the most occurrence among the pixel values ​​of all pixels in the frame.

5. The method according to claim 1, characterized in that The pre-trained regression algorithm model includes: Linear regression algorithm model, SVR algorithm model, Bayesian algorithm model, KNN algorithm model, decision tree algorithm model or random forest regression algorithm model.

6. The method according to claim 1, characterized in that The pre-trained regression algorithm model is an SVR algorithm model.

7. The method according to claim 1, characterized in that The training method of the regression algorithm model includes: Acquiring simulated gas cloud data, wherein the simulated gas cloud data is obtained through a gas leakage simulation experiment; Dividing the simulated gas cloud data into a training set and a test set; Training different regression algorithm models based on the simulated gas cloud data of the training set; Testing the different regression algorithm models based on the simulated gas cloud data of the test set; and The test results of the different regression algorithm models are compared, and the optimal regression algorithm model is selected based on the accuracy for gas leakage rate prediction.

8. The method according to claim 7, characterized in that The simulated gas cloud data obtained through the gas leakage simulation experiment includes: Fix other simulation parameters and set the leakage rate as the only variable; Conduct gas leakage simulation experiments based on different leakage rates to obtain simulated gas cloud data corresponding to different leakage rates; Compare and verify the simulated gas cloud data of each leakage rate with the real gas cloud data of the same leakage rate; Optimize the simulation parameters based on the verification results until the simulated gas cloud data of each leakage rate is successfully verified by comparing with the real gas cloud data of the same leakage rate; and A gas leakage simulation experiment is performed based on the optimized simulation parameters to obtain the simulated gas cloud data. The real gas cloud data is obtained through a spectral video imaging gas leakage simulation experiment.

9. The method according to claim 8, characterized in that The successful comparison and verification of the simulated gas cloud data with the real gas cloud data of the same leakage rate includes: Calculating the difference in shape characteristics between the simulated gas cloud data and the real gas cloud data with the same diffusion time to obtain a first difference; Calculate the slope of the curve of the simulated gas cloud data changing with diffusion time to obtain a first slope; Calculate the slope of the curve of the actual gas cloud data changing with diffusion time to obtain a second slope; and If the first difference is smaller than a preset threshold value, and the first slope is the same as the second slope, then it is determined that the comparison verification is successful.

10. A device for predicting gas leakage rate, the device comprising a memory and a processor, characterized in that: The processor is used to run a program, wherein the program is used to execute: A method for predicting gas leakage rate according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Method and system for positioning combustible gas leakage source and predicting leakage rate in tunnel

    CN117034740A

  • Method for identifying hydrogen leakage of hydrogen fuel cell vehicle in underground parking lot

    CN118428257A

  • Molecular dynamics simulation method for gas leakage in metal microcracks

    CN118711681A