Pipeline evaluation and design optimization method, system and equipment integrating flow simulation and machine learning and medium

By integrating flow simulation and machine learning, using recurrent neural networks to extract features and constructing hybrid neural networks, and introducing residuals from physical conservation equations, the problems of lack of physical constraints in big data analysis and low computational efficiency in flow simulation are solved, thereby improving the reliability and real-time performance of pipeline risk monitoring.

CN121960098APending Publication Date: 2026-05-01CHANGZHOU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHANGZHOU UNIV
Filing Date
2025-11-27
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

In existing pipeline risk monitoring methods, the lack of physical constraints in big data analysis leads to unreliable prediction results under extreme conditions, and the low efficiency of traditional flow simulation calculations makes it difficult to meet the needs of real-time monitoring.

Method used

This paper proposes a method that integrates flow simulation and machine learning. It extracts multi-dimensional features through recurrent neural networks, constructs a hybrid neural network, introduces the residuals of physical conservation equations as regularization terms, and optimizes parameters and performs self-evolution through a two-layer optimization structure.

Benefits of technology

It improves the reliability and real-time performance of pipeline risk monitoring, ensures prediction accuracy under extreme operating conditions, and meets real-time monitoring requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121960098A_ABST
    Figure CN121960098A_ABST
Patent Text Reader

Abstract

The invention discloses a pipeline evaluation and design optimization method, system, equipment and medium integrating flow simulation and machine learning, and belongs to the technical field of oil and gas pipeline safety monitoring and operation optimizing.The method comprises the steps that pipeline operation historical data are collected, a pipeline operation historical data model is established through a recurrent neural network, and feature extraction is conducted; obtaining a first type of features, a second type of features and a third type of features, and outputting a multi-dimensional feature vector; constructing a hybrid model, inputting the multi-dimensional feature vector into the hybrid model, training the hybrid model, constructing a hybrid neural network, performing multi-class risk identification, and outputting a risk prediction result; based on a risk prediction result, establishing a double-layer optimization structure, and performing parameter optimization and self-evolution on the hybrid neural network, and by deeply fusing flow simulation and machine learning and combining multi-dimensional feature extraction with space-time diagram convolution and an attention mechanism, the problem that a traditional data driving method is high in misjudgment rate under extreme working conditions is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of oil and gas pipeline safety monitoring and operation optimization technology, specifically to a method, system, equipment, and medium for pipeline evaluation and design optimization that integrates flow simulation and machine learning. Background Technology

[0002] As critical infrastructure for energy transportation, the safe operation and efficient management of oil and gas pipelines are of paramount importance. In actual operation, pipeline systems face various risk factors, including complex multiphase flow dynamics, equipment aging, corrosion, and external environmental disturbances. Traditional pipeline operation and management methods have the following main shortcomings: Purely physics-based flow simulation methods (such as specialized software like Olga and LedaFlow) can accurately describe the flow state within a pipe by solving fluid dynamics equations, providing clear physical meaning. However, these methods are computationally expensive, making them difficult to meet the needs of real-time monitoring and rapid optimization. Furthermore, their accuracy heavily relies on the accuracy of boundary conditions and physical property parameters, often leading to model inaccuracies under complex real-world conditions.

[0003] Data-driven machine learning methods can learn operational patterns from historical data, enabling rapid prediction and optimization. However, purely data-driven methods heavily rely on the quality and coverage of training data, and are prone to producing predictions that violate physical laws under extreme conditions of data scarcity. They also lack extrapolation and generalization capabilities, resulting in insufficient reliability in risk assessment and optimization decisions.

[0004] Current technologies lack effective means to integrate big data analytics with theoretical simulation. Big data analytics excels at uncovering historical patterns and making rapid predictions, but lacks the constraints of physical laws; theoretical simulation excels at mechanism description and parameter optimization, but suffers from low computational efficiency. The two fail to complement each other, making it difficult to achieve accurate assessment of pipeline operation risks and real-time optimization of operating parameters. Summary of the Invention

[0005] In view of the above-mentioned problems, the present invention is proposed.

[0006] Therefore, the technical problems solved by this invention are: in existing pipeline risk monitoring methods, the lack of physical constraints in big data analysis leads to unreliable prediction results under extreme conditions, and the low efficiency of traditional flow simulation calculations makes it difficult to meet the needs of real-time monitoring.

[0007] To address the aforementioned technical problems, this invention provides the following technical solution: a method for pipeline evaluation and design optimization integrating flow simulation and machine learning, comprising, Collect historical pipeline operation data, use a recurrent neural network to build a historical pipeline operation data model and extract features to obtain first-class features, second-class features and third-class features, and output a multi-dimensional feature vector; Construct a hybrid model by inputting multi-dimensional feature vectors into the hybrid model, training the hybrid model, building a hybrid neural network, identifying multiple types of risks, and outputting risk prediction results; Based on the risk prediction results, a two-layer optimization structure is established to optimize the parameters and self-evolve the hybrid neural network.

[0008] As a preferred embodiment of the pipeline evaluation and design optimization method integrating flow simulation and machine learning described in this invention, the following steps are included: collecting historical pipeline operation data, establishing a historical pipeline operation data model using a recurrent neural network and extracting features to obtain first-type features, second-type features, and third-type features, and outputting a multi-dimensional feature vector including... Collect historical pipeline operation data and use a recurrent neural network to build a historical pipeline operation data model; Based on the pipeline operation history data model, the first type of features were obtained through frequency domain analysis, and the second and third types of features were extracted respectively. By integrating the first type of features, the second type of features, and the third type of features, a multi-dimensional feature vector is obtained.

[0009] As a preferred embodiment of the pipeline evaluation and design optimization method integrating flow simulation and machine learning described in this invention, the step of constructing a hybrid model, inputting multi-dimensional feature vectors into the hybrid model, training the hybrid model, constructing a hybrid neural network, performing multi-class risk identification, and outputting risk prediction results includes: Construct a hybrid model by inputting multi-dimensional feature vectors into the hybrid model, train the hybrid model, introduce regularization techniques during the training process, and adjust the parameters of the hybrid model. Based on the trained hybrid model, the hybrid neural network is constructed by establishing a first module and a second module; Based on hybrid neural networks, multiple types of risks are identified and risk prediction results are output.

[0010] As a preferred embodiment of the pipeline evaluation and design optimization method integrating flow simulation and machine learning described in this invention, the step of establishing a two-layer optimization structure based on risk prediction results and performing parameter optimization and self-evolution on the hybrid neural network includes: Based on the risk prediction results, a two-layer optimization structure is established to optimize the parameters of the hybrid neural network. Based on the optimized hybrid neural network, the model is updated through a model update strategy, a core indicator is set to establish an evaluation system, and the core indicator is continuously monitored. When the core metrics exceed the set threshold, a fine-tuning process is triggered, allowing the hybrid neural network model to evolve itself.

[0011] As a preferred embodiment of the pipeline evaluation and design optimization method integrating flow simulation and machine learning described in this invention, the step of introducing regularization techniques and adjusting the parameters of the hybrid model during training includes: During the training phase, the residuals of the physical conservation equations are added as regularization terms to the loss function to construct the physical information loss function, which is expressed as follows: in, The physical information loss function, For data fitting error, For physical consistency error, For L2 regularization terms, , The first and second adjustment parameters are respectively; For a continuity equation, the residual expression is: in, For residuals, The density of the fluid medium, For time, For divergence operators, The velocity vector field of the fluid; when At that time, the physical consistency correction mechanism is activated, and the model parameters are fine-tuned through the solver, whereby... This is the residual threshold.

[0012] As a preferred embodiment of the pipeline evaluation and design optimization method integrating flow simulation and machine learning described in this invention, the step of constructing a hybrid neural network by establishing a first module and a second module includes: The CNN module extracts local spatiotemporal features through one-dimensional convolutional layers, expressed as: in, For the first The first convolutional layer Each output feature value It is a non-linear activation function. The width of the one-dimensional convolution kernel. Indicates the first from the previous layer Each input feature value For the first Trainable bias parameters of each convolutional layer These are the kernel weights; The BiLSTM module captures forward and backward time dependencies through a bidirectional long short-term memory network, expressed as: in, Indicates at time step The hidden state vector of the forward LSTM Indicates at time step The hidden state vector of the backward LSTM Indicates at time step The feature vector input to the BiLSTM module , Forward LSTM Timing and backward LSTM at The hidden state of the previous time step. , Forward LSTM Timing and backward LSTM at Cellular state at any given moment Indicates at time step The final output of the BiLSTM module is the hidden state vector.

[0013] This invention constructs a hybrid neural network architecture that combines CNN and BiLSTM, enabling the model to keenly identify sudden abnormal signals such as water hammer and leakage, thereby improving the accuracy of risk identification in jointly perceiving local anomalies and long-term patterns.

[0014] As a preferred embodiment of the pipeline evaluation and design optimization method integrating flow simulation and machine learning described in this invention, the step of establishing an evaluation system by setting core indicators and continuously monitoring the core indicators includes: The system continuously monitors three core performance indicators: prediction accuracy, response timeliness, and physical consistency. The expression for prediction accuracy is: in, For accuracy, It is a true positive. It is a true negative. It was a false positive. It is a false negative; The expression for response timeliness is: in, In order to meet timeliness, This refers to the actual occurrence time of a risk event determined based on a high-precision timescale. The time at which the system generates the warning information; The physical consistency expression is: in, For physical consistency, For the first The residuals of a physical conservation equation (such as the continuity equation), The total number of physical equations being monitored.

[0015] This invention utilizes the comprehensive discriminative ability of the accuracy evaluation model and directly constrains the system's delay from risk occurrence to early warning generation through response timeliness indicators, ensuring that real-time monitoring requirements are met. It also defines a physical consistency index to quantitatively supervise whether the model output results conform to physical conservation laws such as fluid continuity, ensuring that the system can collaboratively optimize the accuracy of predictions under complex operating conditions and improve the reliability of pipeline risk monitoring.

[0016] This invention provides a system for pipeline evaluation and design optimization that integrates flow simulation and machine learning.

[0017] To address the aforementioned technical problems, this invention provides the following technical solution: a system for pipeline evaluation and design optimization integrating flow simulation and machine learning, comprising a feature extraction module, a risk prediction module, and a parameter optimization and self-evolution module. The feature extraction module collects historical pipeline operation data, uses a recurrent neural network to build a historical pipeline operation data model and extracts features to obtain first-class features, second-class features, and third-class features, and outputs a multi-dimensional feature vector. The risk prediction module constructs a hybrid model by inputting multi-dimensional feature vectors into the hybrid model, training the hybrid model, constructing a hybrid neural network, identifying multiple types of risks, and outputting risk prediction results. The parameter optimization and self-evolution module is based on the risk prediction results and establishes a two-layer optimization structure to optimize the parameters and self-evolve the hybrid neural network.

[0018] The present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, characterized in that the processor executes the computer program to implement the steps of the method for pipeline evaluation and design optimization that integrates flow simulation and machine learning.

[0019] The present invention provides a computer-readable storage medium having a computer program stored thereon, characterized in that, when the computer program is executed by a processor, it implements the steps of the method for pipeline evaluation and design optimization that integrates flow simulation and machine learning.

[0020] The beneficial effects of this invention are as follows: This invention addresses the problems of inaccurate predictions under extreme conditions due to the lack of physical constraints in big data analysis, and the low computational efficiency of flow simulation, which makes it difficult to meet real-time requirements, by constructing a hybrid model that integrates physical mechanisms and data-driven approaches. It utilizes a recurrent neural network to extract multi-dimensional feature vectors from historical pipeline operation data, and then constructs a hybrid neural network combining convolutional neural networks and bidirectional long short-term memory networks for multi-risk identification. During training, the residuals of physical conservation equations are introduced as regularization terms, enhancing the model's reliability in terms of physical consistency. Furthermore, a two-layer optimization structure is used to achieve model parameter optimization and self-evolution mechanisms, dynamically adjusting the model based on core indicators such as prediction accuracy, response timeliness, and physical consistency, thereby improving prediction accuracy under extreme conditions. Attached Figure Description

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

[0022] Figure 1 The above is a general flowchart of a method for pipeline evaluation and design optimization that integrates flow simulation and machine learning, provided as an embodiment of the present invention. Detailed Implementation

[0023] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.

[0024] Example 1, referring to Figure 1 This is one embodiment of the present invention, which provides a method for pipeline evaluation and design optimization that integrates flow simulation and machine learning, including: To address the technical problems in existing pipeline risk monitoring methods, such as the lack of physical constraints in big data analysis leading to unreliable predictions under extreme conditions, and the low efficiency of traditional flow simulation calculations making it difficult to meet real-time monitoring requirements, this invention provides a pipeline evaluation and design optimization method that integrates flow simulation and machine learning.

[0025] S1: Collect historical pipeline operation data, establish a pipeline operation history data model using a recurrent neural network and extract features to obtain the first type of features, the second type of features and the third type of features, and output a multi-dimensional feature vector.

[0026] S2: Construct a hybrid model by inputting multi-dimensional feature vectors into the hybrid model, training the hybrid model, building a hybrid neural network, identifying multiple types of risks, and outputting risk prediction results.

[0027] S3: Based on the risk prediction results, a two-layer optimization structure is established to optimize the parameters and self-evolve the hybrid neural network.

[0028] Therefore, this invention utilizes recurrent neural networks to deeply mine multi-dimensional features in historical data and integrates a hybrid neural network of CNN and BiLSTM to collaboratively capture local anomalies and long-term dependencies, thereby achieving risk identification. Based on a two-layer optimization structure and dynamic evaluation mechanism, the hybrid neural network can continuously adjust parameters and self-evolve according to the actual prediction effect, ensuring that the system always maintains its adaptability to complex working conditions and time-varying characteristics during long-term operation.

[0029] Example 2, an embodiment of the present invention, provides a method for pipeline evaluation and design optimization that integrates flow simulation and machine learning, based on the previous embodiment, including: In this embodiment of the application, step S1 involves collecting historical pipeline operation data, establishing a historical pipeline operation data model using a recurrent neural network, and extracting features to obtain first-type features, second-type features, and third-type features, and outputting a multi-dimensional feature vector, including the following steps A1-A3: A1: Collect historical pipeline operation data and use a recurrent neural network to establish a historical pipeline operation data model.

[0030] A2: Based on the pipeline operation history data model, the first type of features are obtained through frequency domain analysis, and the second and third types of features are extracted respectively.

[0031] Based on discrete temperature measurement points along the pipeline A continuous two-dimensional temperature field is constructed using Kriging interpolation. Through the semi-variogram model Quantitative spatial correlation, interpolation points The expression for the temperature estimate is: in, This is a temperature estimate. The real-time temperature measured at discrete temperature measuring points along the pipeline, weighted. By solving the Kriging equations, we can ensure that the estimate is unbiased and has minimal variance, and extract features such as temperature gradients and regional low-temperature anomalies. The Kriging equations consist of unbiased and minimum variance conditions, and are in the following form: For all ,have And it satisfies the unbiasedness constraint: in, Point and The semivariogram values ​​between It is the Lagrange multiplier. The weights are obtained by solving this system of linear equations. This ensures that the estimated value is unbiased and the variance of the estimation error is minimized.

[0032] The CUSUM (Cumulative Sum) control chart algorithm is used to identify flow. Small, persistent mutations. The algorithm calculates two cumulative statistics. and : in, This is the first cumulative statistic at the current moment. This is the second cumulative statistic at the current moment. This is the normal baseline value for traffic flow. To allow for deviation, For traffic, , These are the first and second cumulative statistics at the previous time step, respectively.

[0033] when or Exceeding the preset threshold At that time, among them Based on experience, a human-defined pattern can be established to determine if a mutation has occurred and extract pattern features such as the mutation magnitude and duration.

[0034] A3: Integrate the first type of features, the second type of features, and the third type of features to obtain a multi-dimensional feature vector.

[0035] By integrating spatial topology modeling and multi-dimensional physical feature extraction, a feature vector with a total of 62 feature dimensions, including pressure, temperature, flow rate, and sound waves, is finally constructed. Based on training with more than 5 years of historical data, the leak prediction model output by this module can identify weak leak precursor signals that are difficult to detect by traditional methods, achieving a leak location accuracy of ±15 meters and a prediction response time of less than 3 seconds.

[0036] In this embodiment of the application, the recurrent neural network used to establish the pipeline operation history data model in step S1 specifically employs a spatiotemporal graph convolutional network combined with a multi-head self-attention mechanism: The pipeline system is modeled as a graph structure, where nodes represent pressure, temperature, and flow sensors, and edges represent pipeline connections. A spatiotemporal graph convolutional network captures spatial dependencies through graph convolutional layers, and its spatial feature update formula is: in, For spatial features, It is a non-linear activation function. It is an adjacency matrix with self-connections. This is the original adjacency matrix. It is the identity matrix. The corresponding degree matrix It is a diagonal matrix. For the features of the l-th layer nodes, These are trainable weights that can be adjusted based on experience.

[0037] In an alternative implementation, the recurrent neural network used to establish the pipeline operation history data model in step S1 can also be a spatiotemporal graph attention network. By calculating the attention coefficient between the node and its neighbors, different aggregation weights are assigned to different neighbors to characterize the differences in the impact of different connections on the state of the target node in the pipeline network.

[0038] In another alternative implementation, the recurrent neural network used to build the pipeline operation history data model in step S1 can also be a graph recurrent network, using gated recurrent units or long short-term memory networks as the core, and using graph convolution to replace fully connected operations at each time update step to aggregate information from neighboring nodes.

[0039] In the embodiments of this application, a recurrent neural network is used in step S1 to establish a pipeline operation history data model. By combining a spatiotemporal graph convolutional network with a multi-head self-attention mechanism, the pipeline system is modeled as a graph structure to solve the complex spatiotemporal correlation problem in pipeline operation data.

[0040] In this embodiment of the application, the first type of feature obtained through frequency domain analysis in step A2 specifically uses Fast Fourier Transform: Perform a Fast Fourier Transform on the pressure time-series signal to calculate the power spectral density. The expression is as follows: in, For power spectral density, The signal is a pressure time series signal, and FFT stands for Fast Fourier Transform.

[0041] The spectral energy and dominant frequency of a specific frequency band (such as 0.01-0.5Hz) are extracted as features to identify specific pressure wave modes caused by leakage.

[0042] In an alternative implementation, the first type of feature obtained by frequency domain analysis in step A2 can also be obtained by wavelet transform, which analyzes the local features of the signal in the time and frequency domains by using scalable and translational wavelet basis functions.

[0043] In another alternative implementation, the first type of feature obtained through frequency domain analysis in step A2 can also be obtained by empirical mode decomposition, which adaptively decomposes the complex pressure signal into a series of intrinsic mode functions with different feature scales.

[0044] In this embodiment of the application, the first type of feature is obtained through frequency domain analysis in step A2. The fast Fourier transform is used to perform frequency domain analysis to convert the pressure signal from the time domain to the frequency domain, thereby effectively separating and highlighting the specific pressure wave mode features caused by leakage.

[0045] In this embodiment of the application, step S2 involves constructing a hybrid model by inputting multi-dimensional feature vectors into the hybrid model, training the hybrid model, constructing a hybrid neural network, performing multi-class risk identification, and outputting risk prediction results, including the following steps B1-B3: B1: Construct a hybrid model by inputting multi-dimensional feature vectors into the hybrid model, training the hybrid model, introducing regularization techniques during training, and adjusting the parameters of the hybrid model.

[0046] The extracted multi-dimensional feature vectors are used as input, and the big data analysis module and the flow simulation module are deeply integrated through a collaborative training mechanism. The flow simulation module establishes a multiphase flow dynamics model based on the mass, momentum and energy conservation equations.

[0047] During the training phase, the residuals of the physical conservation equations are added as regularization terms to the loss function to construct the physical information loss function, which is expressed as follows: in, The physical information loss function, For data fitting error, For physical consistency error, For L2 regularization terms, , The first and second adjustment parameters are respectively set to ranges of 0.5-1.0 and 0.1-0.3 based on experience; For a continuity equation, the residual expression is: in, For residuals, The density of the fluid medium, For time, For divergence operators, The velocity vector field of the fluid; when At that time, the physical consistency correction mechanism is activated, and the model parameters are fine-tuned through the solver, whereby... This is the residual threshold. Determined through historical data statistics, the feature scale is typically 0.05-0.15 times.

[0048] B2: Based on the trained hybrid model, the hybrid neural network is constructed by establishing the first module and the second module.

[0049] The hybrid neural network is a CNN-BiLSTM hybrid neural network model.

[0050] The CNN module extracts local spatiotemporal features through one-dimensional convolutional layers, expressed as: in, For the first The first convolutional layer Each output feature value It is a non-linear activation function. The width of the one-dimensional convolution kernel. Indicates the first from the previous layer Each input feature value For the first Trainable bias parameters of each convolutional layer The weights of the convolution kernel typically follow a normal distribution with a mean of 0 and a standard deviation of 0.01. The BiLSTM module captures forward and backward time dependencies through a bidirectional long short-term memory network, expressed as: in, Indicates at time step The hidden state vector of the forward LSTM Indicates at time step The hidden state vector of the backward LSTM Indicates at time step The feature vector input to the BiLSTM module , Forward LSTM Timing and backward LSTM at The hidden state of the previous time step. , Forward LSTM Timing and backward LSTM at Cellular state at any given moment Indicates at time step The final output of the BiLSTM module is the hidden state vector.

[0051] B3: Based on a hybrid neural network, it identifies multiple types of risks and outputs risk prediction results.

[0052] The output state at the end of the sequence or the aggregated features of all time step outputs are passed to the fully connected layer and the Softmax activation function to complete the probability distribution calculation for typical risk modes (hydrate blockage, corrosion perforation, third-party damage).

[0053] It should be noted that by introducing physical conservation constraints into the training of the hybrid model and extracting local spatiotemporal features and bidirectional time dependence, the risk identification results can simultaneously conform to the operational data patterns and the characteristics of the fluid dynamics model, significantly improving the reliability and interpretability of the prediction, achieving accurate identification of multiple types of risks, and meeting the requirements of pipeline online monitoring for real-time performance and reliability.

[0054] In this embodiment of the application, step S3 establishes a two-layer optimization structure based on the risk prediction results, and performs parameter optimization and self-evolution on the hybrid neural network, including the following steps C1-C3: C1: Based on the risk prediction results, a two-layer optimization structure is established to optimize the parameters of the hybrid neural network.

[0055] C2: Based on the optimized hybrid neural network, the model is updated through a model update strategy, a core indicator is set to establish an evaluation system, and the core indicator is continuously monitored.

[0056] The system continuously monitors three core performance indicators: prediction accuracy, response timeliness, and physical consistency. The expression for prediction accuracy is: in, For accuracy, It is a true positive. It is a true negative. It was a false positive. It was a false negative. , , as well as This is derived by comparing model-based early warnings with real events confirmed by SCADA data and human verification. The expression for response timeliness is: in, In order to meet timeliness, This refers to the actual occurrence time of a risk event determined based on a high-precision timescale. The time at which the system generates the warning information; The physical consistency expression is: in, For physical consistency, For the first The residuals of a physical conservation equation (such as the continuity equation), The total number of physical equations being monitored.

[0057] C3: When the core metrics exceed the set threshold, the fine-tuning process is triggered to allow the hybrid neural network model to evolve itself.

[0058] When the mean of any indicator is below a threshold within a consecutive evaluation period (e.g., 24 hours) (i.e.) or or When this happens, "physical-data joint fine-tuning" will be automatically triggered.

[0059] The fine-tuning process does not involve training from scratch, but rather using existing model parameters. Based on this, with a lower learning rate (For example Using the latest data within the sliding window, iterative optimization is performed to minimize the loss function that includes physical constraints: in, These are the new parameters obtained after fine-tuning. For existing model parameters, For learning rate, loss function The gradient of the model parameter θ in the sliding window data Calculate above.

[0060] Here Consistent with the physical information loss function defined in S2, this ensures that the fine-tuning process is also constrained by physical laws.

[0061] After fine-tuning, the new model A brief validation process will be conducted in a shadow environment. If the performance metrics recover to above the threshold, the system will seamlessly switch to online operation, completing a model self-evolution. Through this mechanism, the system can autonomously and continuously maintain excellent performance when pipeline operating conditions change.

[0062] In this embodiment of the application, the establishment of the two-layer optimization structure in step S3 is specifically manifested as follows: A two-layer optimization architecture is adopted, which guides the direction of big data and verifies the results through simulation. The first layer, the data-driven layer, uses Spearman's rank correlation coefficient and mutual information analysis to determine the optimization direction of key parameters, identifying operating parameters that significantly impact safety, energy efficiency, and economy. Spearman's rank correlation coefficient analysis is used to assess the strength and direction of the monotonic relationship between parameters and objectives. For a given operating parameter... and optimization goals (Such as risk indicators), calculate rankings based on data rather than raw values.

[0063] Will Parameters of each sample and optimization goals Values ​​converted to levels and Calculate the Pearson correlation coefficient, the expression is: in, The Pearson correlation coefficient is... , Parameters and optimization goals Value level, For each pair of data, the rank difference, , They are respectively , The mean square error.

[0064] The range of values ​​is absolute value This is usually considered to be significantly correlated. Direction determined: If , indicating parameters With the goal Positive correlation, to reduce the optimization objective (If there is a risk), the parameter should be reduced. ;like If the value is 0, it indicates a negative correlation, and the parameter should be increased. .

[0065] The second layer, the simulation verification layer, uses the flow simulation module to calculate the feasible region and Pareto front for parameter adjustment. It employs an improved NSGA-II algorithm to simultaneously optimize three objectives, expressed as: in, As a risk indicator, For gas transmission efficiency, Operating costs.

[0066] Improvements include adaptive crossover rates and congestion-based elite selection strategies to ensure the physical feasibility of the optimization scheme.

[0067] In an alternative implementation, the two-layer optimization structure established in step S3 can also be guided by sensitivity analysis based on SHAP values, combined with multi-objective Bayesian optimization. In the first layer, model interpretation tools such as SHAP are used, and in the second layer, multi-objective Bayesian optimization is used to actively learn the objective function through a Gaussian process surrogate model.

[0068] In another optional implementation, the two-layer optimization structure established in step S3 can also adopt a pattern discovery based on principal component analysis and cluster analysis, combined with a decomposition-based multi-objective evolutionary algorithm. In the first layer, dimensionality reduction is performed through principal component analysis, and several representative historical running state clusters are identified by clustering algorithm. In the second layer, the decomposition-based MOEA / D algorithm is used to transform the multi-objective problem into a set of aggregate subproblems and optimize them collaboratively.

[0069] In the implementation of this application, a two-layer optimization structure is established in step S3. Through non-parametric statistical analysis, the adjustment direction of key parameters is objectively identified from actual operating data, which effectively avoids the subjectivity and limitations of traditional experience-based decision-making. The simulation verification layer quantifies the boundary of parameter adjustment and the trade-off between multiple objectives, ensuring that the generated optimization scheme is practically feasible in engineering physics.

[0070] In this embodiment of the application, the model update strategy in step C2 specifically adopts a sliding window incremental learning mechanism: The system maintains a fixed-size data window for model updates. Each received... A new running data sample triggers a model update process, first of all, the new sample... Add a window and remove the oldest one in the window. A certain number of samples are used to keep the total amount of data constant, thereby ensuring that the model can keep track of the latest dynamics of the system without being dominated by historical data.

[0071] In one alternative implementation, the model update strategy in step C2 can also employ incremental learning, where the model is updated each time a new sample or a small batch of new samples is reached.

[0072] In another alternative implementation, the model update strategy in step C2 can also be based on dynamic weighted incremental learning, which retains a larger historical data pool and assigns different weights to training samples from different periods each time the model is updated.

[0073] In this embodiment of the application, the model is updated in step C2 through a model update strategy. A sliding window incremental learning mechanism is adopted, which maintains a data window of a fixed size to achieve a balance between the dynamics of recent data and the accumulation of historical data during the model update process.

[0074] In summary, by deeply integrating flow simulation with machine learning, the reliability and real-time performance of pipeline risk monitoring are improved while ensuring physical conservation constraints. Multi-dimensional feature extraction combined with spatiotemporal graph convolution and attention mechanisms overcomes the high misjudgment rate of traditional data-driven methods under extreme conditions. The introduction of a physical information loss function, continuity equation residual correction, and a two-layer optimization architecture ensures that prediction results conform to fluid dynamics laws and support risk-based optimization of operating parameters, thereby improving safety and energy efficiency. Simultaneously, the sliding window-based incremental learning mechanism ensures that the model continuously evolves with changing operating conditions, enhancing the risk warning capability and operational decision-making level of the pipeline system.

[0075] Example 3 is an embodiment of the present invention, illustrating a 385-kilometer-long natural gas pipeline with a diameter of 1016 mm, a design pressure of 10 MPa, and an annual gas transmission capacity of 12 billion cubic meters. This pipeline traverses a complex geological region, posing a risk of geological hazards. A pipeline evaluation and design optimization method integrating flow simulation and machine learning is applied, specifically including the following steps: S1: Data Acquisition and Feature Engineering. Historical SCADA system data for the pipeline over the past 8 years was collected, including parameters such as pressure, temperature, flow rate, and compressor power, with a sampling frequency of 1 time per minute. External data sources such as geological disaster monitoring data, meteorological data, and third-party construction data were integrated. An 85-dimensional feature vector was constructed, incorporating features such as pressure gradient, temperature change rate, and flow fluctuation spectrum. Feature extraction was performed using a sliding time window (window size 2 hours, step size 5 minutes). Missing data was imputed using the spatiotemporal KNN algorithm, and outlier data was detected using the Isolation Forest algorithm.

[0076] S2: Hybrid Model Construction and Training. A hybrid neural network architecture of STGCN+Transformer is adopted, with 85 nodes in the input layer and 256 nodes in the hidden layer. The flow simulation module is based on the Realizable k-ε turbulence model, establishing three-dimensional unsteady flow equations. A co-training mechanism is set up, with the loss function as follows: The AdamW optimizer was used with an initial learning rate of 0.001, a batch size of 64, and training for 500 epochs. Validation set testing was performed every 50 epochs, and the patience value for the early stopping mechanism was set to 20.

[0077] S3: Risk Identification and Early Warning Implementation. Based on the trained model, establish a four-level risk early warning mechanism: Blue Alert (low risk, abnormal features but not exceeding the threshold), Yellow Alert (medium risk, single feature continuously abnormal), Orange Alert (higher risk, multiple features synergistically abnormal), and Red Alert (high risk, conforming to leakage characteristic patterns). Set up an early warning response process, with different contingency plans triggered for different alert levels. Establish an early warning effectiveness evaluation mechanism, and conduct monthly statistical analysis of early warning accuracy.

[0078] S4: Parameter Optimization and Adjustment. Construct an optimization space containing adjustable parameters. Employ an improved MOPSO algorithm, aiming for minimum energy consumption, maximum throughput, and minimum risk. Establish safety constraints for parameter adjustments to ensure all adjustments remain within safe limits. Implement a parameter optimization approval process; major adjustments require manual confirmation.

[0079] S5: System Deployment and Operation. A distributed computing cluster, equipped with 8 GPU servers, is deployed in the pipeline control center. A model update mechanism is set up to incrementally train the model monthly using new data. System health monitoring is established to monitor the operational status of each module in real time. A system maintenance manual is developed, clearly defining fault handling procedures and emergency plans.

[0080] Example 4 is an embodiment of the present invention, illustrating a 276-kilometer-long crude oil pipeline with a maximum drop of 1850 meters, a diameter of 813 mm, a design pressure of 8 MPa, and an annual oil transport capacity of 8 million tons. This pipeline has complex terrain and is difficult to operate. A pipeline evaluation and design optimization method integrating flow simulation and machine learning is applied, specifically including the following steps: S1: Multi-source data integration and processing. Five years of pipeline operation data were collected, including pressure, temperature, flow rate, and oil physical properties. High-precision digital elevation data was integrated to establish a three-dimensional topographic model of the pipeline. Combined with laboratory analysis data of the oil products, a physical property parameter database was established. A 128-dimensional feature vector containing topographic elevation, pipeline inclination angle, and local resistance was constructed. Wavelet packet transform was used for feature denoising to retain effective feature information.

[0081] S2: Terrain-Aware Model Construction. A Graph Attention Network (GAT) is used to model the pipeline topology. The flow simulation module considers the impact of terrain undulations and establishes a momentum equation with terrain correction. A terrain-adaptive learning mechanism is implemented, using different model parameters for different terrain sections. A momentum-driven SGD optimizer with exponentially decaying learning rate is used, and training is performed for 400 epochs.

[0082] S3: Operational Risk Assessment. Establish a risk assessment model based on fuzzy reasoning. Identify six main risks: water hammer risk, cavitation risk, wax deposition risk, corrosion risk, geological disaster risk, and equipment failure risk. Each risk is assigned five assessment levels, and the weights are determined using the analytic hierarchy process (AHP). Establish risk correlation analysis to identify risk transmission paths.

[0083] S4: Multi-objective optimization control. An optimization problem is constructed, incorporating control variables (pump frequency, valve opening, heating temperature). The NSGA-III algorithm is used to simultaneously optimize five objectives: maximizing safety (minimizing risk indicators), optimizing energy efficiency (minimizing energy consumption per unit output), optimizing economy (minimizing operating costs), optimizing stability (minimizing parameter fluctuations), and maximizing equipment lifespan (optimal load balance). Constraints include: upper and lower pressure limits, temperature range, and equipment capacity limitations.

[0084] S5: System Implementation and Verification. Deploy the system in the dispatch center and establish a data interface with the existing SCADA system. Set up a dual-machine hot standby architecture to ensure reliable system operation. Establish an operator training system and compile a system operation manual. Develop system acceptance criteria, including response time, accuracy, and stability indicators.

[0085] Example 5 is an embodiment of the present invention, which provides a system for pipeline evaluation and design optimization that integrates flow simulation and machine learning, including a feature extraction module, a risk prediction module, and a parameter optimization and self-evolution module. The feature extraction module collects historical pipeline operation data, uses a recurrent neural network to build a model of the historical pipeline operation data and extracts features to obtain first-class features, second-class features and third-class features, and outputs a multi-dimensional feature vector. The risk prediction module is responsible for building a hybrid model. Multi-dimensional feature vectors are input into the hybrid model, the hybrid model is trained, a hybrid neural network is constructed, multiple types of risks are identified, and risk prediction results are output. The parameter optimization and self-evolution module is based on the risk prediction results and establishes a two-layer optimization structure to optimize the parameters and self-evolve the hybrid neural network.

[0086] This embodiment also provides an electronic device applicable to a method for pipeline evaluation and design optimization that integrates flow simulation and machine learning, comprising: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the method for pipeline evaluation and design optimization that integrates flow simulation and machine learning as proposed in the above embodiment.

[0087] This embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements a pipeline evaluation and design optimization method that integrates flow simulation and machine learning as proposed in the above embodiments.

[0088] The storage medium proposed in this embodiment belongs to the same inventive concept as the method for pipeline evaluation and design optimization that integrates flow simulation and machine learning proposed in the above embodiments. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.

[0089] Based on the above description of the implementation methods, those skilled in the art can clearly understand that the present invention can be implemented using software and necessary general-purpose hardware, and of course, it can also be implemented using hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk, or optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of the various embodiments of the present invention.

[0090] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A method for pipeline evaluation and design optimization that integrates flow simulation and machine learning, characterized in that: include, Collect historical pipeline operation data, use a recurrent neural network to build a historical pipeline operation data model and extract features to obtain first-class features, second-class features and third-class features, and output a multi-dimensional feature vector; Construct a hybrid model by inputting multi-dimensional feature vectors into the hybrid model, training the hybrid model, building a hybrid neural network, identifying multiple types of risks, and outputting risk prediction results; Based on the risk prediction results, a two-layer optimization structure is established to optimize the parameters and self-evolve the hybrid neural network.

2. The method for pipeline evaluation and design optimization integrating flow simulation and machine learning as described in claim 1, characterized in that: The process involves collecting historical pipeline operation data, establishing a historical pipeline operation data model using a recurrent neural network, and extracting features to obtain first-class features, second-class features, and third-class features. The output is a multi-dimensional feature vector, including... Collect historical pipeline operation data and use a recurrent neural network to build a historical pipeline operation data model; Based on the pipeline operation history data model, the first type of features were obtained through frequency domain analysis, and the second and third types of features were extracted respectively. By integrating the first type of features, the second type of features, and the third type of features, a multi-dimensional feature vector is obtained.

3. The method for pipeline evaluation and design optimization integrating flow simulation and machine learning as described in claim 2, characterized in that: The construction of the hybrid model involves inputting multi-dimensional feature vectors into the hybrid model, training the hybrid model to build a hybrid neural network, and performing multi-class risk identification and outputting risk prediction results. Construct a hybrid model by inputting multi-dimensional feature vectors into the hybrid model, train the hybrid model, introduce regularization techniques during the training process, and adjust the parameters of the hybrid model. Based on the trained hybrid model, the hybrid neural network is constructed by establishing a first module and a second module; Based on hybrid neural networks, multiple types of risks are identified and risk prediction results are output.

4. The method for pipeline evaluation and design optimization integrating flow simulation and machine learning as described in claim 3, characterized in that: The step of establishing a two-layer optimization structure based on risk prediction results, and optimizing the parameters and self-evolving the hybrid neural network includes: Based on the risk prediction results, a two-layer optimization structure is established to optimize the parameters of the hybrid neural network. Based on the optimized hybrid neural network, the model is updated through a model update strategy, a core indicator is set to establish an evaluation system, and the core indicator is continuously monitored. When the core metrics exceed the set threshold, a fine-tuning process is triggered, allowing the hybrid neural network model to evolve itself.

5. The method for pipeline evaluation and design optimization integrating flow simulation and machine learning as described in claim 4, characterized in that: The introduction of regularization techniques during training and the adjustment of parameters of the hybrid model include, During the training phase, the residuals of the physical conservation equations are added as regularization terms to the loss function to construct the physical information loss function, which is expressed as follows: in, The physical information loss function, For data fitting error, For physical consistency error, For L2 regularization terms, , The first and second adjustment parameters are respectively; For the continuity equation, the residual expression is: in, For residuals, The density of the fluid medium, For time, For divergence operators, The velocity vector field of the fluid; when At that time, the physical consistency correction mechanism is activated, and the model parameters are fine-tuned through the solver, whereby... This is the residual threshold.

6. The method for pipeline evaluation and design optimization integrating flow simulation and machine learning as described in claim 5, characterized in that: The construction of the hybrid neural network by establishing a first module and a second module includes, The CNN module extracts local spatiotemporal features through one-dimensional convolutional layers, expressed as: in, For the first The first convolutional layer Each output feature value It is a non-linear activation function. The width of the one-dimensional convolution kernel. Indicates the first from the previous layer Each input feature value For the first Trainable bias parameters of each convolutional layer These are the kernel weights; The BiLSTM module captures forward and backward time dependencies through a bidirectional long short-term memory network, expressed as: in, Indicates at time step The hidden state vector of the forward LSTM Indicates at time step The hidden state vector of the backward LSTM Indicates at time step The feature vector input to the BiLSTM module , Forward LSTM Timing and backward LSTM at The hidden state of the previous time step. , Forward LSTM Timing and backward LSTM at Cellular state at any given moment Indicates at time step The final output of the BiLSTM module is the hidden state vector.

7. The method for pipeline evaluation and design optimization integrating flow simulation and machine learning as described in claim 6, characterized in that: The establishment of an evaluation system based on key indicators, and the continuous monitoring of these key indicators, include... The system continuously monitors three core performance indicators: prediction accuracy, response timeliness, and physical consistency. The expression for prediction accuracy is: in, For accuracy, It is a true positive. It is a true negative. It was a false positive. It is a false negative; The expression for response timeliness is: in, In order to meet timeliness, This refers to the actual occurrence time of a risk event determined based on a high-precision timescale. The time at which the system generates the warning information; The physical consistency expression is: in, For physical consistency, For the first The residuals of a physical conservation equation (such as the continuity equation), The total number of physical equations being monitored.

8. A system for pipeline evaluation and design optimization integrating flow simulation and machine learning, employing the pipeline evaluation and design optimization method integrating flow simulation and machine learning as described in any one of claims 1 to 7, characterized in that, It includes a feature extraction module, a risk prediction module, and a parameter optimization and self-evolution module. The feature extraction module collects historical pipeline operation data, uses a recurrent neural network to build a historical pipeline operation data model and extracts features to obtain first-class features, second-class features, and third-class features, and outputs a multi-dimensional feature vector. The risk prediction module constructs a hybrid model by inputting multi-dimensional feature vectors into the hybrid model, training the hybrid model, constructing a hybrid neural network, identifying multiple types of risks, and outputting risk prediction results. The parameter optimization and self-evolution module is based on the risk prediction results and establishes a two-layer optimization structure to optimize the parameters and self-evolve the hybrid neural network.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method for pipeline evaluation and design optimization that integrates flow simulation and machine learning as described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the method for pipeline evaluation and design optimization that integrates flow simulation and machine learning as described in any one of claims 1 to 7.