Intelligent diagnosis method for water supply network leakage based on semi-supervised transfer learning
Through the semi-supervised transfer learning method, the inter-domain distance between the source domain and the target domain is reduced, and the network is adjusted by using the tag data or not, which solves the problems of data imbalance and environmental interference in the water supply network leakage diagnosis, and improves the accuracy and efficiency of the diagnosis.
Patent Information
- Application Number
- CN202411732269.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2044-11-29
AI Technical Summary
The existing neural network-based water supply network leakage diagnosis method has poor accuracy in diagnosis results due to the small number of abnormal data samples and large environmental interference.
A semi-supervised transfer learning method is adopted to minimize the empirical distribution, reduce the inter-domain distance between the source domain and the target domain, and adjust the network with labeled and unlabeled data to achieve knowledge transfer, thereby improving diagnostic accuracy.
It effectively solves the problems of few abnormal samples and large environmental interference, improves the accuracy and efficiency of water supply pipeline leakage diagnosis, and can obtain higher accuracy under different pipeline data.
Smart Images

Figure CN119202958B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of water supply network leakage diagnosis, and in particular to an intelligent water supply network leakage diagnosis method based on semi-supervised transfer learning. Background Art
[0002] With the continuous advancement of urbanization, water supply networks, as the "lifeline" of the people, have become an indispensable part of people's daily lives, playing a vital role in ensuring the stability of people's lives and the development and construction of urban infrastructure. Due to the aging of urban water supply networks, pipe bursts and hidden leaks inevitably occur frequently. These problems not only cause a large amount of water resources to be wasted, but also cause water pollution, seriously threaten the lives and health of residents, and cause immeasurable losses. Therefore, timely and accurate detection and diagnosis of leaks are of vital importance to protecting freshwater resources and maintaining people's health.
[0003] At present, the methods for detecting water supply network leakage can be mainly divided into two categories: instrument detection method and detection method based on artificial intelligence. The instrument detection method mainly uses portable equipment, such as ground penetrating radar, infrared thermal imager, fiber optic sensor and listening stick, etc., and the staff of the water system gradually investigate the area. It is expensive, inefficient, and cannot detect leakage in time. It can only rely on the feedback of local residents to diagnose the leakage area, and its use is very limited. With the development of big data and artificial intelligence, methods based on artificial intelligence have been known to researchers and gradually began to be studied in depth. At present, the pipeline leakage diagnosis methods based on artificial intelligence can be roughly divided into two categories, such as classification prediction methods based on machine learning: SVM, decision tree. Prediction methods based on neural networks: artificial neural networks, recurrent neural networks, Bayesian classification networks, etc. Because the methods based on neural networks have high robustness and accuracy, they are favored by researchers.
[0004] Although the neural network-based method has high robustness and accuracy, it requires a large amount of data to train the neural network. The scale and accuracy of the data play a crucial role in the accuracy of diagnosis. However, the current water supply network data has the following problems: (1) There is a lack of abnormal data. Deliberately creating leakage incidents will consume a lot of resources, resulting in serious imbalance in the water supply network data, which greatly reduces the accuracy of neural network prediction. (2) The environmental interference is large, resulting in some of the detected data being labeled and some being unlabeled. This makes it impossible for the supervised learning neural network to make normal predictions. Summary of the invention
[0005] The purpose of the present invention is to provide an intelligent diagnosis method for water supply network leakage based on semi-supervised transfer learning, so as to solve the problem that the current water supply network leakage diagnosis method based on audio or vibration signals has two major difficulties: few abnormal samples and large environmental interference, which leads to poor accuracy of diagnosis results. By minimizing the empirical distribution, reducing the inter-domain distance between the source domain and the target domain, and adjusting the network using labeled and unlabeled data respectively, the model is helped to perform effective knowledge transfer between the source domain and the target domain, thereby improving the low accuracy caused by small samples and sample imbalance.
[0006] To achieve the above object, the present invention provides a water supply network leakage intelligent diagnosis method based on semi-supervised transfer learning, the method comprising:
[0007] Data preprocessing: Obtain the original data of pipeline network pressure, check the missing values and abnormal values of the original data of pipeline network pressure, perform windowing and smoothing on the checked original data of pipeline network pressure, obtain the target domain data and source domain data, and then divide the target domain data and source domain data according to whether there are labels or not;
[0008] Model construction: A semi-supervised transfer learning model with two branch networks is constructed. The first branch network is responsible for training the labeled data in the source domain data, and the second branch network is responsible for training the labeled data in the target domain data. The unlabeled data in the target domain data and the source domain data are jointly trained by the two branch networks. After training with both unlabeled and labeled data, the final classifier is obtained.
[0009] Model evaluation: Use randomly divided datasets to perform multi-metric tests on the semi-supervised transfer learning model.
[0010] Furthermore, the original data of the pipe network pressure is obtained, which specifically includes the following operations:
[0011] S101, construct the topological structures net1 and net2 of the pipe network;
[0012] S102, performing data simulation on the pipe network based on net1 and net2, setting the sampling interval of the pressure sensor and the simulation running time of the pipe network, and randomly setting the leakage point and leakage radius size for the pipes in the pipe network;
[0013] S103. The pressure sensor collects time series pressure data during multiple simulations, and uses the time series pressure data as original data of the pipe network pressure.
[0014] Furthermore, the original data of the pipe network pressure in net1 after windowing and smoothing are used as target domain data, and the original data of the pipe network pressure in net2 after windowing and smoothing are used as source domain data.
[0015] Furthermore, the two branch networks of the semi-supervised transfer learning model include, from front to back:
[0016] The HLR layer is used to enhance the input data to obtain multi-dimensional features;
[0017] Feature layer, used to extract high-dimensional features of multi-dimensional features;
[0018] Bottleneck layer, used to obtain low-dimensional feature information of input data based on the high-dimensional features extracted by the Feature layer;
[0019] The Classifier layer is used to obtain classification results based on low-dimensional feature information.
[0020] Furthermore, the two branch networks of the semi-supervised transfer learning model share the weight parameters of the Feature layer, perform cross-correlation analysis on the low-dimensional feature information obtained by the Bottleneck layer of the two branch networks, calculate the cross-correlation matrix, and measure the inter-domain distance between the source domain and the target domain according to the cross-correlation matrix. The inter-domain distance is measured and minimized according to the cross-correlation calculation formula, and the inter-domain distance is used as part of the network back propagation loss. The network back propagation loss is a combination of the inter-domain distance and the classification loss.
[0021] Furthermore, the loss function of the semi-supervised transfer learning model is set to "categorical_crossentropy" and "Cross-correlation loss", where "Cross-correlation loss" is defined as:
[0022]
[0023] In the above formula, is a constant used to weigh the contribution of irrelevant terms, N It is the source domain prediction and enhanced temporal features The dimension of i and j is the index of the dimension, C is the cross-correlation matrix along the batch dimension, which is expressed as:
[0024]
[0025] In the above formula, yes l 2 norm, used to ensure and In the comparable range.
[0026] Furthermore, the HLR layer enhances the data, including the following operations:
[0027] S201. Use the HLR head loss ratio to enhance the input data. The calculation formula is as follows:
[0028]
[0029] In the above formula, for a given measurement time, For three different pressures at the same time, if ,but ;
[0030] S202, normalize the enhanced data, and the normalization function is shown in the following formula:
[0031]
[0032]
[0033] In the above formula, is the data to be normalized, is a row vector consisting of the minimum values in each column, is a row vector consisting of the maximum values in each column, max is the maximum value of the interval to be mapped, and min is the minimum value of the interval to be mapped. is the result of standardization. is the result of normalization.
[0034] Furthermore, in the first branch network, the input data is transformed by the Reshape dimension and then enters the Feature layer. The first layer of the Feature layer is a one-dimensional convolution layer, which is respectively connected to the Batchnorm layer, the ReLU activation function layer and the MaxPooling layer. The Batchnorm layer adjusts the input distribution of each layer by standardizing the data in each small batch so that its mean is close to 0 and the variance is close to 1.
[0035] Furthermore, four layers consisting of residual blocks, convolutional layers, pooling layers and Batchnorm layers are constructed in the second branch network, where the first pooling layer function is Maxpooling and the second pooling layer function is GlobalAveragePooling.
[0036] Compared with the prior art, the present invention has the following beneficial effects:
[0037] The intelligent diagnosis method for water supply network leakage based on semi-supervised transfer learning provided by the present invention benefits from the introduction of the transfer learning inter-domain distance measurement method "Cross-correlation loss", which enables the method to reduce the inter-domain distance between the source domain and the target domain, solves the problem of low network fitting due to the small amount of target domain data, thereby leading to low diagnostic accuracy, and the introduction of transfer learning enables the target domain network to learn inter-domain invariant knowledge, so that higher accuracy can be obtained using data from different pipe networks, and the introduction of regularization terms prevents the data from being mapped to one point due to the small inter-domain distance. The HLR head loss ratio is used in the model to strengthen the data, so that the data obtains more pressure features, and small leakage detection obtains higher detection accuracy. Applying these beneficial results to the system for water supply network leakage diagnosis can assist engineers to better judge the operating status of the entire water supply network system, improve the efficiency of industrial production, reduce maintenance costs, reduce economic losses, improve water quality, and better protect personal safety. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only preferred embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0039] Figure 1 It is a schematic diagram of the overall process of the intelligent diagnosis method for water supply network leakage based on semi-supervised transfer learning provided by an embodiment of the present invention.
[0040] Figure 2 It is a schematic diagram of the DACC network structure provided by an embodiment of the present invention.
[0041] Figure 3 It is a schematic diagram of the residual block structure provided by an embodiment of the present invention.
[0042] Figure 4 It is a schematic diagram of the one-dimensional convolution principle provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0043] The principles and features of the present invention are described below in conjunction with the accompanying drawings. The enumerated embodiments are only used to explain the present invention and are not used to limit the scope of the present invention.
[0044] Reference Figure 1 ,This embodiment provides a water supply network leakage intelligent diagnosis method based on semi-supervised transfer learning, and the method includes three parts: data preprocessing, model construction and model evaluation.
[0045] Data preprocessing: obtain the original data of pipeline network pressure, check the missing values and outliers of the original data of pipeline network pressure, perform windowing and smoothing on the checked original data of pipeline network pressure, obtain target domain data and source domain data, and then divide the target domain data and source domain data according to whether they have labels or not, and obtain unlabeled source domain data and target domain data, as well as labeled source domain data and target domain data.
[0046] As a possible implementation method, this embodiment obtains the original data of the pipe network pressure through the following operations:
[0047] S101. Construct the topological structures net1 and net2 of the pipe network.
[0048] Exemplarily, EPANET2.2 software may be used to construct the topological structure of the pipe network, and the completed pipe network structure is output as a .inp file.
[0049] S102, performing data simulation on the pipe network based on net1 and net2, setting the sampling interval of the pressure sensor and the simulation running time of the pipe network, and randomly setting the leakage point and leakage radius size for the pipes in the pipe network.
[0050] For example, for the output .inp file, the WNTR hydraulic analysis package can be used to perform data simulation on the pipe network.
[0051] S103. The pressure sensor collects time series pressure data during multiple simulations, and uses the time series pressure data as original data of the pipe network pressure.
[0052] For example, net1 and net2 can be simulated using an environment based on Python3.12 and Pytorch2.4. The sampling interval of the pressure sensor is set to 15 minutes, the pipe network simulation running time is 4 days, and the leakage points and leakage radius sizes are randomly set for the pipes in the pipe network. The pipe network pressure data of each simulation will be output in the form of a csv table. Five pressure monitoring points are set in net1 and net2 respectively, so the size of the pressure data in each generated csv table is 384×5. Net1 and net2 are simulated 1000 times respectively, where the data of net1 is subsequently used as the target domain data, and the data of net2 is subsequently used as the source domain data.
[0053] As a possible implementation method, in order to make the data closer to reality and improve the robustness and generalization of the model, Gaussian white noise with a mean of 0 and a variance of 1 and random disturbances in the range of [-10, 10] are added to the data.
[0054] As a possible implementation method, the original data of the pipe network pressure after inspection is subjected to windowing and smoothing processing, and the size of the window function can be set to 192×1, that is, the pressure data of each pressure detection point for 48 hours is taken as one data.
[0055] Model construction: A semi-supervised transfer learning model consisting of two branch networks is constructed. The first branch network is responsible for training the labeled data in the source domain data, and the second branch network is responsible for training the labeled data in the target domain data. The unlabeled data in the target domain data and the source domain data are jointly trained through the two branch networks. After training on both unlabeled data and labeled data, the final classifier is obtained.
[0056] The model proposed in this embodiment is based on Python 3.12 and Pytorch 2.4.
[0057] The first layer of the first branch network is the HLR layer, which enhances the data collected by the limited pressure sensors arranged in the pipe network topology map to obtain more and more obvious multi-dimensional features. The second layer is the Feature layer, which is used to extract high-dimensional features of multi-dimensional features. The extracted high-dimensional features are then passed through the Bottleneck layer to obtain low-dimensional feature information of the data, and finally through the classification layer to obtain classification information of the data.
[0058] The second branch network has the same structure as the first branch network. It enhances the target domain data through HLR and then inputs the multi-dimensional features into the Feature layer. The Feature layer obtains the high-dimensional features of the data and then obtains the low-dimensional features through the Bottleneck layer. Finally, the classification results are obtained through the classifier.
[0059] As a possible implementation, the HLR layer enhances the data, specifically including the following operations:
[0060] S201. Use the HLR head loss ratio to enhance the input data. The calculation formula is as follows:
[0061]
[0062] In the above formula, for a given measurement time, For three different pressures at the same time, if ,but The right side of the equation can be viewed as the head loss ratio of two different water flow paths: one from Node to A path from a node Node to The path of the node.
[0063] Based on the above embodiment, each leakage will have data from 5 pressure monitoring points. After the HLR enhances the data, the dimension of the input data changes from 5 to 11, and the HLR has obvious characteristics for the leakage data, which is conducive to the neural network to extract its features.
[0064] S202, normalize the enhanced data, and the normalization function is shown in the following formula:
[0065]
[0066]
[0067] In the above formula, is the data to be normalized, is a row vector consisting of the minimum values in each column, is a row vector consisting of the maximum values in each column, max is the maximum value of the interval to be mapped, and min is the minimum value of the interval to be mapped. is the result of standardization. is the result of normalization.
[0068] In this embodiment, the entire source domain data set is used as training data, and the target domain data is randomly split, with 40% as a training set, 30% as a validation set, and 30% as a test set.
[0069] like Figure 2 As shown in the network structure, after the training set data is input, the source domain data enters the first branch network and the target domain data enters the second branch network.
[0070] First, the first branch network undergoes Reshape dimension transformation and then enters the designed Feature layer. The Feature layer consists of a convolutional layer, a pooling layer, and a residual module, which contains four residual modules. The basic structure of the residual module is as follows Figure 3 As shown in Figure 1. The addition operation of the residual module allows the information to flow into the fully connected layer after simple processing, thereby retaining the original input information. The addition operation can also avoid the gradient explosion and gradient disappearance problems in the network. The first layer of the first branch network is a one-dimensional convolutional layer with a dimension of 64. The structure of the one-dimensional convolutional layer is as follows: Figure 4As shown in the figure. The one-dimensional convolutional layer is followed by the Batchnorm layer, the ReLU activation function layer, and the MaxPooling layer. The Batchnorm layer standardizes the data in each small batch and adjusts the input distribution of each layer so that its mean is close to 0 and its variance is close to 1, thereby accelerating training, improving stability, and having a certain regularization effect. By reducing the internal covariate shift, the BatchNorm layer can make the training process smoother, reduce the sensitivity to weight initialization and learning rate, and also help reduce the dependence on other regularization techniques such as Dropout. The ReLU activation function can introduce nonlinear transformations, allowing the network to learn complex patterns and relationships in the data while alleviating the problem of vanishing gradients. The use of the maximum pooling operation can retain the most significant features in the window and reduce the spatial size of the feature map, reducing the computational complexity of the model while improving the translation invariance of the model.
[0071] The second branch network has the same HLR (Head Loss Ratio) layer, Feature layer, Bottleneck layer, and Classifier layer as the first branch network, and the Feature layers of the two branch networks share parameters. Four layers consisting of residual blocks, convolutional layers, pooling layers, and Batchnorm layers are constructed in the second branch network. Among them, the first pooling layer function is "MaxPooling" and the second pooling layer function is "GlobalAveragePooling". The use of the maximum pooling operation "MaxPooling" can retain the most significant features in the window and reduce the spatial size of the feature map, reducing the computational complexity of the model while improving the translation invariance of the model; the use of the average pooling operation "GlobalAveragePooling" enhances the model's global understanding of the output features and also improves the model's ability to resist overfitting; and the use of the nonlinear activation function ReLU helps maintain the network's nonlinear expression ability. The BottleNeck layer in the network is composed of a fully connected layer with ReLU as the activation function. The ReLU activation function can introduce nonlinear transformations, allowing the network to learn complex patterns of the data.
[0072] In this embodiment, the two branch networks share the weight parameters of the Feature layer, and the low-dimensional feature information obtained by passing the input data through the Bottleneck layer of the two branch networks is and Perform cross-correlation analysis, calculate the cross-correlation matrix, and measure the inter-domain distance between the source domain and the target domain according to the cross-correlation matrix. Measure the inter-domain distance according to the cross-correlation calculation formula and minimize the inter-domain distance. Use the inter-domain distance as part of the network back-propagation loss. The network back-propagation loss is a combination of the inter-domain distance and the classification loss. The cross-correlation loss can reduce the distance between the source domain data and the target domain data to achieve domain confusion. However, excessive reduction of the inter-domain distance will cause the two domains to concentrate on one point, which is not conducive to the training of the classifier. Therefore, the classification loss is introduced to enable the classifier to obtain better performance. Using the back-propagation loss, the network is trained according to the gradient descent method, and the weights and bias parameters of the network are continuously adjusted to finally obtain the optimal network.
[0073] As a possible implementation, Softmax is used as the activation function in the Classifier layer, and the number of output neurons is set to 2. The Softmax function is mostly used in the output layer of multi-classification tasks. It converts the raw data output by the entire model into a set of probability distributions, converts the output value of each category into a set of probability values, and makes the sum of all probabilities equal to 1. The advantage of this is that the model can better explain the confidence of each category. Its mathematical formula can be expressed as:
[0074]
[0075] In the above formula, xi Represented as the first i elements, and k Expressed as the length of the vector.
[0076] As a possible implementation method, the Adamax optimizer is used in the forward operation of the model. Adamax is a variant of the Adam optimizer. Compared with other optimizers, the Adamax optimizer uses a simpler calculation method when calculating gradient updates, which reduces the demand for memory and computing resources, improves the stability of gradient improvement, and is more applicable to the network.
[0077] As a possible implementation, the loss function of the semi-supervised transfer learning model is set to "categorical_crossentropy" and "Cross-correlation loss". The "categorical_crossentropy" loss function is extremely applicable when the target label is in the form of one-hot encoding. It can minimize the quantization distance between the output probability and the true label, effectively judge the difference between the network output and the true label, and guide the model on how to better classify. And it can maintain the consistency of the output, improve the interpretability and stability of the model. "Cross-correlationloss" is used to measure the correlation between the source domain and the target domain. The basic idea is that the prediction of a given sample should be related to its corresponding enhanced time features, but not to the time features of the remaining samples in the batch dimension. Therefore, the cross-correlation matrix between the source domain prediction and the enhanced time features should be close to the unit matrix. In other words, the diagonal elements should be close to 1, and the off-diagonal elements should be close to 0. The "Cross-correlation loss" loss function is defined as:
[0078]
[0079] In the above formula, is a constant used to weigh the contribution of irrelevant terms, N It is the source domain prediction and enhanced temporal features The dimension of i and j is the index of the dimension, C is the cross-correlation matrix along the batch dimension, which is expressed as:
[0080]
[0081] In the above formula, yes l 2 norm, used to ensure and In the comparable range.
[0082] The cross-correlation loss is similar to the common transfer learning loss function. However, the cross-correlation loss is different from the general loss function. The cross-correlation loss function does not require the construction of a large number of negative samples, making the model efficient and scalable. By using the cross-correlation loss function, the model can learn to distinguish the potential representation of the correlation between the source domain and the target domain.
[0083] Table 1 shows the selection of model hyperparameters.
[0084] Table 1 Selection of model hyperparameters
[0085]
[0086] After the model is compiled, use the training set to train the model.
[0087] Model evaluation: Use randomly divided data sets to perform multi-metric tests on the semi-supervised transfer learning model. The specific process is as follows:
[0088] In this embodiment, the target domain test set is used to calculate the accuracy and loss value of the model to evaluate the model.
[0089] This mainly includes the binary classification task of pipeline leakage detection. In the end, the classification accuracy of the test set with pipeline leakage intelligent detection as the target value reached 99.12%, meeting the actual needs of the project.
[0090] The accuracy of model classification is one of the important criteria for evaluating model performance. A high accuracy rate means that the model correctly identifies most of the sample data, indicating that the model has good classification and generalization capabilities. The formula is:
[0091]
[0092] Among them TP Indicates the number of samples correctly predicted by the model as positive. TN Indicates the number of samples that the model correctly predicts as negative classes, FP Indicates the number of samples that the model incorrectly predicts as positive. FN Indicates the number of samples that the model incorrectly predicts as negative.
[0093] Precision can be predicted as the accuracy in the positive sample, and its formula is:
[0094]
[0095] In order to illustrate the effectiveness of the method provided by the present invention, we used the traditional CNN network, ResNet1D network, and MLPnet to compare the water supply network pipeline leakage as the target value. The comparison results are shown in Table 2. The comparison results show that compared with other models, the network constructed by the present invention has improved fault diagnosis accuracy under both target conditions. DACC represents the network constructed based on the semi-supervised transfer learning method proposed by the present invention.
[0096] Table 2 Accuracy comparison of the present invention with 1DCNN, ResNet1D, and MLPnet
[0097]
[0098] The experimental results show that the method provided by the present invention is more suitable for intelligent diagnosis of pipe network faults. This method significantly improves the accuracy of fault diagnosis of water supply pipe network systems and effectively improves the performance indicators of fault diagnosis of water supply pipe network systems.
Claims
1. An intelligent diagnosis method for water supply network leakage based on semi-supervised transfer learning, characterized in that: The method comprises: Data preprocessing: Obtain the original data of pipeline network pressure, check the missing values and abnormal values of the original data of pipeline network pressure, perform windowing and smoothing on the checked original data of pipeline network pressure, obtain the target domain data and source domain data, and then divide the target domain data and source domain data according to whether there are labels or not; Model construction: A semi-supervised transfer learning model with two branch networks is constructed. The first branch network is responsible for training the labeled data in the source domain data, and the second branch network is responsible for training the labeled data in the target domain data. The unlabeled data in the target domain data and the source domain data are jointly trained by the two branch networks. After training with both unlabeled and labeled data, the final classifier is obtained. Model evaluation: Use randomly divided datasets to perform multi-metric tests on semi-supervised transfer learning models; The two branch networks of the semi-supervised transfer learning model include from front to back: The HLR layer is used to enhance the input data to obtain multi-dimensional features; Feature layer, used to extract high-dimensional features of multi-dimensional features; Bottleneck layer, used to obtain low-dimensional feature information of input data based on the high-dimensional features extracted by the Feature layer; Classifier layer, used to obtain classification results based on low-dimensional feature information; The HLR layer enhances the data, including the following operations: S201. Use the HLR head loss ratio to enhance the input data. The calculation formula is as follows: In the above formula, for a given measurement time, For three different pressures at the same time, if ,but ; S202, normalize the enhanced data, and the normalization function is shown in the following formula: In the above formula, is the data to be normalized, is a row vector consisting of the minimum values in each column, is a row vector consisting of the maximum values in each column, max is the maximum value of the interval to be mapped, and min is the minimum value of the interval to be mapped. is the result of standardization. is the result of normalization.
2. The method according to claim 1, characterized in that: Obtaining the original data of pipe network pressure includes the following operations: S101, construct the topological structures net1 and net2 of the pipe network; S102, performing data simulation on the pipe network based on net1 and net2, setting the sampling interval of the pressure sensor and the simulation running time of the pipe network, and randomly setting the leakage point and leakage radius size for the pipes in the pipe network; S103. The pressure sensor collects time series pressure data during multiple simulations, and uses the time series pressure data as original data of the pipe network pressure.
3. The method according to claim 2, characterized in that The original data of the pipe network pressure in net1 after windowing and smoothing is used as the target domain data, and the original data of the pipe network pressure in net2 after windowing and smoothing is used as the source domain data.
4. The method according to claim 1, characterized in that: The two branch networks of the semi-supervised transfer learning model share the weight parameters of the Feature layer, perform cross-correlation analysis on the low-dimensional feature information obtained by the Bottleneck layer of the two branch networks, calculate the cross-correlation matrix, measure the inter-domain distance between the source domain and the target domain according to the cross-correlation matrix, measure the inter-domain distance according to the cross-correlation calculation formula and minimize the inter-domain distance, use the inter-domain distance as part of the network back propagation loss, and the network back propagation loss is a combination of the inter-domain distance and the classification loss.
5. The method according to claim 4, characterized in that The loss function of the semi-supervised transfer learning model is set to "categorical_crossentropy" and "Cross-correlation loss", where "Cross-correlationloss" is defined as: In the above formula, is a constant used to weigh the contribution of irrelevant terms, N It is the source domain prediction and enhanced temporal features The dimension of i and j is the index of the dimension, C is the cross-correlation matrix along the batch dimension, which is expressed as: In the above formula, yes l 2 norm, used to ensure and In the comparable range.
6. The method according to claim 1, characterized in that In the first branch network, the input data is transformed by the Reshape dimension and then enters the Feature layer. The first layer of the Feature layer is a one-dimensional convolution layer, which is respectively connected to the Batchnorm layer, the ReLU activation function layer and the MaxPooling maximum pooling layer. The Batchnorm layer adjusts the input distribution of each layer by standardizing the data in each small batch so that its mean is close to 0 and the variance is close to 1.
7. The method according to claim 1, characterized in that In the second branch network, four layers consisting of residual blocks, convolutional layers, pooling layers and Batchnorm layers are constructed, where the first pooling layer function is Maxpooling and the second pooling layer function is GlobalAveragePooling.