Natural gas pipeline leakage concentration field reconstruction method and system based on physical information neural network
Through the method based on physical information neural network, the concentration field of natural gas pipeline leakage is reconstructed using sparse concentration field data, which solves the problem that sparse data cannot effectively reflect the risk of leakage sites in the prior art, and achieves fast and efficient emergency response support.
Patent Information
- Application Number
- CN202411486428.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-23
- Publication Date
- 2025-03-04
AI Technical Summary
The prior art is difficult to effectively reflect the environmental hazards at the natural gas pipeline leakage site through sparse data, which hinders the rapid and efficient leakage emergency response.
Using a method based on physical information neural network, the sparse concentration field data of natural gas pipeline leakage diffusion is obtained, the initial network model of the fully connected neural network architecture is set, and the loss function is defined, and the non-steady state convective diffusion equation and its residual gradient are embedded in the loss function, and the physical information neural network improvement model is obtained, which is used to reconstruct the natural gas concentration field.
Through the combination of deep learning and gas process diffusion, the computing efficiency and migration capabilities are improved, and the concentration field of the entire leakage area can be effectively reconstructed, supporting rapid and efficient emergency response after leakage in natural gas pipelines.
Smart Images

Figure CN119558174A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of oil and gas safety technology, and in particular to a method, system, computer-readable storage medium and electronic device for reconstructing a leakage concentration field of a natural gas pipeline based on a physical information neural network. Background Art
[0002] At present, drones are mostly used to carry concentration detection equipment to obtain concentration data in the leakage area. However, during the leakage of natural gas pipelines, the airborne concentration detection equipment is affected by the burial depth, wind speed, terrain factors and surrounding obstacles, resulting in incomplete acquisition of spatial concentration information in the leakage area by the airborne concentration detection equipment. The sparse data obtained cannot reflect the environmental hazard of the leakage site as a whole, which greatly hinders the rapid and efficient emergency response to natural gas pipeline leaks.
[0003] Therefore, there is an urgent need to provide a technical solution to the above-mentioned deficiencies in the prior art. Summary of the invention
[0004] The purpose of this application is to provide a natural gas pipeline leakage concentration field reconstruction method, system, computer-readable storage medium and electronic device based on physical information neural network to solve or alleviate the problems existing in the above-mentioned prior art.
[0005] In order to achieve the above objectives, this application provides the following technical solutions:
[0006] The present application provides a method for reconstructing a concentration field of a natural gas pipeline leakage based on a physical information neural network, comprising: step S101, obtaining sparse concentration field data of a natural gas pipeline leakage diffusion;
[0007] Step S102: Based on the sparse concentration field data, set physical constraints of an initial network model based on a fully connected neural network architecture, and define a loss function of the initial network model;
[0008] Step S103, embedding the unsteady-state convection-diffusion equation of the natural gas pipeline leakage diffusion and its residual gradient into the loss function of the initial network model to obtain the physical information neural network improved model of the natural gas pipeline leakage;
[0009] Step S104: reconstructing the natural gas concentration field during the natural gas pipeline leakage and diffusion based on the trained physical information neural network improved model and the sparse concentration field data.
[0010] Preferably, in step S101, the leaked natural gas in the leakage area when the natural gas pipeline leaks and diffuses is detected by mid-infrared light waves to establish a concentration grayscale map of the leaked natural gas in the leakage area when the natural gas pipeline leaks and diffuses, and according to the formula:
[0011]
[0012] Converting the grayscale image of the concentration of the leaked natural gas in the leakage area when the natural gas pipeline leaks and diffuses into a sparse concentration field of the natural gas pipeline leak and diffuse;
[0013] In the formula, f(x,y,t f ) is the detection point (x, y) in the detection area when the natural gas pipeline leaks and spreads. f The spatiotemporal concentration of natural gas at the time, (x, y) is the coordinates of the detection point in the detection area when the natural gas pipeline leaks and diffuses;
[0014] H a , H b are the detection points (x a ,y a )、(x b ,y b ) f The grayscale value of the concentration at the moment, a0 is a constant, a0=0.05, S(T) is the absorption spectrum intensity of the leaked natural gas per unit area in the leakage area to the mid-infrared light wave, is the detection point (x a ,y a ) f The ambient temperature at the moment, is a constant, P is the standard atmospheric pressure, n is a constant, n=0.72, and γ is the absorption coefficient of the leaking natural gas to the mid-infrared light wave when detecting the leaking natural gas in the leakage area.
[0015] Preferably, in step S102, a non-steady-state convection-diffusion equation for the natural gas pipeline leakage diffusion and boundary conditions of the non-steady-state convection-diffusion equation are constructed; and the loss function is defined by the loss of the non-steady-state convection-diffusion equation, the data loss during the training process, and the boundary condition loss of the non-steady-state convection-diffusion equation.
[0016] Preferably, the unsteady-state convection diffusion equation for the leakage and diffusion of the natural gas pipeline is:
[0017]
[0018] The boundary conditions of the unsteady convection-diffusion equation are:
[0019] f(x,y,t)=0
[0020] The initial conditions for the diffusion of natural gas pipeline leakage are:
[0021]
[0022] Wherein, f(x, y, t) is the spatiotemporal concentration of natural gas at the detection point (x, y) in the detection area Ω at time t when the natural gas pipeline leaks and diffuses, and (x, y) is the coordinates of the detection point in the detection area Ω when the natural gas pipeline leaks and diffuses;
[0023] k x , k y are the diffusion coefficients of the leaked natural gas in the x direction and y direction when the natural gas pipeline leaks and diffuses, u x 、u y are the convection velocities of the leaked natural gas in the x direction and the y direction respectively when the natural gas pipeline leaks and diffuses; S(x, y, t) is the leakage rate at the detection point (x, y) in the detection area Ω at time t when the natural gas pipeline leaks and diffuses; wherein the x direction and the y direction are both horizontal directions;
[0024] f(x, y, 0) is the spatiotemporal concentration of natural gas at the detection point (x, y) in the detection area Ω at time t=0 when the natural gas pipeline leaks and diffuses; M is the total mass of natural gas leaked and diffused from the natural gas pipeline at time t=0; σ x , σ y is the expansion width of the leaked natural gas in the x direction and the y direction when the natural gas pipeline leaks and diffuses, and (x0, y0) is the point source position of the leaked natural gas when the natural gas pipeline leaks and diffuses.
[0025] Preferably, the non-steady-state convection-diffusion equation loss L PDE for:
[0026]
[0027] The data loss L DT for:
[0028]
[0029] The boundary condition loss L BC for:
[0030]
[0031] In the formula, f(x i ,y i ,t f ) is the i-th detection point (x i ,y i ) at t f The temporal and spatial concentration of natural gas at the time (x i ,y i ) is the coordinate of the i-th detection point in the detection area;
[0032] N1 is the total number of detection points in the detection area Ω when the natural gas pipeline leaks and spreads, N2 is the number of detection points randomly selected from N1 detection points, N3 is the number of boundary detection points in the detection area Ω when the natural gas pipeline leaks and spreads, N2, N3∈N1, N1, N2, N3 are all positive integers;
[0033] NN(x i ,y i ,t f ) is the initial network model at the detection point (x i ,y i ) f The predicted concentration of natural gas output at each moment.
[0034] Preferably, in step S103, according to the formula:
[0035]
[0036] Improving the initial network model to obtain the improved physical information neural network model;
[0037] Where f(x, y, t) is the spatiotemporal concentration of natural gas at the detection point (x, y) in the detection area Ω at time t when the natural gas pipeline leaks and diffuses. is the gradient value of the spatiotemporal concentration of natural gas at the detection point (x, y) in the detection area Ω at time t when the natural gas pipeline leaks and diffuses;
[0038] (x, y) are the coordinates of the detection points within the detection area Ω when the natural gas pipeline leaks and spreads;
[0039] (x i ,y i ) is the coordinate of the i-th detection point in the detection area Ω when the natural gas pipeline leaks and spreads; i∈N1, i and N1 are both positive integers, and N1 is the total number of detection points in the detection area Ω when the natural gas pipeline leaks and spreads;
[0040] t f ={t 1 ,…,t F}; t f ,t F Both are the detection moments of the leakage and diffusion of the natural gas pipeline.
[0041] Preferably, in step S103, the optimization loss function LOSS of the physical information neural network improved model of natural gas pipeline leakage is:
[0042]
[0043] Where, LPDE-impeove is the time domain gradient enhancement loss of the residual of the unsteady convection-diffusion equation;
[0044] ω PDE is the loss L of the unsteady-state convection-diffusion equation PDE The loss weight of DT The data loss L DT The loss weight, ω BC The boundary condition loss L BC The loss weight, ω PDE-impeove is the time domain gradient enhancement loss L PDE-impeove The loss weight of
[0045] f(x i ,y i ,t f ) is the i-th detection point (x i ,y i ) at t f The temporal and spatial concentration of natural gas at the time (x i ,y i ) is the coordinate of the i-th detection point in the detection area; i∈N1, i and N1 are both positive integers, N1 is the total number of detection points in the detection area Ω when the natural gas pipeline leaks and spreads,
[0046] is the detection point (x i ,y i ) f The gradient value of the spatiotemporal concentration of natural gas at the time;
[0047] is the detection point (x) within the detection area predicted by the physical information neural network improved model when the natural gas pipeline leaks and spreads i ,y i ) f The gradient value of the predicted natural gas concentration at the moment.
[0048] The embodiment of the present application also provides a natural gas pipeline leakage concentration field reconstruction system based on physical information neural network, including:
[0049] A data acquisition unit configured to obtain sparse concentration field data of leakage and diffusion of a natural gas pipeline;
[0050] An initial model unit is configured to set physical constraints of an initial network model based on a fully connected neural network architecture based on the sparse concentration field data, and define a loss function of the initial network model;
[0051] A gradient enhancement unit configured to embed the residual gradient of the unsteady-state convection-diffusion equation of the natural gas pipeline leakage diffusion into the loss function of the initial network model to obtain an improved physical information neural network model of the natural gas pipeline leakage;
[0052] The concentration reconstruction unit is configured to reconstruct the natural gas concentration field when the natural gas pipeline leaks and diffuses based on the trained physical information neural network improved model and the sparse concentration field data.
[0053] The embodiment of the present application further provides an electronic device, comprising: a memory, wherein the memory stores a computer program of any of the above-described methods for reconstructing a concentration field of a natural gas pipeline leakage based on a physical information neural network;
[0054] A processor is used to retrieve and execute the computer program stored in the memory.
[0055] An embodiment of the present application also provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed, the method for reconstructing the leakage concentration field of a natural gas pipeline based on a physical information neural network as described above is implemented.
[0056] Beneficial effects:
[0057] In the method for reconstructing the concentration field of natural gas pipeline leakage based on physical information neural network provided in the embodiment of the present application, on the basis of the sparse concentration field data of natural gas pipeline leakage diffusion obtained, the physical constraints of the initial network model based on the fully connected neural network architecture are set, and the loss function of the initial network model is defined; then, the non-steady-state convection-diffusion equation of natural gas pipeline leakage diffusion and its residual gradient are embedded in the loss function of the initial network model to obtain the improved physical information neural network model of natural gas pipeline leakage; finally, based on the trained improved physical information neural network model and the sparse concentration field data of natural gas pipeline leakage, the natural gas concentration field during natural gas pipeline leakage diffusion is reconstructed.
[0058] Therefore, deep learning is combined with gas process diffusion. By imposing physical constraints on the loss function and embedding the residual gradient of the non-steady-state convective diffusion of natural gas leakage into the loss function, the migration capability can be effectively enhanced while accelerating convergence and improving computational efficiency. The concentration field reconstruction in the entire leakage area during natural gas pipeline leakage and diffusion can be achieved through a small amount of discrete data (sparse concentration field), which effectively solves the contradiction between the calculation accuracy and calculation time of traditional numerical models, and provides support for rapid and efficient emergency response after natural gas pipeline leakage. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] The drawings in the specification, which constitute a part of the present application, are used to provide further understanding of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute improper limitations on the present application.
[0060] in:
[0061] Figure 1 A schematic flow chart of a method for reconstructing a leakage concentration field of a natural gas pipeline based on a physical information neural network according to some embodiments of the present application;
[0062] Figure 2 A network framework diagram of an improved physical information neural network model provided according to some embodiments of the present application;
[0063] Figure 3 A schematic diagram of reconstruction of a natural gas concentration field when a natural gas pipeline leaks and diffuses according to some embodiments of the present application;
[0064] Figure 4 A schematic structural diagram of a natural gas pipeline leakage concentration field reconstruction system based on a physical information neural network according to some embodiments of the present application;
[0065] Figure 5 A schematic diagram of the structure of an electronic device provided according to some embodiments of the present application;
[0066] Figure 6 A hardware structure diagram of an electronic device provided according to some embodiments of the present application. DETAILED DESCRIPTION
[0067] The present application will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments. Each example is provided by way of explanation of the present application and does not limit the present application. In fact, it will be clear to those skilled in the art that modifications and variations may be made in the present application without departing from the scope or spirit of the present application. For example, a feature shown or described as a part of an embodiment may be used in another embodiment to produce yet another embodiment. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the embodiments of the present invention should belong to the scope of protection of the embodiments of the present invention.
[0068] In order to solve the problem that the sparse concentration data collected by unmanned aerial vehicle detection equipment cannot effectively describe the overall concentration distribution of the leakage area, traditional methods mostly use spatial spline interpolation and CFD simulation methods to reconstruct the concentration field. For the data-driven method of spatial spline interpolation, the physical properties of fluid diffusion are ignored. In special scenarios, especially in natural gas accumulation areas caused by obstacles, there are large errors in the reconstructed concentration distribution. However, it is difficult for traditional CFD algorithms to reconstruct the concentration field in the entire leakage area with only a small amount of sparse concentration data when the leakage source term (leakage point source) and boundary conditions are unknown. At the same time, the CFD method is difficult to effectively balance the relationship between accuracy and efficiency, and the timeliness cannot meet the needs of rapid and efficient emergency response to natural gas pipeline leaks.
[0069] Based on this, the embodiment of the present application proposes a method for reconstructing the leakage concentration field of a natural gas pipeline based on a physical information neural network, such as Figures 1 to 3 As shown, the method includes:
[0070] Step S101: Acquire sparse concentration field data of natural gas pipeline leakage and diffusion.
[0071] In this application, sparse concentration field data of natural gas pipeline leakage diffusion is obtained by drone-mounted detection means. Specifically, the leaked natural gas in the leakage area of the natural gas pipeline is detected by mid-infrared light waves. For example, the detection data at different times t after the natural gas pipeline leakage diffusion is obtained by the mid-infrared camera module carried by the drone-mounted equipment, and the concentration grayscale map is formed by the graphic computer. That is, the different detection points in the leakage area of the natural gas pipeline leakage diffusion are detected by mid-infrared light waves at t 0 ~t F The natural concentration of the leak at the moment is detected, and the different detection points obtained by the detection are at t 0 ~t F The discrete concentration value of the natural gas leakage at the moment is used to establish a grayscale map of the concentration of the leaked natural gas in the leakage area when the natural gas pipeline leaks and diffuses.
[0072] Then, the laser gas analysis equipment is used to measure the concentration value of the single point grayscale in the concentration grayscale image, forming a mapping relationship between the grayscale value and the concentration value, and then completing the mutual conversion between the concentration grayscale image and the concentration value of the natural gas leak in the entire detection area, thereby obtaining quantitative sparse concentration field data in the leakage area. Specifically, according to the formula:
[0073]
[0074] The grayscale image of the concentration of leaked natural gas in the leakage area during the diffusion of natural gas pipeline leakage is converted into a sparse concentration field of the diffusion of natural gas pipeline leakage.
[0075] In the formula, f(x,y,t f ) is the detection point (x, y) in the detection area when the natural gas pipeline leaks and spreads. f The temporal and spatial concentration of natural gas at the time, (x, y) is the coordinates of the detection point in the detection area when the natural gas pipeline leaks and diffuses; H a , H b They are the detection points (x a ,y a )、(x b ,y b ) f The grayscale value of the concentration at the moment, a0 is a constant, a0=0.05, S(T) is the absorption spectrum intensity of the mid-infrared light wave by the leaked natural gas per unit area in the leakage area, is the detection point in the leakage area (x a ,y a ) f The ambient temperature at the moment, is a constant, P is the standard atmospheric pressure, n is a constant, n=0.72, and γ is the absorption coefficient of the leaking natural gas to the mid-infrared light wave when detecting the leaking natural gas in the leaking area.
[0076] Step S102: Based on the sparse concentration field data, set the physical constraints of the initial network model based on the fully connected neural network architecture, and define the loss function of the initial network model.
[0077] In this application, the unsteady-state convection diffusion equation for natural gas pipeline leakage and diffusion is established through the sparse concentration field data during natural gas leakage and diffusion. Specifically, the unsteady-state convection diffusion equation for natural gas pipeline leakage and diffusion is:
[0078]
[0079] Where f(x, y, t) is the spatiotemporal concentration of natural gas at the detection point (x, y) in the detection area Ω at time t when the natural gas pipeline leaks and diffuses; (x, y) is the coordinates of the detection point in the detection area Ω when the natural gas pipeline leaks and diffuses; k x , k y are the diffusion coefficients of the leaked natural gas in the x and y directions when the natural gas pipeline leaks and diffuses, u x 、u y are the convection velocities of the leaked natural gas in the x and y directions when the natural gas pipeline leaks and diffuses; S(x, y, t) is the leakage rate at the detection point (x, y) in the detection area Ω at time t when the natural gas pipeline leaks and diffuses; wherein the x and y directions are both horizontal directions.
[0080] At the same time, the boundary conditions and initial conditions of the unsteady-state convection-diffusion equation when the natural gas pipeline leaks and diffuses are established. Among them, the boundary conditions of the unsteady-state convection-diffusion equation when the natural gas pipeline leaks and diffuses are:
[0081] f(x,y,t)=0
[0082] The initial conditions are:
[0083]
[0084] Where f(x, y, 0) is the spatiotemporal concentration of natural gas at the detection point (x, y) in the detection area Ω at time t = 0 when the natural gas pipeline leaks and diffuses; M is the total mass of natural gas leaked and diffused from the natural gas pipeline at time t = 0; σ x , σ y is the expansion width of the leaked natural gas in the x-direction and y-direction when the natural gas pipeline leaks and diffuses, and (x0, y0) is the point source position of the leaked natural gas when the natural gas pipeline leaks and diffuses. Here, it should be noted that the coordinates (x, y) of the detection point in the leakage area in this application are all relative coordinates relative to the point source position (x0, y0) of the leaked natural gas. In other words, with the point source position (x0, y0) of the leaked natural gas as the coordinate origin, a rectangular coordinate system (x direction, y direction) is established in the horizontal plane, and the coordinates of the detection point in the rectangular coordinate system are the position coordinates of the detection point in the leakage area.
[0085] The non-steady-state convection diffusion equation and its boundary conditions and initial conditions during natural gas pipeline leakage and diffusion are used as physical constraints for predicting the natural gas concentration during natural gas pipeline leakage and diffusion. That is, the non-steady-state convection diffusion equation and its boundary conditions and initial conditions during natural gas pipeline leakage and diffusion are used as physical constraints for the initial network model based on the fully connected neural network architecture, so that the natural gas concentration during natural gas leakage and diffusion can be predicted through the initial network model based on the fully connected neural network architecture.
[0086] At the same time, the loss function of the initial network model is defined. That is, the loss function of the initial network model is defined by the loss of the non-steady-state convection diffusion equation during natural gas leakage and diffusion, the data loss of the natural gas concentration prediction model (i.e., the initial network model) during the training process, and the boundary condition loss of the non-steady-state convection diffusion equation. In other words, the loss function of the natural gas concentration prediction model (i.e., the initial network model) based on the fully connected neural network architecture for predicting the natural gas leakage concentration during natural gas pipeline leakage and diffusion includes the non-steady-state convection diffusion equation loss L PDE , data loss L DT and boundary condition loss L BC .
[0087] Specifically, the loss L of the unsteady-state convection-diffusion equation isPDE for:
[0088]
[0089] Data loss L DT for:
[0090]
[0091] Boundary condition loss L BC for:
[0092]
[0093] In the formula, f(x i ,y i ,t f ) is the i-th detection point (x i ,y i ) at t f The temporal and spatial concentration of natural gas at the time (x i ,y i ) is the coordinate of the i-th detection point in the detection area;
[0094] N1 is the total number of detection points in the detection area Ω when the natural gas pipeline leaks and spreads, N2 is the number of detection points randomly selected from N1 detection points, N3 is the number of boundary detection points in the detection area Ω when the natural gas pipeline leaks and spreads, N2, N3∈N1, N1, N2, N3 are all positive integers; NN(x i ,y i ,t f ) is the initial network model at the detection point (x i ,y i ) f The predicted concentration of natural gas output at each moment.
[0095] Step S103: embed the unsteady-state convection-diffusion equation of natural gas pipeline leakage diffusion and its residual gradient into the loss function of the initial network model to obtain an improved physical information neural network model of natural gas pipeline leakage.
[0096] In order to further improve the speed of natural gas concentration prediction and shorten the prediction time while ensuring the prediction accuracy, a gradient enhancement module is added to the initial network model based on the fully connected neural network architecture. The gradient information of the residual of the non-steady-state convection-diffusion equation during natural gas pipeline leakage and diffusion is embedded in the loss function of the initial network model, so that the training distribution can be adaptively improved during the training process of the model (improved model of physical information neural network). While accelerating convergence and improving computational efficiency, it can effectively enhance the migration ability, improve the accuracy and training efficiency of the model (improved model of physical information neural network), and effectively solve the contradiction between the computational accuracy and computational time of traditional numerical models.
[0097] Specifically, according to the formula:
[0098]
[0099] The initial network model is improved to obtain an improved model of the physical information neural network.
[0100] Where f(x, y, t) is the spatiotemporal concentration of natural gas at the detection point (x, y) in the detection area Ω at time t when the natural gas pipeline leaks and diffuses. is the gradient value of the spatiotemporal concentration of natural gas at the detection point (x, y) in the detection area Ω at time t when the natural gas pipeline leaks and diffuses;
[0101] (x, y) is the coordinate of the detection point within the detection area Ω when the natural gas pipeline leaks and spreads; (x i ,y i ) is the coordinate of the i-th detection point in the detection area Ω when the natural gas pipeline leaks and spreads; i∈N1, i and N1 are both positive integers, and N1 is the total number of detection points in the detection area Ω when the natural gas pipeline leaks and spreads; t f ,t F are the detection moments of the leakage and diffusion of the natural gas pipeline; t f ={t 1 ,…,t F}.
[0102] By embedding the non-steady-state convection-diffusion equation and its gradient information during natural gas pipeline leakage diffusion into the loss function of the initial network model, the optimized loss function LOSS of the physical information neural network improved model of natural gas pipeline leakage is obtained. Specifically, the optimized loss function LOSS of the physical information neural network improved model of natural gas pipeline leakage is:
[0103]
[0104] Where, L PDE-impeove is the time domain gradient enhancement loss of the residual of the unsteady convection-diffusion equation. PDEis the loss L of the unsteady-state convection-diffusion equation PDE The loss weight of DT The data loss L DT The loss weight, ω BC is the boundary condition loss L BC The loss weight, ω PDE-impeove is the time domain gradient enhancement loss L PDE-impeove The loss weight.
[0105] f(x i ,y i ,t f ) is the i-th detection point (x i ,y i ) at t f The temporal and spatial concentration of natural gas at the time (x i ,y i ) is the coordinate of the ith detection point in the detection area; i∈N1, i and N1 are both positive integers, and N1 is the total number of detection points in the detection area Ω when the natural gas pipeline leaks and diffuses. is the detection point in the detection area when the natural gas pipeline leaks and spreads (x i ,y i ) f The gradient value of the spatiotemporal concentration of natural gas at the time; The detection points (x) in the detection area predicted by the physical information neural network improved model when the natural gas pipeline leaks and spreads i ,y i ) f Predicted natural gas concentration at the time The gradient value of .
[0106] Step S104: Based on the trained physical information neural network improved model, the natural gas concentration field during the natural gas pipeline leakage and diffusion is reconstructed according to the sparse concentration field data.
[0107] In this application, the physical information neural network improved model is trained through the sparse concentration field data obtained by the drone-mounted mid-infrared camera module. During the training process, part of the data obtained by the drone-mounted mid-infrared camera module is used as a training set, and the loss of the physical information neural network improved model is calculated by optimizing the loss function LOSS, and the loss is back-propagated. The network weights and biases of the physical information neural network improved model are iteratively updated until the model parameters of the physical information neural network improved model meet the preset conditions, or the physical information neural network improved model reaches the set maximum number of iterations, and the training of the physical information neural network improved model is completed.
[0108] Part of the data obtained by the mid-infrared camera module on the drone is used as the test set, and the mean relative error MRE, mean absolute error MAE, and determination coefficient R on the test set are calculated. 2 -Socre compares and analyzes the accuracy of physical information neural network reconstruction of natural gas pipeline leakage concentration field under different concentration data volumes and data distribution characteristics. Specifically,
[0109]
[0110] In the formula, is the i-th detection point (x i ,y i ) at t f The spatiotemporal concentration of natural gas at the time f(x i ,y i ,t f )’s mean; The detection points (x) in the detection area predicted by the physical information neural network improved model when the natural gas pipeline leaks and spreads i ,y i ) f The predicted natural gas concentration at the time.
[0111] When the mean relative error MRE, mean absolute error MAE, and determination coefficient R 2 -Socre all meet the preset threshold conditions, then the training of the physical information neural network improved model is completed. Then, according to the sparse concentration field data during the diffusion of natural gas leakage, the trained physical information neural network improved model is called to predict the natural gas leakage concentration at any position in the entire leakage area when the natural gas pipeline leaks and diffuses, so as to realize the reconstruction of the natural gas leakage concentration field in the entire leakage area. Thus, a small amount of discrete data (sparse concentration field) can be used to realize the reconstruction of the concentration field in the entire leakage area when the natural gas pipeline leaks and diffuses, which effectively solves the contradiction between the calculation accuracy and calculation time of the traditional numerical model, and provides support for the rapid and efficient emergency disposal after the natural gas pipeline leaks.
[0112] like Figure 4 As shown, the embodiment of the present application also provides a natural gas pipeline leakage concentration field reconstruction system based on physical information neural network, the system comprising:
[0113] The data acquisition unit 401 is configured to obtain sparse concentration field data of natural gas pipeline leakage and diffusion;
[0114] An initial model unit 402 is configured to set physical constraints of an initial network model based on a fully connected neural network architecture based on sparse concentration field data, and define a loss function of the initial network model;
[0115] The gradient enhancement unit 403 is configured to embed the unsteady-state convection-diffusion equation of natural gas pipeline leakage diffusion and its residual gradient into the loss function of the initial network model to obtain a physical information neural network improved model of natural gas pipeline leakage;
[0116] The concentration reconstruction unit 404 is configured to reconstruct the natural gas concentration field when the natural gas pipeline leaks and diffuses based on the trained physical information neural network improved model and the sparse concentration field data.
[0117] The natural gas pipeline leakage concentration field reconstruction system based on physical information neural network provided in the embodiment of the present application can implement the steps and processes of the natural gas pipeline leakage concentration field reconstruction method based on physical information neural network in any of the above embodiments and achieve the same technical effects, which will not be repeated here one by one.
[0118] Figure 5 Schematic diagram of the structure of an electronic device provided according to some embodiments of the present application; Figure 5 As shown, the electronic device includes:
[0119] One or more processors 501;
[0120] The computer-readable medium can be configured to store one or more programs 502. When one or more processors 501 execute one or more programs 502, the following steps are implemented: obtaining sparse concentration field data of natural gas pipeline leakage and diffusion; setting physical constraints of an initial network model based on a fully connected neural network architecture based on the sparse concentration field data, and defining a loss function of the initial network model; embedding the non-steady-state convection-diffusion equation of natural gas pipeline leakage and diffusion and its residual gradient into the loss function of the initial network model to obtain an improved physical information neural network model of natural gas pipeline leakage; based on the trained improved physical information neural network model, reconstructing the natural gas concentration field during natural gas pipeline leakage and diffusion according to the sparse concentration field data.
[0121] Figure 6 The hardware structure of the electronic device provided according to some embodiments of the present application; Figure 6 As shown, the hardware structure of the electronic device may include: a processor 601 , a communication interface 602 , a computer-readable medium 603 and a communication bus 604 .
[0122] The processor 601 , the communication interface 602 , and the computer-readable storage medium 603 communicate with each other via a communication bus 604 .
[0123] Optionally, the communication interface 602 may be an interface of a communication module, such as an interface of a GSM module.
[0124] Among them, the processor 601 can be specifically configured to: obtain sparse concentration field data of natural gas pipeline leakage and diffusion; based on the sparse concentration field data, set the physical constraints of the initial network model based on the fully connected neural network architecture, and define the loss function of the initial network model; embed the non-steady-state convection-diffusion equation of natural gas pipeline leakage and diffusion and its residual gradient into the loss function of the initial network model to obtain an improved physical information neural network model of natural gas pipeline leakage; based on the trained improved physical information neural network model, reconstruct the natural gas concentration field during natural gas pipeline leakage and diffusion according to the sparse concentration field data.
[0125] The processor 601 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc. It may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. It may implement or execute the disclosed methods, steps and logic block diagrams in the embodiments of the present application. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0126] The natural gas pipeline leakage concentration field reconstruction system based on physical information neural network in the embodiment of the present application exists in various forms, including but not limited to:
[0127] (1) Mobile communication devices: These devices are characterized by their mobile communication functions and their main purpose is to provide voice and data communications. These terminals include: smart phones (e.g., iPhone), multimedia phones, functional phones, and low-end phones.
[0128] (2) Ultra-mobile personal computer devices: These devices fall into the category of personal computers, have computing and processing capabilities, and generally also have mobile Internet access features. These terminals include: PDA, MID and UMPC devices, such as iPad.
[0129] (3) Portable entertainment devices: These devices can display and play multimedia content. They include audio and video players (such as iPods), handheld game consoles, e-books, smart toys, and portable car navigation devices.
[0130] (4) Server: A device that provides computing services. The server consists of a processor, hard disk, memory, system bus, etc. The server is similar to a general computer architecture, but because it needs to provide highly reliable services, it has higher requirements in terms of processing power, stability, reliability, security, scalability, and manageability.
[0131] (5) Other electronic devices with data interaction functions.
[0132] It should be pointed out that, according to the needs of implementation, the various components / steps described in the embodiments of the present application can be split into more components / steps, or two or more components / steps or partial operations of components / steps can be combined into new components / steps to achieve the purpose of the embodiments of the present application.
[0133] The above-mentioned method according to the embodiment of the present application can be implemented in hardware, firmware, or implemented as software or computer code that can be stored in a recording medium (such as a CD ROM, RAM, floppy disk, hard disk or magneto-optical disk), or implemented as computer code originally stored in a remote recording medium or a non-temporary machine storage medium downloaded through a network and to be stored in a local recording medium, so that the method described herein can be stored in such software processing on a recording medium using a general-purpose computer, a dedicated processor or programmable or dedicated hardware (such as an ASIC or FPGA). It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component (e.g., RAM, ROM, flash memory, etc.) that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor or hardware, the method for reconstructing the concentration field of a natural gas pipeline leakage based on a physical information neural network described herein is implemented. In addition, when a general-purpose computer accesses the code for implementing the method shown herein, the execution of the code converts the general-purpose computer into a dedicated computer for executing the method shown herein.
[0134] Those of ordinary skill in the art will appreciate that the units and method steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and constraints involved in the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of the present application.
[0135] It should be noted that the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0136] The device and system embodiments described above are merely illustrative, wherein the units not shown as separate may or may not be physically separated, and the units not shown as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative work.
[0137] In the description of the present invention, the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" etc. mean that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0138] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for reconstructing the leakage concentration field of a natural gas pipeline based on a physical information neural network, characterized in that: include: Step S101, obtaining sparse concentration field data of natural gas pipeline leakage and diffusion; Step S102: Based on the sparse concentration field data, set physical constraints of an initial network model based on a fully connected neural network architecture, and define a loss function of the initial network model; Step S103, embedding the unsteady-state convection-diffusion equation of the natural gas pipeline leakage diffusion and its residual gradient into the loss function of the initial network model to obtain the physical information neural network improved model of the natural gas pipeline leakage; Step S104: reconstructing the natural gas concentration field during the natural gas pipeline leakage and diffusion based on the trained physical information neural network improved model and the sparse concentration field data.
2. The method for reconstructing the leakage concentration field of a natural gas pipeline based on a physical information neural network according to claim 1 is characterized in that: In step S101, The leaked natural gas in the leakage area when the natural gas pipeline leaks and diffuses is detected by mid-infrared light waves to establish a concentration grayscale map of the leaked natural gas in the leakage area when the natural gas pipeline leaks and diffuses, and according to the formula: Converting the grayscale image of the concentration of the leaked natural gas in the leakage area when the natural gas pipeline leaks and diffuses into a sparse concentration field of the natural gas pipeline leak and diffuse; In the formula, f(x,y,t f ) is the detection point (x, y) in the detection area when the natural gas pipeline leaks and spreads. f The spatiotemporal concentration of natural gas at the time, (x, y) is the coordinates of the detection point in the detection area when the natural gas pipeline leaks and diffuses; H a , H b are the detection points (x a ,y a )、(x b ,y b ) f The grayscale value of the concentration at the moment, a0 is a constant, a0=0.05, S(T) is the absorption spectrum intensity of the leaked natural gas per unit area in the leakage area to the mid-infrared light wave, T a is the detection point (x a ,y a ) f The ambient temperature at the moment, T0 is a constant, T0=296K, P is the standard atmospheric pressure, n is a constant, n=0.72, and γ is the absorption coefficient of the leaking natural gas to the mid-infrared light wave when detecting the leaking natural gas in the leakage area.
3. The method for reconstructing the leakage concentration field of a natural gas pipeline based on a physical information neural network according to claim 1 is characterized in that: In step S102, Constructing the unsteady-state convection-diffusion equation for the leakage and diffusion of the natural gas pipeline and the boundary conditions of the unsteady-state convection-diffusion equation; The loss function is defined by the loss of the unsteady convection-diffusion equation, the data loss during training, and the boundary condition loss of the unsteady convection-diffusion equation.
4. The method for reconstructing the leakage concentration field of a natural gas pipeline based on a physical information neural network according to claim 3 is characterized in that: The unsteady-state convection diffusion equation for the leakage diffusion of the natural gas pipeline is: The boundary conditions of the unsteady convection-diffusion equation are: f(x,y,t)=0 The initial conditions for the diffusion of natural gas pipeline leakage are: Wherein, f(x, y, t) is the spatiotemporal concentration of natural gas at the detection point (x, y) in the detection area Ω at time t when the natural gas pipeline leaks and diffuses, and (x, y) is the coordinates of the detection point in the detection area Ω when the natural gas pipeline leaks and diffuses; k x , k y are the diffusion coefficients of the leaked natural gas in the x direction and y direction when the natural gas pipeline leaks and diffuses, u x 、u y are the convection velocities of the leaked natural gas in the x direction and the y direction respectively when the natural gas pipeline leaks and diffuses; S(x, y, t) is the leakage rate at the detection point (x, y) in the detection area Ω at time t when the natural gas pipeline leaks and diffuses; wherein the x direction and the y direction are both horizontal directions; f(x, y, 0) is the spatiotemporal concentration of natural gas at the detection point (x, y) in the detection area Ω at time t=0 when the natural gas pipeline leaks and diffuses; M is the total mass of natural gas leaked and diffused from the natural gas pipeline at time t=0; σ x , σ y is the expansion width of the leaked natural gas in the x direction and the y direction when the natural gas pipeline leaks and diffuses, and (x0, y0) is the point source position of the leaked natural gas when the natural gas pipeline leaks and diffuses.
5. The method for reconstructing the leakage concentration field of a natural gas pipeline based on a physical information neural network according to claim 3 is characterized in that: The unsteady-state convection-diffusion equation loses L PDE for: The data loss L DT for: The boundary condition loss L BC for: In the formula, f(x i ,y i ,t f ) is the i-th detection point (x i ,y i ) at t f The temporal and spatial concentration of natural gas at the time (x i ,y i ) is the coordinate of the i-th detection point in the detection area; N1 is the total number of detection points in the detection area Ω when the natural gas pipeline leaks and spreads, N2 is the number of detection points randomly selected from N1 detection points, N3 is the number of boundary detection points in the detection area Ω when the natural gas pipeline leaks and spreads, N2, N3∈N1, N1, N2, N3 are all positive integers; NN(x i ,y i ,t f ) is the initial network model at the detection point (x i ,y i ) f The predicted concentration of natural gas output at each moment.
6. The method for reconstructing the leakage concentration field of a natural gas pipeline based on a physical information neural network according to claim 1 is characterized in that: In step S103, According to the formula: Improving the initial network model to obtain the improved physical information neural network model; Where f(x, y, t) is the spatiotemporal concentration of natural gas at the detection point (x, y) in the detection area Ω at time t when the natural gas pipeline leaks and diffuses. is the gradient value of the spatiotemporal concentration of natural gas at the detection point (x, y) in the detection area Ω at time t when the natural gas pipeline leaks and diffuses; (x, y) are the coordinates of the detection points within the detection area Ω when the natural gas pipeline leaks and spreads; (x i ,y i ) is the coordinate of the i-th detection point in the detection area Ω when the natural gas pipeline leaks and spreads; i∈N1, i and N1 are both positive integers, and N1 is the total number of detection points in the detection area Ω when the natural gas pipeline leaks and spreads; t f ={t 1 ,…,t F }; t f ,t F Both are the detection moments of the leakage and diffusion of the natural gas pipeline.
7. The method for reconstructing the leakage concentration field of a natural gas pipeline based on a physical information neural network according to claim 6 is characterized in that: In step S103, the optimization loss function LOSS of the physical information neural network improved model of natural gas pipeline leakage is: Where, L PDE-impeove is the time domain gradient enhancement loss of the residual of the unsteady convection-diffusion equation; ω PDE is the loss L of the unsteady-state convection-diffusion equation PDE The loss weight of DT The data loss L DT The loss weight, ω BC The boundary condition loss L BC The loss weight, ω PDE-impeove is the time domain gradient enhancement loss L PDE-impeove The loss weight of f(x i ,y i ,t f ) is the i-th detection point (x i ,y i ) at t f The temporal and spatial concentration of natural gas at the time (x i ,y i ) is the coordinate of the i-th detection point in the detection area; i∈N1, i and N1 are both positive integers, and N1 is the total number of detection points in the detection area Ω when the natural gas pipeline leaks and spreads; is the detection point (x i ,y i ) f The gradient value of the spatiotemporal concentration of natural gas at the time; is the detection point (x) within the detection area predicted by the physical information neural network improved model when the natural gas pipeline leaks and spreads i ,y i ) f The gradient value of the predicted natural gas concentration at the moment.
8. A natural gas pipeline leakage concentration field reconstruction system based on physical information neural network, characterized in that: include: A data acquisition unit configured to obtain sparse concentration field data of leakage and diffusion of a natural gas pipeline; An initial model unit is configured to set physical constraints of an initial network model based on a fully connected neural network architecture based on the sparse concentration field data, and define a loss function of the initial network model; A gradient enhancement unit configured to embed the residual gradient of the unsteady-state convection-diffusion equation of the natural gas pipeline leakage diffusion into the loss function of the initial network model to obtain an improved physical information neural network model of the natural gas pipeline leakage; The concentration reconstruction unit is configured to reconstruct the natural gas concentration field when the natural gas pipeline leaks and diffuses based on the trained physical information neural network improved model and the sparse concentration field data.
9. An electronic device, characterized in that: include: A memory storing a computer program of the method for reconstructing the leakage concentration field of a natural gas pipeline based on a physical information neural network according to any one of claims 1 to 7; A processor is used to retrieve and execute the computer program stored in the memory.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed, the method for reconstructing the leakage concentration field of a natural gas pipeline based on a physical information neural network as described in any one of claims 1 to 7 is implemented.
Citation Information
Cited By
CO2 conveying pipeline leakage prediction method and device
CN120650650A
High and large space air quality monitoring method and system based on physical information neural network
CN121784250A