A gas abnormal working condition monitoring and alarm system
By building an end-to-end gas abnormal working condition monitoring and alarm system, the problems of data easily missing, easily noise interference, insufficient multi-point coupling identification, and poor cross-scene generalization capabilities in traditional gas pipeline monitoring are solved, and the multi-point coupling relationship of the gas pipeline network is accurately identified and real-time alarm is achieved, and the accuracy and stability of monitoring are improved.
Patent Information
- Application Number
- CN202510779662.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-12
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2045-06-12
AI Technical Summary
The traditional gas pipeline monitoring method has problems such as data loss, noise interference, insufficient multi-point coupling recognition, poor cross-scene generalization capability, and lag in monitoring and alarms in high-rise and complex urban gas systems, making it difficult to accurately identify abnormal information sources and promptly alarms.
The data preprocessing module, spatiotemporal feature module, ST-CGN network module and edge intelligent optimization module are used to build an end-to-end gas abnormal condition monitoring and alarm system. The data is processed through sliding window sharding, missing value interpolation, noise filtering, normalization and encoding, and three-dimensional feature tensors are extracted. The ST-CGN network is used for causal drive modeling and adaptive mode fusion, and combined with MAML rapid adaptation, knowledge distillation and model pruning to achieve cross-scene adaptive monitoring and alarm.
It realizes accurate identification of multi-point coupling relationships of the gas pipeline network, reduces the risk of leakage detection of leakage or blockage, improves real-time monitoring response capabilities and cross-scenario generalization capabilities, and ensures the stability and accuracy of the system.
Smart Images

Figure CN120316619B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of gas monitoring and early warning, and in particular to a gas abnormal operating condition monitoring and alarm system. Background Art
[0002] Monitoring abnormal gas conditions is a key step in ensuring the safe operation of gas systems. Its purpose is to identify and warn of potential risks such as gas leaks, abnormal pressures, and equipment failures. Currently, monitoring abnormal gas conditions mainly uses a single-point threshold alarm monitoring method. This involves deploying sensors (pressure, flow, gas concentration sensors, etc.) at monitoring points, setting safety thresholds, and collecting data in real time. When the collected data exceeds or falls below the preset safety threshold, an alarm is triggered. However, with the increasing height and complexity of urban pipeline networks, traditional single-point gas threshold alarm methods ignore the physical coupling and pressure fluctuation propagation between nodes in the gas pipeline network. This makes it difficult to identify the source of abnormal information and, consequently, to accurately monitor abnormal information, leading to problems such as false alarms. (For example, when a pipeline on the third floor is partially blocked, pressure fluctuations will be transiently transmitted through the pipeline to the second and fourth floors, resulting in synchronization or time delay characteristics. Single-point monitoring cannot capture this multi-point coupling relationship.) Furthermore, traditional single-point gas threshold alarm methods only compare thresholds based on instantaneous values or average values over a period of time. This makes it difficult to capture the high-frequency micro-oscillations of leaked gas, leading to missed detections or delayed alarms, creating unavoidable safety hazards. (Experimental data shows that the pressure standard deviation during a minor leak increases by 2.5 to 3 times compared to normal, but the average value during this stage varies by less than 1%. Using a single-point threshold alarm method based on the average value makes it extremely easy to overlook minor leaks. Furthermore, slow pressure drops caused by pipeline aging, such as 0.3 to 0.7 kPa per hour, are often misinterpreted as normal fluctuations in daily use, leading to delayed alarms.) In addition, due to the deepening of urbanization, the gas pipeline networks in different communities or factory areas have linear, tree-like, ring-like, or even mixed topologies. The thresholds calibrated based on manual experience and a large amount of experimental data usually need to be recalibrated for different pipeline network structures. The debugging cycle is long and the cost is high. It is also easily affected by external environmental factors, resulting in large deviations in the calibration thresholds and low accuracy.
[0003] In summary, due to the high-rise, multi-layered and complex paths of the gas pipeline network, the traditional single-point threshold monitoring and alarm method has problems such as easy data loss, susceptibility to noise interference, insufficient multi-point coupling recognition, poor cross-scenario generalization ability, and monitoring and alarm lag. Summary of the Invention
[0004] In response to the problems existing in the above-mentioned prior art, the purpose of the present invention is to provide a gas abnormal operating condition monitoring and alarm system. The system forms an end-to-end closed-loop structure through the bidirectional coupling of data flow and model parameter flow, and is used for monitoring and early warning of gas abnormal operating conditions. It effectively solves the problems existing in the existing gas pipeline network monitoring, such as easy data loss, susceptibility to noise interference, insufficient multi-point coupling recognition, poor cross-scenario generalization ability, and lag in monitoring and alarm.
[0005] The purpose of the present invention is achieved through the following technical solutions:
[0006] A gas abnormal working condition monitoring and alarm system adopts a monitoring system including a data preprocessing module, a spatiotemporal feature module, an ST-CGN network module, an edge intelligent optimization module and a result processing module; wherein:
[0007] The data preprocessing module processes the data collected by the sensors in the pipeline through sliding window segmentation, missing value interpolation, noise filtering, normalization and encoding methods.
[0008] The spatiotemporal feature module extracts spatial correlation features, temporal dynamic features, and causal propagation features from the preprocessed data of each sliding window segment, and concatenates them to form a three-dimensional feature tensor;
[0009] The ST-CGN network module takes the input of the three-dimensional feature tensor and outputs the multi-operating condition probability vector corresponding to the sliding window slice;
[0010] The edge intelligent optimization module achieves edge optimization of the ST-CGN network module through MAML (Model-Agnostic Meta-Learning) rapid adaptation, knowledge distillation, model pruning, and quantization;
[0011] The result processing module obtains the probability of the corresponding working condition through the multi-working condition probability vector of the ST-CGN network module optimized by the edge intelligent optimization module, and triggers the alarm judgment according to the preset threshold.
[0012] Based on the further optimization of the above scheme, the sliding window segmentation is specifically as follows: for the rapid dynamic changes of the gas network pressure signal in a short time, a length of T w , step by S Sliding window sharding strategy, each window W k for:
[0013]
[0014] Where: t k Indicates the kThe starting sampling time of the window;
[0015] By capturing the dynamic redundancy and continuity between consecutive windows, the risk of missing detection of early leakage or blocking pulses is reduced;
[0016] Missing value interpolation is specifically as follows: For each sliding window, a linear interpolation strategy is used to deal with sampling gaps caused by occasional sensor disconnection or data packet loss:
[0017]
[0018] Where: P i (t) Indicates the t At this moment, i Pressure signal value of each section;
[0019] Noise filtering is specifically: for the high-frequency random interference in the gas pipeline network, the original signal is smoothed using exponentially weighted moving average:
[0020]
[0021] Where: represents the smoothing coefficient; x(t) Represents the original signal value; Represents the signal value after exponentially weighted moving average processing;
[0022] Normalization and encoding are specifically as follows:
[0023] First, standardize the dataset for missing value interpolation and noise filtering:
[0024]
[0025] Where: x norm Represents a sample x i Normalized values; x i Indicates the first i samples; represents the mean of the data set; Represents the standard deviation of the data set;
[0026] The standardized values are then One-Hot encoded to eliminate the impact of different dimensions on model training.
[0027] Based on the further optimization of the above scheme, the spatial correlation feature includes the instantaneous pressure difference between two nodes and relative amplitude :
[0028]
[0029] Temporal dynamics features include sliding window data average , sliding window data standard deviation , Maximum volatility of sliding window data And the fluctuation direction of sliding window data :
[0030]
[0031] Where: Represents a specific moment within the sliding window used to calculate the fluctuation direction (for example, the last sampling moment within the window, used to compare with the previous moment to determine the pressure fluctuation direction);
[0032] Causal propagation characteristics include causal strength Synchronicity with time series trends :
[0033]
[0034]
[0035] Where: Indicates the k Nodes in the window i The pressure change; Cov represents the covariance, Var represents variance;
[0036] Finally, the spatial association feature F k , time dynamic characteristics F s and causal propagation characteristics F y Through channel splicing, form a three-dimensional feature tensor X k :
[0037]
[0038] in: N Indicates the number of pipe network nodes; U Represents the total dimension of the three types of features (for example, spatial correlation features are 2-dimensional, temporal dynamics features are 5-dimensional, and causal propagation features are 2-dimensional, so the total dimension is 9); R Indicates the number of time steps (i.e., the number of sampling points in the sliding window); Concat() Indicates channel splicing.
[0039] Based on the further optimization of the above scheme, the ST-CGN network module is based on the input three-dimensional feature tensor Xk The specific process of output prediction is as follows:
[0040] First, input the three-dimensional feature tensor X k , using causal-driven modeling and generating causal features through nonlinear structural equation models; then, using adaptive modal fusion, selecting TCN (Temporal Convolutional Network) or GCN (Graph Convolutional Network) according to the node degree; after that, superimposing the spatiotemporal convolutional layer and LSTM (Long Short-Term Memory Network) to output the prediction results; finally, using counterfactuals to locate the intervention, calculate the effect size and locate the key nodes.
[0041] Based on the further optimization of the above scheme, the causal characteristics generated by using causal driven modeling and nonlinear structural equation model are specifically as follows:
[0042] First, a nonlinear structural equation model is established:
[0043]
[0044] Where: Pa(i) Representation node i The parent node set of Represents a nonlinear activation function (such as the Sigmoid function); Indicates the parent node j In time ( t - t c ) characteristics (such as pressure value); Representation node j To Node i Physical parameters of pressure transmission (such as pipeline resistance, flow velocity, etc.); Represents a nonlinear mapping function used to fuse features and physical parameters (e.g., MLP, multilayer perceptron); represents the random error term; Indicates the strength of dynamic causal effects;
[0045]
[0046] Where: I q 、 I k Both represent weight matrices; where: I q For nodes i The features at the current moment are linearly transformed and mapped to a specific feature space to generate query values to capture the key information of the current node state; acting on the parent node j Features Physical parameters of pressure transmission The concatenated vector is transformed linearly to generate a key value, which is used to calculate the relevance with the query vector; d Indicates standardization; Represents a point set; Softmax() express Softmax function;
[0047] Ensure that the causal graph is acyclic by smooth acyclic loss, avoiding nodes i The parent node set Pa(i) Falling into a causal loop, ensuring the logic of the causal relationship in the model ( R dag represents a smooth acyclic loss function):
[0048]
[0049] Where: tr() represents the trace of the matrix (i.e., the sum of the diagonal elements); N Indicates the number of nodes; represents the Hadamard product; I W Represents the weight matrix, whose elements are I ij definition:
[0050]
[0051] Where: Represents the indicator function, that is, if the node j Belongs to the node i The parent node set of is 1, otherwise, is 0; express L 2 norm, that is, Euclidean norm.
[0052] Based on the further optimization of the above scheme, the selection of TCN or GCN based on node degree using adaptive modal fusion is specifically as follows:
[0053] Defining Nodes i Modal fusion strategy:
[0054]
[0055] Among them, TCN is used in low-node-degree scenarios of linear or tree topologies and to capture local timing patterns:
[0056]
[0057] Where: DilatedConv() represents the dilated convolution operation, used to capture local temporal patterns; Representation node i In the time interval [ t - K, t ], with the expansion factor D The characteristic sequence of the samples; W TCN Represents the weight parameters of the TCN layer, used for convolution operations; K Indicates the convolution kernel size;
[0058] GCN is used for high node degree scenarios with complex or ring structures and for aggregating neighbor information:
[0059]
[0060] Where: represents the normalized adjacency matrix element, which contains the causal weight , represents a node j With node i The connection relationship and weight; W GCN Represents the weight matrix of the GCN layer, used for feature transformation; N(i) Representation node i A set of neighbor nodes, used to aggregate neighbor information; ReLU() Represents the activation function.
[0061] Based on the further optimization of the above scheme, the method of locating intervention, calculating effect size and locating key nodes through counterfactuals is specifically as follows:
[0062] First, the node s Apply abnormal intervention to generate counterfactual features :
[0063]
[0064] Where: represents the intervention increment, which conforms to the normal distribution;
[0065] Then, obtain the predicted value after intervention and compare the difference between the predictions before and after intervention to quantify the node s For downstream nodes j Impact:
[0066]
[0067] Where: represents the original predicted value; represents the predicted value after the counterfactual positioning intervention;
[0068] Finally, the node with the largest effect size is selected as the key intervention target and the key intervention node is achieved. position:
[0069]
[0070] Where: PD Represents a set of downstream nodes; Indicates s In the range of values, find the function that makes the subsequent expression reach the maximum value.
[0071] Based on the further optimization of the above solution, the MAML fast adaptation is used to improve cross-scenario generalization capabilities and quickly adapt to new scenarios:
[0072]
[0073] Where: P local Represents the local abnormal sample dataset; L cls Represents the classification loss function based on the local dataset; represents the initial parameters of the model; represents the gradient operator with respect to the initial parameters; represents the learning rate; represents the updated model parameters;
[0074] Knowledge distillation transfers knowledge from the teacher model to the student model, compressing the model size and improving reasoning efficiency:
[0075]
[0076] Where: KL represents the divergence, which is used to measure the difference between the output distributions of the teacher model and the student model after a specific transformation; Represents the activation function, which is used to convert the output of the model into a probability distribution (for example: Softmax function); Indicates the teacher model for the input data X Output; Indicates that the student model is sensitive to the input data X Output; T Indicates the smoothness used to control the probability distribution;
[0077] Model pruning and quantization combine structured pruning and INT8 quantization to generate efficient edge models:
[0078]
[0079] Where: I ys represents the original weight matrix; Represents the weight matrix after pruning operation; Represents the pruning operation function; It represents the pruning rate. In the present invention, the pruning rate is 0.2.
[0080] Based on the further optimization of the above scheme, the result processing module input is the multi-condition probability vector G =[ G 0, G 1,…, G 9], the result processing module passes Softmax The function calculates the probability vector of multiple working conditions and obtains the probability corresponding to each working condition g i ( i=0,1,…,9 ); Set the first level leakage alarm threshold respectively M 1 and 2nd level blocking alarm thresholds M 2:
[0081] If max{ g 4 ,g 5 ,g 6 ,g 7}> M 1, then trigger the first level leakage alarm;
[0082] If max{ g 8 ,g 9}> M 2, then trigger the secondary blocking alarm;
[0083] If neither of the above two situations occurs, it is judged as a normal operating condition and no alarm is triggered.
[0084] The following are the technical effects of the solution of the present invention:
[0085] This system processes gas data through a data preprocessing module that sequentially performs sliding window sharding, missing value interpolation, noise filtering, normalization, and encoding. This ensures continuous capture of short-term dynamics, effectively addressing issues such as incomplete raw time series data and insufficient signal-to-noise ratio during gas monitoring, and ensuring that subsequent feature calculations are based on complete, low-noise time series data. By combining spatial correlation features, temporal dynamics features, and causal propagation features, a time series feature module creates a three-dimensional feature tensor, accurately characterizing the multi-point coupling and dynamic evolution of the gas pipeline network. This effectively addresses issues such as insufficient identification of multi-point coupling in high-rise pipelines and difficulty capturing micro-oscillations in the early stages of leaks. Furthermore, through the ST-CGN network module, this system not only integrates physical parameters with data-driven analysis to achieve causal interpretability, but also dynamically selects modes based on node degrees, effectively balancing computational efficiency and model expressiveness, enhancing the model's real-time responsiveness. Furthermore, the ST-CGN network module uses counterfactual reasoning to identify key nodes, enabling proactive operational and maintenance decisions and improving the model's overall robustness under complex operating conditions. Through the MAML fast adaptation, knowledge distillation, model pruning and quantification edge intelligent optimization module, not only can the model achieve scene adaptive connection in a short time and alleviate the problem of scarcity of abnormal data, but also improve the anti-forgetting ability on non-stationary data streams and enhance the overall stability of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0086] Figure 1 2 is a structural block diagram of abnormal gas working condition monitoring in an embodiment of the present invention. DETAILED DESCRIPTION
[0087] The technical solutions in the embodiments of the present invention will be described clearly and completely below. In the following description, for the purpose of illustration rather than limitation, specific details such as specific system structures and technologies are proposed to facilitate a thorough understanding of the embodiments of the present invention.
[0088] Example 1:
[0089] A gas abnormal working condition monitoring and alarm system adopts a monitoring system including a data preprocessing module, a spatiotemporal feature module, an ST-CGN network module, an edge intelligent optimization module and a result processing module; wherein:
[0090] The data preprocessing module processes the data collected by the sensors in the pipeline through sliding window segmentation, missing value interpolation, noise filtering, normalization and encoding methods.
[0091] The specific sliding window segmentation is: for the rapid dynamic changes of the gas network pressure signal in a short time, a sliding window segment with a length of T w , step by S Sliding window sharding strategy (in this embodiment,T w =30 seconds, S = 10 seconds, the window overlap duration is T w - S = 20 seconds), each window W k for:
[0092]
[0093] Where: t k Indicates the k The starting sampling time of the window;
[0094] By capturing the dynamic redundancy and continuity between consecutive windows, the risk of missing detection of early leakage or blocking pulses is reduced;
[0095] Missing value interpolation is specifically as follows: For each sliding window, a linear interpolation strategy is used to deal with sampling gaps caused by occasional sensor disconnection or data packet loss:
[0096]
[0097] Where: P i (t) Indicates the t At this moment, i Pressure signal value of each section;
[0098] Noise filtering is specifically: for the high-frequency random interference in the gas pipeline network, the original signal is smoothed using exponentially weighted moving average:
[0099]
[0100] Where: represents the smoothing coefficient (in this embodiment, =0.3); x(t) Represents the original signal value; Represents the signal value after exponentially weighted moving average processing;
[0101] Normalization and encoding are specifically as follows:
[0102] First, standardize the dataset for missing value interpolation and noise filtering:
[0103]
[0104] Where: x norm Represents a sample x i Normalized values;x i Indicates the first i samples; represents the mean of the data set; Represents the standard deviation of the data set;
[0105] The standardized values are then One-Hot encoded (conventional One-Hot encoding in this field can be used) to eliminate the impact of different dimensions on model training.
[0106] The spatiotemporal feature module extracts spatial correlation features, temporal dynamic features, and causal propagation features from the preprocessed data of each sliding window segment, and concatenates them to form a three-dimensional feature tensor;
[0107] Spatial correlation features include the instantaneous pressure difference between two nodes and relative amplitude :
[0108]
[0109] Temporal dynamics features include sliding window data average , sliding window data standard deviation , Maximum volatility of sliding window data And the fluctuation direction of sliding window data :
[0110]
[0111] Where: Represents a specific moment within the sliding window used to calculate the fluctuation direction (for example, the last sampling moment within the window, used to compare with the previous moment to determine the pressure fluctuation direction);
[0112] Causal propagation characteristics include causal strength Synchronicity with time series trends :
[0113]
[0114]
[0115] Where: Indicates the k Nodes in the window i The pressure change;
[0116] Finally, the spatial association feature F k , time dynamic characteristics F s and causal propagation characteristics F yThrough channel splicing, form a three-dimensional feature tensor X k :
[0117]
[0118] in: N Indicates the number of pipe network nodes; U Represents the total dimension of the three types of features (for example, spatial correlation features are 2-dimensional, temporal dynamics features are 5-dimensional, and causal propagation features are 2-dimensional, so the total dimension is 9); R Indicates the number of time steps (i.e., the number of sampling points in the sliding window); Concat() Indicates channel splicing.
[0119] The ST-CGN network module is fed with the input of a three-dimensional feature tensor. X k , output the multi-operating condition probability vector corresponding to the sliding window slice. The specific process is:
[0120] First, input the three-dimensional feature tensor X k , using causal-driven modeling and generating causal features through nonlinear structural equation models, specifically:
[0121] First, a nonlinear structural equation model is established:
[0122]
[0123] Where: Pa(i) Representation node i The parent node set of Represents a nonlinear activation function (such as the Sigmoid function); Indicates the parent node j In time ( t - t c ) characteristics (such as pressure value); Representation node j To Node i Physical parameters of pressure transmission (such as pipeline resistance, flow velocity, etc.); Represents a nonlinear mapping function used to fuse features and physical parameters (e.g., MLP, multilayer perceptron); represents the random error term; Indicates the strength of dynamic causal effects;
[0124]
[0125] Where: I q 、 I k Both represent weight matrices; where: Iq For nodes i The features at the current moment are linearly transformed and mapped to a specific feature space to generate query values to capture the key information of the current node state; acting on the parent node j Features Physical parameters of pressure transmission The concatenated vector is transformed linearly to generate a key value, which is used to calculate the relevance with the query vector; d Indicates standardization; Represents a point set; Softmax() express Softmax function;
[0126] Ensure that the causal graph is acyclic by smooth acyclic loss, avoiding nodes i The parent node set Pa(i) Falling into a causal loop, ensuring the logic of the causal relationship in the model ( R dag represents a smooth acyclic loss function):
[0127]
[0128] Where: tr() represents the trace of the matrix (i.e., the sum of the diagonal elements); N Indicates the number of nodes; represents the Hadamard product; I W Represents the weight matrix, whose elements are I ij definition:
[0129]
[0130] Where: Represents the indicator function, that is, if the node j Belongs to the node i The parent node set of is 1, otherwise, is 0; express L 2 norm, that is, Euclidean norm.
[0131] Then, using adaptive modal fusion, TCN (Temporal Convolutional Network) or GCN (Graph Convolutional Network) is selected according to the node degree, specifically:
[0132] Defining Nodes i Modal fusion strategy:
[0133]
[0134] Among them, TCN is used in low-node-degree scenarios of linear or tree topologies and to capture local timing patterns:
[0135] ;
[0136] Where: DilatedConv() represents the dilated convolution operation, used to capture local temporal patterns; Representation node i In the time interval [ t - K, t ], with the expansion factor D The characteristic sequence of the samples; W TCN Represents the weight parameters of the TCN layer, used for convolution operations; K Indicates the convolution kernel size;
[0137] GCN is used for high node degree scenarios with complex or ring structures and for aggregating neighbor information:
[0138]
[0139] Where: represents the normalized adjacency matrix element, which contains the causal weight , represents a node j With node i The connection relationship and weight; W GCN Represents the weight matrix of the GCN layer, used for feature transformation; N(i) Representation node i A set of neighbor nodes, used to aggregate neighbor information; ReLU() Represents the activation function.
[0140] Afterwards, the spatiotemporal convolutional layer and LSTM (long short-term memory network) are superimposed to output the prediction results.
[0141] Finally, we use counterfactuals to locate interventions, calculate effect sizes, and locate key nodes, specifically:
[0142] First, the node s Apply abnormal intervention to generate counterfactual features :
[0143]
[0144] Where: represents the intervention increment, which conforms to the normal distribution;
[0145] Then, obtain the predicted value after intervention and compare the difference between the predictions before and after intervention to quantify the node s For downstream nodes j Impact:
[0146]
[0147] Where: represents the original predicted value; represents the predicted value after the counterfactual positioning intervention;
[0148] Finally, the node with the largest effect size is selected as the key intervention target and the key intervention node is achieved. position:
[0149]
[0150] Where: PD Represents a set of downstream nodes; Indicates s In the range of values, find the function that makes the subsequent expression reach the maximum value.
[0151] The edge intelligent optimization module achieves edge optimization of the ST-CGN network module through MAML (Model-Agnostic Meta-Learning) rapid adaptation, knowledge distillation, model pruning, and quantization;
[0152] MAML fast adaptation is used to improve cross-scenario generalization capabilities and quickly adapt to new scenarios:
[0153]
[0154] Where: P local Represents the local abnormal sample dataset; L cls Represents the classification loss function based on the local dataset; represents the initial parameters of the model; represents the gradient operator with respect to the initial parameters; represents the learning rate; represents the updated model parameters;
[0155] Knowledge distillation transfers knowledge from the teacher model to the student model, compressing the model size and improving reasoning efficiency:
[0156]
[0157] Where: KL represents the divergence, which is used to measure the difference between the output distributions of the teacher model and the student model after a specific transformation; Represents the activation function, which is used to convert the output of the model into a probability distribution (for example: Softmax function); Represents the output of the teacher model for the input data X; Represents the output of the student model for the input data X; T Indicates the smoothness used to control the probability distribution;
[0158] Model pruning and quantization combine structured pruning and INT8 quantization to generate efficient edge models:
[0159]
[0160] Where: I ys represents the original weight matrix; Represents the weight matrix after pruning operation; Represents the pruning operation function; It represents the pruning rate. In the present invention, the pruning rate is 0.2.
[0161] The result processing module obtains the probability of the corresponding working condition through the multi-working condition probability vector of the ST-CGN network module optimized by the edge intelligent optimization module, and triggers the alarm judgment according to the preset threshold; specifically: the result processing module input is the multi-working condition probability vector G =[ G 0, G 1,…, G 9], the result processing module passes Softmax The function calculates the probability vector of multiple working conditions and obtains the probability corresponding to each working condition g i ( i=0,1,…,9 ); Set the first level leakage alarm threshold respectively M 1 and 2nd level blocking alarm thresholds M 2 (In this embodiment, M 1 is 0.9, M 2 is 0.85):
[0162] If max{ g 4 ,g 5 ,g 6 ,g 7}> M 1, then trigger the first level leakage alarm;
[0163] If max{ g 8 ,g 9}> M 2, then trigger the secondary blocking alarm;
[0164] If neither of the above two situations occurs, it is judged as a normal operating condition and no alarm is triggered.
[0165] Example 2:
[0166] As another preferred embodiment of the technical solution of the present invention, based on the solution of Example 1 above, the spatiotemporal convolution layer in the ST-CGN network module simultaneously models the spatial neighborhood relationship and the local dependency of the temporal sliding window to maintain temporal causality, specifically:
[0167] Spatiotemporal Separable Convolution:
[0168]
[0169] Where: b represents the bias term; Represents the activation function, used to introduce nonlinearity;
[0170] in, Represents spatial convolution, which is used to aggregate neighbor node features:
[0171]
[0172] Where: Represents the dynamic causal adjacency matrix, i.e., the time t node i With neighbors j connection relationship; W s Represents the weight matrix of spatial convolution; Representation node j At the moment t characteristics;
[0173] Represents temporal convolution, using dilated causal convolution to prevent future information leakage:
[0174]
[0175] Where: represents the weight of temporal convolution, k Indicates the position within the convolution kernel; Representation node i exist Characteristics of the moment ( ); Indicates the convolution kernel size; D represents the expansion factor;
[0176] Output the spatiotemporal convolution of each node The nodes are split into independent time series and input into the LSTM network. The core structure of the LSTM network includes cell state, forget gate, input gate and output gate. Cell state: memorizes long-term information and controls the flow of information through forget gate, input gate and output gate. Forget gate: determines which historical information is discarded. Input gate: determines which parts of the current input are stored in the cell state. Output gate: determines which part of the cell state is used as the current output.
Claims
1. A gas abnormal operating condition monitoring and alarm system, characterized by: A monitoring system including a data pre-processing module, a spatiotemporal feature module, an ST-CGN network module, an edge intelligent optimization module and a result processing module is used; among which: The data preprocessing module processes the data collected by the sensors in the pipeline through sliding window segmentation, missing value interpolation, noise filtering, normalization and encoding methods. The specific sliding window segmentation is: for the rapid dynamic changes of the gas network pressure signal in a short time, a length of T w , step by S Sliding window sharding strategy, each window W k for: Where: t k Indicates the k The starting sampling time of the window; By capturing the dynamic redundancy and continuity between consecutive windows, the risk of missing detection of early leakage or blocking pulses is reduced; Missing value interpolation is specifically as follows: For each sliding window, a linear interpolation strategy is used to deal with sampling gaps caused by occasional sensor disconnection or data packet loss: Where: P i (t) Indicates the t At this moment, i Pressure signal value of each section; Noise filtering is specifically: for the high-frequency random interference in the gas pipeline network, the original signal is smoothed using exponentially weighted moving average: Where: represents the smoothing coefficient; x(t) Represents the original signal value; Represents the signal value after exponentially weighted moving average processing; Normalization and encoding are specifically as follows: First, standardize the dataset for missing value interpolation and noise filtering: Where: x norm Represents a sample x i Normalized values; x i Indicates the first i samples; represents the mean of the data set; Represents the standard deviation of the data set; Then perform One-Hot encoding on the standardized values to eliminate the impact of different dimensions on model training; The spatiotemporal feature module extracts spatial correlation features, temporal dynamic features, and causal propagation features from the preprocessed data of each sliding window segment, and splices them into a three-dimensional feature tensor; the spatial correlation features include the instantaneous pressure difference between two nodes. and relative amplitude : Temporal dynamics features include sliding window data average , sliding window data standard deviation , Maximum volatility of sliding window data And the fluctuation direction of sliding window data : Where: Indicates the sampling time in the sliding window used to calculate the fluctuation direction; Causal propagation characteristics include causal strength Synchronicity with time series trends : Where: Indicates the k Nodes in the window i The pressure change; Finally, the spatial association feature F k , time dynamic characteristics F s and causal propagation characteristics F y Through channel splicing, form a three-dimensional feature tensor X k : in: N Indicates the number of pipe network nodes; U Represents the total dimension of the three types of features; R represents the number of time steps; Concat() Indicates channel splicing; The ST-CGN network module outputs the multi-condition probability vector corresponding to the sliding window slice through the input of the three-dimensional feature tensor; the ST-CGN network module outputs the multi-condition probability vector corresponding to the sliding window slice according to the input three-dimensional feature tensor. X k The specific process of output prediction is as follows: First, input the three-dimensional feature tensor X k , using causal-driven modeling and nonlinear structural equation models to generate causal features; then, using adaptive modal fusion, TCN or GCN is selected based on node degree; after that, spatiotemporal convolutional layers and LSTM are superimposed to output prediction results; finally, counterfactuals are used to locate interventions, calculate effect sizes, and locate key nodes; The edge intelligent optimization module achieves edge optimization of the ST-CGN network module through MAML rapid adaptation, knowledge distillation, model pruning and quantization; The result processing module obtains the probability of the corresponding working condition through the multi-working condition probability vector of the ST-CGN network module optimized by the edge intelligent optimization module, and triggers the alarm judgment according to the preset threshold.
2. A gas abnormal operating condition monitoring and alarm system according to claim 1, characterized in that: The method of using causal driven modeling to generate causal characteristics through nonlinear structural equation model is specifically as follows: First, a nonlinear structural equation model is established: Where: Pa(i) Representation node i The parent node set of represents a nonlinear activation function; Indicates the parent node j In time ( tt c ) characteristics; Representation node j To Node i Physical parameters of pressure transmission; represents a nonlinear mapping function; represents the random error term; Indicates the strength of dynamic causal effects; Where: I q 、 I k Both represent weight matrices; where: I q For nodes i The features at the current moment are linearly transformed and mapped to the feature space obtained after the linear transformation to generate a query value to capture the key information of the current node state; it acts on the parent node j Features Physical parameters of pressure transmission The concatenated vector is transformed into a key value through linear transformation; d Indicates standardization; Represents a point set; Softmax() express Softmax function; Ensure that the causal graph is acyclic by smooth acyclic loss, avoiding nodes i The parent node set Pa(i) Fall into a causal loop to ensure the logic of the cause and effect relationship in the model: Where: tr() represents the trace of the matrix; N Indicates the number of nodes; represents the Hadamard product; I W Represents the weight matrix, whose elements are I ij definition: Where: Represents the indicator function, that is, if the node j Belongs to the node i The parent node set of is 1, otherwise, is 0; express L 2 norm, that is, Euclidean norm.
3. A gas abnormal operating condition monitoring and alarm system according to claim 1, characterized in that: The method of using adaptive modal fusion to select TCN or GCN based on node degree is as follows: Defining Nodes i Modal fusion strategy: Among them, TCN is used in low-node-degree scenarios of linear or tree topologies and to capture local timing patterns: Where: DilatedConv() represents the dilated convolution operation; Representation node i In the time interval [ tK,t ], with the expansion factor D The characteristic sequence of the samples; W TCN Represents the weight parameters of the TCN layer; K Indicates the convolution kernel size; GCN is used for high node degree scenarios with complex or ring structures and for aggregating neighbor information: Where: represents the normalized adjacency matrix element, which contains the causal weight , represents a node j With node i The connection relationship and weight; W GCN Represents the weight matrix of the GCN layer; N(i) Representation node i The set of neighbor nodes of ReLU() Represents the activation function.
4. A gas abnormal operating condition monitoring and alarm system according to claim 1, characterized in that: The method of locating intervention, calculating effect size and locating key nodes through counterfactuals is specifically as follows: First, the node s Apply abnormal intervention to generate counterfactual features : Where: represents the intervention increment, which conforms to the normal distribution; Then, obtain the predicted value after intervention and compare the difference between the predictions before and after intervention to quantify the node s For downstream nodes j Impact: Where: represents the original predicted value; represents the predicted value after the counterfactual positioning intervention; Finally, the node with the largest effect size is selected as the key intervention target and the key intervention node is achieved. position: Where: PD Represents a set of downstream nodes; Indicates s In the range of values, find the function that makes the subsequent expression reach the maximum value.
5. The abnormal gas operating condition monitoring and alarm system according to claim 1 is characterized in that: The result processing module input is a multi-operating condition probability vector G =[ G 0, G 1,…, G 9], the result processing module passes Softmax The function calculates the probability vector of multiple working conditions and obtains the probability corresponding to each working condition g i ( i=0,1,…,9 ); Set the first level leakage alarm threshold respectively M 1 and 2nd level blocking alarm thresholds M 2: If max{ g 4 ,g 5 ,g 6 ,g 7}> M 1, then trigger the first level leakage alarm; If max{ g 8 ,g 9}> M 2, then trigger the secondary blocking alarm; If neither of the above two situations occurs, it is judged as a normal operating condition and no alarm is triggered.
Citation Information
Patent Citations
Monitoring system and method for displaying interface of monitoring equipment
CN119225873A
Pipeline anomaly detection method based on VQSAE and DCGCN
CN119494066A