Drainage pipeline risk prediction method based on neural network fusion reasoning

By using multi-source data fusion and neural network inference methods, the problems of single data utilization, weak model generalization ability and insufficient adaptive update ability in drainage pipeline risk prediction are solved, achieving high-precision, interpretable risk prediction and long-term stability.

CN122089096APending Publication Date: 2026-05-26FUZHOU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
FUZHOU UNIV
Filing Date
2026-04-27
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Existing risk prediction technologies for drainage pipelines suffer from problems such as limited data utilization, weak model generalization ability, insufficient interpretability of risk predictions, and lack of adaptive update capabilities, resulting in insufficient prediction accuracy and stability.

Method used

We employ a method that integrates structural static, temporal dynamic, and visual detection data by adopting multi-source data acquisition and preprocessing, multimodal feature encoding model construction, neural network fusion inference model construction and pre-training, model fine-tuning and adaptive calibration, and risk prediction and interpretable inference. We achieve deep data fusion and adaptive optimization through a dual attention fusion module and a Bayesian network.

Benefits of technology

It achieves deep fusion of multi-source data, improves the model's generalization ability and prediction accuracy, provides interpretable risk level results, has small sample calibration and online incremental update capabilities, and ensures the long-term operational stability of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122089096A_ABST
    Figure CN122089096A_ABST
Patent Text Reader

Abstract

The invention discloses a drainage pipeline risk prediction method based on neural network fusion reasoning, and particularly relates to the field of network fusion reasoning and risk prediction, and the method comprises the steps: collecting and preprocessing multi-source data, integrating a pipeline structure, time sequence monitoring and visual data, and completing cleaning enhancement; performing multi-modal feature coding, and extracting corresponding feature vectors through a lightweight CNN, a bidirectional LSTM and an embedded layer-full connection layer model; a double-attention fusion reasoning module and a basic network are constructed, and the model is optimized through cross-scene pre-training; domain adversarial fine tuning, prototype network calibration and incremental learning are adopted to realize model adaptive optimization; and fusing the basic network and the Bayesian network to obtain risk levels and screen key influence factors, and finishing long-time-sequence trend pre-judgment in combination with time sequence attention Transform. According to the method, the accuracy and robustness of risk prediction are improved, the result interpretability is enhanced, and reliable technical support is provided for accurate operation and maintenance of the drainage pipeline.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of network fusion reasoning and risk prediction technology, and more specifically, to a method for risk prediction of drainage pipelines based on neural network fusion reasoning. Background Technology

[0002] To ensure the reliable operation of drainage pipe network systems, risk prediction for drainage pipelines has become an important research direction in the field of urban operation and maintenance management. In recent years, with the rapid development of technologies such as the Internet of Things, big data, and artificial intelligence, intelligent and precise risk prediction methods have gradually replaced traditional experience-based judgment models. The application of multi-source data acquisition and analysis technology in the field of drainage pipeline operation and maintenance has become increasingly widespread, providing rich data support and technical possibilities for risk prediction, and promoting the transformation of drainage pipeline management towards a modern model of proactive early warning and precise prevention and control.

[0003] However, it still has some drawbacks in practical use, such as: 1. Data utilization is limited to a single type of monitoring data, failing to integrate multi-source data such as pipeline structure, time-series operating conditions, and visual images, resulting in incomplete data support, difficulty in fully reflecting the true risk status of the pipeline, and missing prediction dimensions. 2. The model has weak generalization ability. Most existing models are trained based on data from specific regions and have not been adapted and optimized for different scenarios. When migrated to new regions, they are easily affected by differences in working conditions, resulting in a significant drop in prediction accuracy and making it difficult to meet the application needs of diverse pipeline networks. 3. Insufficient interpretability of risk prediction. Most models are "black box" reasoning modes, only outputting risk level results, and cannot clearly identify key risk factors and their contribution. This makes it difficult for operation and maintenance personnel to accurately locate the root cause of hidden dangers, which is not conducive to targeted handling. 4. Lack of adaptive update capability: The parameters of the existing model are fixed after training, which cannot adapt to dynamic scenarios such as pipeline aging and changes in operating conditions in real time. As the running time increases, the prediction deviation gradually expands, making it difficult to play a stable early warning role in the long term. Summary of the Invention

[0004] To overcome the aforementioned deficiencies of the prior art, this invention provides a drainage pipeline risk prediction method based on neural network fusion reasoning, which solves the problems mentioned in the background art through the following scheme.

[0005] To achieve the above objectives, the present invention provides the following technical solution: a drainage pipeline risk prediction method based on neural network fusion inference, comprising: S1: Multi-source data acquisition and preprocessing: Collect static data of pipeline structure, time-series dynamic monitoring data and visual inspection data. After cleaning and standardization, enhance the visual data and divide it into training set and validation set. S2: Construction of multimodal feature encoding models, including a lightweight CNN visual feature encoding model, a bidirectional LSTM temporal feature encoding model, and an embedding layer and fully connected layer structural feature encoding model; the visual data, temporal data, and structural data processed in S1 are input into the corresponding encoding models for training, and the outputs are 256-dimensional visual feature vectors, 256-dimensional temporal feature vectors, and 128-dimensional structural feature vectors. S3: Construction and Pre-training of Neural Network Fusion Inference Model: Construct a dual-attention fusion inference module that includes spatial and temporal attention. After mapping the three types of feature vectors output by S2 to the same dimension, dynamically calculate the weights through the attention mechanism and complete spatiotemporal fusion to output the fusion inference feature vector. Based on the fusion inference feature vector, build a "CNN-LSTM-attention" basic fusion inference network to initially classify pipeline risk levels. And perform cross-scene pre-training on the basic fusion inference network and save the pre-training weight parameters. S4: Model fine-tuning and adaptive calibration: The pre-trained model is fine-tuned using a domain adversarial network; a prototype feature library of fault types is built based on a prototype network to complete small-sample inference calibration; and online adaptive updating of the model is achieved through incremental learning. S5: Risk Prediction and Explainable Reasoning: Integrating basic fusion reasoning networks and Bayesian networks, the final risk level is obtained through a weighted fusion formula, and the mutual information formula is used to screen and output influencing factors; combined with the temporal attention Transformer model, future temporal risk trends are predicted, and the risk results of individual and regional pipelines are output and a structured report is generated.

[0006] The technical effects and advantages of this invention are as follows: 1. Deep fusion of multi-source data: Integrating structural static, time-series dynamic, and visual inspection multimodal data, and through targeted preprocessing and feature encoding, the data value is maximized, comprehensively covering pipeline risk influencing factors, and providing sufficient data support for accurate prediction. 2. The generalization ability is significantly improved. The feature adaptability is enhanced by the dual attention fusion module. Combined with cross-scene pre-training and domain adversarial fine-tuning strategies, the model can quickly adapt to pipeline network scenarios in different regions and under different working conditions, effectively reducing the prediction bias caused by scene differences. 3. The reasoning results are highly interpretable. By integrating Bayesian networks and mutual information analysis methods, it not only outputs accurate risk levels but also clarifies key risk factors and their contribution, intuitively presenting the risk formation mechanism and providing clear basis for operation and maintenance personnel to accurately handle potential hazards. 4. Dynamic adaptive optimization with small sample calibration and online incremental update capabilities. It can optimize model parameters in real time based on newly collected data, dynamically adapt to scenarios such as pipeline aging and changes in operating conditions, and ensure the prediction accuracy and stability of the model in the long term. Attached Figure Description

[0007] Figure 1 This is a schematic diagram of the overall structure of the present invention.

[0008] Figure 2 This is a schematic diagram of steps S1-S2 of the present invention.

[0009] Figure 3 This is a schematic diagram of steps S3-S4 of the present invention.

[0010] Figure 4 This is a schematic diagram of step S5 of the present invention. Detailed Implementation

[0011] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. 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.

[0012] refer to Figure 1 - Figure 4 The drainage pipeline risk prediction method based on neural network fusion inference shown includes: S1: Multi-source data acquisition and preprocessing: To acquire comprehensive and high-quality drainage pipeline data, providing reliable data support for subsequent feature encoding and fusion inference, multimodal data is used to cover pipeline static attributes, dynamic operating conditions, and visual defect information. Preprocessing techniques are then combined to improve data usability. The specific steps are as follows: S101: Multimodal Data Acquisition: A combination of offline surveys, online monitoring, and professional testing is used to collect three types of core data from the drainage pipelines in the target area. The parameters and explanations are as follows: Structural static data: obtained through reviewing municipal pipeline network archives and on-site surveys, including parameters such as pipeline material (concrete, PVC, cast iron, etc., parameters used to characterize the pipeline's corrosion resistance and deformation resistance), pipe diameter (DN300-DN2000mm, parameters used to characterize the pipeline's flow carrying capacity), laying years (0-50 years, parameters used to characterize the pipeline's aging degree), burial depth (1-6m, parameters used to characterize the pipeline's degree of influence from external loads), joint type (rigid joint, flexible joint, parameters used to characterize the risk of leakage at pipeline connections), pipeline route, and surrounding geological conditions (sand, clay, rock, etc., parameters used to characterize the geological stability of the pipeline's location). Time-series dynamic monitoring data: Data is collected in real time by installing sensors and environmental monitoring equipment at key nodes of the pipeline. Parameters include hourly flow rate (m³ / s). 3The parameters are: / h (pipeline hydraulic load), flow velocity (m / s, parameter for fluid scouring intensity in the pipeline), water level in the pipe (m, parameter for pipeline congestion), pipeline vibration amplitude (mm / s, parameter for pipeline structural stability), corrosion potential (V, parameter for pipeline corrosion degree), and ambient temperature and humidity (°C, %RH, parameters for external corrosion environment of the pipeline). The data acquisition period is set to 12 consecutive months (parameter settings are based on covering all four seasons and different operating conditions during the flood season and non-flood season to ensure the integrity of data time sequence). Visual inspection data: CCTV pipeline inspection robots and sonar inspection equipment are used to conduct internal pipeline inspections and acquire images of the inner surface of the pipeline (resolution 1920×1080, parameters set to ensure that defect features are clearly identifiable), including images of defects such as cracks, corrosion, deformation, interface leakage, and sediment blockage; at the same time, drone aerial photography is used to acquire images of the surrounding environment of the pipeline and identify external factors that may affect pipeline safety, such as surrounding construction, vegetation cover, and water accumulation.

[0013] S102: Data Cleaning and Standardization: Targeted preprocessing is performed based on the characteristics of different data types. The parameters involved and their explanations are as follows: Outlier removal: The 3σ criterion (based on the assumption that the data follows a normal distribution, values ​​exceeding the mean μ ± 3 times the standard deviation σ are considered outliers) is used to process time-series monitoring data. The mean μ and standard deviation σ of each time-series index are calculated, and outlier data exceeding the range of [μ-3σ, μ+3σ] (such as abrupt changes caused by sensor malfunctions) are removed. For structural data, erroneous data (such as records where the pipe diameter label does not match the actual diameter) are removed through manual verification. Missing value imputation: Missing numerical attributes (such as burial depth) in structural data are filled with the mean of the same type of pipeline in the same region (the parameter selection is based on the similarity of attributes of the same type of pipeline in the same region), and missing textual attributes (such as interface type) are filled with the mode (the parameter selection is based on the mode representing the most common attribute in the dataset, and the bias after imputation is the smallest). Missing values ​​in time series monitoring data are filled with bidirectional LSTM interpolation (the parameter selection is based on the fact that bidirectional LSTM can capture the dependencies between time series data, and the interpolation accuracy is higher than that of traditional linear interpolation). The interpolation model is trained using effective data from 24 hours before and after the missing value (the parameter setting is based on covering a complete daily cycle to ensure the integrity of time series features). Data standardization: All numerical data are mapped to the [0, 1] interval using the Min-Max normalization algorithm (parameters are selected based on the algorithm's ability to preserve relative data relationships, suitable for neural network inputs), with the formula as follows: Where x is the original data, , These are the minimum and maximum values ​​of the indicator, respectively. Categorical data encoding: Textual categorical attributes in structured data are converted into numerical vectors using one-hot encoding (the parameters are selected to avoid misleading numerical values ​​of categorical attributes, which is suitable for neural network semantic understanding). For example, the material "concrete" is encoded as [1, 0, 0], "PVC" is encoded as [0, 1, 0], and "cast iron" is encoded as [0, 0, 1].

[0014] S103: Visual Data Augmentation: Considering the scarcity and uneven distribution of pipeline defect image samples, data augmentation techniques are used to expand the sample size and improve the model's generalization ability. The parameters involved and their explanations are as follows: Geometric transformation: Randomly rotate the CCTV inspection image (0°, 90°, 180°, 270°, parameter settings are based on simulating different shooting scenes of the inspection robot), randomly crop (crop size is 640×640 pixels, parameter settings are based on focusing on the core area of ​​the defect and reducing background interference), horizontally flip, and vertically flip. Pixel Transformation: Adjusts the image's contrast (range 0.8-1.2, parameter settings are based on simulating image characteristics under different lighting intensities), brightness (range 0.7-1.3, parameter settings are based on the same as above), and saturation (range 0.8-1.2, parameter settings are based on the same as above). Noise addition: Gaussian noise is added to the image (variance 0.001-0.005, parameter settings are based on the electronic noise of the simulated detection equipment to improve the model's anti-interference ability). Sample balancing: Oversampling (suitable for amplifying scarce samples) is used to enhance scarce defective samples (such as collapse and deformation), while undersampling (suitable for reducing redundant samples) is used to reduce the number of normal pipeline image samples, so that the ratio of each type of sample tends to be 1:1 (the parameter setting is based on sample balancing to avoid the model biasing towards the majority class samples); the enhanced data is divided into training set and validation set at an 8:2 ratio (the parameter setting is based on the industry-standard training set and validation set division ratio to ensure the balance of training and validation data volume).

[0015] S2: Multimodal Feature Encoding Model Construction: For the multimodal data (visual, temporal, and structural) collected in S1, dedicated feature encoding models are constructed to convert data of different types and dimensions into feature vectors of a unified dimension, achieving homogeneous data representation and laying the foundation for subsequent neural network fusion inference; the specific steps are as follows: S201: Visual Feature Encoding Model Construction and Training: A lightweight CNN (Convolutional Neural Network) is used to construct a visual feature encoder, balancing feature extraction accuracy and model computational efficiency. The specific network structure and parameters are as follows: Input layer: Input image size 640×640×3, parameters correspond to the size of the enhanced image, 3 represents the RGB three channels; Convolutional Layer 1: Convolutional kernel 3×3, parameters used to extract local texture features of the image; stride 1, to ensure that the feature map size does not shrink too quickly; padding 1, to keep the input and output sizes consistent; output channels 32, parameters used to represent the dimension of the feature map; activation function ReLU, parameters selected to solve the gradient vanishing problem; Max pooling layer 1: pooling kernel 2×2, parameters are used to reduce feature dimension and improve computational efficiency; stride 2, feature map size is halved; Convolutional layer 2: 5×5 kernel, parameters used to extract a wider range of defect features from the image; stride 1; padding 2; output channels 64; activation function ReLU; Max pooling layer 2: 2 pooling kernels, step size 2; Convolutional layer 3: 3×3 kernel; stride 1; padding 1; output channels 128; activation function ReLU; Global average pooling layer: output dimension 128, parameters are used to reduce the number of parameters in the fully connected layer; Fully connected layer: 128-dimensional input, 256-dimensional output; parameters are used for feature depth mapping; activation function: ReLU. Feature Output Layer: Outputs a 256-dimensional visual feature vector, denoted as... This is used for subsequent fusion reasoning.

[0016] The specific training parameters and explanations for the model include: the optimizer used is Adam (the parameter is selected based on adaptive learning rate for fast convergence), the initial learning rate is 0.001 (the parameter is set to balance the model's convergence speed and stability), and the learning rate decay strategy is to decrease the learning rate to 0.9 every 20 epochs (the parameter is set to reduce the learning rate in the later stages so that the model converges to the optimal solution); the loss function used is the cross-entropy loss function (the parameter is selected based on its suitability for classification tasks); the training epochs are 100, and an early stopping strategy is adopted (training stops if the accuracy on the validation set does not improve for 10 consecutive epochs, the parameter is set to avoid model overfitting).

[0017] After the enhanced visual data of S103 is input into the model and trained, the model can accurately extract the visual features of internal and external defects of the pipeline (such as the length and width of cracks, the area and depth of corrosion, the degree of deformation, etc.).

[0018] S202: Construction and Training of Temporal Feature Encoding Model: A bidirectional LSTM (Long Short-Term Memory) network is used to construct a temporal feature encoder to capture the temporal dependencies and trend changes in time-series monitoring data. The network structure and parameters are as follows: Input layer: The input time series has a length of 24, and the parameters correspond to 24 hours of monitoring data; the feature dimension is 8, and the parameters correspond to 8 types of time series monitoring indicators; Bidirectional LSTM layer 1: 128 hidden units, parameters are used to characterize the temporal feature mapping dimension; dropout coefficient 0.2, parameters are used to randomly discard some neurons to avoid overfitting; return sequence, parameters are set to retain the features of each time step for processing by the next LSTM layer; Bidirectional LSTM layer 2: 128 hidden units; dropout coefficient 0.2; no sequence is returned, and the parameter settings are based on retaining only the features of the last time step, representing the trend features of the entire time series. Fully connected layer 1: 256-dimensional input, 128-dimensional output; ReLU activation function; Fully connected layer 2: 128-dimensional input, 256-dimensional output; ReLU activation function; Feature Output Layer: Outputs a 256-dimensional temporal feature vector, denoted as... This is used for subsequent fusion reasoning.

[0019] Model training parameters and explanations: The optimizer is Adam, with a learning rate of 0.001; the loss function is the mean squared error loss function (the parameters are selected based on suitability for time-series feature fitting tasks); the training cycle is 80 epochs, and the early stopping strategy is to stop training if the validation set loss does not decrease for 8 consecutive epochs (the parameters are set to avoid model overfitting).

[0020] The S102 standardized time series data is divided into time series according to time windows (window size 24h, step size 1h, parameter settings based on capturing time series features within the daily cycle), and input into the model for training. After training, the model can effectively extract trend features (such as flow peaks and corrosion potential decrease trends) and abrupt change features (such as abnormal abrupt changes in pipeline vibration) from the time series data.

[0021] S203: Construction and Training of Structural Feature Encoding Model: A structural feature encoder is constructed using an "embedded layer and a fully connected layer" to achieve semantic encoding and dimensionality unification of static structural data. The network structure and parameters are as follows: Input layer: Input encoded structured data vector, dimension 15, parameters corresponding to 15 types of structural attributes; Embedding layer: Embedding dimension 64, parameters are used to map discrete encoded vectors to continuous semantic vectors, improving the model's understanding ability; Fully connected layer 1: 64-dimensional input, 96-dimensional output; ReLU activation function; Fully connected layer 2: 96-dimensional input, 128-dimensional output; ReLU activation function; Feature Output Layer: Outputs a 128-dimensional structural feature vector, denoted as... This is used for subsequent fusion reasoning.

[0022] The specific parameters for model training include: the optimizer is Adam, the learning rate is 0.0008 (the parameter settings are based on the low dimensionality of the structured data, and reducing the learning rate avoids model oscillation); the loss function is the cross-entropy loss function; and the training epochs are 60.

[0023] The structural data encoded by S102 is input into the model for training. After training, the model can retain the core semantic information of the pipeline's static properties (such as the corrosion resistance of the material, the correlation between pipe diameter and flow carrying capacity, etc.).

[0024] S3: Construction and Pre-training of Neural Network Fusion Inference Model: By designing a spatiotemporal attention fusion inference module, the multimodal feature vectors output by S2 are integrated. , , A CNN-LSTM-Attention-based fusion inference network is constructed, and a cross-scene pre-training strategy is used to improve the model's fusion inference ability and generalization performance. The specific steps are as follows: S301: Design of Spatiotemporal Attention Fusion Reasoning Module: A dual-attention fusion unit combining spatial and temporal attention is constructed to achieve dynamic weighted fusion of multimodal features. The core input vector consists of three feature vectors output by S2: a 256-dimensional visual feature vector. 256-dimensional temporal feature vector 128-dimensional structural feature vector The weight coefficients are dynamically obtained through training using an attention mechanism, as detailed below: Feature dimension unification: through fully connected layers , , Mapped to the same 512-dimensional dimension (parameter settings are based on improving the compatibility of feature fusion and enhancing feature expressive power), the mapped vectors are denoted as follows: , , ; Spatial attention weight calculation: , , The concatenated vector yields a 1536-dimensional vector, which is then input into a fully connected layer containing 64 neurons (parameters used for feature dimensionality reduction and attention weight calculation). The activation function is Sigmoid (parameters are selected based on mapping the output value to the [0, 1] interval), and the output is a 3-dimensional weight vector. The weight vector is automatically learned and optimized during model training, with the learning objective being to minimize the risk prediction loss. The final weight values ​​represent the contribution of the three types of features to risk prediction. The formula for calculating spatial fusion features is: ;in This ensures the reasonableness of weight allocation; Temporal attention weight calculation: To address the dynamic changes in temporal features, a temporal attention gating unit is introduced, with spatial fusion features as input. The time stamp encoding vector (512 dimensions, with parameters consistent with the spatial fusion feature dimensions, used to represent temporal information) is used; the temporal attention weight vector is calculated through a bidirectional LSTM layer (256 hidden units). The weighting method is dynamically adjusted based on timestamp information, with higher weights assigned to important time intervals such as the flood season and critical nodes of pipeline aging; the formula for calculating time fusion features is... ; Fusion inference output: spatiotemporal fusion feature vector The input is fed into a fully connected layer (256 neurons, ReLU activation function) to achieve feature dimensionality reduction and depth mapping, and outputs a fused inference feature vector with a dimension of 256.

[0025] S302: Construction of the Basic Fusion Inference Network: A CNN-LSTM-Attention-based fusion inference network is constructed to achieve preliminary classification and inference of pipeline risk levels. The network structure and parameters are explained below: Input layer: Input the 256-dimensional fused inference feature vector output by S301; Fully connected layer 1: 256 neurons; ReLU activation function; dropout coefficient 0.3, parameters used to avoid overfitting; Fully connected layer 2: 128 neurons; ReLU activation function; dropout coefficient 0.3; Output layer: 4 neurons, with parameters corresponding to four risk levels: low, medium, high, and extremely high; activation function: Softmax, with parameters selected based on the probability values ​​of each output category, summing to 1. The output layer corresponds to the classification results of pipeline risk levels, and the output values ​​are the probability values ​​of each category.

[0026] S303: Cross-scenario pre-training: Based on publicly available municipal pipeline datasets (CIPPE dataset, EPANET pipeline fault dataset) and fault data of similar infrastructure (water supply, gas pipelines), the basic fusion inference network constructed by S302 is pre-trained to obtain the fusion inference capability of common features of pipeline faults. The specific training parameters are as follows: The optimizer used is Adam; the initial learning rate is 0.001; the weight decay coefficient is 0.0001 (parameter used to limit excessive weights and avoid overfitting); the loss function used is cross-entropy loss; the training batch size is 32 (parameter settings are based on balancing memory usage and training efficiency); the training epochs are 100; an early stopping strategy is adopted (training stops if the validation set accuracy does not improve for 10 consecutive epochs). After pre-training is completed, the network's weight parameters are saved as initial parameters for subsequent model fine-tuning, thereby improving the model's adaptability to pipeline data in the target region.

[0027] S4: Model fine-tuning and adaptive calibration: To address the unique characteristics of pipeline data in the target region, the performance of the fusion inference model is optimized through domain adversarial fine-tuning, small-sample prototype feature calibration, and online adaptive updating. This solves the domain offset problem across scenarios and the challenge of modeling small-sample fault data. The specific steps are as follows: S401: Domain Adversarial Adaptive Fine-tuning Domain Adversarial Networks (DANNs) are introduced, using the feature extraction layer of the pre-trained model as a shared encoder and adding a domain discriminator to achieve adaptive fine-tuning of the target region data. The specifics are as follows: Network structure: Shared encoder (using S302 feature extraction layer) → Label predictor (using S302 output layer) → Risk level prediction result; Shared encoder → Domain discriminator (fully connected layer 1: 256 neurons, ReLU; fully connected layer 2: 128 neurons, ReLU; fully connected layer 3: 2 neurons, Sigmoid, parameters correspond to source domain data and target domain data) → Domain classification result; Training strategy: An adversarial training approach is adopted. The goal of the label predictor is to minimize the cross-entropy loss of risk level prediction, the goal of the domain discriminator is to maximize the accuracy of domain classification, and the goal of the shared encoder is to minimize the accuracy of the domain discriminator. During training, the adversarial optimization between the shared encoder and the domain discriminator is achieved through a gradient inversion layer (GRL). Training parameters: The learning rate is reduced to 0.0001 during the fine-tuning phase (the parameter setting is based on the need for small adjustments during the fine-tuning phase to avoid destroying the common features of the pre-trained model); the training batch size is 16 (the parameter setting is based on the small amount of labeled data in the target region, reducing the batch size improves training stability); the number of training epochs is 50; a small amount of labeled data is input into the target region pipeline (accounting for 10%-20% of the total data in the target region, the parameter setting is based on balancing labeling costs and fine-tuning effects).

[0028] S402: Small Sample Prototype Feature Calibration Based on Prototypical Networks in few-shot learning, a prototype feature library of pipeline fault types in the target region is constructed to achieve accurate fault type matching and inference calibration in few-shot scenarios, as detailed below: Prototype feature library construction: Input a small number of fault samples from the target area (5-10 samples per type of fault, with parameters set based on the typical sample size for small sample learning) into the fine-tuned model, extract the fusion inference feature vectors of various faults (cracks, corrosion, collapse, interface leakage, etc.), calculate the mean of the feature vectors of each type of fault (the parameter selection is based on the mean representing the typical characteristics of the type of fault), and use it as the prototype feature vector of the type of fault to construct the prototype feature library. Inference calibration process: The feature vector of the newly input target area pipeline sample is input into the model, and its Euclidean distance with the feature vectors of each category in the prototype feature library is calculated (the parameter is selected based on the similarity of the feature vectors). The category with the smallest distance is the fault type of the sample; the distance is then weighted using a distance-weighted formula. Calculate the probability values ​​for each category, where Let P be the Euclidean distance between the sample features and the prototype features of the i-th class. i Let j be the probability value of the i-th category, and j be the index. Calibration Update: Add the newly labeled sample feature vectors to the prototype feature library, recalculate the prototype feature vectors, and realize the dynamic update of the prototype feature library.

[0029] S403: Online Adaptive Update A real-time data access interface is constructed to continuously collect inspection and monitoring data of pipelines in the target area, enabling online adaptive updates of the fusion inference model. The parameters and explanations are as follows: Trigger condition settings: Set the trigger condition for online learning to 100 newly labeled data entries or a time interval of 7 days (the parameter setting is based on balancing the model update frequency and computing resource consumption). Incremental learning strategy: Incremental learning is adopted, based on the fine-tuned model, the parameters of the bottom feature extraction layer are frozen (the parameter settings are based on the fact that the bottom features are common features, to avoid catastrophic forgetting caused by updates), and only the parameters of the upper fully connected layer are updated; Parameter update: Input the newly labeled data into the model and update the model parameters using mini-batch gradient descent; set the learning rate to 0.00005 (the parameter setting is based on the requirement of a very small learning rate during the online update phase to ensure model stability); train for 10 epochs; after the update is complete, save the new model parameters.

[0030] S5: Risk Prediction and Explainable Reasoning: By constructing a hybrid inference model, accurate prediction and interpretable analysis of pipeline risk levels are achieved. Simultaneously, a temporal attention Transformer model is introduced to predict long-term risk evolution trends. The specific steps are as follows: S501: Construction of Hybrid Fusion Inference Model: This model integrates a "basic fusion inference network" and a "Bayesian network" to construct an interpretable inference model, enabling risk level prediction and key influencing factor analysis. The details are as follows: Bayesian network modeling: Based on domain knowledge, a Bayesian network structure for pipeline risk factors is constructed. The nodes include risk factors such as pipeline material, laying years, corrosion degree, flow rate, and vibration amplitude, as well as nodes of four risk levels: low, medium, high, and extremely high. The conditional probability table of the Bayesian network is calculated using historical pipeline data in the target area (parameters are used to characterize the probabilistic dependencies between nodes). Hybrid inference process: Input the fused feature vector output by S301 into the basic fusion inference network to obtain preliminary risk level prediction results (probability values). The risk factor values ​​corresponding to the fused feature vectors are input into the Bayesian network to calculate the posterior probability of each risk level. ); using a weighted fusion formula Calculate the probability value of the final risk level, where The weighting coefficients (ranging from 0.6 to 0.8, with the parameter settings determined by model validation to prioritize the fitting accuracy of the neural network while also considering the interpretability of the Bayesian network). Key Influencing Factor Output: Based on the probabilistic inference results of Bayesian networks, the contribution of each risk factor to the final risk level is calculated (using the mutual information formula). The calculation uses parameters to characterize the correlation between risk factors and risk levels, and outputs the top 3 key influencing factors in terms of contribution (parameter settings are based on highlighting core risk factors to facilitate operational decision-making); where X is a random variable of risk factors, Y is a random variable of risk levels, x is the specific value of random variable X, y is the specific value of random variable Y, P(x,y) is the joint probability of X and Y, P(x) is the marginal probability of random variable X, and P(y) is the marginal probability of random variable Y.

[0031] S502: Long-term risk evolution reasoning: Introducing the temporal attention Transformer model, in conjunction with the hybrid fusion reasoning model of S501, to predict the long-term pipeline risk evolution trend, as detailed below: Transformer model construction: An Encoder-Decoder structure is adopted (parameters are selected based on suitability for sequence-to-sequence prediction tasks); the Encoder layer consists of 6 layers (parameters are used to deeply capture temporal features), each layer includes a multi-head attention mechanism (8 heads, parameters are used to capture temporal dependencies of different subspaces in parallel) and a feedforward neural network (512 neurons); the Decoder layer consists of 6 layers, with the same structure as the Encoder layer; the input layer is a historical risk level sequence (12 months in length, parameters are set based on covering annual temporal features), and the output layer is a future risk level sequence (1-3 years in length, parameters are set based on meeting medium- and long-term operation and maintenance planning needs). Temporal feature fusion: The temporal feature vector output by S2 is concatenated with the historical risk level sequence and input into the Encoder layer of the Transformer model. The long-term dependency between risk level and temporal features is captured through a multi-head attention mechanism. Evolutionary trend prediction: The Decoder layer, based on the output of the Encoder layer and combined with location encoding information (parameters used to characterize the location features of the time series), outputs a risk level sequence for the next 1-3 years; the model parameters are optimized by calculating the mean square error between the predicted sequence and the actual sequence; the risk level change trend data is output, and key time nodes for the rise in risk level are marked (such as the flood season, the critical value of the pipeline service life).

[0032] S503: Risk Result Output: Outputs the risk prediction results for the target pipeline, providing direct support for operation and maintenance decisions, as detailed below: Output content of a single pipeline: real-time risk level (low / medium / high / extremely high), risk confidence (the parameter is used to characterize the reliability of the prediction results, with a value range of [0, 1], and the higher the value, the more reliable the prediction results), key influencing factors and the contribution ratio of each factor; Regional pipeline output content: a statistical table of risk level distribution of all pipelines in the region (statistical number and percentage classified by risk level), location information and core risk factors of high-risk and extremely high-risk pipelines; Results Export: Supports outputting structured risk reports, which include details of individual pipeline risks, an overview of regional risk distribution, long-term risk evolution trend analysis, and targeted operation and maintenance recommendations.

[0033] Secondly: The accompanying drawings of the embodiments disclosed in this invention only involve the structures involved in the embodiments disclosed in this invention. Other structures can refer to the general design. In the absence of conflict, the same embodiment and different embodiments of this invention can be combined with each other. In conclusion, the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A risk prediction method for drainage pipelines based on neural network fusion inference, characterized in that, include: S1: Multi-source data acquisition and preprocessing: Collect static data of pipeline structure, time-series dynamic monitoring data and visual inspection data. After cleaning and standardization, enhance the visual data and divide it into training set and validation set. S2: Construction of multimodal feature encoding models, including a lightweight CNN visual feature encoding model, a bidirectional LSTM temporal feature encoding model, and an embedding layer and fully connected layer structural feature encoding model; the visual data, temporal data, and structural data processed in S1 are input into the corresponding encoding models for training, and the outputs are 256-dimensional visual feature vectors, 256-dimensional temporal feature vectors, and 128-dimensional structural feature vectors. S3: Construction and Pre-training of Neural Network Fusion Inference Model: Construct a dual-attention fusion inference module that includes spatial and temporal attention. After mapping the three types of feature vectors output by S2 to the same dimension, dynamically calculate the weights through the attention mechanism and complete spatiotemporal fusion to output the fusion inference feature vector. Based on the fusion inference feature vector, build a "CNN-LSTM-attention" basic fusion inference network to initially classify pipeline risk levels. And perform cross-scene pre-training on the basic fusion inference network and save the pre-training weight parameters. S4: Model fine-tuning and adaptive calibration: The pre-trained model is fine-tuned using a domain adversarial network; a prototype feature library of fault types is built based on a prototype network to complete small-sample inference calibration; and online adaptive updating of the model is achieved through incremental learning. S5: Risk Prediction and Explainable Reasoning: Integrating basic fusion reasoning networks and Bayesian networks, the final risk level is obtained through a weighted fusion formula, and the mutual information formula is used to screen and output influencing factors; combined with the temporal attention Transformer model, future temporal risk trends are predicted, and the risk results of individual and regional pipelines are output and a structured report is generated.

2. The drainage pipeline risk prediction method based on neural network fusion inference according to claim 1, characterized in that: The lightweight CNN visual feature encoding model includes: an input layer, a convolutional layer, a pooling layer, a global average pooling layer, a fully connected layer, and a feature output layer, specifically including: The input layer receives the enhanced visual data; image features are extracted through multiple sets of convolutional and pooling layers, with ReLU activation function used in the convolutional layers and max pooling function used in the pooling layers; after feature dimensionality reduction by a global average pooling layer, the feature is connected to a fully connected layer to achieve feature depth mapping; finally, a 256-dimensional visual feature vector is output through the feature output layer; the model training process uses the Adam optimizer, with cross-entropy loss function as the optimization objective, combined with an early stopping strategy to complete the training.

3. The drainage pipeline risk prediction method based on neural network fusion inference according to claim 1, characterized in that: The bidirectional LSTM temporal feature encoding model includes: an input layer, a bidirectional LSTM layer, a fully connected layer, and a feature output layer, specifically including: The input layer receives time-series data that has been S1-normalized and divided into time windows. At least two sets of bidirectional LSTM layers are alternately connected to capture the time dependencies and trend features of the time-series data. The bidirectional LSTM layers are configured with dropout coefficients to avoid overfitting. The first bidirectional LSTM layer returns the sequence, while the second bidirectional LSTM layer does not. After feature dimensionality reduction and depth mapping are completed sequentially through fully connected layers, a 256-dimensional time-series feature vector is output through the feature output layer. The model training process uses the Adam optimizer with the mean squared error loss function as the optimization objective, combined with an early stopping strategy to complete the training.

4. The drainage pipeline risk prediction method based on neural network fusion inference according to claim 1, characterized in that: The embedded layer and fully connected layer structure feature encoding model includes: an input layer, an embedded layer, a fully connected layer, and a feature output layer, specifically including: The input layer receives static pipeline structure data after classification and encoding; the discrete structure data vectors are mapped into continuous semantic vectors through the embedding layer, and then feature dimensionality upscaling and depth mapping are completed sequentially through at least two sets of fully connected layers. The fully connected layers use the ReLU activation function; finally, a 128-dimensional structure feature vector is output through the feature output layer; the model training process uses the Adam optimizer, and the cross-entropy loss function is used as the optimization objective to complete the training.

5. The drainage pipeline risk prediction method based on neural network fusion inference according to claim 1, characterized in that: The dual-attention fusion inference module includes: The system comprises a feature dimension unification unit, a spatial attention computation unit, a temporal attention computation unit, and a fusion feature output unit. Specifically: the feature dimension unification unit receives a 256-dimensional visual feature vector, a 256-dimensional temporal feature vector, and a 128-dimensional structural feature vector, and maps the three types of feature vectors to the same dimension through a fully connected layer; the spatial attention computation unit concatenates the mapped feature vectors, inputs them into the fully connected layer, and dynamically calculates the spatial attention weights of the three types of features through a Sigmoid activation function, and obtains the spatial fusion feature through weighted summation; the temporal attention computation unit introduces a timestamp encoding vector, combines it with the spatial fusion feature, calculates the temporal attention weights through a bidirectional LSTM layer, and obtains the spatiotemporal fusion feature through weighted summation; the fusion feature output unit inputs the spatiotemporal fusion feature into the fully connected layer to complete the depth mapping and outputs the fusion inference feature vector.

6. The drainage pipeline risk prediction method based on neural network fusion inference according to claim 5, characterized in that: The constructed "CNN-LSTM-Attention" basic fusion inference network includes: an input layer, a fully connected layer, and an output layer, specifically including: The input layer receives the fused inference feature vector output by S3; it is then connected to two sets of fully connected layers with dropout mechanism, and the ReLU activation function is used to complete feature depth mining and dimension adjustment; the output layer is configured with 4 neurons and uses the Softmax activation function to map the output features of the fully connected layer to probability values ​​of four risk levels: low risk, medium risk, high risk, and very high risk, thus initially classifying the risk level of the pipeline; during the network construction process, the feature fusion logic of the S3 dual attention fusion inference module is integrated to form an end-to-end inference link of "feature fusion - deep inference - risk classification".

7. The drainage pipeline risk prediction method based on neural network fusion inference according to claim 1, characterized in that: The S4 includes: Domain Adversarial Adaptive Fine-tuning: Introducing Domain Adversarial Network (DANN), the feature extraction layer of the pre-trained model of S3 is used as a shared encoder, a new domain discriminator is added, and a small amount of labeled data, which accounts for 10%-20% of the total data volume, is input into the target region. The parameters of the shared encoder are optimized through adversarial training to achieve adaptive adaptation of the pre-trained model to the target region data. Small sample prototype feature calibration: Based on the prototype network, a prototype feature library of pipeline fault types in the target area is constructed. After fine-tuning the model by inputting fault samples, features are extracted and the mean is calculated as the prototype feature vector. Fault type matching and inference calibration are completed by calculating the Euclidean distance between the new sample features and the prototype features. Online adaptive update: Build a real-time data access interface, set trigger conditions of adding 100 new labeled data or a time interval of 7 days, and freeze the parameters of the bottom feature extraction layer of the model by incremental learning, and only update the parameters of the upper fully connected layer.

8. The drainage pipeline risk prediction method based on neural network fusion inference according to claim 1, characterized in that: The final risk level is obtained through a weighted fusion formula, including: The fusion inference feature vector output by the dual attention fusion inference module is input into the basic fusion inference network to obtain the preliminary risk level probability results; at the same time, the pipeline risk factor related data corresponding to the fusion inference feature vector is extracted and input into the Bayesian network to calculate the posterior probability results of each risk level. A weighted fusion approach is used to integrate the preliminary risk level probability results with the posterior probability results of each risk level. By setting weight coefficients, the inference results of the basic fusion inference network and the Bayesian network are balanced. The value of the weight coefficients ranges from 0.6 to 0.8, and the optimal value of the coefficients is determined through model validation experiments. The probability results of various risk levels obtained after weighted fusion are compared, and the category with the highest probability value is determined as the final risk level of the pipeline. The final risk level includes four categories: low risk, medium risk, high risk, and extremely high risk.

9. The drainage pipeline risk prediction method based on neural network fusion inference according to claim 1, characterized in that: The method of using mutual information formulas to screen and output influencing factors includes: The analysis focuses on two categories: pipeline risk factors and pipeline risk levels. Risk factors include pipeline laying years, corrosion potential, peak flow rate, and pipeline material. Risk levels are categorized into four types: low risk, medium risk, high risk, and extremely high risk. The correlation strength quantification method corresponding to mutual information is adopted to analyze the degree of correlation between each type of risk factor and risk level. By statistically analyzing the distribution of the values ​​of various risk factors and the corresponding risk levels in the pipeline sample set of the target area, the quantitative results of the correlation between the two are obtained. The correlation between various risk factors and risk levels is quantified and ranked. The top three risk factors with the highest correlation are selected as key influencing factors, and the contribution of each key influencing factor to the risk level is output.