Industrial field gas safety monitoring and early warning method and system based on artificial intelligence
By combining time window segmentation and dynamic adjacency matrix with spatial anomaly correlation learning, the parameters are optimized, solving the problems of delayed and unstable early warning in industrial gas safety monitoring, and achieving highly accurate and timely gas safety monitoring.
Patent Information
- Application Number
- CN202511198738.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-26
- Publication Date
- 2025-11-11
- Estimated Expiration
- Not applicable · inactive patent
Smart Images

Figure CN120932390A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of safety monitoring technology, specifically referring to an industrial site gas safety monitoring and early warning method and system based on artificial intelligence. Background Technology
[0002] The industrial site gas safety monitoring and early warning system is an intelligent system that uses advanced artificial intelligence technology, integrates data from multiple gas sensors, and uses deep neural networks to monitor and warn of risks of various gases in industrial sites in real time. It assists staff in quickly formulating response strategies, thereby effectively preventing safety accidents caused by gas problems and providing a solid guarantee for the safe and stable operation of industrial production.
[0003] However, existing industrial gas safety monitoring and early warning methods suffer from several drawbacks. Industrial gas leaks typically exhibit spatiotemporal diffusion characteristics, making it easy to misjudge slow leaks as normal fluctuations by relying solely on single-point or short-term data. Furthermore, traditional methods neglect the spatial correlation between sensors, failing to distinguish between local sensor malfunctions and actual gas leaks. This results in delayed early warnings, high false alarm rates, and high missed alarm rates in industrial gas safety monitoring. Additionally, existing industrial gas safety monitoring and early warning methods are hampered by the dynamic, large-scale, and outlier nature of industrial gas data, as well as the sparseness of some gas data. Traditional parameter optimization methods struggle to adapt to these characteristics, leading to unreliable adaptation to the dynamic industrial environment and unstable early warning results. Summary of the Invention
[0004] To address the above issues and overcome the shortcomings of existing technologies, this invention provides an artificial intelligence-based method and system for industrial site gas safety monitoring and early warning. Addressing the problems of existing methods where industrial gas leaks typically exhibit spatiotemporal diffusion characteristics, relying solely on single-point or short-term data can easily lead to slow leaks being misjudged as normal fluctuations. Furthermore, traditional methods neglect the spatial correlation between sensors, failing to distinguish between local sensor malfunctions and actual gas leaks, resulting in delayed early warnings, high false alarm rates, and high false negative rates in industrial site gas safety monitoring. This solution extracts continuous subsequences through time window segmentation, combines time prior modeling and sequence association learning, and fuses differences and sudden anomaly indicators to obtain a temporal anomaly score. Through dynamic adjacency matrices and spatial anomaly association learning, a spatial anomaly score is obtained. Finally, through spatiotemporal feature splicing, bidirectional GRU, and attention mechanisms, the prediction results are output, achieving comprehensive capture of the spatiotemporal dynamic characteristics of gas concentration, effectively... This approach distinguishes between normal fluctuations and real risks, as well as sensor malfunctions and leaks, improving the timeliness and accuracy of gas safety monitoring and early warning, and adapting to complex gas diffusion scenarios in industrial settings. Addressing the issues of dynamic, large-scale, and outlier gas data, as well as sparse data in some industrial settings, traditional parameter optimization methods struggle to adapt to these characteristics, leading to unreliable adaptation to the dynamic industrial environment and unstable early warning results. This solution employs gradient sparsification to obtain sparse gradients, combines this with deviation correction coefficients to update the Fisher information matrix estimate, introduces a stability constant to obtain and prune the natural gradient, updates the momentum term using deviation correction coefficients, designs and prunes an adaptive regularization term, and updates parameters based on a cosine annealing learning rate to obtain optimal learnable parameters. This ensures the model maintains stable early warnings in dynamic environments, resulting in more reliable warning levels and providing consistent decision-making support for industrial site responses.
[0005] The technical solution adopted by this invention is as follows: The industrial field gas safety monitoring and early warning method based on artificial intelligence provided by this invention includes the following steps:
[0006] Step S1: Industrial field gas data acquisition;
[0007] Step S2: Preprocessing of industrial field gas data;
[0008] Step S3: Construct a gas safety monitoring and early warning model;
[0009] Step S4: Optimize the parameters of the gas safety monitoring and early warning model;
[0010] Step S5: Real-time security monitoring and early warning.
[0011] Furthermore, in step S1, the industrial site gas data acquisition involves deploying sensors corresponding to the gas type at the industrial site to collect historical industrial site gas data. The historical industrial site gas data includes time-series data of gas concentration and warning levels, with the warning levels used as data tags.
[0012] Furthermore, in step S2, the industrial field gas data preprocessing involves data cleaning, data encoding, and data normalization.
[0013] Furthermore, in step S3, the construction of the gas safety monitoring and early warning model is based on preprocessed historical industrial field gas data, and a deep neural network is used to complete the construction of the gas safety monitoring and early warning model; specifically, it includes the following steps:
[0014] Step S31: Time window division; Based on the preprocessed historical industrial field gas data, construct a gas concentration time series data matrix. Use a fixed-size sliding time window to divide the gas concentration time series data matrix. Set the window length to L. Through the sliding window operation, extract continuous subsequences of length L from the gas concentration time series data matrix to obtain H local time windows.
[0015] Step S32: Temporal feature extraction; including the following steps:
[0016] Step S321: Time prior modeling; For each sensor, calculate the rate of change of gas concentration in adjacent time steps, and construct the time prior correlation matrix for each sensor in each local time window;
[0017] Step S322: Sequence association learning; For each sensor, the gas concentration sequence within its local time window is mapped to a high-dimensional feature, a high-concentration attention mask is generated, the dependency between time steps is learned through the attention mechanism, and the sequence association matrix of each sensor in each local time window is constructed.
[0018] Step S323: Temporal anomaly correlation fusion; For each sensor, calculate the difference between its temporal prior correlation matrix and sequence correlation matrix in each local time window, as well as the sudden anomaly indication in the gas concentration value sequence, and fuse the difference and sudden anomaly indication to obtain the temporal anomaly score;
[0019] Step S33: Spatial feature extraction; including the following steps:
[0020] Step S331: Dynamic adjacency matrix generation; Treat each sensor in the industrial field as a graph node. For each local time window, comprehensively consider the physical distance and the correlation of gas concentration value sequences to calculate the spatial similarity between sensors, construct a spatial similarity matrix, obtain the spatial association strength between sensors through weight transformation and threshold screening, and construct a dynamic adjacency matrix.
[0021] Step S332: Spatial anomaly association learning; learn the spatial association features of each sensor by aggregating neighbor features through a two-layer graph convolutional network, output the spatial feature matrix, calculate the deviation between the spatial features of each sensor and the average spatial features, and obtain the spatial anomaly score;
[0022] Step S34: Spatiotemporal feature concatenation; using temporal anomaly scores and spatial anomaly scores, the temporal high-dimensional features and spatial features of each local time window are weighted respectively, and the concatenation results in a spatiotemporal comprehensive feature;
[0023] Step S35: Prediction; Concatenate the spatiotemporal integrated features of all local time windows in the order of time steps to construct a global spatiotemporal feature matrix. Use a bidirectional GRU to capture the long-term temporal dependencies of the global spatiotemporal feature matrix to obtain the hidden state of each time step. Introduce an attention mechanism to assign weights to the hidden state of each time step to obtain weighted features. Input the weighted features into a fully connected layer to output the probability distribution of the warning level. Select the warning level with the highest probability as the output prediction result.
[0024] Further, in step S4, the optimization of the gas safety monitoring and early warning model parameters involves optimizing the learnable parameters in the gas safety monitoring and early warning model; specifically, it includes the following steps:
[0025] Step S41: Gradient sparsity processing; Based on the learnable parameters in the current gas safety monitoring and early warning model, calculate the original gradient of the loss function, filter and retain important gradient components by gradient magnitude, generate a gradient filtering mask with the same dimension as the original gradient, and obtain the sparse gradient by element-wise multiplication of the gradient filtering mask and the original gradient.
[0026] Step S42: Fisher information matrix estimation update; bias correction improves estimation accuracy; calculate the bias correction coefficients of momentum term and Fisher information matrix estimation based on exponential decay rate, and update Fisher information matrix estimation by exponential moving average based on the squared term of sparse gradient;
[0027] Step S43: Natural gradient clipping; Based on the root mean square dynamic adjustment of the sparse gradient, the sparse gradient is converted into a natural gradient by Fisher information matrix estimation, and the natural gradient is clipped.
[0028] Step S44: Momentum term update; Based on the clipped natural gradient and bias correction coefficient, update the momentum term using an exponential moving average;
[0029] Step S45: Adaptive adjustment of regularization terms; design adaptive regularization terms based on Fisher information matrix estimation, and prune the adaptive regularization terms;
[0030] Step S46: Parameter Update; A maximum number of iterations F is preset. A cosine annealing learning rate is used to integrate the momentum term and the adaptive regularization term to update the learnable parameters in the gas safety monitoring and early warning model. The update continues when the number of iterations reaches F, or when the change in the loss function value is less than 10 for five consecutive iterations. -5 When the iteration ends, the optimal learnable parameters are obtained.
[0031] Furthermore, in step S5, the real-time safety monitoring and early warning is achieved by collecting real-time gas concentration time-series data through sensors deployed at the industrial site, preprocessing the real-time gas concentration time-series data, and inputting it into a gas safety monitoring and early warning model constructed based on optimal learnable parameters for processing. The early warning level is obtained based on the output prediction results, and the early warning level is pushed to the monitoring platform in real time, thereby realizing real-time monitoring and early warning of gas safety at the industrial site.
[0032] The present invention provides an artificial intelligence-based industrial field gas safety monitoring and early warning system, which includes an industrial field gas data acquisition module, an industrial field gas data preprocessing module, a gas safety monitoring and early warning model construction module, a gas safety monitoring and early warning model parameter optimization module, and a real-time safety monitoring and early warning module.
[0033] The industrial field gas data acquisition module collects historical industrial field gas data and sends the data to the industrial field gas data preprocessing module.
[0034] The industrial field gas data preprocessing module performs data cleaning, data encoding, and data normalization, and then sends the data to the gas safety monitoring and early warning model building module.
[0035] The module for constructing a gas safety monitoring and early warning model extracts continuous subsequences by dividing the time window, combines time prior modeling and sequence association learning, integrates differences and sudden anomaly indicators to obtain a time anomaly score, obtains a spatial anomaly score through dynamic adjacency matrix and spatial anomaly association learning, outputs prediction results through spatiotemporal feature splicing, bidirectional GRU and attention mechanism, and sends the data to the gas safety monitoring and early warning model parameter optimization module.
[0036] The gas safety monitoring and early warning model parameter optimization module obtains sparse gradients through gradient sparsification, updates the Fisher information matrix estimate by combining the deviation correction coefficient, introduces a stability constant to obtain natural gradients and performs pruning, updates the momentum term by combining the deviation correction coefficient, designs an adaptive regularization term and performs pruning, updates the parameters based on the cosine annealing learning rate, obtains the optimal learnable parameters, and sends the data to the real-time safety monitoring and early warning module.
[0037] The real-time safety monitoring and early warning module constructs a gas safety monitoring and early warning model based on the optimal learnable parameters, obtains the early warning level based on the output prediction results, and pushes the early warning level to the monitoring platform in real time.
[0038] The beneficial effects achieved by the present invention using the above solution are as follows:
[0039] (1) In view of the problems in existing industrial gas safety monitoring and early warning methods, industrial gas leaks usually exhibit spatiotemporal diffusion characteristics. Relying solely on single-point or short-term data can easily lead to slow leaks being misjudged as normal fluctuations. Furthermore, traditional methods ignore the spatial correlation between sensors, making it impossible to distinguish between local sensor failures and actual gas leaks. This results in delayed early warnings, high false alarm rates, and high missed alarm rates in industrial gas safety monitoring. This solution extracts continuous subsequences by dividing the time window to avoid ignoring real risks due to fluctuations in single-point data. By combining time prior modeling and sequence association learning, the difference and sudden anomaly indicators are fused to obtain a time anomaly score, making the time features more consistent with the actual dynamics of industrial gas diffusion and improving adaptability to complex time series patterns. Through dynamic adjacency matrix and spatial anomaly association learning, a spatial anomaly score is obtained, making the spatial features more consistent with the actual spatial range of industrial gas diffusion. By spatiotemporal feature splicing and bidirectional GRU and attention mechanisms, the prediction results are output, achieving comprehensive capture of the spatiotemporal dynamic features of gas concentration, effectively distinguishing between normal fluctuations and real risks, and between sensor failures and leaks, thereby improving the timeliness and accuracy of gas safety monitoring and early warning, and adapting to complex gas diffusion scenarios in industrial sites.
[0040] (2) To address the problems in existing industrial field gas safety monitoring and early warning methods, such as the dynamic nature, large scale, and outliers of industrial field gas data, and the sparse nature of some gas data, traditional parameter optimization methods are difficult to adapt to these characteristics, resulting in unreliable adaptation to the dynamic environment of industrial fields and unstable early warning results. This solution obtains sparse gradients through gradient sparsification, which significantly improves the parameter update efficiency of large-scale data and reduces the interference of sparse data noise on parameters. Furthermore, it combines the deviation correction coefficient with the Fisher information matrix estimation to accurately reflect the dynamic changes in parameter uncertainty, making the parameter estimation more consistent with real-time data. The model employs several techniques: First, it introduces a stability constant to obtain a natural gradient, which is then pruned to ensure smoother parameter updates and reduce abrupt changes in warning results. Second, it updates the momentum term using a bias correction coefficient, enabling rapid adaptation to new distributions in dynamically changing industrial data and shortening the unstable transition period of warning results. Third, it designs and prunes an adaptive regularization term to make the model more robust in learning rarefied gas parameters, reducing warning errors caused by data sparsity. Fourth, it updates parameters based on a cosine annealing learning rate to obtain optimal learnable parameters, ensuring stable warnings in dynamic environments and providing more reliable warning levels for consistent decision-making in industrial settings. Attached Figure Description
[0041] Figure 1 A flowchart illustrating the artificial intelligence-based industrial field gas safety monitoring and early warning method provided by this invention;
[0042] Figure 2 A schematic diagram of an artificial intelligence-based industrial field gas safety monitoring and early warning system provided by the present invention;
[0043] Figure 3 This is a flowchart illustrating step S3;
[0044] Figure 4 This is a flowchart illustrating step S4.
[0045] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with the embodiments of the invention to explain the invention and do not constitute a limitation thereof. Detailed Implementation
[0046] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0047] In the description of this invention, it should be understood that the terms "upper", "lower", "front", "rear", "left", "right", "top", "bottom", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.
[0048] Example 1, see Figure 1 The present invention provides an artificial intelligence-based method for industrial field gas safety monitoring and early warning, which includes the following steps:
[0049] Step S1: Industrial field gas data acquisition; collect historical industrial field gas data;
[0050] Step S2: Industrial field gas data preprocessing; data cleaning, data encoding, and data normalization are performed.
[0051] Step S3: Construct a gas safety monitoring and early warning model; extract continuous subsequences by dividing the time window, combine time prior modeling and sequence association learning, fuse differences and sudden anomaly indicators to obtain time anomaly scores, obtain spatial anomaly scores through dynamic adjacency matrix and spatial anomaly association learning, and output prediction results through spatiotemporal feature splicing, bidirectional GRU and attention mechanism.
[0052] Step S4: Optimize the parameters of the gas safety monitoring and early warning model; obtain sparse gradients through gradient sparsification, update the Fisher information matrix estimation by combining the bias correction coefficient, introduce the stability constant to obtain the natural gradient and perform pruning, update the momentum term by combining the bias correction coefficient, design the adaptive regularization term and perform pruning, update the parameters based on the cosine annealing learning rate, and obtain the optimal learnable parameters.
[0053] Step S5: Real-time safety monitoring and early warning; Construct a gas safety monitoring and early warning model based on the optimal learnable parameters, obtain the early warning level based on the output prediction results, and push the early warning level to the monitoring platform in real time.
[0054] Example 2, see Figure 1This embodiment is based on the above embodiment. In step S1, industrial site gas data acquisition involves deploying sensors corresponding to the gas types at the industrial site. The sensor acquisition frequency is set to 1 second / time to collect historical industrial site gas data. The historical industrial site gas data includes gas concentration time series data and warning levels. The industrial site gases include oxygen, carbon dioxide, hydrogen sulfide, carbon monoxide, chlorine, hydrogen cyanide, phosphine, sulfur dioxide, ammonia, methane, propane, butane, ethylene, propylene, hydrogen, acetylene, benzene, toluene, xylene, formaldehyde, and acetone. The warning levels include safe, low risk, medium risk, and high risk, and the warning levels are used as data tags.
[0055] Example 3, see Figure 1 This embodiment is based on the above embodiment. In step S2, the preprocessing of industrial field gas data involves data cleaning, data encoding, and data normalization.
[0056] The data cleaning process involves removing erroneous, missing, and outlier values from the data.
[0057] The data encoding uses One-Hot encoding to convert categorical data into numerical data.
[0058] The data normalization method uses a max-min scaling approach to unify numerical data to the same range.
[0059] Example 4, see Figure 1 and Figure 3 This embodiment is based on the above embodiment. In step S3, the gas safety monitoring and early warning model is constructed based on preprocessed historical industrial field gas data, using a deep neural network to complete the construction of the gas safety monitoring and early warning model; specifically, it includes the following:
[0060] Step S31: Time window division; Industrial site gas concentration anomalies usually manifest as trends over continuous time periods. Single point-in-time data cannot reflect this trend and is easily misjudged as normal fluctuations. Dividing the time window provides continuous local time-series segments for subsequent feature extraction. Based on the preprocessed historical industrial site gas data, a gas concentration time-series data matrix is constructed. A fixed-size sliding time window is used to divide the gas concentration time-series data matrix. The window length is set to L=60 seconds, and the starting time step interval between adjacent windows is 1 second. Through the sliding window operation, continuous subsequences of length L are sequentially extracted from the gas concentration time-series data matrix to obtain H local time windows.
[0061] Step S32: Temporal feature extraction; including the following steps:
[0062] Step S321: Time Prior Modeling; Gas diffusion exhibits locality. Ignoring this characteristic will lead to incorrect modeling of correlations between non-adjacent time steps, resulting in redundant time features. The prior correlation matrix quantifies the intensity of changes between adjacent time steps using an exponential function, eliminating invalid correlations between non-adjacent time steps. This reduces computational complexity while ensuring the physical rationality of time features. For each sensor, the rate of change of gas concentration between adjacent time steps is calculated. Based on the locality of gas diffusion, only the changes in gas concentration between adjacent time steps have a direct physical correlation. A time prior correlation matrix is constructed for each sensor in each local time window. The formula used is as follows:
[0063] ;
[0064] ;
[0065] In the formula, and These are the normalized gas concentration values of the i-th sensor at time step t+1 and time step t, respectively. It is the time sampling interval. It is the rate of change of gas concentration of the i-th sensor from time step t to t+1. Let h be the rate of change of gas concentration for the i-th sensor from time step t to time step w, where i is the sensor index, t and w are time step indices, and h is the local time window index. It is the maximum natural diffusion rate of the i-th sensor. It is the prior association strength between time step t and time step w of the i-th sensor in the h-th local time window;
[0066] Step S322: Sequence Association Learning; Temporal prior modeling only considers adjacent associations, which cannot capture complex temporal patterns. Furthermore, high-concentration moments are more critical for risk warning but are not given sufficient attention. A high-concentration mask allows the model to focus on moments approaching the safety threshold. Attention mechanisms can capture non-adjacent but important associations, improving the adaptability of temporal features to complex changes. For each sensor, the gas concentration sequence within its local time window is mapped to a high-dimensional feature, generating a high-concentration attention mask. The attention mechanism learns the dependencies between time steps, constructing the sequence association matrix for each sensor in each local time window. The formulas used are as follows:
[0067] ;
[0068] ;
[0069] ;
[0070] ;
[0071] In the formula, It is the high-dimensional feature matrix of the i-th sensor in the h-th local time window. It is the normalized gas concentration value sequence of the i-th sensor within the h-th local time window. It is a linear transformation function. It is a position encoding function. It is the high-concentration attention mask for the i-th sensor at time step t in the h-th local time window. Let Q, K, and V be the learnable gas safety concentration threshold corresponding to the i-th sensor, and let W be the query matrix, key matrix, and value matrix, respectively. Q W K and W V These are the learnable projective weight matrices corresponding to Q, K, and V, respectively. Q is the sequence correlation strength between time step t and time step w of the i-th sensor in the h-th local time window. t K is the vector in the t-th row of Q. w and V w These are the vectors in the w-th row of K and V, respectively. T is the transpose operation, and D is the dimension of the high-dimensional feature. It is the Softmax activation function;
[0072] Step S323: Temporal Anomaly Correlation Fusion; A single temporal correlation model struggles to distinguish between normal fluctuations and abnormal changes, easily missing sudden risks. Difference identification identifies anomalies deviating from physical laws, while sudden anomaly indicators capture short-term concentration spikes. This approach balances both anomaly modes, reducing false negatives in complex industrial environments. For each sensor, the difference between its temporal prior correlation matrix and sequential correlation matrix within each local time window, along with sudden anomaly indicators in the gas concentration value sequence, are calculated. The differences and sudden anomaly indicators are then fused to obtain the temporal anomaly score. The formula used is as follows:
[0073] ;
[0074] ;
[0075] ;
[0076] In the formula, and These are the difference between the i-th sensor and the sudden anomaly indication at time step t in the h-th local time window, respectively. It is the time anomaly score of the i-th sensor at time step t in the h-th local time window. and These are the time prior correlation vector and sequence correlation vector of the i-th sensor at time step t in the h-th local time window, respectively. It is the L1 norm, and k is the time step index. and These are the normalized gas concentration values of the i-th sensor at time step t+k+1 and time step t+k, respectively, and α is a learnable weighting coefficient.
[0077] Step S33: Spatial feature extraction; including the following steps:
[0078] Step S331: Dynamic Adjacency Matrix Generation; The spatial association between sensors is dynamic, and a fixed adjacency matrix cannot adapt to this change, leading to spatial feature distortion. Physical distance ensures the basic association between spatially nearest sensors, while concentration correlation adapts to real-time changes. Dynamic adjustment makes the spatial association more closely match the actual diffusion scenario in the industrial field. Each sensor in the industrial field is regarded as a graph node. For each local time window, the spatial similarity between sensors is calculated by comprehensively considering physical distance and the correlation of gas concentration value sequences, and a spatial similarity matrix is constructed. The spatial association strength between sensors is obtained through weight transformation and threshold screening, and a dynamic adjacency matrix is constructed. The formula used is as follows:
[0079] ;
[0080] ;
[0081] In the formula, and These represent the spatial similarity and spatial association strength between the i-th and j-th sensors within the h-th local time window. is the spatial similarity matrix in the h-th local time window, and δ is a learnable balance coefficient. d is the physical distance between the i-th and j-th sensors. ref This is a reference distance. It is the normalized gas concentration sequence of the j-th sensor within the h-th local time window. It is the Pearson correlation coefficient function, W U It is a learnable dynamic adjacency weight matrix. It takes the element in the i-th row and j-th column of the matrix after Softmax. It is a learnable adjacency threshold. It is an indicator function;
[0082] Step S332: Spatial Anomaly Association Learning; Anomalies in a single sensor may be faults rather than real risks. It is necessary to combine spatial associations with surrounding sensors to determine group anomalies. GCN aggregates neighbor features to identify regional anomalies. Spatial anomaly scores are quantified using the L2 norm to reduce false alarms caused by single sensor faults and improve the reliability of spatial features. A two-layer graph convolutional network aggregates neighbor features to learn the spatial association features of each sensor, outputting a spatial feature matrix. The deviation between the spatial features of each sensor and the average spatial features is calculated to obtain the spatial anomaly score. The formula used is as follows:
[0083] ;
[0084] ;
[0085] ;
[0086] In the formula, and These are the intermediate features of the i-th and j-th sensors output from the first-layer GCN, respectively. W1 is the high-dimensional feature matrix of the j-th sensor in the h-th local time window, and W2 are the learnable GCN layer weight matrices. It is the spatial feature vector of the i-th sensor in the h-th local time window. and These are the spatial characteristics and spatial anomaly score of the i-th sensor at time step t in the h-th local time window, respectively. It is the average spatial feature at time step t in the h-th local time window. It is an activation function. It is an L2 norm;
[0087] Step S34: Spatiotemporal feature stitching; Separating temporal and spatial features fails to reflect the spatiotemporal coupling of risk. A weighting mechanism highlights significant spatiotemporal anomalies, better reflecting the actual manifestation of risks in industrial settings and enhancing the feature's ability to represent risk. Temporal and spatial anomaly scores are used to weight the high-dimensional temporal and spatial features within each local time window, respectively. The resulting stitched features are the spatiotemporal comprehensive features. The formula used is as follows:
[0088] ;
[0089] in, It represents the spatiotemporal integrated characteristics of the i-th sensor at time step t within the h-th local time window. It is a feature concatenation operation;
[0090] Step S35: Prediction; Long-term temporal dependencies and key time steps are not given enough attention, leading to delayed or misjudged warnings. Bidirectional GRU can learn past and future dependencies, adapting to the cumulative risks of slow leaks in industry. The attention mechanism focuses on critical moments, and the probability output facilitates the selection of the most likely warning level, improving prediction accuracy. The spatiotemporal comprehensive features of all local time windows are concatenated in the order of time steps to construct a global spatiotemporal feature matrix. The bidirectional GRU is used to capture the long-term temporal dependencies of the global spatiotemporal feature matrix, obtaining the hidden state of each time step. An attention mechanism is introduced to assign weights to the hidden state of each time step, highlighting the features of key time steps, resulting in weighted features. The weighted features are input into a fully connected layer, outputting the probability distribution of warning levels. The warning level with the highest probability is selected as the output prediction result.
[0091] By performing the above operations, this solution addresses the problems in existing industrial gas safety monitoring and early warning methods. These problems include the spatiotemporal diffusion characteristics of industrial gas leaks, the tendency to misjudge slow leaks as normal fluctuations by relying solely on single-point or short-term data, and the inability of traditional methods to distinguish between local sensor malfunctions and actual gas leaks, leading to delayed early warnings, high false alarm rates, and high missed alarm rates in industrial gas safety monitoring. This solution extracts continuous subsequences through time window segmentation to avoid overlooking real risks due to single-point data fluctuations. Combining time prior modeling and sequence association learning, it fuses differences and sudden anomaly indicators to obtain a time anomaly score, making the time features more closely match the actual dynamics of industrial gas diffusion and improving adaptability to complex time-series patterns. Through dynamic adjacency matrices and spatial anomaly association learning, it obtains a spatial anomaly score, making the spatial features more closely match the actual spatial range of industrial gas diffusion. Finally, through spatiotemporal feature splicing, bidirectional GRU, and attention mechanisms, it outputs prediction results, achieving comprehensive capture of the spatiotemporal dynamics of gas concentration, effectively distinguishing between normal fluctuations and real risks, and between sensor malfunctions and leaks. This improves the timeliness and accuracy of gas safety monitoring and early warning, adapting to complex gas diffusion scenarios in industrial settings.
[0092] Example 5, see Figure 1 and Figure 4 This embodiment is based on the above embodiment. In step S4, the optimization of the gas safety monitoring and early warning model parameters involves optimizing the learnable parameters in the gas safety monitoring and early warning model; specifically, it includes the following steps:
[0093] Step S41: Gradient Sparsity Processing; The gas safety monitoring and early warning model has many parameters, and the full gradient contains redundant information, leading to inefficient parameter updates and a tendency to overfit. Focusing on parameters with a significant impact on loss improves optimization efficiency for large-scale data in industrial scenarios and reduces the risk of overfitting. Based on the learnable parameters in the current gas safety monitoring and early warning model, the original gradient of the loss function is calculated. Important gradient components are retained by filtering based on gradient magnitude, generating a gradient filtering mask with the same dimension as the original gradient. Sparse gradients are obtained by element-wise multiplication of the gradient filtering mask with the original gradient. Learnable parameters include the projected weight matrix, gas safety concentration threshold, weighting coefficients, balance coefficients, dynamic adjacency weight matrix, adjacency threshold, GCN layer weight matrix, bidirectional GRU parameters, attention mechanism parameters, and fully connected layer parameters. The formulas used are as follows:
[0094] ;
[0095] ;
[0096] ;
[0097] In the formula, g f , and These are the original gradient, gradient filtering mask, and sparse gradient at the f-th iteration, respectively. It is the gradient operation of the cross-entropy loss function J with respect to the parameters. These are the learnable parameters in the gas safety monitoring and early warning model during the (f-1)th iteration, where f is the iteration index. and They are g f and The a-th element in the array, where a is the gradient component index. It is the element-wise multiplication operator. It is the 80th percentile of the absolute value of the original gradient;
[0098] Step S42: Fisher Information Matrix Estimation Update; The distribution of industrial field data changes dynamically, and a fixed Fisher Information Matrix cannot reflect changes in parameter uncertainty, leading to parameter estimation bias. Exponential decay allows the Fisher Information Matrix to focus more on recent data, adapting to the non-stationarity of industrial field data; Bias correction improves estimation accuracy; Based on the exponential decay rate, the momentum term and the bias correction coefficient of the Fisher Information Matrix estimate are calculated. Based on the squared term of the sparse gradient, the Fisher Information Matrix estimate is updated through exponential moving average; The formulas used are as follows:
[0099] ;
[0100] ;
[0101] ;
[0102] In the formula, and β1 and β2 are the bias correction coefficients for the momentum term and Fisher information matrix estimates at the f-th and f-1-th iterations, respectively, and the exponential decay rates for the momentum term and Fisher information matrix estimates are β1=0.9 and β2=0.999, respectively. and These are β1 raised to the power of f-1 and f, respectively. and These are β² raised to the power of f-1 and f, respectively. and These are the estimates of the Fisher information matrix at the f-th and (f-1)-th iterations, respectively;
[0103] Step S43: Natural Gradient Pruning; Outlier data leads to gradient explosion, parameter update oscillations, and affects model stability. The stability constant is dynamically adjusted with the root mean square of the gradient. Pruning prevents excessively large gradients and ensures the stability of model optimization in industrial environments. The stability constant is dynamically adjusted based on the root mean square of the sparse gradient. The sparse gradient is converted into a natural gradient that conforms to the geometric characteristics of the parameter space through Fisher information matrix estimation, and the natural gradient is pruned. The formula used is as follows:
[0104] ;
[0105] ;
[0106] ;
[0107] In the formula, and These are the stability constant and natural gradient at the f-th iteration, respectively. and These are the basic numerical stability constant and the scaling factor used to adjust the stability constant, respectively. , , , and These are the root mean square function, the minimum value function, and the exponential function. It is the natural gradient after clipping at the f-th iteration;
[0108] Step S44: Momentum term update; Gradient descent converges slowly and is prone to getting stuck in local optima, affecting model training efficiency. The momentum term retains the previous update direction, making it suitable for training on large-scale industrial data and accelerating model convergence to a better solution. Based on the pruned natural gradient and bias correction coefficient, the momentum term is updated using an exponential moving average. The formula used is as follows:
[0109] ;
[0110] In the formula, and These are the momentum terms at the f-th and f-1-th iterations, respectively;
[0111] Step S45: Adaptive Adjustment of Regularization Terms; Fixed regularization terms cannot adapt to the importance of different parameters, resulting in poor generalization ability. Adaptive regularization terms are adapted to scenarios with sparse gas data in industrial settings, improving the model's generalization ability to unseen risk scenarios. Adaptive regularization terms are designed in conjunction with Fisher information matrix estimation and then pruned. The formula used is as follows:
[0112] ;
[0113] ;
[0114] In the formula, It is the adaptive regularization term in the f-th iteration. It is the adaptive regularization term after pruning in the f-th iteration;
[0115] Step S46: Parameter Update; A fixed learning rate leads to slow convergence or oscillations in the later stages, and the lack of a clear termination condition makes it difficult to balance training accuracy and efficiency. Cosine annealing learning accelerates convergence first and then fine-tunes it, making it suitable for model training in industrial scenarios. The termination condition ensures that the model balances accuracy and efficiency, obtaining optimal parameters. A maximum number of iterations F is pre-set, and the momentum term and adaptive regularization term are integrated using the cosine annealing learning rate to update the learnable parameters in the gas safety monitoring and early warning model. When the number of iterations reaches F, or the change in the loss function value is less than 10 for 5 consecutive iterations, the update is completed. -5 When the iteration terminates, the optimal learnable parameters are obtained; the formula used is as follows:
[0116] ;
[0117] In the formula, These are the learnable parameters in the gas safety monitoring and early warning model during the f-th iteration. and These are the minimum and initial values of the learning rate, respectively. , , It is a cosine function.
[0118] By performing the above operations, this solution addresses the problems of existing industrial field gas safety monitoring and early warning methods, which suffer from the dynamic, large-scale, and outlier nature of industrial field gas data, as well as the sparseness of some gas data. Traditional parameter optimization methods struggle to adapt to these characteristics, leading to unreliable adaptation to the dynamic environment of industrial sites and unstable early warning results. This solution utilizes gradient sparsification to obtain sparse gradients, significantly improving the parameter update efficiency for large-scale data while reducing the interference of sparse data noise on parameters. Furthermore, it combines deviation correction coefficients with Fisher information matrix estimation to accurately reflect the dynamic changes in parameter uncertainty, making parameter estimation more closely aligned with real-time conditions. Data distribution: A stability constant is introduced to obtain a natural gradient, which is then pruned to make parameter updates smoother and reduce jumps in warning results. The momentum term is updated in conjunction with a deviation correction coefficient, enabling rapid adaptation to new distributions when industrial field data changes dynamically, shortening the unstable transition period of warning results. An adaptive regularization term is designed and pruned to make the model more robust in learning rarefied gas parameters, reducing warning errors caused by data sparsity. Parameters are updated based on a cosine annealing learning rate to obtain optimal learnable parameters, enabling the model to maintain stable warnings in dynamic environments, resulting in more reliable warning levels and providing a consistent decision-making basis for industrial field handling.
[0119] Example 6, see Figure 1 This embodiment is based on the above embodiment. In step S5, real-time safety monitoring and early warning is achieved by collecting real-time gas concentration time-series data through sensors deployed at the industrial site. After preprocessing the real-time gas concentration time-series data, it is input into a gas safety monitoring and early warning model constructed based on optimal learnable parameters for processing. The early warning level is obtained based on the output prediction results, and the early warning level is pushed to the monitoring platform in real time to realize real-time monitoring and early warning of gas safety at the industrial site.
[0120] Example 7, see Figure 2 Based on the above embodiments, the artificial intelligence-based industrial field gas safety monitoring and early warning system provided by the present invention includes an industrial field gas data acquisition module, an industrial field gas data preprocessing module, a gas safety monitoring and early warning model construction module, a gas safety monitoring and early warning model parameter optimization module, and a real-time safety monitoring and early warning module.
[0121] The industrial field gas data acquisition module collects historical industrial field gas data and sends the data to the industrial field gas data preprocessing module.
[0122] The industrial field gas data preprocessing module performs data cleaning, data encoding, and data normalization, and then sends the data to the gas safety monitoring and early warning model building module.
[0123] The module for constructing a gas safety monitoring and early warning model extracts continuous subsequences by dividing the time window, combines time prior modeling and sequence association learning, integrates differences and sudden anomaly indicators to obtain a time anomaly score, obtains a spatial anomaly score through dynamic adjacency matrix and spatial anomaly association learning, outputs prediction results through spatiotemporal feature splicing, bidirectional GRU and attention mechanism, and sends the data to the gas safety monitoring and early warning model parameter optimization module.
[0124] The gas safety monitoring and early warning model parameter optimization module obtains sparse gradients through gradient sparsification, updates the Fisher information matrix estimate by combining the deviation correction coefficient, introduces a stability constant to obtain natural gradients and performs pruning, updates the momentum term by combining the deviation correction coefficient, designs an adaptive regularization term and performs pruning, updates the parameters based on the cosine annealing learning rate, obtains the optimal learnable parameters, and sends the data to the real-time safety monitoring and early warning module.
[0125] The real-time safety monitoring and early warning module constructs a gas safety monitoring and early warning model based on the optimal learnable parameters, obtains the early warning level based on the output prediction results, and pushes the early warning level to the monitoring platform in real time.
[0126] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
[0127] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention.
[0128] The present invention and its embodiments have been described above. This description is not restrictive, and the accompanying drawings are only one embodiment of the present invention; the actual structure is not limited thereto. In conclusion, if those skilled in the art are inspired by this description and design similar structures and embodiments without departing from the spirit of the invention, such designs should fall within the protection scope of the present invention.
Claims
1. An artificial intelligence-based method for monitoring and early warning of gas safety in industrial settings, characterized by: The method includes the following steps: Step S1: Industrial field gas data acquisition; collect historical industrial field gas data; Step S2: Industrial field gas data preprocessing; data cleaning, data encoding, and data normalization are performed. Step S3: Construct a gas safety monitoring and early warning model; extract continuous subsequences by dividing the time window, combine time prior modeling and sequence association learning, fuse differences and sudden anomaly indicators to obtain time anomaly scores, obtain spatial anomaly scores through dynamic adjacency matrix and spatial anomaly association learning, and output prediction results through spatiotemporal feature splicing, bidirectional GRU and attention mechanism. Step S4: Optimize the parameters of the gas safety monitoring and early warning model; obtain sparse gradients through gradient sparsification, update the Fisher information matrix estimation by combining the bias correction coefficient, introduce the stability constant to obtain the natural gradient and perform pruning, update the momentum term by combining the bias correction coefficient, design the adaptive regularization term and perform pruning, update the parameters based on the cosine annealing learning rate, and obtain the optimal learnable parameters. Step S5: Real-time safety monitoring and early warning; Construct a gas safety monitoring and early warning model based on the optimal learnable parameters, obtain the early warning level based on the output prediction results, and push the early warning level to the monitoring platform in real time.
2. The method for industrial site gas safety monitoring and early warning based on artificial intelligence according to claim 1, characterized in that: In step S3, the construction of the gas safety monitoring and early warning model is based on preprocessed historical industrial field gas data, and a deep neural network is used to complete the construction of the gas safety monitoring and early warning model; specifically, it includes the following steps: Step S31: Time window division; Based on the preprocessed historical industrial field gas data, construct a gas concentration time series data matrix. Use a fixed-size sliding time window to divide the gas concentration time series data matrix. Set the window length to L. Through the sliding window operation, extract continuous subsequences of length L from the gas concentration time series data matrix to obtain H local time windows. Step S32: Temporal feature extraction; Step S33: Spatial feature extraction; Step S34: Spatiotemporal feature concatenation; using temporal anomaly scores and spatial anomaly scores, the temporal high-dimensional features and spatial features of each local time window are weighted respectively, and the concatenation results in a spatiotemporal comprehensive feature; Step S35: Prediction; Concatenate the spatiotemporal integrated features of all local time windows in the order of time steps to construct a global spatiotemporal feature matrix. Use a bidirectional GRU to capture the long-term temporal dependencies of the global spatiotemporal feature matrix to obtain the hidden state of each time step. Introduce an attention mechanism to assign weights to the hidden state of each time step to obtain weighted features. Input the weighted features into a fully connected layer to output the probability distribution of the warning level. Select the warning level with the highest probability as the output prediction result.
3. The method for industrial site gas safety monitoring and early warning based on artificial intelligence according to claim 2, characterized in that: In step S32, the time feature extraction specifically includes the following steps: Step S321: Time prior modeling; For each sensor, calculate the rate of change of gas concentration in adjacent time steps, and construct the time prior correlation matrix for each sensor in each local time window; Step S322: Sequence association learning; For each sensor, the gas concentration sequence within its local time window is mapped to a high-dimensional feature, a high-concentration attention mask is generated, the dependency between time steps is learned through the attention mechanism, and the sequence association matrix of each sensor in each local time window is constructed. Step S323: Temporal anomaly correlation fusion; For each sensor, calculate the difference between its temporal prior correlation matrix and sequence correlation matrix in each local time window, as well as the sudden anomaly indication in the gas concentration value sequence, and fuse the difference and sudden anomaly indication to obtain the temporal anomaly score.
4. The method for industrial site gas safety monitoring and early warning based on artificial intelligence according to claim 2, characterized in that: In step S33, the spatial feature extraction specifically includes the following steps: Step S331: Dynamic adjacency matrix generation; Treat each sensor in the industrial field as a graph node. For each local time window, comprehensively consider the physical distance and the correlation of gas concentration value sequences to calculate the spatial similarity between sensors, construct a spatial similarity matrix, obtain the spatial association strength between sensors through weight transformation and threshold screening, and construct a dynamic adjacency matrix. Step S332: Spatial anomaly association learning; learn the spatial association features of each sensor by aggregating neighbor features through a two-layer graph convolutional network, output the spatial feature matrix, calculate the deviation between the spatial features of each sensor and the average spatial features, and obtain the spatial anomaly score.
5. The method for industrial site gas safety monitoring and early warning based on artificial intelligence according to claim 1, characterized in that: In step S4, the optimization of the gas safety monitoring and early warning model parameters involves optimizing the learnable parameters in the gas safety monitoring and early warning model; specifically, it includes the following steps: Step S41: Gradient sparsity processing; Step S42: Fisher information matrix estimation update; bias correction improves estimation accuracy; calculate the bias correction coefficients of momentum term and Fisher information matrix estimation based on exponential decay rate, and update Fisher information matrix estimation by exponential moving average based on the squared term of sparse gradient; Step S43: Natural gradient clipping; Based on the root mean square dynamic adjustment of the sparse gradient, the sparse gradient is converted into a natural gradient by Fisher information matrix estimation, and the natural gradient is clipped. Step S44: Momentum term update; based on the clipped natural gradient and bias correction coefficient, update the momentum term using an exponential moving average; Step S45: Adaptive adjustment of regularization terms; design adaptive regularization terms based on Fisher information matrix estimation, and prune the adaptive regularization terms; Step S46: Parameter Update; A maximum number of iterations F is preset. A cosine annealing learning rate is used to integrate the momentum term and the adaptive regularization term to update the learnable parameters in the gas safety monitoring and early warning model. The update continues when the number of iterations reaches F, or when the change in the loss function value is less than 10 for five consecutive iterations. -5 When the iteration ends, the optimal learnable parameters are obtained.
6. The method for industrial site gas safety monitoring and early warning based on artificial intelligence according to claim 5, characterized in that: In step S41, the gradient sparsification process is based on the learnable parameters in the current gas safety monitoring and early warning model. The original gradient of the loss function is calculated, and important gradient components are retained by filtering by gradient size. A gradient filtering mask with the same dimension as the original gradient is generated. The sparse gradient is obtained by element-wise multiplication of the gradient filtering mask and the original gradient.
7. The method for industrial site gas safety monitoring and early warning based on artificial intelligence according to claim 1, characterized in that: In step S1, the industrial site gas data acquisition involves deploying sensors corresponding to the gas type at the industrial site to collect historical industrial site gas data. The historical industrial site gas data includes time-series data of gas concentration and warning level, with the warning level used as a data tag.
8. The method for industrial site gas safety monitoring and early warning based on artificial intelligence according to claim 1, characterized in that: In step S5, the real-time safety monitoring and early warning is achieved by collecting real-time gas concentration time-series data through sensors deployed at the industrial site, preprocessing the real-time gas concentration time-series data, and inputting it into a gas safety monitoring and early warning model constructed based on optimal learnable parameters for processing. The early warning level is obtained based on the output prediction results, and the early warning level is pushed to the monitoring platform in real time, thereby realizing real-time monitoring and early warning of gas safety at the industrial site.
9. An artificial intelligence-based industrial field gas safety monitoring and early warning system, used to implement the artificial intelligence-based industrial field gas safety monitoring and early warning method as described in any one of claims 1-8, characterized in that: It includes an industrial field gas data acquisition module, an industrial field gas data preprocessing module, a gas safety monitoring and early warning model construction module, a gas safety monitoring and early warning model parameter optimization module, and a real-time safety monitoring and early warning module; The industrial field gas data acquisition module collects historical industrial field gas data and sends the data to the industrial field gas data preprocessing module. The industrial field gas data preprocessing module performs data cleaning, data encoding, and data normalization, and then sends the data to the gas safety monitoring and early warning model building module. The module for constructing a gas safety monitoring and early warning model extracts continuous subsequences by dividing the time window, combines time prior modeling and sequence association learning, integrates differences and sudden anomaly indicators to obtain a time anomaly score, obtains a spatial anomaly score through dynamic adjacency matrix and spatial anomaly association learning, outputs prediction results through spatiotemporal feature splicing, bidirectional GRU and attention mechanism, and sends the data to the gas safety monitoring and early warning model parameter optimization module. The gas safety monitoring and early warning model parameter optimization module obtains sparse gradients through gradient sparsification, updates the Fisher information matrix estimate by combining the deviation correction coefficient, introduces a stability constant to obtain natural gradients and performs pruning, updates the momentum term by combining the deviation correction coefficient, designs an adaptive regularization term and performs pruning, updates the parameters based on the cosine annealing learning rate, obtains the optimal learnable parameters, and sends the data to the real-time safety monitoring and early warning module. The real-time safety monitoring and early warning module constructs a gas safety monitoring and early warning model based on the optimal learnable parameters, obtains the early warning level based on the output prediction results, and pushes the early warning level to the monitoring platform in real time.
Citation Information
Cited By
Double-path parallel motion data optimization method fusing space-time prior and attention
CN121148022A
A dual-path parallel motion data optimization method fusing spatio-temporal prior and attention
CN121148022B