Gas leakage prediction method and device, terminal equipment and storage medium

CN117476128BActive Publication Date: 2026-09-15CHINA PETROLEUM & CHEMICAL CORP +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210854882.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-18
Publication Date
2026-09-15
Estimated Expiration
2042-07-18

AI Technical Summary

Technical Problem

[0006]本发明的目的是提供一种气体泄漏预测方法、装置、终端设备及存储介质,解决现有技术中难以准确、快速预测气体泄漏影响的技术问题

Benefits of technology

[0052] This invention processes and analyzes the acquired leakage data to determine the target leakage scenario corresponding to the leaking gas, and calls the prediction model corresponding to the target leakage scenario to predict the concentration of the leaking gas. This allows for the rapid determination of the leakage concentration of the leaking gas without the need for indiscriminate simulation for each leakage scenario, thereby effectively reducing the amount of computation and improving prediction efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117476128B_ABST
    Figure CN117476128B_ABST
Patent Text Reader

Abstract

The application provides a gas leakage prediction method and device, terminal equipment and storage medium, and belongs to the technical field of gas leakage prediction. The method comprises the following steps: acquiring leakage data of a leakage gas in a target area, wherein the leakage data comprises a gas category of the leakage gas, a leakage point, an environmental wind direction, a gas leakage rate and an environmental wind speed; in the case that the leakage data meets a preset condition, determining a target leakage scene corresponding to the leakage gas according to the gas category of the leakage gas, the leakage point and the environmental wind direction; calling a gas leakage concentration prediction model corresponding to the target leakage scene, taking the gas leakage rate and the environmental wind speed as inputs, and predicting a gas concentration of the leakage gas in the target area through the gas leakage concentration prediction model. The application can quickly determine the leakage concentration of the leakage gas, does not need to perform indiscriminate simulation and simulation for each leakage scene, thereby effectively reducing the calculation amount and improving the prediction efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of gas leak prediction technology, and more specifically to a gas leak prediction method, a gas leak prediction device, a terminal device, and a computer-readable storage medium. Background Technology

[0002] In industrial production, hazardous gas leaks occur frequently. Because hazardous gases are often flammable, explosive, toxic, and harmful, leaks can cause serious personal injury and property damage, and the environmental pollution is difficult to estimate. After a leak, the hazardous gas enters the atmosphere and, along with the movement of surrounding air, often forms a large danger zone. Determining the diffusion range and concentration of the hazardous gas is crucial for delineating warning zones and conducting rescue operations. Therefore, after a gas leak accident, it is necessary to quickly determine the affected area and the gas concentration distribution. However, existing studies simulating the consequences of gas leaks have the following main problems:

[0003] It is impossible to exhaustively simulate all leakage scenarios. Because environmental conditions are random, the possible leakage accidents are also random, and it is impossible to predict and simulate the consequences of all possible leakages in advance.

[0004] Conventional CFD (Computational Fluid Dynamics) simulations require substantial computing resources and lengthy computation times. Simulating hypothetical gas leak accidents necessitates steps such as modeling, mesh generation, and fluid dynamics simulation. The computation time depends on the available computing resources and is lengthy, making it difficult to quickly determine the impact area and gas concentration in any given gas leak scenario.

[0005] Performing indiscriminate CFD simulations for each leakage scenario results in high computational load and low prediction efficiency. Summary of the Invention

[0006] The purpose of this invention is to provide a gas leak prediction method, device, terminal equipment, and storage medium to solve the technical problem of difficulty in accurately and quickly predicting the impact of gas leaks in the prior art.

[0007] To achieve the above objectives, in a first aspect of the present invention, a gas leak prediction method is provided, comprising:

[0008] Acquire leakage data of leaked gas in the target area, including leakage location, ambient wind direction, gas leakage rate, and ambient wind speed;

[0009] When the leakage data meets the preset conditions, the gas leakage concentration prediction model corresponding to the ambient wind direction is invoked. The gas leakage concentration prediction model predicts the gas concentration of the leaked gas in the target area by taking the leakage point, gas leakage rate and ambient wind speed as input. The gas leakage concentration prediction model is obtained by training the machine learning algorithm with different leakage points, different gas leakage rates and different ambient wind speeds corresponding to the ambient wind direction.

[0010] Optionally, before invoking the gas leakage concentration prediction model corresponding to the ambient wind direction, the method further includes:

[0011] Determine all preset leak locations, ambient wind direction, gas leak rate, and ambient wind speed within the target area;

[0012] For each ambient wind direction, a combination of any leak point, any gas leak rate and any ambient wind speed is taken as a leak scenario corresponding to the current ambient wind direction. All the leak scenarios are clustered to determine the target leak scenario corresponding to the current ambient wind direction.

[0013] For each environmental wind direction, based on all target leakage scenarios corresponding to the current environmental wind direction, a gas leakage concentration prediction model is constructed using machine learning algorithms. This model takes the leakage point, gas leakage rate, and environmental wind speed as inputs and the gas concentration of the leaked gas in the target area as output.

[0014] Optionally, for each ambient wind direction, based on all target leakage scenarios corresponding to the current ambient wind direction, a gas leakage concentration prediction model is constructed using a machine learning algorithm. This model takes the leakage location, gas leakage rate, and ambient wind speed as input, and the gas concentration of the leaked gas in the target area as output. The model includes:

[0015] Identify at least one monitoring point within the target area, for each environmental wind direction:

[0016] Modeling and simulation of all target leakage scenarios within the target area;

[0017] Calculate the gas concentration at each monitoring point in the target area under different target leakage scenarios, and use all the obtained target leakage scenarios and their corresponding gas concentrations at each monitoring point as sample data;

[0018] The machine learning algorithm was trained based on the obtained sample data to obtain a gas leakage concentration prediction model corresponding to the current environmental wind direction.

[0019] Optionally, after acquiring leakage data of the leaked gas in the target area, the method further includes:

[0020] Obtain a historical leakage data table of the leaked gas and determine whether there is a gas concentration of the leaked gas corresponding to the leakage data in the historical leakage data table. The historical leakage data table includes at least the gas concentration of the leaked gas corresponding to different leakage data.

[0021] The preset conditions include:

[0022] The historical leakage data table does not contain the gas concentration of the leaked gas corresponding to the leakage data.

[0023] Optionally, the method further includes:

[0024] If the historical leakage data table contains a gas concentration of the leaked gas corresponding to the leakage data, the gas concentration of the leaked gas in the target area corresponding to the leakage data in the historical leakage data table shall be used as the gas concentration of the leaked gas in the target area.

[0025] Optionally, after predicting the gas concentration of leaked gas in the target area using the gas leak concentration prediction model, the method further includes:

[0026] The leakage data and the gas concentration of the leaked gas in the target area are stored as historical leakage data in the historical leakage data table.

[0027] In a second aspect of the invention, a gas leak prediction device is provided, comprising:

[0028] The data acquisition module is configured to acquire leakage data of leaked gas in the target area, including the leakage location, ambient wind direction, gas leakage rate, and ambient wind speed.

[0029] The concentration prediction module is configured to, when the leakage data meets preset conditions, call the gas leakage concentration prediction model corresponding to the concentration prediction, and use the leakage point, gas leakage rate and ambient wind speed as input to predict the gas concentration of the leaked gas in the target area. The gas leakage concentration prediction model is obtained after training the machine learning algorithm with different leakage points, different gas leakage rates and different ambient wind speeds corresponding to the ambient wind direction.

[0030] Optionally, the device further includes:

[0031] The model building module is configured to determine all preset leak locations, ambient wind direction, gas leak rate, and ambient wind speed in the target area.

[0032] For each ambient wind direction, a combination of any leak point, any gas leak rate and any ambient wind speed is taken as a leak scenario corresponding to the current ambient wind direction. All the leak scenarios are clustered to determine the target leak scenario corresponding to the current ambient wind direction.

[0033] For each environmental wind direction, based on all target leakage scenarios corresponding to the current environmental wind direction, a gas leakage concentration prediction model is constructed using machine learning algorithms. This model takes the leakage point, gas leakage rate, and environmental wind speed as inputs and the gas concentration of the leaked gas in the target area as output.

[0034] Optionally, the model building module is configured as follows:

[0035] Identify at least one monitoring point within the target area, for each environmental wind direction:

[0036] Modeling and simulation of all target leakage scenarios within the target area;

[0037] Calculate the gas concentration at each monitoring point in the target area under different target leakage scenarios, and use all the obtained target leakage scenarios and their corresponding gas concentrations at each monitoring point as sample data;

[0038] The machine learning algorithm was trained based on the obtained sample data to obtain a gas leakage concentration prediction model corresponding to the current environmental wind direction.

[0039] Optionally, the concentration prediction module is further configured to:

[0040] After obtaining leakage data of leaked gas in the target area, a historical leakage data table of leaked gas is obtained and it is determined whether there is a gas concentration of leaked gas corresponding to the leakage data in the historical leakage data table. The historical leakage data table includes at least the gas concentration of leaked gas corresponding to different leakage data.

[0041] The preset conditions include:

[0042] The historical leakage data table does not contain the gas concentration of the leaked gas corresponding to the leakage data.

[0043] Optionally, the concentration prediction module is further configured to:

[0044] If the historical leakage data table contains a gas concentration of the leaked gas corresponding to the leakage data, the gas concentration of the leaked gas in the target area corresponding to the leakage data in the historical leakage data table shall be used as the gas concentration of the leaked gas in the target area.

[0045] Optionally, after the gas concentration of the leaked gas in the target area is predicted by the gas leakage concentration prediction model, the concentration prediction module is further configured to:

[0046] The leakage data and the gas concentration of the leaked gas in the target area are stored as historical leakage data in the historical leakage data table.

[0047] In a third aspect of the present invention, a terminal device is provided, comprising:

[0048] At least one processor;

[0049] A memory connected to the at least one processor;

[0050] The memory stores instructions that can be executed by the at least one processor, which implements the gas leak prediction method described above by executing the instructions stored in the memory.

[0051] In a fourth aspect of the invention, a computer-readable storage medium is provided storing computer instructions that, when executed on a computer, cause the computer to perform the gas leak prediction method described above.

[0052] This invention processes and analyzes the acquired leakage data to determine the target leakage scenario corresponding to the leaking gas, and calls the prediction model corresponding to the target leakage scenario to predict the concentration of the leaking gas. This allows for the rapid determination of the leakage concentration of the leaking gas without the need for indiscriminate simulation for each leakage scenario, thereby effectively reducing the amount of computation and improving prediction efficiency.

[0053] Other features and advantages of the embodiments of the present invention will be described in detail in the following detailed description section. Attached Figure Description

[0054] The accompanying drawings are provided to further illustrate embodiments of the present invention and form part of the specification. They are used together with the following detailed description to explain the embodiments of the present invention, but do not constitute a limitation thereof. In the drawings:

[0055] Figure 1 This is a flowchart of a gas leak prediction method provided by a preferred embodiment of the present invention;

[0056] Figure 2 This is a gas leak prediction logic diagram provided in a preferred embodiment of the present invention;

[0057] Figure 3 This is a schematic block diagram of a gas leak prediction device provided in a preferred embodiment of the present invention;

[0058] Figure 4This is a schematic diagram of a terminal device provided in a preferred embodiment of the present invention.

[0059] Explanation of reference numerals in the attached figures

[0060] 10 - Terminal device, 100 - Processor, 101 - Memory, 102 - Computer program. Detailed Implementation

[0061] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit the scope of the present invention.

[0062] like Figure 1 As shown, this embodiment provides a gas leak prediction method, including:

[0063] Acquire leakage data of leaked gas in the target area. The leakage data includes the location of the leak, the ambient wind direction, the gas leakage rate, and the ambient wind speed.

[0064] If the leakage data meets the preset conditions, the gas leakage concentration prediction model corresponding to the ambient wind direction is invoked. The gas leakage concentration prediction model predicts the gas concentration of the leaked gas in the target area by taking the leakage point, gas leakage rate and ambient wind speed as input. The gas leakage concentration prediction model is obtained after training the machine learning algorithm with different leakage points, different gas leakage rates and different ambient wind speeds corresponding to different ambient wind directions.

[0065] Thus, this embodiment processes and analyzes the acquired leakage data to determine the target leakage scenario corresponding to the leaking gas, and calls the prediction model corresponding to the target leakage scenario to predict the concentration of the leaking gas. This allows for the rapid determination of the leakage concentration of the leaking gas without the need for indiscriminate simulation for each leakage scenario, thereby effectively reducing the computational load and improving prediction efficiency.

[0066] In this embodiment, the target area can be predetermined, for example, the area of ​​device A can be predetermined as target area 1, the area of ​​device B as target area 2, etc. For each target area, a corresponding gas detector is used to monitor whether a gas leak has occurred. When a gas leak is detected in the target area, data such as the leak location, the ambient wind direction, the gas leak rate, and the ambient wind speed in the target area are acquired in real time. The leak location can be determined by the sensor's placement; the wind direction and speed in the target area can be obtained by wind direction and wind speed detectors installed in the target area; and the gas leak rate can be obtained by the gas flow rate or volume change at the leak point. The method of acquiring the leak data is existing technology and is not limited here. It is understood that different gas types will form different diffusion patterns in the air. For example, lighter gases diffuse upwards, while heavier gases diffuse towards the ground. Therefore, when determining the target leak scenario, the gas type can be distinguished as needed, so that the leak data can also include the gas type. However, since the different gas types usually have little impact on the leak concentration, this embodiment does not consider the influence of gas type on the leak concentration in order to further reduce the computational load.

[0067] The preset conditions include: the historical leak data table does not contain a gas concentration corresponding to the leak data. To reduce computation and improve prediction efficiency, this embodiment pre-constructs a historical leak data table, which includes at least the gas concentrations of leaked gases corresponding to different leak data. For example, the historical leak data table stores data including the leak location, ambient wind direction, gas leak rate, and ambient wind speed, as well as the leak concentration in the target area corresponding to the current leak location, ambient wind direction, gas leak rate, and ambient wind speed. Thus, if a gas leak is detected, the acquired leak data is first matched with the data in the historical leak data table. If the leak data does not meet the preset conditions, i.e., there is data in the historical leak data table that matches the acquired leak data, then the gas concentration in the historical leak data table that matches the leak data is directly used as the gas concentration of the leaked gas in the target area. It can be understood that the gas concentration of the leaked gas in the target area can be the gas concentration of the leaked gas in this area, or it can be the gas concentration of the leaked gas corresponding to different monitoring points in the target area. For example, if the real-time leak data is (leak point A, ambient wind direction A, gas leak rate A, and ambient wind speed A), and the historical leak data table contains the same leak data as the real-time data (i.e., the historical leak data table contains the leak data for (leak point A, ambient wind direction A, gas leak rate A, and ambient wind speed A), then the leak concentration corresponding to (leak point A, ambient wind direction A, gas leak rate A, and ambient wind speed A) in the historical leak data table is directly obtained as the leak concentration of the leaked gas in the target area. For example, the leak concentration data corresponding to (leak point A, ambient wind direction A, gas leak rate A, and ambient wind speed A) can be (gas concentration at monitoring point 1, gas concentration at monitoring point 2, ..., gas concentration at monitoring point n). The data in the historical leak data table can be data obtained in advance through simulation, or it can be the prediction results stored in the historical data table after each prediction of the leaked gas concentration. In this embodiment, after predicting the gas concentration of leaked gas in the target area using the gas leakage concentration prediction model, the method further includes storing the leakage data and the gas concentration of leaked gas in the target area as historical leakage data in a historical leakage data table. In this way, by continuously updating the data in the historical leakage data table based on the prediction of the leaked gas concentration, rapid prediction of the leaked gas concentration can be achieved in subsequent predictions, thereby saving significant computational resources and simulation time, and improving prediction efficiency.Understandably, in order to further simplify the calculation, the leakage data in this embodiment can be a range, such as the gas leakage rate and the ambient wind speed. That is, based on the influence of different leakage rates and wind speeds on the gas concentration, the leakage rate range and wind speed range that satisfy the gas concentration within a certain range are predetermined. As long as the gas leakage rate and ambient wind speed in the leakage data are within the range of leakage rate and ambient wind speed in the historical leakage data table, the leakage data is determined to match the leakage data in the historical leakage data table.

[0068] If the leakage data meets the preset conditions, that is, there is no data in the historical leakage data table that matches the obtained leakage data, then the gas leakage concentration prediction model corresponding to the ambient wind direction is called. The gas leakage point, gas leakage rate and ambient wind speed are used as inputs, and the gas leakage concentration prediction model predicts the gas concentration of the leaked gas in the target area.

[0069] Since the affected area and gas concentration in similar leakage scenarios are similar for each environmental wind direction, performing indiscriminate simulations of similar leakage scenarios has no substantial reference value for the impact of potential gas leaks and will also significantly increase the computational load. To solve this problem, this embodiment does not simulate all leakage scenarios, but determines the target leakage scenario corresponding to the current environmental wind direction based on the combination of different leakage points, different gas leakage rates and environmental wind speeds for each environmental wind direction, and only performs simulations on the target leakage scenario. For example, leak scenario A is (leak point A, gas leakage rate A, ambient wind speed A), leak scenario B is (leak point A, gas leakage rate A, ambient wind speed B), and leak scenario C is (leak point B, gas leakage rate B, ambient wind speed A). If the gas leakage concentration and affected area are not significantly different in the target area under leak scenarios A, B, and C, then leak scenarios A, B, and C are considered to belong to the same target leak scenario A. Therefore, for leak scenarios A, B, and C, only CFD simulation needs to be performed on target leak scenario A, and the machine learning algorithm can be trained using the simulation data to obtain the gas leakage concentration of the current target leak scenario. This high-precision prediction model allows for simulation of each target leak scenario under a defined wind direction when constructing a gas leak concentration prediction model. This significantly reduces the computational load and improves prediction efficiency. Target leak scenario A can be any one of leak scenarios A, B, or C, or it can be a modified version of any one of these scenarios. Existing machine learning algorithms, such as backpropagation (BP) or CNN (CNN) neural networks, can be used; no specific limitation is made here.

[0070] In this embodiment, before calling the gas leakage concentration prediction model corresponding to the ambient wind direction, the method further includes: determining all preset leakage points, ambient wind direction, gas leakage rate, and ambient wind speed in the target area; for each ambient wind direction, taking any combination of leakage point, gas leakage rate, and ambient wind speed as a leakage scenario corresponding to the current ambient wind direction, clustering all obtained leakage scenarios to determine the target leakage scenario corresponding to the current ambient wind direction; for each ambient wind direction, based on all target leakage scenarios corresponding to the current ambient wind direction, constructing a gas leakage concentration prediction model based on a machine learning algorithm, with leakage point, gas leakage rate, and ambient wind speed as input and gas concentration of leaked gas in the target area as output.

[0071] For example, the ambient wind direction set, leak point set, leak rate set and ambient wind direction set can be predetermined, wherein the ambient wind direction set includes ambient wind directions of various directions, the leak point set includes a plurality of possible leak points, the leak rate set includes a plurality of possible leak rates, and the ambient wind speed set includes a plurality of possible ambient wind speeds. It can be understood that the determination of ambient wind direction, leak point, leak rate and ambient wind speed can be predetermined according to historical data or historical experience of the target area. Wherein, the ambient wind direction is usually represented by 16 compass directions in a wind rose diagram, that is, the ambient wind direction set includes 16 wind direction elements, and the combination of all leak points and ambient wind directions can be expressed as: {L m,n}, (1≤m≤M, 1≤n≤16), wherein m represents the location where the gas leak occurs, that is, the leak point, and M is the number of all leak points; n represents the wind direction, n=1 means the wind direction is north wind, n=2 means the wind direction is north-northeast, and so on until n=16 means the wind direction is north-northwest. For example, a petroleum refining plant involves three types of hazardous gases, namely hydrogen sulfide, hydrogen and carbon monoxide, and there are 12 pieces of equipment where possible gas leaks may occur, then the combination of all leak points and ambient wind directions of the plant can be expressed as: {L m,n}, (1≤m≤12, 1≤n≤16).

[0072] A leak scenario can be expressed as a combination of leak point, gas leak rate and ambient wind speed under an ambient wind direction. In this embodiment, a leak scenario can be further expressed as a combination of gas leak rate and ambient wind speed under a combination of a leak point and an ambient wind direction {L m,n}, and the combination of gas leak rate and ambient wind speed can be expressed as: {S i,j}, (0<i≤I, 0≤j≤J), i represents the gas leak rate, and I is the maximum gas leak rate; j represents the wind speed magnitude, J is the maximum wind speed, and when j=0, it means the environment is in a windless state. Clustering leak scenarios can be expressed as clustering {S m,n} under the combination of leak point and ambient wind direction {L i,j} to obtain a representative gas leak scenario, that is, the target leak scenario, then the gas leak rate and ambient wind speed of the target leak scenario are expressed as p represents the representative gas leak rate after clustering, and q represents the representative wind speed magnitude after clustering. For example, according to the processing process characteristics of a refinery, the maximum leak rate of hydrogen sulfide is 1.5kg / min, the maximum leak rate of hydrogen is 0.5kg / min, and the maximum leak rate of carbon monoxide is 2kg / min; the historical maximum wind speed of the plant area is 9m / s. Then the combination of gas leak rate and wind speed magnitude for hydrogen sulfide is expressed as {S i,j}, where 0 < i ≤ 1.5, 0 ≤ j ≤ 9, i represents the gas leakage rate in kg / min, j represents the wind speed in m / s, and when j = 0, it indicates that the environment is windless; and through cluster analysis, the combination of all leakage points in the plant area and environmental wind direction {L m,n} has a total of 40 clustering scenarios, which are target leakage scenarios.

[0073] In this embodiment, the k-means algorithm is used to cluster all obtained leakage scenarios to obtain N target leakage scenarios. For example, the k-means algorithm is used to cluster all leakage scenarios to obtain 2 target leakage scenarios: N1 and N2, then the target leakage scenarios corresponding to the current environmental wind direction are N1 and N2. The k-means algorithm is a typical distance-based clustering algorithm, which belongs to the prior art, and will not be repeated here.

[0074] Wherein, for each environmental wind direction, based on all target leakage scenarios corresponding to the current environmental wind direction, a gas leakage concentration prediction model that takes leakage points, gas leakage rate and environmental wind speed as inputs and the gas concentration of leaked gas in the target area as output is constructed based on a machine learning algorithm, which includes:

[0075] Determine at least one monitoring point in the target area, and for each environmental wind direction: perform modeling simulation on all target leakage scenarios in the target area; calculate the gas concentration at each monitoring point in the target area under different target leakage scenarios, and take all obtained target leakage scenarios and their corresponding gas concentrations at each monitoring point as sample data; after training the machine learning algorithm based on the obtained sample data, the gas leakage concentration prediction model corresponding to the current environmental wind direction is obtained.

[0076] For each target leakage scenario, first divide the simulation calculation area, complete CFD modeling and meshing of the calculation area, set the position of monitoring points, complete CFD simulation of the target leakage scenario, execute CFD simulation for all target leakage scenarios, and obtain the concentration of monitoring points under each target leakage scenario as part of the gas leakage impact consequence basic database. The specific process is:

[0077] First, divide the simulation calculation area, wherein the simulation calculation area refers to the potentially affected area that is concerned after the gas leakage occurs; complete CFD modeling and meshing of the calculation area, wherein CFD modeling and meshing refer to model construction and meshing before computational fluid dynamics simulation of the simulation calculation area; set the positions of monitoring points. The setting of monitoring points refers to the set of positions for monitoring the gas concentration at these points within the calculation area. The monitoring points can be arranged on the same plane or on different planes, expressed as {M o}, (1≤o≤O), wherein o represents the position of a monitoring point, and O is the number of all monitoring points. For example, to ensure the accuracy of the prediction result, a total of 400 monitoring points are set, which is expressed as {M o}, (1≤o≤400).

[0078] For a target leakage scenario, complete the CFD simulation to obtain the concentration {M o,p,q}, (1≤o≤O, 0<p≤P, 0≤q≤Q), which indicates that gas leaks at a rate p, the wind speed is q, and the gas concentration detected by monitoring point o is {M o,p,q}.

[0079] Taking the concentration of monitoring points as simulation data for leakage consequences, the concentration of monitoring points can also be visualized as a gas concentration cloud map. The basic database consists of monitoring point concentrations obtained from simulation results, that is, gas leakage diffusion cloud maps.

[0080] For each combination of leakage point and ambient wind direction {L m,n}, with the gas leakage rate and ambient wind speed of the target leakage scenario as independent variables and the monitoring point concentration as the dependent variable, divide the simulation data into training data and verification data, establish a mapping relationship, construct a machine learning relationship model, conduct training and verification, and add training data until the relationship model is successfully trained. The specific steps include the following:

[0081] the gas leakage rate and ambient wind speed of the target leakage scenario are the monitoring point concentration is {M o,p,q}, divide the gas leakage rate and ambient wind speed data into training scenario data, and complete the mapping relationship model from the target leakage scenario to the concentration of each monitoring point through machine self-learning; untrained data is used as verification scenario data, which refers to that in the trained mapping relationship model, after inputting the gas leakage rate and wind speed of the verification scenario, the model-predicted monitoring point concentration is compared with the detection point concentration in the verification scenario data; successful model training means that the error between the two results is within 5%. To ensure successful training of the relational model, the amount of training data can be appropriately increased, the intensity of machine self-learning training can be improved, or machine self-learning training can be performed by means such as K-fold cross-validation, which is not limited herein.

[0082] Under all combinations of leakage points and ambient wind directions, repeat the above steps to obtain mapping relationship models for different target leakage scenarios, and the specific steps include the following:[|END]]

[0083] traversing all combinations of leakage points and ambient wind directions refers to traversing {L m,n}, (1≤m≤M, 1≤n≤16); under any leakage point and ambient wind direction, there is {S i,jAfter clustering, the target leakage scenario is obtained. against Repeat the above steps to train and obtain mapping relationship models for different target leakage scenarios.

[0084] Because the concentration differences detectable at monitoring points vary greatly depending on the location of the leak and the wind direction—for example, the same monitoring point might show a very high concentration in an easterly wind but no gas concentration in a westerly wind—and the location of the leak will also lead to the same situation, this embodiment categorizes and discusses the two variables of leak location and ambient wind direction when training the mapping relationship model to simplify the training process. That is, the model is trained separately for different leak locations and ambient wind directions. It can be understood that the specific steps for training the mapping relationship model by using the leak location, ambient wind direction, gas leakage rate, and ambient wind speed as independent variables and the monitoring point concentration as the dependent variable are the same as described above.

[0085] For any input leak scenario parameters, namely leak location, ambient wind direction, gas leak rate, and ambient wind speed, the prediction model provides a predicted concentration at the monitoring point. This prediction result is then used as part of an extended database of gas leak impact consequences. The specific steps include:

[0086] The main factors affecting the consequences of gas leaks include the leak location, wind direction, leak rate, and wind speed. These factors are also used as input parameters for model prediction. The output of the model is the concentration at each detection point under the set leak scenario, i.e., the gas leak diffusion cloud map.

[0087] When making a new prediction of the consequences of a leak, the system first compares the historical leak data tables in the database to see if there are consistent input parameters. If so, it directly displays the existing monitoring point concentrations and gas leak diffusion cloud maps in the database. If not, it uses a mapping model to make a prediction based on the different input parameters, displays the prediction results, and adds the input parameters and prediction results of this leak consequence prediction to the database.

[0088] Repeat the above steps until the gas leakage diffusion trend is simulated and predictions are completed for all target leakage scenarios. This is understandable, as... Figure 2 As shown, if the influence of different gas categories on the leakage concentration is considered, a target leakage scenario can be determined for each gas category. The above steps are repeated until the gas leakage diffusion trend is simulated and the prediction is completed for the target leakage scenarios of all gas categories. The process is not described in detail here.

[0089] The method in this embodiment can be encapsulated in software as functional modules to enable the system to provide predicted concentrations at each monitoring point after inputting parameters of a hypothetical gas leak accident. The software encapsulation includes a parameter input interface and a result prediction output interface. The parameter input interface includes at least parameters such as leak location, ambient wind direction, leak rate, and wind speed; the prediction output interface includes the concentration at each monitoring point and a gas leak diffusion cloud map. It is understood that, to consider the influence of different gas types on the leak concentration, the parameter input interface may also include the gas type.

[0090] like Figure 3 As shown, in a second aspect of the present invention, a gas leak prediction device is provided, comprising:

[0091] The data acquisition module is configured to acquire leakage data of leaked gas in the target area. The leakage data includes the location of the leak, the ambient wind direction, the gas leakage rate, and the ambient wind speed.

[0092] The concentration prediction module is configured to call the gas leakage concentration prediction model corresponding to the ambient wind direction when the leakage data meets the preset conditions. The model takes the leakage point, gas leakage rate and ambient wind speed as input and predicts the gas concentration of the leaked gas in the target area. The gas leakage concentration prediction model is obtained after training the machine learning algorithm with different leakage points, different gas leakage rates and different ambient wind speeds corresponding to the ambient wind direction.

[0093] Optionally, the device further includes:

[0094] The model building module is configured to determine all preset leak locations, ambient wind direction, gas leak rate, and ambient wind speed in the target area.

[0095] For each ambient wind direction, a combination of any leak point, any gas leak rate and any ambient wind speed is taken as a leak scenario corresponding to the current ambient wind direction. All the leak scenarios are clustered to determine the target leak scenario corresponding to the current ambient wind direction.

[0096] For each environmental wind direction, based on all target leakage scenarios corresponding to the current environmental wind direction, a gas leakage concentration prediction model is constructed using machine learning algorithms. This model takes the leakage point, gas leakage rate, and environmental wind speed as inputs and the gas concentration of the leaked gas in the target area as output.

[0097] Optionally, the model building module is configured as follows:

[0098] Identify at least one monitoring point in the target area, for each environmental wind direction:

[0099] Model and simulate all target leakage scenarios within the target area;

[0100] Calculate the gas concentration at each monitoring point in the target area under different target leakage scenarios, and use all the target leakage scenarios and their corresponding gas concentrations at each monitoring point as sample data;

[0101] The machine learning algorithm was trained based on the obtained sample data to obtain a gas leakage concentration prediction model corresponding to the current environmental wind direction.

[0102] Optionally, the concentration prediction module is also configured as follows:

[0103] After obtaining the leakage data of the leaked gas in the target area, obtain the historical leakage data table of the leaked gas and determine whether there is a gas concentration of the leaked gas corresponding to the leakage data in the historical leakage data table. The historical leakage data table should at least include the gas concentration of the leaked gas corresponding to different leakage data.

[0104] The preset conditions include:

[0105] The historical leak data table does not contain the gas concentration of the leaked gas corresponding to the leak data.

[0106] Optionally, the concentration prediction module is also configured as follows:

[0107] If the historical leak data table contains the gas concentration of the leaked gas corresponding to the leak data, the gas concentration of the leaked gas in the target area shall be used as the gas concentration of the leaked gas corresponding to the leak data in the historical leak data table.

[0108] Optionally, after the gas concentration of the leaked gas in the target area is predicted by the gas leak concentration prediction model, the concentration prediction module is further configured to:

[0109] The leakage data and the gas concentration of the leaked gas in the target area are stored as historical leakage data in the historical leakage data table.

[0110] In a third aspect of the present invention, a terminal device is provided, comprising:

[0111] At least one processor;

[0112] Memory, connected to at least one processor;

[0113] The memory stores instructions that can be executed by at least one processor, and the at least one processor implements the gas leak prediction method described above by executing the instructions stored in the memory.

[0114] In a fourth aspect of the invention, a computer-readable storage medium is provided storing computer instructions that, when executed on a computer, cause the computer to perform the gas leak prediction method described above.

[0115] like Figure 4 The diagram shown is a schematic representation of a terminal device provided in an embodiment of the present invention. Figure 4 As shown, the terminal device 10 of this embodiment includes a processor 100, a memory 101, and a computer program 102 stored in the memory 101 and executable on the processor 100. When the processor 100 executes the computer program 102, it implements the steps in the above method embodiments. Alternatively, when the processor 100 executes the computer program 102, it implements the functions of each module / unit in the above device embodiments.

[0116] For example, computer program 102 can be divided into one or more modules / units, one or more of which are stored in memory 101 and executed by processor 100 to complete the present invention. One or more modules / units can be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of computer program 102 in terminal device 10. For example, computer program 102 can be divided into a data acquisition module and a calculation module.

[0117] Terminal device 10 may be a computing device such as a desktop computer, laptop, handheld computer, or cloud server. Terminal device 10 may include, but is not limited to, a processor 100 and a memory 101. Those skilled in the art will understand that... Figure 4 This is merely an example of terminal device 10 and does not constitute a limitation on terminal device 10. It may include more or fewer components than shown, or combine certain components, or different components. For example, terminal device may also include input / output devices, network access devices, buses, etc.

[0118] The processor 100 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.

[0119] The memory 101 can be an internal storage unit of the terminal device 10, such as a hard disk or RAM of the terminal device 10. The memory 101 can also be an external storage device of the terminal device 10, such as a plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card equipped on the terminal device 10. Furthermore, the memory 101 can include both internal and external storage units of the terminal device 10. The memory 101 is used to store computer programs and other programs and data required by the terminal device 10. The memory 101 can also be used to temporarily store data that has been output or will be output.

[0120] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0121] In a fourth aspect of the invention, a computer-readable storage medium is provided, which stores computer instructions that, when executed on a computer, cause the computer to perform the method described above.

[0122] In summary, this invention, based on CFD simulation results of typical leakage scenarios, and taking into account the different leakage points and ambient wind directions, uses leakage rate and wind speed as independent variables and monitoring point concentration as dependent variables. Through machine learning training and validation of the mapping relationship model, it can predict the leakage concentration of any gas at each monitoring point based on the acquired leakage data. Furthermore, it constructs a historical leakage data table based on the gas leakage concentration, effectively enabling rapid prediction of the consequences of any leakage scenario, including the affected area and the gas concentration at various points within the affected area. The prediction results are fast and accurate, saving significant computational resources and simulation time, and effectively improving emergency response to gas leakage accidents. This invention solves the problems of current gas leakage consequence simulation processes, such as the difficulty in exhaustively simulating all leakage scenarios, the need for large amounts of computational resources, and the inability to quickly obtain the affected area and the gas concentration in the affected area for any gas leakage scenario.

[0123] The optional embodiments of the present invention have been described in detail above with reference to the accompanying drawings. However, the embodiments of the present invention are not limited to the specific details in the above embodiments. Within the scope of the technical concept of the embodiments of the present invention, various simple modifications can be made to the technical solutions of the embodiments of the present invention, and these simple modifications all fall within the protection scope of the embodiments of the present invention.

[0124] It should also be noted that the various specific technical features described in the above embodiments can be combined in any suitable manner without contradiction. To avoid unnecessary repetition, the embodiments of the present invention will not describe the various possible combinations separately.

[0125] Those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing related hardware. This program is stored in a storage medium and includes several instructions to cause a microcontroller, chip, or processor to execute all or part of the steps of the methods of the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, portable hard drive, read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0126] Furthermore, various different embodiments of the present invention can be combined in any way, as long as they do not violate the spirit of the embodiments of the present invention, and should also be regarded as the content disclosed by the embodiments of the present invention.

Claims

1. A method for predicting gas leaks, characterized in that, include: Acquire leakage data of leaked gas in the target area, including leakage location, ambient wind direction, gas leakage rate, and ambient wind speed; When the leakage data meets the preset conditions, the gas leakage concentration prediction model corresponding to the ambient wind direction is invoked. The gas leakage point, gas leakage rate and ambient wind speed are used as inputs. The gas leakage concentration prediction model predicts the gas concentration of the leaked gas in the target area. The gas leakage concentration prediction model is obtained after training the machine learning algorithm with different leakage points, different gas leakage rates and different ambient wind speeds corresponding to the ambient wind direction. Before invoking the gas leakage concentration prediction model corresponding to the ambient wind direction, the method further includes: Determine all preset leak locations, ambient wind direction, gas leak rate, and ambient wind speed within the target area; For each ambient wind direction, a combination of any leak point, any gas leak rate and any ambient wind speed is taken as a leak scenario corresponding to the current ambient wind direction. All the leak scenarios are clustered to determine the target leak scenario corresponding to the current ambient wind direction. Identify at least one monitoring point within the target area, for each environmental wind direction: Modeling and simulation of all target leakage scenarios within the target area; Calculate the gas concentration at each monitoring point in the target area under different target leakage scenarios, and use all the obtained target leakage scenarios and their corresponding gas concentrations at each monitoring point as sample data; Based on the obtained sample data, a machine learning algorithm is trained to obtain a gas leakage concentration prediction model corresponding to the current environmental wind direction.

2. The gas leak prediction method according to claim 1, characterized in that, After acquiring leakage data of the leaked gas in the target area, the method further includes: Obtain a historical leakage data table of the leaked gas and determine whether there is a gas concentration of the leaked gas corresponding to the leakage data in the historical leakage data table. The historical leakage data table includes at least the gas concentration of the leaked gas corresponding to different leakage data. The preset conditions include: The historical leakage data table does not contain the gas concentration of the leaked gas corresponding to the leakage data.

3. The gas leakage prediction method according to claim 2, characterized in that, The method further includes: If the historical leakage data table contains a gas concentration of the leaked gas corresponding to the leakage data, the gas concentration of the leaked gas in the target area corresponding to the leakage data in the historical leakage data table shall be used as the gas concentration of the leaked gas in the target area.

4. The gas leak prediction method according to claim 2, characterized in that, After predicting the gas concentration of leaked gas in the target area using the gas leak concentration prediction model, the method further includes: The leakage data and the gas concentration of the leaked gas in the target area are stored as historical leakage data in the historical leakage data table.

5. A gas leak prediction device, characterized in that, include: The data acquisition module is configured to acquire leakage data of leaked gas in the target area, including the leakage location, ambient wind direction, gas leakage rate, and ambient wind speed. The concentration prediction module is configured to, when the leakage data meets preset conditions, call the gas leakage concentration prediction model corresponding to the ambient wind direction, and use the leakage point, gas leakage rate and ambient wind speed as inputs to predict the gas concentration of the leaked gas in the target area. The gas leakage concentration prediction model is obtained after training the machine learning algorithm with different leakage points, different gas leakage rates and different ambient wind speeds corresponding to the ambient wind direction. The device further includes: The model building module is configured to determine all preset leak locations, ambient wind direction, gas leak rate, and ambient wind speed in the target area. For each ambient wind direction, a combination of any leak point, any gas leak rate and any ambient wind speed is taken as a leak scenario corresponding to the current ambient wind direction. All the leak scenarios are clustered to determine the target leak scenario corresponding to the current ambient wind direction. Identify at least one monitoring point within the target area, for each environmental wind direction: Modeling and simulation of all target leakage scenarios within the target area; Calculate the gas concentration at each monitoring point in the target area under different target leakage scenarios, and use all the obtained target leakage scenarios and their corresponding gas concentrations at each monitoring point as sample data; Based on the obtained sample data, a machine learning algorithm is trained to obtain a gas leakage concentration prediction model corresponding to the current environmental wind direction.

6. The gas leak prediction device according to claim 5, characterized in that, The concentration prediction module is also configured to: After obtaining leakage data of leaked gas in the target area, a historical leakage data table of leaked gas is obtained and it is determined whether there is a gas concentration of leaked gas corresponding to the leakage data in the historical leakage data table. The historical leakage data table includes at least the gas concentration of leaked gas corresponding to different leakage data. The preset conditions include: The historical leakage data table does not contain the gas concentration of the leaked gas corresponding to the leakage data.

7. The gas leak prediction device according to claim 6, characterized in that, The concentration prediction module is also configured to: If the historical leakage data table contains a gas concentration of the leaked gas corresponding to the leakage data, the gas concentration of the leaked gas in the target area corresponding to the leakage data in the historical leakage data table shall be used as the gas concentration of the leaked gas in the target area.

8. The gas leak prediction device according to claim 6, characterized in that, After the gas concentration prediction model predicts the gas concentration of the leaked gas in the target area, the concentration prediction module is further configured to: The leakage data and the gas concentration of the leaked gas in the target area are stored as historical leakage data in the historical leakage data table.

9. A terminal device, characterized in that, include: At least one processor; A memory connected to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the at least one processor implements the gas leak prediction method according to any one of claims 1 to 4 by executing the instructions stored in the memory.

10. A computer-readable storage medium storing computer instructions that, when executed on a computer, cause the computer to perform the gas leak prediction method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Leakage gas concentration distribution determination method, device and apparatus, and readable storage medium

    CN109190828A

  • Method and device for determining toxic heavy gas leakage concentration distribution in urban environment and medium

    CN111144055A