Natural gas pipeline leakage probability calculation method and system based on genetic algorithm
By using a genetic algorithm-based method, combined with the coupled analysis of pipeline structure dynamic stress, material fatigue and corrosion damage models, the problem of the existing technology failing to fully consider the coupling of multiple factors was solved, and the accurate assessment and dynamic prediction of natural gas pipeline leakage risks were achieved, thereby improving the safety of pipeline operation.
Patent Information
- Application Number
- CN202510246830.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-04
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2045-03-04
AI Technical Summary
Existing methods for calculating the probability of natural gas pipeline leakage fail to fully consider the coupling between factors such as pipeline structural stress, material fatigue, and environmental corrosion. They rely on expert experience and lack an adaptive optimization mechanism, resulting in deviations between the calculated results and the actual situation and reducing the accuracy and timeliness of risk assessment.
A genetic algorithm-based method is used to establish a pipeline structure dynamic stress model, material fatigue model, and corrosion damage model by collecting pipeline operation parameters, conduct coupling analysis, and construct a risk assessment parameter matrix. A pipeline leakage probability calculation model is generated through an adaptive optimization mechanism, including adaptive weight adjustment and deep learning network model, to achieve dynamic assessment of pipeline leakage risks.
It improves the accuracy and reliability of pipeline leakage risk assessment, can adapt to the risk assessment needs under different working conditions, generate intuitive leakage risk distribution maps, provide a scientific basis for pipeline operation and maintenance, and improve pipeline operation safety.
Smart Images

Figure CN120125035B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to probability calculation technology, and in particular to a natural gas pipeline leakage probability calculation method and system based on genetic algorithm. Background Art
[0002] As the natural gas pipeline network continues to expand and the operating environment becomes increasingly complex, pipeline leaks are a common occurrence. Pipeline leak risk assessment is a crucial tool for ensuring safe pipeline operation, and its core is the accurate calculation of leak probability. Traditional methods for calculating leak probability rely primarily on historical data statistics and expert experience, using simple mathematical models to predict leak risk.
[0003] Existing methods for calculating the probability of natural gas pipeline leakage have the following shortcomings: First, existing methods often analyze factors such as pipeline structural stress, material fatigue, and environmental corrosion separately, failing to fully consider the coupling effects between these factors, resulting in significant deviations between the calculated results and actual conditions. Second, traditional methods overly rely on expert experience when establishing risk assessment models, which is highly subjective and difficult to accurately reflect the changing patterns of risk under the actual operating conditions of the pipeline. Third, existing calculation methods lack adaptive optimization mechanisms and are unable to dynamically adjust model parameters based on real-time monitoring data, reducing the accuracy and timeliness of risk assessments.
[0004] In order to overcome the above technical problems, it is necessary to develop a new pipeline leakage probability calculation method. This method should be able to comprehensively consider the coupling effects of multiple influencing factors, establish an objective risk assessment model, and have adaptive optimization capabilities, thereby improving the accuracy and reliability of pipeline leakage risk assessment. Summary of the Invention
[0005] The embodiments of the present invention provide a method and system for calculating the probability of leakage of a natural gas pipeline based on a genetic algorithm, which can solve the problems in the prior art.
[0006] According to a first aspect of the embodiments of the present invention,
[0007] Provides a natural gas pipeline leakage probability calculation method based on genetic algorithm, including:
[0008] Collecting operating parameters of the natural gas pipeline, including the pressure difference between the inside and outside of the pipeline, the pipeline wall temperature gradient, the real-time change value of the pipeline wall thickness, the pipeline material stress-strain curve, the pipeline service fatigue cycle, the soil corrosion activity, and the environmental medium permeability; establishing a pipeline structure dynamic stress model based on the pressure difference between the inside and outside of the pipeline, the pipeline wall temperature gradient, and the real-time change value of the pipeline wall thickness; establishing a material fatigue model based on the pipeline material stress-strain curve and the pipeline service fatigue cycle; and constructing a corrosion damage model based on the soil corrosion activity and the environmental medium permeability;
[0009] A coupling analysis is performed on the pipeline structure dynamic stress model, the material fatigue model, and the corrosion damage model to obtain a first risk assessment parameter matrix, wherein the first risk assessment parameter matrix includes stress distribution parameters, fatigue damage parameters, and corrosion rate parameters; an initial pipeline leakage risk assessment model is established based on the first risk assessment parameter matrix; the initial pipeline leakage risk assessment model is used as a fitness function; the stress distribution parameters, the corrosion rate parameters, and the material degradation parameters in the first risk assessment parameter matrix are encoded as chromosomes, and the chromosomes are operated to obtain a progeny population;
[0010] The method includes calculating the fitness value of each chromosome in the offspring population based on the fitness function, selecting the chromosome with the highest fitness value, and decoding the chromosome with the highest fitness value to obtain a second risk assessment parameter matrix; establishing a pipeline leakage probability calculation model based on the second risk assessment parameter matrix; collecting the operating parameters of the target pipeline segment; inputting the operating parameters of the target pipeline segment into the pipeline leakage probability calculation model to obtain a third risk assessment parameter matrix for the target pipeline segment; calculating a leakage probability prediction value of the target pipeline segment based on the third risk assessment parameter matrix; and classifying the target pipeline segment into risk levels based on the leakage probability prediction value to generate a pipeline leakage risk distribution map.
[0011] The coupling analysis of the pipeline structure dynamic stress model, the material fatigue model, and the corrosion damage model to obtain a first risk assessment parameter matrix includes:
[0012] The pipeline is divided into a plurality of grid units along the axial direction, and a stress collection point, a corrosion monitoring point, and a fatigue detection point are set in each grid unit; the soil corrosion activity and the environmental medium permeability of each grid unit are obtained, and an electrochemical corrosion equation is established; the corrosion depth increment of each grid unit is calculated according to the electrochemical corrosion equation; the corrosion depth increment is nonlinearly superimposed with the real-time change value of the pipeline wall thickness to obtain a pipeline wall thickness correction value for each grid unit; and the pipeline wall thickness correction value is used as an input parameter of the pipeline structure dynamic stress model;
[0013] Substituting the pipeline wall thickness correction value, the pressure difference between the inside and outside of the pipeline, and the pipeline wall temperature gradient into the pipeline structure dynamic stress model to obtain stress distribution parameters of the stress collection point in each grid unit, wherein the stress distribution parameters include axial stress, hoop stress, and radial stress; substituting the stress distribution parameters, the pipeline material stress-strain curve, and the pipeline service fatigue cycle into the material fatigue model to obtain fatigue damage parameters of the fatigue detection point in each grid unit, wherein the fatigue damage parameters include fatigue crack initiation rate and fatigue damage accumulation value; substituting the fatigue damage parameters, the soil corrosion activity, and the environmental medium permeability into the corrosion damage model to obtain corrosion rate parameters of the corrosion monitoring point in each grid unit, wherein the corrosion rate parameters include corrosion current density and corrosion depth change rate;
[0014] A coupled response equation group of the pipeline structure dynamic stress model, the material fatigue model, and the corrosion damage model is established; the stress distribution parameter, the fatigue damage parameter, and the corrosion rate parameter in each grid unit are substituted into the coupled response equation group for iterative calculation until the parameter change between two adjacent iterative calculations is less than a preset threshold; the stress distribution parameter, the fatigue damage parameter, and the corrosion rate parameter that have finally converged in the iterative calculation are arranged in order of the grid unit numbers to obtain a first risk assessment parameter matrix.
[0015] The step of establishing an initial pipeline leakage risk assessment model according to the first risk assessment parameter matrix includes:
[0016] Adaptively partitioning the first risk assessment parameter matrix, dividing the pipeline into multiple risk assessment units based on spatial autocorrelation analysis, and calculating the spatial correlation of parameters within each risk assessment unit; constructing a parameter importance evaluation index system, which includes parameter fluctuation amplitude, parameter change trend, and parameter spatial correlation; and using a fuzzy hierarchical analysis method to rank the importance of parameters in each risk assessment unit and determine a parameter weight coefficient matrix;
[0017] Based on the parameter weight coefficient matrix, key influencing parameters are screened from a historical leakage accident database, and pipeline failure evolution feature sequences corresponding to the key influencing parameters are extracted, wherein the pipeline failure evolution feature sequence includes stress distribution time series data, fatigue damage time series data, and corrosion rate time series data before the leakage occurs; a deep learning network model is constructed, wherein the number of input layer nodes of the deep learning network model is equal to the number of the key influencing parameters; the pipeline failure evolution feature sequence is input into the deep learning network model, and a risk feature extraction model is obtained through training;
[0018] The parameter weight coefficient matrix of each risk assessment unit is combined with the risk feature extraction model to construct a dynamic risk assessment function; the risk warning index of each risk assessment unit is calculated based on the dynamic risk assessment function; a mapping relationship is established among the risk warning index, the parameter weight coefficient matrix, and the risk feature extraction model to construct a risk state transition probability matrix; a risk warning threshold is designed according to the risk state transition probability matrix, and the risk warning threshold is divided into multiple warning level intervals; the risk state transition probability matrix, the risk warning threshold, the warning level interval, and the corresponding assessment parameters and calculation methods are integrated into an initial model for pipeline leakage risk assessment.
[0019] The step of encoding the stress distribution parameter, the corrosion rate parameter, and the material degradation parameter in the first risk assessment parameter matrix into chromosomes and operating the chromosomes to obtain a progeny population includes:
[0020] Performing data preprocessing on the stress distribution parameters, the corrosion rate parameters, and the material degradation parameters in the first risk assessment parameter matrix, using a standard deviation normalization method to eliminate dimensional effects, using a wavelet transform to remove parameter noise, and using a kernel density estimation method to correct outliers to obtain a standardized parameter matrix; establishing parameter statistical characteristics based on the standardized parameter matrix; constructing a parameter distribution model using the parameter statistical characteristics; constructing a parameter correlation network based on the standardized parameter matrix and the parameter distribution model, and calculating the Pearson correlation coefficient between parameters; calculating the Spearman rank correlation coefficient based on the parameter statistical characteristics; and calculating the mutual information coefficient based on the parameter distribution model;
[0021] The Pearson correlation coefficient, Spearman rank correlation coefficient and mutual information coefficient are weighted and combined to generate a comprehensive parameter correlation evaluation index; a parameter correlation matrix is constructed based on the comprehensive parameter correlation evaluation index, and the parameter correlation matrix is divided into blocks using a spectral clustering algorithm to identify highly correlated parameter groups; a parameter optimization objective function is constructed based on the parameter correlation matrix, and the redundancy of the highly correlated parameter group is used as the first optimization objective, the discrete degree of the parameter statistical characteristics is used as the second optimization objective, and the fitting error of the parameter distribution model is used as the third optimization objective; the parameter optimization objective function is normalized, and the objective function weight coefficient is calculated based on the comprehensive parameter correlation evaluation index; and a weighted Chebyshev method is used to convert a multi-objective optimization problem into a single-objective optimization problem;
[0022] An adaptive weight adjustment model is constructed based on the objective function weight coefficient, and the adaptive weight adjustment model dynamically updates the weight coefficient according to the parameter correlation matrix; the parameter values in the standardized parameter matrix are converted into binary code according to the adaptive weight coefficient, and a Gray code encoding scheme is used to improve encoding efficiency; a chromosome structure is constructed according to the binary code, and an initial chromosome population that meets the constraint conditions is randomly generated based on the chromosome structure; and the initial chromosome population is operated to obtain an offspring population.
[0023] The operating the initial chromosome population to obtain a progeny population includes:
[0024] Performing a Pareto non-dominated sort on the initial chromosome population, calculating the crowding distance of each chromosome individual, constructing a selection operator based on the crowding distance, wherein the selection probability of the selection operator is proportional to the individual crowding distance; performing a selection operation on the initial chromosome population using the selection operator to obtain a first offspring population;
[0025] Dynamically determine the crossover position of chromosome individuals in the first progeny population, set a crossover probability adaptive adjustment factor based on the coupling degree between parameters, and dynamically update the crossover probability adaptive adjustment factor as the population evolves; perform a multi-point crossover operation on the first progeny population based on the crossover probability adaptive adjustment factor to obtain a second progeny population; calculate the parameter sensitivity of chromosome individuals in the second progeny population, and construct a parameter variation probability model. The parameter variation probability model assigns a preset variation probability to gene positions with high parameter sensitivity;
[0026] A non-uniform mutation operation is performed on the second offspring population according to the parameter mutation probability model, and the variation asynchrony of the non-uniform mutation operation decays exponentially with the number of evolution generations, thereby obtaining a third offspring population; the third offspring population is decoded into optimized stress distribution parameters, corrosion rate parameters, and material degradation parameters, and the optimization effect is evaluated based on the parameter optimization objective function; when the non-dominated solution sets of multiple consecutive generations of populations converge and are evenly distributed, the Pareto optimal solution set is output to obtain the optimal parameter combination.
[0027] Calculating the fitness value of each chromosome in the offspring population based on the fitness function, selecting the chromosome with the highest fitness value, decoding the chromosome with the highest fitness value to obtain a second risk assessment parameter matrix; and establishing a pipeline leakage probability calculation model based on the second risk assessment parameter matrix, including:
[0028] Based on the fitness function, a multi-objective evaluation method is used to construct a hierarchical fitness calculation framework, which includes a basic evaluation layer, a cross-validation layer, and a comprehensive evaluation layer; each chromosome in the offspring population is input into the hierarchical fitness calculation framework, and a chromosome feature vector is constructed using the basic evaluation layer. The chromosome is subjected to parameter matching calculation, prediction accuracy calculation, and computational efficiency calculation to obtain a calculation result; the chromosome feature vector and the calculation result are input into the cross-validation layer, and an iterative verification operation is performed using the verification model to obtain a verification result; a nonlinear weighted calculation is performed on the verification result in combination with a dynamic optimization matrix of weight coefficients, a chromosome feature mapping network is constructed, and a chromosome fitness value sequence and a feature association matrix are output;
[0029] A chromosome optimization mechanism is constructed using a tournament selection strategy. Population parameters are calculated based on the characteristic association matrix, and an adaptive competition radius is set. The chromosome fitness value sequence is input into the competition mechanism, and the fitness value, number of iterations, and parameter stability index of the competing chromosomes are calculated to form a comprehensive evaluation vector. A multi-objective optimization function is constructed, and a multi-objective sorting operation is performed on the chromosomes according to the Pareto dominance relationship to establish a non-dominated solution set. The chromosome fitness is evaluated in the non-dominated solution set based on the characteristic mapping network, and the chromosome with the highest fitness value is selected.
[0030] A feature decoupling unit, an accuracy adjustment unit, and a parameter reconstruction unit are set up in a multi-level decoding conversion network; the chromosome with the highest fitness value and the feature association matrix are input into the feature decoupling unit, and the feature separation is performed using a variational inference method; a decoding accuracy calculation model is constructed using the chromosome feature vector, and the decoding accuracy is calculated through the accuracy adjustment unit; the decoding accuracy is input into the parameter reconstruction unit, and a deep neural network is used for parameter mapping, and the parameters are corrected in combination with the weight coefficient dynamic optimization matrix to generate a second risk assessment parameter matrix.
[0031] Inputting the operating parameters of the target pipeline section into the pipeline leakage probability calculation model to obtain a third risk assessment parameter matrix of the target pipeline section includes:
[0032] Inputting the operating parameters of the target pipeline segment into a pipeline leakage probability calculation model, wherein the pipeline leakage probability calculation model includes an adaptive dynamic sampling network, a generative adversarial network, and a probabilistic representation learning network, wherein the adaptive dynamic sampling network includes a spatiotemporal attention module and a parameter reconstruction module; the spatiotemporal attention module uses a multi-head cross-attention mechanism to calculate a parameter weight matrix, constructs a parameter dependency graph based on the parameter weight matrix through an asynchronously updated hierarchical attention network, and constructs a parameter dimensionality reduction matrix based on the parameter dependency graph using a recursive tensor decomposition method;
[0033] The parameter reconstruction module inputs the parameter dimensionality reduction matrix into a generative adversarial network, which includes a generator and a discriminator. The generator generates reconstruction parameters based on the parameter weight matrix, and the discriminator calculates the distribution distance between the reconstruction parameters and the original parameters, optimizes the reconstruction parameters in combination with a cycle consistency constraint function, and generates a spatiotemporal feature sequence and a parameter reconstruction matrix; the spatiotemporal feature sequence and the parameter reconstruction matrix are input into a probabilistic representation learning network, and the probabilistic representation learning network adopts a variational inference framework to construct a random flow transformation model based on the parameter reconstruction matrix, and maps the parameter distribution to a standard normal distribution space to obtain a standardized feature matrix;
[0034] A hierarchical probability encoder is constructed based on the standardized feature matrix, and the hierarchical probability encoder includes a multi-layer latent variable model. Each layer of the latent variable model establishes a probability graph representation of the parameter distribution based on the spatiotemporal feature sequence, and an energy model is used to construct a parameter conditional probability matrix; a mutual information loss function is constructed based on the standardized feature matrix and the parameter conditional probability matrix, and the mutual information loss function includes a log-likelihood estimation term and a divergence constraint term. The conditional probability distribution is calculated based on the parameter conditional probability matrix, and the network parameters of the hierarchical probability encoder are iteratively optimized using a stochastic gradient variational inference algorithm to generate a third risk assessment parameter matrix.
[0035] A second aspect of an embodiment of the present invention provides a natural gas pipeline leakage probability calculation system based on a genetic algorithm, comprising:
[0036] The first unit is used to collect operating parameters of the natural gas pipeline, including the pressure difference between the inside and outside of the pipeline, the temperature gradient of the pipeline wall, the real-time change value of the pipeline wall thickness, the stress-strain curve of the pipeline material, the pipeline service fatigue cycle, the soil corrosion activity, and the permeability of the environmental medium; a pipeline structure dynamic stress model is established based on the pressure difference between the inside and outside of the pipeline, the temperature gradient of the pipeline wall, and the real-time change value of the pipeline wall thickness; a material fatigue model is established based on the stress-strain curve of the pipeline material and the pipeline service fatigue cycle; and a corrosion damage model is constructed based on the soil corrosion activity and the permeability of the environmental medium;
[0037] The second unit is configured to couple the pipeline structure dynamic stress model, the material fatigue model, and the corrosion damage model to obtain a first risk assessment parameter matrix, wherein the first risk assessment parameter matrix includes stress distribution parameters, fatigue damage parameters, and corrosion rate parameters; establish an initial pipeline leakage risk assessment model based on the first risk assessment parameter matrix; use the initial pipeline leakage risk assessment model as a fitness function; encode the stress distribution parameters, corrosion rate parameters, and material degradation parameters in the first risk assessment parameter matrix into chromosomes, and operate on the chromosomes to obtain a progeny population;
[0038] The third unit is configured to calculate the fitness value of each chromosome in the offspring population based on the fitness function, select the chromosome with the highest fitness value, and decode the chromosome with the highest fitness value to obtain a second risk assessment parameter matrix; establish a pipeline leakage probability calculation model based on the second risk assessment parameter matrix; collect the operating parameters of the target pipeline segment; input the operating parameters of the target pipeline segment into the pipeline leakage probability calculation model to obtain a third risk assessment parameter matrix for the target pipeline segment; calculate a leakage probability prediction value of the target pipeline segment based on the third risk assessment parameter matrix; and classify the target pipeline segment into risk levels based on the leakage probability prediction value to generate a pipeline leakage risk distribution map.
[0039] The third aspect of the embodiment of the present invention
[0040] An electronic device is provided, comprising:
[0041] processor;
[0042] a memory for storing processor-executable instructions;
[0043] The processor is configured to call the instructions stored in the memory to execute the aforementioned method.
[0044] According to a fourth aspect of the embodiments of the present invention,
[0045] A computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the method described above is implemented.
[0046] The beneficial effects of this application are as follows:
[0047] By establishing a pipeline structure dynamic stress model, a material fatigue model, and a corrosion damage model and coupling these models for analysis, the present invention can comprehensively consider the impact of various damage factors on the pipeline during service, thereby improving the accuracy and reliability of pipeline leakage risk assessment.
[0048] The present invention adopts a genetic algorithm to optimize the risk assessment parameters. Through chromosome encoding, genetic operations and fitness calculation, the optimal combination of risk assessment parameters can be found, so that the established pipeline leakage probability calculation model has strong adaptability and generalization ability, and can better meet the pipeline leakage risk assessment needs under different working conditions.
[0049] The present invention classifies the target pipeline section into risk levels based on the calculated leakage probability prediction value and generates a pipeline leakage risk distribution map, providing pipeline operation and maintenance personnel with intuitive risk assessment results, helping to promptly identify potential leakage risks, formulate targeted preventive measures, and improve pipeline operation safety. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 Schematic diagram of a flow chart of a method for calculating the probability of leakage of a natural gas pipeline based on a genetic algorithm according to an embodiment of the present invention;
[0051] Figure 2 Schematic diagram of the structure of a natural gas pipeline leakage probability calculation system based on a genetic algorithm according to an embodiment of the present invention. DETAILED DESCRIPTION
[0052] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0053] The following specific embodiments are used to describe the technical solution of the present invention in detail. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0054] Figure 1 FIG. 1 is a flow chart of a method for calculating the probability of leakage of a natural gas pipeline based on a genetic algorithm according to an embodiment of the present invention. Figure 1 As shown, the method includes:
[0055] S101. Collecting operating parameters of a natural gas pipeline, including the pressure difference between the inside and outside of the pipeline, the pipeline wall temperature gradient, the real-time change in pipeline wall thickness, the pipeline material stress-strain curve, the pipeline service fatigue cycle, the soil corrosion activity, and the ambient medium permeability; establishing a pipeline structure dynamic stress model based on the pressure difference between the inside and outside of the pipeline, the pipeline wall temperature gradient, and the real-time change in pipeline wall thickness; establishing a material fatigue model based on the pipeline material stress-strain curve and the pipeline service fatigue cycle; and constructing a corrosion damage model based on the soil corrosion activity and the ambient medium permeability;
[0056] S102. Couple the pipeline structure dynamic stress model, the material fatigue model, and the corrosion damage model to obtain a first risk assessment parameter matrix, which includes stress distribution parameters, fatigue damage parameters, and corrosion rate parameters. Establish an initial pipeline leakage risk assessment model based on the first risk assessment parameter matrix. Use the initial pipeline leakage risk assessment model as a fitness function. Encode the stress distribution parameters, corrosion rate parameters, and material degradation parameters in the first risk assessment parameter matrix into chromosomes, and operate on the chromosomes to obtain a progeny population.
[0057] S103. Calculate the fitness value of each chromosome in the offspring population based on the fitness function, select the chromosome with the highest fitness value, and decode the chromosome with the highest fitness value to obtain a second risk assessment parameter matrix; establish a pipeline leakage probability calculation model based on the second risk assessment parameter matrix; collect the operating parameters of the target pipeline segment; input the operating parameters of the target pipeline segment into the pipeline leakage probability calculation model to obtain a third risk assessment parameter matrix for the target pipeline segment; calculate the leakage probability prediction value of the target pipeline segment based on the third risk assessment parameter matrix; classify the target pipeline segment into risk levels based on the leakage probability prediction value, and generate a pipeline leakage risk distribution map.
[0058] In an optional embodiment, coupling analysis of the pipeline structure dynamic stress model, the material fatigue model, and the corrosion damage model to obtain a first risk assessment parameter matrix includes:
[0059] The pipeline is divided into a plurality of grid units along the axial direction, and a stress collection point, a corrosion monitoring point, and a fatigue detection point are set in each grid unit; the soil corrosion activity and the environmental medium permeability of each grid unit are obtained, and an electrochemical corrosion equation is established; the corrosion depth increment of each grid unit is calculated according to the electrochemical corrosion equation; the corrosion depth increment is nonlinearly superimposed with the real-time change value of the pipeline wall thickness to obtain a pipeline wall thickness correction value for each grid unit; and the pipeline wall thickness correction value is used as an input parameter of the pipeline structure dynamic stress model;
[0060] Substituting the pipeline wall thickness correction value, the pressure difference between the inside and outside of the pipeline, and the pipeline wall temperature gradient into the pipeline structure dynamic stress model to obtain stress distribution parameters of the stress collection point in each grid unit, wherein the stress distribution parameters include axial stress, hoop stress, and radial stress; substituting the stress distribution parameters, the pipeline material stress-strain curve, and the pipeline service fatigue cycle into the material fatigue model to obtain fatigue damage parameters of the fatigue detection point in each grid unit, wherein the fatigue damage parameters include fatigue crack initiation rate and fatigue damage accumulation value; substituting the fatigue damage parameters, the soil corrosion activity, and the environmental medium permeability into the corrosion damage model to obtain corrosion rate parameters of the corrosion monitoring point in each grid unit, wherein the corrosion rate parameters include corrosion current density and corrosion depth change rate;
[0061] A coupled response equation group of the pipeline structure dynamic stress model, the material fatigue model, and the corrosion damage model is established; the stress distribution parameter, the fatigue damage parameter, and the corrosion rate parameter in each grid unit are substituted into the coupled response equation group for iterative calculation until the parameter change between two adjacent iterative calculations is less than a preset threshold; the stress distribution parameter, the fatigue damage parameter, and the corrosion rate parameter that have finally converged in the iterative calculation are arranged in order of the grid unit numbers to obtain a first risk assessment parameter matrix.
[0062] First, the pipeline was gridded, with grid cells set every 50 centimeters along the pipeline axis. Within each grid cell, three stress collection points, two corrosion monitoring points, and two fatigue detection points were placed. Stress collection points were located on the inner wall, neutral layer, and outer wall of the pipeline; corrosion monitoring points were set at the interface between the outer wall and the soil; and fatigue detection points were placed in areas of stress concentration.
[0063] The soil corrosion activity at each grid cell was measured using a soil resistivity meter, with values ranging from 0 to 1, where higher values indicate greater corrosion. A permeability meter was used to measure the permeability of the ambient medium in millimeters per year. For a particular pipe section, the soil corrosion activity was measured to be 0.75, while the ambient permeability was 2.3 mm per year. A corrosion equation based on electrochemical principles was established, calculating the annual corrosion depth increment for this grid cell to be 0.8 mm.
[0064] The corrosion depth increment and the measured pipe wall thickness are dynamically updated. For a particular measurement point, the original wall thickness is 12 mm, and the corrected wall thickness after accounting for corrosion damage is 11.2 mm. This corrected wall thickness data is input into the pipeline structure dynamic stress model, along with the following operating parameters: internal pressure of 4.5 MPa, external pressure of 0.1 MPa, internal wall temperature of 65°C, and external wall temperature of 25°C.
[0065] Finite element analysis was used to calculate the stress distribution at the stress collection points: axial stress of 185 MPa, hoop stress of 210 MPa, and radial stress of 35 MPa. Combining the stress-strain curve of the X70 pipeline steel and the fatigue cycle of 15 years of actual operation, fatigue damage parameters were calculated: a fatigue crack initiation rate of 0.15 mm per year and a cumulative fatigue damage value of 0.45.
[0066] Substituting these parameters into the corrosion damage model yielded corrosion rate indicators for the corrosion monitoring point: a corrosion current density of 0.08 mA / cm² and a corrosion depth change rate of 0.9 mm / year. A coupled response system was established to account for the interaction between the stress, fatigue, and corrosion models, with an iterative convergence threshold set at 0.1%. After approximately 15 iterative calculations, the parameter change remained below the threshold, ultimately yielding the risk assessment parameters for that grid cell.
[0067] All measurement point data is organized in grid cell number order to form a risk assessment parameter matrix. The matrix dimension is the number of grid cells multiplied by the number of parameters. For a 1-kilometer pipeline section, there are 2,000 grid cells, each containing seven key parameters, resulting in a 2,000-row, 7-column risk assessment parameter matrix.
[0068] Beneficial effects:
[0069] Through grid-based dynamic monitoring and multi-model coupling analysis, accurate assessment of pipeline stress distribution, fatigue damage and corrosion rate under service conditions is achieved, providing reliable data support for pipeline integrity management.
[0070] A nonlinear superposition method is used to process corrosion depth increments and wall thickness changes, and the correction values are fed back to the stress model in real time, which improves the accuracy and timeliness of risk assessment and makes the assessment results more consistent with the actual service status of the pipeline.
[0071] A coupled response relationship among stress, fatigue and corrosion was established. Through iterative calculation, the convergence and stability of the evaluation parameters were ensured, forming a complete risk assessment parameter matrix, providing comprehensive technical support for the safe operation of the pipeline.
[0072] In an optional embodiment, establishing an initial pipeline leakage risk assessment model based on the first risk assessment parameter matrix includes:
[0073] Adaptively partitioning the first risk assessment parameter matrix, dividing the pipeline into multiple risk assessment units based on spatial autocorrelation analysis, and calculating the spatial correlation of parameters within each risk assessment unit; constructing a parameter importance evaluation index system, which includes parameter fluctuation amplitude, parameter change trend, and parameter spatial correlation; and using a fuzzy hierarchical analysis method to rank the importance of parameters in each risk assessment unit and determine a parameter weight coefficient matrix;
[0074] Based on the parameter weight coefficient matrix, key influencing parameters are screened from a historical leakage accident database, and pipeline failure evolution feature sequences corresponding to the key influencing parameters are extracted, wherein the pipeline failure evolution feature sequence includes stress distribution time series data, fatigue damage time series data, and corrosion rate time series data before the leakage occurs; a deep learning network model is constructed, wherein the number of input layer nodes of the deep learning network model is equal to the number of the key influencing parameters; the pipeline failure evolution feature sequence is input into the deep learning network model, and a risk feature extraction model is obtained through training;
[0075] The parameter weight coefficient matrix of each risk assessment unit is combined with the risk feature extraction model to construct a dynamic risk assessment function; the risk warning index of each risk assessment unit is calculated based on the dynamic risk assessment function; a mapping relationship is established among the risk warning index, the parameter weight coefficient matrix, and the risk feature extraction model to construct a risk state transition probability matrix; a risk warning threshold is designed according to the risk state transition probability matrix, and the risk warning threshold is divided into multiple warning level intervals; the risk state transition probability matrix, the risk warning threshold, the warning level interval, and the corresponding assessment parameters and calculation methods are integrated into an initial model for pipeline leakage risk assessment.
[0076] To establish the initial pipeline leakage risk assessment model, we first perform adaptive partitioning of the first risk assessment parameter matrix. Using spatial autocorrelation analysis, we divide the entire pipeline into several risk assessment units, each 500 meters long. For each risk assessment unit, we calculate the spatial correlation of internal parameters. For example, a 10-kilometer oil pipeline can be divided into 20 risk assessment units. Within each unit, we calculate the spatial correlation of key parameters such as pipeline wall thickness, operating pressure, and corrosion rate.
[0077] Subsequently, a parameter importance evaluation index system was constructed, encompassing three dimensions: parameter fluctuation amplitude, parameter change trend, and parameter spatial correlation. Parameter fluctuation amplitude reflects the range of parameter value variation, parameter change trend reflects the temporal variation of the parameter, and parameter spatial correlation indicates the degree of mutual influence of the parameters in their spatial distribution. The fuzzy analytic hierarchy process was used to rank the importance of each parameter and generate a parameter weight coefficient matrix.
[0078] Based on the obtained parameter weight coefficient matrix, key influencing parameters were screened from a historical leakage accident database containing 500 pipeline leakage accident cases that occurred within the past five years. The pipeline failure evolution feature sequences corresponding to these key influencing parameters were extracted, including stress distribution data for the 24 hours prior to the leak, fatigue damage data for the past 30 days, and corrosion rate data for the past 90 days. A deep learning network model was constructed with the number of input layer nodes equal to the number of screened key influencing parameters. The pipeline failure evolution feature sequences were input into the deep learning network for training, resulting in a risk feature extraction model.
[0079] The parameter weight coefficient matrix for each risk assessment unit is combined with the risk feature extraction model to construct a dynamic risk assessment function. This function can calculate the risk warning index for each risk assessment unit in real time. A mapping relationship is established between the risk warning index, the parameter weight coefficient matrix, and the risk feature extraction model to form a risk state transition probability matrix. Based on this matrix, risk warning thresholds are designed and divided into four warning level ranges: low risk, medium risk, high risk, and extremely high risk. Ultimately, all these elements are integrated into an initial pipeline leakage risk assessment model.
[0080] Beneficial effects:
[0081] Part I: Through adaptive partitioning and spatial autocorrelation analysis, a scientific division of pipeline risk assessment units was achieved, improving the accuracy and pertinence of risk assessments. The establishment of a parameter importance evaluation index system made the weight distribution of various parameters more reasonable, and the risk assessment results more objective and reliable.
[0082] Part II: Analyzing historical leak accident data using a deep learning network model effectively extracts pipeline failure evolution characteristics, enabling intelligent and automated risk warning. The construction of a dynamic risk assessment function makes the risk assessment process real-time and dynamic.
[0083] Part III: The establishment of a risk state transition probability matrix provides a reliable theoretical basis for risk early warning. The multi-level warning interval division makes risk early warning more refined, facilitating the timely identification of potential risks and the implementation of appropriate preventive measures. The entire assessment model is highly practical and scalable.
[0084] In an optional embodiment, encoding the stress distribution parameter, the corrosion rate parameter, and the material degradation parameter in the first risk assessment parameter matrix into chromosomes, and operating the chromosomes to obtain a progeny population includes:
[0085] Performing data preprocessing on the stress distribution parameters, the corrosion rate parameters, and the material degradation parameters in the first risk assessment parameter matrix, using a standard deviation normalization method to eliminate dimensional effects, using a wavelet transform to remove parameter noise, and using a kernel density estimation method to correct outliers to obtain a standardized parameter matrix; establishing parameter statistical characteristics based on the standardized parameter matrix; constructing a parameter distribution model using the parameter statistical characteristics; constructing a parameter correlation network based on the standardized parameter matrix and the parameter distribution model, and calculating the Pearson correlation coefficient between parameters; calculating the Spearman rank correlation coefficient based on the parameter statistical characteristics; and calculating the mutual information coefficient based on the parameter distribution model;
[0086] The Pearson correlation coefficient, Spearman rank correlation coefficient and mutual information coefficient are weighted and combined to generate a comprehensive parameter correlation evaluation index; a parameter correlation matrix is constructed based on the comprehensive parameter correlation evaluation index, and the parameter correlation matrix is divided into blocks using a spectral clustering algorithm to identify highly correlated parameter groups; a parameter optimization objective function is constructed based on the parameter correlation matrix, and the redundancy of the highly correlated parameter group is used as the first optimization objective, the discrete degree of the parameter statistical characteristics is used as the second optimization objective, and the fitting error of the parameter distribution model is used as the third optimization objective; the parameter optimization objective function is normalized, and the objective function weight coefficient is calculated based on the comprehensive parameter correlation evaluation index; and a weighted Chebyshev method is used to convert a multi-objective optimization problem into a single-objective optimization problem;
[0087] An adaptive weight adjustment model is constructed based on the objective function weight coefficient, and the adaptive weight adjustment model dynamically updates the weight coefficient according to the parameter correlation matrix; the parameter values in the standardized parameter matrix are converted into binary code according to the adaptive weight coefficient, and a Gray code encoding scheme is used to improve encoding efficiency; a chromosome structure is constructed according to the binary code, and an initial chromosome population that meets the constraint conditions is randomly generated based on the chromosome structure; and the initial chromosome population is operated to obtain an offspring population.
[0088] First, data preprocessing was performed on the stress distribution parameters, corrosion rate parameters, and material degradation parameters in the first risk assessment parameter matrix. Dimensional effects were eliminated through standard deviation normalization. Specifically, the raw data was subtracted from the mean and then divided by the standard deviation. For example, for the stress distribution parameters, the raw data were 320 MPa, 280 MPa, and 350 MPa. After normalization, standardized values such as 0.52, -0.86, and 1.24 were obtained.
[0089] Wavelet transform is used to remove parameter noise. The db4 wavelet basis function is selected and the standardized data is decomposed into 4 layers. The low-frequency coefficients are extracted and reconstructed to obtain the denoised signal. Taking the corrosion rate parameter as an example, there is high-frequency noise in the original data curve. After wavelet denoising, a smooth trend curve is obtained.
[0090] We used kernel density estimation to correct outliers, selecting a Gaussian kernel function with a bandwidth of 0.5. We then performed a probability density estimation on the data, correcting data points that deviated by three standard deviations to within the normal range. For example, an outlier value of 98 in the material degradation parameter was corrected to 85.
[0091] Statistical characteristics, including mean, variance, skewness, and kurtosis, are calculated based on the processed, standardized parameter matrix. When constructing a parameter distribution model, the optimal distribution type is determined through distribution fitting. For example, stress distribution parameters conform to a lognormal distribution, and corrosion rate parameters conform to a Weibull distribution.
[0092] When constructing the parameter correlation network, the Pearson correlation coefficient, Spearman rank correlation coefficient, and mutual information coefficient between the parameters were calculated. For the stress and corrosion rate parameters, the Pearson correlation coefficient was 0.82, the Spearman correlation coefficient was 0.79, and the mutual information coefficient was 0.65, indicating a strong correlation between the two.
[0093] The three correlation coefficients are weighted and combined, with weights of 0.4, 0.3, and 0.3 respectively, to generate a comprehensive correlation evaluation index. The spectral clustering algorithm is used to partition the correlation matrix into blocks, with the number of clusters set to 3, to identify highly correlated parameter groups.
[0094] A parameter optimization objective function was constructed, with the redundancy of the relevant parameter groups, the degree of statistical feature dispersion, and the distribution fitting error as optimization targets. An adaptive weight adjustment model was used to dynamically update the weight coefficients, with initial weights of 0.4, 0.3, and 0.3, and they were updated every 50 iterations based on the parameter correlation matrix.
[0095] Parameter values are binary-encoded, with each parameter represented by a 16-bit binary number. Gray code is used to improve encoding efficiency. 100 chromosomes are randomly generated as the initial population, with the chromosome length being the product of the number of parameters and the number of encoding bits. The offspring population is generated through crossover and mutation operations.
[0096] Beneficial effects:
[0097] By combining standard deviation normalization, wavelet denoising and kernel density estimation, efficient preprocessing of the original parameter data is achieved, significantly improving the data quality and reliability.
[0098] By adopting a variety of correlation measurement indicators and adaptive weight mechanisms, an accurate parameter association network was constructed, which effectively identified the complex relationship between parameters and provided a reliable basis for subsequent optimization.
[0099] Based on the statistical characteristics and distribution properties of parameters, a multi-objective optimization framework was designed. Combined with an improved coding scheme, efficient optimization of parameter groups was achieved, thereby improving the accuracy and reliability of risk assessment.
[0100] In an optional embodiment, the operating the initial chromosome population to obtain a progeny population includes:
[0101] Performing a Pareto non-dominated sort on the initial chromosome population, calculating the crowding distance of each chromosome individual, constructing a selection operator based on the crowding distance, wherein the selection probability of the selection operator is proportional to the individual crowding distance; performing a selection operation on the initial chromosome population using the selection operator to obtain a first offspring population;
[0102] Dynamically determine the crossover position of chromosome individuals in the first progeny population, set a crossover probability adaptive adjustment factor based on the coupling degree between parameters, and dynamically update the crossover probability adaptive adjustment factor as the population evolves; perform a multi-point crossover operation on the first progeny population based on the crossover probability adaptive adjustment factor to obtain a second progeny population; calculate the parameter sensitivity of chromosome individuals in the second progeny population, and construct a parameter variation probability model. The parameter variation probability model assigns a preset variation probability to gene positions with high parameter sensitivity;
[0103] A non-uniform mutation operation is performed on the second offspring population according to the parameter mutation probability model, and the variation asynchrony of the non-uniform mutation operation decays exponentially with the number of evolution generations, thereby obtaining a third offspring population; the third offspring population is decoded into optimized stress distribution parameters, corrosion rate parameters, and material degradation parameters, and the optimization effect is evaluated based on the parameter optimization objective function; when the non-dominated solution sets of multiple consecutive generations of populations converge and are evenly distributed, the Pareto optimal solution set is output to obtain the optimal parameter combination.
[0104] First, the initial chromosome population is Pareto-nondominated sorted. By comparing the objective function values of each individual in the population, the population is divided into different levels of nondominated solution sets. For an individual in the first-level nondominated solution set, no other individual outperforms it on all objectives. When calculating the crowding distance of each chromosome individual, for each objective function, individuals within the same level are sorted by the objective value and the normalized distance between adjacent individuals is calculated. The crowding distance of border individuals is set to infinity to ensure their selection. The selection probability of the selection operator is proportional to the individual crowding distance; individuals with larger crowding distances have a higher probability of being selected. Using a binary tournament selection method, high-quality individuals are selected from the initial population to form the first-generation population.
[0105] The crossover positions of the chromosome individuals in the first-generation offspring population are dynamically determined. The coupling between the parameters is first calculated, measured by the correlation coefficient between the parameters. Gene positions corresponding to strongly correlated parameters are set as crossover positions. The crossover probability adaptive adjustment factor is updated over the evolutionary generations, with an initial value of 0.9 and a decrease of 0.1 every 50 generations, reaching a minimum value of 0.6. A multi-point crossover operation is performed at the determined crossover positions to generate the second-generation offspring population.
[0106] Calculate the parameter sensitivity of individual chromosomes in the second-generation population. Using perturbation analysis, apply small perturbations to each parameter and observe how the objective function changes. If the objective function is sensitive to a parameter change, the corresponding gene position is assigned a higher probability of mutation, such as 0.1; otherwise, it is assigned a lower probability, such as 0.01.
[0107] The second-generation offspring population was subjected to non-uniform mutation according to a parameter mutation probability model. The step length decayed exponentially with the number of generations, starting at 20% of the parameter range and halving every 100 generations. The mutated third-generation offspring population was decoded into specific stress distribution parameters, corrosion rate parameters, and material degradation parameters. The optimization results were evaluated using a parameter optimization objective function, which included multiple objectives, such as maximizing structural reliability indicators and minimizing life prediction errors.
[0108] When the non-dominated solution sets of the population converge and are evenly distributed for 20 consecutive generations, that is, the number and distribution index of the solution sets do not change by more than 1%, the Pareto optimal solution set is output. From it, a set of compromise optimal parameter combinations is selected as the final optimization result.
[0109] Beneficial effects:
[0110] First, the selection operator based on crowding distance and the dynamic cross position determination strategy are adopted to improve the population diversity, avoid falling into the local optimal solution, and enhance the global search capability of the algorithm.
[0111] Secondly, the introduction of parameter sensitivity analysis and adaptive mutation probability model makes the optimization of important parameters more accurate and improves the local search capability and convergence speed of the algorithm.
[0112] Thirdly, by adopting non-uniform mutation and multi-objective optimization strategies, a series of balanced Pareto optimal solutions were obtained, which provides greater flexibility for parameter selection in engineering practice.
[0113] In an optional embodiment, the fitness value of each chromosome in the offspring population is calculated based on the fitness function, the chromosome with the highest fitness value is selected, and the chromosome with the highest fitness value is decoded to obtain a second risk assessment parameter matrix; and a pipeline leakage probability calculation model is established according to the second risk assessment parameter matrix, including:
[0114] Based on the fitness function, a multi-objective evaluation method is used to construct a hierarchical fitness calculation framework, which includes a basic evaluation layer, a cross-validation layer, and a comprehensive evaluation layer; each chromosome in the offspring population is input into the hierarchical fitness calculation framework, and a chromosome feature vector is constructed using the basic evaluation layer. The chromosome is subjected to parameter matching calculation, prediction accuracy calculation, and computational efficiency calculation to obtain a calculation result; the chromosome feature vector and the calculation result are input into the cross-validation layer, and an iterative verification operation is performed using the verification model to obtain a verification result; a nonlinear weighted calculation is performed on the verification result in combination with a dynamic optimization matrix of weight coefficients, a chromosome feature mapping network is constructed, and a chromosome fitness value sequence and a feature association matrix are output;
[0115] A chromosome optimization mechanism is constructed using a tournament selection strategy. Population parameters are calculated based on the characteristic association matrix, and an adaptive competition radius is set. The chromosome fitness value sequence is input into the competition mechanism, and the fitness value, number of iterations, and parameter stability index of the competing chromosomes are calculated to form a comprehensive evaluation vector. A multi-objective optimization function is constructed, and a multi-objective sorting operation is performed on the chromosomes according to the Pareto dominance relationship to establish a non-dominated solution set. The chromosome fitness is evaluated in the non-dominated solution set based on the characteristic mapping network, and the chromosome with the highest fitness value is selected.
[0116] A feature decoupling unit, an accuracy adjustment unit, and a parameter reconstruction unit are set up in a multi-level decoding conversion network; the chromosome with the highest fitness value and the feature association matrix are input into the feature decoupling unit, and the feature separation is performed using a variational inference method; a decoding accuracy calculation model is constructed using the chromosome feature vector, and the decoding accuracy is calculated through the accuracy adjustment unit; the decoding accuracy is input into the parameter reconstruction unit, and a deep neural network is used for parameter mapping, and the parameters are corrected in combination with the weight coefficient dynamic optimization matrix to generate a second risk assessment parameter matrix.
[0117] A pipeline leakage risk assessment method based on genetic algorithm achieves accurate risk assessment through multi-level fitness calculation and parameter optimization.
[0118] First, a hierarchical fitness calculation framework was constructed, consisting of three levels. In the basic evaluation layer, chromosome features were extracted. Parameter matching was calculated using a similarity calculation method, quantifying the difference between the chromosome encoding and the target parameters. Prediction accuracy was calculated using a cross-validation method, which divided the sample data into training and test sets and calculated the error between the predicted results and the actual values. Computational efficiency was evaluated by recording the algorithm's runtime and resource consumption. In implementation, the sample data was split into an 8:2 ratio, using a 5-fold cross-validation approach.
[0119] In the cross-validation layer, the validation model uses an ensemble learning strategy, combining the predictions of multiple base models. Dynamic optimization of weight coefficients uses an adaptive approach, dynamically adjusting weights based on the performance of each model. For example, if a model performs well in the most recent validation, its weight coefficient is increased accordingly. The feature mapping network uses a multi-layer perceptron architecture, and the number of hidden layer nodes can be set to twice the number of input layer nodes.
[0120] In the tournament selection strategy, the competition radius is dynamically adjusted based on population diversity, with an initial value set at 20% of the population size. When constructing the comprehensive evaluation vector, the weights of fitness, number of iterations, and parameter stability are set at a ratio of 4:3:3. Multi-objective sorting uses a fast non-dominated sorting algorithm, which determines the chromosome rank by calculating the dominating and dominated sets.
[0121] In the multi-stage decoding and transformation network, the feature decoupling unit uses a variational autoencoder structure to map chromosome encodings to a latent variable space. The precision adjustment unit improves decoding accuracy through a residual connection mechanism, with an adaptive learning rate dynamically adjusted between 0.001 and 0.0001. The parameter reconstruction unit uses a deep neural network with four hidden layers, with 256, 128, 64, and 32 nodes per layer, respectively, and uses the ReLU activation function.
[0122] Data example: Consider a sample of 1,000 pipeline parameter data, including pipe diameter, pressure, and temperature. After genetic algorithm optimization, the prediction accuracy reaches over 95%, with calculation time under 30 seconds. The resulting risk assessment parameter matrix includes key indicators such as leak probability, impact range, and loss severity.
[0123] Beneficial effects:
[0124] Part 1: Through the hierarchical fitness calculation framework, the organic combination of multi-dimensional evaluation indicators is achieved, the accuracy and reliability of parameter optimization are improved, and the risk assessment results are made more objective and comprehensive.
[0125] Part II: The tournament selection strategy and multi-objective optimization method are used to effectively avoid local optimal solutions, enhance the global search capability of the algorithm, and ensure the optimality of risk assessment parameters.
[0126] Part III: The design of a multi-level decoding transformation network solves the problem of accuracy loss in the parameter reconstruction process, improves the stability and applicability of the risk assessment model, and makes the assessment results more accurate and reliable.
[0127] In an optional embodiment, inputting the operating parameters of the target pipeline segment into the pipeline leakage probability calculation model to obtain a third risk assessment parameter matrix for the target pipeline segment includes:
[0128] Inputting the operating parameters of the target pipeline segment into a pipeline leakage probability calculation model, wherein the pipeline leakage probability calculation model includes an adaptive dynamic sampling network, a generative adversarial network, and a probabilistic representation learning network, wherein the adaptive dynamic sampling network includes a spatiotemporal attention module and a parameter reconstruction module; the spatiotemporal attention module uses a multi-head cross-attention mechanism to calculate a parameter weight matrix, constructs a parameter dependency graph based on the parameter weight matrix through an asynchronously updated hierarchical attention network, and constructs a parameter dimensionality reduction matrix based on the parameter dependency graph using a recursive tensor decomposition method;
[0129] The parameter reconstruction module inputs the parameter dimensionality reduction matrix into a generative adversarial network, which includes a generator and a discriminator. The generator generates reconstruction parameters based on the parameter weight matrix, and the discriminator calculates the distribution distance between the reconstruction parameters and the original parameters, optimizes the reconstruction parameters in combination with a cycle consistency constraint function, and generates a spatiotemporal feature sequence and a parameter reconstruction matrix; the spatiotemporal feature sequence and the parameter reconstruction matrix are input into a probabilistic representation learning network, and the probabilistic representation learning network adopts a variational inference framework to construct a random flow transformation model based on the parameter reconstruction matrix, and maps the parameter distribution to a standard normal distribution space to obtain a standardized feature matrix;
[0130] A hierarchical probability encoder is constructed based on the standardized feature matrix, and the hierarchical probability encoder includes a multi-layer latent variable model. Each layer of the latent variable model establishes a probability graph representation of the parameter distribution based on the spatiotemporal feature sequence, and an energy model is used to construct a parameter conditional probability matrix; a mutual information loss function is constructed based on the standardized feature matrix and the parameter conditional probability matrix, and the mutual information loss function includes a log-likelihood estimation term and a divergence constraint term. The conditional probability distribution is calculated based on the parameter conditional probability matrix, and the network parameters of the hierarchical probability encoder are iteratively optimized using a stochastic gradient variational inference algorithm to generate a third risk assessment parameter matrix.
[0131] First, the operating parameters of the target pipeline segment are collected and preprocessed. These parameters include key data such as pipeline pressure, temperature, flow rate, and medium composition. These parameters are collected in real time through a sensor network and the data is standardized.
[0132] In the adaptive dynamic sampling network, the spatiotemporal attention module first constructs a multi-head cross-attention mechanism. For each parameter, eight attention heads are set, each of which independently calculates the association weights between parameters. For example, the association weight between pressure and temperature is 0.75, and the association weight with flow rate is 0.62. Based on these weights, a parameter dependency graph is constructed to reflect the mutual influence between parameters. Then, a recursive tensor decomposition method is used to reduce the high-dimensional parameter space to a suitable dimension, such as reducing the original 100-dimensional parameter space to a 20-dimensional representation.
[0133] The Generative Adversarial Network (GAN) in the parameter reconstruction module consists of two core components: a generator and a discriminator. The generator receives the reduced parameter matrix and generates reconstructed parameters through a multi-layer neural network. The discriminator calculates the distribution distance between the reconstructed parameters and the original parameters. When the distance exceeds a preset threshold of 0.1, parameter optimization is triggered. Cycle consistency constraints are introduced during the optimization process to ensure that the reconstructed parameters have similar spatiotemporal distribution characteristics to the original parameters.
[0134] The probabilistic representation learning network uses a variational inference framework to process the reconstructed parameters. The parameter distribution is mapped to the standard normal distribution space via a random flow transformation model, generating a standardized feature matrix. For example, the pressure parameter is mapped from its original distribution to a normal distribution with mean 0 and variance 1.
[0135] The hierarchical probabilistic encoder employs a three-layer latent variable model structure. Each layer constructs a probabilistic graph representation based on a spatiotemporal feature sequence, characterizing the conditional dependencies between parameters. The parameter conditional probability matrix is calculated using an energy model. For example, given a temperature of 50°C, the conditional probability of a pressure parameter taking a value of 5 MPa is 0.8.
[0136] Finally, the network parameters are optimized based on the mutual information loss function. This loss function includes a log-likelihood estimation term and a divergence constraint term. The network parameters are iteratively optimized using a stochastic gradient variational inference algorithm, ultimately generating a third risk assessment parameter matrix. This matrix includes risk indicators such as pipeline leakage probability and hazard severity.
[0137] Beneficial effects:
[0138] Intelligent dimensionality reduction and feature extraction of pipeline operation parameters are achieved through an adaptive dynamic sampling network, which effectively reduces data redundancy, improves computational efficiency, and makes the risk assessment process more efficient and accurate.
[0139] By combining adversarial generative networks and probabilistic representation learning networks, accurate modeling and probabilistic representation of parameter distribution are achieved, overcoming the problem of insufficient modeling ability of traditional methods for complex nonlinear relationships and improving the accuracy of risk assessment.
[0140] The multi-layer latent variable model constructed based on the hierarchical probability encoder can effectively capture the deep dependencies between parameters, realize the dynamic adaptation of the risk assessment process, and improve the reliability and robustness of the assessment results.
[0141] Figure 2 FIG. 1 is a schematic diagram of a natural gas pipeline leakage probability calculation system based on a genetic algorithm according to an embodiment of the present invention. Figure 2 As shown, the system includes:
[0142] The first unit is used to collect operating parameters of the natural gas pipeline, including the pressure difference between the inside and outside of the pipeline, the temperature gradient of the pipeline wall, the real-time change value of the pipeline wall thickness, the stress-strain curve of the pipeline material, the pipeline service fatigue cycle, the soil corrosion activity, and the permeability of the environmental medium; a pipeline structure dynamic stress model is established based on the pressure difference between the inside and outside of the pipeline, the temperature gradient of the pipeline wall, and the real-time change value of the pipeline wall thickness; a material fatigue model is established based on the stress-strain curve of the pipeline material and the pipeline service fatigue cycle; and a corrosion damage model is constructed based on the soil corrosion activity and the permeability of the environmental medium;
[0143] The second unit is configured to couple the pipeline structure dynamic stress model, the material fatigue model, and the corrosion damage model to obtain a first risk assessment parameter matrix, wherein the first risk assessment parameter matrix includes stress distribution parameters, fatigue damage parameters, and corrosion rate parameters; establish an initial pipeline leakage risk assessment model based on the first risk assessment parameter matrix; use the initial pipeline leakage risk assessment model as a fitness function; encode the stress distribution parameters, corrosion rate parameters, and material degradation parameters in the first risk assessment parameter matrix into chromosomes, and operate on the chromosomes to obtain a progeny population;
[0144] The third unit is configured to calculate the fitness value of each chromosome in the offspring population based on the fitness function, select the chromosome with the highest fitness value, and decode the chromosome with the highest fitness value to obtain a second risk assessment parameter matrix; establish a pipeline leakage probability calculation model based on the second risk assessment parameter matrix; collect the operating parameters of the target pipeline segment; input the operating parameters of the target pipeline segment into the pipeline leakage probability calculation model to obtain a third risk assessment parameter matrix for the target pipeline segment; calculate a leakage probability prediction value of the target pipeline segment based on the third risk assessment parameter matrix; and classify the target pipeline segment into risk levels based on the leakage probability prediction value to generate a pipeline leakage risk distribution map.
[0145] According to a third aspect of the embodiments of the present invention,
[0146] An electronic device is provided, comprising:
[0147] processor;
[0148] a memory for storing processor-executable instructions;
[0149] The processor is configured to call the instructions stored in the memory to execute the aforementioned method.
[0150] According to a fourth aspect of the embodiments of the present invention,
[0151] A computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the method described above is implemented.
[0152] The present invention may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present invention.
[0153] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for calculating the probability of leakage of a natural gas pipeline based on a genetic algorithm, characterized in that: include: Collecting operating parameters of the natural gas pipeline, including the pressure difference between the inside and outside of the pipeline, the pipeline wall temperature gradient, the real-time change value of the pipeline wall thickness, the pipeline material stress-strain curve, the pipeline service fatigue cycle, the soil corrosion activity, and the environmental medium permeability; establishing a pipeline structure dynamic stress model based on the pressure difference between the inside and outside of the pipeline, the pipeline wall temperature gradient, and the real-time change value of the pipeline wall thickness; establishing a material fatigue model based on the pipeline material stress-strain curve and the pipeline service fatigue cycle; and constructing a corrosion damage model based on the soil corrosion activity and the environmental medium permeability; performing a coupling analysis on the pipeline structure dynamic stress model, the material fatigue model, and the corrosion damage model to obtain a first risk assessment parameter matrix, wherein the first risk assessment parameter matrix includes stress distribution parameters, material degradation parameters, and corrosion rate parameters; Establishing an initial pipeline leakage risk assessment model based on the first risk assessment parameter matrix; using the initial pipeline leakage risk assessment model as a fitness function; encoding the stress distribution parameter, the corrosion rate parameter, and the material degradation parameter in the first risk assessment parameter matrix into chromosomes, and operating the chromosomes to obtain a progeny population; Calculating the fitness value of each chromosome in the offspring population based on the fitness function, selecting the chromosome with the highest fitness value, and decoding the chromosome with the highest fitness value to obtain a second risk assessment parameter matrix; A pipeline leakage probability calculation model is established based on the second risk assessment parameter matrix; the operating parameters of the target pipeline segment are collected; the operating parameters of the target pipeline segment are input into the pipeline leakage probability calculation model to obtain a third risk assessment parameter matrix for the target pipeline segment; a leakage probability prediction value of the target pipeline segment is calculated based on the third risk assessment parameter matrix; and the target pipeline segment is classified into a risk level based on the leakage probability prediction value to generate a pipeline leakage risk distribution map.
2. The method according to claim 1, characterized in that The coupling analysis of the pipeline structure dynamic stress model, the material fatigue model, and the corrosion damage model to obtain a first risk assessment parameter matrix includes: The pipeline is divided into a plurality of grid units along the axial direction, and a stress collection point, a corrosion monitoring point, and a fatigue detection point are set in each grid unit; the soil corrosion activity and the environmental medium permeability of each grid unit are obtained, and an electrochemical corrosion equation is established; the corrosion depth increment of each grid unit is calculated according to the electrochemical corrosion equation; the corrosion depth increment is nonlinearly superimposed with the real-time change value of the pipeline wall thickness to obtain a pipeline wall thickness correction value for each grid unit; and the pipeline wall thickness correction value is used as an input parameter of the pipeline structure dynamic stress model; Substituting the pipeline wall thickness correction value, the pressure difference between the inside and outside of the pipeline, and the pipeline wall temperature gradient into the pipeline structure dynamic stress model to obtain stress distribution parameters of the stress collection point in each grid unit, wherein the stress distribution parameters include axial stress, hoop stress, and radial stress; substituting the stress distribution parameters, the pipeline material stress-strain curve, and the pipeline service fatigue cycle into the material fatigue model to obtain fatigue damage parameters of the fatigue detection point in each grid unit, wherein the fatigue damage parameters include fatigue crack initiation rate and fatigue damage accumulation value; substituting the fatigue damage parameters, the soil corrosion activity, and the environmental medium permeability into the corrosion damage model to obtain corrosion rate parameters of the corrosion monitoring point in each grid unit, wherein the corrosion rate parameters include corrosion current density and corrosion depth change rate; A coupled response equation group of the pipeline structure dynamic stress model, the material fatigue model, and the corrosion damage model is established; the stress distribution parameter, the fatigue damage parameter, and the corrosion rate parameter in each grid unit are substituted into the coupled response equation group for iterative calculation until the parameter change between two adjacent iterative calculations is less than a preset threshold; the stress distribution parameter, the fatigue damage parameter, and the corrosion rate parameter that have finally converged in the iterative calculation are arranged in order of the grid unit numbers to obtain a first risk assessment parameter matrix.
3. The method according to claim 1, characterized in that The step of establishing an initial pipeline leakage risk assessment model according to the first risk assessment parameter matrix includes: Adaptively partitioning the first risk assessment parameter matrix, dividing the pipeline into multiple risk assessment units based on spatial autocorrelation analysis, and calculating the spatial correlation of parameters within each risk assessment unit; constructing a parameter importance evaluation index system, which includes parameter fluctuation amplitude, parameter change trend, and parameter spatial correlation; and using a fuzzy hierarchical analysis method to rank the importance of parameters in each risk assessment unit and determine a parameter weight coefficient matrix; Based on the parameter weight coefficient matrix, key influencing parameters are screened from a historical leakage accident database, and pipeline failure evolution feature sequences corresponding to the key influencing parameters are extracted, wherein the pipeline failure evolution feature sequence includes stress distribution time series data, fatigue damage time series data, and corrosion rate time series data before the leakage occurs; a deep learning network model is constructed, wherein the number of input layer nodes of the deep learning network model is equal to the number of the key influencing parameters; the pipeline failure evolution feature sequence is input into the deep learning network model, and a risk feature extraction model is obtained through training; The parameter weight coefficient matrix of each risk assessment unit is combined with the risk feature extraction model to construct a dynamic risk assessment function; the risk warning index of each risk assessment unit is calculated based on the dynamic risk assessment function; a mapping relationship is established among the risk warning index, the parameter weight coefficient matrix, and the risk feature extraction model to construct a risk state transition probability matrix; a risk warning threshold is designed according to the risk state transition probability matrix, and the risk warning threshold is divided into multiple warning level intervals; the risk state transition probability matrix, the risk warning threshold, the warning level interval, and the corresponding assessment parameters and calculation methods are integrated into an initial model for pipeline leakage risk assessment.
4. The method according to claim 1, wherein The step of encoding the stress distribution parameter, the corrosion rate parameter, and the material degradation parameter in the first risk assessment parameter matrix into chromosomes and operating the chromosomes to obtain a progeny population includes: Performing data preprocessing on the stress distribution parameters, the corrosion rate parameters, and the material degradation parameters in the first risk assessment parameter matrix, using a standard deviation normalization method to eliminate dimensional effects, using a wavelet transform to remove parameter noise, and using a kernel density estimation method to correct outliers to obtain a standardized parameter matrix; establishing parameter statistical characteristics based on the standardized parameter matrix; constructing a parameter distribution model using the parameter statistical characteristics; constructing a parameter correlation network based on the standardized parameter matrix and the parameter distribution model, and calculating the Pearson correlation coefficient between parameters; calculating the Spearman rank correlation coefficient based on the parameter statistical characteristics; and calculating the mutual information coefficient based on the parameter distribution model; The Pearson correlation coefficient, Spearman rank correlation coefficient and mutual information coefficient are weighted and combined to generate a comprehensive parameter correlation evaluation index; a parameter correlation matrix is constructed according to the comprehensive parameter correlation evaluation index, and the parameter correlation matrix is divided into blocks using a spectral clustering algorithm to identify highly correlated parameter groups; a parameter optimization objective function is constructed based on the parameter correlation matrix, and the redundancy of the highly correlated parameter groups is used as the first optimization objective, the discrete degree of the parameter statistical characteristics is used as the second optimization objective, and the fitting error of the parameter distribution model is used as the third optimization objective; the parameter optimization objective function is normalized, and the objective function weight coefficient is calculated based on the comprehensive parameter correlation evaluation index; and a weighted Chebyshev method is used to convert a multi-objective optimization problem into a single-objective optimization problem; An adaptive weight adjustment model is constructed based on the objective function weight coefficient, and the adaptive weight adjustment model dynamically updates the weight coefficient according to the parameter correlation matrix; the parameter values in the standardized parameter matrix are converted into binary code according to the adaptive weight coefficient, and a Gray code encoding scheme is used to improve encoding efficiency; a chromosome structure is constructed according to the binary code, and an initial chromosome population that meets the constraint conditions is randomly generated based on the chromosome structure; and the initial chromosome population is operated to obtain an offspring population.
5. The method according to claim 4, characterized in that The operating the initial chromosome population to obtain a progeny population includes: Performing a Pareto non-dominated sort on the initial chromosome population, calculating the crowding distance of each chromosome individual, constructing a selection operator based on the crowding distance, wherein the selection probability of the selection operator is proportional to the individual crowding distance; performing a selection operation on the initial chromosome population using the selection operator to obtain a first offspring population; Dynamically determine the crossover position of chromosome individuals in the first progeny population, set a crossover probability adaptive adjustment factor based on the coupling degree between parameters, and dynamically update the crossover probability adaptive adjustment factor as the population evolves; perform a multi-point crossover operation on the first progeny population based on the crossover probability adaptive adjustment factor to obtain a second progeny population; calculate the parameter sensitivity of chromosome individuals in the second progeny population, and construct a parameter variation probability model. The parameter variation probability model assigns a preset variation probability to gene positions with high parameter sensitivity; A non-uniform mutation operation is performed on the second offspring population according to the parameter mutation probability model, and the variation asynchrony of the non-uniform mutation operation decays exponentially with the number of evolution generations, thereby obtaining a third offspring population; the third offspring population is decoded into optimized stress distribution parameters, corrosion rate parameters, and material degradation parameters, and the optimization effect is evaluated based on the parameter optimization objective function; when the non-dominated solution sets of multiple consecutive generations of populations converge and are evenly distributed, the Pareto optimal solution set is output to obtain the optimal parameter combination.
6. The method according to claim 1, characterized in that Calculating the fitness value of each chromosome in the offspring population based on the fitness function, selecting the chromosome with the highest fitness value, and decoding the chromosome with the highest fitness value to obtain a second risk assessment parameter matrix; Establishing a pipeline leakage probability calculation model based on the second risk assessment parameter matrix includes: Based on the fitness function, a multi-objective evaluation method is used to construct a hierarchical fitness calculation framework, which includes a basic evaluation layer, a cross-validation layer, and a comprehensive evaluation layer; each chromosome in the offspring population is input into the hierarchical fitness calculation framework, and a chromosome feature vector is constructed using the basic evaluation layer. The chromosome is subjected to parameter matching calculation, prediction accuracy calculation, and computational efficiency calculation to obtain a calculation result; the chromosome feature vector and the calculation result are input into the cross-validation layer, and an iterative verification operation is performed using a verification model to obtain a verification result; a nonlinear weighted calculation is performed on the verification result in combination with a dynamic optimization matrix of weight coefficients, a chromosome feature mapping network is constructed, and a chromosome fitness value sequence and a feature association matrix are output; A chromosome optimization mechanism is constructed using a tournament selection strategy. Population parameters are calculated based on the characteristic association matrix, and an adaptive competition radius is set. The chromosome fitness value sequence is input into the competition mechanism, and the fitness value, number of iterations, and parameter stability index of the competing chromosomes are calculated to form a comprehensive evaluation vector. A multi-objective optimization function is constructed, and a multi-objective sorting operation is performed on the chromosomes according to the Pareto dominance relationship to establish a non-dominated solution set. The chromosome fitness is evaluated in the non-dominated solution set based on the characteristic mapping network, and the chromosome with the highest fitness value is selected. A feature decoupling unit, an accuracy adjustment unit, and a parameter reconstruction unit are set up in a multi-level decoding conversion network; the chromosome with the highest fitness value and the feature association matrix are input into the feature decoupling unit, and the feature separation is performed using a variational inference method; a decoding accuracy calculation model is constructed using the chromosome feature vector, and the decoding accuracy is calculated through the accuracy adjustment unit; the decoding accuracy is input into the parameter reconstruction unit, and a deep neural network is used for parameter mapping, and the parameters are corrected in combination with the weight coefficient dynamic optimization matrix to generate a second risk assessment parameter matrix.
7. The method according to claim 1, characterized in that Inputting the operating parameters of the target pipeline section into the pipeline leakage probability calculation model to obtain a third risk assessment parameter matrix of the target pipeline section includes: Inputting the operating parameters of the target pipeline segment into a pipeline leakage probability calculation model, wherein the pipeline leakage probability calculation model includes an adaptive dynamic sampling network, a generative adversarial network, and a probabilistic representation learning network, wherein the adaptive dynamic sampling network includes a spatiotemporal attention module and a parameter reconstruction module; the spatiotemporal attention module uses a multi-head cross-attention mechanism to calculate a parameter weight matrix, constructs a parameter dependency graph based on the parameter weight matrix through an asynchronously updated hierarchical attention network, and constructs a parameter dimensionality reduction matrix based on the parameter dependency graph using a recursive tensor decomposition method; The parameter reconstruction module inputs the parameter dimensionality reduction matrix into a generative adversarial network, which includes a generator and a discriminator. The generator generates reconstruction parameters based on the parameter weight matrix, and the discriminator calculates the distribution distance between the reconstruction parameters and the original parameters, optimizes the reconstruction parameters in combination with a cycle consistency constraint function, and generates a spatiotemporal feature sequence and a parameter reconstruction matrix; the spatiotemporal feature sequence and the parameter reconstruction matrix are input into a probabilistic representation learning network, and the probabilistic representation learning network adopts a variational inference framework to construct a random flow transformation model based on the parameter reconstruction matrix, and maps the parameter distribution to a standard normal distribution space to obtain a standardized feature matrix; A hierarchical probability encoder is constructed based on the standardized feature matrix, and the hierarchical probability encoder includes a multi-layer latent variable model. Each layer of the latent variable model establishes a probability graph representation of the parameter distribution based on the spatiotemporal feature sequence, and an energy model is used to construct a parameter conditional probability matrix; a mutual information loss function is constructed based on the standardized feature matrix and the parameter conditional probability matrix, and the mutual information loss function includes a log-likelihood estimation term and a divergence constraint term. The conditional probability distribution is calculated based on the parameter conditional probability matrix, and the network parameters of the hierarchical probability encoder are iteratively optimized using a stochastic gradient variational inference algorithm to generate a third risk assessment parameter matrix.
8. A natural gas pipeline leakage probability calculation system based on a genetic algorithm, used to implement the method according to any one of claims 1 to 7, characterized in that: include: The first unit is used to collect operating parameters of the natural gas pipeline, including the pressure difference between the inside and outside of the pipeline, the temperature gradient of the pipeline wall, the real-time change value of the pipeline wall thickness, the stress-strain curve of the pipeline material, the pipeline service fatigue cycle, the soil corrosion activity, and the permeability of the environmental medium; a pipeline structure dynamic stress model is established based on the pressure difference between the inside and outside of the pipeline, the temperature gradient of the pipeline wall, and the real-time change value of the pipeline wall thickness; a material fatigue model is established based on the stress-strain curve of the pipeline material and the pipeline service fatigue cycle; and a corrosion damage model is constructed based on the soil corrosion activity and the permeability of the environmental medium; The second unit is configured to couple the pipeline structure dynamic stress model, the material fatigue model, and the corrosion damage model to obtain a first risk assessment parameter matrix, wherein the first risk assessment parameter matrix includes stress distribution parameters, material degradation parameters, and corrosion rate parameters; Establishing an initial pipeline leakage risk assessment model based on the first risk assessment parameter matrix; using the initial pipeline leakage risk assessment model as a fitness function; encoding the stress distribution parameter, the corrosion rate parameter, and the material degradation parameter in the first risk assessment parameter matrix into chromosomes, and operating the chromosomes to obtain a progeny population; A third unit is configured to calculate the fitness value of each chromosome in the offspring population based on the fitness function, select the chromosome with the highest fitness value, and decode the chromosome with the highest fitness value to obtain a second risk assessment parameter matrix; A pipeline leakage probability calculation model is established based on the second risk assessment parameter matrix; the operating parameters of the target pipeline segment are collected; the operating parameters of the target pipeline segment are input into the pipeline leakage probability calculation model to obtain a third risk assessment parameter matrix for the target pipeline segment; a leakage probability prediction value of the target pipeline segment is calculated based on the third risk assessment parameter matrix; and the target pipeline segment is classified into a risk level based on the leakage probability prediction value to generate a pipeline leakage risk distribution map.
9. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Composite flexible pipeline monitoring method and system based on digital twinning
CN118821521A
Method and apparatus for characterizing composite materials using an artificial neural network
US20150170022A1