A Parametric Self-Calibration Method and System for Predicting Oil and Gas Pipeline Leakage and Diffusion
Through the parameterized self-correction method of oil and gas pipeline leakage diffusion prediction, the fully connected neural network and autoregressive prediction model are used to characterize leakage parameters and timing prediction, and self-correct it through data fusion and hidden space dynamic prediction model, solving the timeliness and accuracy of leakage situation prediction in the existing technology, real-time and accurate leakage diffusion situation prediction is achieved.
Patent Information
- Application Number
- CN202411586815.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-06-17
- Estimated Expiration
- 2044-11-08
AI Technical Summary
The existing oil and gas pipeline leakage situation prediction system has problems such as poor timeliness, strong dependence on on-site data, and poor prediction accuracy, making it difficult to achieve real-time and accurate leakage diffusion situation prediction.
The parameterized self-correction method for oil and gas pipeline leakage diffusion prediction is adopted. The leakage parameter characterization model and autoregressive prediction model based on a fully connected neural network are used to predict the concentration field during leakage, and self-correct it through data fusion and hidden space dynamic prediction model to improve the prediction accuracy.
Real-time and accurate prediction of the leakage diffusion situation of oil and gas pipelines is achieved, the cumulative errors in the autoregressive prediction process are eliminated, the prediction accuracy and accuracy are improved, and the rapid response to leakage accidents is supported.
Smart Images

Figure CN119830697B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of oil and gas pipeline leakage emergency, and particularly to a parametric self-correction method and system for predicting the leakage and diffusion of oil and gas pipelines. Background Art
[0002] Oil and gas pipeline transportation is an efficient and safe way for long-distance transportation of oil and natural gas. However, due to problems such as aging and corrosion that pipelines may face during long-term operation, the leakage risk is relatively high. In addition, leaks are usually rather concealed, and the transported oil and natural gas are flammable and explosive. Once leaked, it may lead to serious environmental pollution and safety accidents. Therefore, the potential safety hazards of oil and gas pipelines are relatively prominent. Especially in the emergency plugging work after leakage, it often faces challenges such as great difficulty and long time consumption. This makes it crucial to timely and accurately grasp the diffusion situation after leakage. Through real-time situation prediction, the diffusion path and influence range of the leaked substance can be effectively predicted, thus providing valuable time and decision-making basis for rapid disposal and plugging work.
[0003] The oil and gas pipeline leakage and diffusion situation prediction system can quickly identify the location of leakage, predict the diffusion path and influence range of the leaked substance through real-time monitoring and data analysis, and put forward prevention and control measures according to the severity and influence range of the leakage, thus providing strong technical support for the safe operation of oil and gas pipelines. However, there are problems such as poor timeliness, strong dependence on on-site data, and poor prediction accuracy in the current pipeline leakage situation prediction system.
[0004] Therefore, there is an urgent need to provide a technical solution to address the above deficiencies in the existing technology. Summary of the Invention
[0005] The purpose of this application is to provide a parametric self-correction method and system for predicting the leakage and diffusion of oil and gas pipelines to solve or alleviate the problems existing in the above-mentioned existing technology.
[0006] To achieve the above purpose, this application provides the following technical solutions:
[0007] This application provides a parametric self-correction method for predicting the leakage and diffusion of oil and gas pipelines, including: Step S101, based on a leakage parameter characterization model of a fully connected neural network, generate the first concentration field hidden space vectors at the first moments before the leakage of the oil and gas pipeline according to the leakage parameters during the leakage of the oil and gas pipeline; where is a positive integer; is a positive integer;
[0008] Step S102, according to the first The first concentration field latent space vector at a moment, based on a pre-constructed autoregressive prediction model, performs a time series prediction on the concentration field during the leakage of the oil and gas pipeline to obtain the first predicted concentration field latent space vector during the leakage of the oil and gas pipeline, so as to generate the first predicted time series concentration field within a future time period during the leakage of the oil and gas pipeline;
[0009] Step S103, in response to the relative error between the concentration field prediction data at a moment in the first predicted time series concentration field and the concentration field sample data at the moment obtained by performing a leakage diffusion simulation on the oil and gas pipeline being greater than or equal to a preset error threshold, fuse the measured concentration field data during the leakage of the oil and gas pipeline and the concentration field prediction data at the moment to obtain the mixed concentration field data during the leakage of the oil and gas pipeline; at the moment is greater than or equal to a preset error threshold, fuse the measured concentration field data during the leakage of the oil and gas pipeline and the concentration field prediction data at the moment to obtain the mixed concentration field data during the leakage of the oil and gas pipeline;
[0010] Step S104, input the mixed concentration field latent space vector obtained by reducing the dimension of the mixed concentration field data and the leakage parameters during the leakage of the oil and gas pipeline into a latent space dynamic prediction model based on TimesNet, and use the output corrected concentration field latent space vector within a time period during the leakage of the oil and gas pipeline to replace the latent space vector within a time period in the first predicted concentration field latent space vector, so as to obtain the second predicted time series concentration field within a future time period during the leakage of the oil and gas pipeline.
[0011] Preferably, in step S101, the leakage parameters during the leakage of the oil and gas pipeline , are input into the th fully connected neural network structure of the leakage parameter characterization model to generate the first concentration field latent space vector at the th moment ;
[0012] Wherein,
[0013]
[0014] is the weight matrix of the th fully connected neural network structure in the leakage parameter standard model; is the bias vector of the th fully connected neural network structure ; is the activation function; .
[0015] Preferably, step S102 includes: training a constructed concentration field dimensionality reduction model based on a variational autoencoder according to the concentration field sample data obtained by simulating the leakage and diffusion of the oil and gas pipeline; based on the trained concentration field dimensionality reduction model, converting the concentration field sample data into a concentration field latent space sample vector to generate a dimensionality reduction sample data set of the natural gas concentration field when the oil and gas pipeline leaks; training a constructed autoregressive prediction model based on TimesNet according to the dimensionality reduction sample data set.
[0016] Preferably, based on the trained concentration field dimensionality reduction model, converting the concentration field sample data into a concentration field latent space sample vector to generate a dimensionality reduction sample data set of the natural gas concentration field when the oil and gas pipeline leaks, specifically: inputting multiple pieces of the concentration field sample data into the encoder of a variational autoencoder based on a convolutional neural network, and according to the formula:
[0017]
[0018] perform layer convolutional operations, and input the convolutional vector obtained from the layer convolutional operation into the fully connected layer of the encoder of the variational autoencoder to obtain the mean of the concentration field latent space sample vector ; and, input the convolutional vector obtained from the layer convolutional operation into the fully connected layer of the encoder of the variational autoencoder to obtain the variance of the concentration field latent space sample vector ;
[0019] According to the formula:
[0020]
[0021] correspondingly generate multiple concentration field latent space sample vectors to form the dimensionality reduction sample data set;
[0022] wherein, is a non-linear activation function, represents performing the layer convolutional operation on the concentration field sample data; is the bias vector of the convolutional neural network in the encoder of the variational autoencoder; are all integers, ; is the each of the concentration field sample data; , is a positive integer; is a noise vector subject to a standard normal distribution.
[0023] Preferably, in step S102, based on the trained autoregressive prediction model, according to the first concentration field hidden space vectors at the previous moments during the oil and gas pipeline leakage, perform a time series prediction on the concentration field during the oil and gas pipeline leakage to obtain the first predicted concentration field hidden space vector during the oil and gas pipeline leakage; based on the concentration field dimensionality reduction model, according to the first predicted concentration field hidden space vector during the oil and gas pipeline leakage, generate the first predicted time series concentration field within the future time period during the oil and gas pipeline leakage.
[0024] Preferably, the generating the first predicted time series concentration field within the future time period during the oil and gas pipeline leakage according to the first predicted concentration field hidden space vector during the oil and gas pipeline leakage based on the concentration field dimensionality reduction model is specifically: based on the decoder of the variational autoencoder of the convolutional neural network, according to the formula:
[0025]
[0026] reconstruct the first predicted concentration field hidden space vector during the oil and gas pipeline leakage to generate the first predicted time series concentration field within the future time period during the oil and gas pipeline leakage; where is a non-linear activation function, represents the th layer input vector to perform the th layer transposed convolution operation; is the bias vector of the convolutional neural network in the decoder of the variational autoencoder; is the th layer transposed convolution operation output, is the th layer transposed convolution operation output; is an integer.
[0027] Preferably, in step S103, the fusing the measured concentration field data during the oil and gas pipeline leakage and the concentration field prediction data at the moment to obtain the mixed concentration field data during the oil and gas pipeline leakage is specifically: repair the measured concentration field data during the oil and gas pipeline leakage to generate the uniformly discrete repaired measured concentration field data during the oil and gas pipeline leakage; based on the conditional adversarial network, according to the formula:
[0028]
[0029] For the measured data of the repaired concentration field and the predicted data of the concentration field at the moment are fused to obtain the mixed concentration field data when the oil and gas pipeline leaks ; where is a non-linear activation function represents a deconvolution operation represents weighted summation of data features represents the measured data of the repaired concentration field to perform a convolution operation represents the predicted data of the concentration field to perform a convolution operation
[0030] Preferably, in step S104, the encoder of the concentration field dimensionality reduction model based on the variational autoencoder is used to reduce the dimensionality of the mixed concentration field data to obtain the hidden space vector of the mixed concentration field
[0031] Preferably, in step S104, use the hidden space vector of the calibrated concentration field within the time period to replace the hidden space vector within the time period of the first predicted concentration field hidden space vector, and generate the second predicted concentration field hidden space vector when the oil and gas pipeline leaks; the decoder of the concentration field dimensionality reduction model based on the variational autoencoder is used to reconstruct and restore the second predicted concentration field hidden space vector to generate the second predicted time series concentration field within the future time period when the oil and gas pipeline leaks
[0032] The embodiment of the present application also provides a parametric oil and gas pipeline leakage diffusion prediction self-calibration system, including: a hidden space generation unit configured to generate, based on a leakage parameter characterization model of a fully connected neural network, the first concentration field hidden space vectors at the first moments when the oil and gas pipeline leaks according to the leakage parameters when the oil and gas pipeline leaks; where is a natural number
[0033] an autoregressive prediction unit configured to perform time series prediction on the concentration field when the oil and gas pipeline leaks based on the first concentration field hidden space vectors at the first moments when the oil and gas pipeline leaks according to a pre-constructed autoregressive prediction model to obtain the first predicted concentration field hidden space vector when the oil and gas pipeline leaks, so as to generate the first predicted time series concentration field within the future time period when the oil and gas pipeline leaks
[0034] A data fusion unit, configured to, in response to the relative error between the concentration field prediction data at a moment in the first predicted time-series concentration field and the concentration field sample data at a moment obtained by simulating the leakage and diffusion of the oil and gas pipeline being greater than or equal to a preset error threshold, fuse the measured concentration field data when the oil and gas pipeline leaks and the concentration field prediction data at a moment to obtain the mixed concentration field data when the oil and gas pipeline leaks; When the concentration field prediction data at a moment is obtained by simulating the leakage and diffusion of the oil and gas pipeline, If the relative error between the concentration field prediction data at a moment in the first predicted time-series concentration field and the concentration field sample data at a moment obtained by simulating the leakage and diffusion of the oil and gas pipeline is greater than or equal to a preset error threshold, the measured concentration field data when the oil and gas pipeline leaks and the concentration field prediction data at a moment are fused to obtain the mixed concentration field data when the oil and gas pipeline leaks;
[0035] A prediction correction unit, configured to input the mixed concentration field hidden space vector obtained by reducing the dimension of the mixed concentration field data and the leakage parameters when the oil and gas pipeline leaks into a hidden space dynamic prediction model based on TimesNet, and use the output corrected concentration field hidden space vector within a time period when the oil and gas pipeline leaks to replace the hidden space vector within a time period in the first predicted concentration field hidden space vector, so as to obtain a second predicted time-series concentration field in the future time period when the oil and gas pipeline leaks. Within the time period when the oil and gas pipeline leaks, the hidden space vector within the time period in the first predicted concentration field hidden space vector is replaced with the output corrected concentration field hidden space vector within the time period when the oil and gas pipeline leaks, so as to obtain a second predicted time-series concentration field in the future time period when the oil and gas pipeline leaks. To obtain the second predicted time-series concentration field in the future time period when the oil and gas pipeline leaks.
[0036] Advantageous effects:
[0037] In the parameterized oil and gas pipeline leakage diffusion prediction self-correction method provided by the embodiments of the present application, the leakage parameters when the oil and gas pipeline leaks are input into a leakage parameter characterization model based on a fully connected neural network to generate the first concentration field hidden space vectors at the first several moments when the oil and gas pipeline leaks; and in a pre-constructed autoregressive prediction model, the first concentration field hidden space vectors at the first several moments are used to perform time-series prediction on the concentration field when the oil and gas pipeline leaks to obtain the first predicted concentration field hidden space vector when the oil and gas pipeline leaks, and then generate the first predicted time-series concentration field in the future time period when the oil and gas pipeline leaks; when the relative error between the concentration field prediction data at a moment in the first predicted time-series concentration field and the concentration field sample data at a moment obtained by simulating the leakage and diffusion of the oil and gas pipeline is greater than or equal to a preset error threshold, the measured concentration field data when the oil and gas pipeline leaks and the concentration field prediction data at a moment are fused, and the fused mixed concentration field data when the oil and gas pipeline leaks are reduced in dimension, and the reduced mixed concentration field hidden space vector and the leakage parameters when the oil and gas pipeline leaks are input into a hidden space dynamic prediction model based on TimesNet, and the output corrected concentration field hidden space vector within a time period when the oil and gas pipeline leaks is used to replace the hidden space vector within a time period in the first predicted concentration field hidden space vector. The leakage parameters when the oil and gas pipeline leaks are input into a leakage parameter characterization model based on a fully connected neural network to generate the first concentration field hidden space vectors at the first several moments when the oil and gas pipeline leaks; The first several moments when the oil and gas pipeline leaks; The first concentration field hidden space vectors; and in a pre-constructed autoregressive prediction model, through the first concentration field hidden space vectors at the first several moments generated, time-series prediction is performed on the concentration field when the oil and gas pipeline leaks to obtain the first predicted concentration field hidden space vector when the oil and gas pipeline leaks, and then the first predicted time-series concentration field in the future time period when the oil and gas pipeline leaks is generated; when the relative error between the concentration field prediction data at a moment in the first predicted time-series concentration field and the concentration field sample data at a moment obtained by simulating the leakage and diffusion of the oil and gas pipeline is greater than or equal to a preset error threshold, the measured concentration field data when the oil and gas pipeline leaks and The first several moments when the oil and gas pipeline leaks; The first concentration field hidden space vectors; and in a pre-constructed autoregressive prediction model, through the first concentration field hidden space vectors at the first several moments generated, time-series prediction is performed on the concentration field when the oil and gas pipeline leaks to obtain the first predicted concentration field hidden space vector when the oil and gas pipeline leaks, and then the first predicted time-series concentration field in the future time period when the oil and gas pipeline leaks is generated; when the relative error between the concentration field prediction data at a moment in the first predicted time-series concentration field and the concentration field sample data at a moment obtained by simulating the leakage and diffusion of the oil and gas pipeline is greater than or equal to a preset error threshold, the measured concentration field data when the oil and gas pipeline leaks and When the concentration field prediction data at a moment in the first predicted time-series concentration field and the concentration field sample data at a moment obtained by simulating the leakage and diffusion of the oil and gas pipeline, When the relative error between the concentration field prediction data at a moment in the first predicted time-series concentration field and the concentration field sample data at a moment obtained by simulating the leakage and diffusion of the oil and gas pipeline is greater than or equal to a preset error threshold, the measured concentration field data when the oil and gas pipeline leaks and The measured concentration field data when the oil and gas pipeline leaks and the concentration field prediction data at a moment are fused, and the fused mixed concentration field data when the oil and gas pipeline leaks are reduced in dimension, and the reduced mixed concentration field hidden space vector and the leakage parameters when the oil and gas pipeline leaks are input into a hidden space dynamic prediction model based on TimesNet, and the output corrected concentration field hidden space vector within a time period when the oil and gas pipeline leaks is used to replace the hidden space vector within a time period in the first predicted concentration field hidden space vector. Within a time period when the oil and gas pipeline leaks, the hidden space vector within a time period in the first predicted concentration field hidden space vector is replaced with the output corrected concentration field hidden space vector within a time period when the oil and gas pipeline leaks. The latent space vectors of the time period are used to obtain the second predicted temporal concentration field in the future time period during the leakage of the oil and gas pipeline.
[0038] Thus, through the leakage parameter characterization model of a fully connected neural network, the leakage diffusion flow field of the oil and gas pipeline is parameterized, and the three-dimensional, uniform, and discrete concentration field during the leakage of the oil and gas pipeline is reduced to a first concentration field latent space vector of a fixed length. Through autoregressive prediction, the results of the previous moments are used as the input for subsequent predictions, and the full-time series prediction of the oil and gas pipeline leakage is completed in an iterative manner.
[0039] Meanwhile, to eliminate the deviation of the prediction result from the true value caused by the cumulative error in the prediction process, through the judgment of the relative error between the predicted concentration field data at a certain moment and the concentration field sample data at a certain moment, the measured concentration field data during the leakage of the oil and gas pipeline and the predicted concentration field data at a certain moment are fused and dimensionally reduced, and the combined concentration field latent space vector obtained and the leakage parameters during the leakage of the oil and gas pipeline are input into the latent space dynamic prediction model based on TimesNet. The corresponding data in the first predicted concentration field latent space are corrected by using the correction data of the latent space dynamic prediction model, effectively eliminating the cumulative error in the autoregressive prediction process, realizing the effective correction of the autoregressive prediction, and improving the prediction accuracy and precision. Description of the Drawings
[0040] The specification drawings forming a part of this application are used to provide a further understanding of this application. The schematic embodiments of this application and their descriptions are used to explain this application and do not constitute an improper limitation of this application. Among them:
[0041] Figure 1 FIG. is a schematic flow chart of a parametric oil and gas pipeline leakage diffusion prediction self-correction method provided according to some embodiments of this application;
[0042] Figure 2 FIG. is a schematic logical diagram of a parametric oil and gas pipeline leakage diffusion prediction self-correction method provided according to some embodiments of this application;
[0043] Figure 3 FIG. is a schematic structural diagram of a concentration field dimensionality reduction model provided according to some embodiments of this application;
[0044] Figure 4 FIG. is a schematic slice diagram of concentration field sample data at different leakage times provided according to some embodiments of this application;
[0045] Figure 5 FIG. is a schematic slice diagram of concentration field prediction data at different leakage times provided according to some embodiments of this application;
[0046] Figure 6 Schematic diagram of the error between the concentration field prediction data and the concentration field sample data with different leakage times provided according to some embodiments of the present application;
[0047] Figure 7 Schematic structural diagram of a parameterized oil and gas pipeline leakage diffusion prediction correction system provided according to some embodiments of the present application. Detailed implementation manners
[0048] 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 rather than a limitation of the present application. In fact, those skilled in the art will clearly understand that modifications and variations can be made to the present application without departing from the scope or spirit of the present application. For example, features shown or described as part of one embodiment can be used in another embodiment to yield yet another embodiment. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present invention shall fall within the scope of protection of the embodiments of the present invention.
[0049] Oil and gas pipeline transportation is an efficient and safe way for long-distance transportation of oil and natural gas. However, due to the characteristics of pipeline leakage being concealed and the transported medium being flammable and explosive, there are major safety hazards during the oil and gas pipeline transportation process. Moreover, in the emergency plugging work after leakage, it is necessary to timely and accurately master the diffusion trend after leakage. Existing oil and gas pipeline leakage trend predictions have problems such as poor timeliness, inaccurate prediction, and poor system integration, mainly manifested as follows: First, the performance of model calculation is poor and fails to achieve real-time prediction effects; Second, the prediction ability of the model is limited. Existing prediction models overly rely on on-site collected data and have large errors when there are problems with on-site data; Third, the calibration process of the prediction model is not deep enough and fails to fully optimize the prediction accuracy of the model.
[0050] Based on this, the embodiments of the present application propose a parameterized self-correction method for oil and gas pipeline leakage diffusion prediction, as Figures 1 to 6 shown. This prediction method includes:
[0051] Step S101, based on the leakage parameter characterization model of a full connection neural network, according to the leakage parameters during the oil and gas pipeline leakage, generate the first concentration field hidden space vectors of the first moments before the oil and gas pipeline leakage.
[0052] In the present application, the parameters of the oil and gas pipeline leakage are detected by a ground unmanned vehicle-mounted radar or an unmanned aerial vehicle carrying a mid-infrared spectral camera, and the obtained leakage parameters such as pipeline leakage pressure, leakage direction, soil type, and environmental wind speed are input into the A leakage parameter characterization model of a fully connected neural network architecture. In the leakage parameter characterization model, the bias vectors and weight matrices of each fully connected neural network are different. Therefore, when the same set of leakage parameters is input into fully connected neural networks with different bias vectors and weight matrices, the outputs of each fully connected neural network are different.
[0053] Specifically, the leakage parameters during the leakage of the oil and gas pipeline , are input into the th fully connected neural network structure of the leakage parameter characterization model to generate the first concentration field hidden space vector at the th moment. Specifically, .
[0054]
[0055] Among them, is the weight matrix of the th fully connected neural network structure in the leakage parameter standard model; is the bias vector of the th fully connected neural network structure ; is the activation function; ; among them, is a positive integer. is a positive integer.
[0056] The leakage parameter characterization model uses a multi-layer fully connected neural network as the core structure to map the operating conditions parameters (leakage parameters ) to the corresponding first moments of the concentration field hidden space vector. During this process, the leakage location, leakage direction, leakage pressure, leakage medium, leakage aperture, soil type, and environmental wind speed under different operating conditions are used as model data, and the hidden space vectors at the first moments under the corresponding operating conditions are used as the target output, so that the model can generate the hidden space vectors of the concentration field at the first moments (i.e., the first concentration field hidden space vector) according to the leakage parameters.
[0057] Step S102: Based on the first concentration field hidden space vectors at the first moments during the leakage of the oil and gas pipeline, perform time series prediction on the concentration field during the leakage of the oil and gas pipeline based on a pre-constructed autoregressive prediction model to obtain the first predicted concentration field hidden space vector during the leakage of the oil and gas pipeline, so as to generate the first predicted time series concentration field within the future time period during the leakage of the oil and gas pipeline.
[0058] After generating the first The concentration field latent space vector at a certain moment (i.e., the first concentration field latent space vector), taking the first concentration field latent space vectors of the previous moments as the input of the autoregressive prediction model based on TimesNet, enabling the autoregressive prediction model to perform autoregressive prediction on the gas pipeline leakage based on the first concentration field latent space vectors of the previous moments, and obtaining the time-series concentration field of the gas pipeline leakage for all subsequent time series (i.e., the first predicted time-series concentration field).
[0059] In this process, first, an autoregressive prediction model is constructed based on TimesNet, and the autoregressive prediction model is trained with the sample training data during the oil and gas pipeline leakage. Specifically, a concentration field dimensionality reduction model based on a variational autoencoder is constructed, and the concentration field dimensionality reduction model is trained with the concentration field sample data obtained from the leakage diffusion simulation of the oil and gas pipeline. And through the trained concentration field dimensionality reduction data, the concentration field sample data is transformed into concentration field latent space sample vectors to generate a dimensionality reduction sample data set of the natural gas concentration field during the oil and gas pipeline leakage for training the autoregressive prediction model. Thereby, the concentration field dimensionality reduction data based on the variational autoencoder is self-supervised trained through the simulation data of the oil and gas pipeline leakage diffusion, realizing the reduction of the three-dimensional, uniform, and discrete concentration field into a group of latent space vectors with a fixed length (concentration field latent space sample vectors) for training the autoregressive prediction model.
[0060] Among them, when transforming the concentration field sample data into concentration field latent space sample vectors, multiple concentration field sample data are respectively input into the encoder of the variational autoencoder based on a convolutional neural network for multi-layer convolutional operations, and the convolutional vector obtained from the last layer of convolutional operations is input into two fully connected layers, and the concentration field latent space sample vectors are obtained from the outputs of the two fully connected layers. Specifically, according to the formula:
[0061]
[0062] perform layers of convolutional operations, and input the convolutional vector obtained from the th layer of convolutional operations into the fully connected layer of the encoder of the variational autoencoder to obtain the mean of the concentration field latent space sample vector ; and, input the convolutional vector obtained from the th layer of convolutional operations into the fully connected layer of the encoder of the variational autoencoder to obtain the variance of the concentration field latent space sample vector ; ; . Then, according to the formula:
[0063]
[0064] Generate multiple concentration field latent space sample vectors correspondingly , so as to form a dimensionality-reduced sample data set; in the formula, is a non-linear activation function, represents the th layer convolution operation on the concentration field sample data; is the bias vector of the convolutional neural network in the encoder of the variational autoencoder; are all integers, ; is the th concentration field sample data; , is a positive integer; is a noise vector obeying the standard normal distribution.
[0065] Construct a concentration field sample database through the concentration field sample data of the oil and gas pipeline leakage obtained by simulating the leakage diffusion of the oil and gas pipeline; and the generation of the concentration field latent space sample vector is to reduce the dimension of all the concentration field sample data at each working condition and each moment in the concentration field sample database obtained by simulation. Furthermore, the generated concentration field latent space sample vectors form a dimensionality-reduced sample data set, train the autoregressive prediction model based on TimesNet, and perform time series prediction on the concentration field of the oil and gas pipeline leakage through the trained autoregressive prediction model.
[0066] Specifically, first, based on the trained autoregressive prediction model, according to the first concentration field latent space vectors at the previous moments of the oil and gas pipeline leakage, perform time series prediction on the concentration field of the oil and gas pipeline leakage to obtain the first predicted concentration field latent space vector of the oil and gas pipeline leakage; then, based on the concentration field dimensionality reduction model, perform reduction and reconstruction on the obtained first predicted concentration field latent space vector of the oil and gas pipeline leakage. Here, it should be noted that the concentration field dimensionality reduction model adopts a variational autoencoder based on a convolutional neural network. The variational autoencoder includes an encoder and a decoder, and the decoder can reconstruct the dimensionality-reduced concentration field latent space vector and restore it to a time series concentration field.
[0067] That is to say, input the obtained first predicted concentration field latent space vector of the oil and gas pipeline leakage into the decoder of the variational autoencoder based on the convolutional neural network, and according to the formula:
[0068]
[0069] For the first predicted concentration field latent space vector of the oil and gas pipeline leakage Reconstruction is performed to generate the first predicted temporal concentration field in the future time period when there is a leakage in the oil and gas pipeline. In the formula, is a non-linear activation function, represents the input vector of the th layer deconvolution operation is performed on is the bias vector of the convolutional neural network in the decoder of the variational autoencoder; is the output of the deconvolution operation of the th layer, is the output of the deconvolution operation of the th layer; is an integer.
[0070] Thus, through parameterized concentration field dimensionality reduction and temporal autoregressive prediction, parameters such as the leakage location, leakage direction, leakage pressure, leakage medium, leakage aperture, soil type, and environmental wind speed when there is a leakage in the gas pipeline are autoregressively predicted to obtain the predicted temporal concentration field at any future time period when there is a leakage in the gas pipeline.
[0071] Step S103, in response to the relative error between the concentration field prediction data at time in the first predicted temporal concentration field and the concentration field sample data at time obtained by simulating the leakage diffusion of the oil and gas pipeline being greater than or equal to the preset error threshold, the measured concentration field data when there is a leakage in the oil and gas pipeline and the concentration field prediction data at
[0072] time are fused to obtain the mixed concentration field data when there is a leakage in the oil and gas pipeline.
[0073] In this regard, in the present application, during the autoregressive prediction process, field data (measured concentration field data) when there is a leakage in the oil and gas pipeline is introduced every certain step length to correct the error hidden space vector during the autoregressive prediction process. Specifically, for the first predicted temporal concentration field obtained by autoregressive prediction The predicted concentration field data at a certain moment and the concentration field sample data at the moment obtained from the leakage diffusion simulation of the oil and gas pipeline, according to the formula:
[0074]
[0075] Calculate the relative error between the predicted concentration field data of the predicted concentration field and the sampled concentration field data obtained from the simulation at the corresponding moment. Here, the average relative error is used to calculate the relative error of the predicted concentration field during the leakage of the oil and gas pipeline, and the relative error threshold is set to 10% to evaluate the cumulative error in the autoregressive prediction process. When the concentration field prediction data at the moment in the first predicted time series and the concentration field sample data at the moment obtained from the leakage diffusion simulation of the oil and gas pipeline
[0076] Specifically, first, repair the measured concentration field data during the leakage of the oil and gas pipeline. During the data repair process, the missing part of the measured concentration field data is filled with 0 to generate uniform and discrete repaired measured concentration field data during the leakage of the oil and gas pipeline . Then, the repaired measured concentration field data and the concentration field prediction data at the moment are fused through a conditional adversarial network.
[0077] The conditional adversarial network consists of a generator and a discriminator; among them, the generator is used to fuse data and generate a predicted structure approaching the real concentration field distribution, and the discriminator continuously judges the difference between the generated data and the real data during the training process to optimize the generator parameters. Here, the repaired measured concentration field data and the concentration field prediction data at the moment are input into the generator. The generator will use a three-dimensional convolutional layer to reduce the dimension of the two data to obtain a new feature dimension. Then, the low-dimensional data of the repaired measured concentration field data and the concentration field prediction data at the moment are weighted and summed in the new feature dimension and then restored through deconvolution processing to obtain the mixed concentration field data at the moment during the leakage of the oil and gas pipeline .
[0078] Specifically, based on the conditional adversarial network, according to the formula:
[0079]
[0080] For the repaired measured concentration field data and Concentration field prediction data at a moment are fused to obtain the mixed concentration field data during oil and gas pipeline leakage ; In the formula, is a non-linear activation function, represents a deconvolution operation, represents weighted summation of data features, represents the measured data of the repaired concentration field for convolution operation, represents the concentration field prediction data for convolution operation.
[0081] Therefore, through the relative error judgment between the concentration field prediction data at a moment and the concentration field sample data at a moment, the measured data of the concentration field during oil and gas pipeline leakage and the concentration field prediction data at a moment are fused and dimension-reduced, and the mixed concentration field data containing the characteristics of the on-site measured data of oil and gas pipeline leakage is output to eliminate the cumulative error of autoregressive prediction.
[0082] In this application, when simulating the leakage and diffusion of oil and gas pipelines, the simulation condition data takes into account parameters such as pipeline leakage pressure, leakage direction, soil type, environmental wind speed, etc., and generates simulation data (concentration field sample data) for different types of pipeline leaks. For the oil pipeline scenario, the coupled technology of smoothed particle hydrodynamics (SPH) and discrete element method (DEM) is used for leakage simulation, which can accurately simulate the diffusion process of liquid petroleum under complex terrain conditions. For the gas pipeline leakage scenario, a program based on the finite volume method (FVM) and the component transport equation is used for gas diffusion simulation to describe the diffusion and transport behavior after gas leakage.
[0083] Step S104: Input the mixed concentration field hidden space vector obtained by dimension-reducing the mixed concentration field data and the leakage parameters during oil and gas pipeline leakage into the hidden space dynamic prediction model based on TimesNet, and use the corrected concentration field hidden space vector during the time period output to replace the hidden space vector during the time period in the first predicted concentration field hidden space vector to obtain the second predicted time series concentration field during the future time period of oil and gas pipeline leakage.
[0084] After obtaining the mixed concentration field data during the oil and gas pipeline leakage, the encoder of the concentration field dimensionality reduction model based on the variational autoencoder is used to reduce the dimensionality of the mixed concentration field data, obtaining the hidden space vector of the mixed concentration field; then, the obtained hidden space vector of the mixed concentration field and parameters such as the leakage location, leakage direction, leakage pressure, leakage medium, leakage aperture, soil type, and environmental wind speed during the oil and gas pipeline leakage are input into the hidden space dynamic prediction module together, obtaining the hidden space vectors at several moments before and after the correction moment ( ) That is, the hidden space dynamic prediction model outputs the corrected concentration field hidden space vectors during the oil and gas pipeline leakage time period.
[0085] Next, replace the hidden space vectors at several moments before and after the correction moment with the hidden space vectors at the moment in the autoregressive prediction process, realizing the correction and elimination of the cumulative error in the autoregressive prediction. That is, replace the hidden space vectors in the time period of the first predicted concentration field hidden space vector with the corrected concentration field hidden space vectors during the oil and gas pipeline leakage time period, generating the second predicted concentration field hidden space vector during the oil and gas pipeline leakage.
[0086] Finally, the decoder of the concentration field dimensionality reduction model is used to reconstruct the first predicted concentration field hidden space vector after data replacement, restoring it to the three-dimensional concentration field during the gas pipeline leakage. That is, the decoder of the concentration field dimensionality reduction model based on the variational autoencoder is used to reconstruct and restore the second predicted concentration field hidden space vector, generating the second predicted time-series concentration field during the future time period of the oil and gas pipeline leakage.
[0087] Here, it should be noted that the concentration field dimensionality reduction model is constructed based on the variational autoencoder, and the variational autoencoder adopts an encoder and decoder architecture based on the convolutional neural network. Both the encoder and decoder contain 5 convolutional layers, the convolutional kernel is 3D, the size is 3, and the stride is 2. Each layer in the architecture uses a convolutional layer and a ReLU activation function. A fully connected layer is connected after the encoder to obtain the mean and variance of the hidden space vector for time series prediction, and the mean and variance are used to generate the hidden space vector for time series prediction. The decoder is used to reconstruct the concentration field hidden space vector obtained by dimensionality reduction, restoring it to the time series concentration field. Thereby, using the correction data of the hidden space dynamic prediction model to correct the corresponding data in the first predicted concentration field hidden space, effectively eliminating the cumulative error in the autoregressive prediction process, realizing the effective correction of the autoregressive prediction, and improving the prediction accuracy and precision.
[0088] Meanwhile, through visual operations, the prediction results can also be presented in 3D to intuitively show the diffusion path and scope during the gas pipeline leakage, identify the dangerous areas and risk levels, and assist decision-making in quickly evaluating and responding to sudden leakage accidents, effectively improving the timeliness and accuracy of emergency responses. Specifically, a visualization unit is constructed based on the open-source PyVista library to combine complex prediction data with the actual physical scenario and achieve the visualization display of volume cloud maps. In addition, multi-source sensor data, such as environmental factors like temperature, pressure, and wind speed, can be integrated through the visualization unit to further improve the accuracy of leakage prediction and the integrity of the scenario. Furthermore, based on the displayed time-series field data, the leakage source location, leakage volume, diffusion speed, etc. are determined, and indicators such as the explosion limit and the injury range caused by explosion overpressure can be combined. Through 3D display, the diffusion path and scope of the leaked substance are intuitively presented, and the dangerous areas and risk levels are identified to help decision-makers quickly evaluate and respond to sudden leakage accidents and support on-site emergency decision-making.
[0089] As Figure 7 shown, the embodiment of the present application also provides a parameterized oil and gas pipeline leakage diffusion prediction correction system, including:
[0090] A latent space generation unit 701, configured to generate the first concentration field latent space vectors at the first several moments before the oil and gas pipeline leakage according to the leakage parameter characterization model of a fully connected neural network based on the leakage parameters during the oil and gas pipeline leakage; where is a natural number; For
[0091] An autoregressive prediction unit 702, configured to perform time-series prediction on the concentration field during the oil and gas pipeline leakage based on the pre-constructed autoregressive prediction model according to the first concentration field latent space vectors at the first several moments before the oil and gas pipeline leakage, and obtain the first predicted concentration field latent space vector during the oil and gas pipeline leakage to generate the first predicted time-series concentration field within the future time period during the oil and gas pipeline leakage;
[0092] A data fusion unit 703, configured to, in response to the relative error between the concentration field prediction data at the moment in the first predicted time-series concentration field and the concentration field sample data at the moment obtained by simulating the leakage diffusion of the oil and gas pipeline being greater than or equal to the preset error threshold, fuse the measured concentration field data during the oil and gas pipeline leakage and the concentration field prediction data at the moment to obtain the mixed concentration field data during the oil and gas pipeline leakage;
[0093] The prediction and correction unit 704 is configured to input the hybrid concentration field latent space vector obtained by reducing the dimension of the hybrid concentration field data and the leakage parameters during the oil and gas pipeline leakage into the latent space dynamic prediction model based on TimesNet, and replace the latent space vector of the first predicted concentration field within the time period with the corrected concentration field latent space vector within the time period during the oil and gas pipeline leakage to obtain the second predicted time series concentration field within the future time period during the oil and gas pipeline leakage. time period, so as to obtain the second predicted time series concentration field within the future time period during the oil and gas pipeline leakage.
[0094] The parameterized oil and gas pipeline leakage diffusion prediction self-correction system provided by the embodiments of the present application can implement the steps and processes of the parameterized oil and gas pipeline leakage diffusion prediction self-correction method in any of the above embodiments and achieve the same technical effects, which will not be elaborated herein one by one.
[0095] In the description of the present invention, the terms "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include at least one of such features. In the description of the present invention, "a plurality" means at least two, such as two, three, etc., unless otherwise specifically defined.
[0096] In the present invention, the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples", etc. mean that the specific features, structures, materials, or characteristics described in connection 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 can be combined in any one or more embodiments or examples in a suitable manner.
[0097] The above are only the preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application can have various changes and modifications. 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 parameterized oil and gas pipeline leakage diffusion prediction self-correction method, characterized in that: include: Step S101: Based on A leakage parameter characterization model of a fully connected neural network is used to generate the leakage parameters of the oil and gas pipeline according to the leakage parameters of the oil and gas pipeline. of the moment The first concentration field hidden space vector; among them, is a positive integer; Step S102: according to the oil and gas pipeline leakage The first concentration field latent space vector at a moment, based on a pre-built autoregressive prediction model, performs time series prediction on the concentration field when the oil and gas pipeline leaks, and obtains the first predicted concentration field latent space vector when the oil and gas pipeline leaks, so as to generate the first predicted time series concentration field in the future time period when the oil and gas pipeline leaks; Step S103: In response to the first predicted time series concentration field The concentration field prediction data at the time is compared with the leakage diffusion simulation data of the oil and gas pipeline. The relative error of the concentration field sample data at the time is greater than or equal to the preset error threshold, and the concentration field measured data when the oil and gas pipeline leaks and The concentration field prediction data at the time instant are merged to obtain mixed concentration field data when the oil and gas pipeline leaks; Step S104: input the latent space vector of the mixed concentration field obtained by reducing the dimension of the mixed concentration field data and the leakage parameters of the oil and gas pipeline into the latent space dynamic prediction model based on TimesNet, and use the output of the oil and gas pipeline leakage time The corrected concentration field latent space vector in the time period replaces the first predicted concentration field latent space vector The latent space vector of the time period is used to obtain the second predicted time series concentration field in the future time period when the oil and gas pipeline leaks.
2. The parameterized oil and gas pipeline leakage diffusion prediction self-correction method according to claim 1 is characterized in that: In step S101, The leakage parameters of the oil and gas pipeline when it leaks , input the leakage parameter characterization model The fully connected neural network structure , generating The first concentration field implicit space vector at the moment ; in, ; For the The fully connected neural network structure a weight matrix in the leakage parameter standard model; For the The fully connected neural network structure The bias vector of is the activation function; .
3. The parameterized oil and gas pipeline leakage diffusion prediction self-correction method according to claim 1 is characterized in that: Step S102 includes: According to the concentration field sample data obtained by the leakage and diffusion simulation of the oil and gas pipeline, the constructed concentration field dimensionality reduction model based on the variational autoencoder is trained; Based on the trained concentration field dimensionality reduction model, the concentration field sample data is converted into a concentration field latent space sample vector to generate a dimensionality reduction sample data set of the natural gas concentration field when the oil and gas pipeline leaks; According to the dimension reduction sample data set, the constructed autoregressive prediction model based on TimesNet is trained.
4. The parameterized oil and gas pipeline leakage diffusion prediction self-correction method according to claim 3 is characterized in that: The concentration field dimensionality reduction model based on the training is used to convert the concentration field sample data into a concentration field latent space sample vector to generate a dimensionality reduction sample data set of the natural gas concentration field when the oil and gas pipeline leaks, specifically: The plurality of concentration field sample data are respectively input into the encoder of the variational autoencoder based on the convolutional neural network, according to the formula: ; conduct The convolution operation is performed on the first Layer convolution operation The resulting convolution vector Input the fully connected layer of the encoder of the variational autoencoder , and obtain the concentration field hidden space sample vector The mean ; and, Layer convolution operation The resulting convolution vector Input the fully connected layer of the encoder of the variational autoencoder , and obtain the concentration field hidden space sample vector Variance ; According to the formula: ; Correspondingly generate multiple concentration field hidden space sample vectors , to form the dimension reduction sample data set; in, is a nonlinear activation function, Indicates that the concentration field sample data is processed Layer convolution operation; is the bias vector of the convolutional neural network in the encoder of the variational autoencoder; are all integers, ; For the The concentration field sample data; , is a positive integer; is a noise vector that follows a standard normal distribution.
5. The parameterized oil and gas pipeline leakage diffusion prediction self-correction method according to claim 3 is characterized in that: In step S102, Based on the trained autoregressive prediction model, according to the oil and gas pipeline leakage a first concentration field latent space vector at a moment, performing time series prediction on the concentration field when the oil and gas pipeline leaks, and obtaining a first predicted concentration field latent space vector when the oil and gas pipeline leaks; Based on the concentration field dimensionality reduction model, a first predicted time series concentration field in a future time period when the oil and gas pipeline leaks is generated according to the first predicted concentration field latent space vector when the oil and gas pipeline leaks.
6. The parameterized oil and gas pipeline leakage diffusion prediction self-correction method according to claim 5 is characterized in that: The first predicted time series concentration field in the future time period when the oil and gas pipeline leaks is generated based on the concentration field dimension reduction model according to the first predicted concentration field latent space vector when the oil and gas pipeline leaks, specifically: The decoder of the variational autoencoder based on the convolutional neural network is as follows: ; The first predicted concentration field implicit space vector of the oil and gas pipeline leakage Reconstructing to generate a first predicted time series concentration field in a future time period when the oil and gas pipeline leaks; in, is a nonlinear activation function, Indicates Layer input vector Conduct the Layer deconvolution operation; is the bias vector of the convolutional neural network in the decoder of the variational autoencoder; For the Layer deconvolution operation The output, For the Layer deconvolution operation Output: is an integer.
7. The parameterized oil and gas pipeline leakage diffusion prediction self-correction method according to claim 1 is characterized in that: In step S103, the concentration field measured data when the oil and gas pipeline leaks and The concentration field prediction data at the time point are fused to obtain the mixed concentration field data when the oil and gas pipeline leaks, specifically: Repair the concentration field measured data when the oil and gas pipeline leaks to generate uniformly discrete repaired concentration field measured data when the oil and gas pipeline leaks ; Based on the conditional adversarial network, according to the formula: ; The measured data of the repair concentration field and The concentration field prediction data at time Fusion is performed to obtain the mixed concentration field data when the oil and gas pipeline leaks ; In the formula, is a nonlinear activation function, represents the deconvolution operation, represents the weighted summation of data features. Represents the measured data of the repair concentration field Perform convolution operation, Represents the concentration field prediction data Perform convolution operation.
8. The parameterized oil and gas pipeline leakage diffusion prediction self-correction method according to claim 1 is characterized in that: In step S104, An encoder based on a concentration field dimension reduction model of a variational autoencoder performs dimension reduction on the mixed concentration field data to obtain a latent space vector of the mixed concentration field.
9. The parameterized oil and gas pipeline leakage diffusion prediction self-correction method according to claim 1 is characterized in that: In step S104, use The corrected concentration field latent space vector in the time period replaces the first predicted concentration field latent space vector The latent space vector of the time period is used to generate the second predicted concentration field latent space vector when the oil and gas pipeline leaks; The decoder of the concentration field dimensionality reduction model based on the variational autoencoder reconstructs and restores the second predicted concentration field latent space vector to generate a second predicted time series concentration field in the future time period when the oil and gas pipeline leaks.
10. A parameterized oil and gas pipeline leakage diffusion prediction and correction system, characterized in that: include: Latent space generation unit, configured based on A leakage parameter characterization model of a fully connected neural network is used to generate the leakage parameters of the oil and gas pipeline according to the leakage parameters of the oil and gas pipeline. The first concentration field latent space vector at the moment; among them, is a natural number; The autoregressive prediction unit is configured to predict the oil and gas pipeline according to the previous The first concentration field latent space vector at a moment, based on a pre-built autoregressive prediction model, performs time series prediction on the concentration field when the oil and gas pipeline leaks, and obtains the first predicted concentration field latent space vector when the oil and gas pipeline leaks, so as to generate the first predicted time series concentration field in the future time period when the oil and gas pipeline leaks; A data fusion unit is configured to respond to the first predicted time series concentration field The concentration field prediction data at the time is compared with the leakage diffusion simulation data of the oil and gas pipeline. The relative error of the concentration field sample data at the time is greater than or equal to the preset error threshold, and the concentration field measured data when the oil and gas pipeline leaks and The concentration field prediction data at the time instant are merged to obtain mixed concentration field data when the oil and gas pipeline leaks; The prediction and correction unit is configured to input the latent space vector of the mixed concentration field obtained by reducing the dimension of the mixed concentration field data and the leakage parameters of the oil and gas pipeline when leaking into the latent space dynamic prediction model based on TimesNet, and use the output of the oil and gas pipeline leakage time The corrected concentration field latent space vector in the time period replaces the first predicted concentration field latent space vector The latent space vector of the time period is used to obtain the second predicted time series concentration field in the future time period when the oil and gas pipeline leaks.
Citation Information
Patent Citations
Organic gas leakage diffusion real-time intelligent early warning method considering uncertainty reasoning
CN113962164A
Natural gas pipeline network leakage early warning method based on machine learning method
CN113987908A