Gas leakage diffusion prediction method and system based on physical constraints and deep learning

By combining the generation of a three-dimensional spatial condition feature field representing physical constraints with a pre-trained prediction model, the problem of insufficient accuracy of gas diffusion prediction models in petrochemical parks is solved, realizing high-precision gas leakage diffusion prediction and dynamic display, supporting emergency response decision-making.

CN123159166APending Publication Date: 2026-11-24UNIV OF SCI & TECH BEIJING
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611117092.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-27
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

Existing gas diffusion prediction models are unable to take into account both local details and global correlations in the environment of petrochemical industrial parks, resulting in insufficient prediction accuracy and failing to meet the needs of real-time emergency decision-making.

Method used

By acquiring real-time environmental parameters of the target area, normalizing them, and then inputting them into a preset encoder, a three-dimensional spatial condition feature field representing physical constraints is generated. Combined with a pre-trained prediction model, local spatiotemporal features are extracted and global spatiotemporal dependencies are calculated. The predicted data of gas leakage diffusion concentration field is output and dynamically displayed through a three-dimensional particle rendering system.

Benefits of technology

It achieves high-precision prediction of gas leak diffusion, provides accurate data support, offers a reliable basis for emergency response decision-making, and meets the requirements of real-time performance and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123159166A_ABST
    Figure CN123159166A_ABST
Patent Text Reader

Abstract

The embodiment of the application discloses a gas leakage diffusion prediction method and system based on physical constraints and deep learning, an electronic device and a storage medium, relates to the technical field of gas monitoring, and is convenient for improving the prediction accuracy of gas leakage diffusion. The method comprises the following steps: acquiring real-time environmental parameters of a target area, and performing normalization processing on the environmental parameters; the environmental parameters at least comprise a wind speed, a wind direction, a three-dimensional space position of a gas leakage source and a leakage rate; inputting the normalized environmental parameters into a preset encoder to generate a three-dimensional space condition feature field representing physical constraints; inputting the three-dimensional space condition feature field into a pre-trained prediction model to extract local space-time features and calculate global space-time dependency; and outputting gas leakage diffusion concentration field prediction data according to the local space-time features and the global space-time dependency. The application is suitable for a gas leakage diffusion prediction scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of gas monitoring technology, and in particular to a gas leakage and diffusion prediction method, system, electronic device and storage medium based on physical constraints and deep learning. Background Technology

[0002] In the petroleum and chemical safety field, accidents such as toxic gas leaks, fires, and explosions occur frequently. Due to the numerous major hazard sources and complex building layouts at accident sites, the consequences of these accidents are severe and widespread. Therefore, accurate and rapid prediction of toxic gas leaks and their diffusion trends within petrochemical industrial parks is crucial for timely response and mitigation of accident risks. Computational Fluid Dynamics (CFD) simulation methods, widely used both domestically and internationally, can achieve high-precision three-dimensional numerical simulations of gas diffusion processes. However, CFD methods suffer from high computational complexity and resource consumption, with a single simulation often taking over an hour, making it difficult to meet the urgent needs for real-time early warning and rapid simulation in accident emergency response.

[0003] In recent years, various simplified models and deep learning models have been applied to the spatiotemporal prediction of gas diffusion to improve computational efficiency. However, gas diffusion involves both local details and global correlations in space, and short-term fluctuations and long-term trends in time. Single-structure models are unable to take all of these into account and have limited ability to capture the complex spatial relationships in the gas diffusion process. This results in significant deviations in the prediction of gas diffusion models in petrochemical park environments, making it difficult to meet the accuracy requirements of real-time emergency decision-making. Summary of the Invention

[0004] In view of this, embodiments of this application provide a gas leakage diffusion prediction method, system, electronic device, and storage medium based on physical constraints and deep learning, which facilitates the improvement of the prediction accuracy of gas leakage diffusion.

[0005] In a first aspect, embodiments of this application provide a gas leakage diffusion prediction method based on physical constraints and deep learning, comprising: acquiring real-time environmental parameters of a target area and normalizing the environmental parameters; wherein the environmental parameters include at least wind speed, wind direction, the three-dimensional spatial location of the gas leakage source, and leakage rate; inputting the normalized environmental parameters into a preset encoder to generate a three-dimensional spatial condition feature field characterizing physical constraints; inputting the three-dimensional spatial condition feature field into a pre-trained prediction model to extract local spatiotemporal features and calculate global spatiotemporal dependencies; and outputting gas leakage diffusion concentration field prediction data based on the local spatiotemporal features and global spatiotemporal dependencies.

[0006] According to a specific implementation of an embodiment of this application, the step of inputting normalized environmental parameters into a preset encoder to generate a three-dimensional spatial condition feature field representing physical constraints includes: the preset encoder mapping the normalized environmental parameters to a latent space and outputting probability distribution parameters corresponding to the environmental parameters in the latent space; sampling the probability distribution parameters to obtain latent variables; generating an initial feature field based on the latent variables using a preset decoder; and generating dynamic attention weights related to the spatial location using a radial basis function according to the relative relationship between the three-dimensional spatial location and the gas leak source, wherein relatively higher attention weights are allocated to the gas leak source and the key diffusion area downwind; and weighting and fusing the initial feature field with the dynamic attention weights to generate a three-dimensional spatial condition feature field representing physical constraints.

[0007] According to a specific implementation of an embodiment of this application, the step of inputting the three-dimensional spatial conditional feature field into a pre-trained prediction model to extract local spatiotemporal features and calculate global spatiotemporal dependencies includes: performing local convolution operations on the three-dimensional spatial conditional feature field in the spatial and temporal dimensions through a local feature extraction module to obtain multi-scale local spatiotemporal features during the gas leakage and diffusion process; receiving the local spatiotemporal features, and calculating the long-range interactions between various locations in the three-dimensional space and the global evolution relationship in the time series based on a global feature calculation module using a self-attention mechanism to calculate global spatiotemporal dependencies.

[0008] According to a specific implementation of an embodiment of this application, the step of outputting gas leakage diffusion concentration field prediction data based on the local spatiotemporal features and the global spatiotemporal dependency includes: fusing the local spatiotemporal diffusion features and the global spatiotemporal dependency to form preliminary gas leakage diffusion concentration field prediction data; verifying and fine-tuning the preliminary gas leakage diffusion concentration field prediction data through a physical constraint module, and finally outputting the gas leakage diffusion concentration field prediction data.

[0009] According to a specific implementation of this application, after outputting the gas leakage diffusion concentration field prediction data based on the local spatiotemporal characteristics and global spatiotemporal dependencies, the method includes: importing the gas leakage diffusion concentration field prediction data file into a three-dimensional particle rendering system, converting the gas concentration data into a particle density field, and dynamically rendering and interactively displaying the gas leakage diffusion trend and impact range in a three-dimensional scene; and making emergency response decisions based on the gas leakage diffusion trend and impact range.

[0010] According to a specific implementation of an embodiment of this application, the step of importing the gas leakage diffusion concentration field prediction data file into a three-dimensional particle rendering system, converting the gas concentration data into a particle density field, and dynamically rendering and interactively displaying the gas leakage diffusion trend and impact range in a three-dimensional scene includes: reading the three-dimensional coordinates, time, and concentration data from the gas leakage diffusion concentration field prediction data file through the three-dimensional particle rendering system; adjusting the density and color attributes of particles in the three-dimensional space according to the concentration data to generate a dynamic particle cloud map of gas diffusion; and controlling the viewpoint rotation, scaling, and timeline dragging of the dynamic particle cloud map through a user interface.

[0011] Secondly, embodiments of this application also provide a gas leakage diffusion prediction system based on physical constraints and deep learning, comprising: a processing unit for acquiring real-time environmental parameters of a target area and normalizing the environmental parameters; wherein the environmental parameters include at least wind speed, wind direction, the three-dimensional spatial location of the gas leakage source, and leakage rate; a generation unit for inputting the normalized environmental parameters into a preset encoder to generate a three-dimensional spatial condition feature field characterizing physical constraints; an extraction unit for inputting the three-dimensional spatial condition feature field into a pre-trained prediction model to extract local spatiotemporal features and calculate global spatiotemporal dependencies; and an output unit for outputting gas leakage diffusion concentration field prediction data based on the local spatiotemporal features and global spatiotemporal dependencies.

[0012] According to a specific implementation of an embodiment of this application, the system further includes: the generation unit comprising: a first output module, used to map the normalized environmental parameters to a latent space by the preset encoder, and output the probability distribution parameters of the environmental parameters in the latent space; a latent variable module, used to sample the probability distribution parameters to obtain latent variables; a generation module, used to generate an initial feature field based on the latent variables through a preset decoder; and, based on the relative relationship between the three-dimensional spatial location and the gas leak source, to generate dynamic attention weights related to the spatial location through a radial basis function, wherein relatively higher attention weights are allocated to the gas leak source and the key diffusion area downwind; and a first fusion module, used to perform weighted fusion of the initial feature field and the dynamic attention weights to generate a three-dimensional spatial condition feature field characterizing physical constraints.

[0013] According to a specific implementation of an embodiment of this application, the extraction unit includes: a local feature extraction module, used to perform local convolution operations on the three-dimensional spatial conditional feature field in the spatial and temporal dimensions to obtain multi-scale local spatiotemporal features in the gas leakage and diffusion process; and a global feature calculation module, used to receive the local spatiotemporal features and calculate the long-range interaction between each location in the three-dimensional space and the global evolution relationship in the time series based on the self-attention mechanism, so as to calculate the global spatiotemporal dependency.

[0014] According to a specific implementation of an embodiment of this application, the output unit includes: a second fusion module, used to fuse the local spatiotemporal diffusion features and the global spatiotemporal dependency to form preliminary gas leakage diffusion concentration field prediction data; and a second output module, used to verify and fine-tune the preliminary gas leakage diffusion concentration field prediction data through a physical constraint module, and finally output the gas leakage diffusion concentration field prediction data.

[0015] According to a specific implementation of an embodiment of this application, the prediction system further includes: an import module, used to import the gas leakage diffusion concentration field prediction data file into a three-dimensional particle rendering system, converting the gas concentration data into a particle density field, and dynamically rendering and interactively displaying the gas leakage diffusion trend and impact range in a three-dimensional scene; and an emergency response decision module, used to make emergency response decisions based on the gas leakage diffusion trend and impact range.

[0016] According to a specific implementation of an embodiment of this application, the import module includes: a reading submodule, used to read the three-dimensional coordinates, time, and concentration data from the gas leakage diffusion concentration field prediction data file through the three-dimensional particle rendering system; a generation submodule, used to adjust the density and color attributes of particles in the three-dimensional space according to the concentration data to generate a dynamic particle cloud map of gas diffusion; and a user interaction submodule, used to control the dynamic particle cloud map by rotating the viewpoint, scaling, and dragging the time axis through a user interaction interface.

[0017] Thirdly, embodiments of this application also provide an electronic device, the electronic device comprising: a housing, a processor, a memory, a circuit board, and a power supply circuit, wherein the circuit board is disposed within the space enclosed by the housing, and the processor and memory are disposed on the circuit board; the power supply circuit is used to supply power to various circuits or devices of the above-mentioned electronic device; the memory is used to store executable program code; the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, for executing the gas leakage diffusion prediction method based on physical constraints and deep learning provided in any embodiment of this application.

[0018] Fourthly, embodiments of this application also provide a computer-readable storage medium storing one or more programs that can be executed by one or more processors to implement the gas leakage diffusion prediction method based on physical constraints and deep learning provided in any embodiment of this application.

[0019] The embodiments of this application provide a gas leakage diffusion prediction method, system, electronic device, and storage medium based on physical constraints and deep learning. By acquiring real-time environmental parameters of the target area and normalizing these parameters, the method achieves the following: The environmental parameters include at least wind speed, wind direction, the three-dimensional spatial location of the gas leakage source, and the leakage rate. Standardizing these key parameters not only eliminates the interference of different dimensions on the model but also lays a data foundation for maintaining prediction accuracy and robustness in complex and variable real-world environments. By inputting the normalized parameters into a preset encoder, a three-dimensional spatial condition feature field representing physical constraints is generated. This achieves a deep integration of physical knowledge and a data-driven model, no longer treating environmental parameters as isolated values ​​but mapping them into a three-dimensional feature field containing fluid dynamics laws through the encoder. This provides structured and physically-compliant strong constraints for subsequent predictions. By inputting the three-dimensional conditional feature field into a pre-trained prediction model, local spatiotemporal features are extracted and global spatiotemporal dependencies are calculated. This allows the model to simultaneously capture complex local details such as flow around the leak source and concentration gradients, as well as the overall diffusion path and long-term evolution trend influenced by building layout and wind direction. This enables the simulation of complex spatiotemporal phenomena of gas diffusion, improving the prediction accuracy of gas leak diffusion. Based on the local spatiotemporal features and global spatiotemporal dependencies, the model outputs predicted gas leak diffusion concentration field data. Instead of simply providing trend judgments, it outputs a complete data field containing concentration values ​​at various points in three-dimensional space, providing accurate and reliable data support for subsequent emergency decisions such as risk assessment and evacuation zone delineation. Attached Figure Description

[0020] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 A flowchart of a gas leakage diffusion prediction method based on physical constraints and deep learning provided for embodiments of this application; Figure 2A schematic diagram of a gas leakage and diffusion prediction system based on physical constraints and deep learning provided for embodiments of this application; Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0022] The embodiments of this application will now be described in detail with reference to the accompanying drawings.

[0023] It should be understood that the described embodiments are merely some, not all, of the embodiments in this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.

[0024] To enable those skilled in the art to better understand the technical concept, implementation scheme and beneficial effects of the embodiments of this application, detailed descriptions are provided below through specific embodiments.

[0025] In a first aspect, embodiments of this application provide a gas leakage diffusion prediction method based on physical constraints and deep learning, which facilitates the improvement of the prediction accuracy of gas leakage diffusion.

[0026] like Figure 1 As shown, embodiments of this application provide a gas leakage diffusion prediction method based on physical constraints and deep learning, including: S11. Obtain real-time environmental parameters of the target area and normalize the environmental parameters; wherein, the environmental parameters include at least wind speed, wind direction, three-dimensional spatial location of the gas leak source, and leak rate; To achieve rapid and accurate prediction of gas leak diffusion, a high-precision CFD simulation dataset is first constructed to generate a database covering multiple scenarios before prediction. Specifically, an accurate 3D digital model is established based on the actual geographical information and building layout of the target petrochemical park to realistically reflect key influencing factors such as terrain undulations and building obstruction. Then, the 3D digital model is imported into CFD software, and a large number of numerical simulations are conducted by setting different combinations of environmental parameters such as wind speed, wind direction, 3D spatial location of the gas leak source, and leakage rate. The data output shows the entire process of gas concentration evolution over time in 3D space. Finally, the results are processed, extracted, and formatted into structured data files containing "coordinate-time-concentration" information, which are used as training labels for the deep learning model.

[0027] Then, in the model application phase, it is first necessary to obtain real-time environmental parameters of the target area as model input. In some examples, environmental parameters include at least wind speed, wind direction, the three-dimensional spatial location of the gas leakage source, and the leakage rate. Before inputting environmental parameter data into the model, to ensure the stability and convergence efficiency of the training process, the acquired multi-source heterogeneous environmental parameters need to be normalized. Specifically, based on the "coordinate-time-concentration" structured dataset generated by CFD simulation, global statistics of each environmental parameter are calculated. These global statistics are then used to normalize the real-time acquired multi-source heterogeneous environmental parameters to eliminate data bias caused by differences in dimensions and numerical ranges between different parameters, uniformly scaling them to the same scale range. This provides a high-quality, standardized input foundation for subsequent feature encoding and deep learning models.

[0028] S12. Input the normalized environmental parameters into the preset encoder to generate a three-dimensional spatial condition feature field that characterizes the physical constraints. After normalizing the environmental parameters, these parameters need to be transformed into spatial features that the model can understand and that conform to physical laws. In some cases, the normalized environmental parameters can be input into a pre-defined Conditional Variational Autoencoder (CVAE) to encode the discrete environmental parameters into a continuous three-dimensional spatial feature field containing rich physical information. Furthermore, to further enhance the model's focus on key regions, radial basis functions (RBFs) can be introduced to generate dynamic attention weights.

[0029] In this way, a probabilistic mapping from environmental conditions to fluid diffusion patterns can be constructed, thereby generating a three-dimensional conditional feature field that has both physical meaning and spatiotemporal structure, providing enhanced and structured conditional constraints for subsequent deep learning models.

[0030] S13. Input the three-dimensional spatial condition feature field into the pre-trained prediction model to extract local spatiotemporal features and calculate global spatiotemporal dependencies; After obtaining the physically meaningful three-dimensional spatial condition feature field, a deep neural network is needed to learn the complex spatiotemporal patterns of gas diffusion. In some examples, a temporal dimension can be added to the convolutional kernels of a four-dimensional convolutional neural network (4DCNN) on top of the three-dimensional spatial dimension, effectively extracting local spatiotemporal features near the leakage source, such as high concentration gradients. Then, the local spatiotemporal feature sequence is reconstructed into a series of spatiotemporal tokens and input into a Transformer encoder. Through a self-attention mechanism, the global spatiotemporal dependencies of the entire three-dimensional space at all time steps are calculated, accurately capturing large-scale, long-distance interactions such as flow around buildings and long-distance transport. Finally, through a combination of local and global analysis, a high-fidelity model of the entire gas diffusion process is achieved.

[0031] S14. Based on the local spatiotemporal characteristics and global spatiotemporal dependence, output the gas leakage diffusion concentration field prediction data.

[0032] After successfully extracting local spatiotemporal features and calculating global spatiotemporal dependencies, the model enters the final information fusion and output stage. For example, a bidirectional cross-modal attention mechanism can be used to dynamically fuse local details from 4DCNN and global spatiotemporal dependencies from Transformer, forming a unified and comprehensive diffusion field representation. Then, through upsampling and skip connections, the precise localization information of the shallow network and the macroscopic semantic information of the deep network are integrated and reconstructed, gradually mapping the fused high-level features back to three-dimensional physical space. Finally, a lightweight physical constraint module is used for correction to ensure that the prediction results conform to basic physical laws such as mass conservation, outputting the final high-precision, physically reliable gas leakage diffusion concentration field prediction data, which fully describes the distribution and evolution of concentration in three-dimensional space over time.

[0033] The gas leakage diffusion prediction method based on physical constraints and deep learning provided in this application obtains real-time environmental parameters of the target area and normalizes these parameters. These environmental parameters include at least wind speed, wind direction, the three-dimensional spatial location of the gas leakage source, and the leakage rate. By standardizing key parameters such as wind speed, wind direction, leakage source location, and leakage rate, not only is the interference of different dimensions on the model eliminated, but a data foundation is also laid for the model to maintain prediction accuracy and robustness in complex and variable real-world environments. By inputting the normalized parameters into a preset encoder, a three-dimensional spatial condition feature field representing physical constraints is generated. This achieves a deep integration of physical knowledge and a data-driven model, no longer treating environmental parameters as isolated values, but mapping them through the encoder into a three-dimensional feature field containing fluid dynamics laws, providing structured and physically prior-compliant strong constraints for subsequent predictions. By inputting the three-dimensional conditional feature field into a pre-trained prediction model, local spatiotemporal features are extracted and global spatiotemporal dependencies are calculated. This allows the model to simultaneously capture complex local details such as flow around the leak source and concentration gradients, as well as the overall diffusion path and long-term evolution trend influenced by building layout and wind direction. This enables the simulation of complex spatiotemporal phenomena of gas diffusion, improving the prediction accuracy of gas leak diffusion. Based on the local spatiotemporal features and global spatiotemporal dependencies, the model outputs predicted gas leak diffusion concentration field data. Instead of simply providing trend judgments, it outputs a complete data field containing concentration values ​​at various points in three-dimensional space, providing accurate and reliable data support for subsequent emergency decisions such as risk assessment and evacuation zone delineation.

[0034] In some embodiments, the step of inputting normalized environmental parameters into a preset encoder to generate a three-dimensional spatial condition feature field representing physical constraints includes: the preset encoder mapping the normalized environmental parameters to a latent space and outputting probability distribution parameters corresponding to the environmental parameters in the latent space; sampling the probability distribution parameters to obtain latent variables; generating an initial feature field based on the latent variables using a preset decoder; and generating dynamic attention weights related to spatial location using radial basis functions according to the relative relationship between the three-dimensional spatial location and the gas leak source, wherein relatively higher attention weights are allocated to the gas leak source and key diffusion areas downwind; and weighting and fusing the initial feature field with the dynamic attention weights to generate a three-dimensional spatial condition feature field representing physical constraints.

[0035] After normalizing the environmental parameters, they need to be encoded into a three-dimensional spatial conditional feature field that contains physical laws and drives diffusion prediction. Specifically, the preset encoder first maps the normalized environmental parameters to the latent space and outputs their probability distribution parameters in the latent space. Then, the probability distribution parameters are sampled to obtain latent variables with randomness to enhance the model's generalization ability to different scenarios. Next, based on these latent variables, an initial feature field covering the entire three-dimensional computational domain is reconstructed by the preset CVAE decoder.

[0036] To focus on key physical processes, a dynamic attention mechanism strongly correlated with spatial location can be constructed simultaneously. In some cases, based on the relative relationship between each point in three-dimensional space and the gas leak source, corresponding dynamic attention weights are generated using radial basis functions. This allows for the precise allocation of relatively high weights to the leak source itself and its downwind regions, which are crucial to the diffusion trend. Finally, by weighted fusion of the initial feature field generated by CVAE decoding and the dynamic attention weights, a three-dimensional spatial conditional feature field is generated that both conforms to fluid dynamics priors and highlights the physical constraints of key regions, providing a reinforced structured input for subsequent spatiotemporal predictions.

[0037] In some embodiments, the step of inputting the three-dimensional spatial conditional feature field into a pre-trained prediction model to extract local spatiotemporal features and calculate global spatiotemporal dependencies includes: performing local convolution operations on the three-dimensional spatial conditional feature field in the spatial and temporal dimensions through a local feature extraction module to obtain multi-scale local spatiotemporal features during the gas leakage and diffusion process; receiving the local spatiotemporal features and calculating the long-range interactions between locations in the three-dimensional space and the global evolution relationship in the time series based on a self-attention mechanism through a global feature calculation module to calculate global spatiotemporal dependencies.

[0038] After obtaining the three-dimensional spatial conditional feature field containing physical constraints, a pre-trained prediction model is needed to analyze the complex dynamics of gas diffusion. In some cases, this can be accomplished by a well-defined hybrid architecture, 4DCNN-Transformer, which mainly includes a local feature extraction module and a global feature computation module. Specifically, firstly, the local feature extraction module performs local convolution operations on the input three-dimensional spatial conditional feature field in both spatial and temporal dimensions. By sliding the four-dimensional convolution kernel of the four-dimensional convolutional neural network across neighboring spatiotemporal grid points, it captures local spatiotemporal features at various scales, from near-field high-concentration accumulation to short-range transport, thereby finely characterizing the dynamic details of the initial stage of leakage. Subsequently, the extracted local feature sequence is converted into a token sequence and input into the global feature computation module. Based on a self-attention mechanism, the global feature computation module calculates the correlation weights between any two locations in three-dimensional space at all time steps to model long-range interactions caused by factors such as building shading and wind direction dominance, while simultaneously analyzing the global evolution of concentration over the entire time series. Ultimately, through this layer-by-layer analysis from local to global and from details to trends, a high-fidelity model of the entire gas diffusion process was achieved.

[0039] In some embodiments, the step of outputting gas leakage diffusion concentration field prediction data based on the local spatiotemporal features and the global spatiotemporal dependency includes: fusing the local spatiotemporal diffusion features and the global spatiotemporal dependency to form preliminary gas leakage diffusion concentration field prediction data; verifying and fine-tuning the preliminary gas leakage diffusion concentration field prediction data through a physical constraint module, and finally outputting the gas leakage diffusion concentration field prediction data.

[0040] After successfully extracting local spatiotemporal features and calculating global spatiotemporal dependencies, the final information fusion and physical correction stage is entered to generate high-fidelity concentration field prediction data. First, through a bidirectional cross-modal attention mechanism, the detailed local spatiotemporal diffusion features are deeply fused with the global spatiotemporal dependencies reflecting the macroscopic structure to form a preliminary gas leakage diffusion concentration field prediction data.

[0041] Subsequently, to ensure that the prediction results strictly conform to the laws of fluid mechanics, the preliminary gas leakage diffusion concentration field prediction data is sent to a physical constraint module for verification and fine-tuning. The physical constraint module is embedded with differentiable physical operators such as the law of conservation of mass. By calculating the deviation between the prediction results and physical laws, it automatically and lightly corrects the values ​​that deviate significantly. Finally, it outputs gas leakage diffusion concentration field prediction data that has both high accuracy driven by data and strictly follows physical principles, providing a reliable basis for emergency decision-making.

[0042] In some embodiments, after outputting the gas leakage diffusion concentration field prediction data based on the local spatiotemporal characteristics and global spatiotemporal dependencies, the method includes: importing the gas leakage diffusion concentration field prediction data file into a three-dimensional particle rendering system, converting the gas concentration data into a particle density field, and dynamically rendering and interactively displaying the gas leakage diffusion trend and impact range in a three-dimensional scene; and making emergency response decisions based on the gas leakage diffusion trend and impact range.

[0043] After the model generates the final predicted concentration field data for gas leakage diffusion, the data conclusions can be transformed into intuitive visualizations. Specifically, the predicted data file is first imported into a dedicated 3D particle rendering system. In this system, the gas concentration data is converted into a particle density field, which visually represents the concentration levels in different areas by controlling the density distribution of a large number of virtual particles. Subsequently, the system dynamically renders and interactively displays this particle field within the constructed 3D scene of the petrochemical park, allowing for real-time observation of the gas leakage diffusion trend and the dynamic range of its impact from all angles.

[0044] This panoramic and dynamic visual presentation makes the risk situation clear at a glance, thus providing commanders with direct, accurate and efficient scientific basis for emergency response decisions.

[0045] In some embodiments, importing the gas leakage diffusion concentration field prediction data file into a 3D particle rendering system to convert the gas concentration data into a particle density field, and dynamically rendering and interactively displaying the gas leakage diffusion trend and impact range in a 3D scene, includes: reading the 3D coordinates, time, and concentration data from the gas leakage diffusion concentration field prediction data file through the 3D particle rendering system; adjusting the density and color attributes of particles in the 3D space according to the concentration data to generate a dynamic particle cloud map of gas diffusion; and controlling the viewpoint rotation, scaling, and timeline dragging of the dynamic particle cloud map through a user interface.

[0046] Specifically, when importing the gas leak diffusion concentration field prediction data file into a dedicated 3D particle rendering system, the system first accurately reads key information from the data file, such as 3D coordinates (X, Y, Z), time (T), and concentration (C). Then, the rendering engine dynamically adjusts the density and color attributes of the virtual particles in the corresponding areas based on the concentration values ​​at each spatial point. In some examples, high-concentration areas are rendered with high density and striking colors, such as red, while low-concentration areas are rendered with low density and cool tones, such as blue, thus generating a dynamic particle cloud map of gas diffusion that accurately reflects the concentration distribution. Finally, the system provides interactive functions, including viewpoint rotation, scene zooming, and timeline dragging control, through a user-friendly interface, enabling decision-makers to observe the diffusion process panoramically from any angle and at any time sequence, accurately grasping the leakage trend and its impact range.

[0047] Secondly, embodiments of this application provide a gas leakage diffusion prediction system based on physical constraints and deep learning, which facilitates the improvement of the prediction accuracy of gas leakage diffusion.

[0048] like Figure 2 As shown, embodiments of this application also provide a gas leakage diffusion prediction system based on physical constraints and deep learning, including a processing unit 31, a generation unit 32, an extraction unit 33, and an output unit 34.

[0049] The processing unit 31 is used to acquire real-time environmental parameters of the target area and normalize the environmental parameters; wherein the environmental parameters include at least wind speed, wind direction, three-dimensional spatial location of the gas leak source, and leak rate. The generation unit 32 is used to input the normalized environmental parameters into the preset encoder to generate a three-dimensional spatial condition feature field that characterizes physical constraints. Extraction unit 33 is used to input the three-dimensional spatial condition feature field into the pre-trained prediction model to extract local spatiotemporal features and calculate global spatiotemporal dependencies; Output unit 34 is used to output gas leakage diffusion concentration field prediction data based on the local spatiotemporal characteristics and global spatiotemporal dependence.

[0050] The gas leakage and diffusion prediction system based on physical constraints and deep learning provided in this application acquires real-time environmental parameters of the target area and normalizes these parameters. These environmental parameters include at least wind speed, wind direction, the three-dimensional spatial location of the gas leakage source, and the leakage rate. By standardizing key parameters such as wind speed, wind direction, leakage source location, and leakage rate, not only is the interference of different dimensions on the model eliminated, but a data foundation is also laid for the model to maintain prediction accuracy and robustness in complex and variable real-world environments. By inputting the normalized parameters into a preset encoder, a three-dimensional spatial condition feature field representing physical constraints is generated. This achieves a deep integration of physical knowledge and a data-driven model, no longer treating environmental parameters as isolated values, but mapping them through the encoder into a three-dimensional feature field containing fluid dynamics laws, providing structured and physically prior-compliant strong constraints for subsequent predictions. By inputting the three-dimensional conditional feature field into a pre-trained prediction model, local spatiotemporal features are extracted and global spatiotemporal dependencies are calculated. This allows the model to simultaneously capture complex local details such as flow around the leak source and concentration gradients, as well as the overall diffusion path and long-term evolution trend influenced by building layout and wind direction. This enables the simulation of complex spatiotemporal phenomena of gas diffusion, improving the prediction accuracy of gas leak diffusion. Based on the local spatiotemporal features and global spatiotemporal dependencies, the model outputs predicted gas leak diffusion concentration field data. Instead of simply providing trend judgments, it outputs a complete data field containing concentration values ​​at various points in three-dimensional space, providing accurate and reliable data support for subsequent emergency decisions such as risk assessment and evacuation zone delineation.

[0051] In some embodiments, the generation unit includes: a first output module, used to map the normalized environmental parameters to a latent space using the preset encoder, and output the probability distribution parameters corresponding to the environmental parameters in the latent space; a latent variable module, used to sample the probability distribution parameters to obtain latent variables; a generation module, used to generate an initial feature field based on the latent variables using a preset decoder; and to generate dynamic attention weights related to the spatial location using a radial basis function according to the relative relationship between the three-dimensional spatial location and the gas leak source, wherein relatively high attention weights are allocated to the gas leak source and the key diffusion area downwind; and a first fusion module, used to perform weighted fusion of the initial feature field and the dynamic attention weights to generate a three-dimensional spatial condition feature field characterizing physical constraints.

[0052] In some embodiments, the extraction unit includes: a local feature extraction module, used to perform local convolution operations on the three-dimensional spatial conditional feature field in the spatial and temporal dimensions to obtain multi-scale local spatiotemporal features in the gas leakage and diffusion process; and a global feature calculation module, used to receive the local spatiotemporal features and calculate the long-range interaction between each location in the three-dimensional space and the global evolution relationship in the time series based on the self-attention mechanism to calculate the global spatiotemporal dependency.

[0053] In some embodiments, the output unit includes: a second fusion module, used to fuse the local spatiotemporal diffusion features and the global spatiotemporal dependency to form preliminary gas leakage diffusion concentration field prediction data; and a second output module, used to verify and fine-tune the preliminary gas leakage diffusion concentration field prediction data through a physical constraint module, and finally output the gas leakage diffusion concentration field prediction data.

[0054] In some embodiments, the prediction system further includes: an import module, used to import the gas leak diffusion concentration field prediction data file into a three-dimensional particle rendering system, converting the gas concentration data into a particle density field, and dynamically rendering and interactively displaying the gas leak diffusion trend and impact range in a three-dimensional scene; and an emergency response decision module, used to make emergency response decisions based on the gas leak diffusion trend and impact range.

[0055] In some embodiments, the import module includes: a reading submodule, used to read the three-dimensional coordinates, time, and concentration data from the gas leakage diffusion concentration field prediction data file through the three-dimensional particle rendering system; a generation submodule, used to adjust the density and color attributes of particles in three-dimensional space according to the concentration data to generate a dynamic particle cloud map of gas diffusion; and a user interaction submodule, used to control the dynamic particle cloud map by rotating the viewpoint, scaling, and dragging the time axis through a user interaction interface.

[0056] Thirdly, embodiments of this application also provide an electronic device that facilitates improved prediction accuracy of gas leak diffusion.

[0057] like Figure 3 As shown, the electronic device provided in the embodiments of this application may include: a housing 51, a processor 52, a memory 53, a circuit board 54, and a power supply circuit 55, wherein the circuit board 54 is disposed inside the space enclosed by the housing 51, and the processor 52 and the memory 53 are disposed on the circuit board 54; the power supply circuit 55 is used to supply power to various circuits or devices of the above-mentioned electronic device; the memory 53 is used to store executable program code; the processor 52 runs the program corresponding to the executable program code by reading the executable program code stored in the memory 53, and is used to execute the gas leakage diffusion prediction method based on physical constraints and deep learning provided in any of the foregoing embodiments.

[0058] For details on the specific execution process of the above steps by the processor 52 and the steps further executed by the processor 52 by running executable program code, please refer to the description of the foregoing embodiments, which will not be repeated here.

[0059] Fourthly, embodiments of this application also provide a computer-readable storage medium storing one or more programs, which can be executed by one or more processors to implement any of the gas leakage diffusion prediction methods based on physical constraints and deep learning provided in the foregoing embodiments, thus achieving the corresponding technical effects. This has been described in detail above and will not be repeated here.

[0060] This application innovatively integrates CVAE, 4DCNN, and Transformer models by constructing a multi-module collaborative prediction architecture. These models are responsible for environmental parameter encoding, local spatiotemporal feature extraction, and global dependency modeling, respectively. A cross-modal attention mechanism is used to achieve deep feature fusion, laying the algorithmic foundation for high-precision prediction. Furthermore, a physical constraint deep embedding strategy is adopted, incorporating fluid dynamics laws such as mass and momentum conservation into the training process through differentiable operators, fundamentally ensuring the physical rationality of the prediction results. This prediction architecture possesses industrial-grade spatiotemporal prediction capabilities, simultaneously processing 3D spatial and time-series data to achieve multi-scale accurate extrapolation from microscopic details to macroscopic trends, meeting the stringent real-time requirements of complex industrial scenarios. Finally, by developing a dedicated 3D particle rendering engine, a visual decision support system integrating panoramic interaction and dynamic display is constructed, providing intuitive and efficient situational awareness and action basis for gas leak emergency response.

[0061] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0062] The various embodiments in this specification are described in a related manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.

[0063] In particular, the device embodiment is basically similar to the method embodiment, so the description is relatively simple. For relevant details, please refer to the description of the method embodiment.

[0064] For ease of description, the above apparatus is described by dividing it into various functional units / modules. Of course, in implementing this application, the functions of each unit / module can be implemented in one or more software and / or hardware.

[0065] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0066] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A gas leakage diffusion prediction method based on physical constraints and deep learning, characterized in that, include: Real-time environmental parameters of the target area are acquired and normalized; wherein, the environmental parameters include at least wind speed, wind direction, three-dimensional spatial location of the gas leak source, and leak rate; The normalized environmental parameters are input into the preset encoder to generate a three-dimensional spatial condition feature field that characterizes the physical constraints. The three-dimensional spatial conditional feature field is input into the pre-trained prediction model to extract local spatiotemporal features and calculate global spatiotemporal dependencies. Based on the local spatiotemporal characteristics and global spatiotemporal dependence, the predicted data of gas leakage diffusion concentration field are output.

2. The gas leakage and diffusion prediction method based on physical constraints and deep learning according to claim 1, characterized in that, The step of inputting the normalized environmental parameters into a preset encoder to generate a three-dimensional spatial condition feature field characterizing physical constraints includes: The preset encoder maps the normalized environmental parameters to the latent space and outputs the probability distribution parameters of the environmental parameters in the latent space. The probability distribution parameters are sampled to obtain latent variables; Based on the latent variables, an initial feature field is generated through a preset decoder; and, according to the relative relationship between the three-dimensional spatial location and the gas leak source, dynamic attention weights related to the spatial location are generated through radial basis functions, wherein relatively high attention weights are allocated to the gas leak source and the key diffusion area downwind. The initial feature field is weighted and fused with the dynamic attention weights to generate a three-dimensional spatial condition feature field that represents physical constraints.

3. The gas leakage and diffusion prediction method based on physical constraints and deep learning according to claim 1, characterized in that, The step of inputting the three-dimensional spatial conditional feature field into a pre-trained prediction model to extract local spatiotemporal features and calculate global spatiotemporal dependencies includes: The local feature extraction module performs local convolution operations on the three-dimensional spatial condition feature field in the spatial and temporal dimensions to obtain multi-scale local spatiotemporal features in the gas leakage and diffusion process. The local spatiotemporal features are received, and the global feature calculation module calculates the long-range interactions between locations in the three-dimensional space and the global evolution relationship in the time series based on the self-attention mechanism, so as to calculate the global spatiotemporal dependency.

4. The gas leakage and diffusion prediction method based on physical constraints and deep learning according to claim 1, characterized in that, The step of outputting gas leakage diffusion concentration field prediction data based on the local spatiotemporal characteristics and global spatiotemporal dependence includes: By integrating the local spatiotemporal diffusion characteristics with the global spatiotemporal dependence, preliminary gas leakage diffusion concentration field prediction data are formed; The preliminary gas leakage diffusion concentration field prediction data is verified and fine-tuned by the physical constraint module, and finally the gas leakage diffusion concentration field prediction data is output.

5. The gas leakage and diffusion prediction method based on physical constraints and deep learning according to claim 1, characterized in that, After outputting the predicted gas leakage diffusion concentration field data based on the local spatiotemporal characteristics and global spatiotemporal dependence, the process includes: Import the gas leakage diffusion concentration field prediction data file into the 3D particle rendering system to convert the gas concentration data into a particle density field, and dynamically render and interactively display the gas leakage diffusion trend and impact range in the 3D scene. Emergency response decisions will be made based on the gas leak diffusion trend and impact range.

6. The gas leakage and diffusion prediction method based on physical constraints and deep learning according to claim 5, characterized in that, The step of importing the gas leakage diffusion concentration field prediction data file into a 3D particle rendering system, converting the gas concentration data into a particle density field, and dynamically rendering and interactively displaying the gas leakage diffusion trend and impact range in a 3D scene includes: The three-dimensional particle rendering system reads the three-dimensional coordinates, time, and concentration data from the gas leakage diffusion concentration field prediction data file. The density and color attributes of particles in three-dimensional space are adjusted based on the concentration data to generate a dynamic particle cloud map of gas diffusion. The user interface allows for control of the dynamic particle cloud map, including viewpoint rotation, scaling, and timeline dragging.

7. A gas leakage and diffusion prediction system based on physical constraints and deep learning, characterized in that, include: The processing unit is used to acquire real-time environmental parameters of the target area and normalize the environmental parameters; wherein the environmental parameters include at least wind speed, wind direction, three-dimensional spatial location of the gas leak source, and leak rate; The generation unit is used to input the normalized environmental parameters into the preset encoder to generate a three-dimensional spatial condition feature field that characterizes the physical constraints. The extraction unit is used to input the three-dimensional spatial condition feature field into the pre-trained prediction model to extract local spatiotemporal features and calculate global spatiotemporal dependencies; The output unit is used to output gas leakage diffusion concentration field prediction data based on the local spatiotemporal characteristics and global spatiotemporal dependence.

8. The gas leakage and diffusion prediction system based on physical constraints and deep learning according to claim 7, characterized in that, The generation unit includes: The first output module is used to map the normalized environmental parameters to the latent space by the preset encoder and output the probability distribution parameters of the environmental parameters in the latent space. The latent variable module is used to sample the probability distribution parameters to obtain latent variables; The generation module is used to generate an initial feature field based on the latent variables through a preset decoder; and to generate dynamic attention weights related to the spatial location through a radial basis function according to the relative relationship between the three-dimensional spatial location and the gas leak source, wherein the relatively higher attention weights are allocated to the gas leak source and the key diffusion area downwind. The first fusion module is used to perform weighted fusion of the initial feature field and the dynamic attention weight to generate a three-dimensional spatial condition feature field that represents physical constraints.

9. The gas leakage and diffusion prediction system based on physical constraints and deep learning according to claim 7, characterized in that, The extraction unit includes: The local feature extraction module is used to perform local convolution operations on the three-dimensional spatial condition feature field in the spatial and temporal dimensions to obtain multi-scale local spatiotemporal features in the gas leakage and diffusion process. The global feature calculation module is used to receive the local spatiotemporal features and calculate the long-range interactions between locations in the three-dimensional space and the global evolution relationship on the time series based on the self-attention mechanism, so as to calculate the global spatiotemporal dependency.

10. The gas leakage and diffusion prediction system based on physical constraints and deep learning according to claim 7, characterized in that, The output unit includes: The second fusion module is used to fuse the local spatiotemporal diffusion characteristics with the global spatiotemporal dependence to form preliminary gas leakage diffusion concentration field prediction data. The second output module is used to verify and fine-tune the preliminary gas leakage diffusion concentration field prediction data through the physical constraint module, and finally output the gas leakage diffusion concentration field prediction data.