Heat supply pipe network leakage real-time diagnosis method based on multi-modal data fusion and dynamic feature modeling

By employing multimodal data fusion and dynamic feature modeling, the problems of low accuracy and poor adaptability in diagnosing leaks in heating pipe networks have been solved. This approach enables precise positioning and real-time response in complex heating pipe networks, reduces hardware investment and maintenance costs, and ensures the safe and stable operation of the heating system.

CN121234191APending Publication Date: 2025-12-30CHINA THREE GORGES UNIV

Patent Information

Application Number
CN202511338341.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-18
Publication Date
2025-12-30

AI Technical Summary

Technical Problem

Existing heating network leakage fault diagnosis technologies have low accuracy and poor adaptability in complex scenarios. They cannot simultaneously and efficiently capture local spatiotemporal features and global hydraulic correlation features, and their robustness is insufficient, making it difficult to meet the needs of real-time response and efficient operation and maintenance.

Method used

By employing multimodal data fusion and dynamic feature modeling, a closed-loop diagnostic system is constructed through data processing, feature fusion, inference learning, and continuous optimization. This system includes multi-dimensional data acquisition and hierarchical purification, dynamic feature extraction and fusion, lightweight inference and incremental learning, and continuous optimization, enabling accurate identification and real-time monitoring of complex heating pipe networks.

Benefits of technology

It achieves accurate location and real-time response to leakage faults in complex heating pipe networks, with a diagnostic accuracy rate of 98.7%, which remains above 95% even under strong noise interference, meeting the requirements for safe and stable operation of heating systems and reducing hardware investment and operation and maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121234191A_ABST
    Figure CN121234191A_ABST
Patent Text Reader

Abstract

The invention discloses a heat supply pipe network leakage diagnosis method based on multi-modal data fusion and dynamic feature modeling, and aims to solve the problems of low diagnosis accuracy, poor real-time performance and weak adaptability of a traditional method in a complex pipe network. The method comprises the following steps: acquiring multi-modal data such as pressure, flow and the like, and carrying out wavelet denoising and Transform fusion preprocessing on the multi-modal data; secondly, local multi-scale features are extracted by adopting a double-branch CNN, and global hydraulic association is modeled in combination with an adaptive Transform; then, lightweight deployment and continuous optimization of the model are realized through dynamic pruning and incremental learning; and finally, constructing a full-process closed-loop optimization mechanism, dynamically adjusting parameters, and fusing operation and maintenance positive marks. Experiments show that the diagnosis accuracy of the method reaches 90.30%, the reasoning time is 35 ms, the accuracy of 95% or above is still kept under 30% noise interference, and the reliability and efficiency of heat supply network leakage diagnosis are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of heating network fault diagnosis technology, and in particular to a real-time diagnosis method for heating network leaks based on multimodal data fusion and dynamic feature modeling. Background Technology

[0002] District heating systems, as the core facilities of centralized urban heating, connect heat sources to dispersed users through a heat pipe network. Their safe and stable operation directly affects residents' heating security and energy efficiency. In current third- and fourth-generation district heating systems, the pipe network is mostly deployed underground. Affected by factors such as geological environment, pipe aging, and construction defects, pipe leakage has become the most frequent type of failure. Leaks not only lead to decreased heat transfer efficiency and a surge in energy consumption, but can also cause secondary problems such as ground subsidence and equipment damage. Therefore, achieving rapid and accurate diagnosis of leakage faults is a key requirement for the operation and maintenance of district heating systems.

[0003] Existing technologies for diagnosing leaks in heating pipe networks can be categorized into three types, but all of them have significant limitations: 1. Traditional physical modeling methods Based on the analysis of the hydraulic characteristics or physical signals of the pipeline network, relying on explicit mathematical models or local parameter correlations, the main methods include: Transient modeling and negative pressure wave method: For example, the real-time transient modeling and negative pressure wave comparison method proposed by Zhang et al. identifies leaks by analyzing the differences in transient flow in pipelines under different operating conditions. However, this method is highly dependent on the accuracy of the model. When the pipeline network structure is complex, the difficulty of solving the transient model increases dramatically, and diagnostic errors are easily caused by model simplification.

[0004] Resistance characteristic coefficient method: Qin Xuzhong et al. achieved fault diagnosis by analyzing the relationship between measured parameters of pipeline network and resistance characteristic coefficient. However, this method is only applicable to simple branched pipeline networks and has poor adaptability to the nonlinear characteristics of multi-node coupling in ring pipeline networks, making it difficult to process high-dimensional monitoring data.

[0005] Signal processing and sensing methods: For example, Lu et al. combined empirical mode decomposition with negative pressure waves for leak location. Although this can improve the accuracy of pressure drop identification, it requires high sensor deployment density and is easily affected by signal interference in densely populated areas of the pipeline network. The infrared imaging and soil temperature and humidity method proposed by Han Weiming is greatly affected by ambient temperature and soil permeability, and its diagnostic stability is insufficient under complex geological conditions.

[0006] The core drawback of this type of method is that it relies on specific physical assumptions, has poor adaptability to the high-dimensional, nonlinear pressure-flow data of actual pipe networks, and is difficult to capture the global hydraulic correlation of the pipe network, resulting in low diagnostic accuracy and slow response speed in complex scenarios.

[0007] 2. Traditional machine learning methods With the development of data-driven technologies, traditional machine learning methods have gained attention because they do not require precise physical models. These methods mainly include: Tree models and support vector machines: The extreme gradient boosting tree method proposed by Xue et al. identifies leaking pipes through changes in flow and pressure, but the model is highly dependent on feature engineering and requires manual screening of features such as pressure difference and flow fluctuation. Under high-dimensional data, it is easy to cause diagnostic failure due to feature omission. Cui Jianmin used support vector machines to classify faults in heating systems, but its generalization ability is limited and the recognition rate is low for small samples or new leakage patterns.

[0008] Optimized Neural Networks: Hao Jiangyong et al. optimized the hyperparameters of the BP neural network using the genetic ant colony algorithm, while Du Yongfeng et al. optimized the weights and thresholds of the BP using the chaotic bee colony algorithm. Although these improvements improved the convergence speed, the BP network structure is simple, and its feature extraction capability is limited to shallow data association. It cannot capture the deep nonlinear relationship between pressure and flow in the pipeline network, and its diagnostic performance drops sharply in scenarios with multiple leaks and large disturbances.

[0009] The core drawback of this type of method is that the model structure is simple, it relies on manual feature design, has poor adaptability to high-dimensional and dynamic data of complex pipe networks, and the computational complexity increases exponentially with the scale of the pipe network, making it difficult to meet the real-time diagnostic needs of large-scale regional heating networks.

[0010] 3. Existing deep learning methods In recent years, deep learning has been applied to pipeline fault diagnosis due to its automatic feature extraction capabilities, but related research still has significant limitations: Single deep learning model: Fan et al. used deep belief networks to locate pipeline leaks, but it can only capture local statistical features of the data and is insufficient in capturing the global hydraulic correlation of the pipeline network; Zhang Xiangyu et al. used Transformer for bearing fault diagnosis. Although it can handle long-distance dependencies, it lacks specificity in capturing local features, resulting in a high rate of missed detection for small leaks.

[0011] Simple combination models: The CNN-bidirectional LSTM model proposed by Meng Hongyu et al. and the CNN-GRU model proposed by Zhu Jin et al., although they attempt to combine local and temporal features, the feature fusion method is static end splicing, which does not consider the dynamic weight difference between local and global features under different leakage scenarios, resulting in insufficient feature complementarity.

[0012] For example, CN120430214A discloses a method for detecting anomalies in heating system pipelines based on a multimodal AI large model. Although this method expands the data dimension by deploying various types of detection devices and virtual metering technology, it still has the following shortcomings: its knowledge graph construction relies on manually labeled text preprocessing and image segmentation, which is insufficient for mining implicit associations in multimodal data; the model pre-training stage does not explicitly consider the influence of pipeline topology on feature distribution, resulting in bias in capturing long-distance dependencies in ring-shaped pipelines; and no data quality assessment mechanism is established for sensor failures, limiting diagnostic stability under complex geological conditions. Furthermore, existing research has very few deep learning diagnostic models for heating pipelines, and they all share common problems: they cannot simultaneously and efficiently capture local spatiotemporal features and global correlation features, and they have poor adaptability to high-dimensional, highly nonlinear pipeline monitoring data, making it difficult to achieve a diagnostic accuracy exceeding 85% in complex scenarios. In addition, existing technical solutions have two core limitations: Static feature fusion: Most combined models adopt a fixed pattern of "CNN extracting local features + Transformer extracting global features + end concatenation", which does not consider the impact of different leakage conditions on feature weights, resulting in limited model adaptability; Lack of robust design: Existing methods are mostly trained based on ideal simulation data and have not designed optimization mechanisms for interference such as sensor noise and operating condition fluctuations in actual pipeline networks, resulting in a significant decrease in diagnostic accuracy in industrial scenarios.

[0013] In summary, existing technologies cannot meet the requirements of complex regional heating networks for "precise location, real-time response, and strong anti-interference" of leakage faults. There is an urgent need for a diagnostic method that can dynamically integrate local and global features, adapt to high-dimensional nonlinear data, and is robust. Summary of the Invention

[0014] The technical problem to be solved by this invention is to provide a real-time diagnostic method for leaks in heating pipe networks based on multimodal data fusion and dynamic feature modeling. This method addresses the problems of low accuracy, poor adaptability, and difficult deployment of existing leak diagnosis technologies in complex scenarios, and enables accurate identification, real-time monitoring, and efficient operation and maintenance of leak faults in complex urban heating systems, thereby ensuring the safe and stable operation of the heating system.

[0015] To achieve the above technical objectives, the present invention adopts the following technical solution: A real-time leak diagnosis method for heating pipe networks based on multimodal data fusion and dynamic feature modeling constructs a closed-loop diagnostic system through four core steps: data processing, feature fusion, inference learning, and continuous optimization. The specific steps are as follows: (I) Data Acquisition and Preprocessing To address the issues of high noise interference and uneven data quality in heating network monitoring data, a multi-dimensional data acquisition and tiered data purification system is constructed: Multi-dimensional data acquisition: Based on the ring-shaped heating network topology, pressure sensors and flow sensors are deployed at key locations to simultaneously collect auxiliary parameters such as ambient temperature and pump operating frequency, forming a raw dataset containing timestamps, multi-node pressure values, flow values, and auxiliary parameters, enabling comprehensive perception of the network's operating status.

[0016] Layered data purification: An adaptive noise filtering mechanism is adopted to decompose time-series data into multiple components using wavelet basis. The dominant noise component is identified by combining the Transformer self-attention mechanism, and noise is suppressed by adaptive threshold processing. Missing data is filled with sliding window interpolation, and extreme outliers are identified by statistical criteria and replaced with the mean of neighboring monitoring points. The processed data is converted into a fixed-length time-series sequence, and the difference in physical magnitude is eliminated by standardization. The data is divided into training, validation and test sets according to the proportion. Data augmentation techniques are used to improve the model adaptability of small leakage samples, providing a high-quality data foundation for subsequent model training.

[0017] (II) Dynamic Feature Extraction and Fusion Breaking through the limitations of the traditional CNN-Transformer model's "static end-point concatenation," a dynamic coupling mechanism between local and global features is constructed: Dynamic local feature extraction: A dual-branch variable convolutional CNN network is designed, with two parallel branches to adapt to different leakage scenarios—one branch extracts small-scale local features to adapt to small leakage, and the other branch extracts medium-scale regional correlation features to adapt to medium leakage; a feature activation gate is added after each branch, and the branch weights are automatically adjusted by calculating the local mutation intensity of the input data to achieve dynamic adaptation and extraction of local features.

[0018] Dynamic global feature extraction: An adaptive depth Transformer encoder is adopted, which dynamically adjusts the encoder depth based on the abnormal distribution of pipeline nodes. When the pressure of multiple nodes fluctuates synchronously, the encoder depth is increased to enhance the capture of global correlation. When only a single node is abnormal, the depth is reduced and attention to irrelevant nodes is suppressed by local masking to avoid feature redundancy and efficiently capture long-distance hydraulic correlations between nodes in the entire pipeline network.

[0019] Cross-layer dynamic fusion: An interaction node is set in the intermediate layer between the CNN branch output and the Transformer encoder output. By quantifying the importance of features (calculating local weights based on the mutation significance of CNN output features and calculating global weights based on the association entropy of Transformer output features), and combining a learnable dynamic fusion matrix, the features are weighted and summed. Channel attention is applied to the fused features to remove redundant features and improve feature complementarity and classification efficiency.

[0020] (III) Lightweight Reasoning and Incremental Learning To address the issues of limited computing resources at the edge and inefficient updates to traditional models, a low-cost and high-efficiency inference and continuous evolution system is constructed: Lightweight inference architecture: Employing a reinforcement learning-driven adaptive pruning algorithm, it selectively retains CNN (Convolutional Neural Network) convolutional kernels based on feature contribution, and retains the optimal module for Transformer attention heads based on global correlation capture performance evaluation, reducing model parameter redundancy; it simplifies the classifier structure, reduces the number of fully connected layers, and replaces traditional convolutions with depthwise separable convolutions, combined with model weight quantization technology to reduce computational load and memory usage; it introduces a branch early exit mechanism, directly outputting results for samples without leakage after local feature extraction, significantly improving the real-time diagnosis speed at the edge and meeting the low-latency requirements of industrial scenarios.

[0021] Incremental learning mechanism: A model update scheme that does not require full retraining is designed. The model prediction confidence is monitored in real time through an anomaly detection branch. When the confidence is lower than the threshold, it is identified as a potential new leakage mode, triggering the incremental learning process. The basic network parameters of CNN and Transformer are frozen, and only the key parameters of the classifier are unfrozen. A mixed training set is formed by extracting typical samples from historical data and new samples in combination with the "memory replay" mechanism. Mini-batch gradient descent and adaptive learning rate are used to complete the model update with only a few iterations. The performance of the updated model is evaluated through the validation set to ensure that the model does not forget the old mode while adapting to the new leakage mode, thus achieving efficient and continuous evolution of the model.

[0022] (iv) Continuous optimization A closed-loop mechanism of "diagnosis-assessment-optimization-feedback" is constructed to ensure the long-term stable adaptation of the model to changes in pipeline network operation. Real-time performance evaluation: Real-time tracking of model diagnostic accuracy decay rate, missed detection risk index, and sensor data quality score. When the indicators trigger preset thresholds (such as accuracy decay rate exceeding the standard for several consecutive days, missed detection risk index being too high, or sensor data quality being poor), the optimization process is initiated. Performance reports are generated regularly based on monitoring data and maintenance records to dynamically grasp the model's operating status.

[0023] Model Adaptive Iteration: Dynamically adjust model parameters based on performance evaluation results—correct the learning rate according to the rate of change of validation set loss, increase the Transformer attention weights for high-frequency leaking pipe sections, and periodically update the noise reduction threshold based on sensor noise distribution; dynamically adjust the model structure in combination with changes in the pipe network structure, increase the number of Transformer attention heads when adding new pipe sections, and prune CNN convolution kernels for long-term stable regions to achieve dynamic adaptation of the model to the pipe network state.

[0024] Sample and rule updates: New leak samples are added to the training set regularly, and oversampling technology is used to balance the sample distribution; a knowledge base linking "leakage characteristics - pipeline conditions" is established, and the knowledge base is automatically updated and specific diagnostic rules are generated when there are significant differences between the characteristics of new samples and the knowledge base; operation and maintenance feedback data is integrated, and information such as the actual leak location and repair results entered by operation and maintenance personnel is linked with monitoring data to generate labeled and enhanced samples, optimize sensor layout suggestions, and improve the synergy between diagnosis and operation and maintenance.

[0025] The real-time diagnosis method for heating network leakage based on multimodal data fusion and dynamic feature modeling provided by this invention has the following beneficial effects: 1. This invention solves the key problems existing in the field of leakage fault diagnosis of district heating pipe networks, including the inability to simultaneously and efficiently capture local spatiotemporal features and global hydraulic correlation features, poor adaptability to high-dimensional nonlinear data, low diagnostic accuracy and insufficient robustness in complex scenarios; and realizes accurate location, real-time response and strong anti-interference diagnosis of leakage faults in complex heating pipe networks.

[0026] 2. This invention achieves a diagnostic accuracy of 98.7% in simulated data and real pipeline network tests by dynamically fusing local and global features (compared to 84.3% for the traditional CNN-LSTM model, which is a combination of Convolutional Neural Network and Long Short-Term Memory Network). The diagnostic accuracy on the test set is improved to 90.30%, especially in complex ring-shaped pipeline networks and small leak scenarios. The thermal values ​​on the main diagonal of the confusion matrix are close to 1, and those on the off-diagonal are close to 0. The false negative rate for small leaks (leakage amount <5%) is reduced to 1.2%, which is far superior to existing technologies (traditional methods <85%).

[0027] 3. The model inference time of this invention is significantly reduced to 12ms / time (traditional methods require >200ms), which meets the requirement of "second-level response" to leakage faults in heating pipe networks, and at the same time meets the real-time diagnostic needs of edge devices.

[0028] 4. Even in interference scenarios where the sensor noise intensity increases by 30%, the diagnostic accuracy of this invention remains above 95%, while the accuracy of traditional methods drops to below 70%, demonstrating strong robustness.

[0029] 5. The model of this invention can automatically capture the deep correlation of high-dimensional, nonlinear pressure-flow data of the pipeline network without relying on manual feature engineering. It has strong adaptability to multiple leakage points and dynamic hydraulic conditions, and can meet the diagnostic needs of heating pipeline networks of different scales and under different operating conditions.

[0030] 6. The lightweight model of this invention reduces the number of parameters to 1.2M (the original model was 15.6M), which can run stably on resource-constrained edge devices, reduce dependence on cloud services, and improve deployment flexibility.

[0031] 7. This invention requires only 47 sensors to monitor 77 pipe sections, significantly reducing the number of sensors deployed and investment costs; the fault locations output by the model have proximity correlation, and combined with the operation and maintenance feedback optimization mechanism, it is easy for operation and maintenance personnel to quickly locate the leak point and improve maintenance efficiency.

[0032] 8. This invention significantly reduces the hardware investment and operation and maintenance costs of heating network leakage monitoring by reducing the number of sensors installed and the lightweight design of model deployment. Combined with accurate diagnostic results, it reduces the frequency of unnecessary maintenance and further optimizes operating expenses.

[0033] 9. Through dynamic feature fusion mechanism and incremental learning design, the model can quickly adapt to the topological differences of heating pipe networks in different cities (such as branched / ringed pipe networks) and new leakage modes without retraining all parameters. The diagnostic accuracy is stable at over 88% in cross-regional deployment scenarios.

[0034] 10. This invention combines an early branch exit mechanism with a lightweight classifier design, which improves the average inference speed of the model for normal working condition samples by 30%, and significantly reduces the computational load and energy consumption of edge devices while ensuring high accuracy.

[0035] 11. The closed-loop optimization system of the present invention enables the model to automatically correct diagnostic deviations caused by pipeline aging or changes in operating conditions during long-term operation through real-time performance evaluation, adaptive parameter adjustment and dynamic updating of the sample library, and maintains an accuracy level of over 90%.

[0036] 12. The incremental learning and closed-loop optimization mechanism of this invention ensures that the model can continuously evolve with changes in the operating status of the pipeline network and the emergence of new leakage modes, avoids performance drift, achieves stable diagnosis throughout the entire life cycle of the heating pipeline network, and provides long-term technical support for the safe operation of the heating system. Attached Figure Description

[0037] The present invention will be further described below with reference to the accompanying drawings: Figure 1 This is a schematic diagram of the technical process of the present invention; Figure 2 This is a flowchart of the heating network leakage fault diagnosis model of the present invention; Figure 3 This is a schematic diagram of the water supply network of the heating network system of the present invention; Figure 4 This is a schematic diagram of the return water network of the heating network system of the present invention; Figure 5 This invention is based on the confusion matrix of CNN-Transformer diagnostic results (water supply network). Figure 6 This invention is based on the confusion matrix of CNN-Transformer diagnostic results (return water network). Detailed Implementation

[0038] The technical solution of the present invention will be further described below with reference to the accompanying drawings and embodiments: Example 1 This embodiment provides a real-time leak diagnosis method for heating pipe networks based on multimodal data fusion and dynamic feature modeling. This embodiment uses a ring-shaped regional heating pipe network system in a city as the application object. This system includes one heat source, 15 heating stations, and 40 supply and return water pipe sections, with a designed total circulation flow of 2196.4 m³ / h and a circulating water pump head of 55 m. The system needs to diagnose leak faults in 77 supply and return water pipe sections. The specific implementation process is as follows: I. Data Acquisition and Preprocessing Implementation (I) Deployment of the monitoring system Based on the pipeline network topology and hydraulic characteristics, monitoring equipment is deployed at key locations: 1. Pressure sensors: A total of 22 units are deployed, installed at the heat source outlet (2 units), the inlet and outlet of 15 heating stations (30 units, actually adjusted to 22 units according to the station size) and the constant pressure node (3 units). The sampling frequency is 1Hz, and the pressure value of each node is collected in real time. The range covers 0~1.6MPa, and the accuracy is ±0.5%FS.

[0039] 2. Flow sensors: A total of 25 units are deployed and installed at the beginning / end of 40 supply and return water pipe sections (prioritizing key pipe sections with a diameter ≥ DN200). The sampling frequency is 1Hz, the measurement range is adapted to the design flow rate of the pipe section (50~500m³ / h), and the accuracy is ±1%FS.

[0040] 3. Auxiliary parameter acquisition: The ambient temperature (sampling frequency 1 time / 5min, accuracy ±0.3℃) and the operating frequency of the circulating water pump (sampling frequency 1Hz, range 0~50Hz) are synchronously acquired through the pipeline monitoring system, forming a raw data record of "timestamp + data from 47 monitoring points (22 pressure + 25 flow) + 2 auxiliary parameters". The size of a single data record is approximately 128 bytes, which is transmitted to the edge computing gateway (local storage capacity 1TB, supporting data caching for 7 days) via industrial Ethernet.

[0041] (ii) Data preprocessing execution 1. Adaptive noise filtering: The pressure and flow time series data are decomposed into 5 layers using the db4 wavelet basis. The Transformer self-attention mechanism is used to calculate the "information contribution" of each layer component (the threshold is set to 0.3). For detail components with a contribution lower than the threshold (determined to be noise-dominant), soft thresholding is applied (the threshold is dynamically adjusted according to the data standard deviation, ranging from 0.1 to 0.5 times the standard deviation). The dominant signal components are reconstructed. After processing, the signal-to-noise ratio of the pressure data is improved to over 35dB, and the signal-to-noise ratio of the flow data is improved to over 32dB.

[0042] 2. Outlier and Missing Value Handling: For missing data caused by sensor offline (e.g., communication interruption), a sliding window interpolation method of "3 forward step mean + 3 backward step mean" (window size of 6 time steps) is used, with a filling accuracy of 92%; extreme values ​​(exceeding "mean ± 3 times standard deviation") are identified by the 3σ criterion and replaced with the mean of the three neighboring monitoring points at that time (e.g., when the flow at the starting point of a pipe segment is abnormal, the mean of the flow at the starting point + the ending point of the two adjacent pipe segments is used for replacement). After outlier handling, the data fluctuation range is controlled within ±8% of the normal range.

[0043] 3. Feature Transformation and Dataset Division: Continuous monitoring data is divided into fixed-length sequences at 16 time steps (corresponding to 16 seconds), forming a "16×47" pressure feature matrix and a "16×40" flow feature matrix (flow in pipe sections without deployed sensors is supplemented by hydraulic model estimation); dimensional Z-score standardization is adopted (using the formula: (x-μ) / σ, where x is a single sample value in the original monitoring data, μ is the mean of this dimension, and σ is the standard deviation) to eliminate the magnitude difference between pressure (MPa level) and flow (m³ / h level); the dataset is divided into a training set (10580 groups), a validation set (3023 groups), and a test set (1512 groups) in a 7:2:1 ratio. Small leakage samples (leakage amount 1%~2% of rated flow) in the training set are subjected to "time-series stretching" (stretching coefficient 1.2~1.5) and "Gaussian perturbation" (perturbation intensity 0.05~0.1) to enhance sample diversity.

[0044] II. Implementation of Dynamic Feature Extraction and Fusion (a) CNN Local Feature Extraction Network Configuration A dual-branch variable convolutional CNN network is constructed and implemented using the PyTorch framework. The specific structure is as follows: 1. Branch 1 (Fine-grained local features): 2 layers of convolution (3×3 kernel, stride 1, padding=1, output channels 64) + max pooling (2×2, stride 2), with ReLU as the activation function; the input is a "16×47" pressure / flow feature matrix, and the output dimension is 64×8×24 (number of channels × time step × number of nodes), used to capture details of local pressure drops and flow surges caused by small leaks.

[0045] 2. Branch 2 (Mesoscale Local Features): 2 layers of convolution (convolution kernel 5×5, stride 1, padding=2, output channels 64) + average pooling (2×2, stride 2), the activation function is ReLU (Rectified Linear Unit); the input is the same as branch 1, the output dimension is 64×8×24, used to capture the pressure-flow coupling relationship in a slightly larger area.

[0046] 3. Feature Activation Gating: A Sigmoid activation gating is added after each branch output. The weights are automatically adjusted by calculating the "local mutation intensity" of the input data (using the formula: |current value - mean of the previous 3 steps| / mean of the previous 3 steps). When the mutation intensity is >0.15, the weight of branch 1 is set to 0.7 and that of branch 2 is set to 0.3; otherwise, the weight of branch 1 is set to 0.4 and that of branch 2 is set to 0.6, thus achieving dynamic adaptation of local features under different leakage scenarios.

[0047] (II) Transformer Global Feature Extraction Network Configuration An adaptive depth Transformer encoder is used, with the following parameters: 1. Basic structure: 4-layer encoder, each layer contains a "multi-head self-attention module" (8 heads, 64 key / value dimensions, dropout=0.1) + "feedforward neural network" (hidden layer dimension 256, activation function GELU (Gaussian Error Linear Unit)); the input is a 47-dimensional node feature sequence (dimension 512) transformed by the embedding layer (linear transformation + position encoding).

[0048] 2. Dynamic Depth Adjustment: Adjustment is triggered by monitoring the "multi-node synchronous fluctuation coefficient" (using the formula: number of nodes with pressure fluctuations exceeding the threshold during the same period / total number of nodes, with the threshold set to 0.08). When the coefficient is greater than 0.3, one encoder layer is automatically added (total depth of 5 layers) to enhance global correlation capture; when the coefficient is less than 0.1, one encoder layer is reduced (total depth of 3 layers), and a "local mask" (mask rate of 0.6) is applied to nodes without fluctuations to suppress attention to irrelevant nodes and reduce computational load (computational efficiency is improved by about 25% after depth adjustment).

[0049] (III) Dynamic Feature Fusion Execution 1. Feature Importance Quantification: Local Feature Weights The "significance of mutations" is calculated using the output features of the CNN: (1) In the formula, Represents the variance of local features; Indicates the slope of the flow rate change; This represents the total energy of local features; the larger the variance, the steeper the slope. A higher value (range 0.3~0.7) indicates a more critical local feature; global feature weights Calculated using the "association entropy" of the Transformer output features: (2) In the formula, Represents the global feature mutual information entropy; This represents the total number of node associations; the higher the mutual information entropy, the greater the number of nodes associated with each other. The higher the value (range 0.3~0.7), the stronger the global correlation.

[0050] And satisfy (3) In the formula, The weight for the cross term is fixed at 0.1.

[0051] 2. Cross-layer interactive fusion: After the output of the CNN dual-branch and after the output of the Transformer layer 2 encoder, one interactive node is set up. Feature weighted summation is achieved through a learnable dynamic fusion matrix (64×64 dimensions, initialized with Xavier uniform distribution): (4) In the formula, The weights for the cross terms are fixed at 0.1 to enhance feature coupling. This is element-wise multiplication; This is the final comprehensive leakage feature obtained by fusing local features, global correlation features, and their interaction features; These are local features extracted by a convolutional neural network (CNN). These are the global association features extracted by the Transformer model; Local feature weights; These are the global feature weights.

[0052] The fused features (dimension 128×8×24) are subjected to channel attention filtering using 1×1 convolution (output channels 64), retaining the top 30% of channels (approximately 19 channels) in attention score, eliminating redundant features, and improving the efficiency of subsequent classification.

[0053] III. Implementation of Lightweight Reasoning and Incremental Learning (a) Lightweight inference deployment 1. Dynamic Model Pruning: Adaptive pruning is implemented based on the PPO (Proximal Policy Optimization) reinforcement learning algorithm. The pruning process is executed on an NVIDIA Jetson AGX Xavier edge device (32 TOPS computing power). (1) CNN pruning: Calculate the gradient contribution of each convolutional kernel to the loss function (using the formula: contribution = mutual information entropy between the output feature of the convolutional kernel and the label), that is: (5) In the formula, Indicates the contribution of the convolution kernel; Indicates the first The prominent features of each convolutional kernel; Indicates a label; Represents mutual information entropy; By retaining convolutional kernels with a contribution greater than 5%, the number of CNN parameters was reduced from 864,000 to 518,000 after pruning (a reduction of 40%).

[0054] (2) Transformer pruning: Evaluate the “global association capture capability” of each attention head (index = sparsity of attention weight matrix, sparsity = proportion of 0 value elements), retain the top-2 best performing attention heads (the 2 with the lowest sparsity), and after pruning, the Transformer parameters are reduced from 1.286 million to 643,000 (a reduction of 50%).

[0055] (3) Pruning timing: Basic pruning is performed on the validation set before deployment; during operation, dynamic fine-tuning pruning is performed once every 30 days based on newly accumulated data (approximately 43,000 sets) to ensure that the parameter redundancy rate is always <15%.

[0056] 2. Lightweight Classifier and Accelerated Inference: The three fully connected layers at the end of the model are reduced to one layer (input dimension 64×8×24, output dimension 78 (77 segments + 1 normal class)). Depthwise separable convolutions (3×3 kernels) are used instead of traditional convolutions, reducing computation by 70%. The model weights are quantized from 32-bit floating-point (FP32) to 16-bit floating-point (FP16), reducing memory usage from 286MB to 143MB (a 50% reduction). An "early branch exit mechanism" is introduced—when the "normal probability" of a local feature in the CNN (output via Sigmoid) > 0.9, a "normal" result is directly output without entering the Transformer for computation, reducing the average inference time from 85ms to 59.5ms (a 30% improvement), meeting the real-time diagnostic requirements at the edge (requiring inference time < 100ms).

[0057] (II) Incremental Learning Execution 1. New Sample Screening and Feature Alignment: During model operation, the prediction confidence is monitored in real time through the "anomaly detection branch" (based on the isolated forest algorithm). When the prediction confidence of a sample is <0.6, it is determined to be a "potential new leakage mode" (such as intermittent leakage caused by pipe interface damage), triggering the incremental learning process. New samples are subjected to noise filtering and standardization processing consistent with the training set. The features of the new samples are mapped to the existing feature space through the "feature mapping matrix" (pre-trained, dimension 512×512) to ensure the consistency of feature distribution.

[0058] 2. Incremental Training and Model Update: Freeze the basic network parameters of CNN and Transformer (approximately 1.3 million parameters), and only unfreeze the parameters of the last layer of the classifier (approximately 19,000 parameters); randomly select 20% of typical samples (2116 groups, covering different leakage amounts and different pipe sections) from the historical training set, and combine them with new samples (started when the cumulative number reaches 50 groups or the number of new single-class patterns reaches 10 groups) to form a mixed training set; use mini-batch gradient descent (batch size 32) and adaptive learning rate (initial learning rate 1e-4, decaying by 10% every 2 rounds), and only 5-10 rounds of iteration are needed to complete the training (training time is approximately 20 minutes); use normal samples from the last 30 days (1200 groups) and known leakage samples (800 groups) to form a validation set. If the accuracy of the updated model decreases by less than 2% compared to the previous model, save the new model (overwrite the old model, occupying 143MB of space), otherwise revert to the old version, and mark the new samples as "requiring manual review" (pushed to staff via the operation and maintenance APP).

[0059] IV. Continuous Optimization and Implementation (a) Dynamic performance evaluation 1. Key Indicator Monitoring: Three core indicators are calculated in real time through the edge gateway: (1) Accuracy decay rate: The daily statistics are "number of correctly predicted samples / number of actual faulty samples". Optimization is triggered when the decay rate is >5% for 3 consecutive days (e.g., from 90.3% to below 85%). (2) Missed detection risk index: For samples that are judged as "normal" by the model but are confirmed to be leaks by subsequent maintenance, calculate the cosine similarity between their features and historical leak features (threshold 0.6). When the similarity is >0.6, the index is set to 0.8~1.0, triggering an emergency assessment; (3) Sensor data quality score: Based on signal stability (fluctuation amplitude <5% is qualified) and data integrity (missing rate <3% is qualified) score (full score 100). When the quality score is <50, a weight correction of 0.3~0.5 is applied to the sensor data.

[0060] 2. Evaluation cycle: Regular evaluation runs automatically at 2:00 AM daily (based on data from the previous 24 hours, approximately 86,000 sets), generating a performance report (in PDF format, automatically pushed to the pipeline maintenance platform) that includes indicator trend charts and detailed fault diagnosis. Emergency evaluation is initiated immediately when the missed detection risk index is >0.8 or the sensor quality score is <50, with an evaluation time of <10 minutes.

[0061] (II) Model and Sample Optimization 1. Parameter and structure iteration: Dynamically adjusted based on evaluation results: (1) Learning rate adjustment: When the validation set loss increases for two consecutive rounds, the learning rate is reduced from 1e-4 to 5e-5; when the loss decreases slowly, it is increased to 1.5e-4. (2) Attention weight redistribution: For pipe sections with ≥3 leaks in the past 3 months (such as water supply pipe section 12 and return water pipe section 8), add an offset of 0.2~0.3 to the initial attention weight of the Transformer; (3) Structural adjustment: When two new pipe segments are added to the pipeline network, the number of Transformer attention heads is automatically increased from 8 to 10; for pipe segments that have not leaked for 6 consecutive months (such as water supply pipe segment 25), the two convolution kernels of the corresponding CNN branch (the ones with the lowest contribution) are pruned.

[0062] 2. Sample and Knowledge Base Updates: New leak samples (approximately 300-500 groups) are added to the training set monthly. Small sample types (such as samples with a 1% leakage rate, which are doubled in number after oversampling) are processed using SMOTE (Synthetic Minority Over-sampling Technique). A knowledge base linking "leakage characteristics - pipeline conditions" is established (stored in a MySQL database with approximately 500 records). When the difference between the characteristics of a new sample and the knowledge base exceeds 30% (calculated using Euclidean distance), the knowledge base is automatically updated and specific diagnostic rules are generated (such as "during low-temperature periods in winter, the flow fluctuation of pipe section 15 is 15%-20% higher than in summer when leaking").

[0063] (III) Integration of Operation and Maintenance Feedback 1. Feedback Data Entry: Maintenance personnel enter the actual leak location (accurate to the pipe section number), repair results (such as "replace the sealing ring" or "repair welding"), and on-site conditions (such as "high soil moisture content" or "moderate pipe corrosion") through a mobile APP (supports Android / iOS). The APP automatically associates the corresponding monitoring data (based on timestamp matching) and generates "annotated enhanced samples" (with additional maintenance tags, approximately 100-200 sets / month) for model retraining.

[0064] 2. Sensor Layout Optimization: Based on the model diagnosis of "high uncertainty areas" (concentrated areas of pipe sections with prediction confidence < 0.7, such as the southwest area of ​​the pipe network), output sensor supplementation suggestions (such as "add one pressure sensor at the midpoint of water supply pipe section 18"). Verify the suggestions using hydraulic simulation software (such as EPANET (Environmental Protection Agency Network Evaluation Tool)). After adding the sensor, the diagnostic accuracy of the area improves by 8% to 12%. Once the suggestions are confirmed to be feasible, they are pushed to the engineering department for implementation.

[0065] V. Verification of Implementation Results The verification results on the test set (1512 groups, covering leakage rates of 1% to 4% and different pipe segment leakage scenarios) based on the above implementation steps are as follows: (1) Diagnostic accuracy: The diagnostic accuracy of water supply network was 90.8%, and the diagnostic accuracy of return water network was 89.7%, which is 12.5 and 7.2 percentage points higher than the traditional CNN model (78.3%) and the Transformer single model (82.5%), respectively; the accuracy of small leakage samples (1%~2% leakage) reached 87.3%, which is 18.6 percentage points higher than the traditional method.

[0066] (2) Real-time performance: The single-sample inference time at the edge is 59.5ms, which meets the requirement of processing 16 samples per second (the actual pipeline generates 47 monitoring point data per second, and the inference capability is redundant).

[0067] (3) Operation and maintenance efficiency: The fault location accuracy has been improved from "regional level" (about 5 pipe segments) to "pipe segment level" (accurate to 1 pipe segment). The location time after the maintenance personnel arrive at the site has been shortened from an average of 40 minutes to 15 minutes. The number of sensors deployed is reduced by 35% compared with the traditional solution, and the hardware investment cost is reduced by about RMB 280,000.

[0068] This embodiment fully verifies the feasibility and superiority of the method of the present invention in complex ring heating pipe networks. It can achieve accurate location, real-time diagnosis and efficient operation and maintenance of leakage faults, and provide technical support for the safe and stable operation of district heating systems.

[0069] Example 2 In another preferred embodiment, based on Embodiment 1 above, this embodiment provides a real-time diagnosis method for heating network leaks based on multimodal data fusion and dynamic feature modeling. This embodiment takes a ring-shaped heating network in a city as the application scenario, and combines... Figures 1 to 6This paper fully presents the implementation process of the method of the present invention, and verifies its effectiveness in accurately locating and diagnosing leakage faults in complex pipeline networks. The pipeline system includes one heat source, 15 heating stations, and 40 supply and return water pipe sections. Fault diagnosis of 77 supply and return water pipe sections needs to be achieved through 47 monitoring points. The specific implementation is as follows: I. Implementation Preparation This embodiment is referenced throughout. Figure 1 (Overall technical process) and Figure 3 The core logic progression of the (model flowchart), and the correspondence between each step and the diagram, are as follows: Step 1 (Data Acquisition and Preprocessing): Corresponding to Figure 3 The process of “real-time data collection from 47 monitoring points → adaptive noise filtering → data standardization and sequence transformation → sample segmentation and enhancement” provides high-quality data for subsequent feature extraction. Step 2 (Dynamic Feature Extraction and Fusion): Corresponding Figure 3 The process of "CNN local feature dynamic extraction + global dynamic feature extraction → cross-layer dynamic fusion module → fusion feature optimization" achieves precise coupling between local and global features. Step 3 (Lightweight Inference and Incremental Learning): Corresponding Figure 3 The process of "lightweight classifier inference → new leakage pattern recognition → incremental learning module startup / output of diagnostic results" solves the problems of real-time performance and model evolution at the edge. Step 4 (Continuous Optimization): Corresponding Figure 3 The closed loop of "real-time performance evaluation → dynamic adjustment and structural fine-tuning / periodic data archiving" ensures the long-term stable operation of the model.

[0070] At the same time, through Figure 4 (Schematic diagram of water supply network) Figure 5 (Water supply network confusion matrix) Figure 6 (Return water network confusion matrix) Verify the network topology adaptability and diagnostic accuracy. Figure 2 It assists in confirming data flow and module interaction logic.

[0071] II. Specific Implementation Steps (I) Step 1: Data Acquisition and Preprocessing (see...) Figure 3 ) 1. Real-time data collection from 47 monitoring points (matching) Figure 3 (Data collected in real time from 47 monitoring points) in accordance with Figure 4 (Diagram of water supply network) showing the network topology, with monitoring equipment deployed at key nodes: (1) Pressure sensors (22 units): installed at the heat source outlet (U1, U2), the inlet and outlet of the heating station (such as both ends of the n2-n3, n10-n11 pipe sections) and the constant pressure node (n25, n30), with a sampling frequency of 1Hz, to collect the pressure value of each node in real time; (2) Flow sensors (25 units): deployed at the beginning / end of the supply and return water pipe sections (such as n1-n2, n15-n16 pipe sections), covering the surrounding area. Figure 4 The core flow monitoring requirement for 40 pipeline sections is met, with a sampling frequency of 1Hz. (3) Auxiliary parameters: The ambient temperature and water pump operating frequency (such as the operating frequency of the heat source matching water pump U3) are collected synchronously to form an original dataset of "time stamp + data from 47 monitoring points + 2 auxiliary parameters". The dataset is transmitted to the edge gateway via industrial Ethernet. The daily data collection volume is approximately 4.032 million records (47 points × 3600 seconds × 24 hours).

[0072] 2. Adaptive noise filtering (matching) Figure 3 "Adaptive noise filtering") Regarding sensor noise in actual monitoring (such as Figure 4 Pressure data fluctuations in the N37-N1 pipe section due to soil vibration were addressed using multi-scale noise filtering. according to Figure 3 The process decomposes the pressure and flow time series data into 5 layers using the db4 wavelet basis, and uses the Transformer self-attention mechanism to calculate the "information contribution" of each component. Detail components with a contribution of less than 0.3 are judged as noise (such as high-frequency flow fluctuations in the n28-n29 pipe section). Adaptive soft thresholding was applied to the noise components, and the signal components were reconstructed. After processing, the signal-to-noise ratio of the pressure data was improved to over 35dB, ensuring... Figure 4 The validity of monitoring data for each section of the pipeline.

[0073] 3. Data standardization and sequence transformation (matching) Figure 3 Data Standardization and Sequence Transformation The cleaned data was divided into fixed-length sequences at 16 time steps (16 seconds) to form a "16×47" pressure feature matrix (corresponding to 47 monitoring points) and a "16×40" flow feature matrix (corresponding to 40 pipe segments). Z-score standardization is used to eliminate differences in magnitude (such as pressure in MPa and flow rate in m³ / h), with the formula (x-μ) / σ (where x is a single sample value in the original monitoring data, μ is the mean of the dimension, and σ is the standard deviation), ensuring that the model is accurate. Figure 4 Adaptability of data for different pipe sections.

[0074] 4. Sample splitting and augmentation (matching) Figure 3"Sample Segmentation and Augmentation") The dataset was divided into training set (10580 sets), validation set (3023 sets), and test set (1512 sets) in a 7:2:1 ratio, covering the appendix. Figure 4 Leakage scenarios where the flow rate in each pipe section is 1% to 4% of the rated flow; For small leak samples (such as 1% leakage in pipe section n5-n6), "time-series stretching" (coefficient 1.2~1.5) and "Gaussian perturbation" (intensity 0.05~0.1) are applied to improve the model's ability to identify small leaks and avoid... Figure 5 , Figure 6 A small leak was missed during detection.

[0075] (II) Step 2: Dynamic Feature Extraction and Fusion (Refer to) Figure 3 ) 1. Dynamic extraction (matching) of local features in CNN Figure 3 Dynamic extraction of local features in CNN) against Figure 4 Leakage characteristics of different pipe sections (e.g., small leakage in the short pipe section n1-n2, and moderate leakage in the long pipe section n22-n23) are analyzed to construct a two-branch CNN: (1) Branch 1 (fine-grained extraction): 3×3 convolution kernel + max pooling, extract small-scale local features (such as details of the sudden pressure drop of 0.05MPa in pipe section n3-n4), and output 64×16 feature map; (2) Branch 2 (Medium-scale extraction): 5×5 convolution kernel + average pooling, capture the correlation of slightly larger regions (such as the flow coupling of pipe segments n12-n13 and n13-n14), and output a 64×16 feature map; (3) Add "feature activation gating" after branching: when attached Figure 4 When the intensity of local abrupt change in the n8-n9 pipe segment is greater than 0.15, the weight of branch 1 is adjusted to 70%; when the abrupt change in the n30-n31 pipe segment is gradual, the weight of branch 2 is adjusted to 60%, thus achieving dynamic adaptation.

[0076] 2. Global dynamic feature extraction (matching) Figure 3 Global Dynamic Feature Extraction based on Figure 4 The global topology of the pipeline network adopts an adaptive depth Transformer: (1) The base is a 4-layer encoder. The input is a 47-dimensional node feature (corresponding to 47 monitoring points) transformed by the embedding layer. The correlation of the entire pipeline network (such as the transmission of the pressure change of heat source U1 to the n37-n1 pipe section) is captured by multi-head self-attention. (2) Dynamically adjust depth: when Figure 4When multiple nodes n2-n3, n4-n5, and n6-n7 experience synchronous fluctuations, the encoder is increased to 5 layers; when only a single node n25 is abnormal, it is reduced to 3 layers and irrelevant nodes are masked to avoid feature redundancy.

[0077] 3. Cross-layer dynamic fusion and feature optimization (matching) Figure 3 "Cross-layer dynamic fusion module → Fusion feature optimization") (1) Cross-layer fusion: Set interaction nodes at the output of the dual branches of CNN and the output of the second layer of Transformer, calculate the local weight α (e.g., the significance of the CNN feature mutation in the n10-n11 pipe segment α=0.6) and the global weight β (the correlation entropy of the entire pipe network Transformer β=0.3), and achieve weighted summation through a dynamic fusion matrix (F fusion = 0.6 × F_CNN + 0.3 × F_Transformer + 0.1 × F_CNN⊗F_Transformer); (2) Feature optimization: Compress the channels to 64 dimensions using 1×1 convolution, and retain the first 30% of channels for attention (see attached). Figure 4 (Feature channels corresponding to medium- and high-risk pipe sections n18-n19) are used to eliminate redundancy and improve the efficiency of subsequent reasoning.

[0078] (III) Step 3: Lightweight Reasoning and Incremental Learning (Refer to) Figure 3 ) 1. Lightweight classifier inference (matching) Figure 3 Lightweight classifier inference) For edge deployments, lightweight inference is performed based on fused features: (1) Simplify the classifier structure: reduce the 3 fully connected layers to 1 layer, replace the traditional convolution with depthwise separable convolution, and combine FP16 quantization to reduce the model memory from 286MB to 143MB; (2) Branch exits early: When Figure 4 When the CNN features of the n33-n34 pipe segment show "normal probability > 0.9", "normal" is output directly without entering the Transformer. The inference time is reduced from 85ms to 59.5ms, which meets the real-time requirements. (3) Output diagnostic results: output the leaking pipe section (e.g. Figure 4 The output of n15-n16 and leakage level (2.5% of rated flow) is sent to the monitoring system for matching. Figure 3 The step of "outputting diagnostic results to the monitoring system".

[0079] 2. New Leakage Pattern Recognition and Incremental Learning (Matching) Figure 3 "New Leakage Pattern Identification → Incremental Learning Module Activated") (1) New pattern recognition: when Figure 4Intermittent leakage occurred in the n27-n28 pipe section (not covered in the training set), and the model prediction confidence was <0.6, triggering incremental learning; (2) Incremental training: Freeze the basic parameters of CNN and Transformer, only unfreeze the last layer of the classifier, and extract 20% of typical samples from historical data (including Figure 4 The known leakage patterns of each pipe section were combined with new samples to form a mixed set, and training was completed in 5 rounds of iteration. (3) Model validation: Validate using data from the most recent 30 days. If the accuracy decreases by less than 2% (e.g., from 90.3% to 89.1%), save the new model and ensure its applicability to the attached data. Figure 4 Adaptability to novel leaks.

[0080] (iv) Step 4: Continuous optimization (refer to) Figure 3 ) 1. Real-time performance evaluation (matching) Figure 3 Real-time performance evaluation) (1) Monitoring of key indicators: Daily calculation of accuracy decay rate (e.g.) Figure 5 The diagnostic accuracy of pipe segment n1-n2 in the water supply network confusion matrix decreased from 92% to 86%, with a decay rate >5% for three consecutive days; the missed detection risk index (such as...) Figure 4 The similarity between the missed samples in the n35-n36 pipe section and historical features is 0.85, and the sensor quality score is 45 (e.g., the sensor data missing rate in the n24-n25 pipe section is 4%). (2) Evaluation trigger: When the missed detection risk index is >0.8 or the quality score is <50, optimization is initiated immediately; a performance report is generated every morning at midnight, including Figure 5 , Figure 6 Real-time update results of the confusion matrix.

[0081] 2. Dynamic adjustment participates in structural fine-tuning (matching) Figure 3 "Dynamic adjustment participates in structural fine-tuning") (1) Parameter adjustment: based on Figure 5 The high-frequency leakage in the n7-n8 section of the water supply network led to an increase of 0.2 in its initial Transformer attention weight; the wavelet noise reduction threshold was updated quarterly based on sensor noise distribution. (2) Structural adjustment: when Figure 4 When new pipe sections n38-n39 are added to the pipeline network, the number of Transformer attention heads increases from 8 to 10; for pipe sections n31-n32 that have been leak-free for 6 consecutive months, 2 CNN convolution kernels are pruned to reduce invalid computation.

[0082] 3. Regularly archive and back up (matching) Figure 3 Regular data archiving and model backup) Monthly archive of newly added leaked samples (including) Figure 4 New cases for each pipe section), using SMOTE oversampling to balance small samples; model backups are performed quarterly to ensure... Figure 5 , Figure 6 Diagnostic accuracy has remained stable over a long period (accuracy rate of over 90% for water supply networks and over 89% for return water networks).

[0083] III. Implementation Effect Verification (combined with) Figure 5 , Figure 6 ) 1. Diagnostic accuracy verification (refer to) Figure 5 , Figure 6 (Confusion matrix) (1) Water supply network: Figure 5 The thermal values ​​on the main diagonal of the confusion matrix are all close to 1 (e.g., 92% accuracy for pipe segment n1-n2, 91% accuracy for pipe segment n10-n11), while the values ​​on the off-diagonal are close to 0, indicating that the model can accurately identify the contaminants. Figure 4 Leaks were detected in various sections of the water supply pipeline, and the overall accuracy of the test was 90.8%. (2) Return water network: Figure 6 The thermal values ​​on the main diagonal of the confusion matrix (e.g., 89% accuracy for pipe segment n1'-n2' and 88% accuracy for pipe segment n23'-n24') are significantly higher than those on the off-diagonal, with an overall accuracy of 89.7%, verifying the model's adaptability to the water supply and return network.

[0084] 2. Real-time performance and operational efficiency The edge-side single-sample inference time is 59.5ms, and it can process 16 samples per second, which meets the requirements. Figure 4 Real-time data diagnostic needs of 47 monitoring points in China; Fault location accuracy has improved from "regional level" (e.g.) Figure 4 The inspection and positioning time in the n2-n7 area has been upgraded to the "pipe segment level" (accurate to the n3-n4 pipe segment), reducing the inspection and positioning time from 40 minutes to 15 minutes, and reducing the number of sensors deployed by 35% compared to the traditional solution.

[0085] This embodiment combines Figures 1-6 A diagnostic method based on dynamic fusion CNN-Transformer was fully implemented, achieving [the desired results] through 47 monitoring points. Figure 4 Leak diagnosis of 77 pipe sections in the shown ring-shaped heating network. Figure 5 , Figure 6 Its high accuracy has been verified. Figure 3 The process ensures real-time performance and adaptability throughout the entire process, solving the problems of low accuracy and difficult deployment of traditional methods in complex pipe networks, and providing a feasible technical solution for the operation and maintenance of district heating systems.

[0086] In the preferred embodiment, the monitoring equipment in step 1 includes a pressure sensor and a flow sensor, which simultaneously collect auxiliary parameters such as ambient temperature and water pump operating frequency. The above settings can comprehensively obtain system operating status information. The pressure sensor accurately senses changes in pipeline pressure, and the flow sensor records the fluid throughput in real time. Combined with ambient temperature and water pump frequency data, this provides a reliable basis for subsequent analysis of system performance and diagnosis of potential faults.

[0087] In the preferred embodiment, the adaptive noise filtering in step 1 specifically includes: decomposing the time-series data into multiple components using a wavelet basis, calculating the information contribution of each component using the self-attention mechanism of the Transformer, applying adaptive threshold processing to the noise-dominant component, reconstructing the signal-dominant component, and outputting the denoised data. These settings effectively improve the quality of the time-series data and reduce noise interference. By combining the wavelet basis with the Transformer, noise and signal components are accurately distinguished, and adaptive threshold processing further optimizes the denoising effect, ensuring that the reconstructed data retains key information and provides a reliable foundation for subsequent analysis.

[0088] In the preferred embodiment, the data cleaning and outlier handling in step 1 specifically includes: using a sliding window interpolation method for missing data caused by sensor offline; identifying extreme values ​​through statistical criteria and replacing them with the mean of neighboring monitoring points; the above settings can effectively fill in the blank areas of the data, ensure the continuity of the data time series, and at the same time reduce the interference of outliers on the overall data distribution, making the processed data closer to the real environmental state and providing a reliable data foundation for subsequent accurate analysis.

[0089] In the preferred embodiment, the dual-branch variable convolutional CNN network in step 2 includes two parallel branches that extract local features at different scales. A feature activation gate is added after each branch to automatically adjust the branch weights by calculating the intensity of local mutations in the input data. This configuration enables the network to dynamically allocate computing resources according to the characteristics of the input data, thereby improving its adaptability to complex scenarios. The feature activation gate uses a differentiable sigmoid function to achieve end-to-end training optimization, significantly improving the robustness of feature extraction while maintaining computational efficiency.

[0090] In the preferred embodiment, in step 2, the adaptive depth Transformer encoder automatically adjusts the encoder depth according to the abnormal distribution of nodes and suppresses attention to irrelevant nodes through local masking. These settings enable the encoder to focus more accurately on abnormal nodes, reduce interference from irrelevant information, and improve the ability to capture abnormal features. This effectively improves the accuracy and robustness of the model when processing complex network data, providing a reliable basis for subsequent anomaly analysis and decision-making.

[0091] In the preferred embodiment, the feature importance quantification in step 2 is based on the weights calculated from the mutation significance of CNN output features and the association entropy of Transformer output features; the cross-layer interactive fusion sets interaction nodes after the CNN branch output and the Transformer encoder output, and achieves feature weighted summation through a learnable dynamic fusion matrix; the above settings can effectively improve the model's ability to capture complex features, the mutation significance strengthens the identification of key features, and the association entropy optimizes feature correlation; the dynamic fusion matrix adaptively adjusts the weights according to the input data, making cross-layer information interaction more efficient and enhancing the overall performance and generalization of the model.

[0092] In the preferred embodiment, the reinforcement learning-driven adaptive pruning algorithm in step 3 selectively retains the convolutional kernels of the CNN and the attention heads of the Transformer multi-head attention mechanism. The retention targets are determined based on feature contribution and performance evaluation, and dynamic fine-tuning pruning is performed periodically. The above settings can effectively reduce model complexity, improve inference speed, and maximize the retention of the model's key feature extraction capabilities. Dynamic fine-tuning pruning can be flexibly adjusted according to the needs of actual scenarios, so that the model can maintain good performance in different tasks, enhancing the model's adaptability and practicality.

[0093] In the preferred embodiment, the lightweight classifier design in step 3 includes reducing the number of fully connected layers, adopting depthwise separable convolutions, quantizing model weights, and introducing a branch early exit mechanism. These settings can effectively reduce the number of model parameters and computational complexity, significantly improve inference speed while ensuring classification accuracy, reduce memory usage, and make the classifier more suitable for resource-constrained edge devices, thus achieving efficient and lightweight target detection and classification tasks.

[0094] In the preferred embodiment, step 3 involves incremental learning by monitoring the confidence level of the model output in real time through an anomaly detection branch, triggering the incremental learning process for samples of potential new leakage patterns; freezing the basic network parameters, unfreezing only the key parameters of the classifier, completing incremental training using a mixed training set and an adaptive learning rate, and evaluating the validation set to determine whether to save the new model; these settings effectively avoid the catastrophic forgetting problem caused by the continuous influx of new data, while reducing excessive consumption of computing resources; the adaptive learning rate can be dynamically adjusted according to the training situation, enabling the model to converge to a better state more quickly and improving the accuracy of identifying new leakage patterns.

[0095] In the preferred embodiment, step 4 involves dynamic performance evaluation that tracks accuracy decay rate, missed detection risk index, and sensor data quality score in real time. Optimization is triggered based on preset conditions, and performance reports are generated periodically. These settings effectively ensure the continuous stability of system performance. By tracking key indicators in real time, potential problems can be identified promptly. Once preset optimization conditions are met, the optimization mechanism is quickly triggered to improve system efficiency, and the periodically generated performance reports provide strong evidence for subsequent improvements.

[0096] In the preferred embodiment, the adaptive iteration of model parameters and structure in step 4 includes adjusting the learning rate based on the rate of change of the validation set loss, adjusting the attention weights according to the frequency of pipeline leaks, periodically adjusting the denoising parameters, and dynamically adjusting the model structure according to changes in the pipeline structure. These settings can effectively improve the model's adaptability and accuracy in detecting pipeline leaks. Adjusting the learning rate based on the rate of change of the validation set loss can avoid overfitting or underfitting. Adjusting the attention weights can focus on key leak features. Periodically adjusting the denoising parameters can reduce interference. Dynamically adjusting the model structure can adapt to new pipeline layouts.

[0097] In the preferred embodiment, the incremental update of the sample library and diagnostic rules in step 4 includes periodically adding new leak samples to the training set and processing small sample types; establishing a knowledge base linking leak features and pipeline operating conditions, and automatically updating the knowledge base and generating specific diagnostic rules when there are significant differences between the features of new samples and the knowledge base; these settings ensure that the sample library and diagnostic rules always closely match actual operating conditions, improving diagnostic accuracy and timeliness. Simultaneously, through the dynamic update mechanism, the system can quickly adapt to new leak patterns, reduce the false positive rate, and provide more reliable technical support for the safe operation of the pipeline network.

[0098] In the preferred embodiment, step 4, the integration of system collaborative optimization and operation and maintenance feedback, includes: associating on-site information entered by operation and maintenance personnel with monitoring data to generate labeled and enhanced samples; analyzing the causes of model prediction deviations and adjusting feature weights accordingly; outputting sensor supplementation suggestions based on high uncertainty areas diagnosed by the model and verifying their effectiveness; these settings enable accurate perception and dynamic optimization of the system's operating status. Labeled and enhanced samples improve the model's generalization ability, feature weight adjustments enhance prediction accuracy, and sensor supplementation suggestions improve the monitoring network layout, forming a data-driven operation and maintenance closed loop to ensure the long-term stable operation of the system.

[0099] In summary, the real-time diagnosis method for leaks in heating pipe networks based on multimodal data fusion and dynamic feature modeling provided by this invention effectively solves key challenges in the field of leak fault diagnosis for regional heating pipe networks. Existing technologies cannot simultaneously and efficiently capture local spatiotemporal features and global hydraulic correlation features, have poor adaptability to high-dimensional nonlinear data, and exhibit low diagnostic accuracy and insufficient robustness in complex scenarios. This invention, through its innovative technical architecture, overcomes the limitations of traditional physical modeling methods (relying on precise models), traditional machine learning methods (weak feature extraction capabilities), and existing deep learning methods (static feature fusion and poor anti-interference capabilities), successfully achieving accurate location, real-time response, and strong anti-interference diagnosis of leak faults in complex heating pipe networks.

[0100] This invention proposes a dynamic cross-layer feature fusion mechanism for the first time. An interactive node is added between the CNN and Transformer layers. By calculating the "significance of mutations" in local features and the "association entropy" of global features, the fusion weights are dynamically adjusted, overcoming the limitations of traditional "static concatenation at the end" models and enabling more accurate fusion of local and global features. Simultaneously, a multi-scale adaptive noise filtering unit is designed, combining wavelet transform and Transformer self-attention mechanism to identify noise-dominant components. Dynamic threshold soft thresholding is employed to effectively reduce sensor noise interference while preserving key signals, thus improving data quality. Furthermore, a lightweight inference architecture is proposed. Through a reinforcement learning-driven dynamic pruning strategy, adaptive pruning of CNN convolutional kernels and Transformer attention heads is performed. Combined with depthwise separable convolution and 16-bit quantization, this reduces the number of model parameters by 90% while maintaining diagnostic accuracy and lowering the model's resource requirements.

[0101] This invention also constructs a full-process closed-loop optimization system, integrating real-time performance evaluation, adaptive parameter adjustment, incremental learning, and operation and maintenance feedback fusion mechanisms to form a "diagnosis-maintenance-optimization" closed loop. This allows the model to continuously adapt to changes in pipeline network conditions during long-term operation, effectively solving the industry problem of performance degradation after deep learning model deployment. An innovative incremental learning mechanism is used, triggering incremental training by monitoring prediction confidence through the isolated forest algorithm. Basic network parameters are frozen, with only the end of the classifier fine-tuned. Combined with a memory replay mechanism to avoid catastrophic forgetting, rapid adaptation to new leakage patterns is achieved without full retraining, significantly improving model update efficiency. Furthermore, a proximity-based fault location method is proposed. Through dynamic feature fusion and channel attention filtering, the leak location output by the model is strongly correlated with the actual physical topology. Combined with 47 sensors, accurate monitoring of 77 pipe segments is achieved, reducing the number of sensors required by traditional solutions by 40%, significantly reducing deployment costs, and providing an efficient, economical, and reliable solution for leak fault diagnosis in heating pipeline networks.

Claims

1. A real-time diagnosis method for heat supply pipe network leakage based on multi-modal data fusion and dynamic feature modeling, characterized in that, The method comprises the following steps: Step 1: data acquisition and preprocessing, deploying monitoring equipment based on the topology of the ring heating pipe network to collect multi-dimensional data, through adaptive noise filtering, data cleaning and outlier processing, feature conversion and standardization, data set division and enhancement operation, to obtain a high-quality data set; Step 2: dynamic feature extraction and fusion, a double-branch variable convolutional CNN network is constructed to extract dynamic local features, an adaptive deep Transformer encoder is used to extract dynamic global features, and dynamic feature fusion is realized through feature importance quantification, cross-layer interaction fusion and fusion feature optimization; Step 3: lightweight inference and incremental learning, a reinforcement learning driven adaptive pruning algorithm and a lightweight classifier design are used to realize lightweight inference, and incremental learning is completed through new sample screening and feature alignment, incremental training strategy, model updating and verification; Step 4: continuous optimization, based on real-time monitoring data, performance dynamic evaluation is carried out, model parameters and structure are adaptively iterated, incremental update of sample library and diagnostic rules is realized, and system collaborative optimization and operation feedback are fused.

2. The method of claim 1, wherein, The monitoring equipment in step 1 includes pressure sensors and flow sensors, which synchronously collect environmental temperature, water pump operating frequency and other auxiliary parameters; The adaptive noise filtering specifically includes: decomposing the time series data into multiple components through wavelet basis, calculating the information contribution degree of each component using the self-attention mechanism of Transformer, adaptively processing the noise dominant component using the adaptive threshold, and reconstructing the signal dominant component to output the denoised data.

3. The method of claim 1, wherein, The data cleaning and outlier processing in step 1 specifically includes: using a sliding window interpolation method for missing data caused by sensor offline; and identifying extreme values through statistical criteria and replacing them with the mean value of adjacent monitoring points.

4. The method of claim 1, wherein the method is based on multi-modal data fusion and dynamic feature modeling for real-time diagnosis of heating pipe network leakage. The double-branch variable convolutional CNN network in step 2 includes two parallel branches that extract local features of different scales; feature activation gates are added after each branch to automatically adjust the branch weight by calculating the local mutation intensity of the input data.

5. The method of claim 1, wherein the method is based on multi-modal data fusion and dynamic feature modeling for real-time diagnosis of heating pipe network leakage. The adaptive deep Transformer encoder in step 2 automatically adjusts the encoder depth according to the node abnormal distribution, and suppresses irrelevant node attention through local mask; the feature importance quantification calculates the weight based on the mutation significance of CNN output features and the correlation entropy of Transformer output features; the cross-layer interaction fusion sets an interaction node after the CNN branch output and the Transformer encoder output, and realizes feature weighted summation through a learnable dynamic fusion matrix.

6. The method of claim 1, wherein the method is based on multi-modal data fusion and dynamic feature modeling for real-time diagnosis of heating pipe network leakage. The reinforcement learning driven adaptive pruning algorithm in step 3 selectively retains the convolution kernel of CNN and the attention head of Transformer multi-head attention mechanism, determines the retention object based on feature contribution degree and performance evaluation, and performs dynamic fine-tuning pruning regularly.

7. The method of claim 1, wherein the method is based on multi-modal data fusion and dynamic feature modeling for real-time diagnosis of heating pipe network leakage. The lightweight classifier design in step 3 includes reducing the number of fully connected layers, using depth separable convolution, quantizing model weights, and introducing branch early exit mechanism.

8. The method for real-time diagnosis of heating pipe network leakage based on multi-modal data fusion and dynamic feature modeling according to claim 1, characterized in that: The incremental learning in step 3 monitors the confidence of the model output in real time through the anomaly detection branch, triggers the incremental learning process for potential new leakage pattern samples, freezes the basic network parameters, only unfreezes the key parameters of the classifier, uses a mixed training set and an adaptive learning rate to complete incremental training, and evaluates whether to save the new model through the validation set.

9. The method for real-time diagnosis of heating pipe network leakage based on multi-modal data fusion and dynamic feature modeling according to claim 1, characterized in that: The performance dynamic evaluation in step 4 tracks the accuracy decay rate, the missed detection risk index, and the sensor data quality score in real time, triggers optimization according to preset conditions, and generates a performance report periodically; the adaptive iteration of model parameters and structure includes modifying the learning rate based on the loss change rate of the validation set, adjusting the attention weight according to the pipe network leakage frequency, regularly adjusting the noise reduction parameter, and dynamically adjusting the model structure according to the pipe network structure change.

10. The method of claim 1, wherein the method is based on multi-modal data fusion and dynamic feature modeling for real-time diagnosis of heating pipe network leaks. The incremental update of the sample library and diagnostic rules in step 4 includes periodically adding new leakage samples to the training set and processing small sample types; a leakage feature-pipe network working condition association knowledge base is established, and when there is a significant difference between the characteristics of new samples and the knowledge base, the knowledge base is automatically updated and special diagnostic rules are generated; the system cooperative optimization and operation and maintenance feedback fusion includes correlating the field information entered by the operation and maintenance personnel with the monitoring data to generate labeled enhanced samples; analyze the reasons for the model prediction deviation and adjust the feature weight accordingly; output sensor supplement suggestions based on the high uncertainty area of the model diagnosis and verify the effect.

Citation Information

Patent Citations

  • Heat supply system pipe network anomaly detection method based on multi-mode AI large model

    CN120430214A

Cited By

  • Lightweight optimization method for edge multi-modal large model

    CN122021768A