Deep learning based pipeline early micro-leakage anomaly detection method
By constructing a deep learning-based early micro-leakage anomaly detection model for pipelines, the problem of difficult identification of pipeline micro-leakage under complex operating conditions is solved, achieving highly sensitive micro-leakage detection with low false alarms, and improving robustness and generalization ability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JINAN THERMAL CO LTD
- Filing Date
- 2026-05-12
- Publication Date
- 2026-07-07
AI Technical Summary
Existing technologies are unable to effectively identify early micro-leakage in pipelines under complex operating conditions, resulting in high false alarm rates, high false alarm rates, and poor generalization ability. Furthermore, multi-source sensor data are often asynchronous, have different sampling rates, different noise patterns, and different physical dimensions, and micro-leakage signals are often masked by multi-source disturbances.
A deep learning-based early micro-leakage anomaly detection model for pipelines is constructed, including a perturbation coupling analysis and embedding module, a perturbation conditional propagation module, a residual projection modulation module, and a model fusion and anomaly detection module. Through perturbation coupling analysis, conditional propagation modeling, and residual modulation of multi-source monitoring data, the micro-leakage anomaly detection value is output.
It achieves highly sensitive and low false alarm detection of early micro-leakage in pipelines, improves robustness and generalization ability under complex operating conditions, and provides stable and reliable early micro-leakage monitoring and early warning.
Smart Images

Figure CN122170368B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of data anomaly detection, specifically relating to a deep learning-based method for detecting early micro-leakage anomalies in pipelines. Background Technology
[0002] Pipelines play a crucial role in the continuous supply of oil and gas, chemical media, and urban water and heating systems. Early micro-leaks are characterized by small leakage volume, weak signal, strong coupling, and slow propagation. If they are not identified in time, they can easily evolve into significant leaks and safety accidents under the combined effects of pressure fluctuations, media volatilization, corrosion expansion, and environmental disturbances, resulting in production stoppages, pollution, and economic losses.
[0003] Existing micro-leakage detection methods mostly rely on single and few features, which usually implicitly assume stable operating conditions, low noise, and simple propagation paths. This makes it difficult to distinguish between real micro-leakage and reversible disturbances under complex operating conditions. In addition, multi-source sensor data are asynchronous, have different sampling rates, different noise patterns, and different physical dimensions. Early signals of micro-leakage are often masked by multi-source disturbances, resulting in high false alarm rates, high false negative rates, and poor generalization ability.
[0004] Therefore, there is an urgent need for a detection method that can integrate multi-source time-series monitoring information, characterize the asymmetric coupling and conditional propagation relationship of micro-leakage disturbances among multiple variables, and output interpretable anomaly indicators and leakage risk scores, so as to meet the real-time, robust and deployable detection requirements of micro-leakage in the early stage of pipeline operation. Summary of the Invention
[0005] This invention provides a deep learning-based method for detecting early micro-leakage anomalies in pipelines. Addressing the challenges of weak micro-leakage signals, strong disturbances, complex coupling, propagation delays, and multi-source heterogeneity, an early micro-leakage anomaly detection model for pipelines is constructed, consisting of a disturbance coupling analysis and embedding module, a disturbance condition propagation module, a residual projection modulation module, and a model fusion and anomaly detection module.
[0006] The technical solution adopted by the present invention to achieve the above objectives specifically includes the following steps:
[0007] S1. Collect multi-source operation monitoring data of pipelines and construct the original dataset;
[0008] S2. Based on the original dataset, the perturbation evolution intensity of the features is calculated by constructing an intensity response mechanism. Based on the perturbation evolution intensity, a perturbation coupling asymmetric response matrix is designed to obtain the coupling response degree. The average coupling response degree between features is calculated as a perturbation coding component, and the components are combined to obtain the first dataset.
[0009] S3. Introduce a disturbance inertia attenuation coefficient to process the first dataset to obtain the disturbance inertia intensity, design a heterogeneous nonlinear propagation weight mechanism to calculate the disturbance propagation weight, model the disturbance propagation state of the features through a conditional state propagation mechanism, and integrate to obtain the second dataset.
[0010] S4. Calculate the residual change based on the second dataset, introduce the state difference suppression width parameter to calculate the feature cointegration difference measure, construct a multi-level cointegration graph tensor using the normalization factor, calculate the cointegration residual response value, and obtain the third dataset based on the nonlinear suppression function. The third dataset is divided into a training set and a test set.
[0011] S5. Use the feature suppression function to perform preliminary modulation on the features of each scale in the training set, calculate the weighted fusion result of the features, construct the early micro-leakage anomaly detection model of the pipeline, and design a loss function to train and optimize the model.
[0012] S6. The test set is input into the trained pipeline early micro-leakage anomaly detection model, and the micro-leakage anomaly detection value is finally output.
[0013] Preferably, in step S2, based on the original dataset, the perturbation evolution intensity of the features is calculated by constructing an intensity response mechanism, the perturbation coupling asymmetric response matrix is designed based on the perturbation evolution intensity to obtain the coupling response degree, the average coupling response degree value between features is calculated as the perturbation coding component, and the components are combined to obtain the first dataset;
[0014] For each feature, obtain the input value at the current time and the input value at a historical time, calculate the absolute value of the difference between the current value and the historical value, and then apply an exponential perturbation to the absolute value. The exponentiation is nonlinearly amplified, and the result of the exponentiation is then averaged over the perturbation time window to obtain the perturbation evolution intensity of the feature at the current time. The perturbation-coupled asymmetric response matrix is constructed by calculating the weight of the consistency of perturbation direction between the current and previous times for any two different features, based on the difference in perturbation amplitude between the two times. Simultaneously, the ratio of the perturbation evolution intensity of each feature is combined to form a normalized perturbation influence weight. The weight of the consistency of direction is multiplied by the normalized perturbation influence weight, and a minimal positive number is introduced. Numerical stabilization is performed to obtain the degree of coupling response. The perturbation coded component is calculated by averaging the cumulative coupling response levels. Finally, the perturbed embedded state tensor is obtained. This serves as the first dataset.
[0015] Furthermore, addressing the issues of significant differences in response intensity, the susceptibility of weak leakage disturbances to being masked by fluctuations in operating conditions, and inconsistent propagation links of disturbances among multi-source signals during early pipeline micro-leakage monitoring, this invention proposes a disturbance coupling analysis and embedding module. First, by constructing the disturbance evolution intensity, the differences between the current moment and multiple historical moments are calculated and normalized with weighted averages to quantify the fluctuation degree of each feature within the recent time window. Second, a disturbance coupling asymmetric response matrix is constructed to characterize the directional consistency weight and normalized disturbance influence weight of each feature under micro-leakage disturbance conditions, yielding the coupling response degree. Next, the average disturbance response value between each feature and the remaining features is calculated to obtain the disturbance coding component. Finally, the disturbance coding components of all features are combined into a disturbance embedding state tensor as the first dataset. This module transforms the implicit response differences and asymmetric coupling relationships in multi-source monitoring data into an explicit, structured, and computable tensor representation, providing a discriminative feature foundation for subsequent modules.
[0016] Preferably, in step S3, a perturbation inertia attenuation coefficient is introduced to process the first dataset to obtain the perturbation inertia intensity, a heterogeneous nonlinear propagation weight mechanism is designed to calculate the perturbation propagation weight, the perturbation propagation state of the features is modeled through a conditional state propagation mechanism, and the second dataset is obtained by integration.
[0017] The perturbation inertial strength is characterized by the intensity of the perturbation at the previous moment. Based on this, a weighted fusion is performed using the absolute value of the difference between the current perturbation coded component and the perturbation coded component from the previous time, and the perturbation inertia attenuation coefficient is introduced. The weights of historical inertial strength are adjusted, and the weight of the absolute value of the difference is the complement of the disturbance inertial attenuation coefficient, to calculate the disturbance inertial strength. The proposed heterogeneous nonlinear propagation weighting mechanism is based on the ratio of the difference between the perturbation coding components of any two different features at the current time to the perturbation inertia strength, taking the absolute value and then applying a preset propagation sensitivity factor. Negative scaling is performed, and the exponential form is calculated. The resulting exponential result is then normalized to obtain the perturbation propagation weight. The conditional state propagation mechanism is constructed based on the product of the perturbation encoded component and the perturbation inertia strength of the feature at the current time. Nonlinear smoothing is performed using a nonlinear activation function, and a weighted sum is obtained using the perturbation propagation weights among the features as coefficients. Finally, the propagation matrix is obtained through integration. This serves as the second dataset.
[0018] Furthermore, addressing the issues of propagation delay, continuous accumulation, and asymmetric interaction across signals in the impact of multi-source disturbances on anomaly characterization during early-stage pipeline micro-leakage, this invention proposes a disturbance conditional propagation module. First, by constructing disturbance inertia strength, the sustained influence of each disturbance factor in the time dimension is quantified by weighting the previous inertia strength with the change amplitude of the current disturbance coded component. Second, a heterogeneous nonlinear propagation weighting mechanism driven by disturbance inertia modulation and feature differences is proposed to dynamically construct conditional propagation paths between features. Then, based on the constructed disturbance propagation weights, the disturbance propagation state of each feature is modeled through a conditional state propagation mechanism. Finally, the disturbance propagation states of all features are integrated into a propagation matrix as a second dataset, explicitly expressing the temporal inertial continuation of the disturbance and its nonlinear diffusion path between features, providing a spatiotemporally dependent representation of the disturbance state for subsequent modules.
[0019] Preferably, in step S4, the residual change is calculated based on the second dataset, the state difference suppression width parameter is introduced to calculate the feature cointegration difference measure, a multi-level cointegration graph tensor is constructed using a normalization factor, the cointegration residual response value is calculated, and a third dataset is obtained based on a nonlinear suppression function. The third dataset is divided into a training set and a test set.
[0020] The residual change is obtained by subtracting the disturbance propagation state at the current time from that at the previous time. Calculate the difference between the residual changes of any two features, take the absolute value of the difference and perform a power operation, calculate the absolute value of the difference between the perturbation propagation states of the two features in the current time series, and introduce the state difference suppression width parameter. Perform a negative exponentiation operation on the denominator to finally obtain the characteristic cointegration difference measure. Introducing cointegration suppression width The negative exponent of the ratio of the cointegration suppression width to the feature cointegration difference metric is calculated, and then normalized using the normalization factor to obtain the multi-level cointegration graph tensor. Based on the multi-level cointegration graph tensor, multiplied by the square of the perturbation propagation state difference, and with all other features weighted summed, the cointegration residual response value is obtained. Construct the nonlinear suppression function based on the cointegrated residual response value and the nonlinear suppression factor. The product plus one is used as the denominator to perform standardized ratio calculation, yielding the suppressed residual value. Based on the perturbation propagation state of the features in the current time series, subtract the corresponding suppression residual value and modulation weight at each scale. The weighted cumulative sum is used to obtain the steady-state output value. Ultimately, they are integrated into robust feature vectors. The third dataset is divided into a training set and a test set in a 7:3 ratio.
[0021] Furthermore, addressing the issues of unbalanced coupling, local mismatch, and redundant superposition of multi-source feature states after conditional propagation of early-stage micro-leakage disturbances in pipelines, this invention proposes a residual projection modulation module. First, by calculating the residual changes of each feature, the dynamic adjustment trend at adjacent time series is characterized. Second, a feature cointegration difference metric is constructed, fusing the differences in residual changes and state levels between features to identify feature combinations exhibiting consistent response trends and stable correlations under micro-leakage conditions. Next, a multi-level cointegration graph tensor is constructed based on the cointegration suppression width to characterize the cointegration stability relationship between features at different scales. The system then calculates the cointegration residual response values of each feature at multiple scales to quantify the degree of deviation under different cointegration structures. Further, it dynamically modulates the cointegration residual response values using a nonlinear suppression function to suppress abnormal extreme value interference. Finally, it combines multi-scale modulation weights to weighted accumulate the suppressed residual values, obtaining the steady-state output values of each feature, and integrates them into a robust feature vector as a third dataset. This enables the module to strengthen the stable feature combination related to leakage through multi-scale cointegration analysis, suppress non-cointegration offsets and redundant superposition, thereby improving the robustness and structural consistency of the model under complex conditions.
[0022] Preferably, in step S5, the features of each scale in the training set are initially modulated using a feature suppression function, the weighted fusion result of the features is calculated, an early micro-leakage anomaly detection model for pipelines is constructed, and a loss function is designed to train and optimize the model.
[0023] Construct the feature suppression function based on the steady-state output value and the modulation coefficient. Multiply the components and input the product into a nonlinear activation function to obtain the nonlinear modulation result. The nonlinear modulation result is then combined with the corresponding fusion weights. Multiplying and summing yields a preliminary linear fusion term. The square of the difference between any two nonlinear modulation results with different characteristics is calculated and compared with the cooperative difference coefficient. Multiplying the terms and accumulating them yields the difference fusion term. Adding the initial linear fusion term to the difference fusion term yields the weighted fusion result. The weighted fusion result is used as the numerator, and the absolute value of the weighted fusion result is compared with the suppression coefficient. The product plus one is used as the denominator, with the scaling factor. As the numerator coefficient, an early micro-leakage anomaly detection model for the pipeline is constructed to obtain the anomaly indication quantity. Introducing anomaly detection threshold The anomaly indicator is thresholded to obtain an anomaly determination result. The probability value mapped from the anomaly indicator is then compared with the actual anomaly label. The deviation between them is taken as the basic loss term, and is added to the sum of the squares of the fusion weights and the collaborative difference coefficients, and then multiplied by the corresponding regularization coefficient. and As a regularization term, the basic loss term is added to the regularization term to form the loss function. The model is trained and optimized to obtain a well-trained pipeline early micro-leakage anomaly detection model.
[0024] Furthermore, to achieve accurate and stable identification of early-stage micro-leakage anomalies in pipelines, this invention proposes a model fusion and anomaly detection module. First, the steady-state output values of each feature are nonlinearly modulated using a feature suppression function to suppress interference from extreme outliers. Second, a weighted fusion expression is constructed, fusing the linear weighted sum of the modulation results of each feature with the squared weighted sum of the differences between features, integrating the linear and nonlinear information of multi-scale features. Next, an early-stage micro-leakage anomaly detection model is constructed to obtain anomaly detection values. Finally, a loss function is constructed for model training, enabling the module to effectively integrate and nonlinearly map features modulated by multi-source disturbances, thereby suppressing overfitting while improving the sensitivity, low false alarm rate, and generalization ability of early-stage micro-leakage detection.
[0025] Preferably, in step S6, the test set is input into the trained pipeline early micro-leakage anomaly detection model, and the micro-leakage anomaly detection value is finally output.
[0026] In summary, this invention proposes a deep learning-based method for early micro-leakage anomaly detection in pipelines. The method comprises a perturbation coupling analysis and embedding module, a perturbation conditional propagation module, a residual projection modulation module, and a model fusion and anomaly detection module. First, the perturbation coupling analysis and embedding module transforms multi-source monitoring time-series data into a perturbation embedded state tensor, completing the encoding construction from the original signal to the asymmetric coupling response features of the micro-leakage. Next, the perturbation conditional propagation module performs inertial guidance and nonlinear propagation modeling on the encoded features, realizing the continuous accumulation effect of weak perturbations in the micro-leakage over time and the characterization of the conditional diffusion path among multi-source features. Then… By employing a residual projection modulation module to perform multi-scale cointegration analysis and steady-state modulation of the propagation state, a robust feature representation with structural consistency, resistance to operating condition deviations, and resistance to noise interference is established. Finally, through a model fusion and anomaly detection module, the weighted fusion of multi-scale robust features and nonlinear anomaly mapping are achieved, outputting micro-leakage anomaly detection values. This enables highly sensitive and low-false-alarm detection of early-stage micro-leakage in pipelines. Through the cascaded processing of the above modules, this invention effectively overcomes the limitations of traditional threshold discrimination and single-source feature methods, which are prone to misjudgment and missed detection under complex operating conditions. It provides a stable and reliable solution for early-stage micro-leakage monitoring and anomaly warning in pipeline operation. Attached Figure Description
[0027] Figure 1 This diagram illustrates the steps of a deep learning-based method for detecting early micro-leakage anomalies in pipelines.
[0028] Figure 2 This is a structural diagram of a pipeline early micro-leakage anomaly detection model.
[0029] Figure 3 This is a diagram of the perturbation coupling analysis and embedded module structure.
[0030] Figure 4 This is a structural diagram of the disturbance condition propagation module.
[0031] Figure 5 This is a structural diagram of the residual projection modulation module.
[0032] Figure 6 This is a diagram of the model training process.
[0033] Figure 7 The fitting effect diagram shows the model's implementation of early-stage micro-leakage anomaly detection in pipelines. Detailed Implementation
[0034] 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. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0035] Please see Figures 1-7 This invention provides a technical solution: a deep learning-based method for detecting early-stage micro-leakage anomalies in pipelines, comprising a perturbation coupling analysis and embedding module, a perturbation conditional propagation module, a residual projection modulation module, and a model fusion and anomaly detection module. First, the perturbation coupling analysis and embedding module encodes multi-source monitoring time-series data into a perturbation embedded state tensor. Next, the perturbation conditional propagation module performs inertial guidance and conditional propagation modeling on the encoded features. Then, the residual projection modulation module performs multi-scale cointegration analysis and steady-state modulation on the propagation state. Finally, the model fusion and anomaly detection module integrates multi-scale robust information to output a micro-leakage anomaly indicator, determining whether there is an early-stage micro-leakage in the pipeline. Specific steps are as follows: Figure 1 As shown.
[0036] The structure diagram of the early micro-leakage anomaly detection model for pipelines is as follows: Figure 2 As shown.
[0037] S1. Collect multi-source operation monitoring data of pipelines and construct the original dataset.
[0038] Furthermore, the dataset of this invention contains 3000 sets of pipeline operation monitoring data under typical working conditions, including segmented pressure, inlet and outlet flow rates, medium temperature, valve opening, pump speed, pipe wall vibration intensity, acoustic leakage energy, and ambient temperature and humidity. Segmented pressure is monitored in segments using diaphragm-type intelligent pressure transmitters deployed at key nodes and sections before and after bends in the pipeline, continuously collected at a frequency of twice per second, with a measurement range of 0–6 MPa and a comprehensive accuracy of ±0.1%FS. Pressure fluctuation amplitude and gradient change rate are calculated based on a 20-second sliding window. Inlet and outlet flow rates are monitored using ultrasonic time-of-flight flow meters installed at the pipeline inlet and outlet straight pipe sections, synchronously collecting instantaneous volumetric flow rates at a frequency of once per second, with a measurement range of 0–500 m³ / h and an accuracy of ±0.5%. Flow difference and mass conservation deviation coefficient are calculated. Medium temperature is monitored continuously at a frequency of once per second using armored PT100 thermal resistance sensors deployed in the middle and outlet of the conveying pipeline, with a measurement range of... The accuracy is ±0.2℃, and the temperature change rate is calculated based on a 10-second window to identify abnormal thermal disturbances; the valve opening is obtained through the angle encoder built into the electric actuator, acquiring the opening feedback signal at a frequency of 5 times per second, with a measurement range of 0–100% and a resolution of 0.1%, and calculating the opening adjustment frequency and opening stability index; the pump speed is monitored by a high-precision photoelectric encoder directly connected to the drive motor, acquiring pulse signals at a frequency of 10 times per second, with a measurement range of 0–3000 rpm and a resolution of ±1 rpm, and calculating the speed fluctuation rate and speed deviation in real time; the pipe wall vibration intensity is achieved by using a triaxial piezoelectric accelerometer fixed to the pipe. At the pipe support structure, vibration acceleration signals are collected at a frequency of 1000 times per second, with a frequency response range of 10–2000Hz and a sensitivity of ±2%. The root mean square value of vibration is calculated through frequency domain energy integration. Acoustic leakage energy is monitored by high-sensitivity acoustic emission sensors deployed on the pipe surface, collecting acoustic emission signals at a frequency of 2000 times per second, with a frequency range of 20–100kHz and a detection sensitivity of ≤35dB. The cumulative acoustic energy and energy mutation coefficient per unit time are calculated. Ambient temperature and humidity are monitored by industrial-grade digital temperature and humidity sensors deployed at multiple points in the pump station and pipe gallery area, collecting data synchronously at a frequency of once per minute. The temperature measurement range is [not specified in the original text]. The accuracy is ±0.3℃, the humidity measurement range is 0–100%RH, and the accuracy is ±2%RH, which ultimately forms the original dataset.
[0039] S2. Based on the original dataset, the perturbation evolution intensity of the features is calculated by constructing an intensity response mechanism. Based on the perturbation evolution intensity, a perturbation coupling asymmetric response matrix is designed to obtain the coupling response degree. The average coupling response degree between features is calculated as a perturbation coding component, and the components are combined to obtain the first dataset.
[0040] Furthermore, in step S2, addressing the issues of significant differences in response intensity of multidimensional monitoring data under dynamic operating conditions during early pipeline micro-leakage monitoring, the ease with which weak leakage disturbances are masked by operating condition fluctuations, and inconsistent disturbance propagation paths, a disturbance coupling analysis and embedding module is constructed. After acquiring multidimensional input data, it identifies the evolutionary differences of different features under micro-leakage disturbances. The structural process is as follows: Figure 3 As shown, the multidimensional input data refers to pipeline operation monitoring data from different sources, including segmented pressure, inlet and outlet flow rates, medium temperature, valve opening degree, pump speed, pipe wall vibration intensity, acoustic leakage energy, and ambient temperature and humidity. Each feature is measured at a specific time step. The input is represented as ,in Indicates the feature number, This represents the total feature dimension, which is 8 in this embodiment.
[0041] Furthermore, firstly, considering the early-stage micro-leakage scenario in pipelines, the changes in pressure, flow rate, and acoustic vibration signals caused by micro-leakage typically exhibit weak amplitude, non-stationarity, and are subject to the superposition of disturbances from valve switching, pump start-up and shutdown, which easily leads to unstable abnormal characterization. Therefore, an intensity response mechanism is proposed. For each feature, the input value at the current moment and the input value at a historical moment are obtained, the absolute value of the difference between the current value and the historical value is calculated, and the absolute value is exponentially calculated using the disturbance amplitude. The exponentiation is nonlinearly amplified, and the result of the exponentiation is then averaged over the perturbation time window to obtain the perturbation evolution intensity of the feature at the current time. The mathematical model is:
[0042] ;
[0043] In the formula, For the first Each feature at time The intensity of the perturbation evolution, For the first One feature in Historical values at any given moment This represents the length of the perturbation time window, corresponding to the sensitive nearest neighbor perturbation range in the early stages of micro-leakage. It is a disturbance amplitude index used to enhance the distinction between weak leakage disturbances and operating condition fluctuations.
[0044] Furthermore, in this example A value of 4 is set to the disturbance amplitude index to avoid misjudgments caused by extremely small disturbances, given that early-stage pipeline micro-leakage monitoring data contains random noise, fluctuations in valve and pump operating conditions, and sensor jitter. The value is 1.5, which emphasizes the dominant role of medium- to high-amplitude disturbances, making it easier to identify variables with abnormal fluctuations in the recent time period and highlight the cumulative shift trend of micro-leakage and weak disturbances. Through the above design, a stable prior indicator can be provided for the unified coding construction of multi-source features, and a key reference basis can be provided for the subsequent process.
[0045] Furthermore, pipeline micro-leakage anomalies are not triggered independently by a single monitored quantity, but rather result from the asymmetric coupling of multiple variables under disturbance conditions. Therefore, to characterize the directional consistency and dominant influence relationship among features under micro-leakage disturbances, the disturbance coupling asymmetric response matrix is constructed. Based on the difference in disturbance amplitude between the current and previous moments for any two different features, the weight of the directional consistency of the disturbances is calculated. Simultaneously, the ratio of the disturbance evolution intensity of each feature is combined to form a normalized disturbance influence weight. The directional consistency weight is multiplied by the normalized disturbance influence weight, and a minimal positive number is introduced. Numerical stabilization is performed to obtain the degree of coupling response. The mathematical model is:
[0046] ;
[0047] In the formula, For a moment Time features Features The degree of coupling response, and The first and Each characteristic moment The difference between the disturbance amplitude and the previous moment, The denominator should be a very small positive number to prevent it from being zero. For the first Each feature at time The intensity of the perturbation evolution.
[0048] Furthermore, this embodiment employs , Indicates the first The perturbation direction of the first feature is the same as that of the second feature. A consistency weight term is applied between the directions of the feature perturbations. If the directions are consistent, the result is positive; otherwise, it is negative, emphasizing the synergy of the perturbation trends. Indicates the first The intensity of the characteristic disturbance is relative to the first The normalization perturbation of each feature affects the weights, if The characteristic perturbation strength is much greater than The value approaches 1, indicating a characteristic. Features It possesses the dominant disturbance influence, and at the same time, the formula explicitly satisfies This allows us to characterize the directional propagation path and asymmetric coupling relationship of micro-leakage perturbations among multi-source features.
[0049] Furthermore, to facilitate the subsequent application of inter-feature perturbation response patterns to adaptive modeling and evaluation of micro-leakage anomalies, for each feature... The perturbation coded component is calculated by averaging the cumulative coupling response levels. The mathematical model is:
[0050] ;
[0051] In the formula, Features At any moment The perturbation coding components are further combined with the perturbation coding components of all features to finally obtain the perturbation embedding state tensor. As the first dataset, This is the transpose symbol.
[0052] S3. Introduce a disturbance inertia attenuation coefficient to process the first dataset to obtain the disturbance inertia intensity, design a heterogeneous nonlinear propagation weight mechanism to calculate the disturbance propagation weight, model the disturbance propagation state of the features through a conditional state propagation mechanism, and integrate to obtain the second dataset.
[0053] Furthermore, in step S3, to fully capture the mutual transmission relationship between early-stage micro-leakage disturbances in the pipeline and their multi-source monitoring characteristics, a disturbance condition propagation module is constructed, with the following structure and process: Figure 4 As shown, the perturbation embedding state tensor output by the perturbation coupling analysis and embedding module is... Dynamic conditional propagation modeling is performed to characterize the nonlinear diffusion trend and historical inertia effect of micro-leakage and weak disturbances in the time dimension. The specific steps are as follows:
[0054] First, considering the non-instantaneous, cumulative, and phased-continuous nature of the impact of pipeline micro-leakage, the characteristic of the disturbance inertial intensity at the previous moment is taken into account. Based on this, a weighted fusion is performed using the absolute value of the difference between the current perturbation coded component and the perturbation coded component from the previous time, and the perturbation inertia attenuation coefficient is introduced. The weights of historical inertial strength are adjusted, and the weight of the absolute value of the difference is the complement of the disturbance inertial attenuation coefficient, to calculate the disturbance inertial strength. The mathematical model is:
[0055] ;
[0056] In the formula, For the first One characteristic in time The perturbation inertial strength is used to characterize the ability of micro-leakage perturbations to have a sustained impact on features. For the first One characteristic in time The intensity of the disturbance inertia, Features At any moment The perturbation coding component, This is the disturbance inertia attenuation coefficient.
[0057] Furthermore, in this embodiment, Used to characterize the magnitude of change of disturbance factors between adjacent time steps. The proportion used to adjust the influence of historical disturbances on the current inertial strength is set to 0.7 in this embodiment. This value ensures that the disturbance inertial strength reflects the continuous trend of micro-leakage disturbances without excessively amplifying short-term operating condition pulses. When it is 1, It is a zero vector. ,in As a zero vector, this initialization method ensures that the inertial strength of the disturbance can participate in the subsequent propagation modeling from the first moment, while avoiding the introduction of artificial bias. Through the above design, the propagation capability of each disturbance is no longer determined solely by the current disturbance amplitude, but comprehensively considers the historical evolution trend, making the model more closely match the real physical characteristics of the accumulation of weak disturbances in the pipeline micro-leakage until delayed manifestation.
[0058] Furthermore, under the condition of pipeline micro-leakage, the physical properties of different monitoring features differ significantly, often exhibiting differentiated characteristics of propagation dominance and response dependence. To characterize the dynamic guiding relationship in the disturbance propagation process between features, the heterogeneous nonlinear propagation weighting mechanism is proposed. Based on the ratio of the difference between the disturbance coding components of any two different features at the current moment to the disturbance inertia strength, the absolute value is taken and then weighted by a preset propagation sensitivity factor. Negative scaling is performed, and the exponential form is calculated. The resulting exponential result is then normalized to obtain the perturbation propagation weight. The mathematical model is:
[0059] ;
[0060] In the formula, To be from the features Propagation to features The perturbation propagation weight, The propagation sensitivity factor, used to control the degree of nonlinear diffusion, is set to 4. This value provides strong nonlinear suppression of normalized differences between features, causing the propagation weights to be significantly concentrated on the feature pairs with the smallest differences, thus clearly characterizing the perturbation-dominant path. and Features and characteristics At any moment The perturbation coding component, To ensure the denominator is a very small positive number and prevent it from being zero, this embodiment uses... The perturbation propagation weights constructed in this step enable the perturbation propagation path to possess a dual control mechanism of inertial dominance and differential guidance, which not only preserves the true diffusion trend of micro-leakage perturbations but also effectively suppresses the misleading propagation of instantaneous violent perturbations to irrelevant features.
[0061] Furthermore, the conditional state propagation mechanism is constructed based on the product of the perturbation encoded component and the perturbation inertia strength of the feature at the current time. Nonlinear smoothing is performed using a nonlinear activation function, and a weighted sum is obtained using the perturbation propagation weights among the features as coefficients. The mathematical model is:
[0062] ;
[0063] In the formula, The function is used to smooth the effects of disturbances of different intensities, preserving weak leakage disturbances while suppressing disturbances under extreme operating conditions. Preserving historical inertia and effectively reflecting characteristics By considering the historical cumulative impact strength, the above design enables the modeling of the nonlinear response of the dominant perturbation feature to the target feature. Finally, the perturbation propagation states of all features are integrated into a propagation matrix. The mathematical model is This serves as the second dataset input to subsequent modules to ensure that the multi-factor transmission effects of micro-leakage perturbations in the spatial structure and temporal dimensions are fully modeled.
[0064] S4. Calculate the residual change based on the second dataset, introduce the state difference suppression width parameter to calculate the feature cointegration difference measure, construct a multi-level cointegration graph tensor using the normalization factor, calculate the cointegration residual response value, and obtain the third dataset based on the nonlinear suppression function. The third dataset is divided into a training set and a test set.
[0065] Furthermore, in step S4, because the contribution of various monitoring features to the anomaly characterization of micro-leakage varies in terms of physical mechanism and time response scale during the actual occurrence of early-stage micro-leakage in the pipeline, the feature state after disturbance propagation may still exhibit unbalanced coupling, local mismatch, and redundant superposition, which directly affects the ability of the anomaly detection model to characterize the stable leakage trend. Therefore, this example proposes a residual projection modulation module, the structure of which is as follows: Figure 5 As shown, by constructing cointegration structural relationships among features, stable feature combinations consistent with micro-leakage anomalies are identified and strengthened, while structural deviations lacking synergistic explanatory power are suppressed, thereby achieving steady-state modulation of micro-leakage-related states. The specific steps are as follows:
[0066] First, the disturbance propagation state output by the disturbance condition propagation module is input into the current module. The residual change is obtained by subtracting the disturbance propagation state at the current time from that at the previous time using the characteristic. This is used to reflect the dynamic adjustment trend of features at the current time step, and the mathematical model is as follows:
[0067] ;
[0068] In the formula, Features At time step The state of disturbance propagation, Features At time step The state of disturbance propagation.
[0069] Furthermore, to characterize the degree of structural consistency of different features at the micro-leakage anomaly formation mechanism level, the difference between the residual changes of any two features is calculated, and the absolute value of the difference is used for exponential operation to calculate the absolute value of the difference between the perturbation propagation states of the two features in the current time series. The state difference suppression width parameter is then introduced. Perform a negative exponentiation operation on the denominator to finally obtain the characteristic cointegration difference measure. The mathematical model is:
[0070] ;
[0071] In the formula, Features The residual change This is a cointegration nonlinear amplitude adjustment factor, used to enhance the distinguishing ability of different features when their changing trends are inconsistent. Features In time The state of disturbance propagation, The state difference suppression width parameter is used to constrain the influence of the level difference of characteristic states on the cointegration judgment.
[0072] Furthermore, in this embodiment The value is set to 0.5 to avoid the influence of a single feature change on the overall structure assessment. The value is set to 0.6 to ensure that the cointegration relationship is suppressed when the difference between the feature states deviates significantly. If the value is greater than 0.6, the exponential decay term will decay slowly, causing different physical conditions to be confused. If the value is less than 0.6, the decay will be very drastic. Even if the absolute state levels of the two features are only slightly different, the cointegration weight may be oversuppressed, making the model too harsh. The feature cointegration difference measure constructed in the above way can be used to identify feature combinations that have a consistent response trend to the micro-leakage anomaly. It can effectively avoid information duplication and noise amplification problems, and make the model pay more attention to the intrinsic structural relationship between stable leakage states, thereby improving the detection accuracy and robustness of early micro-leakage in pipelines under complex conditions.
[0073] Furthermore, in order to characterize features at different scales With features The cointegration stability relationship between them is introduced, and the cointegration suppression width is introduced. The negative exponent of the ratio of the cointegration suppression width to the feature cointegration difference metric is calculated, and then normalized using the normalization factor to obtain the multi-level cointegration graph tensor. The mathematical model is:
[0074] ;
[0075] In the formula, For the first The cointegration suppression width at the layer scale, where, The symbol for the scale layer number. Given the total number of scales, the mathematical model for the cointegration suppression width is as follows: In this example, The value is 4. The normalization factor is used to ensure that the row sum of each layer of the graph is 1. The mathematical model is as follows: In the formula Features With features The characteristic cointegration difference measure.
[0076] Furthermore, based on the multi-level cointegration graph tensor, multiplied by the square of the perturbation propagation state difference, and with all other features weighted summed, the cointegration residual response value is obtained. The mathematical model is:
[0077] ;
[0078] In the formula, In the first At each scale, features The cointegrated residual response value, It is used to characterize the degree of structural deviation of different monitoring features under the same micro-leakage state. By calculating the cointegrated residual response value, it can identify the feature combination that has a consistent response trend to the formation of micro-leakage anomalies under the current operating conditions. At the same time, it suppresses the non-cointegrated feature shift caused by local operating condition mismatch, sensing differences and random noise fluctuations, and provides a reliable structural basis for subsequent anomaly identification.
[0079] Furthermore, to avoid the characteristic output shift caused by abnormal extreme value interference in the perturbation modulation structure, the nonlinear suppression function is constructed based on the cointegrated residual response value and the nonlinear suppression factor. The product plus one is used as the denominator to perform standardized ratio calculation, yielding the suppressed residual value. The mathematical model is:
[0080] ;
[0081] In the formula, For the first Features at each scale The suppression residual value, This is a nonlinear suppression factor used to control the modulation intensity when the residual value is large. In this example, it is set to 0.5 to avoid unstable nonlinear mapping. This value can achieve a balance between suppressing abnormal extreme value interference and retaining meaningful structural deviation signals.
[0082] Furthermore, based on the perturbation propagation state of the features in the current time series, the suppression residual value and the modulation weight at each scale are subtracted. The weighted cumulative sum is used to obtain the steady-state output value. The mathematical model is:
[0083] ;
[0084] In the formula, For the first Each feature at time The steady-state output value, The modulation weights are set such that the sum of the modulation weights at each scale is 1. Specifically, the modulation weights at the four scales are 0.2, 0.3, 0.3, and 0.2, respectively. Finally, all steady-state output values are integrated into a robust feature vector. The mathematical model is As the third dataset, the third dataset is divided into training and test sets in a 7:3 ratio.
[0085] S5. The features of each scale in the training set are initially modulated using the feature suppression function, the weighted fusion result of the features is calculated, an early micro-leakage anomaly detection model for pipelines is constructed, and a loss function is designed to train and optimize the model.
[0086] Furthermore, in step S5, a model fusion and anomaly detection module is constructed to fuse the steady-state output values output by the residual projection modulation module and output anomaly indication and detection values for early micro-leakage in the pipeline. The specific steps are as follows:
[0087] First, the feature suppression function is constructed based on the steady-state output value and the modulation coefficient. Multiply the components and input the product into a nonlinear activation function to obtain the nonlinear modulation result. The mathematical model is:
[0088] ;
[0089] In the formula, Features In time The nonlinear modulation results This represents the hyperbolic tangent function, used to suppress eigenvalues and limit their range, preventing extreme outliers from interfering with micro-leakage detection. These are the modulation coefficients used to control the modulation intensity. Since the hyperbolic tangent function is approximately linear when its input is close to zero and tends to saturate when its absolute value is large, scaling the input by a factor of 0.88 will ensure that most eigenvalues fall within the near-linear region of the function. Therefore, in this example... The value is 0.88.
[0090] Furthermore, the nonlinear modulation result is combined with the corresponding fusion weights. Multiplying and summing yields a preliminary linear fusion term. The square of the difference between any two nonlinear modulation results with different characteristics is calculated and compared with the cooperative difference coefficient. Multiply and sum to obtain the difference fusion term. Add the preliminary linear fusion term to the difference fusion term to obtain the weighted fusion result. The mathematical model is:
[0091] ;
[0092] In the formula, The weighted fusion result is used to characterize the overall response strength of multi-source robust features to micro-leakage anomalies at the current moment. For the first The fusion weights of each feature Features With features The co-dissimilarity coefficient between features is used to emphasize the heterogeneous complementary information of different features under micro-leakage conditions. In this example, The initial value is 0.13. The initial value is 0.1. Subsequently, the gradient is calculated using the backpropagation algorithm, and the Adam optimizer is used to minimize the loss function for joint optimization. Features In time The nonlinear modulation results Features In time The nonlinear modulation result.
[0093] Furthermore, the weighted fusion result is used as the numerator, and the absolute value of the weighted fusion result is combined with the suppression coefficient. The product plus one is used as the denominator, with the scaling factor. As the numerator coefficient, an early micro-leakage anomaly detection model for the pipeline is constructed to obtain the anomaly indication quantity. The mathematical model is as follows:
[0094] ;
[0095] In the formula, For time Micro-leakage anomaly indicator quantity, This is a scaling factor for the anomaly indicator, used to unify the output magnitude under different operating conditions. In this embodiment, it is taken as the reciprocal of the mean of the weighted fusion results in the training set. The suppression coefficient is used to control the degree of output compression under large fluctuations. It is set to 0.2, which is an empirical balance point between output robustness and dynamic sensitivity.
[0096] Furthermore, an anomaly detection threshold is introduced. The abnormal indicator is threshold-based to obtain the abnormality detection result. The mathematical model is as follows:
[0097] ;
[0098] In the formula, For time The anomaly detection result is 1, indicating a micro-leakage anomaly, and 0, indicating normal operation. For the anomaly detection threshold, this embodiment adopts an adaptive setting method based on the statistical distribution of normal samples, which sets the anomaly indicator value of normal samples as the threshold. The 95th percentile value was used as the initial threshold. During the online operation of the model, a sliding time window was introduced to statistically update the abnormal indicators to adapt to the slow drift of the working conditions. An exponential smoothing method was used to dynamically correct the threshold. The mathematical model is as follows:
[0099] ;
[0100] In the formula, The statistical threshold calculated within the current window. The update coefficient is used to control the rate of change of the threshold. In this embodiment, the value is set to 0.03. This value is chosen to achieve a balance between response sensitivity and stability. Through the above threshold setting and dynamic update mechanism, it is possible to maintain sensitivity to early minor leaks and effectively suppress misjudgments caused by short-term operating condition fluctuations, thereby achieving stable and reliable identification of minor leak anomalies.
[0101] Furthermore, the model employs the PyTorch deep learning framework and utilizes a GPU for acceleration. To improve the model's accuracy in identifying early micro-leakage anomalies in the pipeline and to suppress unstable mapping problems caused by excessive parameter amplification, a supervised optimization mechanism is constructed. This mechanism maps the probability value of the anomaly indicator to the true anomaly label. The deviation between them is taken as the basic loss term, and is added to the sum of the squares of the fusion weights and the collaborative difference coefficients, and then multiplied by the corresponding regularization coefficient. and As a regularization term, the basic loss term is added to the two regularization terms to form the loss function. The model is trained and optimized; the mathematical model is as follows:
[0102] ;
[0103] In the formula, These are true anomaly labels, derived from historical anomaly records. They are used to provide supervision signals during model training, with a value of 1 indicating an abnormal state and a value of 0 indicating a normal state. This represents the total number of time steps. and The regularization coefficients for the fusion weights and the collaborative difference coefficients are 0.01, respectively. This is based on the standard weight decay strategy and is used to suppress overfitting. Through this construction method, effective fusion and mapping of multi-scale stable features can be achieved while maintaining the differentiability and controllability of the model throughout the entire process, further improving the accuracy and generalization ability of micro-leakage anomaly detection. In this example, the optimizer uses Adam for gradient descent, and the learning rate is set to 0.001. The training process is as follows: Figure 6 As shown in the figure, the number of training rounds is 800. It can be seen from the figure that as the number of training rounds increases, the model converges and stabilizes during the training process. Finally, a well-trained pipeline early micro-leakage anomaly detection model is obtained.
[0104] S6. The test set is input into the trained pipeline early micro-leakage anomaly detection model, and the micro-leakage anomaly detection value is finally output.
[0105] Furthermore, the fitting effect diagram of the pipeline early micro-leakage anomaly detection model is shown in the figure below. Figure 7 As shown in the figure, the horizontal axis represents the sample number, the vertical axis represents the anomaly indicator, the solid dotted line represents the anomaly indicator detected by the model, the dashed line represents the anomaly judgment threshold, the box represents the real anomaly reference label, and the star represents the model detecting anomalies. It can be seen from the figure that the samples detected as anomalies are basically consistent with the real anomaly reference labels. The experimental results show that the pipeline early micro-leakage anomaly detection model can detect pipeline early micro-leakage well.
Claims
1. A deep learning-based method for detecting early micro-leakage anomalies in pipelines, characterized by: Collect multi-source operation monitoring data of pipelines to construct a raw dataset. The raw dataset includes segment pressure, inlet and outlet flow rate, medium temperature, valve opening degree, pump speed, pipe wall vibration intensity, acoustic leakage energy, and ambient temperature and humidity. The raw dataset is obtained by using each parameter. Based on the original dataset, the perturbation evolution intensity of the features is calculated by constructing an intensity response mechanism. Based on the perturbation evolution intensity, a perturbation coupling asymmetric response matrix is designed to obtain the coupling response degree. The average coupling response degree between features is calculated as a perturbation coding component, and the components are combined to obtain the first dataset. The first dataset is processed by introducing a disturbance inertia attenuation coefficient to obtain the disturbance inertia intensity. A heterogeneous nonlinear propagation weighting mechanism is designed to calculate the disturbance propagation weight. The disturbance propagation state of the features is modeled through a conditional state propagation mechanism, and the two datasets are integrated to obtain the second dataset. Based on the second dataset, the residual change is calculated. A state difference suppression width parameter is introduced to calculate the feature cointegration difference measure. A multi-level cointegration graph tensor is constructed using a normalization factor. The cointegration residual response value is calculated. A third dataset is obtained based on a nonlinear suppression function, which is divided into a training set and a test set. The nonlinear suppression function is constructed based on the cointegration residual response value and the nonlinear suppression factor. The product plus one is used as the denominator to perform standardized ratio calculation, yielding the suppressed residual value. Based on the perturbation propagation state of the features in the current time series, subtract the corresponding suppression residual value and modulation weight at each scale. The weighted cumulative sum is used to obtain the steady-state output value. Ultimately, they are integrated into robust feature vectors. As the third dataset, the third dataset is divided into a training set and a test set in a 7:3 ratio; The features of the training set at various scales are initially modulated using a feature suppression function. The weighted fusion result of the features is calculated to construct an early micro-leakage anomaly detection model for pipelines. A loss function is designed to train and optimize the model. The feature suppression function is constructed based on the steady-state output value and the modulation coefficient. Multiply the components and input the product into a nonlinear activation function to obtain the nonlinear modulation result. The nonlinear modulation result is then combined with the corresponding fusion weights. Multiplying and summing yields a preliminary linear fusion term. The square of the difference between any two nonlinear modulation results with different characteristics is calculated and compared with the cooperative difference coefficient. Multiplying the terms and accumulating them yields the difference fusion term. Adding the initial linear fusion term to the difference fusion term yields the weighted fusion result. ; The test set is input into the trained pipeline early micro-leakage anomaly detection model, and the final output is the micro-leakage anomaly detection value.
2. The method for detecting early micro-leakage anomalies in pipelines based on deep learning according to claim 1, characterized in that, For each feature, obtain the input value at the current time and the input value at a historical time, calculate the absolute value of the difference between the current value and the historical value, and then apply an exponential perturbation to the absolute value. The exponentiation is nonlinearly amplified, and the result of the exponentiation is then averaged over the perturbation time window to obtain the perturbation evolution intensity of the feature at the current time. The perturbation-coupled asymmetric response matrix is constructed by calculating the weight of the consistency of perturbation direction between the current and previous times for any two different features, based on the difference in perturbation amplitude between the two times. Simultaneously, the ratio of the perturbation evolution intensity of each feature is combined to form a normalized perturbation influence weight. The weight of the consistency of direction is multiplied by the normalized perturbation influence weight, and a minimal positive number is introduced. Numerical stabilization is performed to obtain the degree of coupling response. The perturbation coded component is calculated by averaging the cumulative coupling response levels. Finally, the perturbed embedded state tensor is obtained. This serves as the first dataset.
3. The method for detecting early micro-leakage anomalies in pipelines based on deep learning according to claim 1, characterized in that, The perturbation inertial strength is characterized by the intensity of the perturbation at the previous moment. Based on this, a weighted fusion is performed using the absolute value of the difference between the current perturbation coded component and the perturbation coded component from the previous time, and the perturbation inertia attenuation coefficient is introduced. The weights of historical inertial strength are adjusted, and the weight of the absolute value of the difference is the complement of the disturbance inertial attenuation coefficient, to calculate the disturbance inertial strength. .
4. The method for detecting early micro-leakage anomalies in pipelines based on deep learning according to claim 3, characterized in that, The proposed heterogeneous nonlinear propagation weighting mechanism is based on the ratio of the difference between the perturbation coding components of any two different features at the current time to the perturbation inertia strength, taking the absolute value and then applying a preset propagation sensitivity factor. Negative scaling is performed, and the exponential form is calculated. The resulting exponential result is then normalized to obtain the perturbation propagation weight. The conditional state propagation mechanism is constructed based on the product of the perturbation encoded component and the perturbation inertia strength of the feature at the current time. Nonlinear smoothing is performed using a nonlinear activation function, and a weighted sum is obtained using the perturbation propagation weights among the features as coefficients. Finally, the propagation matrix is obtained through integration. This serves as the second dataset.
5. The method for detecting early micro-leakage anomalies in pipelines based on deep learning according to claim 1, characterized in that, The residual change is obtained by subtracting the disturbance propagation state at the current time from that at the previous time. Calculate the difference between the residual changes of any two features, take the absolute value of the difference and perform a power operation, calculate the absolute value of the difference between the perturbation propagation states of the two features in the current time series, and introduce the state difference suppression width parameter. The negative exponent is used to calculate the cointegration difference measure of the feature. Introducing cointegration suppression width The negative exponent of the ratio of the cointegration suppression width to the feature cointegration difference metric is calculated, and then normalized using the normalization factor to obtain the multi-level cointegration graph tensor. Based on the multi-level cointegration graph tensor, multiplied by the square of the perturbation propagation state difference, and with all other features weighted summed, the cointegration residual response value is obtained. .
6. The method for detecting early micro-leakage anomalies in pipelines based on deep learning according to claim 1, characterized in that, The weighted fusion result is used as the numerator, and the absolute value of the weighted fusion result is compared with the suppression coefficient. The product plus one is used as the denominator, with the scaling factor. As the numerator coefficient, an early micro-leakage anomaly detection model for the pipeline is constructed to obtain the anomaly indication quantity. Introducing anomaly detection threshold The anomaly indicator is thresholded to obtain an anomaly determination result. The probability value mapped from the anomaly indicator is then compared with the actual anomaly label. The deviation between them is taken as the basic loss term, and is added to the sum of the squares of the fusion weights and the collaborative difference coefficients, and then multiplied by the corresponding regularization coefficient. and As a regularization term, the basic loss term is added to the regularization term to form the loss function. The model is trained and optimized to obtain a well-trained early micro-leakage anomaly detection model for pipelines, and finally, the micro-leakage anomaly detection value is output.