A natural gas purification production cross-plant level energy scheduling safety monitoring method

By constructing a dynamic weighted adjacency matrix and a graph neural network, combined with a long short-term memory network, the problems of delayed monitoring of scheduling anomalies and unstable generation of backup lines in cross-plant-level natural gas purification production were solved, realizing the real-time performance and accuracy of safety monitoring and scheduling decisions in natural gas purification production.

CN122175286APending Publication Date: 2026-06-09CHONGQING UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHONGQING UNIV
Filing Date
2026-03-25
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

The current natural gas purification production lacks comprehensive analysis capabilities for cross-plant-level raw gas dispatch, resulting in delayed anomaly monitoring, numerous misjudgments, high dispatch safety risks, and a lack of stability assessment for backup line generation, which easily leads to excessive or insufficient switching.

Method used

By constructing a dynamic weighted adjacency matrix and combining graph neural networks and long short-term memory networks, the spatiotemporal coupling law of cross-plant-level raw gas dispatching system is learned, anomalies are identified, backup gas transmission schemes are generated, and repair time is predicted.

Benefits of technology

It enables real-time monitoring and safe handling of cross-plant-level raw gas dispatching, reduces false alarms and missed alarms, and improves the executability and consistency of dispatching decisions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122175286A_ABST
    Figure CN122175286A_ABST
Patent Text Reader

Abstract

This invention relates to the field of natural gas dispatching technology, and particularly to a safety monitoring method for cross-plant energy dispatching in natural gas purification and production. The method is based on multi-source monitoring data from the raw gas dispatching system. Under physical topological constraints, it constructs a dynamically weighted adjacency matrix reflecting the coupling relationships of node operations. Furthermore, based on the positional changes and fluctuations of each element in the dynamically weighted adjacency matrix within a continuous time window, unstable elements are identified, and the graph structure corresponding to the training samples is locally repaired, weighted with confidence, or removed. On this basis, graph neural networks and long short-term memory networks are combined to learn the spatiotemporal coupling patterns of the cross-plant raw gas dispatching system under normal operating conditions, enabling real-time monitoring and early warning of supply-demand imbalances, pressure and flow exceeding limits, and abnormal risks in the public pipeline network. Upon detecting an anomaly, a backup gas transmission plan is generated by combining the abnormal node, abnormal pipeline segment, dispatching constraints, and dynamic correlation stability. Data-driven prediction of the repair time of the problematic node is also performed, thereby supporting safe decision-making for cross-plant raw gas dispatching.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of natural gas dispatching technology, and in particular to a safety monitoring method for cross-plant-level energy dispatching in natural gas purification and production. Background Technology

[0002] In the natural gas purification process, feedstock gas is typically transported from the gas supply plant to different purification units via a public pipeline network. Its operational status directly affects the safe and stable production of these purification units. In actual production, to meet the load changes and production plan requirements of different purification plants, unified scheduling of feedstock gas across multiple plants is often necessary. Traditional feedstock gas scheduling relies primarily on operators' experience and monitoring instruments, with pre-set pressure and flow threshold alarms used to monitor the operational status. On the one hand, this method does not fully consider the dynamic relationships between nodes within the pipeline network. When leaks, blockages, or other anomalies occur at a point in the pipeline, it is often impossible to promptly and comprehensively perceive the impact of these anomalies on the overall supply and demand balance. On the other hand, the scheduling operations of dispatchers, coupled with potential pipeline anomalies, may trigger localized supply and demand imbalances or even cause pipeline pressure or flow to exceed safe limits.

[0003] Currently, safety monitoring methods in natural gas purification production are mostly based on single-plant, single-parameter threshold alarms. These typically achieve anomaly alerts by setting fixed upper and lower limits for key parameters such as pressure and flow, lacking comprehensive analytical capabilities regarding the public pipeline topology, inter-plant node coupling relationships, and temporal evolution patterns. In inter-plant-level raw gas dispatching, these methods struggle to reflect the interconnected impacts between the gas supply plant, the public pipeline network, and the purification plant. When anomalies propagate from multiple points or evolve gradually, alarm delays and frequent misjudgments are common. Furthermore, existing monitoring methods often fail to effectively distinguish between normal fluctuations caused by dispatching operations and abnormal disturbances caused by leaks, blockages, and localized supply-demand imbalances, increasing dispatching safety risks.

[0004] With the development of data-driven monitoring methods, monitoring methods based on correlation graphs, graph neural networks, and time-series models have provided new approaches to characterizing the spatial relationships and temporal evolution of complex industrial systems. However, existing methods often use dynamic graph structures only as model inputs, typically without further evaluating the stability of dynamic relationships within continuous time windows. In cross-plant raw material gas scheduling scenarios, sensor noise, short-term disturbances, planned valve switching, and load ramping can all cause short-term distortions in the correlations between nodes within local windows. If such graph structures are directly used as normal samples for training, the model is prone to learning distorted relationships as normal patterns, thereby reducing its ability to identify real anomalies and increasing the risk of confusing normal scheduling changes with abnormal operating conditions.

[0005] Furthermore, traditional solutions, after identifying abnormal risks, typically rely on manual experience to temporarily select pipeline switching and valve operations. They lack an automatic backup line generation mechanism based on the public pipeline network topology, real-time operating status, and correlation stability, making it difficult to provide a scheduling scheme that balances feasibility, continuity, and steady-state operation. Even if existing backup line generation methods consider connectivity, capacity constraints, valve operation frequency, or overall costs, they usually do not incorporate the stability of the dynamic correlations corresponding to the lines into the evaluation. Therefore, they may select a currently switchable path but with poor sustained stability, leading to further fluctuations or even a second switch after the initial switch. On the other hand, scheduling and handling also require assessing the duration of the impact of anomalies on gas supply continuity. Traditional methods typically cannot provide quantitative predictions of the repair completion time for problematic nodes, resulting in a lack of data support for backup line activation time, inter-plant load redistribution, and production reduction strategies, easily leading to the risks of over-switching and under-switching. Summary of the Invention

[0006] This invention discloses a safety monitoring method for cross-plant-level energy dispatch in natural gas purification production, the specific method of which is as follows: Raw operational data is collected from each key node in the raw gas dispatching system, standardized, and then used to construct a node enhancement feature matrix. A basic topology map is established based on the physical connection relationship of the public pipeline network, and a dynamic weighted adjacency matrix is ​​constructed based on parameter correlation. For different scheduling modes, the mean reference edge weight and reference fluctuation scale of each physical connection edge under normal operation samples are statistically analyzed to construct a normal reference edge weight statistical matrix; Based on the deviation of each edge weight in the current dynamic weighted adjacency matrix from the statistical matrix of the normal reference edge weights and the degree of jump within the continuous time window, the stability coefficient of each edge is calculated to identify unstable edges. The training samples corresponding to the unstable edges are processed according to their location and degree. Based on the processed training samples, a graph temporal autoencoder model composed of a graph neural network and a long short-term memory network is jointly trained to learn the spatiotemporal coupling law under normal working conditions. Real-time data is input into the trained graph time-series autoencoder model. Based on the reconstruction error and the deviation of the dynamically weighted adjacency matrix from the normal reference edge weight statistical matrix, a comprehensive anomaly score is calculated. The comprehensive anomaly score is used to determine whether there is a safety anomaly, and the set of abnormal nodes and the set of abnormal pipe segments are output.

[0007] Furthermore, the method also includes: after determining that there is a safety anomaly, generating a backup gas transmission line and a corresponding operation sequence based on the set of abnormal nodes, the set of abnormal pipe segments, edge stability information, scheduling constraints and safety boundaries.

[0008] Furthermore, the method also includes: after generating backup gas transmission lines and corresponding operation sequences, constructing a repair time prediction model based on historical maintenance records and abnormal monitoring characteristics, and outputting the estimated repair completion time of the problem node.

[0009] Furthermore, after preprocessing, a node enhancement feature matrix is ​​constructed, as follows: Assume the raw gas dispatching system has a total of There are [number] monitoring nodes, and a total of [number] nodes are involved in all of them. 3D key feature data, for any time step t, through a matrix To represent the observations of all nodes, a matrix Represented as: ; in, Represents a node The The raw reading of the feature at time t, Representing different nodes, Representing different characteristics; A binary mask vector was constructed. Used to mark whether the corresponding feature is valid, if node In time There is a number The effective observations of a feature are then let If the feature is missing or the node does not have the sensor, then let The missing original readings are filled with 0; Therefore, the enhanced feature matrix is ​​output. The raw gas dispatching system in time step The characteristic quantity can be expressed as .

[0010] Furthermore, a dynamic weighted adjacency matrix is ​​constructed, as follows: Based on the actual physical connections of the raw gas dispatching system, a basic pipeline topology diagram is constructed. In this matrix, point set V represents gas supply plants, key nodes in the public pipeline network, and monitoring nodes in purification plants, while edge set E represents nodes with explicit direct connectivity. When there are physical connecting edges between nodes, Otherwise, it is zero; Let the length of the sliding window be... For each time step Take the nearest Each sampling time forms a time window Within each time window, key operating parameters representing the physical coupling relationship between pipeline network nodes are selected to form a coupling characterization sequence for node i: ; in, This is the set of key coupling parameters used for edge construction. The combined weights of each parameter, For nodes At any moment The Standardized values ​​of class parameters; compute nodes With nodes The Pearson correlation coefficient of the coupled characterization sequence within the current time window: ; in, and They are nodes and nodes The mean of the coupled characterization sequence within the current time window; Will As an indicator of the coupling strength between nodes, it is used to adjust the weights for spatial information propagation and to construct dynamic graph edge weights accordingly. ; in, It is a preset small constant; A dynamic weighted adjacency matrix is ​​generated using a combination of physical topology and correlation-based weighting. ; in, For the reason The edge weight matrix is ​​formed by I, which is the identity matrix.

[0011] Furthermore, the normal reference edge weight statistical matrix is ​​constructed, and the specific method is as follows: To characterize the statistical features of edge weights during normal operation under different scheduling modes, for each scheduling mode Select the normal training window set in this mode. Calculate the mean reference edge weight and fluctuation scale for each physical connection edge; for each edge... In scheduling mode The mean of the reference edge weights is defined as follows: ; The corresponding reference fluctuation scale is preferably defined as the standard deviation: ; in, Indicates scheduling mode below The normal reference mean Indicates the corresponding reference fluctuation scale; From all and The reference mean matrix and the reference fluctuation scale matrix are respectively constructed, and together they form the scheduling mode. The normal reference edge weight statistics matrix.

[0012] Furthermore, the training samples corresponding to unstable edges are processed using the following method: For time edge In the current scheduling mode First, calculate its normalized deviation relative to the reference statistical matrix: ; in, For the current scheduling mode The reference edge weight mean, To correspond to the reference fluctuation scale, A preset small constant is used to prevent the denominator from being too small; Define the degree of edge weight jump: ; Define edge At any moment Stability coefficient: ; in, It is the adjustment coefficient, and ; The smaller the value, the more significant the deviation of the edge from the normal statistical characteristics of the same scheduling mode, and the worse its stability. Identifying unstable edge sets based on stability coefficients: ; in, The threshold for determining edge stability; Define the proportion of unstable edges within the current window as: ; in, This represents the total number of physically connected edges. when At this time, the training window is retained, and the repaired edge weights are defined as follows: ; when At the same time, while performing local edge weight repair, assign sample confidence to the window: ; in, ; when When this happens, the window will no longer be used as a normal training sample in model training.

[0013] Furthermore, the graph temporal autoencoder model is constructed as follows: With the repaired edge weight matrix Construct the repaired dynamic weighted adjacency matrix: ; matrix The diagonal element is Further construct a symmetric normalized adjacency matrix: ; At any time step Enhance the feature matrix with nodes As the initial input, then the... Layer node updates can be represented as: ; In the formula, It is a non-linear activation function. For the first Layer graph convolution weight matrix; After propagation through L layers, the node spatial fusion representation at time step t is obtained. ,in To output the dimension of the latent vector; Let the timing window length be For any time Take continuous The spatial representation sequence at each time step As a training sample; For any node Extract its spatial feature sequence within the window. ; Will The input is an encoder-decoder autoencoder model composed of LSTM. The encoder reads the input sequence in time and outputs the hidden states: ; in Let be the hidden state of the encoder at time step k. To hide the unit dimension, For encoder parameters; After reading the entire window, take the final hidden state as the compressed representation of the window: ; The decoder reconstructs the input sequence based on the compressed representation, and its first... The hidden states of each reconstruction step are: ; in, For decoder parameters, The output of the reconstruction from the previous time step; The reconstructed vector for the current time step is obtained through a linear output layer: ; Thus, the reconstructed sequence is obtained. After summarizing all nodes, the reconstructed spatial representation sequence is obtained. ; With normal training window set Conduct joint training; For a training window that is moderately unstable but not removed, the defined sample confidence level is... The reconstruction loss is weighted, and the loss function is defined as follows: ; When the training window does not trigger weight reduction, let .

[0014] Further, to determine whether there is a safety anomaly, the specific methods are as follows: The processed real-time data is input into the trained graph temporal autoencoder model to obtain the reconstruction result; For nodes At any moment The abnormal score can be defined as: ; In the formula Indicates that node i at time... The reconstructed residual vector is obtained, and the system-level reconstruction error is derived from it. ; For physical connection edges In the current scheduling mode The normalized deviation of edge weights relative to the normal reference statistics matrix is ​​defined as: ; in and These represent the average reference edge weight and the reference fluctuation scale for this edge under the current scheduling mode, respectively. Assuming a preset small constant; this leads to the graph mutation score: ; A comprehensive anomaly score is obtained based on system reconstruction error and graph mutation score: ; in, 0 represents the weighting coefficient; When K consecutive time windows satisfy When an anomaly occurs, an alarm is triggered, and a set of abnormal nodes is constructed based on the node anomaly score and edge stability information. and abnormal pipeline collection It is used to characterize high-risk pipe sections that are associated with abnormal nodes and whose stability has decreased or significantly deviated from normal statistical patterns; Residual statistics are performed on the contributions of key parameters to abnormal nodes, and parameter mapping layer functions are used. Mapping the reconstruction results back to the normalized parameter space, that is, for any ,have: ; Based on this, calculate the residuals for each parameter dimension: ; In the formula It is a mask vector. These are the standardized true observations, and the residuals are summarized within the window: ; according to The data is sorted to obtain a ranking of error contributions based on parameters such as pressure and flow rate.

[0015] Furthermore, backup gas transmission lines and their corresponding operation sequences are generated, as follows: After triggering the warning and receiving and Then, construct a schedulable graph for scheduling and processing. , It is determined by the physical connectivity edge set, the operable state of the valve, the isolation action, and the available state of the equipment. for Edges can be set to be disabled or high-penalty terms can be introduced into the cost function; edges connected to abnormal nodes can be restricted from participating in alternative path search according to preset rules. Define edge At any moment The average stability is: ; in, For the stability statistics window length, The edge stability coefficient; Define edge The path cost function is: ; in This indicates the cost of valve operations required to switch this pipe section. This indicates the margin of the pipe section from the safety boundary under current operating conditions. To allow for setting weights, The degree of node anomaly and the degree of edge coupling anomaly are represented by: ; In the formula The scores for abnormal nodes at both ends of the edge are respectively. To standardize the deviation, This is the edge weight deviation penalty coefficient; In addition to path cost, define minimum stability constraints. When the average stability of a certain side is lower than the threshold, it may not be given priority in being included in the backup path. If the scheduling objective is a backup path from a single gas supply source to a single purification plant, then find the minimum cost path: ; ; If there are multiple gas supply sources and multiple purification plants, the problem can be described as minimum cost flow allocation: ; ; in, Supply / demand for nodes; The minimum cost is obtained by solving the problem. and backup gas transmission lines And generate the corresponding scheduling operation sequence.

[0016] Due to the adoption of the above technical solutions, this application has the following beneficial effects: 1. This invention is based on multi-source monitoring data of the raw gas dispatching system of the gas supply plant-public pipeline network-purification plant. Under physical topological constraints, it constructs a dynamic weighted adjacency matrix reflecting the coupling relationship of node operation. Furthermore, based on the positional changes and fluctuations of each element in the dynamic weighted adjacency matrix within a continuous time window, unstable elements are identified, and the graph structure corresponding to the training samples is locally repaired, weighted with confidence, or removed. On this basis, graph neural networks and long short-term memory networks are combined to learn the spatiotemporal coupling law of the cross-plant-level raw gas dispatching system under normal operating conditions, enabling real-time monitoring and early warning of supply-demand imbalances, pressure and flow exceeding limits, and abnormal risks in the public pipeline network. After an anomaly is detected, a backup gas transmission plan is generated by combining the abnormal node, abnormal pipeline segment, dispatching constraints, and dynamic correlation stability. Data-driven prediction of the repair time of the problematic node is also performed, thereby supporting safe handling decisions for cross-plant-level raw gas dispatching.

[0017] 2. This invention uses time-series data under normal operating conditions during the training phase and performs stability assessment on the dynamically weighted adjacency matrix. When only a few edge weight elements are unstable, the corresponding graph structure is repaired based on their location and degree of instability. As the degree of instability increases, the corresponding training window is weighted down or removed to improve the model's accuracy in learning normal spatiotemporal correlation patterns. During the runtime phase, real-time data is input into the trained model, and anomaly risk is judged by combining reconstruction error and the degree of graph structure mutation. When anomaly risk is detected, the abnormal nodes and abnormal pipe segments are further located, and backup gas transmission paths that meet capacity, safety boundary, and stability constraints are generated. The repair completion time is predicted by combining historical maintenance records and anomaly characteristics. This reduces reliance on a large number of anomaly samples and human experience, reduces false alarms and missed alarms caused by confusion between normal scheduling fluctuations and real anomalies, and improves the consistency and executability between anomaly monitoring, scheduling handling, and recovery prediction.

[0018] Other advantages, objectives, and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from the following examination, or may be learned from practice of the invention. The objectives and other advantages of the invention can be realized and obtained through the following description. Attached Figure Description

[0019] The accompanying drawings of this invention are described below.

[0020] Figure 1 This is a schematic diagram of the process of the present invention. Detailed Implementation

[0021] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0022] A safety monitoring method for cross-plant energy dispatch in natural gas purification production, see [link to relevant documentation]. Figure 1 The specific steps are as follows: S1. Data Acquisition and Preprocessing Operational data is collected from key nodes and monitoring points in the raw gas dispatching system. The raw data is then cleaned and interpolated based on a time reference. Assume the system has a total of... There are [number] monitoring nodes, and a total of [number] nodes are involved in all of them. Dimensional key feature data. For any time step t, a matrix can be used. The matrix representing the observations of all nodes is shown below: ; in, Represents a node The The raw reading of the feature at time t, Representing different nodes, These represent different characteristics. These characteristics include pressure, flow rate, and valve opening, with data such as valve opening used to characterize changes in scheduling operations.

[0023] Considering that some nodes may lack corresponding data characteristics in practical applications, this solution introduces a masking mechanism to explicitly indicate missing information. This invention constructs a binary mask vector. Its dimensions are the same as its features, used to mark whether the corresponding features are valid, if the node In time There is a number The effective observations of a feature are then let If the feature is missing or the node does not have the sensor, then let Simultaneously, missing original readings are padded with 0s. Through the above processing, the present invention expands the input into an enhanced feature vector containing masking features. Therefore, the entire system at time step The characteristic quantity can be expressed as .

[0024] S2, Feature Scaling and Scheduling Pattern Recognition After filling in missing data and constructing a mask, the input data is standardized to eliminate the impact of differences in sensor dimensions on model training. For each sensor feature dimension, a conventional z-score standardization method is used, which calculates the mean of each feature using historical data. and standard deviation Then, a linear transformation is performed on the effective observations: After feature scaling, to avoid misjudging graph structure changes caused by planned scheduling switches as anomalies, this invention further identifies the scheduling mode of the current operating condition. For any time step t, based on the start / stop status, key valve opening / closing combinations, purification plant load range, and planned switching markers, the current scheduling mode m(t) is determined. This mode characterizes the stable operating state of the cross-plant-level raw gas scheduling system under specific gas supply organization methods, valve configurations, and load distribution conditions.

[0025] S3. Construction of Dynamically Weighted Adjacency Matrix and Reference Statistical Matrix Construct a basic pipeline topology diagram based on the actual physical connections of the raw gas dispatching system. Here, the point set V represents monitoring nodes such as gas supply plants, key nodes in the public pipeline network, and purification plants, and the edge set E represents nodes with explicit direct connectivity. This yields the adjacency matrix. When there are physical connecting edges between nodes, Otherwise, it is zero.

[0026] To characterize the time-varying coupling strength between nodes, a sliding time window mechanism is used to segment the node data for analysis. Let the length of the sliding window be... For each time step Take the nearest Each sampling time forms a time window Within each time window, key operating parameters that represent the physical coupling relationship between pipeline network nodes, such as continuous operating parameters like pressure and flow rate, are selected and used to construct a coupling representation sequence for node i. ; in, This is the set of key coupling parameters used for edge construction. The combined weights of each parameter, For nodes At any moment The Class parameter standardized values. Further, compute nodes... With nodes The Pearson correlation coefficient of the coupled characterization sequence within the current time window: ; in, and They are nodes and nodes The mean of the coupled representation sequence within the current time window. As an indicator of the coupling strength between nodes, it is used to adjust the weights for spatial information propagation. Based on this, a dynamic graph edge weight is constructed. ; in It is a preset small constant used to avoid the edge weights from approaching 0 under certain operating conditions, thereby affecting the continuity of spatial information propagation.

[0027] This invention uses a physical topology + correlation weighting method to generate a dynamically weighted adjacency matrix, i.e. ; in, For the reason The edge weight matrix is ​​composed of I, which is the identity matrix. Thus, the graph structure is always constrained by the physical topology, and the edge weights are dynamically adjusted only within the physical connection range according to the operating conditions, thereby representing the time-varying coupling relationship between nodes without changing the physical connectivity.

[0028] To characterize the statistical features of edge weights during normal operation under different scheduling modes, for each scheduling mode Select the normal training window set in this mode. Calculate the mean reference edge weight and fluctuation scale for each physical connection edge. In scheduling mode The mean of the reference edge weights is defined as follows: ; The corresponding reference fluctuation scale is preferably defined as the standard deviation: ; in Indicates scheduling mode below The normal reference mean This indicates the corresponding reference fluctuation scale.

[0029] From all and The reference mean matrix and the reference fluctuation scale matrix are respectively constructed, and together they form the scheduling mode. The normal reference edge weight statistics matrix.

[0030] S4. Stability Assessment and Training Sample Repair After constructing the dynamically weighted adjacency matrix and the statistical matrix of normal reference edge weights under the same scheduling mode, this invention does not directly input all normal operating windows as training samples into the model, but first evaluates the stability of each physical connection edge. For time... edge In the current scheduling mode First, calculate its normalized deviation relative to the reference statistical matrix: ; in, For the current scheduling mode The reference edge weight mean, To correspond to the reference fluctuation scale, A preset small constant is used to prevent the denominator from being too small.

[0031] To reflect the abrupt changes in edge weights over continuous time, the degree of edge weight jump is further defined: ; By combining normalization deviation and jump degree, the edge is defined. At any moment The stability coefficient is: ; in, It is the adjustment coefficient, and . The smaller the value, the more significant the deviation of the edge from the normal statistical characteristics of the same scheduling mode, and the worse its stability.

[0032] Identifying unstable edge sets based on stability coefficients: ; in, This serves as the threshold for edge stability assessment. The proportion of unstable edges within the current window is further defined as follows: ; in, This represents the total number of physically connected edges.

[0033] when At this point, it is assumed that only a small number of edges are affected by short-term noise or local disturbances. Local repair is performed on unstable edges, while the training window is preserved. The repaired edge weights are defined as follows: ; when At that time, the window is considered to have moderate instability. While performing local edge weight repair, a sample confidence level is assigned to the window: ; in, The smaller the value, the lower the reliability of the overall diagram structure of the window.

[0034] when If the graph structure corresponding to the window has significantly deviated from the normal association pattern under the current scheduling mode, then the window will no longer be used as a normal training sample for model training.

[0035] S5, Training of Graph Temporal Autoencoder Model S51, GCN spatial feature extraction The repaired edge weight matrix is ​​obtained from S4. Then, the repaired dynamic weighted adjacency matrix is ​​constructed: ; Degree matrix The diagonal element is Then a symmetric normalized adjacency matrix can be further constructed. ; At any time step The node enhancement feature matrix obtained from S1 and S2 As the initial input, then the... Layer node updates can be represented as: ; In the formula, It is a non-linear activation function. For the first Layer graph convolution weight matrix. After L layers of propagation, the node spatial fusion representation at time step t is obtained. ,in This is the dimension of the output latent vector. At this point, the node representation not only includes multi-parameter information such as the node's own pressure, flow rate, and valve status, but also integrates the coupling relationship between physically adjacent nodes under the current operating conditions, thus forming a node spatial representation that reflects the spatial association structure of the cross-plant-level raw gas dispatching system.

[0036] S52 and LSTM codec training To characterize the evolution of pipeline network operation status over time, a sliding time window approach is used to construct time-series samples. Let the time-series window length be... For any time Take continuous The spatial representation sequence at each time step As a training sample, to meet the initial requirements for locating abnormal nodes and abnormal regions, this invention extracts sequences as modeling objects at the node dimension, that is, for any node... Extract its spatial feature sequence within the window. .

[0037] Will The input is an encoder-decoder autoencoder model composed of LSTM. The encoder reads the input sequence in time and outputs the hidden state. ; in Let be the hidden state of the encoder at time step k. To hide the unit dimension, These are encoder parameters. After reading the entire window, the final hidden state is used as the compressed representation of the window: ; The decoder reconstructs the input sequence based on the compressed representation, and its first... The hidden states of each reconstruction step are: ; in For decoder parameters, This is the reconstructed output from the previous time step. The reconstructed vector for the current time step is obtained through a linear output layer. ; Thus, the reconstructed sequence is obtained. After summarizing all nodes, the reconstructed spatial representation sequence is obtained. The model training phase uses the normal training window set processed by S4. Joint training is performed. For training windows that are moderately unstable but not removed, the sample confidence level defined by S4 is introduced. The reconstruction loss is weighted, and the loss function is defined as follows: ; When the training window does not trigger weight reduction, it can be set to The weighted training method described above reduces the interference of moderately unstable training windows on model parameter updates. The GCN and LSTM codecs are jointly trained end-to-end, using weighted reconstruction loss as the objective function, and updating GCN and LSTM parameters through backpropagation. To facilitate subsequent analysis of outlier parameter contributions, a parameter mapping layer is added at the output. This is used to map the latent space reconstructed vectors back to the normalized parameter space. The parameter mapping layer can consist of one or more fully connected networks and is trained together with GCN and LSTM encoder-decoder.

[0038] S6. Anomaly Monitoring and Anomaly Node Location During the runtime phase, real-time data is processed according to S1 to S4 and then input into the trained graph temporal autoencoder model to obtain the reconstruction result. For nodes... At any moment The abnormal score can be defined as: ; In the formula Indicates that node i at time... The reconstructed residual vector is obtained, and the system-level reconstruction error is derived from it. To simultaneously utilize graph structure stability information, for physically connected edges... In the current scheduling mode The normalized deviation of edge weights relative to the normal reference statistics matrix is ​​defined as: ; in and These represent the average reference edge weight and the reference fluctuation scale for this edge under the current scheduling mode, respectively. This is a preset small constant. Therefore, the graph mutation score is obtained: ; A comprehensive anomaly score is obtained based on system reconstruction error and graph mutation score: ; in, 0 represents the weighting coefficient. When K consecutive time windows satisfy... When an anomaly occurs, an alarm is triggered, and a set of abnormal nodes is constructed based on the node anomaly score and edge stability information. and abnormal pipeline collection It is used to characterize high-risk pipe segments that are associated with abnormal nodes and whose stability has decreased or significantly deviated from normal statistical patterns, and serves as a set of banned edges or high-penalty edges in the subsequent generation of backup lines.

[0039] To further analyze the source of the anomalies, residual statistics were performed on the contributions of key parameters to the anomaly nodes, using the parameter mapping layer function defined in S5. Mapping the reconstruction results back to the normalized parameter space, that is, for any ,have: ; Based on this, the residuals of each parameter dimension are calculated. ; In the formula It is a mask vector. These are the standardized actual observations. Finally, the residuals are summarized in the window: ; according to The data is sorted to obtain a ranking of error contributions based on parameters such as pressure and flow rate.

[0040] S7, Backup Plan Generation After triggering the warning and receiving and Then, construct a schedulable graph for scheduling and processing. , It is determined by the physical connectivity edge set, the operable state of the valve, the isolation action, and the available state of the equipment. For Edges can be disabled or have a high penalty term introduced in the cost function. Edges connected to abnormal nodes can also be restricted from participating in alternative path search according to preset rules.

[0041] To ensure that the backup plan prioritizes paths that have been running more stably recently, edges are defined. At any moment The average stability is: ; in, For the stability statistics window length, The edge stability coefficient is defined for step (iv).

[0042] Based on this, define the edge The path cost function is: ; in This indicates the cost of valve operations required to switch this pipe section. This indicates the margin of the pipe section from the safety boundary under current operating conditions. To allow for setting weights, The degree of node anomaly and the degree of edge coupling anomaly can be defined as follows: ; In the formula The scores for abnormal nodes at both ends of the edge are respectively. This refers to the normalization deviation in step six. Let be the edge weight deviation penalty coefficient. In addition to path cost, define a minimum stability constraint. When the average stability of a certain side is lower than the threshold, it may not be given priority in being included in the backup path.

[0043] If the scheduling objective is a backup path from a single gas supply source to a single purification plant, then find the minimum cost path: ; ; If there are multiple gas supply sources and multiple purification plants, the problem can be described as minimum cost flow allocation: ; ; in Let the node supply / demand be positive (gas supply plants are positive, purification plants are negative, and the rest are zero). The minimum cost is obtained by solving this problem. and backup gas transmission lines And generate the corresponding scheduling operation sequence.

[0044] S8, To quantify the duration of backup line activation, at the alarm trigger time. and the anomaly observation window before it Internal extraction of repair time prediction features. For abnormal nodes. Construct the repair time prediction feature vector: ; in Score the node for anomalies. The rate of change of the outlier score within the observation window. Contributes to the residuals in the parameter dimension. The average stability characteristic of the adjacent edges of a node. This represents the number of unstable edges adjacent to a node. This refers to static information related to maintenance.

[0045] The time difference between the time of fault discovery and the time of repair completion in the historical maintenance sample As a supervisory label, As input features, a repair time prediction model is trained. For nodes... Model output Repair time estimate: ; Repair duration quantile estimation: ; In the formula To fix the parameters of the time prediction model, These correspond to the estimated repair time under optimistic, median, and conservative scenarios, respectively. This result can be used in conjunction with the generated backup gas transmission plan to guide inter-plant load adjustments, backup line maintenance time, and judgment of recovery switchback timing during anomaly handling.

[0046] Finally, 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 the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A safety monitoring method for cross-plant-level energy dispatching in natural gas purification and production, characterized in that, The specific method is as follows: Raw operational data is collected from each key node in the raw gas dispatching system, standardized, and then used to construct a node enhancement feature matrix. A basic topology map is established based on the physical connection relationship of the public pipeline network, and a dynamic weighted adjacency matrix is ​​constructed based on parameter correlation. For different scheduling modes, the mean reference edge weight and reference fluctuation scale of each physical connection edge under normal operation samples are statistically analyzed to construct a normal reference edge weight statistical matrix; Based on the deviation of each edge weight in the current dynamic weighted adjacency matrix from the statistical matrix of the normal reference edge weights and the degree of jump within the continuous time window, the stability coefficient of each edge is calculated to identify unstable edges. The training samples corresponding to the unstable edges are processed according to their location and degree. Based on the processed training samples, a graph temporal autoencoder model composed of a graph neural network and a long short-term memory network is jointly trained to learn the spatiotemporal coupling law under normal working conditions. Real-time data is input into the trained graph time-series autoencoder model, and a comprehensive anomaly score is calculated based on the reconstruction error and the deviation of the dynamically weighted adjacency matrix from the normal reference edge weight statistical matrix. Determine whether a safety anomaly is detected based on the comprehensive anomaly score, and output the set of anomaly nodes and the set of anomaly pipe segments.

2. The safety monitoring method for cross-plant energy dispatching in natural gas purification production as described in claim 1, characterized in that, The method further includes: after determining that there is a safety anomaly, generating a backup gas transmission line and a corresponding operation sequence based on the set of abnormal nodes, the set of abnormal pipe segments, edge stability information, scheduling constraints and safety boundaries.

3. The safety monitoring method for cross-plant energy dispatching in natural gas purification production as described in claim 2, characterized in that, The method further includes: after generating backup gas transmission lines and corresponding operation sequences, constructing a repair time prediction model based on historical maintenance records and abnormal monitoring characteristics, and outputting the estimated repair completion time of the problem node.

4. The safety monitoring method for cross-plant energy dispatching in natural gas purification production as described in claim 1, characterized in that, After preprocessing, a node-enhanced feature matrix is ​​constructed. The specific method is as follows: Assume the raw gas dispatching system has a total of There are [number] monitoring nodes, and a total of [number] nodes are involved in all of them. 3D key feature data, for any time step t, through a matrix To represent the observations of all nodes, a matrix Represented as: ; in, Represents a node The The raw reading of the feature at time t, Representing different nodes, Representing different characteristics; A binary mask vector was constructed. Used to mark whether the corresponding feature is valid, if node In time There is a time when The effective observations of a feature are then let If the feature is missing or the node does not have the sensor, then let The missing original readings are filled with 0; Therefore, the enhanced feature matrix is ​​output. The raw gas dispatching system in time step The characteristic quantity can be expressed as .

5. The safety monitoring method for cross-plant energy dispatching in natural gas purification production as described in claim 1, characterized in that, The specific method for constructing a dynamic weighted adjacency matrix is ​​as follows: Based on the actual physical connections of the raw gas dispatching system, a basic pipeline topology diagram is constructed. In this matrix, point set V represents gas supply plants, key nodes in the public pipeline network, and monitoring nodes in purification plants, while edge set E represents nodes with explicit direct connectivity. When there are physical connecting edges between nodes, Otherwise, it is zero; Let the length of the sliding window be... For each time step Take the nearest Each sampling time forms a time window Within each time window, key operating parameters representing the physical coupling relationship between pipeline network nodes are selected to form a coupling characterization sequence for node i: ; in, This is the set of key coupling parameters used for edge construction. The combined weights of each parameter, For nodes At any moment The Standardized values ​​of class parameters; compute nodes With nodes The Pearson correlation coefficient of the coupled characterization sequence within the current time window: ; in, and They are nodes and nodes The mean of the coupled characterization sequence within the current time window; Will As an indicator of the coupling strength between nodes, it is used to adjust the weights for spatial information propagation and to construct dynamic graph edge weights accordingly. ; in, It is a preset small constant; A dynamic weighted adjacency matrix is ​​generated using a combination of physical topology and correlation-based weighting. ; in, For the reason The edge weight matrix is ​​formed by I, which is the identity matrix.

6. The safety monitoring method for cross-plant energy dispatching in natural gas purification production as described in claim 5, characterized in that, The specific method for constructing the normal reference edge weight statistics matrix is ​​as follows: To characterize the statistical features of edge weights during normal operation under different scheduling modes, for each scheduling mode Select the normal training window set in this mode. Calculate the mean reference edge weight and fluctuation scale for each physical connection edge; for each edge... In scheduling mode The mean of the reference edge weights is defined as follows: ; The corresponding reference fluctuation scale is preferably defined as the standard deviation: ; in, Indicates scheduling mode below The normal reference mean Indicates the corresponding reference fluctuation scale; From all and The reference mean matrix and the reference fluctuation scale matrix are respectively constructed, and together they form the scheduling mode. The normal reference edge weight statistics matrix.

7. The safety monitoring method for cross-plant energy dispatching in natural gas purification production as described in claim 1, characterized in that, The training samples corresponding to unstable edges are processed using the following method: For time edge In the current scheduling mode First, calculate its normalized deviation relative to the reference statistical matrix: ; in, For the current scheduling mode The reference edge weight mean, To correspond to the reference fluctuation scale, A preset small constant is used to prevent the denominator from being too small; Define the degree of edge weight jump: ; Define edge At any moment Stability coefficient: ; in, It is the adjustment coefficient, and ; The smaller the value, the more significant the deviation of the edge from the normal statistical characteristics of the same scheduling mode, and the worse its stability. Identifying unstable edge sets based on stability coefficients: ; in, The threshold for determining edge stability; Define the proportion of unstable edges within the current window as: ; in, This represents the total number of physically connected edges. when At this time, the training window is retained, and the repaired edge weights are defined as follows: ; when At the same time, while performing local edge weight repair, assign sample confidence to the window: ; in, ; when When this happens, the window will no longer be used as a normal training sample in model training.

8. The safety monitoring method for cross-plant energy dispatching in natural gas purification production as described in claim 1, characterized in that, The graph-time autoencoder model is constructed as follows: With the repaired edge weight matrix Construct the repaired dynamic weighted adjacency matrix: ; matrix The diagonal element is Further construct a symmetric normalized adjacency matrix: ; At any time step Enhance the feature matrix with nodes As the initial input, then the... Layer node updates can be represented as: ; In the formula, It is a non-linear activation function. For the first Layer graph convolution weight matrix; After propagation through L layers, the node spatial fusion representation at time step t is obtained. ,in To output the dimension of the latent vector; Let the timing window length be For any time Take continuous The spatial representation sequence at each time step As a training sample; For any node Extract its spatial feature sequence within the window. ; Will The input is an encoder-decoder autoencoder model composed of LSTM. The encoder reads the input sequence in time and outputs the hidden states: ; in Let be the hidden state of the encoder at time step k. To hide the unit dimension, For encoder parameters; After reading the entire window, take the final hidden state as the compressed representation of the window: The decoder reconstructs the input sequence based on the compressed representation, and its first... The hidden states of each reconstruction step are: ; in, For decoder parameters, The output of the reconstruction from the previous time step; The reconstructed vector for the current time step is obtained through a linear output layer: ; Thus, the reconstructed sequence is obtained. After summarizing all nodes, the reconstructed spatial representation sequence is obtained. ; With normal training window set Conduct joint training; For a training window that is moderately unstable but not removed, the defined sample confidence level is... The reconstruction loss is weighted, and the loss function is defined as follows: ; When the training window does not trigger weight reduction, let .

9. The safety monitoring method for cross-plant energy dispatching in natural gas purification production as described in claim 1, characterized in that, The specific methods for determining whether a safety anomaly has occurred are as follows: The processed real-time data is input into the trained graph temporal autoencoder model to obtain the reconstruction result; For nodes At any moment The abnormal score can be defined as: ; In the formula Indicates that node i at time... The reconstructed residual vector is obtained, and the system-level reconstruction error is derived from it. ; For physical connection edges In the current scheduling mode The normalized deviation of edge weights relative to the normal reference statistics matrix is ​​defined as: ; in and These represent the average reference edge weight and the reference fluctuation scale for this edge under the current scheduling mode, respectively. Assuming a preset small constant; this leads to the graph mutation score: ; A comprehensive anomaly score is obtained based on system reconstruction error and graph mutation score: ; in, 0 represents the weighting coefficient; When K consecutive time windows satisfy When an anomaly occurs, an alarm is triggered, and a set of abnormal nodes is constructed based on the node anomaly score and edge stability information. and abnormal pipeline collection It is used to characterize high-risk pipe sections that are associated with abnormal nodes and whose stability has decreased or significantly deviated from normal statistical patterns; Residual statistics are performed on the contributions of key parameters to abnormal nodes, and parameter mapping layer functions are used. Mapping the reconstruction results back to the normalized parameter space, that is, for any ,have: ; Based on this, calculate the residuals for each parameter dimension: ; In the formula It is a mask vector. These are the standardized true observations, and the residuals are summarized within the window: ; according to The data is sorted to obtain a ranking of error contributions based on parameters such as pressure and flow rate.

10. The safety monitoring method for cross-plant energy dispatching in natural gas purification production as described in claim 2, characterized in that, The specific method for generating backup gas transmission lines and their corresponding operation sequences is as follows: After triggering the warning and receiving and Then, construct a schedulable graph for scheduling and processing. , It is determined by the physical connectivity edge set, the operable state of the valve, the isolation action, and the available state of the equipment. for Edges can be set to be disabled or high-penalty terms can be introduced into the cost function; edges connected to abnormal nodes can be restricted from participating in alternative path search according to preset rules. Define edge At any moment The average stability is: ; in, For the stability statistics window length, The edge stability coefficient; Define edge The path cost function is: ; in This indicates the cost of valve operations required to switch this pipe section. This indicates the margin of the pipe section from the safety boundary under current operating conditions. To allow for setting weights, The degree of node anomaly and the degree of edge coupling anomaly are represented by: ; In the formula The scores for abnormal nodes at both ends of the edge are respectively. To standardize the deviation, This is the edge weight deviation penalty coefficient; In addition to path cost, define minimum stability constraints. When the average stability of a certain side is lower than the threshold, it may not be given priority in being included in the backup path. If the scheduling objective is a backup path from a single gas supply source to a single purification plant, then find the minimum cost path: ; ; If there are multiple gas supply sources and multiple purification plants, the problem can be described as minimum cost flow allocation: ; ; in, Supply / demand for nodes; The minimum cost is obtained by solving the problem. and backup gas transmission lines And generate the corresponding scheduling operation sequence.