Simulation and optimization method of natural gas industrial system in rough environment

By building a physical constraint diffusion model and a federal transfer learning framework, the differences in data distribution across environments were eliminated, and a dynamic simulation engine was built with multi-physics coupled equations, which solved the problems of insufficient multi-field coupled simulation accuracy and poor generalization of the model in extreme environments of natural gas industrial systems, and achieved high-precision real-time response and robustness.

CN120197528AActive Publication Date: 2025-06-24KARAMAY SANDA TESTING & ANALYSIS CO LTD

Patent Information

Application Number
CN202510685264.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-27
Publication Date
2025-06-24
Estimated Expiration
2045-05-27

AI Technical Summary

Technical Problem

The poor generalization of the model caused by insufficient multi-field coupled simulation accuracy and different data distributions across nodes in extreme environments limits the real-time risk control capabilities.

Method used

By collecting environmental data, a physical constraint diffusion model is constructed, an extreme environmental data set is generated, and combining real sensor data from multiple gas field nodes, a federated transfer learning framework is pre-trained to eliminate the differences in cross-environmental data distribution, and a global environmental threat prediction model is constructed. Combining the global environmental threat prediction model with multi-physics coupling equations, a dynamic simulation engine is built, real-time sensor data flow is received, multi-physics coupling behavior of pipeline networks, and simulation results of multi-dimensional performance indicators are output. Control variables are generated through population evolution and dynamic strategy adjustments, and the global environmental threat prediction model is updated.

Benefits of technology

It improves the physical consistency of multi-field coupled simulation, enhances the generalization ability of global threat prediction models, and improves the real-time response accuracy and robustness of natural gas industrial systems in extreme environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120197528A_ABST
    Figure CN120197528A_ABST
Patent Text Reader

Abstract

The invention discloses a simulation and optimization method for a natural gas industrial system in a rough environment, and relates to the technical field of intelligent optimization, and the method comprises the steps: collecting environment data, constructing a physical constraint diffusion model, and generating an extreme environment data set through embedding a hydrodynamic equation and a thermodynamic law; in combination with real sensor data of a plurality of gas field nodes, pre-training a federated transfer learning framework, eliminating cross-environment data distribution difference through resistance feature alignment, and constructing a global environment threat prediction model; based on the simulation result and the real-time sensor data flow, a multi-target fitness function is constructed, and control variables are generated through population evolution and dynamic strategy adjustment; and inputting the control variable into a pre-trained digital twinborn verification model, comparing a simulation result with a residual error of a real-time sensor data stream, triggering an incremental learning mechanism, and updating a global environmental threat prediction model. According to the method, the high-fidelity extreme environment data set is generated through the physical constraint diffusion model, and the physical consistency of multi-field coupling simulation is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of intelligent optimization, and particularly to a method for simulating and optimizing a natural gas industrial system in a rough environment. Background Art

[0002] In recent years, the safety monitoring and dynamic optimization of natural gas industrial systems in extreme environments have gradually developed towards multi-physical field coupling modeling and data-driven decision-making. The multi-field coupling simulation method of computational fluid dynamics has been widely used for simulating the behavior of pipeline networks. The generalization ability of the model is improved through joint training of distributed node data. Digital twins achieve real-time monitoring of system states through virtual-real mapping. Multi-objective optimization algorithms can balance safety and efficiency goals.

[0003] Traditional simulation models rely on limited historical data to generate extreme environment datasets, resulting in the lack of physical constraints and distribution biases; the handling of cross-node data heterogeneity in the federated learning framework still remains at the level of static feature alignment and cannot eliminate the distribution differences brought about by spatio-temporal asynchrony, seriously restricting the real-time risk control ability of natural gas industrial systems in extreme environments. Summary of the Invention

[0004] In view of the above existing problems, the present invention is proposed.

[0005] Therefore, the present invention provides a method for simulating and optimizing a natural gas industrial system in a rough environment to solve the problems of insufficient accuracy of multi-field coupling simulation of natural gas industrial systems in complex environments and poor model generalization caused by cross-node data distribution differences.

[0006] To solve the above technical problems, the present invention provides the following technical solutions: In a first aspect, the present invention provides a method for simulating and optimizing a natural gas industrial system in a rough environment, which includes collecting environmental data, constructing a physical constraint diffusion model, and generating an extreme environment dataset by embedding fluid mechanics equations and thermodynamic laws; Combining the real sensor data of multiple gas field nodes, pre-training a federated transfer learning framework, eliminating cross-environment data distribution differences through adversarial feature alignment, and constructing a global environmental threat prediction model; Combining the global environmental threat prediction model with multi-physical field coupling equations to construct a dynamic simulation engine, receiving real-time sensor data streams, simulating the multi-physical field coupling behavior of the pipeline network in extreme environments, and outputting simulation results of multi-dimensional performance indicators; Based on the simulation results and real-time sensor data streams, constructing a multi-objective fitness function, and generating control variables through population evolution and dynamic strategy adjustment; Input the control variables into the pre-trained digital twin verification model, compare the residuals between the simulation results and the real-time sensor data stream, trigger the incremental learning mechanism, and update the global environmental threat prediction model.

[0007] As a preferred solution of the simulation and optimization method for the natural gas industrial system in a rough environment according to the present invention, wherein: the steps of generating the extreme environment data set are as follows. Collect environmental data, perform normalization processing, generate a spatio-temporally continuous environmental data matrix, and construct a physical constraint diffusion model. Embed the fluid mechanics equation and the thermodynamics law into the physical constraint diffusion model, and generate extreme environment condition parameters within a preset multi-field critical range through the Monte Carlo sampling method. Perform adversarial sampling on the extreme environment condition parameters to generate a multi-physical field coupling data set. Perform spatio-temporal alignment and noise filtering on the multi-physical field coupling data set to generate an extreme environment data set.

[0008] As a preferred solution of the simulation and optimization method for the natural gas industrial system in a rough environment according to the present invention, wherein: the preset multi-field critical range includes a preset temperature threshold range, a pressure threshold range, and a corrosive gas concentration threshold range.

[0009] As a preferred solution of the simulation and optimization method for the natural gas industrial system in a rough environment according to the present invention, wherein: the steps of constructing the global environmental threat prediction model are as follows. Perform spatio-temporal feature mapping on the real sensor data of each gas field node to generate a dynamic feature projection. Construct an adversarial distribution alignment loss function based on the dynamic feature projection, and calculate the feature difference between nodes through the Gaussian time domain kernel. Alternately train the adversarial discriminator and the dynamic feature projection layer through the adversarial distribution alignment loss function until the feature difference between nodes converges within a preset difference threshold. Calculate the federated aggregation weight according to the converged dynamic feature projection, and construct a global environmental threat prediction model.

[0010] As a preferred solution of the simulation and optimization method for the natural gas industrial system in a rough environment according to the present invention, wherein: the steps of outputting the simulation results of multi-dimensional performance indicators are as follows. Associate the output parameters of the global environmental threat prediction model with the control terms of the multi-physical field coupling equation to construct the initialization parameters of the dynamic simulation engine. Construct an adaptive spatio-temporal grid based on the initialization parameters, and dynamically adjust the grid node density according to the temperature and pressure changes in the real-time sensor data stream. Embed the real-time sensor data stream into the multi-physics coupling equation through a Gaussian time-domain kernel to generate the corrected hydrodynamic equation and thermodynamic equation; Solve the corrected hydrodynamic equation and thermodynamic equation to obtain the multi-physics coupling behavior of the pipeline network in extreme environments, calculate multi-dimensional performance indicators, and output simulation results.

[0011] As a preferred solution of the simulation and optimization method for the natural gas industrial system in the rough environment described in the present invention, wherein: the multi-physics coupling behavior includes the behavior of the flow velocity field, pressure field, and temperature field; The multi-dimensional performance indicators include safety indicators, efficiency indicators, and corrosion rate indicators.

[0012] As a preferred solution of the simulation and optimization method for the natural gas industrial system in the rough environment described in the present invention, wherein: the generation of control variables through population evolution and dynamic strategy adjustment is specifically as follows, Construct a multi-objective fitness function based on the simulation results, calculate the variance of each sensor data according to the real-time sensor data stream within a preset time window, and generate a variance vector; Initialize the hybrid population through the multi-objective fitness function, perform non-dominated sorting on the individuals of the hybrid population, and calculate the information entropy weight of the Pareto front solution set; Select individuals of the hybrid population according to the information entropy weight, and perform a directional mutation operation on the variance vector; Update the control variable adjustment strategy through the reinforcement learning policy network to generate a new generation of hybrid population; Generate control variables using the Pareto front solution set of the new generation of hybrid population.

[0013] As a preferred solution of the simulation and optimization method for the natural gas industrial system in the rough environment described in the present invention, wherein: the update of the global environmental threat prediction model is specifically as follows, Input the control variables into the pre-trained digital twin verification model to generate control variable simulation data; Calculate the residual between the control variable simulation data and the real-time sensor data stream. If it exceeds the preset residual threshold, trigger the incremental learning mechanism and collect the incremental training data set of the real-time sensor data stream and the control variable simulation data; Update the parameters of the global environmental threat prediction model through the incremental training data set to generate the updated global environmental threat prediction model.

[0014] In a second aspect, the present invention provides a computer device, including a memory and a processor, where the memory stores a computer program, and wherein: when the computer program is executed by the processor, any step of the simulation and optimization method for the natural gas industrial system in the rough environment described in the first aspect of the present invention is implemented.

[0015] In a third aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored, wherein: when the computer program is executed by a processor, any step of the method for simulating and optimizing a natural gas industrial system in a rough environment as described in the first aspect of the present invention is implemented.

[0016] The beneficial effects of the present invention are as follows: generating a high-fidelity extreme environment data set through a physical constraint diffusion model to improve the physical consistency of multi-field coupling simulation; based on a federated transfer learning framework for adversarial feature alignment, eliminating the spatio-temporal heterogeneity of cross-node data and enhancing the generalization ability of the global threat prediction model; improving the real-time response accuracy and robustness of the natural gas industrial system in an extreme environment. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0018] Figure 1 It is a flowchart of the method for simulating and optimizing a natural gas industrial system in a rough environment; Figure 2 It is a flowchart of generating an extreme environment data set; Figure 3 It is a flowchart of constructing a global environment threat prediction model; Figure 4 It is a flowchart of generating control variables by population evolution and dynamic strategy adjustment. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0019] In order to make the above objects, features and advantages of the present invention more obvious and understandable, the following will give a detailed description of the specific embodiments of the present invention with reference to the drawings of the specification.

[0020] In the following description, many specific details are set forth in order to fully understand the present invention. However, the present invention can also be implemented in other ways different from those described herein. Those skilled in the art can make similar extensions without departing from the connotation of the present invention. Therefore, the present invention is not limited by the specific embodiments disclosed below.

[0021] Secondly, the so-called "one embodiment" or "embodiment" herein refers to a specific feature, structure or characteristic that can be included in at least one implementation manner of the present invention. The "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that excludes other embodiments.

[0022] Refer toFigures 1 to 4 , which is an embodiment of the present invention. This embodiment provides a method for simulating and optimizing a natural gas industrial system in a rough environment, including the following steps: S1. Collect environmental data, construct a physical constraint diffusion model, and generate an extreme environment data set by embedding fluid mechanics equations and thermodynamic laws.

[0023] Furthermore, collect environmental data, perform normalization processing, generate a spatio-temporally continuous environmental data matrix, and construct a physical constraint diffusion model; It should be noted that the environmental data includes temperature, pressure, and real-time corrosive gas concentration data.

[0024] Specifically, collect real-time temperature data, real-time pressure data, and real-time corrosive gas concentration data at a fixed frequency through distributed temperature sensors, pressure sensors, and corrosive gas concentration sensors deployed in the natural gas pipeline network; map them to the interval from 0 to 1 respectively through the min-max normalization method to eliminate the interference caused by dimensional differences while retaining the distribution form of the environmental data; According to the normalized real-time temperature data, real-time pressure data, and real-time corrosive gas concentration data, align the discrete data points in the time dimension and fill in the missing values in the space dimension through the cubic spline interpolation method; arrange the interpolation results into a three-dimensional matrix according to the time stamp and spatial position. The row direction of the matrix is the time series, the column direction is the spatial coordinate, and the channel dimension is the temperature, pressure, and corrosive gas concentration parameters, forming a spatio-temporally continuous environmental data matrix; Use the spatio-temporally continuous environmental data matrix as the input to construct a diffusion model with a Markov chain as the architecture; in the forward process of the diffusion model, gradually inject Gaussian noise into the environmental data matrix according to the noise addition rule of the Markov chain; in the reverse process, optimize the weight parameters of the denoising network through the gradient descent algorithm to minimize the mean square error between the predicted noise and the real noise; generate a data distribution that conforms to physical laws through the trained diffusion model to complete the construction of the physical constraint diffusion model.

[0025] Embed fluid mechanics equations and thermodynamic laws in the physical constraint diffusion model, and generate extreme environment condition parameters within a preset multi-field critical range through the Monte Carlo sampling method; Specifically, transform the Navier-Stokes equation in the fluid mechanics equation and the ideal gas state equation in the thermodynamic law into partial differential constraint terms; jointly optimize the weighted sum of the noise prediction error and the partial differential constraint terms of the physical constraint diffusion model through the gradient descent algorithm; use the Monte Carlo sampling method to search for multi-field critical parameters within a preset multi-field critical range to generate extreme environment condition parameters that satisfy the fluid mechanics equation and the thermodynamic law.

[0026] It should be noted that the preset multi-field critical range includes the preset temperature threshold range, pressure threshold range, and corrosive gas concentration threshold range.

[0027] The preset temperature threshold range is based on the temperature resistance limit of the natural gas pipeline material and historical accident data. For example, the preset range is from -50°C to 200°C, covering extreme working conditions such as extremely cold cracking and high-temperature expansion. The preset pressure threshold range is based on the pipeline design pressure grade and burst test data. For example, the preset range is from 0.1 MPa to 50 MPa, covering scenarios from low-pressure leakage to high-pressure explosion. The preset corrosive gas concentration threshold range is referenced from corrosion rate acceleration experiments and safety specifications. For example, the preset range for hydrogen sulfide concentration is from 0 to 500 ppm, covering the safety threshold to the critical value of rapid material corrosion.

[0028] Extreme environmental condition parameters include extreme temperature range, extreme pressure range, and extreme corrosive gas concentration range. The extreme temperature range refers to the extremely high or extremely low temperature intervals that the pipeline network may encounter, used to define the generation boundary of the temperature field. The extreme pressure range refers to the extremely high or extremely low pressure intervals that the fluid inside the pipeline may reach, used to define the generation boundary of the pressure field. The extreme corrosive gas concentration range refers to the possible highest concentration interval of corrosive gas (such as hydrogen sulfide) in the pipeline environment, used to define the generation boundary of the corrosive gas concentration field.

[0029] Perform adversarial sampling on the extreme environmental condition parameters to generate a multi-physical field coupling data set. Specifically, during the training process of the physical constraint diffusion model, construct a generative adversarial network framework. The generator network receives the extreme temperature range, extreme pressure range, and extreme corrosive gas concentration range as input conditions and outputs extreme environmental condition parameters that conform to the fluid mechanics equations and thermodynamics laws. The discriminator network evaluates the rationality of the generated parameters based on the loss function of the physical constraint diffusion model and forces the parameters output by the generator to approximate the true extreme environmental distribution through adversarial training. Input the generated extreme environmental condition parameters into the physical constraint diffusion model to perform multi-field coupling simulation and generate a multi-physical field coupling data set containing the extreme temperature field, extreme pressure field, and extreme corrosive gas concentration field.

[0030] It should be noted that the multi-physical field coupling data set includes the extreme temperature field, extreme pressure field, and extreme corrosive gas concentration field. The extreme temperature field refers to the temperature value distribution of each spatial point in the environment where the natural gas pipeline network is located, describing the location and intensity of high-temperature or low-temperature regions. The extreme pressure field refers to the distribution of static or dynamic pressure values of the fluid inside the natural gas pipeline network, reflecting the fluid flow state and the stress distribution borne by the pipe wall; The extreme corrosive gas concentration field refers to the distribution of concentration values of corrosive gases such as hydrogen sulfide and carbon dioxide in the natural gas pipeline environment, which is used to quantify the degree of local corrosion risk.

[0031] Perform spatio-temporal alignment and noise filtering on the multi-physical field coupling dataset to generate an extreme environment dataset.

[0032] Specifically, perform spatio-temporal alignment operations on the extreme temperature field, extreme pressure field, and extreme corrosive gas concentration field in the multi-physical field coupling dataset. Use the cubic spline interpolation method to align discrete data points in the time dimension and fill in missing values in the space dimension; perform noise filtering on the dataset after spatio-temporal alignment through the wavelet transform method, decompose the high-frequency noise components of the signal and then reconstruct the low-frequency effective signal; integrate the denoised extreme temperature field, extreme pressure field, and extreme corrosive gas concentration field into a three-dimensional matrix with unified timestamps and spatial coordinates to form an extreme environment dataset that conforms to the fluid mechanics equations and thermodynamics laws.

[0033] S2. Combine the real sensor data of multiple gas field nodes, pre-train the federated transfer learning framework, eliminate the cross-environment data distribution differences through adversarial feature alignment, and construct a global environmental threat prediction model.

[0034] Perform spatio-temporal feature mapping on the real sensor data of each gas field node to generate a dynamic feature projection; Specifically, within the range from the start timestamp to the end timestamp of the time window, perform an integration operation on the timestamps collected by the real sensor data. During the integration process, calculate the first-order partial derivative of the non-linear mapping function with respect to time, and at the same time calculate the square of the norm of the spatial gradient operator of the non-linear mapping function with respect to the real sensor data matrix. Multiply the square of the norm of the spatial gradient operator by the stability coefficient and then take the negative exponential function as the dynamic decay factor. Multiply the first-order partial derivative of the non-linear mapping function with respect to time by the dynamic decay factor and then integrate along the time window to generate a dynamic feature projection.

[0035] The dynamic feature projection, the expression is: ; In the formula, represents the dynamic feature projection of the gas field node , represents the gas field node index, represents the real sensor data matrix of the gas field node , represents the dynamic feature projection parameter of the gas field node , Indicates the start timestamp of the time window for real sensor data acquisition, Indicates the end timestamp of the time window for real sensor data acquisition, Indicates from to Integrate the timestamps of the time window for real sensor data acquisition, Indicates the non - linear mapping function, Indicates the stability coefficient, Indicates the spatial gradient operator for the real sensor data matrix, Indicates the current time integration, Indicates the partial differential operator, Indicates the current time Of the partial derivative.

[0036] It should be noted that the stability coefficient is calibrated by gradient norm regularization and is used to suppress the gradient explosion in the feature projection process. For example, the value range is .

[0037] Construct an adversarial distribution alignment loss function based on dynamic feature projection, and calculate the feature difference between nodes through a Gaussian time - domain kernel; Specifically, traverse all pairwise combinations of all gas field nodes within the total number of gas field nodes, calculate the squared Euclidean distance of the dynamic feature projection of each pair of gas field nodes, use the time - alignment center point as the mean parameter of the Gaussian time - domain kernel function, use the time tolerance parameter as the standard deviation parameter of the Gaussian time - domain kernel function, multiply the squared Euclidean distance by the value of the Gaussian time - domain kernel function and then integrate over the range from negative infinity to positive infinity for the current time, accumulate and sum up the integration results of all gas field node combinations and perform normalization processing to generate the adversarial distribution alignment loss function.

[0038] Construct an adversarial distribution alignment loss function based on dynamic feature projection, and the expression is: ; In the formula, Indicates the adversarial distribution alignment loss function, Indicates the total number of gas field nodes, Indicates for gas field node From 1 to Accumulate and sum up all gas field nodes, Indicates for other nodes to Accumulate and sum up all gas field nodes, Indicates the time tolerance parameter, Indicates for the current time Integrate over the range from negative infinity to positive infinity, Indicates other nodes Dynamic feature projection Indicates other nodes True sensor data matrix Indicates the time-aligned center point

[0039] Alternately train the adversarial discriminator and the dynamic feature projection layer through the adversarial distribution alignment loss function until the feature difference between nodes converges within a preset difference threshold Calculate the federal aggregation weight according to the converged dynamic feature projection, and construct a global environmental threat prediction model

[0040] Specifically, sum up the dynamic feature projections corresponding to the true sensor data matrices of all samples of the gas field nodes, use the sum result as the numerator, sum up the dynamic feature projections of all samples of all gas field nodes, use the sum result as the denominator, and divide the numerator by the denominator to generate the federal aggregation weight of the gas field nodes

[0041] Multiply the federal aggregation weight by the gradient of the loss function of the environmental threat prediction for the global environmental threat prediction model and then sum, multiply the sum result by the adaptive learning rate, and subtract it from the parameters of the global environmental threat prediction model updated in the current iteration to obtain the global environmental threat prediction model

[0042] Calculate the federal aggregation weight according to the converged dynamic feature projection, and the expression is ; In the formula Indicates the gas field node Federal aggregation weight Indicates the sample From 1 to All values are summed up Indicates the sample index Indicates the total number of samples Indicates the gas field node Of the The true sensor data matrix of the th sample

[0043] Construct a global environmental threat prediction model, and the expression is ; In the formula Indicates the global environmental threat prediction model Indicates the Global environmental threat prediction model updated after the th iteration Indicates the number of iteration updates Indicates the Global environmental threat prediction model updated after the th iteration Indicates the adaptive learning rate Represents the gradient operator of the global environmental threat prediction model, Represents the loss function of environmental threat prediction, Represents the gas field node of the threat label.

[0044] S3. Combine the global environmental threat prediction model with the multi-physics field coupling equation to construct a dynamic simulation engine, receive real-time sensor data streams, simulate the multi-physics field coupling behavior of the pipeline network in extreme environments, and output the simulation results of multi-dimensional performance indicators.

[0045] Furthermore, correlate the output parameters of the global environmental threat prediction model with the control terms of the multi-physics field coupling equation to construct the initialization parameters of the dynamic simulation engine; Specifically, multiply the time derivative of the threat probability value output by the global environmental threat prediction model by the Gaussian spatial decay kernel of the threat location, generate a spatio-temporal grid density function through spatio-temporal integration, combine the spatio-temporal grid density function with the dynamic data assimilation weight function of the real-time sensor data to generate a real-time data assimilation weight function, multiply the real-time data assimilation weight function by the spatial gradient of the threat probability value output by the global environmental threat prediction model, and use the product as the external source driving term of the modified hydrodynamic equation and the thermodynamic energy equation. Based on the initial distributions of the velocity field, pressure field, and temperature field in the modified hydrodynamic equation and the thermodynamic energy equation, construct the initialization parameters of the dynamic simulation engine.

[0046] Construct an adaptive spatio-temporal grid based on the initialization parameters, and dynamically adjust the grid node density according to the temperature and pressure changes in the real-time sensor data stream; Specifically, multiply the time derivative of the threat probability value output by the global environmental threat prediction model by the Gaussian decay kernel function of the threat location coordinates, perform spatial integration in the three-dimensional geometric space domain of the natural gas pipeline network to generate an adaptive spatio-temporal grid density function, combine the gradient amplitudes of the temperature and pressure changes in the real-time sensor data stream with the threat influence radius to generate a local grid refinement factor, multiply the local grid refinement factor by the adaptive spatio-temporal grid density function point by point, and then update the weight coefficient of the Gaussian decay kernel function according to the time stamp. Achieve a high-resolution characterization of the threat diffusion path and the temperature and pressure change region by dynamically adjusting the grid node density in the three-dimensional geometric space domain, and output a non-uniform adaptive spatio-temporal grid distribution that integrates the real-time sensor data stream.

[0047] Construct an adaptive spatio-temporal grid based on the initialization parameters, and the expression is: ; In the formula, represents the three-dimensional position in the natural gas pipeline network and the current time The adaptive spatio-temporal grid density function at represents the geometric spatial domain of the natural gas pipeline network, represents the three-dimensional geometric spatial domain of the natural gas pipeline network for integration, represents the natural exponential function, represents the threat probability value output by the global environmental threat prediction model, represents the threat location coordinates in the natural gas pipeline network, represents the threat influence radius, represents the integration of the three-dimensional positions in the natural gas pipeline network.

[0048] Embed the real-time sensor data stream into the multi-physics coupling equation through the Gaussian time-domain kernel to generate the modified hydrodynamic equation and thermodynamic equation; Specifically, traverse all sensor nodes within the total number of sensor nodes, multiply the confidence weight of the sensor node by the real-time sensor data and then divide by the product of the time decay coefficient and the Gaussian kernel normalization coefficient, multiply the product result by the integration result of the adaptive spatio-temporal grid density function within the time window to generate the fusion weight that synthesizes all real-time sensor data streams, multiply the fusion weight by the spatial gradient of the threat probability value output by the global environmental threat prediction model as the external source driving term of the modified hydrodynamic equation, multiply the fusion weight by the time derivative of the threat probability value output by the global environmental threat prediction model as the external source driving term of the modified thermodynamic energy equation, and output the modified hydrodynamic equation and thermodynamic energy equation that fuse the real-time sensor data stream.

[0049] Generate the modified hydrodynamic equation and thermodynamic equation, and the expression is: ; In the formula, represents the three-dimensional position in the natural gas pipeline network and the current time at the fusion weight that synthesizes all real-time sensor data streams, represents the sensor node index, represents the total number of sensor nodes, represents the summation of all sensor nodes, represents the sensor node 's confidence weight, represents the sensor node at the current time at the real-time data, represents the sensor node 's time decay coefficient, represents from to Integral of represents the current time and the historical moment time difference of represents the three-dimensional position in the natural gas pipeline network and the historical moment adaptive spatio-temporal grid density function of represents the integral of the historical moment .

[0050] It should be noted that the time decay coefficient of the sensor node is dynamically calibrated through the analysis of sensor historical data noise. For example, the value range of high-frequency sensors is [1, 5], and the value range of low-frequency sensors is [30, 60].

[0051] Solve the modified hydrodynamic equation and thermodynamic equation, obtain the multi-physical field coupling behavior of the pipeline network under extreme conditions, calculate multi-dimensional performance indicators, and output the simulation results.

[0052] Specifically, the finite volume method is used to discretize the spatial gradient terms of the velocity field vector, pressure field scalar, and temperature field scalar, and the implicit Euler method is used to discretize the time partial derivative terms. The spatial gradient or time derivative terms of the fusion weight and threat probability value are used as external source terms and substituted into the discrete equation. The non-linear equations are solved by the Newton-Raphson iteration method to obtain the velocity field distribution, pressure field distribution, and temperature field distribution at the current time step; based on the velocity field distribution, calculate the maximum flow velocity of the natural gas pipeline network, based on the pressure field distribution, calculate the pressure fluctuation amplitude, and based on the temperature field distribution, calculate the temperature gradient amplitude. Combine the spatial gradient and time derivative of the threat probability value to generate multi-dimensional performance indicators; output the simulation results.

[0053] Solve the modified hydrodynamic equation, and the expression is: ; In the formula, represents the fluid density, represents the velocity field vector, represents the velocity field vector partial derivative with respect to the current time , represents the velocity field vector gradient of represents the pressure field scalar gradient of represents the pressure field scalar, represents the dynamic viscosity coefficient, represents the gradient of the threat probability value output by the global environmental threat prediction model.

[0054] Solve the modified thermodynamic equation, the expression of which is: ; In the formula, represents the temperature field scalar, represents the temperature field scalar with respect to the partial derivative of the current time , represents the temperature field scalar gradient of, represents the thermal diffusivity, represents the partial derivative of the threat probability value output by the global environmental threat prediction model with respect to the current time .

[0055] It should be noted that the thermal diffusivity is calibrated by the inherent thermal physical properties of the material. For common steel materials of natural gas pipelines, such as carbon steel, the value is .

[0056] The multi-physical field coupling behavior includes the flow velocity field, pressure field and temperature field behaviors; It should be noted that the flow velocity field behavior refers to the velocity vector distribution of natural gas at each three-dimensional position in the pipeline network and its flow characteristics changing with time, including the combined effects of convective acceleration, viscous stress and external driving force.

[0057] The pressure field behavior refers to the pressure scalar distribution at each point in the pipeline network and its spatio-temporal evolution law, reflecting the spatial correlation of pressure fluctuations and leakage risks under extreme environments.

[0058] The temperature field behavior refers to the temperature scalar distribution and dynamic change process of the pipeline material and the fluid, characterizing the synergistic effects of heat conduction, convective heat transfer and external heat drive.

[0059] The multi-dimensional performance indicators include safety indicators, efficiency indicators and corrosion rate indicators.

[0060] It should be noted that the safety indicator is a quantitative parameter generated by combining the gradient of the threat probability value and the amplitude of pressure field fluctuations, and is used to evaluate the structural integrity risk level of the natural gas pipeline network under extreme environments.

[0061] The efficiency indicator is a transport efficiency parameter calculated based on the flow velocity field distribution and the dynamic evolution of the temperature field, reflecting the transport efficiency and energy loss ratio of natural gas in the pipeline network per unit time.

[0062] The corrosion rate indicator is a material degradation rate parameter constructed by the temperature field gradient and the time derivative of the threat probability value, characterizing the annual thinning amount of the pipeline wall thickness due to chemical corrosion and thermal stress.

[0063] S4. Based on the simulation results and the real-time sensor data stream, construct a multi-objective fitness function, and generate control variables through population evolution and dynamic strategy adjustment.

[0064] Furthermore, construct a multi-objective fitness function based on the simulation results. According to the real-time sensor data stream, calculate the variance of each sensor data within a preset time window to generate a variance vector. It should be noted that the preset time window refers to a fixed time interval preset in the calculation of the federated aggregation weight and the processing of the real-time sensor data stream. The time interval is defined by the start timestamp and the end timestamp of the time window.

[0065] Specifically, extract multi-dimensional performance index data, divide the timestamp sequence of the real-time sensor data stream according to the preset time window, calculate the statistical variance of the safety index, efficiency index, and corrosion rate index within each time window, sort the variances of different time windows according to the sensor node index to generate a variance vector, and combine the variance vector corresponding to the multi-dimensional performance index with the federated aggregation weight in a linear weighting manner to generate an evaluation criterion for the optimal solution of the multi-objective fitness function.

[0066] Initialize the hybrid population with the multi-objective fitness function, perform non-dominated sorting on the individuals of the hybrid population, and calculate the information entropy weight of the Pareto front solution set. Specifically, use the federated aggregation weight, the safety index variance vector, the efficiency index variance vector, and the corrosion rate index variance vector as the gene coding dimensions, randomly generate a set of candidate individuals that satisfy the normalization constraint of the federated aggregation weight, and calculate the multi-objective fitness function values of each candidate individual on the safety index, efficiency index, and corrosion rate index. Compare the superiority and inferiority of different candidate individuals in terms of the multi-objective fitness function values based on the Pareto dominance relationship, divide the non-dominated individuals into the first front layer, and divide the individuals dominated by the individuals in the first front layer into the second front layer, and so on to generate a hierarchical sorting result. Statistically calculate the neighborhood distribution density of each individual in the Pareto front solution set in the multi-objective fitness function value space, calculate the individual entropy value according to the distribution density, and normalize the linear combination of the individual entropy value and the federated aggregation weight to generate the information entropy weight.

[0067] Select individuals from the hybrid population according to the information entropy weight, and perform a directional mutation operation on the variance vector. Specifically, the normalized value after linearly combining the information entropy weight and the federated aggregation weight is used as the selection probability, and roulette wheel selection is performed on the individuals in the mixed population, retaining the individuals with high probability and eliminating the individuals with low probability. Based on the sparsity of the distribution of the Pareto front solution set in the multi-objective fitness function value space, Gaussian random perturbations are applied to the safety index variance vector, the efficiency index variance vector, and the corrosion rate index variance vector. The perturbation amplitude is inversely proportional to the information entropy weight. The federated aggregation weight normalization constraint verification is performed on the perturbed variance vectors to generate a set of mutant individuals that meet the multi-objective optimization conditions.

[0068] Update the control variable adjustment strategy through the reinforcement learning policy network to generate a new generation of mixed population; Specifically, input the federated aggregation weight, the safety index variance vector, the efficiency index variance vector, and the corrosion rate index variance vector of the current mixed population individuals into the state space of the policy network. The policy network outputs an action vector of the federated aggregation weight adjustment ratio, the variance vector perturbation amplitude and direction. Perform crossover and mutation operations on the action vector and the gene encoding of the mixed population individuals to generate a set of candidate new individuals containing the federated aggregation weight correction term and the variance vector offset. Substitute the candidate new individuals into the multi-objective fitness function to calculate the fitness values of the safety index, the efficiency index, and the corrosion rate index. Screen the Pareto front solution set through non-dominated sorting to generate a new generation of mixed population.

[0069] Generate control variables using the Pareto front solution set of the new generation of mixed population.

[0070] Specifically, extract the optimal parameter combination of the federated aggregation weight, the safety index variance vector, the efficiency index variance vector, and the corrosion rate index variance vector from the Pareto front solution set. Take the median of the federated aggregation weight, and take the mean of the safety index variance vector, the efficiency index variance vector, and the corrosion rate index variance vector respectively, and then perform statistical aggregation. Substitute the statistical aggregation result into the federated aggregation weight normalization constraint equation to generate a federated aggregation weight correction factor. Fuse the federated aggregation weight correction factor and the variance vector mean according to the multi-objective optimization conditions to output the control variables.

[0071] It should be noted that the control variables include the federated aggregation weight control variable, the safety index variance control variable, the efficiency index variance control variable, and the corrosion rate index variance control variable.

[0072] S5. Input the control variables into the pre-trained digital twin verification model, compare the residual between the simulation result and the real-time sensor data stream, trigger the incremental learning mechanism, and update the global environmental threat prediction model.

[0073] Furthermore, input the control variables into the pre-trained digital twin verification model to generate control variable simulation data; Specifically, the federated aggregation weight control variable acts on the parameter update process of the global environmental threat prediction model. The safety index variance control variable, the efficiency index variance control variable, and the corrosion rate index variance control variable are respectively combined with the external driving terms of the multi-physics field coupling equations. The velocity field distribution, pressure field distribution, and temperature field distribution are solved through the modified hydrodynamic equation and thermodynamic equation. The spatial gradient and time derivative of the threat probability value are substituted into the adaptive spatio-temporal grid density function to generate the dynamic grid node density. Based on the preset time window, the timestamps of the real-time sensor data stream are integrated and aligned, and the simulation data of the control variable is output.

[0074] Calculate the residual between the simulation data of the control variable and the real-time sensor data stream. If it exceeds the preset residual threshold, trigger the incremental learning mechanism and collect the incremental training data set of the real-time sensor data stream and the simulation data of the control variable. It should be noted that the preset residual threshold is comprehensively set based on the historical evolution error of the federated aggregation weight control variable, the statistical distribution characteristics of the safety index variance control variable and the efficiency index variance control variable, and the material degradation allowable deviation range of the corrosion rate index variance control variable. For example, the safety index residual threshold is 5%-15%, the efficiency index residual threshold is 3%-10%, the corrosion rate residual threshold is 1%-5%, and the comprehensive residual threshold is 8%-20%.

[0075] Specifically, within the preset time window, calculate the root mean square error between the simulation data of the control variable and the measured data of the corresponding sensor nodes in the real-time sensor data stream at each timestamp, and weight-average the root mean square errors of each dimension to generate the comprehensive residual. If the comprehensive residual exceeds the preset residual threshold, trigger the incremental learning mechanism and store the real-time sensor data stream and the simulation data of the control variable in the current time window in chronological order as the incremental training data set.

[0076] Update the parameters of the global environmental threat prediction model through the incremental training data set to generate the updated global environmental threat prediction model.

[0077] Specifically, input the velocity field distribution, pressure field distribution, temperature field distribution, and threat probability distribution in the incremental training data set, together with the federated aggregation weight control variable, the safety index variance control variable, the efficiency index variance control variable, and the corrosion rate index variance control variable, into the parameter optimization process of the global environmental threat prediction model. Construct a joint loss function based on the external driving terms of the modified hydrodynamic equation and the thermodynamic energy equation, and use the stochastic gradient descent method to perform backpropagation gradient update on the time derivative term and spatial gradient term of the threat probability value of the global environmental threat prediction model. At the same time, combine the federated aggregation weight control variable to optimize the constraint of the external driving term of the multi-physics field coupling equation to generate the updated global environmental threat prediction model.

[0078] This embodiment also provides a computer device, which is applicable to the simulation and optimization method of the natural gas industrial system in a rough environment, and includes: 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 simulation and optimization method of the natural gas industrial system in a rough environment as proposed in the above embodiment.

[0079] The computer device can be a terminal, and the computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a carrier network, NFC (Near Field Communication), or other technologies. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a button, a trackball, or a touchpad provided on the outer shell of the computer device, or an external keyboard, a touchpad, or a mouse, etc.

[0080] This embodiment also provides a storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements the simulation and optimization method of the natural gas industrial system in a rough environment as proposed in the above embodiment; the storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic memory, flash memory, a magnetic disk, or an optical disc.

[0081] In summary, the present invention: generates a high-fidelity extreme environment dataset through a physical constraint diffusion model to improve the physical consistency of multi-field coupling simulation; eliminates the spatio-temporal heterogeneity of cross-node data based on a federated transfer learning framework with adversarial feature alignment to enhance the generalization ability of the global threat prediction model; and improves the real-time response accuracy and robustness of the natural gas industrial system in extreme environments.

[0082] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention, and they should all be covered within the scope of the claims of the present invention.

Claims

1. A simulation and optimization method for natural gas industrial systems in a rough environment, characterized in that: Including, Collecting environmental data, constructing a physical constraint diffusion model, and generating an extreme environment dataset by embedding hydrodynamic equations and thermodynamic laws; Combining the real sensor data of multiple gas field nodes, pre-training a federated transfer learning framework, eliminating the cross-environment data distribution differences through adversarial feature alignment, and constructing a global environmental threat prediction model; Combining the global environmental threat prediction model with the multi-physics field coupling equation to construct a dynamic simulation engine, receiving real-time sensor data streams, simulating the multi-physics field coupling behavior of the pipeline network in extreme environments, and outputting the simulation results of multi-dimensional performance indicators; Based on the simulation results and real-time sensor data streams, constructing a multi-objective fitness function, and generating control variables through population evolution and dynamic strategy adjustment; Inputting the control variables into the pre-trained digital twin verification model, comparing the residuals between the simulation results and the real-time sensor data streams, triggering the incremental learning mechanism, and updating the global environmental threat prediction model.

2. The simulation and optimization method of the natural gas industrial system in a rough environment according to claim 1, characterized in that: The specific steps for generating the extreme environment dataset are as follows. Collecting environmental data, performing normalization processing, generating a spatio-temporally continuous environmental data matrix, and constructing a physical constraint diffusion model; Embedding hydrodynamic equations and thermodynamic laws in the physical constraint diffusion model, and generating extreme environment condition parameters within a preset multi-field critical range through the Monte Carlo sampling method; Performing adversarial sampling on the extreme environment condition parameters to generate a multi-physics field coupling dataset; Performing spatio-temporal alignment and noise filtering on the multi-physics field coupling dataset to generate an extreme environment dataset.

3. The simulation and optimization method of the natural gas industrial system in a rough environment according to claim 2, characterized in that: The preset multi-field critical range includes a preset temperature threshold range, a pressure threshold range, and a corrosive gas concentration threshold range.

4. The simulation and optimization method for a natural gas industrial system in a rough environment according to claim 3, characterized in that: The specific steps for constructing the global environmental threat prediction model are as follows. Performing spatio-temporal feature mapping on the real sensor data of each gas field node to generate a dynamic feature projection; Constructing an adversarial distribution alignment loss function based on the dynamic feature projection, and calculating the feature differences between nodes through a Gaussian time-domain kernel; Alternately training the adversarial discriminator and the dynamic feature projection layer through the adversarial distribution alignment loss function until the feature differences between nodes converge within a preset difference threshold; Calculating the federated aggregation weights based on the converged dynamic feature projection, and constructing a global environmental threat prediction model.

5. The simulation and optimization method of the natural gas industrial system in a rough environment according to claim 4, characterized in that: The specific steps for outputting the simulation results of multi-dimensional performance indicators are as follows. Associating the output parameters of the global environmental threat prediction model with the control terms of the multi-physics field coupling equation to construct the initialization parameters of the dynamic simulation engine; Constructing an adaptive spatio-temporal grid based on the initialization parameters, and dynamically adjusting the grid node density according to the temperature and pressure changes in the real-time sensor data streams; Embedding the real-time sensor data streams into the multi-physics field coupling equation through a Gaussian time-domain kernel to generate modified hydrodynamic equations and thermodynamic equations; Solving the modified hydrodynamic equations and thermodynamic equations, obtaining the multi-physics field coupling behavior of the pipeline network in extreme environments, calculating multi-dimensional performance indicators, and outputting the simulation results.

6. The simulation and optimization method of the natural gas industrial system in a rough environment according to claim 5, characterized in that: The multi-physics field coupling behavior includes flow velocity field, pressure field, and temperature field behaviors; The multi-dimensional performance indicators include safety indicators, efficiency indicators, and corrosion rate indicators.

7. The simulation and optimization method of the natural gas industrial system in a rough environment according to claim 6, characterized in that: The generation of control variables through population evolution and dynamic strategy adjustment is specifically carried out as follows: Construct a multi-objective fitness function based on the simulation results. According to the real-time sensor data stream, calculate the variance of each sensor data within a preset time window to generate a variance vector. Initialize the hybrid population through the multi-objective fitness function, perform non-dominated sorting on the individuals of the hybrid population, and calculate the information entropy weight of the Pareto front solution set. Select individuals of the hybrid population according to the information entropy weight and perform the directional mutation operation on the variance vector. Update the control variable adjustment strategy through the reinforcement learning policy network to generate a new generation of hybrid population. Generate control variables using the Pareto front solution set of the new generation of hybrid population.

8. The simulation and optimization method of the natural gas industrial system in a rough environment according to claim 7, characterized in that: The update of the global environmental threat prediction model is specifically carried out as follows: Input the control variables into the pre-trained digital twin verification model to generate control variable simulation data. Calculate the residual between the control variable simulation data and the real-time sensor data stream. If it exceeds the preset residual threshold, trigger the incremental learning mechanism and collect the incremental training data set of the real-time sensor data stream and the control variable simulation data. Update the parameters of the global environmental threat prediction model through the incremental training data set to generate the updated global environmental threat prediction model.

9. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the simulation and optimization method of the natural gas industrial system in a rough environment according to any one of claims 1 to 8.

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 simulation and optimization method of the natural gas industrial system in a rough environment according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Simulation prediction method and device based on big data, equipment and storage medium

    CN119066617A

  • Natural gas comprehensive operation management and control platform based on Internet of Things

    CN119356454A

  • Generative adversarial-based attack in federated learning

    WO2023012230A2

Cited By

  • Soft soil foundation deformation prediction method and system based on big data

    CN120408100A

  • Bridge cable large-scale substructure fire real-time mixing test method

    CN120706196A

  • BIM construction progress optimization method and system based on multi-agent autonomous decision

    CN120725623A

  • Water supply prediction model training method and device for waterworks

    CN121233940A

  • Multi-scale data fusion hydrogen permeation-stress prediction method and device

    CN121789869A